]> cloud.milkyroute.net Git - dolphin.git/blob - src/settings/general/previewssettingspage.h
Build with QT_NO_KEYWORDS
[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 "settings/settingspagebase.h"
11
12 class QSpinBox;
13 class QListView;
14 class QModelIndex;
15
16 /**
17 * @brief Allows the configuration of file previews.
18 */
19 class PreviewsSettingsPage : public SettingsPageBase
20 {
21 Q_OBJECT
22
23 public:
24 explicit PreviewsSettingsPage(QWidget* parent);
25 ~PreviewsSettingsPage() override;
26
27 /**
28 * Applies the general settings for the view modes
29 * The settings are persisted automatically when
30 * closing Dolphin.
31 */
32 void applySettings() override;
33
34 /** Restores the settings to default values. */
35 void restoreDefaults() override;
36
37 protected:
38 void showEvent(QShowEvent* event) override;
39
40 private Q_SLOTS:
41 void configureService(const QModelIndex& index);
42
43 private:
44 void loadPreviewPlugins();
45 void loadSettings();
46
47 private:
48 bool m_initialized;
49 QListView *m_listView;
50 QStringList m_enabledPreviewPlugins;
51 QSpinBox* m_localFileSizeBox;
52 QSpinBox* m_remoteFileSizeBox;
53 };
54
55 #endif