-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathwheelbox.h
42 lines (31 loc) · 893 Bytes
/
wheelbox.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
40
41
42
#ifndef _WHEELBOX_H_
#define _WHEELBOX_H_
#include <qwidget.h>
class QwtWheel;
class QLabel;
class QLCDNumber;
class WheelBox: public QWidget
{
Q_OBJECT
Q_PROPERTY( QColor theme READ theme WRITE setTheme )
public:
WheelBox( const QString &title,
double min, double max, double stepSize,
QWidget *parent = NULL );
void setTheme( const QColor & );
QColor theme() const;
void setUnit( const QString & );
QString unit() const;
void setValue( double value );
double value() const;
// bool eventFilter(QObject *object, QEvent *event);
Q_SIGNALS:
double valueChanged( double );
//将一个QLCDNumber(数码管显示控件类),一个QwtWheel(滚轮类),一个QLable(标签类)组合成一个WeelBox类
private:
QLCDNumber *d_number;
QwtWheel *d_wheel;
QLabel *d_label;
QString d_unit;
};
#endif