File indexing completed on 2024-05-12 17:18:54
0001 /* 0002 * SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz19@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef PREVIEWSSETTINGSPAGE_H 0008 #define PREVIEWSSETTINGSPAGE_H 0009 0010 #include <kiowidgets_export.h> 0011 0012 #include "settings/settingspagebase.h" 0013 0014 class QSpinBox; 0015 class QListView; 0016 class QModelIndex; 0017 0018 /** 0019 * @brief Allows the configuration of file previews. 0020 */ 0021 class PreviewsSettingsPage : public SettingsPageBase 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 explicit PreviewsSettingsPage(QWidget *parent); 0027 ~PreviewsSettingsPage() override; 0028 0029 /** 0030 * Applies the general settings for the view modes 0031 * The settings are persisted automatically when 0032 * closing Dolphin. 0033 */ 0034 void applySettings() override; 0035 0036 /** Restores the settings to default values. */ 0037 void restoreDefaults() override; 0038 0039 protected: 0040 void showEvent(QShowEvent *event) override; 0041 0042 private Q_SLOTS: 0043 0044 private: 0045 void loadPreviewPlugins(); 0046 void loadSettings(); 0047 0048 private: 0049 bool m_initialized; 0050 QListView *m_listView; 0051 QStringList m_enabledPreviewPlugins; 0052 QSpinBox *m_localFileSizeBox; 0053 QSpinBox *m_remoteFileSizeBox; 0054 }; 0055 0056 #endif