]> cloud.milkyroute.net Git - dolphin.git/blob - src/settings/interface/panelsettingspage.h
settings: Fix memory leak in PanelSettingsPage constructor
[dolphin.git] / src / settings / interface / panelsettingspage.h
1 /*
2 * SPDX-FileCopyrightText: 2024 Benedikt Thiemer <numerfolt@posteo.de>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 #ifndef PANELSETTINGSPAGE_H
7 #define PANELSETTINGSPAGE_H
8
9 #include "config-dolphin.h"
10 #include "settings/settingspagebase.h"
11
12 class QCheckBox;
13 class QRadioButton;
14
15 /**
16 * @brief Page for the information panel.
17 */
18 class PanelSettingsPage : public SettingsPageBase
19 {
20 Q_OBJECT
21
22 public:
23 explicit PanelSettingsPage(QWidget *parent = nullptr);
24 ~PanelSettingsPage() override;
25
26 /** @see SettingsPageBase::applySettings() */
27 void applySettings() override;
28
29 /** @see SettingsPageBase::restoreDefaults() */
30 void restoreDefaults() override;
31
32 private:
33 void loadSettings();
34 void showPreviewToggled();
35
36 private:
37 QCheckBox *m_showPreview;
38 QCheckBox *m_autoPlayMedia;
39 QCheckBox *m_showHovered;
40 QRadioButton *m_dateFormatLong;
41 QRadioButton *m_dateFormatShort;
42 };
43
44 #endif