update zlib_compress.pro, add "reset factory settings" button to

settings menu
This commit is contained in:
doitux
2012-01-05 23:47:59 +00:00
parent 3a659dd5d5
commit 87b7242d6b
5 changed files with 136 additions and 2 deletions
@@ -109,6 +109,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
connect( pushButton_Opponent9Avatar, SIGNAL( clicked() ), this, SLOT( setAvatarFile9()) );
connect( pushButton_editManualBlindsOrder, SIGNAL( clicked() ), this, SLOT( callManualBlindsOrderDialog()) );
connect( pushButton_netEditManualBlindsOrder, SIGNAL( clicked() ), this, SLOT( callNetManualBlindsOrderDialog()) );
connect( pushButton_resetSettings, SIGNAL(clicked()), this, SLOT(resetSettings()));
connect( checkBox_UseInternetGamePassword, SIGNAL( toggled(bool) ), this, SLOT( clearInternetGamePassword(bool)) );
@@ -1366,3 +1367,15 @@ void settingsDialogImpl::showLogFilePreview()
cursor.movePosition(QTextCursor::Start);
textBrowser_logPreview->setTextCursor(cursor);
}
void settingsDialogImpl::resetSettings()
{
int ret = QMessageBox::warning(this, tr("PokerTH - Settings"),
tr("Attention: this will delete all your personal settings!\n"
"Do you really want to reset factory settings?"),
QMessageBox::Yes | QMessageBox::No);
if(ret == QMessageBox::Yes)
{
//TODO delete config.xml and directly close PokerTH
}
}