提交 | 用户 | age
|
d3687b
|
1 |
#ifndef MYTIMEDISPLAY_H |
Q |
2 |
#define MYTIMEDISPLAY_H |
|
3 |
|
|
4 |
#include <QWidget> |
|
5 |
#include <QFrame> |
|
6 |
#include <QColor> |
|
7 |
#include <QPaintEvent> |
|
8 |
|
|
9 |
class myTimeDisplay : public QFrame |
|
10 |
{ |
|
11 |
Q_OBJECT |
|
12 |
public: |
|
13 |
explicit myTimeDisplay(QWidget *parent = nullptr); |
|
14 |
void SetRange(int); |
|
15 |
void SetPosition(float); |
|
16 |
protected: |
|
17 |
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; |
|
18 |
int range=100; |
|
19 |
float position=30; |
|
20 |
|
|
21 |
int nCount=0; |
|
22 |
int fontsize=0; |
|
23 |
signals: |
|
24 |
|
|
25 |
private slots: |
|
26 |
void OnTimerd(); |
|
27 |
}; |
|
28 |
|
|
29 |
#endif // MYTIMEDISPLAY_H |