2020-11-15 14:48:12 +01:00
|
|
|
#include "brwidget.h"
|
2020-10-31 15:16:06 +01:00
|
|
|
|
2020-11-15 14:48:12 +01:00
|
|
|
#include "brprovider.h"
|
2020-10-31 15:16:06 +01:00
|
|
|
|
2020-11-04 13:55:37 +01:00
|
|
|
BRWidget::BRWidget(BRProvider* provider, BRFederation federation, int id) : QObject(provider), provider(provider), federation(federation), id(id)
|
2020-10-31 15:16:06 +01:00
|
|
|
{
|
2020-11-05 19:37:13 +01:00
|
|
|
this->state = Unconfigured;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BRWidget::BRWidgetState BRWidget::getState() const {
|
|
|
|
return this->state;
|
|
|
|
}
|
|
|
|
|
|
|
|
void BRWidget::setState(BRWidgetState state) {
|
|
|
|
if(this->state == state)
|
|
|
|
return;
|
|
|
|
|
|
|
|
this->state = state;
|
|
|
|
emit this->stateChanged();
|
2020-10-31 15:16:06 +01:00
|
|
|
}
|
|
|
|
|
2020-11-03 15:56:43 +01:00
|
|
|
BRWidget::BRFederation BRWidget::getFederation() const {
|
2020-10-31 15:16:06 +01:00
|
|
|
return this->federation;
|
|
|
|
}
|
|
|
|
|
|
|
|
BRProvider* BRWidget::getProvider() {
|
|
|
|
return this->provider;
|
|
|
|
}
|
2020-11-04 13:55:37 +01:00
|
|
|
|
|
|
|
int BRWidget::getId() const {
|
|
|
|
return this->id;
|
|
|
|
}
|