96 virtual void resetValue() override { value = defval; } \ |
96 virtual void resetValue() override { value = defval; } \ |
97 virtual bool isDefault() const override { return value == defval; } \ |
97 virtual bool isDefault() const override { return value == defval; } \ |
98 virtual QVariant toVariant() const override { return QVariant::fromValue<T> (value); } \ |
98 virtual QVariant toVariant() const override { return QVariant::fromValue<T> (value); } \ |
99 virtual QVariant defaultVariant() const override { return QVariant::fromValue<T> (defval); } \ |
99 virtual QVariant defaultVariant() const override { return QVariant::fromValue<T> (defval); } \ |
100 virtual void loadFromVariant (const QVariant& val) override { value = val.value<T>(); } \ |
100 virtual void loadFromVariant (const QVariant& val) override { value = val.value<T>(); } \ |
|
101 static NAME##Config& getByName (str name); |
101 |
102 |
102 #define DEFINE_UNARY_OPERATOR(T, OP) \ |
103 #define DEFINE_UNARY_OPERATOR(T, OP) \ |
103 T operator OP() { \ |
104 T operator OP() { \ |
104 return OP value; \ |
105 return OP value; \ |
105 } |
106 } |