-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathGeneralSettingsPage.h
75 lines (59 loc) · 1.99 KB
/
GeneralSettingsPage.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
//-----------------------------------------------------------------------------
// File: GeneralSettingsPage.h
//-----------------------------------------------------------------------------
// Project: Kactus 2
// Author: Joni-Matti Maatta
// Date: 13.6.2011
//
// Description:
// General settings property page.
//-----------------------------------------------------------------------------
#ifndef GENERALSETTINGSPAGE_H
#define GENERALSETTINGSPAGE_H
#include "SettingsPage.h"
#include <QComboBox>
#include <QLineEdit>
#include <QSettings>
class QCheckBox;
//-----------------------------------------------------------------------------
//! GeneralSettingsPage class.
//-----------------------------------------------------------------------------
class GeneralSettingsPage : public SettingsPage
{
Q_OBJECT
public:
/*!
* Constructor.
*
* @param [in/out] settings The settings store.
*/
GeneralSettingsPage(QSettings& settings);
/*!
* Destructor.
*/
virtual ~GeneralSettingsPage() = default;
// Disable copying.
GeneralSettingsPage(GeneralSettingsPage const& rhs) = delete;
GeneralSettingsPage& operator=(GeneralSettingsPage const& rhs) = delete;
/*!
* Validates the contents of the page thoroughly.
*
* @return True, if the contents are valid. False, if they are invalid.
*
* @remarks Showing message boxes for errors is allowed.
*/
virtual bool validate() override final;
/*!
* Applies the changes that were done in the page.
*/
virtual void apply() override final;
private:
//! Username line edit.
QLineEdit* usernameEdit_;
//! Default revision selector.
QComboBox* revisionEdit_;
//! Checkbox for enabling/disabling the editor lock feature.
QCheckBox* lockEnabledBox_;
};
//-----------------------------------------------------------------------------
#endif // GENERALSETTINGSPAGE_H