-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathshowdatetime.h
More file actions
41 lines (32 loc) · 839 Bytes
/
showdatetime.h
File metadata and controls
41 lines (32 loc) · 839 Bytes
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
#ifndef SHOWDATETIME_H
#define SHOWDATETIME_H
#include <QObject>
class QLabel;
class QLCDNumber;
class QTimer;
class ShowDateTime : public QObject
{
Q_OBJECT
public:
explicit ShowDateTime(QObject *parent = 0);
~ShowDateTime();
void SetLab(QLabel *labDateTime, QLabel *labLive);
void SetLcdNumber(QLCDNumber *lcdNumber);
void Start(int interval);
void Stop();
private:
int day; //天数
int hour; //时钟数
int minute; //分钟数
int seconds; //秒钟数
QTimer *timer; //定时器获取时间
QLabel *labDateTime; //显示日期时间的载体
QLabel *labLive; //显示已运行
QLCDNumber *lcdNumber; //显示日期时间的LCD控件
private slots:
void SetTimeInfo();
void ShowTime();
signals:
public slots:
};
#endif // SHOWDATETIME_H