mirror-chatterino2/settings/intsetting.h

52 lines
709 B
C
Raw Normal View History

2017-01-20 06:10:28 +01:00
#ifndef INTSETTING_H
#define INTSETTING_H
#include "settings/setting.h"
#include <QString>
namespace chatterino {
namespace settings {
2017-01-21 05:14:27 +01:00
class IntSetting : public Setting
2017-01-20 06:10:28 +01:00
{
Q_OBJECT
2017-01-20 06:10:28 +01:00
public:
2017-01-21 05:14:27 +01:00
IntSetting(const QString &name, int defaultValue)
2017-01-20 06:10:28 +01:00
: Setting(name)
, value(defaultValue)
, defaultValue(defaultValue)
{
}
int
get() const
{
return this->value;
}
int
set(int value)
{
return (this->value = value);
}
void
save(const QSettings &settings) override
{
}
void
load(const QSettings &settings) override
{
}
private:
int value;
int defaultValue;
};
}
}
#endif // INTSETTING_H