adds universal timeoutmsgbox
This commit is contained in:
@@ -32,6 +32,8 @@ gameLobbyDialogImpl::gameLobbyDialogImpl(QWidget *parent, ConfigFile *c)
|
|||||||
|
|
||||||
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
||||||
|
|
||||||
|
myOpenGameTimeoutMsgBoxImpl.reset(new timeoutMsgBoxImpl(this, 1));
|
||||||
|
|
||||||
//wait start game message
|
//wait start game message
|
||||||
waitStartGameMsgBox = new QMessageBox(this);
|
waitStartGameMsgBox = new QMessageBox(this);
|
||||||
waitStartGameMsgBox->setText(tr("Starting game. Please wait ..."));
|
waitStartGameMsgBox->setText(tr("Starting game. Please wait ..."));
|
||||||
@@ -844,7 +846,7 @@ void gameLobbyDialogImpl::joinAnyGameButtonRefresh() {
|
|||||||
|
|
||||||
void gameLobbyDialogImpl::startOpenGameTimeout() {
|
void gameLobbyDialogImpl::startOpenGameTimeout() {
|
||||||
|
|
||||||
myOpenGameTimeoutMsgBoxImpl.reset(new timeoutMsgBoxImpl(this, mySession, 1));
|
myOpenGameTimeoutMsgBoxImpl->setMySession(mySession);
|
||||||
|
|
||||||
myOpenGameTimeoutMsgBoxImpl->show();
|
myOpenGameTimeoutMsgBoxImpl->show();
|
||||||
myOpenGameTimeoutMsgBoxImpl->raise();
|
myOpenGameTimeoutMsgBoxImpl->raise();
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
#include "timeoutmsgboximpl.h"
|
#include "timeoutmsgboximpl.h"
|
||||||
#include "session.h"
|
#include "session.h"
|
||||||
|
|
||||||
timeoutMsgBoxImpl::timeoutMsgBoxImpl(QDialog *parent, Session *s, int id)
|
timeoutMsgBoxImpl::timeoutMsgBoxImpl(QDialog *parent, int id)
|
||||||
: QMessageBox(parent), mySession(s), msgId(id)
|
: QMessageBox(parent), mySession(NULL), msgId(id)
|
||||||
{
|
{
|
||||||
okButton = this->addButton(QMessageBox::Ok);
|
okButton = this->addButton(QMessageBox::Ok);
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class timeoutMsgBoxImpl : public QMessageBox
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
timeoutMsgBoxImpl(QDialog*, Session*, int);
|
timeoutMsgBoxImpl(QDialog*, int);
|
||||||
|
|
||||||
~timeoutMsgBoxImpl();
|
~timeoutMsgBoxImpl();
|
||||||
|
|
||||||
@@ -35,6 +35,8 @@ public slots:
|
|||||||
void startTimeout();
|
void startTimeout();
|
||||||
void timerRefresh();
|
void timerRefresh();
|
||||||
|
|
||||||
|
void setMySession ( Session* theValue ) { mySession = theValue; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
QTimer *timeOutTimer;
|
QTimer *timeOutTimer;
|
||||||
|
|||||||
Reference in New Issue
Block a user