1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00
openmw-tes3mp/apps/browser/QueryHelper.hpp

47 lines
904 B
C++
Raw Permalink Normal View History

//
// Created by koncord on 27.05.17.
//
#ifndef OPENMW_QUERYHELPER_HPP
#define OPENMW_QUERYHELPER_HPP
#include <QObject>
2017-05-27 05:08:52 +00:00
#include <vector>
#include <QAbstractItemModel>
2017-05-27 05:08:52 +00:00
#include <components/openmw-mp/Master/MasterData.hpp>
Q_DECLARE_METATYPE(QueryData)
class QueryHelper : public QObject
{
Q_OBJECT
public:
explicit QueryHelper(QAbstractItemModel *model);
public slots:
void refresh();
void terminate();
2017-05-27 05:08:52 +00:00
private slots:
2017-10-09 23:17:41 +00:00
void update(const QString &addr, unsigned short port, const QueryData& data);
signals:
void finished();
void started();
private:
QThread *queryThread;
2017-05-27 05:08:52 +00:00
QAbstractItemModel *_model;
};
class QueryUpdate : public QObject
{
friend class QueryHelper;
Q_OBJECT
signals:
void finished();
2017-10-09 23:17:41 +00:00
void updateModel(const QString &addr, unsigned short port, const QueryData& data);
public slots:
void process();
};
#endif //OPENMW_QUERYHELPER_HPP