app/headers/serverconn.h

37 lines
782 B
C
Raw Normal View History

#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();
2019-04-21 18:35:28 +02:00
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