app/sources/brwidget.cpp

34 lines
693 B
C++
Raw Normal View History

2020-10-31 15:16:06 +01:00
#include "../headers/brwidget.h"
#include "headers/brprovider.h"
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;
}