44 lines
998 B
C++
44 lines
998 B
C++
#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);
|
|
}
|
|
|
|
BRRound::BRRoundData BRRound::getData() {
|
|
BRRound::BRRoundData data {
|
|
this,
|
|
this->name,
|
|
this->results
|
|
};
|
|
|
|
return data;
|
|
}
|
|
|
|
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();
|
|
}
|
|
}
|