2020-10-31 15:16:06 +01:00
|
|
|
#include "../headers/brcup.h"
|
|
|
|
|
2020-11-04 13:55:37 +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
|
|
|
{
|
2020-11-03 15:56:43 +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
|
|
|
|
2020-11-03 15:56:43 +01:00
|
|
|
BRWidget::BRWidgetStatusCode BRCup::load() {
|
|
|
|
// TODO
|
2020-10-31 15:16:06 +01:00
|
|
|
}
|