Doomseeker
Wadseeker
Download
Tracker
Git
Docs
Main Page
Plugin API
Related Pages
Modules
Classes
Files
File List
File Members
src
core
gui
configuration
cfgwadalias.h
1
//------------------------------------------------------------------------------
2
// cfgwadalias.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) 2014 "Zalewa" <zalewapl@gmail.com>
22
//------------------------------------------------------------------------------
23
#ifndef idBE57B8CD_234F_4EEE_AC1B1FAAFB11B1CD
24
#define idBE57B8CD_234F_4EEE_AC1B1FAAFB11B1CD
25
26
#include "gui/configuration/configpage.h"
27
#include "dptr.h"
28
#include <QComboBox>
29
30
class
FileAlias
;
31
class
QTableWidgetItem;
32
33
class
CFGWadAlias
:
public
ConfigPage
34
{
35
Q_OBJECT
36
37
public
:
38
CFGWadAlias
(QWidget *parent=NULL);
39
~
CFGWadAlias
();
40
41
QIcon
icon
()
const
;
42
QString
name
()
const
{
return
tr(
"WAD Aliases"
); }
43
44
void
readSettings
();
45
46
protected
:
47
void
saveSettings
();
48
void
showEvent(QShowEvent *event);
49
50
private
:
51
DPtr<CFGWadAlias>
d;
52
53
void
addAliasToTable(
const
FileAlias
&alias);
54
FileAlias
aliasFromRow(
int
row)
const
;
55
void
applyAliasToRow(
int
row,
const
FileAlias
&alias);
56
QList<FileAlias> aliases()
const
;
57
int
findRowWithWad(
const
QString &wadName);
58
QComboBox *mkMatchTypeComboBox(
int
row);
59
void
resizeRowsToContents();
60
QTableWidgetItem *toolTipItem(
const
QString &contents);
61
62
private
slots:
63
void
addDefaults();
64
void
addNewEntry();
65
void
removeSelected();
66
};
67
68
#endif
CFGWadAlias::name
QString name() const
Reimplement this to return a list-displayable name for this ConfigPage.
Definition:
cfgwadalias.h:42
FileAlias
Definition:
filealias.h:31
CFGWadAlias
Definition:
cfgwadalias.h:33
CFGWadAlias::readSettings
void readSettings()
Reimplement this to read settings from config into widgets.
Definition:
cfgwadalias.cpp:197
DPtr< CFGWadAlias >
CFGWadAlias::saveSettings
void saveSettings()
Reimplement this to write settings to config from widgets.
Definition:
cfgwadalias.cpp:229
CFGWadAlias::icon
QIcon icon() const
Reimplement this to return a displayable icon for the ConfigPage.
Definition:
cfgwadalias.cpp:182
ConfigPage
Base class for configuration pages.
Definition:
configpage.h:44
Doomseeker © 2009-2023 The Doomseeker Team