Qt 6.x
The Qt SDK
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
10
11class QSocketNotifier;
12
14{
17public:
18 enum ButtonId {
24 };
25
29 };
30
31 explicit QQnxButtonEventNotifier(QObject *parent = nullptr);
33
34public Q_SLOTS:
35 void start();
36
37private Q_SLOTS:
38 void updateButtonStates();
39
40private:
41 void close();
42 bool parsePPS(const QByteArray &ppsData, QHash<QByteArray, QByteArray> *messageFields) const;
43
44 int m_fd;
45 QSocketNotifier *m_readNotifier;
46 ButtonState m_state[ButtonCount];
47 QList<QByteArray> m_buttonKeys;
48
49 static const char *ppsPath;
50 static const size_t ppsBufferSize;
51};
52
54
55#endif // QQNXBUTTONSEVENTNOTIFIER_H
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
Definition qhash.h:818
Definition qlist.h:74
\inmodule QtCore
Definition qobject.h:90
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:311
\inmodule QtCore
Combined button and popup list for selecting options.
#define Q_OBJECT
#define Q_SLOTS
#define Q_ENUMS(x)