app/headers/cup/brcup.h
Dorian Zedler 85c8760bed
- moved some stuff
- results work now (still basic)
2020-11-15 14:48:12 +01:00

42 lines
920 B
C++

#ifndef BRCUP_H
#define BRCUP_H
#include <QObject>
#include <QDebug>
#include "brwidget.h"
#include "brcategory.h"
class BRCup : public BRWidget
{
Q_OBJECT
Q_PROPERTY(QString name READ getName NOTIFY metadataChanged)
Q_PROPERTY(QList<QObject*> categories READ getCategoriesQML NOTIFY categoriesChanged)
public:
friend class BRProvider;
typedef struct {
const BRCup* cup;
QString name;
QList<BRCategory*> categories;
} BRCupData;
Q_INVOKABLE BRWidget::BRWidgetStatusCode load() override;
Q_INVOKABLE QString getName();
Q_INVOKABLE QList<QObject*> getCategoriesQML();
private:
BRCup(BRProvider* provider, BRWidget::BRFederation federation, int id, BRCupData initialData);
void setData(BRCupData data);
QString name;
QList<BRCategory*> categories;
signals:
void metadataChanged();
void categoriesChanged();
};
#endif // BRCUP_H