Main Class Reference

#include <main.h>

List of all members.

Public Member Functions

 Main (int argc, char *argv[])
void finalize ()
 Called by main() after run() returns.
int run ()
 Replaces main().

Static Public Attributes

static const QString IP2C_FILENAME = "IpToCountry.csv"
static QApplication * application = NULL
static bool bInstallUpdatesAndRestart = false
 If true then program will install updates and restart instead of quitting if quit is requested.
static IP2C * ip2c = NULL
static DataPathsdataPaths
static QWidget * mainWindow = NULL
static PluginLoaderenginePlugins = NULL
static QList< LocalizationInfolocalizations
static bool running = true
static RefreshingThread * refreshingThread = RefreshingThread::createRefreshingThread()
 Used to notify the Server objects that it should not refresh in order to end the program faster.
static QString workingDirectory = "./"
static QString argDataDir
static bool bPortableMode = false

Protected Member Functions

int connectToServerByURL ()
void convertOldIniToQSettingsIni ()
void createMainWindow ()
bool createRemoteConsole ()
int runTestMode ()
bool initDataDirectories ()
int initIP2C ()
void initIRCConfig ()
void initLocalizationsDefinitions ()
void initMainConfig ()
void initPluginConfig ()
int installPendingUpdates ()
bool interpretCommandLineParameters ()
void preserveOldConfigBackwardsCompatibility ()
void setupRefreshingThread ()

Protected Attributes

char ** arguments
int argumentsCount
bool bIsFirstRun
bool bTestMode
QStringList dataDirectories
QString rconPluginName
QString rconAddress
 If not empty assume we want to launch an rcon client.
unsigned short rconPort
bool startRcon
int updateFailedCode
QUrl connectUrl

Static Protected Attributes

static const QString DOOMSEEKER_CONFIG_FILENAME = "doomseeker.cfg"
static const QString DOOMSEEKER_INI_FILENAME = "doomseeker.ini"
static const QString DOOMSEEKER_IRC_INI_FILENAME = "doomseeker-irc.ini"

Detailed Description

This class holds some global information.

Member Function Documentation

void Main::finalize (  ) 

Called by main() after run() returns.

finalize() cleans up after Main object.

bool Main::initDataDirectories (  )  [protected]

Creates required directories and sets up the application.

False if it was impossible to setup the directories.
int Main::initIP2C (  )  [protected]

If updateip2c == true, application should quit after this returns.

If updateip2c == true it returns the exit code. Otherwise always returns zero.
bool Main::interpretCommandLineParameters (  )  [protected]
If false - terminate the application after this method returns.

Member Data Documentation

bool Main::bInstallUpdatesAndRestart = false [static]

If true then program will install updates and restart instead of quitting if quit is requested.

This flag is ignored if the program configuration states that there are no updates to install.

Default: false.

The documentation for this class was generated from the following files: