23 #ifndef __DOOMSEEKERCONFIG_H__
24 #define __DOOMSEEKERCONFIG_H__
26 #include "customservers.h"
28 #include "gui/entity/serverlistfilterinfo.h"
29 #include "serverapi/buddyinfo.h"
30 #include <QScopedPointer>
33 #include <QStringList>
36 #define gConfig DoomseekerConfig::config()
60 static const QString SECTION_NAME;
63 bool bBotsAreNotPlayers;
64 bool bCloseToTrayIcon;
65 bool bColorizeServerConsole;
66 bool bDrawGridInServerTable;
68 bool bGroupServersWithPlayersAtTheTopOfTheList;
69 bool bIP2CountryAutoUpdate;
71 bool bMarkServersWithBuddies;
72 bool bQueryAutoRefreshDontIfActive;
73 bool bQueryAutoRefreshEnabled;
74 bool bQueryBeforeLaunch;
77 bool bTellMeWhereAreTheWADsWhenIHoverCursorOverWADSColumn;
78 QVector<BuddyInfo> buddiesList;
80 QString buddyServersColor;
81 QVector<CustomServerInfo> customServers;
82 QString customServersColor;
84 unsigned ip2CountryDatabaseMaximumAge;
85 QString ip2CountryUrl;
86 QString mainWindowState;
87 QByteArray mainWindowGeometry;
88 unsigned queryAutoRefreshEverySeconds;
89 QString previousCreateServerConfigDir;
90 QString previousCreateServerExecDir;
91 QString previousCreateServerWadDir;
92 QString serverListColumnState;
93 int serverListSortIndex;
94 int serverListSortDirection;
96 QList<FileSearchPath> wadPaths;
101 QList<ColumnSort> additionalSortColumns()
const;
102 void setAdditionalSortColumns(
const QList<ColumnSort> &val);
107 QList<FileAlias> wadAliases();
108 void setWadAliases(
const QList<FileAlias> &val);
110 QStringList wadPathsOnly()
const;
147 static const QString SECTION_NAME;
162 bool bPerformUpdateOnNextRun;
172 static const QString SECTION_NAME;
184 static const QString SECTION_NAME;
186 bool bSearchInIdgames;
187 bool bSearchInWadArchive;
188 QString colorMessageCriticalError;
189 QString colorMessageError;
190 QString colorMessageNotice;
191 int connectTimeoutSeconds;
192 int downloadTimeoutSeconds;
193 int maxConcurrentSiteDownloads;
194 int maxConcurrentWadDownloads;
196 QStringList searchURLs;
197 QString targetDirectory;
231 Ini* ini() {
return this->pIni.data(); }
277 bool isValidPluginName(
const QString& pluginName)
const;
285 QScopedPointer<QSettings> settings;
286 QScopedPointer<SettingsProviderQt> settingsProvider;
287 QScopedPointer<Ini> pIni;
QString updateChannelName
Pass this to UpdateChannel::fromName() .
Structure describing server filter.
void init(IniSection §ion)
Initializes values that are not present in the section yet.
QMap< QString, unsigned long long > lastKnownUpdateRevisions
Used to check if there are new updates since last reject.
bool saveToFile()
Saves current settings to ini file. This file must be previously set by setIniFile() method...
This Singleton holds entire Doomseeker configuration in memory.
Update is fully automatic.
IniSection iniSectionForPlugin(const QString &pluginName)
This will assume that the .ini file is initialized.
void init(IniSection §ion)
Initializes values that are not present in the section yet.
bool readFromFile()
Reads settings from ini file. This file must be previously set by setIniFile() method.
static DoomseekerConfig & config()
Returns the Singleton.
INI section representation.
bool setIniFile(const QString &filePath)
Initializes the Ini class instance to point to a file.
static void dispose()
Disposes of the Singleton.
User is only notified of the update and decides if it should be installed.