summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-06-08 08:18:59 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-11 09:49:24 (GMT)
commit15366ae05397cdf322e0a34e729eb5db2bae9c2a (patch)
treea4d93bb38e566be3240c6dac4b63f3ffb4d1c53a /src/gui/graphicsview/qgraphicsitem.h
parentb3ff3392128c9c701b687887ef2c21b000209908 (diff)
downloadQt-15366ae05397cdf322e0a34e729eb5db2bae9c2a.zip
Qt-15366ae05397cdf322e0a34e729eb5db2bae9c2a.tar.gz
Qt-15366ae05397cdf322e0a34e729eb5db2bae9c2a.tar.bz2
add parent and id properties to QGraphicsObject
In addition added documentation for the other properties. Reviewed-by: Andreas
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.h')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index a69eced..6ea17c2 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -151,6 +151,7 @@ public:
QGraphicsItem *parentItem() const;
QGraphicsItem *topLevelItem() const;
+ QGraphicsObject *parentObject() const;
QGraphicsWidget *parentWidget() const;
QGraphicsWidget *topLevelWidget() const;
QGraphicsWidget *window() const;
@@ -494,10 +495,12 @@ inline QRectF QGraphicsItem::mapRectFromScene(qreal ax, qreal ay, qreal w, qreal
class Q_GUI_EXPORT QGraphicsObject : public QObject, public QGraphicsItem
{
Q_OBJECT
+ Q_PROPERTY(QGraphicsObject * parent READ parentObject WRITE setParentItem NOTIFY parentChanged DESIGNABLE false)
+ Q_PROPERTY(QString id READ objectName WRITE setObjectName)
Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
- Q_PROPERTY(QPointF pos READ pos WRITE setPos)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
+ Q_PROPERTY(QPointF pos READ pos WRITE setPos)
Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
Q_PROPERTY(qreal z READ zValue WRITE setZValue NOTIFY zChanged)
@@ -505,6 +508,7 @@ public:
QGraphicsObject(QGraphicsItem *parent = 0);
Q_SIGNALS:
+ void parentChanged();
void opacityChanged();
void visibleChanged();
void enabledChanged();