File indexing completed on 2024-04-21 16:30:02
0001 /* 0002 * SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz@gmx.at> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef DOLPHINSETTINGSDIALOG_H 0008 #define DOLPHINSETTINGSDIALOG_H 0009 0010 #include <KActionCollection> 0011 #include <KPageDialog> 0012 0013 class QUrl; 0014 class SettingsPageBase; 0015 0016 /** 0017 * @brief Settings dialog for Dolphin. 0018 * 0019 * Contains the pages for Startup, View Modes, Navigation, Services, General, and Trash. 0020 */ 0021 class DolphinSettingsDialog : public KPageDialog 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 explicit DolphinSettingsDialog(const QUrl &url, QWidget *parent = nullptr, KActionCollection *actions = {}); 0027 ~DolphinSettingsDialog() override; 0028 0029 KPageWidgetItem *trashSettings; 0030 0031 Q_SIGNALS: 0032 void settingsChanged(); 0033 0034 private Q_SLOTS: 0035 /** Enables the Apply button. */ 0036 void enableApply(); 0037 void applySettings(); 0038 void restoreDefaults(); 0039 0040 protected: 0041 void closeEvent(QCloseEvent *event) override; 0042 0043 private: 0044 static SettingsPageBase *createTrashSettingsPage(QWidget *parent); 0045 0046 QList<SettingsPageBase *> m_pages; 0047 bool m_unsavedChanges; 0048 }; 0049 0050 #endif