23 #include "ircconfigurationdialog.h" 24 #include "gui/configuration/irc/cfgchatlogspage.h" 25 #include "gui/configuration/irc/cfgircappearance.h" 26 #include "gui/configuration/irc/cfgircnetworks.h" 27 #include "gui/configuration/irc/cfgircsounds.h" 28 #include "gui/commongui.h" 29 #include "irc/configuration/ircconfig.h" 32 IRCConfigurationDialog::IRCConfigurationDialog(QWidget* parent)
35 this->setWindowTitle(tr(
"Doomseeker - IRC Options"));
38 void IRCConfigurationDialog::doSaveSettings()
40 if (gIRCConfig.saveToFile())
42 gLog << tr(
"Settings saved!");
46 gLog << tr(
"Settings save failed!");
50 void IRCConfigurationDialog::initOptionsList()
55 this->addConfigPage(NULL, configPage);
58 configPage = cfgNetworks;
59 this->addConfigPage(NULL, configPage);
62 this->addConfigPage(NULL, configPage);
67 bool IRCConfigurationDialog::isNetworkAutojoinEnabled()
69 QVector<IRCNetworkEntity*> networks = cfgNetworks->networks();
81 bool IRCConfigurationDialog::validate()
83 if (this->isNetworkAutojoinEnabled())
85 if (gIRCConfig.personal.nickname.isEmpty())
87 QString nick =
CommonGUI::askString(tr(
"Config validation"), tr(
"You have chosen one or more networks for autojoin startup but you have not defined any nickname. Please define it now."));
93 gIRCConfig.personal.nickname = nick;
bool isAutojoinNetwork() const
Join this network when Doomseeker starts up.
Data structure that describes and defines a connection to an IRC network or server.
static QString askString(const QString &title, const QString &label, bool *ok=NULL, const QString &defaultString="")
Calls QInputDialog::getText().
Base class for configuration pages.