From 672e7c875e8680818e23d0aef98129d95eb7e91c Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 22 Oct 2012 17:06:23 +0200 Subject: Remove QWindow pos, geometry and size as properties; pos->position MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Abbreviated properties are to be avoided. But all 3 of these properties are redundant from the QML perspective; and because QRect, QPoint and QSize are (wisely) not QObjects, it's not possible to bind to _their_ properties, which make these QWindow properties less useful than users might assume that they are. Change-Id: I19c00b54b1d2712f9418e8bcf56e35a8008b89ef Reviewed-by: Samuel Rødal --- src/gui/kernel/qwindow.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/gui/kernel/qwindow.h') diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 3b11a87359..1d5a134f6d 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -106,9 +106,6 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged) Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged) Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged) - Q_PROPERTY(QPoint pos READ pos WRITE setPos) - Q_PROPERTY(QSize size READ size WRITE resize) - Q_PROPERTY(QRect geometry READ geometry WRITE setGeometry) Q_PROPERTY(int minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged) Q_PROPERTY(int minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged) Q_PROPERTY(int maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged) @@ -236,10 +233,10 @@ public: inline int y() const { return geometry().y(); } inline QSize size() const { return geometry().size(); } - inline QPoint pos() const { return geometry().topLeft(); } + inline QPoint position() const { return geometry().topLeft(); } - inline void setPos(const QPoint &pt) { setGeometry(QRect(pt, size())); } - inline void setPos(int posx, int posy) { setPos(QPoint(posx, posy)); } + inline void setPosition(const QPoint &pt) { setGeometry(QRect(pt, size())); } + inline void setPosition(int posx, int posy) { setPosition(QPoint(posx, posy)); } void resize(const QSize &newSize); inline void resize(int w, int h) { resize(QSize(w, h)); } -- cgit v1.2.3