diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2013-03-12 10:53:48 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-03 10:15:40 +0200 |
commit | 85ea2c02992660bc559736462bb2d99d03ccd681 (patch) | |
tree | 9ef34d2f8bc02675717e0438112e02d7e75ebf36 /src/gui/kernel/qevent.cpp | |
parent | 15fca980e947b13069e85b51c9cd2240eb3c5fa5 (diff) |
ApplicationState: Add new event class: ApplicationStateChangeEvent
This patch will follow up on e27ca37 (add more state to
QT::ApplicationState), and add a new event class
QApplicationStateChangeEvent with type Qt::ApplicationStateChange.
Change-Id: Idee724f181f1fbb2321ddad7e0df00c88b3488b1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/gui/kernel/qevent.cpp')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index f7b7410278..4f1f7d838f 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -4400,4 +4400,21 @@ Qt::ScreenOrientation QScreenOrientationChangeEvent::orientation() const return m_orientation; } +/*! + Creates a new QApplicationStateChangeEvent. + \a applicationState is the new state. +*/ +QApplicationStateChangeEvent::QApplicationStateChangeEvent(Qt::ApplicationState applicationState) + : QEvent(QEvent::ApplicationStateChange), m_applicationState(applicationState) +{ +} + +/*! + Returns the state of the application. +*/ +Qt::ApplicationState QApplicationStateChangeEvent::applicationState() const +{ + return m_applicationState; +} + QT_END_NAMESPACE |