From 4fac40f8b0e7b2a6f5f41eb82196e8b197bc851a Mon Sep 17 00:00:00 2001 From: Kevin Krammer Date: Tue, 10 Apr 2012 11:26:12 +0200 Subject: 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 Reviewed-by: Sean Harmer Reviewed-by: Robin Burchell --- .../platforms/qnx/qqnxnavigatoreventhandler.h | 24 ++++++---------------- 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'src/plugins/platforms/qnx/qqnxnavigatoreventhandler.h') 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 -- cgit v1.2.3