diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-08-04 10:36:48 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-08-05 10:41:43 +0200 |
commit | 8dc2f81c9f0e6eb8cab09e5d682358fd140b49b8 (patch) | |
tree | 3d6fcd59b6b9f943e1e464fbf2f395939ae051ea /src/gui/kernel/qwindowsysteminterface_qpa_p.h | |
parent | 7d07ca24882ec49045c33d3cc67457bba6f5f73d (diff) |
Add WindowStateChanged event.
Not currently considering activation state.
Change-Id: Iea9265d35536947b6cc85639bd9839e9fda69bdf
Reviewed-on: http://codereview.qt.nokia.com/2609
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface_qpa_p.h')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface_qpa_p.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa_p.h b/src/gui/kernel/qwindowsysteminterface_qpa_p.h index 912ac877fb..1e772eb2b8 100644 --- a/src/gui/kernel/qwindowsysteminterface_qpa_p.h +++ b/src/gui/kernel/qwindowsysteminterface_qpa_p.h @@ -55,6 +55,7 @@ public: Enter, Leave, ActivatedWindow, + WindowStateChanged, Mouse, Wheel, Key, @@ -69,14 +70,14 @@ public: class WindowSystemEvent { public: - WindowSystemEvent(EventType t) + explicit WindowSystemEvent(EventType t) : type(t) { } EventType type; }; class CloseEvent : public WindowSystemEvent { public: - CloseEvent(QWindow *w) + explicit CloseEvent(QWindow *w) : WindowSystemEvent(Close), window(w) { } QWeakPointer<QWindow> window; }; @@ -92,7 +93,7 @@ public: class EnterEvent : public WindowSystemEvent { public: - EnterEvent(QWindow *enter) + explicit EnterEvent(QWindow *enter) : WindowSystemEvent(Enter), enter(enter) { } QWeakPointer<QWindow> enter; @@ -100,7 +101,7 @@ public: class LeaveEvent : public WindowSystemEvent { public: - LeaveEvent(QWindow *leave) + explicit LeaveEvent(QWindow *leave) : WindowSystemEvent(Leave), leave(leave) { } QWeakPointer<QWindow> leave; @@ -108,12 +109,22 @@ public: class ActivatedWindowEvent : public WindowSystemEvent { public: - ActivatedWindowEvent(QWindow *activatedWindow) + explicit ActivatedWindowEvent(QWindow *activatedWindow) : WindowSystemEvent(ActivatedWindow), activated(activatedWindow) { } QWeakPointer<QWindow> activated; }; + class WindowStateChangedEvent : public WindowSystemEvent { + public: + WindowStateChangedEvent(QWindow *_window, Qt::WindowState _newState) + : WindowSystemEvent(WindowStateChanged), window(_window), newState(_newState) + { } + + QWeakPointer<QWindow> window; + Qt::WindowState newState; + }; + class UserEvent : public WindowSystemEvent { public: UserEvent(QWindow * w, ulong time, EventType t) |