This repository was archived by the owner on Sep 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththemeclock.h
More file actions
68 lines (61 loc) · 1.7 KB
/
Copy paththemeclock.h
File metadata and controls
68 lines (61 loc) · 1.7 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/****************************************************************************
**
** Copyright (C) 2011-2012 Jan M. Binder, Simeon Voelkel
** Contact: jan.binder@sfz-bw.de, simeon.voelkel@sfz-bw.de
**
** $QT_BEGIN_LICENSE:GPL$
** GNU General Public License Usage
** This file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef THEMECLOCK_H
#define THEMECLOCK_H
#include <QObject>
#include <QTime>
#include <QElapsedTimer>
#include <QTimer>
class ThemeClock : public QObject
{
Q_OBJECT
public:
explicit ThemeClock(QObject *parent = 0);
~ThemeClock();
QString toString();
int getElapsedTime();
bool isRunning();
signals:
void allowedTimeChanged(int);
void overtimed(int);
void timeUpdate(int);
void timeUpdate(QString);
void started(int);
void paused(int);
void stopped(int);
void restarted(int);
void elapsedOverTime(int);
public slots:
void startorpause();
void stop();
void reset();
void setAllowedTime(int ms);
void setOverTime(int ms);
void setElapsedTime(int ms);
void setRemainingTime(int ms);
void pulse();
void getElapsedOverTime();
private:
QElapsedTimer *t;
QTimer *renew;
int addedtime;
int maxtime;
int overtime;
int savedtime;
bool running;
};
#endif // THEMECLOCK_H