GH-1223 fix override settings

They now work more like passthrough settings, except not passing through set and reset
This commit is contained in:
Petr Mrázek
2015-09-04 02:10:29 +02:00
parent 151a0ca11e
commit cd108fd029
8 changed files with 88 additions and 37 deletions

View File

@ -30,10 +30,17 @@ class OverrideSetting : public Setting
{
Q_OBJECT
public:
explicit OverrideSetting(std::shared_ptr<Setting> other);
explicit OverrideSetting(std::shared_ptr<Setting> overriden, std::shared_ptr<Setting> gate);
virtual QVariant defValue() const;
virtual QVariant get() const;
virtual void set (QVariant value);
virtual void reset();
private:
bool isOverriding() const;
protected:
std::shared_ptr<Setting> m_other;
std::shared_ptr<Setting> m_gate;
};