31 lines
721 B
C++
31 lines
721 B
C++
#include "../headers/brcup.h"
|
|
|
|
BRCup::BRCup(BRProvider* provider, BRWidget::BRFederation federation, int id, BRCupData initialData) : BRWidget(provider, federation), id(id)
|
|
{
|
|
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();
|
|
}
|
|
}
|
|
|
|
|
|
BRWidget::BRWidgetStatusCode BRCup::load() {
|
|
// TODO
|
|
}
|