44 #include <QtGui/QApplication> 47 #include <QtCore/QDebug> 48 #include <QtCore/QMetaEnum> 49 #include <QtCore/QSocketNotifier> 50 #include <QtCore/private/qcore_unix_p.h> 54 #ifdef QBBBUTTON_DEBUG 55 #define qButtonDebug qDebug 57 #define qButtonDebug QT_NO_QDEBUG_MACRO 62 static const char *
ppsPath =
"/pps/system/buttons/status";
95 qWarning(
"QQNX: failed to open buttons pps, errno=%d",
errno);
115 qWarning(
"QQNX: failed to read hardware buttons pps object, errno=%d",
errno);
124 buffer[bytes] =
'\0';
141 if (
mState[buttonId] != newState) {
142 qButtonDebug() <<
"Hardware button event: button =" << key <<
"state =" << fields.
value(key);
143 mState[buttonId] = newState;
203 for (
int i = 1; i < lines.
size(); i++) {
211 if (doubleColon == -1) {
218 messageFields->
insert(key, value);
#define QT_END_NAMESPACE
This macro expands to.
The QByteArray class provides an array of bytes.
static QWidget * activeWindow()
Returns the application top-level window that has the keyboard input focus, or 0 if no application wi...
static void handleKeyEvent(QWidget *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
static const QMetaObject staticMetaObject
This variable stores the meta-object for the class.
static int qt_safe_close(int fd)
The QHash class is a template class that provides a hash-table-based dictionary.
The QObject class is the base class of all Qt objects.
const T value(const Key &key) const
Returns the value associated with the key.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
The QSocketNotifier class provides support for monitoring activity on a file descriptor.
void append(const T &t)
Inserts value at the end of the list.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static int qt_safe_open(const char *pathname, int flags, mode_t mode=0777)
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
const T & at(int i) const
Returns the item at index position i in the list.
static QByteArray fromRawData(const char *, int size)
Constructs a QByteArray that uses the first size bytes of the data array.
Q_CORE_EXPORT void qWarning(const char *,...)
QByteArray mid(int index, int len=-1) const
Returns a byte array containing len bytes from this byte array, starting at position pos...
int indexOf(char c, int from=0) const
Returns the index position of the first occurrence of the character ch in the byte array...
const char * constData() const
Returns a pointer to the data stored in the byte array.
QList< QByteArray > split(char sep) const
Splits the byte array into subarrays wherever sep occurs, and returns the list of those arrays...
Type
This enum type defines the valid event types in Qt.
int size() const
Returns the number of items in the list.
static qint64 qt_safe_read(int fd, void *data, qint64 maxlen)
QBool contains(char c) const
Returns true if the byte array contains the character ch; otherwise returns false.