OSDN Git Service

QmlDesigner.NodeInstances: Add sgitem getter to the server node instance
authorMarco Bubke <marco.bubke@nokia.com>
Wed, 31 Aug 2011 16:20:25 +0000 (18:20 +0200)
committerMarco Bubke <marco.bubke@nokia.com>
Wed, 31 Aug 2011 16:49:26 +0000 (18:49 +0200)
Change-Id: I58baee2a8e59f2cef8add0472a3ee0c2a13fd59a
Reviewed-on: http://codereview.qt.nokia.com/4005
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
share/qtcreator/qml/qmlpuppet/instances/servernodeinstance.cpp
share/qtcreator/qml/qmlpuppet/instances/servernodeinstance.h

index 5f47318..2d89690 100644 (file)
@@ -548,6 +548,11 @@ QObject *ServerNodeInstance::internalObject() const
     return m_nodeInstance->object();
 }
 
+QSGItem *ServerNodeInstance::internalSGItem() const
+{
+    return qobject_cast<QSGItem*>(internalObject());
+}
+
 void ServerNodeInstance::activateState()
 {
     m_nodeInstance->activateState();
index 4e722ee..1037334 100644 (file)
@@ -46,6 +46,7 @@ class QStyleOptionGraphicsItem;
 class QDeclarativeContext;
 class QGraphicsItem;
 class QGraphicsTransform;
+class QSGItem;
 QT_END_NAMESPACE
 
 namespace QmlDesigner {
@@ -198,6 +199,7 @@ private: // functions
 
 
     QObject *internalObject() const; // should be not used outside of the nodeinstances!!!!
+    QSGItem *internalSGItem() const;
 
 private: // variables
     QSharedPointer<Internal::ObjectNodeInstance> m_nodeInstance;