#include "WimaVehicle.h"



WimaVehicle::WimaVehicle(QObject *parent):
    QObject                 (parent)
    ,_vehicle               (nullptr)
    ,_servicePolygon        (nullptr)
    ,_vehicleCorridor       (nullptr)
    ,_measurementPolygon    (nullptr)
{

}

void WimaVehicle::setVehicle(Vehicle *vehicle)
{
    if(vehicle != nullptr){
        _vehicle = vehicle;
    }else {
        qWarning("Not a valid vehicle!");
    }
}

void WimaVehicle::setServicePolygon(WimaServicePolygon *servicePolygon)
{
    if(servicePolygon != nullptr){
        _servicePolygon = servicePolygon;
    }else{
        qWarning("Not a valid service Polygon!");
    }
}

void WimaVehicle::setVehicleCorridor(WimaVehicleCorridor *vehicleCorridor)
{
    if(vehicleCorridor != nullptr){
        _vehicleCorridor = vehicleCorridor;
    }else{
        qWarning("Not a valid vehicle Corridor!");
    }
}

void WimaVehicle::setMeasurementPolygon(WimaVehicleMeasurementPolygon *measurementPolygon)
{
    if(measurementPolygon != nullptr){
        _measurementPolygon = measurementPolygon;
    }else{
        qWarning("Not a valid measurementPolygon!");
    }
}
