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