From 8dc2f81c9f0e6eb8cab09e5d682358fd140b49b8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 4 Aug 2011 10:36:48 +0200 Subject: Add WindowStateChanged event. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not currently considering activation state. Change-Id: Iea9265d35536947b6cc85639bd9839e9fda69bdf Reviewed-on: http://codereview.qt.nokia.com/2609 Reviewed-by: Qt Sanity Bot Reviewed-by: Samuel Rødal --- src/gui/kernel/qwindowsysteminterface_qpa_p.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/gui/kernel/qwindowsysteminterface_qpa_p.h') 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 window; }; @@ -92,7 +93,7 @@ public: class EnterEvent : public WindowSystemEvent { public: - EnterEvent(QWindow *enter) + explicit EnterEvent(QWindow *enter) : WindowSystemEvent(Enter), enter(enter) { } QWeakPointer enter; @@ -100,7 +101,7 @@ public: class LeaveEvent : public WindowSystemEvent { public: - LeaveEvent(QWindow *leave) + explicit LeaveEvent(QWindow *leave) : WindowSystemEvent(Leave), leave(leave) { } QWeakPointer leave; @@ -108,12 +109,22 @@ public: class ActivatedWindowEvent : public WindowSystemEvent { public: - ActivatedWindowEvent(QWindow *activatedWindow) + explicit ActivatedWindowEvent(QWindow *activatedWindow) : WindowSystemEvent(ActivatedWindow), activated(activatedWindow) { } QWeakPointer activated; }; + class WindowStateChangedEvent : public WindowSystemEvent { + public: + WindowStateChangedEvent(QWindow *_window, Qt::WindowState _newState) + : WindowSystemEvent(WindowStateChanged), window(_window), newState(_newState) + { } + + QWeakPointer window; + Qt::WindowState newState; + }; + class UserEvent : public WindowSystemEvent { public: UserEvent(QWindow * w, ulong time, EventType t) -- cgit v1.2.3