#include "WimaBridge.h"
#include "WimaController.h"

WimaBridge::WimaBridge(QObject *parent)
    :   QObject     (parent)
{

}

WimaController *WimaBridge::wimaController()
{
    return _wimaController;
}

WimaPlaner *WimaBridge::wimaPlaner()
{
    return _wimaPlaner;
}

WimaBridge *WimaBridge::thisPointer()
{
    return this;
}

void WimaBridge::setWimaController(WimaController *controller)
{
    if (_wimaController != controller){
        _wimaController = controller;

        emit wimaControllerChanged(_wimaController);
    }
}

void WimaBridge::setWimaPlaner(WimaPlaner *planer)
{
    if (_wimaPlaner != planer){
        _wimaPlaner = planer;

        emit wimaPlanerChanged(_wimaPlaner);
    }

}

bool WimaBridge::setWimaPlanData(const WimaPlanData &planData)
{
    if ( _wimaController != nullptr) {
        return _wimaController->setWimaPlanData(planData);
    }
    return false;
}




