-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtempgauge.h
39 lines (32 loc) · 864 Bytes
/
tempgauge.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef TEMPGAUGE_H
#define TEMPGAUGE_H
#include"qcgaugewidget.h"
#include <QWidget>
class tempgauge : public QWidget
{
Q_OBJECT
public:
explicit tempgauge(QWidget *parent = nullptr );
QcGaugeWidget* widget;
signals:
public slots:
void setTemp(float T);
private slots:
float temp2percent(float T);
private:
QcBackgroundItem *bkg;
QcBackgroundItem *bkg_center;
QcNeedleItem* needle;
QcValuesItem* Values;
QcDegreesItem* DegreeSubItem;
QcDegreesItem* DegreeItem;
QColor color[4]={Qt::green, Qt::darkGreen , Qt::yellow , Qt::red };
float temp_colorregions[5]={ 20 , 50 , 85 , 100, 120 };
QList<QPair<QColor,float>> BandColors;
QcColorBand* ColorBand;
QcLabelItem* label;
QcLabelItem* temp_label;
const QString label_str = "Temperature";
int bkg_colorstate=0;
};
#endif // TEMPGAUGE_H