void QmlModelView::modelAttached(Model *model) { m_state = QmlModelState(); ForwardView<NodeInstanceView>::modelAttached(model); m_state = baseState(); Q_ASSERT(m_state.isBaseState()); }
void StatesEditorView::instancesPreviewImageChanged(const QVector<ModelNode> &nodeList) { int minimumIndex = 10000; int maximumIndex = -1; foreach(const ModelNode &node, nodeList) { if (node.isRootNode()) { minimumIndex = qMin(minimumIndex, 0); maximumIndex = qMax(maximumIndex, 0); } else { int index = rootStateGroup().allStates().indexOf(QmlModelState(node)) + 1; if (index > 0) { minimumIndex = qMin(minimumIndex, index); maximumIndex = qMax(maximumIndex, index); } } } if (maximumIndex >= 0) m_statesEditorModel->updateState(minimumIndex, maximumIndex); }
void QmlModelView::modelAboutToBeDetached(Model *model) { ForwardView<NodeInstanceView>::modelAboutToBeDetached(model); m_state = QmlModelState(); }
QmlModelState QmlModelView::currentState() const { return QmlModelState(actualStateNode()); }
QmlModelState AbstractView::currentState() const { return QmlModelState(currentStateNode()); }