add getters for min and max in dial slider and thermo
This commit is contained in:
2024-08-27 22:25:45 +02:00
parent 5d7b184480
commit 157f9e9491
6 changed files with 39 additions and 0 deletions
+10
View File
@@ -26,6 +26,16 @@ double UI_dial::value() const
return m_value;
}
double UI_dial::min() const
{
return m_min;
}
double UI_dial::max() const
{
return m_max;
}
void UI_dial::from_json(const json& j)
{
UI_item::from_json(j);
+3
View File
@@ -12,6 +12,9 @@ class UI_dial : public UI_item
void set_value(double value) override;
double value() const;
double min() const;
double max() const;
void from_json(const json& j) override;
json to_json() const override;
private:
+10
View File
@@ -31,6 +31,16 @@ double UI_slider::value() const
return m_value;
}
double UI_slider::min() const
{
return m_min;
}
double UI_slider::max() const
{
return m_max;
}
void UI_slider::from_json(const json& j)
{
UI_item::from_json(j);
+3
View File
@@ -12,6 +12,9 @@ class UI_slider : public UI_item
void set_value(double value) override;
double value() const;
double min() const;
double max() const;
void from_json(const json& j) override;
json to_json() const override;
private:
+10
View File
@@ -26,6 +26,16 @@ double UI_thermo::value() const
return m_value;
}
double UI_thermo::min() const
{
return m_min;
}
double UI_thermo::max() const
{
return m_max;
}
void UI_thermo::set_start_color(Color color)
{
this->m_color_map[0] = color;
+3
View File
@@ -13,6 +13,9 @@ class UI_thermo : public UI_item
void set_value(double value) override;
double value() const;
double min() const;
double max() const;
void set_start_color(Color color);
void set_end_color(Color color);
void add_color_stop(double value, Color color);