app/sources/cup/brcup.cpp

32 lines
706 B
C++
Raw Permalink Normal View History

#include "brcup.h"
2020-10-31 15:16:06 +01:00
BRCup::BRCup(BRProvider* provider, BRWidget::BRFederation federation, int id, BRCupData initialData) : BRWidget(provider, federation, id)
2020-10-31 15:16:06 +01:00
{
this->categories = {};
this->setData(initialData);
}
QString BRCup::getName() {
return this->name;
}
QList<QObject*> BRCup::getCategoriesQML() {
return this->listToQmlList(this->categories);
}
void BRCup::setData(BRCupData data) {
this->name = data.name;
emit this->metadataChanged();
if(this->categories != data.categories) {
this->categories.clear();
this->categories = data.categories;
emit this->categoriesChanged();
}
}
2020-10-31 15:16:06 +01:00
BRWidget::BRWidgetStatusCode BRCup::load() {
// TODO
2020-10-31 15:16:06 +01:00
}