File indexing completed on 2024-04-21 16:30:03

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 SETTINGSPAGEBASE_H
0008 #define SETTINGSPAGEBASE_H
0009 
0010 #include <QWidget>
0011 
0012 /**
0013  * @brief Base class for the settings pages of the Dolphin settings dialog.
0014  */
0015 class SettingsPageBase : public QWidget
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     explicit SettingsPageBase(QWidget *parent = nullptr);
0021     ~SettingsPageBase() override;
0022 
0023     /**
0024      * Must be implemented by a derived class to
0025      * persistently store the settings.
0026      */
0027     virtual void applySettings() = 0;
0028 
0029     /**
0030      * Must be implemented by a derived class to
0031      * restored the settings to default values.
0032      */
0033     virtual void restoreDefaults() = 0;
0034 
0035 Q_SIGNALS:
0036     /** Is emitted if a setting has been changed. */
0037     void changed();
0038 };
0039 
0040 #endif