This repository has been archived on 2024-06-03. You can view files and clone it, but cannot push or open issues or pull requests.
app/headers/scstwappbackend.h

43 lines
1,023 B
C
Raw Permalink Normal View History

#ifndef SCSTWAPPBACKEND_H
#define SCSTWAPPBACKEND_H
#include <QObject>
#include <scstwclient.h>
#include <scstwrace.h>
#include <ScStw.hpp>
2020-10-02 19:58:25 +02:00
#include <scstwremoterace.h>
2020-07-06 15:04:02 +02:00
#include "headers/scstwappsettings.h"
2020-04-19 13:09:46 +02:00
class ScStwAppBackend : public QObject
{
Q_OBJECT
Q_PROPERTY(ScStwClient *scStwClient READ getScStwClient WRITE setScStwClient NOTIFY scStwClientChanged)
public:
explicit ScStwAppBackend(QObject *parent = nullptr);
private:
ScStwClient * scStwClient;
public slots:
// functions for qml
2020-04-19 13:09:46 +02:00
Q_INVOKABLE ScStwClient *getScStwClient();
Q_INVOKABLE void setScStwClient(ScStwClient *client);
// athlete management
Q_INVOKABLE QVariant getAthletes();
Q_INVOKABLE bool createAthlete( QString userName, QString fullName );
Q_INVOKABLE bool deleteAthlete( QString userName );
Q_INVOKABLE bool selectAthlete( QString userName, int timerId );
Q_INVOKABLE QVariant getResults( QString userName );
signals:
2020-04-19 13:09:46 +02:00
void scStwClientChanged();
};
#endif // SCSTWAPPBACKEND_H