diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-04-10 13:55:50 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-19 20:10:46 +0200 |
commit | da01deb0ac01b37656e021b9d5d696c5de7b0afb (patch) | |
tree | 6a689d5cddc689bc83c6a74c8dc5ef0f48359b64 /src/gui/kernel/qplatformwindow.cpp | |
parent | 926086b9e37d45d09d5ce7d632a07583b40a8f70 (diff) |
Implement alertion state for windows.
Add QWindow::alert() and QPlatformWindow::setAlertState().
Add logic to clear alertion state when the window becomes
active. The platform plugins then only need to implement a setter
and a cheap getter and need not handle activation.
Prototypically implement X11 and Windows.
Task-number: QTBUG-30416
Change-Id: Ia70c4722d812462a21f4034b7d52735c9f2bc49c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/gui/kernel/qplatformwindow.cpp')
-rw-r--r-- | src/gui/kernel/qplatformwindow.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp index bfb6ab5a68..1e8ac60cca 100644 --- a/src/gui/kernel/qplatformwindow.cpp +++ b/src/gui/kernel/qplatformwindow.cpp @@ -463,6 +463,32 @@ QString QPlatformWindow::formatWindowTitle(const QString &title, const QString & } /*! + Reimplement this method to set whether the window demands attention + (for example, by flashing the taskbar icon) depending on \a enabled. + + \sa isAlertState() + \since 5.1 +*/ + +void QPlatformWindow::setAlertState(bool enable) +{ + Q_UNUSED(enable) +} + +/*! + Reimplement this method return whether the window is in + an alert state. + + \sa setAlertState() + \since 5.1 +*/ + +bool QPlatformWindow::isAlertState() const +{ + return false; +} + +/*! Helper function to get initial geometry on windowing systems which do not do smart positioning and also do not provide a means of centering a transient window w.r.t. its parent. For example this is useful on Windows |