app/headers/serverconn.h
Dorian Zedler ec4f8a1de5 - initial commit:
- basic functionality implemented
2019-04-20 22:57:40 +02:00

37 lines
772 B
C++

#ifndef SERVERCONN_H
#define SERVERCONN_H
#include <QObject>
#include <QtNetwork>
#include <QEventLoop>
#include <QTimer>
#include <QUrl>
class ServerConn : public QObject
{
Q_OBJECT
Q_PROPERTY(QVariant foodplan READ getFoodplan NOTIFY foodplanChanged)
public:
explicit ServerConn(QObject *parent = nullptr);
private:
QVariantMap senddata(QUrl serviceUrl, QUrlQuery pdata = QUrlQuery());
// variables
QVariant foodplan;
signals:
void foodplanChanged();
public slots:
void refreshFoodplan();
QVariant getCalendar(QString nation);
QVariant getRanking(int competitionId, int categoryId, bool registrationData = false, const int routeNumber = -2);
// functions for qml
QVariant getFoodplan();
};
#endif // SERVERCONN_H