Refactoring widget functionality out of SettingsVariable into new SettingsInterface

This commit is contained in:
Dan Paulat 2022-12-20 22:46:09 -06:00
parent ab91bf9e8d
commit 70565969dc
6 changed files with 340 additions and 194 deletions

View file

@ -81,6 +81,13 @@ public:
*/
void Reset();
/**
* Gets the staged value of the settings variable, if defined.
*
* @return Optional staged value
*/
std::optional<T> GetStaged() const;
/**
* Validate the value against the defined parameters of the settings
* variable.
@ -158,20 +165,6 @@ public:
*/
virtual void WriteValue(boost::json::object& json) const override;
/**
* Sets the edit widget from the settings dialog.
*
* @param widget Edit widget
*/
void SetEditWidget(QWidget* widget);
/**
* Sets the reset button from the settings dialog.
*
* @param button Reset button
*/
void SetResetButton(QAbstractButton* button);
protected:
virtual bool Equals(const SettingsVariableBase& o) const override;