next steps serverlist gui
This commit is contained in:
@@ -118,6 +118,10 @@ void ServerGuiWrapper::logPlayerWinGame(std::string /*playerName*/, int /*gameID
|
||||
void ServerGuiWrapper::flushLogAtGame(int /*gameID*/) {}
|
||||
void ServerGuiWrapper::flushLogAtHand() {}
|
||||
|
||||
void ServerGuiWrapper::SignalNetClientServerListAdd(unsigned serverId) { if (myClientcb) myClientcb->SignalNetClientServerListAdd(serverId); }
|
||||
void ServerGuiWrapper::SignalNetClientServerListClear() { if (myClientcb) myClientcb->SignalNetClientServerListClear(); }
|
||||
void ServerGuiWrapper::SignalNetClientServerListShow() { if (myClientcb) myClientcb->SignalNetClientServerListShow(); }
|
||||
|
||||
void ServerGuiWrapper::SignalNetClientConnect(int actionID) { if (myClientcb) myClientcb->SignalNetClientConnect(actionID); }
|
||||
void ServerGuiWrapper::SignalNetClientGameInfo(int actionID) { if (myClientcb) myClientcb->SignalNetClientGameInfo(actionID); }
|
||||
void ServerGuiWrapper::SignalNetClientError(int errorID, int osErrorID) { if (myClientcb) myClientcb->SignalNetClientError(errorID, osErrorID); }
|
||||
|
||||
@@ -126,6 +126,10 @@ public:
|
||||
void SignalNetClientGameListPlayerJoined(unsigned gameId, unsigned playerId);
|
||||
void SignalNetClientGameListPlayerLeft(unsigned gameId, unsigned playerId);
|
||||
void SignalNetClientGameStart(boost::shared_ptr<Game> game);
|
||||
|
||||
void SignalNetClientServerListAdd(unsigned serverId);
|
||||
void SignalNetClientServerListClear();
|
||||
void SignalNetClientServerListShow();
|
||||
|
||||
void SignalNetServerSuccess(int actionID);
|
||||
void SignalNetServerError(int errorID, int osErrorID);
|
||||
|
||||
@@ -34,6 +34,7 @@ serverListDialogImpl::serverListDialogImpl(startWindowImpl *sw, QMainWindow *par
|
||||
|
||||
|
||||
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( connectToServer() ));
|
||||
connect( buttonBox, SIGNAL( rejected() ), this, SLOT( closeNetworkClient() ));
|
||||
|
||||
}
|
||||
|
||||
@@ -63,3 +64,8 @@ void serverListDialogImpl::connectToServer()
|
||||
mySw->getSession()->selectServer(item->data(0, Qt::UserRole).toUInt());
|
||||
}
|
||||
}
|
||||
|
||||
void serverListDialogImpl::closeNetworkClient() {
|
||||
|
||||
mySw->getSession()->terminateNetworkClient();
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ public slots:
|
||||
void clearList();
|
||||
void addServerItem(unsigned);
|
||||
void connectToServer();
|
||||
void closeNetworkClient();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ startWindowImpl::startWindowImpl(ConfigFile *c)
|
||||
|
||||
connect(this, SIGNAL(signalNetClientServerListShow()), myServerListDialog, SLOT(exec()));
|
||||
connect(this, SIGNAL(signalNetClientServerListClear()), myServerListDialog, SLOT(clearList()));
|
||||
connect(this, SIGNAL(signalNetClientServerListAdd(unsigned serverId)), myServerListDialog, SLOT(addServerItem(serverId)));
|
||||
connect(this, SIGNAL(signalNetClientServerListAdd(unsigned)), myServerListDialog, SLOT(addServerItem(unsigned)));
|
||||
|
||||
connect(this, SIGNAL(signalNetClientSelfJoined(unsigned, QString, int)), myStartNetworkGameDialog, SLOT(joinedNetworkGame(unsigned, QString, int)));
|
||||
connect(this, SIGNAL(signalNetClientPlayerJoined(unsigned, QString, int)), myStartNetworkGameDialog, SLOT(addConnectedPlayer(unsigned, QString, int)));
|
||||
|
||||
@@ -59,6 +59,11 @@ public:
|
||||
virtual void SignalNetClientChatMsg(const std::string &playerName, const std::string &msg) = 0;
|
||||
virtual void SignalNetClientMsgBox(const std::string &msg) = 0;
|
||||
virtual void SignalNetClientWaitDialog() = 0;
|
||||
};
|
||||
|
||||
virtual void SignalNetClientServerListAdd(unsigned serverId) =0;
|
||||
virtual void SignalNetClientServerListClear() =0;
|
||||
virtual void SignalNetClientServerListShow() =0;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user