コード例 #1
0
void ModelUavoProxy::receivePathPlan()
{
    PathPlan *pathPlan = PathPlan::GetInstance(objMngr, 0);

    connect(pathPlan, SIGNAL(transactionCompleted(UAVObject *, bool)), this, SLOT(pathPlanElementReceived(UAVObject *, bool)));

    Waypoint *waypoint = Waypoint::GetInstance(objMngr, 0);
    connect(waypoint, SIGNAL(transactionCompleted(UAVObject *, bool)), this, SLOT(pathPlanElementReceived(UAVObject *, bool)));

    PathAction *action = PathAction::GetInstance(objMngr, 0);
    connect(action, SIGNAL(transactionCompleted(UAVObject *, bool)), this, SLOT(pathPlanElementReceived(UAVObject *, bool)));

    // we will start 3 update requests
    completionCountdown = 3;
    successCountdown    = completionCountdown;

    pathPlan->requestUpdate();
    waypoint->requestUpdateAll();
    action->requestUpdateAll();
}