]> cloud.milkyroute.net Git - dolphin.git/blob - src/settings/general/previewssettingspage.h
2c3e4dfeffd7ffd8dc9e711f72fc8d0db235c1b0
[dolphin.git] / src / settings / general / previewssettingspage.h
1 /*
2 * SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz19@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #ifndef PREVIEWSSETTINGSPAGE_H
8 #define PREVIEWSSETTINGSPAGE_H
9
10 #include <kiowidgets_export.h>
11
12 #include "settings/settingspagebase.h"
13
14 class QSpinBox;
15 class QListView;
16 class QModelIndex;
17
18 /**
19 * @brief Allows the configuration of file previews.
20 */
21 class PreviewsSettingsPage : public SettingsPageBase
22 {
23 Q_OBJECT
24
25 public:
26 explicit PreviewsSettingsPage(QWidget *parent);
27 ~PreviewsSettingsPage() override;
28
29 /**
30 * Applies the general settings for the view modes
31 * The settings are persisted automatically when
32 * closing Dolphin.
33 */
34 void applySettings() override;
35
36 /** Restores the settings to default values. */
37 void restoreDefaults() override;
38
39 protected:
40 void showEvent(QShowEvent *event) override;
41
42 private Q_SLOTS:
43 #if KIOWIDGETS_BUILD_DEPRECATED_SINCE(5, 87)
44 void configureService(const QModelIndex &index);
45 #endif
46
47 private:
48 void loadPreviewPlugins();
49 void loadSettings();
50
51 private:
52 bool m_initialized;
53 QListView *m_listView;
54 QStringList m_enabledPreviewPlugins;
55 QSpinBox *m_localFileSizeBox;
56 QSpinBox *m_remoteFileSizeBox;
57 };
58
59 #endif