28 #ifndef DIALGADGETWIDGET_H_
29 #define DIALGADGETWIDGET_H_
35 #include <QGraphicsView>
36 #include <QtSvg/QSvgRenderer>
37 #include <QtSvg/QGraphicsSvgItem>
50 void setDialFile(QString dfn, QString bg, QString fg, QString n1, QString n2, QString n3,
51 QString n1Move, QString n2Move, QString n3Move);
58 void setN1Min(
double value) { n1MinValue = value; }
59 void setN1Max(
double value) { n1MaxValue = value; }
61 void setN2Min(
double value) { n2MinValue = value; }
62 void setN2Max(
double value) { n2MaxValue = value; }
64 void setN3Min(
double value) { n3MinValue = value; }
65 void setN3Max(
double value) { n3MaxValue = value; }
68 void connectNeedles(QString object1, QString field1, QString object2, QString field2,
69 QString object3, QString field3);
85 QSvgRenderer *m_renderer;
86 QGraphicsSvgItem *m_background;
87 QGraphicsSvgItem *m_foreground;
88 QGraphicsSvgItem *m_needle1;
89 QGraphicsSvgItem *m_needle2;
90 QGraphicsSvgItem *m_needle3;
91 QGraphicsTextItem *m_text1;
92 QGraphicsTextItem *m_text2;
93 QGraphicsTextItem *m_text3;
123 double needle1Target;
125 double needle2Target;
127 double needle3Target;
DialGadgetWidget(QWidget *parent=nullptr)
void updateNeedle2(UAVObject *object2)
Called by the UAVObject which got updated.
void enableSmoothUpdates(bool flag)
void setN3Factor(double value)
void setN1Min(double value)
void setNeedle3(double value)
void setN3Min(double value)
void setDialFont(QString fontProps)
void setN1Max(double value)
void connectNeedles(QString object1, QString field1, QString object2, QString field2, QString object3, QString field3)
Connects the widget to the relevant UAVObjects.
void paintEvent(QPaintEvent *event)
void setDialFile(QString dfn, QString bg, QString fg, QString n1, QString n2, QString n3, QString n1Move, QString n2Move, QString n3Move)
void setN2Min(double value)
void setN2Max(double value)
void setNeedle1(double value)
void updateNeedle3(UAVObject *object3)
Called by the UAVObject which got updated.
void updateNeedle1(UAVObject *object1)
Called by the UAVObject which got updated.
void setNeedle2(double value)
void setN3Max(double value)
void resizeEvent(QResizeEvent *event)
void setN1Factor(double value)
void setN2Factor(double value)