void AMListAction::startImplementation() { // if this was called by the base class, we know that we are in the Starting state. // no actions? That's easy... if(subActionCount() == 0) { notifyStarted(); notifySucceeded(); // done and done. return; } if(subActionMode() == SequentialMode) { emit currentSubActionChanged(currentSubActionIndex_ = 0); notifyStarted(); internalConnectAction(currentSubAction()); currentSubAction()->start(); } // parallel mode else { notifyStarted(); foreach(AMAction* action, subActions_) { internalConnectAction(action); } foreach(AMAction* action, subActions_) { action->start(); } }
void AMControlMoveAction::onMoveStarted() { disconnect(control_, SIGNAL(moveStarted()), this, SLOT(onMoveStarted())); disconnect(control_, SIGNAL(moveReTargetted()), this, SLOT(onMoveStarted())); // From now on, if we get a moveReTargetted() signal, this would be bad: someone is re-directing our move to a different setpoint, so this now counts as a failure. connect(control_, SIGNAL(moveReTargetted()), this, SLOT(onMoveReTargetted())); notifyStarted(); // start the progressTick timer connect(&progressTick_, SIGNAL(timeout()), this, SLOT(onProgressTick())); progressTick_.start(250); }
double DownloadTask::start() { log() << "DownloadTask starting"; notifyStarted(); checkConnectionCount(); return tick_duration_s; }