-
Notifications
You must be signed in to change notification settings - Fork 3
/
mainwindow.h
executable file
·178 lines (141 loc) · 3.58 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QScrollArea>
#include <QListWidget>
#include <QWidget>
#include <QSplitter>
#include <QLabel>
#include <QPrinter>
#include "base/app_context.h"
#include "utility/colorpicker.h"
#include "newproject.h"
#include "openproject.h"
#include "importimage.h"
#include "exportproject.h"
#include "about.h"
/**
* Hlavni okno aplikace
*/
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(AppContext *context, QWidget *parent = nullptr);
~MainWindow();
protected:
// kontext aplikace
AppContext *context;
// utility
ColorPicker *colorPicker;
// windows
NewProject *window_newProject;
OpenProject *window_openProject;
ImportImage *window_importImage;
ExportProject *window_exportProject;
About *window_about;
virtual void showEvent(QShowEvent *event) override;
virtual void closeEvent (QCloseEvent *event) override;
private slots:
/**
* @brief Otevre okno pro vytvoreni noveho projektu
*/
void on_actionNew_project_triggered();
/**
* @brief Otevre file dialog pro otevreni existujiciho projektu
*/
void on_actionOpen_project_triggered();
/**
* @brief Ulozi projekt na disk
*/
void on_actionSave_project_triggered();
/**
* @brief Otevre file dialog pro importovani obrazku do projektu
*/
void on_actionImport_image_triggered();
/**
* @brief Otevre okno pro exportovani obrazku
*/
void on_actionExport_image_triggered();
/**
* @brief Ukoncni aplikaci (pred ukonceni zobrazi dialog pro ulozeni projektu)
*/
void on_actionExit_triggered();
/**
* @brief Otevre okno s nahledem tisku a moznosti tisku tohoto obrazku
*/
void on_actionPrint_triggered();
/**
* @brief Printer paint event (pro print preview dialog)
* @param printer - QPrinter
*/
void printerPaint(QPrinter *printer);
/**
* @brief Otevre okno s inforamacemi o teto aplikaci
*/
void on_actionAbout_triggered();
/**
* @brief Vybera nastro "eye dropper"
*/
void on_actionEye_Dropper_triggered();
/**
* @brief Vybere nastroj "pen"
*/
void on_actionPen_triggered();
/**
* @brief Vybere nastroj "brush"
*/
void on_actionBrush_triggered();
/**
* @brief Vybere nastroj "fill"
*/
void on_actionFill_triggered();
/**
* @brief Vybere nastroj "text"
*/
void on_actionText_triggered();
/**
* @brief Vybere nastroj "Eraser"
*/
void on_actionEraser_triggered();
/**
* @brief Prida novou vrstu
*/
void on_actionAdd_layer_triggered();
/**
* @brief Odstrani aktualne oznacenou vrstvu
*/
void on_actionRemove_layer_triggered();
/**
* @brief Priblizi workspace
*/
void on_actionZoom_in_triggered();
/**
* @brief Oddali workspace
*/
void on_actionZoom_out_triggered();
/**
* @brief Prepina mezi editacnim modem a modem pro editaci masek
*/
void on_actionSwitch_Image_Mask_triggered();
/**
* @brief Workspacu nastavi takovy scale ale byl dobre videt cely projekt
*/
void workspace_setDefaultScale();
public slots:
/**
* @brief Update staus baru
*/
void updateStatusBar();
private:
// UI
Ui::MainWindow *ui;
QSplitter* splitter_horizontal;
QSplitter* splitter_vertical;
QLabel *statusLabel;
void highlightToolbar(QAction *action);
};
#endif // MAINWINDOW_H