2008-03-03 10:27:36 +00:00
|
|
|
//
|
|
|
|
|
// C++ Interface: opengametimeoutmsgboximpl
|
|
|
|
|
//
|
|
|
|
|
// Description:
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// Author: Felix Hammer <f.hammer@web.de>, (C) 2008
|
|
|
|
|
//
|
|
|
|
|
// Copyright: See COPYING file that comes with this distribution
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
#ifndef TIMEOUTMSGBOXIMPL_H
|
|
|
|
|
#define TIMEOUTMSGBOXIMPL_H
|
|
|
|
|
|
|
|
|
|
#include <QMessageBox>
|
|
|
|
|
#include <QtGui>
|
|
|
|
|
#include <QtCore>
|
|
|
|
|
#include <core/boost/timers.hpp>
|
2008-03-03 23:31:20 +00:00
|
|
|
#include "game_defs.h"
|
2008-03-03 10:27:36 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@author Felix Hammer <f.hammer@web.de>
|
|
|
|
|
*/
|
|
|
|
|
class Session;
|
|
|
|
|
|
|
|
|
|
class timeoutMsgBoxImpl : public QMessageBox
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2008-03-03 23:31:20 +00:00
|
|
|
timeoutMsgBoxImpl(QMainWindow*);
|
2008-03-03 10:27:36 +00:00
|
|
|
|
|
|
|
|
~timeoutMsgBoxImpl();
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
void startTimeout();
|
|
|
|
|
void timerRefresh();
|
2008-03-03 23:31:20 +00:00
|
|
|
void stopTimeout();
|
2008-03-03 10:27:36 +00:00
|
|
|
|
2008-03-03 23:31:20 +00:00
|
|
|
void setMySession ( boost::shared_ptr<Session> theValue ) { mySession = theValue; }
|
2008-03-04 14:52:29 +00:00
|
|
|
void setMsgID ( NetTimeoutReason theValue ) { msgID = theValue; }
|
2008-03-03 23:43:51 +00:00
|
|
|
void setTimeoutDuration ( int theValue ) { timeoutDuration = theValue; }
|
|
|
|
|
|
2008-03-03 10:27:36 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
QTimer *timeOutTimer;
|
|
|
|
|
QPushButton *okButton;
|
2008-03-03 23:31:20 +00:00
|
|
|
boost::shared_ptr<Session> mySession;
|
2008-03-04 14:52:29 +00:00
|
|
|
NetTimeoutReason msgID;
|
2008-03-03 23:43:51 +00:00
|
|
|
int timeoutDuration;
|
2008-03-03 10:27:36 +00:00
|
|
|
boost::timers::portable::microsec_timer realTimer;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|