Doomseeker
Wadseeker
Download
Tracker
Git
Docs
Main Page
Plugin API
Modules
Classes
Files
File List
src
core
gui
configuration
cfgfilepaths.h
1
//------------------------------------------------------------------------------
2
// cfgfilepaths.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 __CFG_FILE_PATHS_H_
25
#define __CFG_FILE_PATHS_H_
26
27
#include "gui/configuration/configpage.h"
28
#include "dptr.h"
29
30
class
FileSearchPath
;
31
class
QFileInfo;
32
33
class
CFGFilePaths
:
public
ConfigPage
34
{
35
Q_OBJECT
36
37
public
:
38
CFGFilePaths
(QWidget* parent = 0);
39
~
CFGFilePaths
();
40
41
void
readSettings
();
42
Validation
validate
();
43
44
protected
:
45
void
addPath(
const
FileSearchPath
& fileSearchPath);
46
47
QIcon
icon
()
const
;
48
49
bool
isPathAlreadyDefined(
const
QString& path);
50
51
QString
name
()
const
{
return
tr(
"File Paths"
); }
52
53
void
saveSettings
();
54
55
protected
slots:
56
void
btnAddWadPath_Click();
57
void
btnRemoveWadPath_Click();
58
59
private
:
60
DPtr<CFGFilePaths>
d;
61
62
QString validatePath(
const
QString &path)
const
;
63
};
64
65
#endif
FileSearchPath
Definition:
filesearchpath.h:7
CFGFilePaths::validate
Validation validate()
Validate settings on this page.
Definition:
cfgfilepaths.cpp:184
ConfigPage::Validation
Validation
Result of validate()
Definition:
configpage.h:49
CFGFilePaths::saveSettings
void saveSettings()
Reimplement this to write settings to config from widgets.
Definition:
cfgfilepaths.cpp:166
CFGFilePaths::name
QString name() const
Reimplement this to return a list-displayable name for this ConfigPage.
Definition:
cfgfilepaths.h:51
CFGFilePaths::icon
QIcon icon() const
Reimplement this to return a displayable icon for the ConfigPage.
Definition:
cfgfilepaths.cpp:124
CFGFilePaths
Definition:
cfgfilepaths.h:33
CFGFilePaths::readSettings
void readSettings()
Reimplement this to read settings from config into widgets.
Definition:
cfgfilepaths.cpp:155
DPtr< CFGFilePaths >
ConfigPage
Base class for configuration pages.
Definition:
configpage.h:43
Doomseeker © 2009-2023 The Doomseeker Team