2011-07-02 23:03:18 +00:00
|
|
|
/*****************************************************************************
|
|
|
|
|
* PokerTH - The open source texas holdem engine *
|
|
|
|
|
* Copyright (C) 2006-2011 Felix Hammer, Florian Thauer, Lothar May *
|
|
|
|
|
* *
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
|
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
|
|
|
* License, or (at your option) any later version. *
|
|
|
|
|
* *
|
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
|
* GNU Affero General Public License for more details. *
|
|
|
|
|
* *
|
|
|
|
|
* You should have received a copy of the GNU Affero General Public License *
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
2011-07-03 19:45:08 +00:00
|
|
|
*****************************************************************************/
|
|
|
|
|
#ifndef SETTINGSDIALOGIMPL_H
|
2007-01-17 01:22:55 +00:00
|
|
|
#define SETTINGSDIALOGIMPL_H
|
|
|
|
|
|
|
|
|
|
#include "ui_settingsdialog.h"
|
2007-05-23 10:19:10 +00:00
|
|
|
#include "selectavatardialogimpl.h"
|
2007-09-21 00:13:47 +00:00
|
|
|
#include "manualblindsorderdialogimpl.h"
|
2007-01-17 01:22:55 +00:00
|
|
|
|
2007-01-28 23:33:48 +00:00
|
|
|
#include <QtCore>
|
|
|
|
|
#include <QtGui>
|
2007-01-28 14:48:18 +00:00
|
|
|
|
2007-09-23 01:29:22 +00:00
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
2007-05-13 13:32:06 +00:00
|
|
|
class ConfigFile;
|
2007-05-23 10:19:10 +00:00
|
|
|
class selectAvatarDialogImpl;
|
2007-09-21 00:13:47 +00:00
|
|
|
class manualBlindsOrderDialogImpl;
|
2009-06-05 19:36:07 +00:00
|
|
|
class MyStyleListItem;
|
2011-11-26 21:07:22 +00:00
|
|
|
class guiLog;
|
2007-01-17 01:22:55 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
class settingsDialogImpl: public QDialog, public Ui::settingsDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2007-01-17 01:22:55 +00:00
|
|
|
public:
|
2011-02-11 20:02:08 +00:00
|
|
|
settingsDialogImpl(QWidget *parent = 0, ConfigFile *c = 0, selectAvatarDialogImpl *s = 0);
|
2010-07-11 20:36:50 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
~settingsDialogImpl();
|
2010-07-13 21:27:04 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void prepareDialog();
|
2007-05-13 15:08:10 +00:00
|
|
|
void exec();
|
2007-01-17 23:57:41 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void setPlayerNickIsChanged(bool theValue) {
|
|
|
|
|
playerNickIsChanged = theValue;
|
|
|
|
|
}
|
|
|
|
|
bool getPlayerNickIsChanged() const {
|
|
|
|
|
return playerNickIsChanged;
|
|
|
|
|
}
|
2007-01-28 14:48:18 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
bool getSettingsCorrect() const {
|
|
|
|
|
return settingsCorrect;
|
|
|
|
|
}
|
2007-02-03 22:47:16 +00:00
|
|
|
|
2011-11-26 21:07:22 +00:00
|
|
|
void setGuiLog(guiLog* l) {
|
|
|
|
|
myGuiLog = l;
|
|
|
|
|
}
|
|
|
|
|
|
2007-01-17 23:57:41 +00:00
|
|
|
public slots:
|
|
|
|
|
|
2007-01-20 01:38:40 +00:00
|
|
|
void isAccepted();
|
2011-02-11 20:02:08 +00:00
|
|
|
void playerNickChanged() {
|
|
|
|
|
setPlayerNickIsChanged(TRUE);
|
|
|
|
|
};
|
2007-01-28 23:33:48 +00:00
|
|
|
void setFlipsidePicFileName();
|
2007-02-03 10:10:25 +00:00
|
|
|
void setLogDir();
|
2007-03-28 17:44:22 +00:00
|
|
|
void setAvatarFile0();
|
|
|
|
|
void setAvatarFile1();
|
|
|
|
|
void setAvatarFile2();
|
|
|
|
|
void setAvatarFile3();
|
|
|
|
|
void setAvatarFile4();
|
|
|
|
|
void setAvatarFile5();
|
|
|
|
|
void setAvatarFile6();
|
2009-03-25 22:59:01 +00:00
|
|
|
void setAvatarFile7();
|
|
|
|
|
void setAvatarFile8();
|
|
|
|
|
void setAvatarFile9();
|
2007-05-23 10:19:10 +00:00
|
|
|
|
2007-09-21 00:13:47 +00:00
|
|
|
void callManualBlindsOrderDialog();
|
|
|
|
|
void callNetManualBlindsOrderDialog();
|
|
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void callSelectAvatarDialog() {
|
|
|
|
|
mySelectAvatarDialogImpl->exec();
|
|
|
|
|
}
|
2007-05-23 10:19:10 +00:00
|
|
|
|
2007-08-26 08:02:07 +00:00
|
|
|
void clearInternetGamePassword(bool);
|
2011-02-11 20:02:08 +00:00
|
|
|
|
2007-12-07 07:52:10 +00:00
|
|
|
// void checkProperNetFirstSmallBlind(int);
|
|
|
|
|
// void checkProperFirstSmallBlind(int);
|
2007-09-30 12:19:50 +00:00
|
|
|
void setFirstSmallBlindMargin() ;
|
2007-10-04 21:13:00 +00:00
|
|
|
|
|
|
|
|
void setLanguageChanged(int);
|
2008-04-23 23:15:12 +00:00
|
|
|
|
|
|
|
|
void toggleGroupBoxAutomaticServerConfig(bool /*toggleState*/);
|
|
|
|
|
void toggleGroupBoxManualServerConfig(bool /*toggleState*/);
|
2009-03-30 09:08:11 +00:00
|
|
|
|
|
|
|
|
void setSelectedGameTableStyleActivated();
|
|
|
|
|
void showCurrentGameTableStylePreview();
|
|
|
|
|
void addGameTableStyle();
|
|
|
|
|
void removeGameTableStyle();
|
|
|
|
|
|
2009-03-30 13:12:44 +00:00
|
|
|
void setSelectedCardDeckStyleActivated();
|
|
|
|
|
void showCurrentCardDeckStylePreview();
|
|
|
|
|
void addCardDeckStyle();
|
|
|
|
|
void removeCardDeckStyle();
|
2011-02-11 20:02:08 +00:00
|
|
|
void removePlayerFromIgnoredPlayersList();
|
|
|
|
|
void refreshLogFileList();
|
|
|
|
|
void deleteLogFile();
|
|
|
|
|
void exportLogToHtml();
|
|
|
|
|
void exportLogToTxt();
|
|
|
|
|
void saveLogFileAs();
|
2011-11-26 21:07:22 +00:00
|
|
|
void showLogFilePreview();
|
2012-01-05 23:47:59 +00:00
|
|
|
void resetSettings();
|
2009-03-30 13:12:44 +00:00
|
|
|
|
2007-01-28 14:48:18 +00:00
|
|
|
private:
|
2011-02-11 20:02:08 +00:00
|
|
|
|
2007-01-28 14:48:18 +00:00
|
|
|
bool playerNickIsChanged;
|
2007-02-03 22:47:16 +00:00
|
|
|
bool settingsCorrect;
|
2007-09-23 01:29:22 +00:00
|
|
|
|
|
|
|
|
bool myAfterMBAlwaysDoubleBlinds;
|
|
|
|
|
bool myNetAfterMBAlwaysDoubleBlinds;
|
|
|
|
|
bool myAfterMBAlwaysRaiseAbout;
|
|
|
|
|
bool myNetAfterMBAlwaysRaiseAbout;
|
|
|
|
|
bool myAfterMBStayAtLastBlind;
|
|
|
|
|
bool myNetAfterMBStayAtLastBlind;
|
|
|
|
|
int myAfterMBAlwaysRaiseValue;
|
|
|
|
|
int myNetAfterMBAlwaysRaiseValue;
|
|
|
|
|
std::list<int> myManualBlindsList;
|
|
|
|
|
std::list<int> myNetManualBlindsList;
|
2009-03-30 09:08:11 +00:00
|
|
|
std::list<std::string> myGameTableStylesList;
|
2009-03-30 13:12:44 +00:00
|
|
|
std::list<std::string> myCardDeckStylesList;
|
2011-02-11 20:02:08 +00:00
|
|
|
|
2007-05-13 13:32:06 +00:00
|
|
|
ConfigFile* myConfig;
|
2011-11-26 21:07:22 +00:00
|
|
|
guiLog* myGuiLog;
|
2011-02-11 20:02:08 +00:00
|
|
|
selectAvatarDialogImpl *mySelectAvatarDialogImpl;
|
|
|
|
|
manualBlindsOrderDialogImpl *myManualBlindsOrderDialog;
|
2007-09-23 01:29:22 +00:00
|
|
|
|
2007-09-08 22:01:30 +00:00
|
|
|
QString myAppDataPath;
|
2007-01-28 14:48:18 +00:00
|
|
|
|
2007-10-04 21:13:00 +00:00
|
|
|
bool languageIsChanged;
|
|
|
|
|
int changedLanguageIndex;
|
2007-01-17 01:22:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|