diff options
| author | Benedikt Thiemer <[email protected]> | 2024-03-15 16:28:35 +0000 |
|---|---|---|
| committer | Felix Ernst <[email protected]> | 2024-03-15 16:28:35 +0000 |
| commit | 1d4355f619ca8098d12f330741017e417a756083 (patch) | |
| tree | efd68ed68014947d7bd6dd415408cb0a7bf5d42e /src/settings/interface/panelsettingspage.h | |
| parent | 89822d3ff22d7694baa6659824b53f5dd3f0ccb2 (diff) | |
Add settings page for Panels
For now this just includes the settings for the information panel.
Prior to this commit the options for configuring the information panel
were only exposed via right clicking the information panel. This was
not discoverable enough. Our guidelines also state that much. See:
https://community.kde.org/Get_Involved/Design/Frequently_Discussed_Topics#Context_menus_are_not_enough
The settings page is missing the "Configure" button for the entries in
the information panel, which can only be found in the context menu.
This is because I thought it would be weird to move it to the settings
page. (The "configure" button is used to select the entries for the
information panel)
BUG: 480243
FIXED-IN: 24.05
Diffstat (limited to 'src/settings/interface/panelsettingspage.h')
| -rw-r--r-- | src/settings/interface/panelsettingspage.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/settings/interface/panelsettingspage.h b/src/settings/interface/panelsettingspage.h new file mode 100644 index 000000000..b2d0265f1 --- /dev/null +++ b/src/settings/interface/panelsettingspage.h @@ -0,0 +1,44 @@ +/* + * SPDX-FileCopyrightText: 2024 Benedikt Thiemer <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef PANELSETTINGSPAGE_H +#define PANELSETTINGSPAGE_H + +#include "config-dolphin.h" +#include "settings/settingspagebase.h" + +class QCheckBox; +class QRadioButton; + +/** + * @brief Page for the information panel. + */ +class PanelSettingsPage : public SettingsPageBase +{ + Q_OBJECT + +public: + explicit PanelSettingsPage(QWidget *parent = nullptr); + ~PanelSettingsPage() override; + + /** @see SettingsPageBase::applySettings() */ + void applySettings() override; + + /** @see SettingsPageBase::restoreDefaults() */ + void restoreDefaults() override; + +private: + void loadSettings(); + void showPreviewToggled(); + +private: + QCheckBox *m_showPreview; + QCheckBox *m_autoPlayMedia; + QCheckBox *m_showHovered; + QRadioButton *m_dateFormatLong; + QRadioButton *m_dateFormatShort; +}; + +#endif |
