swift
|
Linux Joystick device. More...
Signals | |
void | buttonChanged (const QString &name, int index, bool isPressed) |
Joystick button changed. | |
void | buttonChanged (const swift::misc::input::CJoystickButton &joystickButton, bool isPressed) |
Joystick button changed. | |
void | buttonChanged (const swift::misc::input::CJoystickButton &joystickButton, bool isPressed) |
Joystick button changed. | |
void | connectionLost (const GUID &guid) |
Connection to joystick lost. Probably unplugged. | |
Public Member Functions | |
CJoystickDevice (const QString &path, QFile *fd, QObject *parent) | |
Constructor. | |
QString | getName () const |
Get device name. | |
QString | getPath () const |
Get device path, e.g. /dev/input/js0. | |
bool | isAttached () const |
Is joystick device still attached? | |
CJoystickDevice (QObject *parent=nullptr) | |
Constructor. | |
virtual | ~CJoystickDevice () |
Destructor. | |
bool | init (const IOHIDDeviceRef device) |
Initialize device. | |
swift::misc::input::CJoystickButtonList | getDeviceButtons () const |
Get all available device buttons. | |
IOHIDDeviceRef | getNativeDevice () const |
Return the native IOHIDDeviceRef. | |
CJoystickDevice (DirectInput8Ptr directInputPtr, const DIDEVICEINSTANCE *pdidInstance, QObject *parent=nullptr) | |
Constructor. | |
bool | init (HWND helperWindow) |
Initialize DirectInput device. | |
swift::misc::input::CJoystickButtonList | getDeviceButtons () const |
Get all available device buttons. | |
GUID | getDeviceGuid () const |
Get device GUID. | |
Protected Member Functions | |
virtual void | timerEvent (QTimerEvent *event) |
Timer based updates. | |
Friends | |
bool | operator== (const CJoystickDevice &lhs, const CJoystickDevice &rhs) |
Equal operator. | |