From 26e2ebf66b54cdd3e3da4b1df767c453d0dddadb Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 6 Nov 2012 23:57:20 +0100 Subject: [PATCH] Temporary backwards-compatibility window properties MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit These are intended to exist only during the integration of patch Ie4424ec15fbdef6b29b137f90a2ae33f173edd21, so that it will be possible to build the other modules. Then it will be reverted after the property renaming is propagated to all the other modules. Change-Id: I8d0c0774e685a728a98e8c866d95c606c927ff46 Reviewed-by: Friedemann Kleint Reviewed-by: Samuel Rødal --- src/gui/kernel/qwindow.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 1413d3d..3b11a87 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -116,6 +116,35 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged) Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation WRITE reportContentOrientationChange NOTIFY contentOrientationChanged) + // ------------------------------------------------------------------------ + // Temporary backwards-compatibility properties to be removed ASAP + Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle) + Q_PROPERTY(QString windowFilePath READ windowFilePath WRITE setWindowFilePath) + Q_PROPERTY(QIcon windowIcon READ windowIcon WRITE setWindowIcon) + Q_PROPERTY(Qt::WindowModality windowModality READ windowModality WRITE setWindowModality NOTIFY windowModalityChanged) + +public: + + Qt::WindowModality windowModality() const { return modality(); } + void setWindowModality(Qt::WindowModality wm) { setModality(wm); } + void setWindowFlags(Qt::WindowFlags f) { setFlags(f); } + Qt::WindowFlags windowFlags() const { return flags(); } + Qt::WindowType windowType() const { return type(); } + QString windowTitle() const { return title(); } + void requestActivateWindow() { requestActivate(); } + bool requestWindowOrientation(Qt::ScreenOrientation o) { return requestOrientation(o); } + Qt::ScreenOrientation windowOrientation() const { return orientation(); } + void setWindowFilePath(const QString &fp) { setFilePath(fp); } + QString windowFilePath() const { return filePath(); } + void setWindowIcon(const QIcon &i) { setIcon(i); } + QIcon windowIcon() const { return icon(); } + void setWindowTitle(const QString &t) { setTitle(t); } + +Q_SIGNALS: + void windowModalityChanged(Qt::WindowModality windowModality); + // End of temporary backwards-compatibility properties + // ------------------------------------------------------------------------ + public: explicit QWindow(QScreen *screen = 0); -- 2.7.4