summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2012-10-22 17:06:23 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-08 15:01:30 +0100
commit672e7c875e8680818e23d0aef98129d95eb7e91c (patch)
treeb0322db8df580418c59978f3b9d48f5486a41128 /src/gui/kernel/qwindow.h
parent9be15cc1dc277a2a015b7e00ef88cd25b105c24c (diff)
Remove QWindow pos, geometry and size as properties; pos->position
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 <samuel.rodal@digia.com>
Diffstat (limited to 'src/gui/kernel/qwindow.h')
-rw-r--r--src/gui/kernel/qwindow.h9
1 files changed, 3 insertions, 6 deletions
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)); }