app/sources/competition/result/brresultdetails.cpp

43 lines
1 KiB
C++
Raw Permalink Normal View History

#include "brresultdetails.h"
BRResultDetails::BRResultDetails(BRResultDetailsType type) : BRWidget(nullptr, BRWidget::UnknownFederation, -1)
{
this->type = type;
}
QString BRResultDetails::string() {
return this->toString();
}
BRResultDetails::BRResultDetailsType BRResultDetails::getType() {
return this->type;
}
BRResult* BRResultDetails::getResult() {
return this->result;
}
BRWidget::BRDiscipline BRResultDetails::getDiscipline() {
switch (this->type) {
case GeneralResult:
return BRWidget::AllDisciplines;
case SpeedQualificationResult:
case SpeedFinalResult:
return BRWidget::Speed;
case LeadResult:
return BRWidget::Lead;
case BoulderResult:
return BRWidget::Boulder;
case CombinedResult:
return BRWidget::Combined;
case UnknownResultType:
return BRWidget::AllDisciplines;
default:
return BRWidget::UnknownDiscipline;
}
}
BRWidget::BRWidgetStatusCode BRResultDetails::load() {
return BRWidget::OpeationNotSupportedError;
}