-
Notifications
You must be signed in to change notification settings - Fork 1
/
PreferenceDialog.h
124 lines (100 loc) · 2.82 KB
/
PreferenceDialog.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
/*
* PreferenceDialog.h
*
* (c) 2014 Sofian Audry -- info(@)sofianaudry(.)com
* (c) 2014 Alexandre Quessy -- alexandre(@)quessy(.)net
* (c) 2016 Dame Diongue -- baydamd(@)gmail(.)com
*
* This program 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.
*
* 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PREFERENCEDIALOG_H_
#define PREFERENCEDIALOG_H_
#include <QDialog>
#include <QNetworkInterface>
#include "MainWindow.h"
namespace mmp {
class PreferenceDialog : public QDialog
{
Q_OBJECT
public:
PreferenceDialog(QWidget* parent = 0);
~PreferenceDialog();
void showDialog();
protected:
void closeEvent(QCloseEvent* event);
bool loadSettings();
signals:
void closed();
private slots:
void accept();
void reject();
int exec();
void applySettings();
void refreshCurrentIP();
private:
// Reset port number
void updatePortNumber();
// Create categories pages
void createInterfacePage();
void createMappingPage();
void createOutputPage();
void createControlsPage();
void createAdvancedPage();
// Create List
void createPreferencesList();
// Create pages widgets
QWidget *_interfacePage;
QWidget *_mappingPage;
QWidget *_outputPage;
QTabWidget *_controlsPage;
QWidget *_advancedPage;
// Interface widgets
QComboBox *_languageBox;
void createLanguageList();
QComboBox *_toolbarIconSizeBox;
// Shape widgets
// Sticky vertices
QCheckBox *_stickyVerticesBox;
QComboBox *_stickyRadiusBox;
// Output widgets
QCheckBox *_showResolutionBox;
QRadioButton *_classicRadio;
QRadioButton *_palTestRadio;
QRadioButton *_ntscTestRadio;
QList<QRadioButton *> _radioGroup;
QLabel *_classicTestImg;
QLabel *_palTestImg;
QLabel *_ntscTestImg;
// Controls widgets
// OSC
QWidget *_oscWidget;
// QCheckBox *_sendMessageBox;
QCheckBox *_listenMessageBox;
QLineEdit *_sendAddressEdit;
QSpinBox *_sendPortNumber;
QLabel *_machineAddressLabel;
QSpinBox *_listenPortNumber;
QPushButton *_ipRefreshButton;
// Advanced widgets
// Common widgets
QListWidget *_listWidget;
QStackedLayout *_stackedLayout;
QDialogButtonBox* _buttonBox;
// Constantes
static const int PREFERENCES_WINDOW_WIDTH = 720;
static const int PREFERENCES_WINDOW_HEIGHT = 540;
static const int LIST_ITEM_HEIGHT = 36;
};
}
#endif /* PREFERENCESDIALOG_H_ */