virtual bool setState(int state) { if (!closeState(state)) { Logger::writeLog(ERROR, "StateMachine::setState(): could not close current state"); return false; } else if (!openState(state)) { Logger::writeLog(ERROR, "StateMachine::setState(): could not open next state"); return false; } else { currentState = state; return true; } }
void nodeDock::added() { connect( app(), SIGNAL(entityAdded(AEntity*)), this, SLOT(centreNode(AEntity*)) ); connect( app(), SIGNAL(entityRemoved(AEntity*)), this, SLOT(removeNode(AEntity*)) ); connect( app(), SIGNAL(entityRemoved(AEntity*)), this, SLOT(entityRemoved(AEntity*)) ); connect( app(), SIGNAL(selectionChanged()), this, SLOT(appSelectionChanged()) ); connect( app(), SIGNAL(insertState()), this, SLOT(rebuildGui()) ); connect( app(), SIGNAL(cleanState()), this, SLOT(rebuildGui()) ); connect( app(), SIGNAL(openState()), this, SLOT(rebuildGui()) ); connect( app(), SIGNAL(workingPathChanged()), this, SLOT(rebuildGui()) ); mView->setApp(app()); mScene->addItem( new propertiesWidget( app(), mView ) ); qRegisterMetaType<AEntityLocation>(); directoryListing *dir( new directoryListing( app(), mView ) ); mScene->addItem( dir ); connect( dir, SIGNAL(changeDirectory(AEntityLocation)), this, SLOT(changeDirectory(AEntityLocation)), Qt::QueuedConnection ); }