mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
Adds unit property to dial.
Adds the ability to store and retrieve a unit string associated with the dial, allowing for more context-aware representation of values.
This commit is contained in:
@@ -53,6 +53,11 @@ double UI_dial::max() const
|
|||||||
return m_max;
|
return m_max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string UI_dial::unit() const
|
||||||
|
{
|
||||||
|
return m_unit;
|
||||||
|
}
|
||||||
|
|
||||||
void UI_dial::from_json(const json &j)
|
void UI_dial::from_json(const json &j)
|
||||||
{
|
{
|
||||||
UI_item::from_json(j);
|
UI_item::from_json(j);
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ class UI_dial : public UI_item
|
|||||||
|
|
||||||
double min() const;
|
double min() const;
|
||||||
double max() const;
|
double max() const;
|
||||||
|
std::string unit() const;
|
||||||
|
|
||||||
void from_json(const json &j) override;
|
void from_json(const json &j) override;
|
||||||
json to_json(size_t id) const override;
|
json to_json(size_t id) const override;
|
||||||
|
|||||||
Reference in New Issue
Block a user