This commit is contained in:
@@ -23,13 +23,10 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
NetSignalDispatcher::NetSignalDispatcher(connectToServerDialogImpl *dialog)
|
||||
{
|
||||
connect(this, SIGNAL(SignalNetClientSuccess(int)),
|
||||
dialog, SLOT(refresh(int)));
|
||||
connect(this, SIGNAL(SignalNetClientError(int, int)),
|
||||
dialog, SLOT(error(int, int)));
|
||||
}
|
||||
// NetSignalDispatcher::NetSignalDispatcher(connectToServerDialogImpl *dialog)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
GuiWrapper::GuiWrapper() : myLog(0), myW(0)
|
||||
@@ -42,7 +39,7 @@ GuiWrapper::GuiWrapper() : myLog(0), myW(0)
|
||||
myLog = new Log(myW);
|
||||
myConnectToServerDialog = new connectToServerDialogImpl();
|
||||
|
||||
myNetSignalDispatcher = new NetSignalDispatcher(myConnectToServerDialog);
|
||||
// myNetSignalDispatcher = new NetSignalDispatcher(myConnectToServerDialog);
|
||||
|
||||
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::logNewGameHandMsg(int gameID, int handID) { myLog->logNewGameHandMsg(gameID, handID); }
|
||||
|
||||
void GuiWrapper::SignalNetClientSuccess(int actionID) { myNetSignalDispatcher->SignalNetClientSuccess(actionID); }
|
||||
void GuiWrapper::SignalNetClientError(int errorID, int osErrorID) { myNetSignalDispatcher->SignalNetClientError(errorID, osErrorID); }
|
||||
void GuiWrapper::SignalNetClientSuccess(int actionID) { myW->SignalNetClientSuccess(actionID); }
|
||||
void GuiWrapper::SignalNetClientError(int errorID, int osErrorID) { myW->SignalNetClientError(errorID, osErrorID); }
|
||||
|
||||
@@ -72,7 +72,10 @@
|
||||
<number>65535</number>
|
||||
</property>
|
||||
<property name="minimum" >
|
||||
<number>1024</number>
|
||||
<number>80</number>
|
||||
</property>
|
||||
<property name="value" >
|
||||
<number>80</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -396,6 +396,10 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
|
||||
//Statusbar
|
||||
statusBar()->showMessage(tr("Ctrl+N to start a new Game"));
|
||||
|
||||
//Dialoge
|
||||
myJoinNetworkGameDialog = new joinNetworkGameDialogImpl();
|
||||
myConnectToServerDialog = new connectToServerDialogImpl();
|
||||
|
||||
//Connects
|
||||
connect(dealFlopCards0Timer, SIGNAL(timeout()), this, SLOT( dealFlopCards1() ));
|
||||
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 ( 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() {
|
||||
|
||||
myJoinNetworkGameDialog->setSession(mySession);
|
||||
myJoinNetworkGameDialog->exec();
|
||||
|
||||
joinNetworkGameDialogImpl *v = new joinNetworkGameDialogImpl();
|
||||
connectToServerDialogImpl *w = new connectToServerDialogImpl();
|
||||
v->setSession(mySession);
|
||||
v->exec();
|
||||
|
||||
if (v->result() == QDialog::Accepted ) {
|
||||
if ( myJoinNetworkGameDialog->result() == QDialog::Accepted ) {
|
||||
|
||||
//Dialog mit Statusbalken
|
||||
w->exec();
|
||||
myConnectToServerDialog->exec();
|
||||
|
||||
if (w->result() == QDialog::Rejected ) {
|
||||
if (myConnectToServerDialog->result() == QDialog::Rejected ) {
|
||||
callJoinNetworkGameDialog();
|
||||
|
||||
}
|
||||
|
||||
@@ -37,8 +37,10 @@ class ConfigFile;
|
||||
class BoardInterface;
|
||||
// class HandInterface;
|
||||
class PlayerInterface;
|
||||
|
||||
class MyCardsPixmapLabel;
|
||||
class joinNetworkGameDialogImpl;
|
||||
class connectToServerDialogImpl;
|
||||
|
||||
|
||||
class QColor;
|
||||
|
||||
@@ -239,6 +241,9 @@ private:
|
||||
|
||||
QPixmap *flipside;
|
||||
|
||||
//Dialoge
|
||||
joinNetworkGameDialogImpl *myJoinNetworkGameDialog;
|
||||
connectToServerDialogImpl *myConnectToServerDialog;
|
||||
int maxQuantityPlayers;
|
||||
|
||||
int distributePotAnimCounter;
|
||||
|
||||
Reference in New Issue
Block a user