This commit is contained in:
@@ -23,13 +23,10 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
NetSignalDispatcher::NetSignalDispatcher(connectToServerDialogImpl *dialog)
|
// NetSignalDispatcher::NetSignalDispatcher(connectToServerDialogImpl *dialog)
|
||||||
{
|
// {
|
||||||
connect(this, SIGNAL(SignalNetClientSuccess(int)),
|
//
|
||||||
dialog, SLOT(refresh(int)));
|
// }
|
||||||
connect(this, SIGNAL(SignalNetClientError(int, int)),
|
|
||||||
dialog, SLOT(error(int, int)));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
GuiWrapper::GuiWrapper() : myLog(0), myW(0)
|
GuiWrapper::GuiWrapper() : myLog(0), myW(0)
|
||||||
@@ -42,7 +39,7 @@ GuiWrapper::GuiWrapper() : myLog(0), myW(0)
|
|||||||
myLog = new Log(myW);
|
myLog = new Log(myW);
|
||||||
myConnectToServerDialog = new connectToServerDialogImpl();
|
myConnectToServerDialog = new connectToServerDialogImpl();
|
||||||
|
|
||||||
myNetSignalDispatcher = new NetSignalDispatcher(myConnectToServerDialog);
|
// myNetSignalDispatcher = new NetSignalDispatcher(myConnectToServerDialog);
|
||||||
|
|
||||||
myConfig = new ConfigFile;
|
myConfig = new ConfigFile;
|
||||||
|
|
||||||
@@ -100,5 +97,5 @@ void GuiWrapper::meInAction() const { myW->meInAction(); }
|
|||||||
void GuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue) { myLog->logPlayerActionMsg(playerName, action, setValue); }
|
void GuiWrapper::logPlayerActionMsg(string playerName, int action, int setValue) { myLog->logPlayerActionMsg(playerName, action, setValue); }
|
||||||
void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->logNewGameHandMsg(gameID, handID); }
|
void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->logNewGameHandMsg(gameID, handID); }
|
||||||
|
|
||||||
void GuiWrapper::SignalNetClientSuccess(int actionID) { myNetSignalDispatcher->SignalNetClientSuccess(actionID); }
|
void GuiWrapper::SignalNetClientSuccess(int actionID) { myW->SignalNetClientSuccess(actionID); }
|
||||||
void GuiWrapper::SignalNetClientError(int errorID, int osErrorID) { myNetSignalDispatcher->SignalNetClientError(errorID, osErrorID); }
|
void GuiWrapper::SignalNetClientError(int errorID, int osErrorID) { myW->SignalNetClientError(errorID, osErrorID); }
|
||||||
|
|||||||
@@ -72,7 +72,10 @@
|
|||||||
<number>65535</number>
|
<number>65535</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum" >
|
<property name="minimum" >
|
||||||
<number>1024</number>
|
<number>80</number>
|
||||||
|
</property>
|
||||||
|
<property name="value" >
|
||||||
|
<number>80</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -396,6 +396,10 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
|
|||||||
//Statusbar
|
//Statusbar
|
||||||
statusBar()->showMessage(tr("Ctrl+N to start a new Game"));
|
statusBar()->showMessage(tr("Ctrl+N to start a new Game"));
|
||||||
|
|
||||||
|
//Dialoge
|
||||||
|
myJoinNetworkGameDialog = new joinNetworkGameDialogImpl();
|
||||||
|
myConnectToServerDialog = new connectToServerDialogImpl();
|
||||||
|
|
||||||
//Connects
|
//Connects
|
||||||
connect(dealFlopCards0Timer, SIGNAL(timeout()), this, SLOT( dealFlopCards1() ));
|
connect(dealFlopCards0Timer, SIGNAL(timeout()), this, SLOT( dealFlopCards1() ));
|
||||||
connect(dealFlopCards1Timer, SIGNAL(timeout()), this, SLOT( dealFlopCards2() ));
|
connect(dealFlopCards1Timer, SIGNAL(timeout()), this, SLOT( dealFlopCards2() ));
|
||||||
@@ -447,6 +451,9 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
|
|||||||
connect ( horizontalSlider_speed, SIGNAL( valueChanged(int)), this, SLOT ( setGameSpeed(int) ) );
|
connect ( horizontalSlider_speed, SIGNAL( valueChanged(int)), this, SLOT ( setGameSpeed(int) ) );
|
||||||
connect ( pushButton_break, SIGNAL( clicked()), this, SLOT ( breakButtonClicked() ) ); // auch wieder starten!!!!
|
connect ( pushButton_break, SIGNAL( clicked()), this, SLOT ( breakButtonClicked() ) ); // auch wieder starten!!!!
|
||||||
|
|
||||||
|
//Nachrichten Thread-Save
|
||||||
|
connect(this, SIGNAL(SignalNetClientSuccess(int)), myConnectToServerDialog, SLOT(refresh(int)));
|
||||||
|
connect(this, SIGNAL(SignalNetClientError(int, int)), myConnectToServerDialog, SLOT(error(int, int)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -543,18 +550,16 @@ void mainWindowImpl::callAboutPokerthDialog() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mainWindowImpl::callJoinNetworkGameDialog() {
|
void mainWindowImpl::callJoinNetworkGameDialog() {
|
||||||
|
|
||||||
|
myJoinNetworkGameDialog->setSession(mySession);
|
||||||
|
myJoinNetworkGameDialog->exec();
|
||||||
|
|
||||||
joinNetworkGameDialogImpl *v = new joinNetworkGameDialogImpl();
|
if ( myJoinNetworkGameDialog->result() == QDialog::Accepted ) {
|
||||||
connectToServerDialogImpl *w = new connectToServerDialogImpl();
|
|
||||||
v->setSession(mySession);
|
|
||||||
v->exec();
|
|
||||||
|
|
||||||
if (v->result() == QDialog::Accepted ) {
|
|
||||||
|
|
||||||
//Dialog mit Statusbalken
|
//Dialog mit Statusbalken
|
||||||
w->exec();
|
myConnectToServerDialog->exec();
|
||||||
|
|
||||||
if (w->result() == QDialog::Rejected ) {
|
if (myConnectToServerDialog->result() == QDialog::Rejected ) {
|
||||||
callJoinNetworkGameDialog();
|
callJoinNetworkGameDialog();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,8 +37,10 @@ class ConfigFile;
|
|||||||
class BoardInterface;
|
class BoardInterface;
|
||||||
// class HandInterface;
|
// class HandInterface;
|
||||||
class PlayerInterface;
|
class PlayerInterface;
|
||||||
|
|
||||||
class MyCardsPixmapLabel;
|
class MyCardsPixmapLabel;
|
||||||
|
class joinNetworkGameDialogImpl;
|
||||||
|
class connectToServerDialogImpl;
|
||||||
|
|
||||||
|
|
||||||
class QColor;
|
class QColor;
|
||||||
|
|
||||||
@@ -239,6 +241,9 @@ private:
|
|||||||
|
|
||||||
QPixmap *flipside;
|
QPixmap *flipside;
|
||||||
|
|
||||||
|
//Dialoge
|
||||||
|
joinNetworkGameDialogImpl *myJoinNetworkGameDialog;
|
||||||
|
connectToServerDialogImpl *myConnectToServerDialog;
|
||||||
int maxQuantityPlayers;
|
int maxQuantityPlayers;
|
||||||
|
|
||||||
int distributePotAnimCounter;
|
int distributePotAnimCounter;
|
||||||
|
|||||||
Reference in New Issue
Block a user