diff options
author | Michael Dominic K <mdk@codethink.co.uk> | 2010-11-17 09:55:09 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-11-17 10:41:54 (GMT) |
commit | 0091dcee679c8787f80bc2ed49f263c801779987 (patch) | |
tree | 65dc3e1f762f9f01d17c0ce8465fd6a5be12365e /tools/qmeegographicssystemhelper/qmeegoswitchevent.h | |
parent | b2a89cf4049e425553bfe74bcb1a52433e6a13c7 (diff) | |
download | Qt-0091dcee679c8787f80bc2ed49f263c801779987.zip Qt-0091dcee679c8787f80bc2ed49f263c801779987.tar.gz Qt-0091dcee679c8787f80bc2ed49f263c801779987.tar.bz2 |
Documentation update for new switching events.
Merge-request: 926
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tools/qmeegographicssystemhelper/qmeegoswitchevent.h')
-rw-r--r-- | tools/qmeegographicssystemhelper/qmeegoswitchevent.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tools/qmeegographicssystemhelper/qmeegoswitchevent.h b/tools/qmeegographicssystemhelper/qmeegoswitchevent.h index a67c6c4..2d8371e 100644 --- a/tools/qmeegographicssystemhelper/qmeegoswitchevent.h +++ b/tools/qmeegographicssystemhelper/qmeegoswitchevent.h @@ -42,22 +42,46 @@ #include <QEvent> #include <QString> +//! A custom event representing a graphics system switch. +/*! + This event is sent two times -- before the actual switch and after the switch. + The current mode of the event can be detected by looking at the State of the + event. + + The end-user application can use the event to drop it's own allocated GL resources + when going to software mode. +*/ + class QMeeGoSwitchEvent : public QEvent { public: + + //! The state represented by this event. enum State { WillSwitch, DidSwitch }; + //! The event type id to use to detect this event. enum Type { SwitchEvent = QEvent::User + 1024 }; + //! Constructor for the event. + /*! + Creates a new event with the given name and the given state. + */ QMeeGoSwitchEvent(const QString &graphicsSystemName, State s); + + //! Returns the name of the target graphics system. + /*! + Depending on the state, the name represents the system we're about to swtich to, + or the system we just switched to. + */ QString graphicsSystemName() const; - State state() const; + //! Returns the state represented by this event. + State state() const; private: QString name; |