#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; void Start(std::string address, std::string port); void Finish(); void OnSocketClosed(); void RestartHeartbeatTimer(); void RestartMapHeartbeatTimer(); void OnConnectButtonPressed(); void OnUpdateInfoButtonPressed(); void OnChangeMapTypeButtonPressed(); void OnHeartbeat(const boost::system::error_code& e); void OnMapHeartbeat(const boost::system::error_code& e); void OnUpdateMapTimer(); void OnReceiveMapUpdate(std::vector userInfoArr); void OnReceiveAlarmMapUpdate(std::vector userInfoArr); void OnChatSendClick(); void OnReceiveChatMessage(TUserInfo userInfo, std::string msg); boost::shared_ptr HeartbeatTimer; boost::shared_ptr MapHeartbeatTimer; //signals: //public slots: }; #endif // OBSERVERCLIENTMODEL_H