#ifndef OBSERVERCLIENTMODEL_H #define OBSERVERCLIENTMODEL_H #include #include "UserInfo.h" #include "misc.h" #include "ClientSocket.h" #include "customtimer.h" class MainWindow; class TObserverClientModel : public QObject { Q_OBJECT public: explicit TObserverClientModel(QObject *parent = 0); MainWindow* MainWindowPtr; boost::shared_ptr ClientSocket; boost::asio::io_service IoService; boost::thread IoServiceThread; boost::mutex UpdatingMapMutex; std::vector UserInfoArr; std::vector AlarmUserInfoArr; CustomTimer Timer; int MapType; bool Connected; void Start(std::string address, std::string port); void Finish(); void OnSocketClosed(); void RestartHeartbeatTimer(); void RestartMapHeartbeatTimer(); void OnConnectButtonPressed(); void OnUpdateInfoButtonPressed(); void OnChangeMapTypeButtonPressed(); void OnAutorizationSent(); void OnHeartbeat(const boost::system::error_code& e); void OnMapHeartbeat(const boost::system::error_code& e); void DoRunIoService(); void OnUpdateMapTimer(); void OnReceiveMapUpdate(std::vector userInfoArr); void OnReceiveAlarmMapUpdate(std::vector userInfoArr); void OnChatSendClick(); void OnReceiveChatMessage(TUserInfo userInfo, std::string msg); void OnSendAlarmClick(); void OnKickPlayerClick(); void OnSelectPlayerClick(); boost::shared_ptr HeartbeatTimer; boost::shared_ptr MapHeartbeatTimer; boost::signal ReceiveCloseSignal; //signals: //public slots: }; #endif // OBSERVERCLIENTMODEL_H