This commit is contained in:
@@ -34,7 +34,7 @@ using namespace std;
|
|||||||
ConfigFile::ConfigFile()
|
ConfigFile::ConfigFile()
|
||||||
{
|
{
|
||||||
// !!!! Revisionsnummer der Configdefaults !!!!!
|
// !!!! Revisionsnummer der Configdefaults !!!!!
|
||||||
configRev = 10;
|
configRev = 11;
|
||||||
|
|
||||||
// Pfad und Dateinamen setzen
|
// Pfad und Dateinamen setzen
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@@ -205,8 +205,8 @@ void ConfigFile::createDefaultConfig() {
|
|||||||
confElement21->SetAttribute("value", 2);
|
confElement21->SetAttribute("value", 2);
|
||||||
|
|
||||||
TiXmlElement * confElement31 = new TiXmlElement( "DataDir" );
|
TiXmlElement * confElement31 = new TiXmlElement( "DataDir" );
|
||||||
config->LinkEndChild( confElement30 );
|
config->LinkEndChild( confElement31 );
|
||||||
confElement30->SetAttribute("value", dataDir);
|
confElement31->SetAttribute("value", dataDir);
|
||||||
|
|
||||||
doc.SaveFile( configFileName );
|
doc.SaveFile( configFileName );
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" >
|
<item row="1" column="1" >
|
||||||
<widget class="QLineEdit" name="lineEdit_3" >
|
<widget class="QLineEdit" name="lineEdit_profileName" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>myServerProfile1</string>
|
<string>myServerProfile1</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>lineEdit_ipAddress</tabstop>
|
<tabstop>lineEdit_ipAddress</tabstop>
|
||||||
<tabstop>lineEdit_password</tabstop>
|
<tabstop>lineEdit_password</tabstop>
|
||||||
<tabstop>lineEdit_3</tabstop>
|
<tabstop>lineEdit_profileName</tabstop>
|
||||||
<tabstop>spinBox_port</tabstop>
|
<tabstop>spinBox_port</tabstop>
|
||||||
<tabstop>checkBox_ipv6</tabstop>
|
<tabstop>checkBox_ipv6</tabstop>
|
||||||
<tabstop>treeWidget</tabstop>
|
<tabstop>treeWidget</tabstop>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include "joinnetworkgamedialogimpl.h"
|
#include "joinnetworkgamedialogimpl.h"
|
||||||
#include "session.h"
|
#include "session.h"
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
|
#include "tinyxml.h"
|
||||||
|
|
||||||
joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent)
|
joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
@@ -55,15 +56,15 @@ void joinNetworkGameDialogImpl::saveServerProfile() {
|
|||||||
TiXmlElement * root = new TiXmlElement( "PokerTH" );
|
TiXmlElement * root = new TiXmlElement( "PokerTH" );
|
||||||
doc.LinkEndChild( root );
|
doc.LinkEndChild( root );
|
||||||
|
|
||||||
TiXmlElement * config;
|
TiXmlElement * profiles = new TiXmlElement( "ServerProfiles" );
|
||||||
config = new TiXmlElement( "ServerProfiles" );
|
root->LinkEndChild( profiles );
|
||||||
root->LinkEndChild( config );
|
|
||||||
|
|
||||||
TiXmlElement * confElement11 = new TiXmlElement( "ShowLeftToolBox" );
|
TiXmlElement * profile = new TiXmlElement( lineEdit_profileName->text().toStdString() );
|
||||||
config->LinkEndChild( confElement11 );
|
profiles->LinkEndChild( profile );
|
||||||
confElement11->SetAttribute("value", 1);
|
profile->SetAttribute("value", 1);
|
||||||
|
|
||||||
doc.SaveFile( myConfig->readConfigString("dataDir")+"" );
|
std::cout << myConfig->readConfigString("dataDir")+"serverprofiles.xml" << endl;
|
||||||
|
doc.SaveFile( myConfig->readConfigString("dataDir")+"serverprofiles.xml" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void joinNetworkGameDialogImpl::deleteServerProfile() {
|
void joinNetworkGameDialogImpl::deleteServerProfile() {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
|
|
||||||
class Session;
|
class Session;
|
||||||
|
class ConfigFile;
|
||||||
|
|
||||||
class joinNetworkGameDialogImpl: public QDialog, public Ui::joinNetworkGameDialog {
|
class joinNetworkGameDialogImpl: public QDialog, public Ui::joinNetworkGameDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
+19
-10
@@ -23,12 +23,6 @@
|
|||||||
<height>670</height>
|
<height>670</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize" >
|
|
||||||
<size>
|
|
||||||
<width>874</width>
|
|
||||||
<height>670</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="palette" >
|
<property name="palette" >
|
||||||
<palette>
|
<palette>
|
||||||
<active>
|
<active>
|
||||||
@@ -2434,7 +2428,7 @@
|
|||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType" >
|
<property name="sizeType" >
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
@@ -2519,7 +2513,7 @@
|
|||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType" >
|
<property name="sizeType" >
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
@@ -2967,7 +2961,7 @@
|
|||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType" >
|
<property name="sizeType" >
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
@@ -3260,7 +3254,7 @@
|
|||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType" >
|
<property name="sizeType" >
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
@@ -4191,6 +4185,12 @@
|
|||||||
<height>30</height>
|
<height>30</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<widget class="QMenu" name="menuView" >
|
||||||
|
<property name="title" >
|
||||||
|
<string>View</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionFullScreen" />
|
||||||
|
</widget>
|
||||||
<widget class="QMenu" name="menuSpiel" >
|
<widget class="QMenu" name="menuSpiel" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>Game</string>
|
<string>Game</string>
|
||||||
@@ -4203,6 +4203,7 @@
|
|||||||
<addaction name="actionQuit" />
|
<addaction name="actionQuit" />
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menuSpiel" />
|
<addaction name="menuSpiel" />
|
||||||
|
<addaction name="menuView" />
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusbar" />
|
<widget class="QStatusBar" name="statusbar" />
|
||||||
<action name="actionNewGame" >
|
<action name="actionNewGame" >
|
||||||
@@ -4238,6 +4239,14 @@
|
|||||||
<string>Join Network Game ...</string>
|
<string>Join Network Game ...</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionFullScreen" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Fullscreen</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut" >
|
||||||
|
<string>F</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>pushButton_raise</tabstop>
|
<tabstop>pushButton_raise</tabstop>
|
||||||
|
|||||||
@@ -417,10 +417,10 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
|
|||||||
statusBar()->showMessage(tr("Ctrl+N to start a new Game"));
|
statusBar()->showMessage(tr("Ctrl+N to start a new Game"));
|
||||||
|
|
||||||
//Dialoge
|
//Dialoge
|
||||||
myJoinNetworkGameDialog = new joinNetworkGameDialogImpl();
|
myJoinNetworkGameDialog = new joinNetworkGameDialogImpl(this);
|
||||||
myConnectToServerDialog = new connectToServerDialogImpl();
|
myConnectToServerDialog = new connectToServerDialogImpl(this);
|
||||||
myStartNetworkGameDialog = new startNetworkGameDialogImpl();
|
myStartNetworkGameDialog = new startNetworkGameDialogImpl(this);
|
||||||
myCreateNetworkGameDialog = new createNetworkGameDialogImpl();
|
myCreateNetworkGameDialog = new createNetworkGameDialogImpl(this);
|
||||||
|
|
||||||
//Connects
|
//Connects
|
||||||
connect(dealFlopCards0Timer, SIGNAL(timeout()), this, SLOT( dealFlopCards1() ));
|
connect(dealFlopCards0Timer, SIGNAL(timeout()), this, SLOT( dealFlopCards1() ));
|
||||||
@@ -461,6 +461,7 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
|
|||||||
connect( actionJoin_network_Game, SIGNAL( triggered() ), this, SLOT( callJoinNetworkGameDialog() ) );
|
connect( actionJoin_network_Game, SIGNAL( triggered() ), this, SLOT( callJoinNetworkGameDialog() ) );
|
||||||
connect( actionCreate_network_Game, SIGNAL( triggered() ), this, SLOT( callCreateNetworkGameDialog() ) );
|
connect( actionCreate_network_Game, SIGNAL( triggered() ), this, SLOT( callCreateNetworkGameDialog() ) );
|
||||||
connect( actionQuit, SIGNAL( triggered() ), qApp, SLOT( quit() ) );
|
connect( actionQuit, SIGNAL( triggered() ), qApp, SLOT( quit() ) );
|
||||||
|
connect( actionFullScreen, SIGNAL( triggered() ), this, SLOT( switchFullscreen() ) );
|
||||||
|
|
||||||
connect( pushButton_raise, SIGNAL( clicked() ), this, SLOT( myRaise() ) );
|
connect( pushButton_raise, SIGNAL( clicked() ), this, SLOT( myRaise() ) );
|
||||||
connect( pushButton_call, SIGNAL( clicked() ), this, SLOT( myCall() ) );
|
connect( pushButton_call, SIGNAL( clicked() ), this, SLOT( myCall() ) );
|
||||||
@@ -492,7 +493,7 @@ void mainWindowImpl::callNewGameDialog() {
|
|||||||
|
|
||||||
if(myConfig->readConfigInt("ShowGameSettingsDialogOnNewGame")){
|
if(myConfig->readConfigInt("ShowGameSettingsDialogOnNewGame")){
|
||||||
|
|
||||||
newGameDialogImpl *v = new newGameDialogImpl();
|
newGameDialogImpl *v = new newGameDialogImpl(this);
|
||||||
v->exec();
|
v->exec();
|
||||||
|
|
||||||
if (v->result() == QDialog::Accepted ) {
|
if (v->result() == QDialog::Accepted ) {
|
||||||
@@ -573,7 +574,7 @@ void mainWindowImpl::callNewGameDialog() {
|
|||||||
|
|
||||||
void mainWindowImpl::callAboutPokerthDialog() {
|
void mainWindowImpl::callAboutPokerthDialog() {
|
||||||
|
|
||||||
aboutPokerthImpl *v = new aboutPokerthImpl();
|
aboutPokerthImpl *v = new aboutPokerthImpl(this);
|
||||||
v->exec();
|
v->exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -635,7 +636,7 @@ void mainWindowImpl::callJoinNetworkGameDialog() {
|
|||||||
|
|
||||||
void mainWindowImpl::callSettingsDialog() {
|
void mainWindowImpl::callSettingsDialog() {
|
||||||
|
|
||||||
settingsDialogImpl *v = new settingsDialogImpl();
|
settingsDialogImpl *v = new settingsDialogImpl(this);
|
||||||
v->exec();
|
v->exec();
|
||||||
|
|
||||||
if (v->getSettingsCorrect()) {
|
if (v->getSettingsCorrect()) {
|
||||||
@@ -1969,6 +1970,7 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
|
|||||||
if (event->key() == 16777220) { if(spinBox_set->hasFocus()) pushButton_set->click(); } //ENTER
|
if (event->key() == 16777220) { if(spinBox_set->hasFocus()) pushButton_set->click(); } //ENTER
|
||||||
if (event->key() == 16777265) { switchLeftToolBox(); } //F2
|
if (event->key() == 16777265) { switchLeftToolBox(); } //F2
|
||||||
if (event->key() == 16777266) { switchRightToolBox(); } //F3
|
if (event->key() == 16777266) { switchRightToolBox(); } //F3
|
||||||
|
if (event->key() == Qt::Key_F) { switchFullscreen(); } //f
|
||||||
if (event->key() == 16777249) {
|
if (event->key() == 16777249) {
|
||||||
pushButton_break->click();
|
pushButton_break->click();
|
||||||
ctrlPressed = TRUE;
|
ctrlPressed = TRUE;
|
||||||
@@ -2009,3 +2011,13 @@ void mainWindowImpl::switchRightToolBox() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mainWindowImpl::switchFullscreen() {
|
||||||
|
|
||||||
|
if (this->isFullScreen()) {
|
||||||
|
this->showNormal();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->showFullScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ public slots:
|
|||||||
void keyPressEvent ( QKeyEvent * event );
|
void keyPressEvent ( QKeyEvent * event );
|
||||||
void switchLeftToolBox();
|
void switchLeftToolBox();
|
||||||
void switchRightToolBox();
|
void switchRightToolBox();
|
||||||
|
void switchFullscreen();
|
||||||
|
|
||||||
void paintStartSplash();
|
void paintStartSplash();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user