Esp32-RBGridUI
Library for creating UIs for the RBController app
Loading...
Searching...
No Matches
circle.h
Go to the documentation of this file.
1#pragma once
2
3#include "widget.h"
4
5namespace gridui {
6
9class Circle : public Widget {
10 template <typename Self, typename Finished>
12
13 using Widget::Widget;
14
15public:
16 void setColor(const std::string& color) {
17 m_state->set("color", new rbjson::String(color));
18 }
19
20 std::string color() const {
21 return data().getString("color");
22 }
23
24 void setFontSize(float fontSize) {
25 m_state->set("fontSize", new rbjson::Number(fontSize));
26 }
27
28 float fontSize() const {
29 return data().getDouble("fontSize");
30 }
31
32 void setMin(float min) {
33 m_state->set("min", new rbjson::Number(min));
34 }
35
36 float min() const {
37 return data().getDouble("min");
38 }
39
40 void setMax(float max) {
41 m_state->set("max", new rbjson::Number(max));
42 }
43
44 float max() const {
45 return data().getDouble("max");
46 }
47
48 void setLineWidth(float lineWidth) {
49 m_state->set("lineWidth", new rbjson::Number(lineWidth));
50 }
51
52 float lineWidth() const {
53 return data().getDouble("lineWidth");
54 }
55
57 m_state->set("valueStart", new rbjson::Number(valueStart));
58 }
59
60 float valueStart() const {
61 return data().getDouble("valueStart");
62 }
63
64 void setValue(float value) {
65 m_state->set("value", new rbjson::Number(value));
66 }
67
68 float value() const {
69 return data().getDouble("value");
70 }
71
73 m_state->set("showValue", new rbjson::Bool(showValue));
74 }
75
76 bool showValue() const {
77 return data().getBool("showValue");
78 }
79};
80
81};
void setColor(const std::string &color)
Definition circle.h:16
void setShowValue(bool showValue)
Definition circle.h:72
void setValue(float value)
Definition circle.h:64
float fontSize() const
Definition circle.h:28
void setMin(float min)
Definition circle.h:32
float min() const
Definition circle.h:36
bool showValue() const
Definition circle.h:76
void setFontSize(float fontSize)
Definition circle.h:24
void setMax(float max)
Definition circle.h:40
float value() const
Definition circle.h:68
float valueStart() const
Definition circle.h:60
void setLineWidth(float lineWidth)
Definition circle.h:48
float max() const
Definition circle.h:44
float lineWidth() const
Definition circle.h:52
std::string color() const
Definition circle.h:20
void setValueStart(float valueStart)
Definition circle.h:56
bool set(const std::string &key, rbjson::Value *value)
Definition widget.cpp:27
WidgetState * m_state
Definition widget.h:265
const rbjson::Object & data() const
Definition widget.h:263
Definition arm.h:8