From db9be0a9d6195bc52415ce28d605ace149d02782 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 22 May 2015 13:03:25 +0200 Subject: Add left, right, top and bottom properties to basic QML rect type. Task-number: QTBUG-45528 Task-number: QTBUG-45530 Change-Id: I83c4056b4bde37ef2dc4424ffddd823c1654d92e Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlvaluetype_p.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/qml/qml/qqmlvaluetype_p.h') diff --git a/src/qml/qml/qqmlvaluetype_p.h b/src/qml/qml/qqmlvaluetype_p.h index be453ae35a..2c02cc0aa1 100644 --- a/src/qml/qml/qqmlvaluetype_p.h +++ b/src/qml/qml/qqmlvaluetype_p.h @@ -153,6 +153,10 @@ struct QQmlRectFValueType Q_PROPERTY(qreal y READ y WRITE setY FINAL) Q_PROPERTY(qreal width READ width WRITE setWidth FINAL) Q_PROPERTY(qreal height READ height WRITE setHeight FINAL) + Q_PROPERTY(qreal left READ left DESIGNABLE false FINAL) + Q_PROPERTY(qreal right READ right DESIGNABLE false FINAL) + Q_PROPERTY(qreal top READ top DESIGNABLE false FINAL) + Q_PROPERTY(qreal bottom READ bottom DESIGNABLE false FINAL) Q_GADGET public: Q_INVOKABLE QString toString() const; @@ -165,6 +169,11 @@ public: qreal height() const; void setWidth(qreal); void setHeight(qreal); + + qreal left() const; + qreal right() const; + qreal top() const; + qreal bottom() const; }; struct QQmlRectValueType @@ -174,6 +183,10 @@ struct QQmlRectValueType Q_PROPERTY(int y READ y WRITE setY FINAL) Q_PROPERTY(int width READ width WRITE setWidth FINAL) Q_PROPERTY(int height READ height WRITE setHeight FINAL) + Q_PROPERTY(int left READ left DESIGNABLE false FINAL) + Q_PROPERTY(int right READ right DESIGNABLE false FINAL) + Q_PROPERTY(int top READ top DESIGNABLE false FINAL) + Q_PROPERTY(int bottom READ bottom DESIGNABLE false FINAL) Q_GADGET public: int x() const; @@ -185,6 +198,11 @@ public: int height() const; void setWidth(int); void setHeight(int); + + int left() const; + int right() const; + int top() const; + int bottom() const; }; struct QQmlEasingValueType -- cgit v1.2.3