mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
UI
add getters for min and max in dial slider and thermo
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user