diff options
author | Kevin Krammer <kevin.krammer.qnx@kdab.com> | 2012-04-10 11:26:12 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-12 15:00:33 +0200 |
commit | 4fac40f8b0e7b2a6f5f41eb82196e8b197bc851a (patch) | |
tree | 756147e942b5cf20c45cdeb2ad62ec0b63e618e1 /src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h | |
parent | 28675642f3445e41434b004c2a1a1d96ec0145a2 (diff) |
Refactor navigator event handling
Separate PPS based navigator event notification handling and implementation
of the actual event handling.
Like the similar refactoring for screen events, this will allow to reuse the
same event handler class for BPS driven event processing.
Change-Id: I29d4a082cb01ff7943b7822ea9aa8ad622fda593
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h index 8084eba1d9..58a1ac8cb3 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h @@ -1,6 +1,6 @@ /*************************************************************************** ** -** Copyright (C) 2011 - 2012 Research In Motion +** Copyright (C) 2012 Research In Motion ** Contact: http://www.qt-project.org/ ** ** This file is part of the plugins of the Qt Toolkit. @@ -46,31 +46,19 @@ QT_BEGIN_NAMESPACE -class QSocketNotifier; - class QQnxNavigatorEventHandler : public QObject { Q_OBJECT public: explicit QQnxNavigatorEventHandler(QObject *parent = 0); - ~QQnxNavigatorEventHandler(); + + bool handleOrientationCheck(int angle); + void handleOrientationChange(int angle); + void handleSwipeDown(); + void handleExit(); Q_SIGNALS: void rotationChanged(int angle); - -public Q_SLOTS: - void start(); - -private Q_SLOTS: - void readData(); - -private: - void parsePPS(const QByteArray &ppsData, QByteArray &msg, QByteArray &dat, QByteArray &id); - void replyPPS(const QByteArray &res, const QByteArray &id, const QByteArray &dat); - void handleMessage(const QByteArray &msg, const QByteArray &dat, const QByteArray &id); - - int m_fd; - QSocketNotifier *m_readNotifier; }; QT_END_NAMESPACE |