Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqnxbuttoneventnotifier.h
Go to the documentation of this file.
1// Copyright (C) 2012 Research In Motion
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQNXBUTTONSEVENTNOTIFIER_H
5#define QQNXBUTTONSEVENTNOTIFIER_H
6
7#include <QObject>
8#include <QtCore/QLoggingCategory>
9
11
13
14class QSocketNotifier;
15
17{
18 Q_OBJECT
19 Q_ENUMS(ButtonId)
20public:
28
33
34 explicit QQnxButtonEventNotifier(QObject *parent = nullptr);
36
37public Q_SLOTS:
38 void start();
39
40private Q_SLOTS:
41 void updateButtonStates();
42
43private:
44 void close();
45 bool parsePPS(const QByteArray &ppsData, QHash<QByteArray, QByteArray> *messageFields) const;
46
47 int m_fd;
48 QSocketNotifier *m_readNotifier;
49 ButtonState m_state[ButtonCount];
50 QList<QByteArray> m_buttonKeys;
51
52 static const char *ppsPath;
53 static const size_t ppsBufferSize;
54};
55
56QT_END_NAMESPACE
57
58#endif // QQNXBUTTONSEVENTNOTIFIER_H
QQnxButtonEventNotifier(QObject *parent=nullptr)
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcEventDispatcher)