This commit is contained in:
doitux
2007-02-18 21:06:21 +00:00
parent 4e40f11f90
commit 7c5d8a3b44
4 changed files with 30 additions and 20 deletions
+7 -10
View File
@@ -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); }
+4 -1
View File
@@ -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>
+12 -7
View File
@@ -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)));
} }
@@ -544,17 +551,15 @@ void mainWindowImpl::callAboutPokerthDialog() {
void mainWindowImpl::callJoinNetworkGameDialog() { void mainWindowImpl::callJoinNetworkGameDialog() {
joinNetworkGameDialogImpl *v = new joinNetworkGameDialogImpl(); myJoinNetworkGameDialog->setSession(mySession);
connectToServerDialogImpl *w = new connectToServerDialogImpl(); myJoinNetworkGameDialog->exec();
v->setSession(mySession);
v->exec();
if (v->result() == QDialog::Accepted ) { if ( myJoinNetworkGameDialog->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();
} }
+6 -1
View File
@@ -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;