app/sources/brcup.cpp

32 lines
717 B
C++
Raw Normal View History

2020-10-31 15:16:06 +01:00
#include "../headers/brcup.h"
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
}