app/sources/brround.cpp

45 lines
998 B
C++
Raw Normal View History

#include "../headers/brround.h"
#include "headers/brprovider.h"
BRRound::BRRound(BRProvider* provider, BRWidget::BRFederation federation, int id, BRRoundData initialData) : BRWidget(provider, federation, id)
{
this->setData(initialData);
}
BRCategory* BRRound::getCategory() const {
return this->category;
}
QString BRRound::getName() {
return this->name;
}
QList<QObject*> BRRound::getResultsQML() {
return this->listToQmlList(this->results);
}
2020-11-04 17:25:28 +01:00
BRRound::BRRoundData BRRound::getData() {
BRRound::BRRoundData data {
this,
2020-11-04 17:25:28 +01:00
this->name,
this->results
};
2020-11-04 17:25:28 +01:00
return data;
}
2020-11-04 17:25:28 +01:00
BRWidget::BRWidgetStatusCode BRRound::load() {
return BRWidget::OpeationNotSupportedError;
}
void BRRound::setData(BRRoundData data) {
this->name = data.name;
emit this->metadataChanged();
if(this->results != data.results) {
this->results.clear();
this->results = data.results;
emit this->resultsChanged();
}
}