53 Q_PROPERTY(
double value READ value WRITE setValue NOTIFY valueChanged)
54 Q_PROPERTY(
double rawValue READ rawValue)
55 Q_PROPERTY(ValueState valueState READ valueState NOTIFY valueStateChanged)
56 Q_PROPERTY(
double minimum READ minimum WRITE setMinimum NOTIFY rangeChanged)
57 Q_PROPERTY(
double maximum READ maximum WRITE setMaximum NOTIFY rangeChanged)
58 Q_PROPERTY(
int segmentCount READ segmentCount WRITE setSegmentCount NOTIFY appearanceChanged)
59 Q_PROPERTY(
double startAngle READ startAngle WRITE setStartAngle NOTIFY appearanceChanged)
60 Q_PROPERTY(
double spanAngle READ spanAngle WRITE setSpanAngle NOTIFY appearanceChanged)
61 Q_PROPERTY(DisplayMode displayMode READ displayMode WRITE setDisplayMode NOTIFY appearanceChanged)
62 Q_PROPERTY(
double warningThreshold READ warningThreshold WRITE setWarningThreshold NOTIFY thresholdChanged)
63 Q_PROPERTY(
double errorThreshold READ errorThreshold WRITE setErrorThreshold NOTIFY thresholdChanged)
64 Q_PROPERTY(
bool peakHoldEnabled READ isPeakHoldEnabled WRITE setPeakHoldEnabled NOTIFY appearanceChanged)
65 Q_PROPERTY(
int peakHoldTimeMs READ peakHoldTimeMs WRITE setPeakHoldTimeMs NOTIFY appearanceChanged)
66 Q_PROPERTY(
double peakDecayRate READ peakDecayRate WRITE setPeakDecayRate NOTIFY appearanceChanged)
67 Q_PROPERTY(
bool digitalDisplayVisible READ isDigitalDisplayVisible WRITE setDigitalDisplayVisible NOTIFY appearanceChanged)
68 Q_PROPERTY(
int precision READ precision WRITE setPrecision NOTIFY appearanceChanged)
69 Q_PROPERTY(QString unit READ unit WRITE setUnit NOTIFY appearanceChanged)
70 Q_PROPERTY(QColor normalColor READ normalColor WRITE setNormalColor NOTIFY appearanceChanged)
71 Q_PROPERTY(QColor warningColor READ warningColor WRITE setWarningColor NOTIFY appearanceChanged)
72 Q_PROPERTY(QColor errorColor READ errorColor WRITE setErrorColor NOTIFY appearanceChanged)
73 Q_PROPERTY(QColor peakColor READ peakColor WRITE setPeakColor NOTIFY appearanceChanged)
74 Q_PROPERTY(QColor ghostColor READ ghostColor WRITE setGhostColor NOTIFY appearanceChanged)
75 Q_PROPERTY(QColor dialColor READ dialColor WRITE setDialColor NOTIFY appearanceChanged)
76 Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor NOTIFY appearanceChanged)
80 enum class DisplayMode {
87 enum class ValueState {
106 [[nodiscard]]
double value()
const;
113 [[nodiscard]]
double rawValue()
const;
115 [[nodiscard]] ValueState valueState()
const;
117 [[nodiscard]]
double minimum()
const;
119 [[nodiscard]]
double maximum()
const;
125 [[nodiscard]]
double peakValue()
const;
127 [[nodiscard]]
int segmentCount()
const;
129 [[nodiscard]]
double startAngle()
const;
131 [[nodiscard]]
double spanAngle()
const;
133 [[nodiscard]] DisplayMode displayMode()
const;
135 [[nodiscard]]
double warningThreshold()
const;
137 [[nodiscard]]
double errorThreshold()
const;
139 [[nodiscard]]
bool isPeakHoldEnabled()
const;
141 [[nodiscard]]
int peakHoldTimeMs()
const;
143 [[nodiscard]]
double peakDecayRate()
const;
145 [[nodiscard]]
bool isDigitalDisplayVisible()
const;
147 [[nodiscard]]
int precision()
const;
149 [[nodiscard]] QString unit()
const;
152 [[nodiscard]] QColor normalColor()
const;
154 [[nodiscard]] QColor warningColor()
const;
156 [[nodiscard]] QColor errorColor()
const;
158 [[nodiscard]] QColor peakColor()
const;
160 [[nodiscard]] QColor ghostColor()
const;
162 [[nodiscard]] QColor dialColor()
const;
164 [[nodiscard]] QColor textColor()
const;
166 [[nodiscard]] QSize sizeHint()
const override;
167 [[nodiscard]] QSize minimumSizeHint()
const override;
177 void setValue(
double val);
179 void setMinimum(
double min);
181 void setMaximum(
double max);
183 void setRange(
double min,
double max);
185 void setSegmentCount(
int count);
187 void setStartAngle(
double angle);
189 void setSpanAngle(
double angle);
191 void setDisplayMode(DisplayMode mode);
200 void setWarningThreshold(
double threshold);
207 void setErrorThreshold(
double threshold);
209 void setPeakHoldEnabled(
bool enable);
211 void setPeakHoldTimeMs(
int ms);
213 void setPeakDecayRate(
double rate);
215 void setDigitalDisplayVisible(
bool visible);
217 void setPrecision(
int prec);
219 void setUnit(
const QString &unit);
224 void setNormalColor(
const QColor &color);
226 void setWarningColor(
const QColor &color);
228 void setErrorColor(
const QColor &color);
230 void setPeakColor(
const QColor &color);
232 void setGhostColor(
const QColor &color);
234 void setDialColor(
const QColor &color);
236 void setTextColor(
const QColor &color);
243 void valueChanged(
double newValue);
245 void valueStateChanged(QtIndustrialWidgets::CircularBargraph::ValueState state);
247 void rangeChanged(
double newMin,
double newMax);
249 void thresholdChanged(
double warning,
double error);
251 void appearanceChanged();
254 void paintEvent(QPaintEvent *event)
override;
255 void resizeEvent(QResizeEvent *event)
override;
258 std::unique_ptr<CircularBargraphPrivate> d_ptr;