-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.h
105 lines (86 loc) · 2.19 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
104
105
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <mk219533 (a) students.mimuw.edu.pl> wrote this file. As long as you retain
* this notice you can do whatever you want with this stuff. If we meet some day,
* and you think this stuff is worth it, you can buy me a beer in return.
* ----------------------------------------------------------------------------
*
* MainWindow.h
*
* Created on: 2010-01-04
* Author: Marcel Kolodziejczyk
*/
#ifndef MAINWINDOW_H_
#define MAINWINDOW_H_
#include <QMainWindow>
class ChildWidget;
class QAction;
class QMenu;
class QTabWidget;
class QSignalMapper;
class MainWindow: public QMainWindow
{
Q_OBJECT
public:
MainWindow();
void addChild(const QString &imageFileName);
protected:
void closeEvent(QCloseEvent *event);
private slots:
void open();
void save();
bool closeActiveTab();
bool closeAllTabs();
void nextTab();
void previousTab();
void bold(bool checked);
void italic(bool checked);
void underline(bool checked);
void zoomIn();
void zoomOut();
void splitSymbol();
void joinSymbol();
void deleteSymbol();
void about();
void handleClose(int i);
void updateMenus();
void updateFileMenu();
void updateCommandActions();
void updateTabTitle();
void updateSaveAction();
private:
ChildWidget *activeChild();
void createActions();
void createMenus();
void createToolBars();
void readSettings();
void writeSettings();
QTabWidget *tabWidget;
QSignalMapper *windowMapper;
QMenu *fileMenu;
QMenu *editMenu;
QMenu *viewMenu;
QMenu *helpMenu;
QToolBar *fileToolBar;
QToolBar *editToolBar;
QToolBar *viewToolBar;
QAction *openAct;
QAction *saveAct;
QAction *closeAct;
QAction *closeAllAct;
QAction *exitAct;
QAction *boldAct;
QAction *italicAct;
QAction *underlineAct;
QAction *zoomInAct;
QAction *zoomOutAct;
QAction *nextAct;
QAction *previousAct;
QAction *separatorAct;
QAction *splitAct;
QAction *joinAct;
QAction *deleteAct;
QAction *aboutAct;
};
#endif /* MAINWINDOW_H_ */