-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathgui.h
179 lines (131 loc) · 3.98 KB
/
gui.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
179
/**************************************************************************
* Copyright (c) 2012-2015 Raffaele Pertile <[email protected]>
* This file is part of touchegg-gce.
*
* touchegg-gce is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* touchegg-gce 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with touchegg-gce. If not, see <http://www.gnu.org/licenses/>.
**************************************************************************/
#ifndef GUI_H
#define GUI_H
#include <QMainWindow>
class Parser;
class QStandardItem;
class Gesture;
class QAbstractButton;
class QLineEdit;
class QStandardItemModel;
class QFrame;
class QSlider;
class Group;
class QModelIndex;
namespace Ui {
class Gui;
}
class Gui : public QMainWindow
{
Q_OBJECT
public:
explicit Gui(QWidget *parent = 0);
~Gui();
public slots:
/**
* @brief groupMoved
*Used to keep synchronized memory and group tree
* @param item
*the group moved.
*/
void groupMoved(QStandardItem *item);
/**
* @brief editDialogFinished
*totally override (if exists) the old gesture with the newly created
* @param gesture
*/
void editDialogFinished(Gesture *gesture);
/**
* @brief gestureDeleted
*delete a gesture
* @param gesture
*/
void gestureDeleted(Gesture *gesture);
/**
* @brief inheritGestures
*clone gestures from the native group if &yes is pressed
* @param button
*/
void inheritGestures(QAbstractButton *button);
/**
* @brief setLanguage
* change the language displayed by langBox
* @param indx language index
*/
void setLanguage(int indx);
/**
* @brief setLanguageList
* set the language lst displayed by langBox
* @param langs language list to be displayed
*/
void setLanguageList(QStringList langs);
void newGroupAccepted();
private slots:
void buttonBoxAccepted();
void on_filePath_textEdited(const QString &arg1);
void buttonBoxRejected();
void on_scrollArea_destroyed();
void on_checkBox_toggled(bool checked);
void horizontalSlider_sliderMoved(int position);
void on_cgt_sliderMoved(int position);
void on_cgt_valueChanged(int value);
void on_treeView_doubleClicked(const QModelIndex &index);
void on_pushButton_6_clicked();
void on_pushButton_3_clicked();
void on_treeView_clicked(const QModelIndex &index);
void on_pushButton_5_clicked();
void pushButton7Clicked();
void pushButton4Clicked();
void on_saveButton_clicked();
void on_addGesture_clicked();
void on_pushButton_2_clicked();
void on_pushButton_clicked();
void langCombo_textChanged(const QString &arg1);
void langCombo_currentIndexChanged(const QString &arg1);
void on_langBox_currentIndexChanged(const QString &arg1);
void on_openChooser_clicked();
void on_saveChooser_clicked();
void on_savePath_toggled(bool checked);
void on_filePath_textChanged(const QString &arg1);
signals:
/**
* @brief languageChanged
* emitted by langBox changes
* @param lang
*/
void languageChanged(QString lang);
private:
// Dictionary *dic;
Ui::Gui *ui;
Parser *parser;
QString filePath;
QLineEdit *linePath;
QStandardItemModel *model;
QFrame *adv;
QSlider *slider;
void cleanLayout(QLayout *l);
void loadFile(QString path);
Group *currentGroup;
Group *inheritGroup;
Group *newGroup;
QString getPath();
void displayGroup();
void refreshGroupTree();
};
#endif // GUI_H