void QmlModelView::customNotification(const AbstractView * /* view */, const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> & /* data */) { if (debug) qDebug() << this << __FUNCTION__ << identifier << nodeList; if (identifier == "__state changed__") { QmlModelState state(nodeList.first()); if (state.isValid()) { activateState(state); } else { activateState(baseState()); } } }
void NodeInstanceView::modelAttached(Model *model) { AbstractView::modelAttached(model); m_nodeInstanceServer = new NodeInstanceServerProxy(this, m_runModus, m_currentKit); m_lastCrashTime.start(); connect(m_nodeInstanceServer.data(), SIGNAL(processCrashed()), this, SLOT(handleChrash())); if (!isSkippedRootNode(rootModelNode())) nodeInstanceServer()->createScene(createCreateSceneCommand()); ModelNode stateNode = currentStateNode(); if (stateNode.isValid() && stateNode.metaInfo().isSubclassOf("QtQuick.State", 1, 0)) { NodeInstance newStateInstance = instanceForModelNode(stateNode); activateState(newStateInstance); } }
void NodeInstanceView::restartProcess() { if (m_restartProcessTimerId) killTimer(m_restartProcessTimerId); if (model()) { delete nodeInstanceServer(); m_nodeInstanceServer = new NodeInstanceServerProxy(this, m_runModus, m_currentKit); connect(m_nodeInstanceServer.data(), SIGNAL(processCrashed()), this, SLOT(handleChrash())); if (!isSkippedRootNode(rootModelNode())) nodeInstanceServer()->createScene(createCreateSceneCommand()); ModelNode stateNode = currentStateNode(); if (stateNode.isValid() && stateNode.metaInfo().isSubclassOf("QtQuick.State", 1, 0)) { NodeInstance newStateInstance = instanceForModelNode(stateNode); activateState(newStateInstance); } } m_restartProcessTimerId = 0; }