diff options
author | Corentin Jabot <corentinjabot@gmail.com> | 2012-05-17 10:35:32 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-24 20:20:52 +0200 |
commit | ce3d1a153aad353ad5e50b935bc1d1494cbbeeee (patch) | |
tree | 48ec8fa90c7aa9d3873b578d7f4668177b62e154 /src/gui/kernel/qwindow.h | |
parent | df7a1a28aaab315dc8ed5eb5bac6f4883e646613 (diff) |
Implement QWindow::setWindowIcon
Since QIcon has been moved back to QtGui, QWindow::setWindowIcon can
use it. That way, the api is exactly the same as in QWidgets and one
can deal properly with multi-sized icon.
I added a getter so the api is consistent with QWidget
(Maybe there should be properties for windowIcon and windowTitle)
Change-Id: I2f463dbe39673f41a3201ef8fed27b3fcac2125f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src/gui/kernel/qwindow.h')
-rw-r--r-- | src/gui/kernel/qwindow.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 629e462da0..9c70395d08 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -53,6 +53,8 @@ #include <QtGui/qsurfaceformat.h> #include <QtGui/qwindowdefs.h> +#include <QtGui/qicon.h> + #ifndef QT_NO_CURSOR #include <QtGui/qcursor.h> #endif @@ -89,6 +91,7 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface Q_DECLARE_PRIVATE(QWindow) Q_PROPERTY(QString windowTitle READ windowTitle WRITE setWindowTitle) + Q_PROPERTY(QIcon windowIcon READ windowIcon WRITE setWindowIcon) Q_PROPERTY(Qt::WindowModality windowModality READ windowModality WRITE setWindowModality NOTIFY windowModalityChanged) Q_PROPERTY(int x READ x WRITE setX NOTIFY xChanged) Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged) @@ -194,7 +197,8 @@ public: void resize(const QSize &newSize); inline void resize(int w, int h) { resize(QSize(w, h)); } - void setWindowIcon(const QImage &icon) const; + void setWindowIcon(const QIcon &icon); + QIcon windowIcon() const; void destroy(); |