WimaVehicle.cc 1.05 KB
Newer Older
1 2
#include "WimaVehicle.h"

3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


WimaVehicle::WimaVehicle(QObject *parent):
    QObject                 (parent)
    ,_vehicle               (nullptr)
    ,_serviceArea           (nullptr)
    ,_vehicleCorridor       (nullptr)
    ,_operationArea         (nullptr)
{

}

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

void WimaVehicle::setServiceArea(WimaServiceArea *servicePolygon)
25
{
26 27 28 29 30 31
    if(servicePolygon != nullptr){
        _serviceArea = servicePolygon;
    }else{
        qWarning("Not a valid service Polygon!");
    }
}
32

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
void WimaVehicle::setVCorridor(WimaVCorridor *vehicleCorridor)
{
    if(vehicleCorridor != nullptr){
        _vehicleCorridor = vehicleCorridor;
    }else{
        qWarning("Not a valid vehicle Corridor!");
    }
}

void WimaVehicle::setOperationArea(WimaGOperationArea *operationArea)
{
    if(operationArea != nullptr){
        _operationArea = operationArea;
    }else{
        qWarning("Not a valid measurementPolygon!");
    }
49
}