mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 20:19:57 +00:00
d03722b3f4
(cherry picked from commits5c79e7106f
,57353cdfff
,15723adb9a
,01a5196a92
,ed75563a94
,3839a2dcfd
,1fd16ba69c
,66283943c5
,ba8613a179
,5b8f4f3e92
,35b771b19e
,043eb224e2
,05fac2f67d
)
42 lines
833 B
C++
42 lines
833 B
C++
//
|
|
// Created by koncord on 03.05.17.
|
|
//
|
|
|
|
#ifndef OPENMW_PINGHELPER_HPP
|
|
#define OPENMW_PINGHELPER_HPP
|
|
|
|
#include <QObject>
|
|
#include <QAbstractTableModel>
|
|
#include <QThread>
|
|
#include "Types.hpp"
|
|
|
|
class PingUpdater;
|
|
|
|
class PingHelper : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
|
|
void Reset();
|
|
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
|