app/sources/brwidget.cpp

34 lines
674 B
C++
Raw Permalink Normal View History

#include "brwidget.h"
2020-10-31 15:16:06 +01:00
#include "brprovider.h"
2020-10-31 15:16:06 +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
{
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
}
BRWidget::BRFederation BRWidget::getFederation() const {
2020-10-31 15:16:06 +01:00
return this->federation;
}
BRProvider* BRWidget::getProvider() {
return this->provider;
}
int BRWidget::getId() const {
return this->id;
}