Files
pokerth/src/gui/qt/settingsdialog/settingsdialogimpl.h
T

149 lines
4.3 KiB
C++
Raw Normal View History

/*****************************************************************************
* 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>
#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;
class guiLog;
2007-01-17 01:22:55 +00:00
class settingsDialogImpl: public QDialog, public Ui::settingsDialog
{
Q_OBJECT
2007-01-17 01:22:55 +00:00
public:
settingsDialogImpl(QWidget *parent = 0, ConfigFile *c = 0, selectAvatarDialogImpl *s = 0);
~settingsDialogImpl();
2010-07-13 21:27:04 +00:00
void prepareDialog();
2007-05-13 15:08:10 +00:00
void exec();
2007-01-17 23:57:41 +00:00
void setPlayerNickIsChanged(bool theValue) {
playerNickIsChanged = theValue;
}
bool getPlayerNickIsChanged() const {
return playerNickIsChanged;
}
bool getSettingsCorrect() const {
return settingsCorrect;
}
2007-02-03 22:47:16 +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();
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();
void callSelectAvatarDialog() {
mySelectAvatarDialogImpl->exec();
}
2007-05-23 10:19:10 +00:00
2007-08-26 08:02:07 +00:00
void clearInternetGamePassword(bool);
2007-12-07 07:52:10 +00:00
// void checkProperNetFirstSmallBlind(int);
// void checkProperFirstSmallBlind(int);
void setFirstSmallBlindMargin() ;
void setLanguageChanged(int);
void toggleGroupBoxAutomaticServerConfig(bool /*toggleState*/);
void toggleGroupBoxManualServerConfig(bool /*toggleState*/);
void setSelectedGameTableStyleActivated();
void showCurrentGameTableStylePreview();
void addGameTableStyle();
void removeGameTableStyle();
void setSelectedCardDeckStyleActivated();
void showCurrentCardDeckStylePreview();
void addCardDeckStyle();
void removeCardDeckStyle();
void removePlayerFromIgnoredPlayersList();
void refreshLogFileList();
void deleteLogFile();
void exportLogToHtml();
void exportLogToTxt();
void saveLogFileAs();
void showLogFilePreview();
void resetSettings();
private:
bool playerNickIsChanged;
2007-02-03 22:47:16 +00:00
bool settingsCorrect;
bool myAfterMBAlwaysDoubleBlinds;
bool myNetAfterMBAlwaysDoubleBlinds;
bool myAfterMBAlwaysRaiseAbout;
bool myNetAfterMBAlwaysRaiseAbout;
bool myAfterMBStayAtLastBlind;
bool myNetAfterMBStayAtLastBlind;
int myAfterMBAlwaysRaiseValue;
int myNetAfterMBAlwaysRaiseValue;
std::list<int> myManualBlindsList;
std::list<int> myNetManualBlindsList;
std::list<std::string> myGameTableStylesList;
std::list<std::string> myCardDeckStylesList;
2007-05-13 13:32:06 +00:00
ConfigFile* myConfig;
guiLog* myGuiLog;
selectAvatarDialogImpl *mySelectAvatarDialogImpl;
manualBlindsOrderDialogImpl *myManualBlindsOrderDialog;
2007-09-08 22:01:30 +00:00
QString myAppDataPath;
bool languageIsChanged;
int changedLanguageIndex;
2007-01-17 01:22:55 +00:00
};
#endif