diff options
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index d43b37d080..94e8979ca5 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -516,9 +516,8 @@ void QWindow::setWindowTitle(const QString &title) { Q_D(QWindow); d->windowTitle = title; - if (d->platformWindow) { + if (d->platformWindow) d->platformWindow->setWindowTitle(title); - } } QString QWindow::windowTitle() const @@ -528,6 +527,26 @@ QString QWindow::windowTitle() const } /*! + Sets the window icon to the given \a icon. + + The window icon might be used by the windowing system for example to decorate the window, + or in the task switcher. +*/ +void QWindow::setWindowIcon(const QIcon &icon) +{ + Q_D(QWindow); + d->windowIcon = icon; + if (d->platformWindow) + d->platformWindow->setWindowIcon(icon); +} + +QIcon QWindow::windowIcon() const +{ + Q_D(const QWindow); + return d->windowIcon; +} + +/*! Raise the window in the windowing system. Requests that the window be raised to appear above other windows. @@ -535,9 +554,8 @@ QString QWindow::windowTitle() const void QWindow::raise() { Q_D(QWindow); - if (d->platformWindow) { + if (d->platformWindow) d->platformWindow->raise(); - } } /*! @@ -548,9 +566,8 @@ void QWindow::raise() void QWindow::lower() { Q_D(QWindow); - if (d->platformWindow) { + if (d->platformWindow) d->platformWindow->lower(); - } } /*! @@ -1056,18 +1073,6 @@ void QWindow::resize(const QSize &newSize) } /*! - Sets the window icon to the given \a icon image. - - The window icon might be used by the windowing system for example to decorate the window, - or in the task switcher. -*/ -void QWindow::setWindowIcon(const QImage &icon) const -{ - Q_UNUSED(icon); - qDebug() << "unimplemented:" << __FILE__ << __LINE__; -} - -/*! Releases the native platform resources associated with this window. \sa create() |