Doomseeker
Wadseeker
Download
Tracker
Git
Docs
Main Page
Plugin API
Related Pages
Modules
Classes
Files
File List
File Members
src
core
gui
configuration
cfgfilepaths.h
1
//------------------------------------------------------------------------------
2
// cfgfilepaths.h
3
//------------------------------------------------------------------------------
4
//
5
// This library is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU Lesser General Public
7
// License as published by the Free Software Foundation; either
8
// version 2.1 of the License, or (at your option) any later version.
9
//
10
// This library 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 GNU
13
// Lesser General Public License for more details.
14
//
15
// You should have received a copy of the GNU Lesser General Public
16
// License along with this library; 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 "dptr.h"
28
#include "gui/configuration/configpage.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 =
nullptr
);
39
~
CFGFilePaths
()
override
;
40
41
void
readSettings
()
override
;
42
Validation
validate
()
override
;
43
44
protected
:
45
void
addPath(
const
FileSearchPath
&fileSearchPath);
46
47
QIcon
icon
()
const override
;
48
49
bool
isPathAlreadyDefined(
const
QString &path);
50
51
QString
name
()
const override
52
{
53
return
tr(
"File Paths"
);
54
}
55
56
void
saveSettings
()
override
;
57
58
protected
slots:
59
void
btnAddWadPath_Click();
60
void
btnRemoveWadPath_Click();
61
62
private
:
63
DPtr<CFGFilePaths>
d;
64
65
QString validatePath(
const
QString &path)
const
;
66
};
67
68
#endif
FileSearchPath
Definition:
filesearchpath.h:30
ConfigPage::Validation
Validation
Result of validate()
Definition:
configpage.h:50
CFGFilePaths::validate
Validation validate() override
Validate settings on this page.
Definition:
cfgfilepaths.cpp:165
CFGFilePaths::saveSettings
void saveSettings() override
Reimplement this to write settings to config from widgets.
Definition:
cfgfilepaths.cpp:147
CFGFilePaths::icon
QIcon icon() const override
Reimplement this to return a displayable icon for the ConfigPage.
Definition:
cfgfilepaths.cpp:110
CFGFilePaths::name
QString name() const override
Reimplement this to return a list-displayable name for this ConfigPage.
Definition:
cfgfilepaths.h:51
CFGFilePaths
Definition:
cfgfilepaths.h:33
DPtr< CFGFilePaths >
CFGFilePaths::readSettings
void readSettings() override
Reimplement this to read settings from config into widgets.
Definition:
cfgfilepaths.cpp:137
ConfigPage
Base class for configuration pages.
Definition:
configpage.h:44
Doomseeker © 2009-2024 The Doomseeker Team