6class InfoItem:
public Gtk::Box{
9 Gtk::Label* valueLabel;
12 int decimalPlaces = 6;
15 InfoItem(std::string name);
17 void setName(std::string name);
18 std::string getName();
20 void setDecimalPlaces(
int places);
23 void setValue(
long value);
24 void setValue(
double value);
25 void setValue(
float value);
26 void setValue(std::string value);
28 void setValue(T value) {
29 std::string valueString = std::to_string(value);
30 setValue(valueString);
33 bool getValueAsBool();
35 long getValueAsLong();
36 float getValueAsFloat();
37 double getValueAsDouble();
38 std::string getValue();
39 void setBackground(std::string color);
40 void setTextColor(std::string color,
bool bold);