forked from qt-creator/qt-creator
QmlDesigner: Add NodeInstanceServer::allGroupStateInstances()
Change-Id: I26b20976746c3790d679a63db209fb535eb58382 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -1061,6 +1061,21 @@ ServerNodeInstance NodeInstanceServer::rootNodeInstance() const
|
|||||||
return m_rootNodeInstance;
|
return m_rootNodeInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<ServerNodeInstance> NodeInstanceServer::allGroupStateInstances() const
|
||||||
|
{
|
||||||
|
QList<ServerNodeInstance> groups;
|
||||||
|
std::copy_if(nodeInstances().cbegin(),
|
||||||
|
nodeInstances().cend(),
|
||||||
|
std::back_inserter(groups),
|
||||||
|
[](const ServerNodeInstance &instance) {
|
||||||
|
return instance.isValid() && instance.internalObject()->metaObject()
|
||||||
|
&& instance.internalObject()->metaObject()->className()
|
||||||
|
== QByteArrayLiteral("QQuickStateGroup");
|
||||||
|
});
|
||||||
|
|
||||||
|
return groups;
|
||||||
|
}
|
||||||
|
|
||||||
void NodeInstanceServer::setStateInstance(const ServerNodeInstance &stateInstance)
|
void NodeInstanceServer::setStateInstance(const ServerNodeInstance &stateInstance)
|
||||||
{
|
{
|
||||||
m_activeStateInstance = stateInstance;
|
m_activeStateInstance = stateInstance;
|
||||||
|
@@ -200,6 +200,8 @@ public:
|
|||||||
|
|
||||||
ServerNodeInstance rootNodeInstance() const;
|
ServerNodeInstance rootNodeInstance() const;
|
||||||
|
|
||||||
|
QList<ServerNodeInstance> allGroupStateInstances() const;
|
||||||
|
|
||||||
void notifyPropertyChange(qint32 instanceid, const PropertyName &propertyName);
|
void notifyPropertyChange(qint32 instanceid, const PropertyName &propertyName);
|
||||||
|
|
||||||
QByteArray importCode() const;
|
QByteArray importCode() const;
|
||||||
|
Reference in New Issue
Block a user