Add units to the dial, slider and thermo
This commit is contained in:
2024-10-17 10:19:50 +02:00
parent 95a21250a6
commit 5889af5494
6 changed files with 43 additions and 7 deletions
+3
View File
@@ -8,6 +8,8 @@ class UI_thermo : public UI_item
{
Q_OBJECT
public:
UI_thermo(std::string text, std::string unit, Color fg_color, Color bg_color, double min, double max, double value,
QObject *parrent = nullptr);
UI_thermo(std::string text, Color fg_color, Color bg_color, double min, double max, double value,
QObject *parrent = nullptr);
UI_thermo(const json &j, QObject *parrent = nullptr);
@@ -32,5 +34,6 @@ class UI_thermo : public UI_item
double m_min;
double m_max;
double m_value;
std::string m_unit;
std::unordered_map<double, Color> m_color_map;
};