-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
107 lines (78 loc) · 2.46 KB
/
mainwindow.h
File metadata and controls
107 lines (78 loc) · 2.46 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
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
/*
Copyright 2017 SillyLossy.
This program is free software; you can redistribute it and/or
modify it under the terms of the Lesser GNU General Public License
as published by the Free Software Foundation; either version 3
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 Lesser GNU General Public License for more details.
You should have received a copy of the Lesser GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QLabel>
#include <QComboBox>
#include <QDockWidget>
#include <QTimer>
#include "paintarea.h"
#include "colorlabel.h"
#include "widthbutton.h"
#include "layerslist.h"
#include <gui/chat/ChatWidget.h>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow {
Q_OBJECT
public:
explicit MainWindow(QWidget *parent, ChatId chatId, ChatWidget *chatWidget);
~MainWindow();
PaintArea* paintArea() const;
private slots:
void on_haveUpdate();
void on_actionClear_triggered();
void on_actionOpen_file_triggered();
void on_actionSave_file_triggered();
void on_actionSelect_color_triggered();
void on_actionNew_image_triggered();
void on_actionPaste_triggered();
void on_actionAbout_triggered();
void on_actionCopy_triggered();
void on_actionFlip_horizontal_triggered();
void on_actionFlip_vertical_triggered();
void on_actionRotate_left_triggered();
void on_actionRotate_right_triggered();
void on_actionLayers_triggered(bool checked);
void on_actionSend_triggered();
private:
QString m_fileName;
LayersList* m_layersList;
QString m_filePath;
QComboBox m_toolbox;
QDockWidget m_dock;
//Ui::MainWindow* ui;
WidthButton* m_widthButton;
ColorLabel m_strokeColorLabel;
ColorLabel m_fillColorLabel;
PaintArea* m_paintArea;
private:
void closeEvent(QCloseEvent*) override;
void setToolBox();
void setStatusBar();
void setDock();
bool saveExistingFile();
bool saveNewFile();
int confirmSaveAction();
uint32_t maxMessageSize();
ChatId chatId;
ChatWidget::ChatType chatType;
ChatWidget *chatWidget;
int MAX_LOBBY_MSG_SIZE;
QTimer *timer;
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H