Diffusion KWin 4d7134f6c74a

[libinput] Add a wrapper class Device for a libinput_device

Authored by graesslin on May 4 2016, 11:42 AM.

Description

[libinput] Add a wrapper class Device for a libinput_device

Summary:
The Device class wraps all the information we can get from libinput
about the device, like whether it's a keyboard, pointer, touch, etc.

In addition some more information is queried to figure out how "useful"
a device is. For a keyboard all alphanumeric keys are checked whether
they exist, for a pointer all (normal) buttons are queried.

All the information is exposed as Q_PROPERTY and used by the
DebugConsole. The DebugConsole gained a new tab "Input Devices" which
renders all devices and their properties in a tree view. When plugging
in/out a device, the model gets reset, so it's always up to date.

The new Device class can be used in future to configure the device,
e.g. disable touch pad, set mouse acceleration, etc.

Reviewers: Plasma

Subscribers: plasma-devel

Projects: Plasma

Differential Revision: https://phabricator.kde.org/D1538