Cavoke  1.1.0
A Platform for creating and hosting multiplayer turn-based board games
Loading...
Searching...
No Matches
cavokeqmlgamemodel.h
1#ifndef CAVOKEQMLGAMEMODEL_H
2#define CAVOKEQMLGAMEMODEL_H
3
4#include <QDebug>
5#include <QObject>
6#include <QUrl>
7#include <QtCore/QUuid>
8#include <QtQuick/QtQuick>
9
10class CavokeQmlGameModel : public QObject {
11 Q_OBJECT
12
13public:
14 explicit CavokeQmlGameModel(QUrl qmlPath, QObject *parent = nullptr);
15
16public slots:
17 void getMoveFromQml(const QString &jsonMove);
18 void getUpdateFromNetwork(const QString &jsonUpdate);
19 void getClosingFromQml(QQuickCloseEvent *close);
20
21signals:
22 void receiveUpdate(QString jsonUpdate);
23 void sendMoveToNetwork(const QString &jsonMove);
24 void closingQml();
25
26public:
27 QUrl qmlPath;
28};
29
30#endif // CAVOKEQMLGAMEMODEL_H