// // Created by koncord on 03.05.17. // #ifndef OPENMW_PINGHELPER_HPP #define OPENMW_PINGHELPER_HPP #include #include #include #include "Types.hpp" class PingUpdater; class PingHelper : public QObject { Q_OBJECT public: void Add(int row, const AddrPair &addrPair); void Stop(); void SetModel(QAbstractTableModel *model); //void UpdateImmedialy(PingUpdater::AddrPair addrPair); static PingHelper &Get(); PingHelper(const PingHelper&) = delete; PingHelper& operator=(const PingHelper&) = delete; private: PingHelper(); signals: void stop(); public slots: void update(int row, unsigned ping); private: QThread *pingThread; PingUpdater *pingUpdater; QAbstractTableModel *model; }; #endif //OPENMW_PINGHELPER_HPP