mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 03:21:29 +00:00
b35ccc3a35
Our preferences dialog right now is a rather huge dialog with more than 9 subpages, and all of those pages are programmed inside of the same class, same methods and all that - which means that if I change something on the dialog I can break any other thing quite easily. The idea of this patch series is to make it harder to break user settings and the settings dialog. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
27 lines
No EOL
666 B
C++
27 lines
No EOL
666 B
C++
#ifndef ABSTRACTPREFERENCESWIDGET_H
|
|
#define ABSTRACTPREFERENCESWIDGET_H
|
|
|
|
#include <QIcon>
|
|
#include <QWidget>
|
|
|
|
class AbstractPreferencesWidget : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
AbstractPreferencesWidget(const QString& name, const QIcon& icon, float positionHeight);
|
|
QIcon icon() const;
|
|
QString name() const;
|
|
float positionHeight() const;
|
|
|
|
/* gets the values from the preferences and should set the correct values in
|
|
* the interface */
|
|
virtual void refreshSettings() = 0;
|
|
|
|
/* gets the values from the interface and set in the preferences object. */
|
|
virtual void syncSettings() = 0;
|
|
|
|
private:
|
|
QIcon _icon;
|
|
QString _name;
|
|
float _positionHeight;
|
|
};
|
|
#endif |