session refactoring
This commit is contained in:
@@ -58,7 +58,6 @@ public:
|
|||||||
~gameTableImpl();
|
~gameTableImpl();
|
||||||
|
|
||||||
boost::shared_ptr<Session> getSession();
|
boost::shared_ptr<Session> getSession();
|
||||||
// void setSession(boost::shared_ptr<Session> session);
|
|
||||||
void setStartWindow(startWindowImpl* s) { myStartWindow = s; }
|
void setStartWindow(startWindowImpl* s) { myStartWindow = s; }
|
||||||
|
|
||||||
void setLog(Log* l) { myLog = l; }
|
void setLog(Log* l) { myLog = l; }
|
||||||
@@ -281,7 +280,6 @@ public slots:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
boost::shared_ptr<GuiInterface> myServerGuiInterface;
|
boost::shared_ptr<GuiInterface> myServerGuiInterface;
|
||||||
boost::shared_ptr<Session> mySession;
|
|
||||||
Log *myLog;
|
Log *myLog;
|
||||||
Chat *myChat;
|
Chat *myChat;
|
||||||
ConfigFile *myConfig;
|
ConfigFile *myConfig;
|
||||||
|
|||||||
@@ -47,10 +47,7 @@ GuiWrapper::~GuiWrapper()
|
|||||||
void GuiWrapper::initGui(int speed) { myW->signalInitGui(speed); }
|
void GuiWrapper::initGui(int speed) { myW->signalInitGui(speed); }
|
||||||
|
|
||||||
boost::shared_ptr<Session> GuiWrapper::getSession() { return myStartWindow->getSession(); }
|
boost::shared_ptr<Session> GuiWrapper::getSession() { return myStartWindow->getSession(); }
|
||||||
void GuiWrapper::setSession(boost::shared_ptr<Session> session) {
|
void GuiWrapper::setSession(boost::shared_ptr<Session> session) { /*myStartWindow->setSession(session);*/ }
|
||||||
|
|
||||||
myStartWindow->setSession(session);
|
|
||||||
}
|
|
||||||
|
|
||||||
void GuiWrapper::refreshSet() const { myW->signalRefreshSet(); }
|
void GuiWrapper::refreshSet() const { myW->signalRefreshSet(); }
|
||||||
void GuiWrapper::refreshCash() const { myW->signalRefreshCash(); }
|
void GuiWrapper::refreshCash() const { myW->signalRefreshCash(); }
|
||||||
|
|||||||
@@ -56,9 +56,9 @@ startWindowImpl::startWindowImpl(ConfigFile *c)
|
|||||||
|
|
||||||
myGuiInterface.reset(new GuiWrapper(myConfig, this));
|
myGuiInterface.reset(new GuiWrapper(myConfig, this));
|
||||||
{
|
{
|
||||||
boost::shared_ptr<Session> session(new Session(myGuiInterface.get(), myConfig));
|
mySession.reset(new Session(myGuiInterface.get(), myConfig));
|
||||||
session->init(); // TODO handle error
|
mySession->init(); // TODO handle error
|
||||||
myGuiInterface->setSession(session);
|
// myGuiInterface->setSession(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user