-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclocktime.h
44 lines (40 loc) · 855 Bytes
/
clocktime.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
43
44
#ifndef CLOCKTIME_H
#define CLOCKTIME_H
#include <QMainWindow>
#include <QTime>
#include <QTimer>
#include<QTimerEvent>
#include <QMouseEvent>
namespace Ui {
class ClockTime;
}
QT_END_NAMESPACE
class ClockTime : public QMainWindow
{
Q_OBJECT
public:
explicit ClockTime(QWidget *parent = nullptr);
~ClockTime();
void init();
private slots:
void updateDisplay();
void on_btn_start_clicked();
void on_btn_stop_clicked();
void on_btn_pause_clicked();
void on_btn_point_clicked();
void on_btn_switch_clicked();
protected:
bool eventFilter(QObject *watched, QEvent *event) override;
signals:
void mysignal1();
private:
Ui::ClockTime *ui;
QTimer *pTimer;
QTime baseTime;
//显示的时间
QString timeStr;
int mouse_flag2=0;
int mouse_x2;
int mouse_y2;
};
#endif // CLOCKTIME_H