swift
Classes | Signals | Public Member Functions | Protected Member Functions | Friends | List of all members
swift::input::CJoystickDevice Class Reference

Linux Joystick device. More...

Inheritance diagram for swift::input::CJoystickDevice:
[legend]

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.
 

Detailed Description

Linux Joystick device.

Joystick device.

Definition at line 23 of file joysticklinux.h.


The documentation for this class was generated from the following files: