Doomseeker
Wadseeker
Download
Tracker
Git
Docs
Main Page
Plugin API
Modules
Classes
Files
File List
src
core
gui
configuration
configpage.h
1
//------------------------------------------------------------------------------
2
// configpage.h
3
//------------------------------------------------------------------------------
4
//
5
// This program is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU General Public License
7
// as published by the Free Software Foundation; either version 2
8
// of the License, or (at your option) any later version.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18
// 02110-1301, USA.
19
//
20
//------------------------------------------------------------------------------
21
// Copyright (C) 2009 "Zalewa" <zalewapl@gmail.com>
22
//------------------------------------------------------------------------------
23
24
#ifndef _CONFIG_PAGE_H_
25
#define _CONFIG_PAGE_H_
26
27
#include "global.h"
28
#include "dptr.h"
29
#include <QWidget>
30
43
class
MAIN_EXPORT
ConfigPage
:
public
QWidget
44
{
45
Q_OBJECT;
46
47
public
:
49
enum
Validation
50
{
52
VALIDATION_OK
,
54
VALIDATION_ERROR
,
55
};
56
57
ConfigPage
(QWidget* parent = NULL);
58
virtual
~
ConfigPage
();
59
65
bool
allowSave();
70
bool
areSettingsAlreadyRead();
71
79
virtual
QIcon icon()
const
= 0;
80
85
virtual
QString name()
const
= 0;
86
91
void
setAllowSave(
bool
b);
95
void
read();
101
bool
save();
105
virtual
QString title()
const
;
106
135
virtual
Validation
validate();
136
137
signals:
145
void
appearanceChanged();
146
153
void
validationRequested();
154
155
protected
:
159
virtual
void
readSettings()=0;
160
164
virtual
void
saveSettings()=0;
165
166
private
:
167
DPtr<ConfigPage>
d;
168
};
169
170
#endif
ConfigPage::Validation
Validation
Result of validate()
Definition:
configpage.h:49
ConfigPage::VALIDATION_OK
Validation detected no problems.
Definition:
configpage.h:52
ConfigPage::VALIDATION_ERROR
Validation detected at least one problem.
Definition:
configpage.h:54
DPtr< ConfigPage >
ConfigPage
Base class for configuration pages.
Definition:
configpage.h:43
Doomseeker © 2009-2024 The Doomseeker Team