-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_window.hpp
More file actions
60 lines (48 loc) · 1.2 KB
/
main_window.hpp
File metadata and controls
60 lines (48 loc) · 1.2 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
#ifndef MAINWINDOW_HPP
#define MAINWINDOW_HPP
#include "clock_parameters.hpp"
#include <QMainWindow>
#include <QSystemTrayIcon>
QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
class QSystemTrayIcon;
class QMenu;
class QMenuBar;
class QAction;
QT_END_NAMESPACE
class Clock;
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow (QWidget* parent = nullptr);
~MainWindow ();
public slots:
void updateTime ();
protected:
void closeEvent (QCloseEvent* event) override;
private slots:
void startClock ();
void stopClock ();
void buttonChecked (bool checked);
void secondTimeout ();
void onStageCompleted ();
void trayIconActivated (QSystemTrayIcon::ActivationReason reason);
void openPropertiesDialog ();
private:
ClockParameters loadParameters ();
void saveParameters (const ClockParameters& parameters);
private:
Ui::MainWindow* m_ui;
QMenuBar* m_menuBar;
QMenu* m_mainMenu;
QAction* m_actionShowProperties;
QSystemTrayIcon* m_trayIcon;
QAction* m_actionMinimize;
QAction* m_actionRestore;
QAction* m_actionQuit;
QMenu* m_trayIconMenu;
Clock* m_clock;
};
#endif // MAINWINDOW_HPP