コード例 #1
0
void ModelUavoProxy::sendPathPlan()
{
    modelToObjects();

    PathPlan *pathPlan = PathPlan::GetInstance(objMngr, 0);
    connect(pathPlan, SIGNAL(transactionCompleted(UAVObject *, bool)),
            this, SLOT(pathPlanElementSent(UAVObject *, bool)), Qt::UniqueConnection);

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

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

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

    pathPlan->updated();
    waypoint->updatedAll();
    action->updatedAll();
}