-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
103 lines (82 loc) · 2.1 KB
/
mainwindow.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTimer>
#include <QTime>
class PuzzleWidget;
class QAction;
class QPixmap;
class NewGame;
class QTextEdit;
class QLabel;
class QGridLayout;
class QListWidget;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow();
signals:
void puzzleCompleted();
void blockMoved();
private slots:
void appendToLog(QString *string)const;
void newGame(QString fileName, int rows = 3, int cols = 5, int difficulty = 3);
void openNewGameDialog();
void saveGame();
void setTimerVisible();
void aboutQt();
void changeFullScreenMode(bool screenMode);
void changeFileToolBarVisibility(bool fileToolBarMode);
void changeControlToolBarVisibility(bool controlToolBarMode);
void changeCounterText(int counter);
void timerOn();
void timerOff();
void timerReset();
void updateTime();
protected:
void keyPressEvent(QKeyEvent *event);
private:
void createActions();
void createMenus();
void createToolBars();
void createContextMenu();
void createDockWindows();
void createLog();
void createStatusBar();
void setTimer(const bool, const QTime = QTime());
PuzzleWidget *puzzleWidget;
NewGame *newGameDialog;
QMenu *fileMenu;
QMenu *controlMenu;
QMenu *viewMenu;
QMenu *helpMenu;
QMenu *toolBarSubMenu;
QToolBar *fileToolBar;
QToolBar *controlToolBar;
QGridLayout *grid;
QLabel *counterLabel;
QLabel *timerText;
QTextEdit *statusLog;
QTimer *puzzleTimer;
QListWidget *listWidget;
QAction *newAction;
QAction *saveAction;
QAction *loadAction;
QAction *settingsAction;
QAction *exitAction;
QAction *fullScreenAction;
QAction *controlToolBarAction;
QAction *fileToolBarAction;
QAction *timerToolBarAction;
QAction *statusBarAction;
QAction *soundAction;
QAction *musicAction;
QAction *timerAction;
QAction *showLogAction;
QAction *redoAction;
QAction *undoAction;
QAction *aboutAction;
QAction *aboutQtAction;
};
#endif // MAINWINDOW_H