From: Michael Brasser Date: Fri, 9 Sep 2011 04:03:31 +0000 (+1000) Subject: Make state a public property of QSGItem. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=c08f82a5c847255dcbc49efd66972bf4d79cb636;p=konrad%2Fqtdeclarative.git Make state a public property of QSGItem. The property type is QString, so doesn't need to be private. Change-Id: If1d1a740be451331e8142fbe1d89fda2eeff4509 Reviewed-on: http://codereview.qt-project.org/4499 Reviewed-by: Qt Sanity Bot Reviewed-by: Charles Yin --- diff --git a/src/declarative/items/qsgitem.cpp b/src/declarative/items/qsgitem.cpp index fd1cf66..009e8cb 100644 --- a/src/declarative/items/qsgitem.cpp +++ b/src/declarative/items/qsgitem.cpp @@ -3181,6 +3181,18 @@ void QSGItemPrivate::setState(const QString &state) _states()->setState(state); } +QString QSGItem::state() const +{ + Q_D(const QSGItem); + return d->state(); +} + +void QSGItem::setState(const QString &state) +{ + Q_D(QSGItem); + d->setState(state); +} + QDeclarativeListProperty QSGItem::transform() { Q_D(QSGItem); diff --git a/src/declarative/items/qsgitem.h b/src/declarative/items/qsgitem.h index 9a540d7..3cbb7c2 100644 --- a/src/declarative/items/qsgitem.h +++ b/src/declarative/items/qsgitem.h @@ -118,7 +118,7 @@ class Q_DECLARATIVE_EXPORT QSGItem : public QObject, public QDeclarativeParserSt Q_PRIVATE_PROPERTY(QSGItem::d_func(), QDeclarativeListProperty states READ states DESIGNABLE false) Q_PRIVATE_PROPERTY(QSGItem::d_func(), QDeclarativeListProperty transitions READ transitions DESIGNABLE false) - Q_PRIVATE_PROPERTY(QSGItem::d_func(), QString state READ state WRITE setState NOTIFY stateChanged) + Q_PROPERTY(QString state READ state WRITE setState NOTIFY stateChanged) Q_PROPERTY(QRectF childrenRect READ childrenRect NOTIFY childrenRectChanged DESIGNABLE false FINAL) Q_PRIVATE_PROPERTY(QSGItem::d_func(), QSGAnchors * anchors READ anchors DESIGNABLE false CONSTANT FINAL) Q_PRIVATE_PROPERTY(QSGItem::d_func(), QSGAnchorLine left READ left CONSTANT FINAL) @@ -204,6 +204,9 @@ public: bool clip() const; void setClip(bool); + QString state() const; + void setState(const QString &); + qreal baselineOffset() const; void setBaselineOffset(qreal);