2017-04-27 18:26:05 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2015-09-17 17:04:27 +00:00
|
|
|
#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;
|
|
|
|
|
2015-11-10 21:45:13 +00:00
|
|
|
signals:
|
|
|
|
void settingsChanged();
|
|
|
|
|
2015-09-17 17:04:27 +00:00
|
|
|
private:
|
|
|
|
QIcon _icon;
|
|
|
|
QString _name;
|
|
|
|
float _positionHeight;
|
|
|
|
};
|
2015-11-10 21:45:13 +00:00
|
|
|
#endif
|