12 mDefaultValue = defVal;
32 bool newDefaultValue = dv.
toBool();
34 if(mDefaultValue == newDefaultValue)
37 bool hasDefaultValue = (mValue == mDefaultValue);
38 mDefaultValue = newDefaultValue;
40 if (hasDefaultValue)
setValue(mDefaultValue);
45 bool newValue = v.
toBool();
47 if(mValue == newValue)
virtual SettingsWidget * editWidget(QWidget *parent=nullptr) override
virtual QVariant defaultValue() const override
virtual QVariant value() const override
SettingsItemCheckbox(const QString &label, const QString &tag, bool defVal, const QString &cat=QString(), const QString &descr=QString(), bool isGlobal=true)
virtual void setValue(const QVariant &v) override
virtual void setDefaultValue(const QVariant &dv) override
virtual QString tag() const
virtual QString label() const
virtual bool isGlobal() const
void registerSetting(SettingsItem *item)
static SettingsManager * instance()
QObject * parent() const const
bool toBool() const const