-
Notifications
You must be signed in to change notification settings - Fork 11
/
propertiesdialog.h
103 lines (94 loc) · 2.75 KB
/
propertiesdialog.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
// (c) 2015 David Vyvlečka, AGPLv3
#ifndef PROPERTIESDIALOG_H
#define PROPERTIESDIALOG_H
#include <QDialog>
#include <QSettings>
#include <QColorDialog>
#include "data.h"
#include "admeshcontroller.h"
namespace Ui {
class PropertiesDialog;
}
/*!
* \brief Properties window.
*
* Used to set values (e.g. inverted mouse, history buffer limit, theme,...) .
*/
class PropertiesDialog : public QDialog
{
Q_OBJECT
public:
/*!
* \brief Constructor.
*/
explicit PropertiesDialog(QWidget *parent = 0);
/*!
* \brief Destructor.
*/
~PropertiesDialog();
/*!
* \brief Set controller to handle operations.
*/
void setController(admeshController *cnt);
public slots:
/*!
* \brief Set changed memory limit value.
*/
void setMemLimit(int val);
/*!
* \brief Set changed theme value.
*/
void toggleScheme();
/*!
* \brief Set changed inverted mouse value.
*/
void toggleInvertMouse();
/*!
* \brief Set changed color value.
*/
void setColor();
/*!
* \brief Set changed bad color value.
*/
void setBadColor();
/*!
* \brief Set default color value.
*/
void setDefaultColor();
/*!
* \brief Set default bad color value.
*/
void setDefaultBadColor();
/*!
* \brief Handle dialog finished.
*
* Upon succes (OK selected) change desired values to new values.
* Changes are based on difference between new values set in dialog and old values read from configuration.
*/
void finished(int);
signals:
/*!
* \brief Send signal to change scheme of main Window.
*/
void schemeSignal();
/*!
* \brief Send signal to invert mouse in RenderingWidget.
*/
void mouseInvertSignal();
private:
Ui::PropertiesDialog *ui; ///< Pointer to iterface of dialog.
admeshController *controller; ///< Controller used to process changes.
QPixmap colMap; ///< Color map. Displays color in dialog.
QPixmap badColMap; ///< Bad color map. Displays bad color in dialog.
QColor color; ///< Color.
QColor i_color; ///< Color upon initialization.
QColor badColor; ///< Bad color.
QColor i_badColor; ///< Bad color upon initialization.
int memLimit; ///< Memory limit.
int i_memLimit; ///< Memory limit upon initialization.
bool invertMouse; ///< Inverted mouse yes/no.
bool i_invertMouse; ///< Inverted mouse yes/no upon initialization.
bool darkTheme; ///< Dark theme yes/no.
bool i_darkTheme; ///< Dark theme yes/no upon initialization.
};
#endif // PROPERTIESDIALOG_H