mirror-chatterino2/settings/setting.h

37 lines
504 B
C
Raw Normal View History

2017-01-18 21:30:23 +01:00
#ifndef SETTING_H
#define SETTING_H
2017-01-20 06:10:28 +01:00
#include <QSettings>
2017-01-18 21:30:23 +01:00
#include <QString>
namespace chatterino {
namespace settings {
class Setting : public QObject
2017-01-18 21:30:23 +01:00
{
Q_OBJECT
2017-01-18 21:30:23 +01:00
public:
explicit Setting(const QString &name)
: name(name)
{
}
2017-01-20 06:10:28 +01:00
virtual void save(const QSettings &settings) = 0;
virtual void load(const QSettings &settings) = 0;
protected:
2017-01-18 21:30:23 +01:00
const QString &
getName() const
{
return name;
}
private:
QString name;
};
}
2017-01-20 06:10:28 +01:00
}
2017-01-18 21:30:23 +01:00
#endif // SETTING_H