-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimerform.h
More file actions
41 lines (29 loc) · 738 Bytes
/
Copy pathtimerform.h
File metadata and controls
41 lines (29 loc) · 738 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 TIMERFORM_H
#define TIMERFORM_H
#include <QWidget>
#include<QTimer>
namespace Ui {
class TimerForm;
}
class TimerForm : public QWidget
{
Q_OBJECT
public:
explicit TimerForm(QWidget *parent = 0);
~TimerForm();
void StartStopwatch(); //启动秒表
void ResetStopwatch(); //复位秒表
void StopStopwatch(); //暂停秒表
private:
Ui::TimerForm *ui;
int hourTemp; //Hour
int minuteTemp; //Minute
int secondTemp; //Second
int countTemp;
QTimer *msTimer; //定义一个定时器
void Display(QString,QString,QString);
void SetStrLength(QString *str, int length);
private slots:
void TimeSlot();
};
#endif // TIMERFORM_H