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