-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTimerMain.h
77 lines (58 loc) · 2.07 KB
/
TimerMain.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef __TimerMain_H
#define __TimerMain_H
/*
* Copyright (c) 2019 Stephen Williams ([email protected])
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
* General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
# include <QMainWindow>
namespace Ui {
class TimerMain;
}
class TimerControlBox;
class TimerMain : public QMainWindow
{
Q_OBJECT
public:
explicit TimerMain(QWidget*parent =0);
~TimerMain();
void set_control_box(TimerControlBox*box);
public:
void set_end_number(int val, bool practice_flag);
// Set the text for the active line display.
void set_line_text(const class QString&txt);
enum timer_mode_t { TIMER_CALLUP, TIMER_END, TIMER_END_WARN, TIMER_STOP,TIMER_PREP };
void set_time_value(int val, timer_mode_t mode);
// Toggle fullscreen mode. Return true if the result leaves
// the timer in fullscreen mode.
bool toggle_fullscreen(void);
void set_fullscreen(bool flag);
// Display the connected status
void network_service_port(const QString&port_text);
// Display the network interfaces
void network_interfaces(const QStringList&if_list);
protected:
void keyPressEvent(QKeyEvent*event);
private slots:
private:
Ui::TimerMain *ui;
TimerControlBox*control_box_;
bool fullscreen_flag_;
QPalette red_;
QPalette yellow_;
QPalette green_;
};
#endif