app/headers/serverconn.h
2019-04-21 18:35:28 +02:00

36 lines
782 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, int year);
QVariant getRanking(int competitionId, int categoryId, bool registrationData = false, const int routeNumber = -2);
// functions for qml
QVariant getFoodplan();
};
#endif // SERVERCONN_H