forked from qt-creator/qt-creator
QmlDesigner: Move QmlVisualNode::states to QmlObjectNode
This is required for StateGroup support. Change-Id: I25d8f94c2a0fa9140ce8af3032bc92a7b858b9d8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
@@ -131,6 +131,8 @@ public:
|
||||
QList<QmlModelState> allDefinedStates() const;
|
||||
QList<QmlModelStateOperation> allInvalidStateOperations() const;
|
||||
|
||||
QmlModelStateGroup states() const;
|
||||
|
||||
protected:
|
||||
NodeInstance nodeInstance() const;
|
||||
QmlObjectNode nodeForInstance(const NodeInstance &instance) const;
|
||||
|
@@ -71,7 +71,6 @@ public:
|
||||
static bool isValidQmlVisualNode(const ModelNode &modelNode);
|
||||
bool isRootNode() const;
|
||||
|
||||
QmlModelStateGroup states() const;
|
||||
QList<QmlVisualNode> children() const;
|
||||
QList<QmlObjectNode> resources() const;
|
||||
QList<QmlObjectNode> allDirectSubNodes() const;
|
||||
@@ -121,7 +120,7 @@ private:
|
||||
|
||||
class QMLDESIGNERCORE_EXPORT QmlModelStateGroup
|
||||
{
|
||||
friend class QmlVisualNode;
|
||||
friend class QmlObjectNode;
|
||||
friend class StatesEditorView;
|
||||
|
||||
public:
|
||||
|
@@ -582,6 +582,13 @@ QList<QmlModelStateOperation> QmlObjectNode::allInvalidStateOperations() const
|
||||
return result;
|
||||
}
|
||||
|
||||
QmlModelStateGroup QmlObjectNode::states() const
|
||||
{
|
||||
if (isValid())
|
||||
return QmlModelStateGroup(modelNode());
|
||||
else
|
||||
return QmlModelStateGroup();
|
||||
}
|
||||
|
||||
/*!
|
||||
Removes a variant property of the object specified by \a name from the
|
||||
|
@@ -191,14 +191,6 @@ void QmlVisualNode::initializePosition(const QmlVisualNode::Position &position)
|
||||
}
|
||||
}
|
||||
|
||||
QmlModelStateGroup QmlVisualNode::states() const
|
||||
{
|
||||
if (isValid())
|
||||
return QmlModelStateGroup(modelNode());
|
||||
else
|
||||
return QmlModelStateGroup();
|
||||
}
|
||||
|
||||
QmlObjectNode QmlVisualNode::createQmlObjectNode(AbstractView *view,
|
||||
const ItemLibraryEntry &itemLibraryEntry,
|
||||
const Position &position,
|
||||
|
Reference in New Issue
Block a user