-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathk2envvariablesettingspage.h
80 lines (63 loc) · 1.97 KB
/
k2envvariablesettingspage.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
/*
* Created on: 24.5.2013
* Author: Antti Kamppi
* File name: k2envvariablesettingspage.h
* Project: Kactus 2
*/
#ifndef K2ENVVARIABLESETTINGSPAGE_H
#define K2ENVVARIABLESETTINGSPAGE_H
#include "SettingsPage.h"
#include <common/views/EditableTableView/editabletableview.h>
#include <QSettings>
class K2EnvVarModel;
/*! \brief Displays the Kactus2 environment variables in settings dialog.
*
*/
class K2EnvVariableSettingsPage : public SettingsPage
{
Q_OBJECT
public:
K2EnvVariableSettingsPage(QSettings& settings);
//! \brief The destructor.
virtual ~K2EnvVariableSettingsPage() = default;
/*! \brief Apply the changes made in the settings page.
*
* Method: apply
* Full name: K2EnvVariableSettingsPage::apply
* Access: virtual public
*
*/
virtual void apply() override final;
/*! \brief Checks that all variables have a defined name.
*
* Method: prevalidate
* Full name: K2EnvVariableSettingsPage::prevalidate
* Access: virtual public
*
*
* \return False if at least one variable name is empty.
*/
virtual bool prevalidate() const override final;
/*! \brief Checks that all variables have a defined name.
*
* If at least one name is empty, an error dialog is displayed.
*
* Method: validate
* Full name: K2EnvVariableSettingsPage::validate
* Access: virtual public
*
*
* \return False if at least one variable name is empty.
*/
virtual bool validate() override final;
private:
//! \brief No copying
K2EnvVariableSettingsPage(const K2EnvVariableSettingsPage& other);
//! \brief No assignment
K2EnvVariableSettingsPage& operator=(const K2EnvVariableSettingsPage& other);
//! \brief Displays the environment variables.
EditableTableView* view_;
//! \brief The model which manages the environment variables.
K2EnvVarModel* model_;
};
#endif // K2ENVVARIABLESETTINGSPAGE_H