2020-11-15 14:48:12 +01:00
|
|
|
#include "brathlete.h"
|
2020-11-04 13:55:37 +01:00
|
|
|
|
|
|
|
BRAthlete::BRAthlete(BRProvider* provider, BRWidget::BRFederation federation, int id, BRAthleteData initialData) : BRWidget(provider, federation, id)
|
|
|
|
{
|
|
|
|
this->setData(initialData);
|
|
|
|
}
|
|
|
|
|
|
|
|
QString BRAthlete::getFirstName() {
|
|
|
|
return this->firstName;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString BRAthlete::getLastName() {
|
|
|
|
return this->lastName;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString BRAthlete::getCity() {
|
|
|
|
return this->city;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString BRAthlete::getFederation() {
|
|
|
|
return this->federation;
|
|
|
|
}
|
|
|
|
|
|
|
|
QUrl BRAthlete::getFederationUrl() {
|
|
|
|
return this->federationUrl;
|
|
|
|
}
|
|
|
|
|
|
|
|
int BRAthlete::getYearOfBirth() {
|
|
|
|
return this->yearOfBirth;
|
|
|
|
}
|
|
|
|
|
|
|
|
BRAthlete::BRAthleteGender BRAthlete::getGender() {
|
|
|
|
return this->gender;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString BRAthlete::getNation() {
|
|
|
|
return this->nation;
|
|
|
|
}
|
|
|
|
|
|
|
|
int BRAthlete::getAge() {
|
|
|
|
return this->age;
|
|
|
|
}
|
|
|
|
|
|
|
|
void BRAthlete::setData(BRAthleteData data) {
|
|
|
|
this->firstName = data.firstName;
|
|
|
|
this->lastName = data.lastName;
|
|
|
|
this->city = data.city;
|
|
|
|
this->federation = data.federation;
|
|
|
|
this->federationUrl = data.federationUrl;
|
|
|
|
this->yearOfBirth = data.yearOfBirth;
|
|
|
|
this->gender = data.gender;
|
|
|
|
this->nation = data.nation;
|
|
|
|
this->age = data.age;
|
|
|
|
emit this->metadataChanged();
|
|
|
|
}
|
|
|
|
|
|
|
|
BRWidget::BRWidgetStatusCode BRAthlete::load() {
|
|
|
|
|
|
|
|
BRAthleteData newData {
|
|
|
|
this,
|
|
|
|
|
|
|
|
this->firstName,
|
|
|
|
this->lastName,
|
|
|
|
this->city,
|
|
|
|
this->federation,
|
|
|
|
this->federationUrl,
|
|
|
|
this->yearOfBirth,
|
|
|
|
this->gender,
|
|
|
|
this->nation,
|
|
|
|
this->age,
|
|
|
|
};
|
|
|
|
}
|