add autostart timer display, bad word game name check gui

This commit is contained in:
doitux
2010-09-05 02:00:23 +00:00
parent 8a83a1dd07
commit ec46f06d61
6 changed files with 71 additions and 9 deletions
@@ -56,13 +56,20 @@ changeContentDialogImpl::changeContentDialogImpl(QWidget *parent, ConfigFile *co
lineEdit->setMaxLength(12);
}
break;
case CHANGE_INET_GAME_NAME: {
case CHANGE_INET_GAME_NAME_IN_USE: {
label_Message->setText(tr("There is already a game with your choosen game name.\nPlease choose another one!"));
label_lineLabel->setText(tr("Game name:"));
lineEdit->setText(QString::fromUtf8(myConfig->readConfigString("InternetGameName").c_str()));
lineEdit->setMaxLength(48);
}
break;
case CHANGE_INET_BAD_GAME_NAME: {
label_Message->setText(tr("There is a forbidden word in your choosen game name.\nPlease choose another one!"));
label_lineLabel->setText(tr("Game name:"));
lineEdit->setText(QString::fromUtf8(myConfig->readConfigString("InternetGameName").c_str()));
lineEdit->setMaxLength(48);
}
break;
}
connect(this, SIGNAL(accepted ()), this, SLOT(saveContent()));
@@ -88,7 +95,8 @@ void changeContentDialogImpl::saveContent() {
}
}
break;
case CHANGE_INET_GAME_NAME: {
case CHANGE_INET_BAD_GAME_NAME:
case CHANGE_INET_GAME_NAME_IN_USE: {
if(checkBox->isChecked()) {
myConfig->writeConfigString("InternetGameName", lineEdit->text().toUtf8().constData());
}
@@ -24,7 +24,7 @@
#include <QtCore>
enum DialogType { CHANGE_HUMAN_PLAYER_NAME=0, CHANGE_NICK_ALREADY_IN_USE, CHANGE_NICK_INVALID, CHANGE_INET_GAME_NAME };
enum DialogType { CHANGE_HUMAN_PLAYER_NAME=0, CHANGE_NICK_ALREADY_IN_USE, CHANGE_NICK_INVALID, CHANGE_INET_BAD_GAME_NAME, CHANGE_INET_GAME_NAME_IN_USE };
class ConfigFile;