AntiMicroX
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
InputDevice Class Referenceabstract

Abstract class representing a hardware input device, e.g a joystick or controller. More...

#include <inputdevice.h>

Inheritance diagram for InputDevice:
[legend]
Collaboration diagram for InputDevice:
[legend]

Public Slots

void reset ()
 
void transferReset ()
 Obtain current joystick element values, create new SetJoystick objects, and then transfer most recent joystick element values to new current set. More...
 
void reInitButtons ()
 
void resetButtonDownCount ()
 
void setActiveSetNumber (int index)
 
void changeSetButtonAssociation (int button_index, int originset, int newset, int mode)
 
void changeSetAxisButtonAssociation (int button_index, int axis_index, int originset, int newset, int mode)
 
void changeSetStickButtonAssociation (int button_index, int stick_index, int originset, int newset, int mode)
 
void changeSetSensorButtonAssociation (JoySensorDirection direction, JoySensorType type, int originset, int newset, int mode)
 Creates reverse set change button mapping for toggle and while-hold set change mappings. More...
 
void changeSetDPadButtonAssociation (int button_index, int dpad_index, int originset, int newset, int mode)
 
void changeSetVDPadButtonAssociation (int button_index, int dpad_index, int originset, int newset, int mode)
 
void setDeviceKeyPressTime (int newPressTime)
 
void profileEdited ()
 
void setProfileName (QString value)
 
void haltServices ()
 
void finalRemoval ()
 
virtual void buttonClickEvent (int buttonindex)
 
virtual void buttonReleaseEvent (int buttonindex)
 
virtual void dpadButtonClickEvent (int buttonindex)
 
virtual void dpadButtonReleaseEvent (int buttonindex)
 
void establishPropertyUpdatedConnection ()
 
void disconnectPropertyUpdatedConnection ()
 

Signals

void setChangeActivated (int index)
 
void setAxisThrottleActivated (int index)
 
void clicked (int index)
 
void released (int index)
 
void rawButtonClick (int index)
 
void rawButtonRelease (int index)
 
void rawAxisButtonClick (int axis, int buttonindex)
 
void rawAxisButtonRelease (int axis, int buttonindex)
 
void rawDPadButtonClick (int dpad, int buttonindex)
 
void rawDPadButtonRelease (int dpad, int buttonindex)
 
void rawAxisActivated (int axis, int value)
 
void rawAxisReleased (int axis, int value)
 
void rawAxisMoved (int axis, int value)
 
void profileUpdated ()
 
void propertyUpdated ()
 
void profileNameEdited (QString text)
 
void requestProfileLoad (QString location)
 
void requestWait ()
 

Public Member Functions

 InputDevice (SDL_Joystick *joystick, int deviceIndex, AntiMicroSettings *settings, QObject *parent)
 
virtual ~InputDevice ()
 
virtual int getNumberButtons ()
 
virtual int getNumberAxes ()
 
virtual int getNumberHats ()
 
virtual int getNumberSticks ()
 
virtual bool hasSensor (JoySensorType type)
 Checks if this input device has a sensor of given type. More...
 
virtual int getNumberVDPads ()
 
int getJoyNumber ()
 
int getRealJoyNumber ()
 
int getActiveSetNumber ()
 
SetJoystickgetActiveSetJoystick ()
 
SetJoystickgetSetJoystick (int index)
 
void removeControlStick (int index)
 
bool isActive ()
 
int getButtonDownCount ()
 
virtual QString getXmlName () const =0
 
virtual QString getName ()=0
 
virtual QString getSDLName ()=0
 
virtual QString getDescription ()
 
virtual QString getGUIDString () const =0
 
virtual QString getUniqueIDString () const =0
 
virtual QString getVendorString () const =0
 
virtual QString getSerialString () const =0
 
virtual QString getProductIDString () const =0
 
virtual QString getProductVersion () const =0
 
virtual QString getRawGUIDString () const
 
virtual QString getRawVendorString () const
 
virtual QString getRawProductIDString () const
 
virtual QString getRawProductVersion () const
 
virtual QString getRawUniqueIDString () const
 
virtual void setCounterUniques (int counter)=0
 
virtual QString getStringIdentifier ()
 
virtual void closeSDLDevice ()=0
 
virtual SDL_JoystickID getSDLJoystickID ()=0
 
QString getSDLPlatform ()
 
virtual bool isGameController ()
 Check if device is using the SDL Game Controller API. More...
 
virtual bool isKnownController ()
 
void setButtonName (int index, QString tempName)
 
void setAxisButtonName (int axisIndex, int buttonIndex, QString tempName)
 
void setStickButtonName (int stickIndex, int buttonIndex, QString tempName)
 
void setSensorButtonName (JoySensorType type, JoySensorDirection direction, QString tempName)
 Sets the name of a mapped sensor button in all sets Used during XML loading. More...
 
void setDPadButtonName (int dpadIndex, int buttonIndex, QString tempName)
 
void setVDPadButtonName (int vdpadIndex, int buttonIndex, QString tempName)
 
void setAxisName (int axisIndex, QString tempName)
 
void setStickName (int stickIndex, QString tempName)
 
void setSensorName (JoySensorType type, QString tempName)
 Sets the name of a sensor in all sets Used during XML loading. More...
 
void setDPadName (int dpadIndex, QString tempName)
 
void setVDPadName (int vdpadIndex, QString tempName)
 
virtual int getNumberRawButtons ()=0
 
virtual int getNumberRawAxes ()=0
 
virtual int getNumberRawHats ()=0
 
virtual double getRawSensorRate (JoySensorType type)=0
 
virtual bool hasRawSensor (JoySensorType type)=0
 
int getDeviceKeyPressTime ()
 
void setIndex (int index)
 
bool isDeviceEdited ()
 
void revertProfileEdited ()
 
void setKeyRepeatStatus (bool enabled)
 
void setKeyRepeatDelay (int delay)
 
void setKeyRepeatRate (int rate)
 
bool isKeyRepeatEnabled ()
 
int getKeyRepeatDelay ()
 
int getKeyRepeatRate ()
 
QString getProfileName ()
 
bool hasCalibrationThrottle (int axisNum)
 
JoyAxis::ThrottleTypes getCalibrationThrottle (int axisNum)
 
void setCalibrationThrottle (int axisNum, JoyAxis::ThrottleTypes throttle)
 
void setCalibrationStatus (int axisNum, JoyAxis::ThrottleTypes throttle)
 
void removeCalibrationStatus (int axisNum)
 
void sendLoadProfileRequest (QString location)
 
AntiMicroSettingsgetSettings ()
 
void activatePossiblePendingEvents ()
 
void activatePossibleControlStickEvents ()
 
void activatePossibleAxisEvents ()
 
void activatePossibleSensorEvents ()
 
void activatePossibleDPadEvents ()
 
void activatePossibleVDPadEvents ()
 
void activatePossibleButtonEvents ()
 
void convertToUniqueMappSett (QSettings *sett, QString gUIDmappGroupSett, QString uniqueIDGroupSett)
 
bool isEmptyUniqueID (QString tempUniqueID)
 Check if the GUID passed is considered empty. More...
 
bool isRelevantUniqueID (QString tempUniqueID)
 Check if GUID passed matches the expected GUID for a device. Needed for xinput GUID abstraction. More...
 
void setRawAxisDeadZone (int deadZone)
 
int getRawAxisDeadZone ()
 
void rawAxisEvent (int index, int value)
 
bool elementsHaveNames ()
 
QMap< int, SetJoystick * > & getJoystick_sets ()
 
SDL_Joystick * getJoyHandle () const
 
virtual SDL_GameControllerType getControllerType () const
 Returns the current controller model. For non gamecontroller devices it always returns UNKNOWN. More...
 
InputDeviceCalibrationgetCalibrationBackend ()
 Returns a pointer to the internal calibration storage backend. More...
 
void updateStickCalibration (int index, double offsetX, double gainX, double offsetY, double gainY)
 Updates stored calibration for this controller and applies calibration to the specified stick in all sets See JoyControlStick::setCalibration. More...
 
void applyStickCalibration (int index, double offsetX, double gainX, double offsetY, double gainY)
 Applies calibration to the specified stick in all sets See JoyControlStick::setCalibration. More...
 
void updateAccelerometerCalibration (double offsetX, double offsetY, double offsetZ)
 Applies calibration to the specified accelerometer in all sets See JoySensor::setCalibration. More...
 
void applyAccelerometerCalibration (double offsetX, double offsetY, double offsetZ)
 Applies calibration to the specified accelerometer in all sets See JoySensor::setCalibration. More...
 
void updateGyroscopeCalibration (double offsetX, double offsetY, double offsetZ)
 Updates stored calibration for this controller and applies calibration to the specified gyroscope in all sets See JoySensor::setCalibration. More...
 
void applyGyroscopeCalibration (double offsetX, double offsetY, double offsetZ)
 Applies calibration to the specified gyroscope in all sets See JoySensor::setCalibration. More...
 

Protected Slots

void propogateSetChange (int index)
 
void propogateSetAxisThrottleChange (int index, int originset)
 
void buttonDownEvent (int setindex, int buttonindex)
 
void buttonUpEvent (int setindex, int buttonindex)
 
virtual void axisActivatedEvent (int setindex, int axisindex, int value)
 
virtual void axisReleasedEvent (int setindex, int axisindex, int value)
 
virtual void axisButtonDownEvent (int setindex, int axisindex, int buttonindex)
 
virtual void axisButtonUpEvent (int setindex, int axisindex, int buttonindex)
 
virtual void dpadButtonDownEvent (int setindex, int dpadindex, int buttonindex)
 
virtual void dpadButtonUpEvent (int setindex, int dpadindex, int buttonindex)
 
virtual void stickButtonDownEvent (int setindex, int stickindex, int buttonindex)
 
virtual void stickButtonUpEvent (int setindex, int stickindex, int buttonindex)
 
virtual void sensorButtonDownEvent (int setindex, JoySensorType type, JoySensorDirection direction)
 
virtual void sensorButtonUpEvent (int setindex, JoySensorType type, JoySensorDirection direction)
 
void updateSetButtonNames (int index)
 
void updateSetAxisButtonNames (int axisIndex, int buttonIndex)
 
void updateSetStickButtonNames (int stickIndex, int buttonIndex)
 
void updateSetSensorButtonNames (JoySensorType type, JoySensorDirection direction)
 Rename mapped sensor button in all sets to the name in the active set. More...
 
void updateSetDPadButtonNames (int dpadIndex, int buttonIndex)
 
void updateSetVDPadButtonNames (int vdpadIndex, int buttonIndex)
 
void updateSetAxisNames (int axisIndex)
 
void updateSetStickNames (int stickIndex)
 
void updateSetSensorNames (JoySensorType type)
 Rename sensor in all sets to the name in the current set. More...
 
void updateSetDPadNames (int dpadIndex)
 
void updateSetVDPadNames (int vdpadIndex)
 

Protected Member Functions

void enableSetConnections (SetJoystick *setstick)
 Establishes necessary connections for set change slots. More...
 
QHash< int, JoyAxis::ThrottleTypes > & getCali ()
 
SDL_JoystickID * getJoystickID ()
 

Protected Attributes

int rawAxisDeadZone
 
int keyPressTime
 
QString profileName
 
InputDeviceCalibration m_calibrations
 

Private Member Functions

QList< bool > & getButtonstatesLocal ()
 
QList< int > & getAxesstatesLocal ()
 
QList< int > & getDpadstatesLocal ()
 

Private Attributes

SDL_Joystick * m_joyhandle
 
QMap< int, SetJoystick * > joystick_sets
 
QHash< int, JoyAxis::ThrottleTypescali
 
AntiMicroSettingsm_settings
 
int active_set
 
int joyNumber
 
int buttonDownCount
 
SDL_JoystickID joystickID
 
bool deviceEdited
 
bool keyRepeatEnabled
 
int keyRepeatDelay
 
int keyRepeatRate
 
QList< bool > buttonstates
 
QList< int > axesstates
 
QList< int > dpadstates
 

Detailed Description

Abstract class representing a hardware input device, e.g a joystick or controller.

Two concrete implementations are Joystick and class GameController difference between two of them are described in listed sources

See also
https://discourse.libsdl.org/t/difference-between-joysticks-and-game-controllers/24028/2
https://stackoverflow.com/a/50026410/11747535

Constructor & Destructor Documentation

◆ InputDevice()

InputDevice::InputDevice ( SDL_Joystick *  joystick,
int  deviceIndex,
AntiMicroSettings settings,
QObject *  parent 
)
explicit

◆ ~InputDevice()

InputDevice::~InputDevice ( )
virtual

Member Function Documentation

◆ activatePossibleAxisEvents()

void InputDevice::activatePossibleAxisEvents ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ activatePossibleButtonEvents()

void InputDevice::activatePossibleButtonEvents ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ activatePossibleControlStickEvents()

void InputDevice::activatePossibleControlStickEvents ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ activatePossibleDPadEvents()

void InputDevice::activatePossibleDPadEvents ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ activatePossiblePendingEvents()

void InputDevice::activatePossiblePendingEvents ( )
Here is the call graph for this function:

◆ activatePossibleSensorEvents()

void InputDevice::activatePossibleSensorEvents ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ activatePossibleVDPadEvents()

void InputDevice::activatePossibleVDPadEvents ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyAccelerometerCalibration()

void InputDevice::applyAccelerometerCalibration ( double  offsetX,
double  offsetY,
double  offsetZ 
)

Applies calibration to the specified accelerometer in all sets See JoySensor::setCalibration.

Parameters
[in]offsetXOffset angle around the X axis
[in]offsetYOffset angle around the Y axis
[in]offsetZOffset angle around the Z axis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyGyroscopeCalibration()

void InputDevice::applyGyroscopeCalibration ( double  offsetX,
double  offsetY,
double  offsetZ 
)

Applies calibration to the specified gyroscope in all sets See JoySensor::setCalibration.

Parameters
[in]offsetXOffset value for X axis
[in]offsetYOffset value for Y axis
[in]offsetZOffset value for Z axis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyStickCalibration()

void InputDevice::applyStickCalibration ( int  index,
double  offsetX,
double  gainX,
double  offsetY,
double  gainY 
)

Applies calibration to the specified stick in all sets See JoyControlStick::setCalibration.

Parameters
[in]indexStick index
[in]offsetXOffset value for X axis
[in]gainXGain value for X axis
[in]offsetYOffset value for Y axis
[in]gainYGain value for Y axis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ axisActivatedEvent

void InputDevice::axisActivatedEvent ( int  setindex,
int  axisindex,
int  value 
)
protectedvirtualslot
Here is the caller graph for this function:

◆ axisButtonDownEvent

void InputDevice::axisButtonDownEvent ( int  setindex,
int  axisindex,
int  buttonindex 
)
protectedvirtualslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ axisButtonUpEvent

void InputDevice::axisButtonUpEvent ( int  setindex,
int  axisindex,
int  buttonindex 
)
protectedvirtualslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ axisReleasedEvent

void InputDevice::axisReleasedEvent ( int  setindex,
int  axisindex,
int  value 
)
protectedvirtualslot
Here is the caller graph for this function:

◆ buttonClickEvent

void InputDevice::buttonClickEvent ( int  buttonindex)
virtualslot
Here is the caller graph for this function:

◆ buttonDownEvent

void InputDevice::buttonDownEvent ( int  setindex,
int  buttonindex 
)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ buttonReleaseEvent

void InputDevice::buttonReleaseEvent ( int  buttonindex)
virtualslot
Here is the caller graph for this function:

◆ buttonUpEvent

void InputDevice::buttonUpEvent ( int  setindex,
int  buttonindex 
)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetAxisButtonAssociation

void InputDevice::changeSetAxisButtonAssociation ( int  button_index,
int  axis_index,
int  originset,
int  newset,
int  mode 
)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetButtonAssociation

void InputDevice::changeSetButtonAssociation ( int  button_index,
int  originset,
int  newset,
int  mode 
)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetDPadButtonAssociation

void InputDevice::changeSetDPadButtonAssociation ( int  button_index,
int  dpad_index,
int  originset,
int  newset,
int  mode 
)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetSensorButtonAssociation

void InputDevice::changeSetSensorButtonAssociation ( JoySensorDirection  direction,
JoySensorType  type,
int  originset,
int  newset,
int  mode 
)
slot

Creates reverse set change button mapping for toggle and while-hold set change mappings.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetStickButtonAssociation

void InputDevice::changeSetStickButtonAssociation ( int  button_index,
int  stick_index,
int  originset,
int  newset,
int  mode 
)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeSetVDPadButtonAssociation

void InputDevice::changeSetVDPadButtonAssociation ( int  button_index,
int  dpad_index,
int  originset,
int  newset,
int  mode 
)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clicked

void InputDevice::clicked ( int  index)
signal
Here is the caller graph for this function:

◆ closeSDLDevice()

virtual void InputDevice::closeSDLDevice ( )
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ convertToUniqueMappSett()

void InputDevice::convertToUniqueMappSett ( QSettings *  sett,
QString  gUIDmappGroupSett,
QString  uniqueIDGroupSett 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ disconnectPropertyUpdatedConnection

void InputDevice::disconnectPropertyUpdatedConnection ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dpadButtonClickEvent

void InputDevice::dpadButtonClickEvent ( int  buttonindex)
virtualslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dpadButtonDownEvent

void InputDevice::dpadButtonDownEvent ( int  setindex,
int  dpadindex,
int  buttonindex 
)
protectedvirtualslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dpadButtonReleaseEvent

void InputDevice::dpadButtonReleaseEvent ( int  buttonindex)
virtualslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dpadButtonUpEvent

void InputDevice::dpadButtonUpEvent ( int  setindex,
int  dpadindex,
int  buttonindex 
)
protectedvirtualslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ elementsHaveNames()

bool InputDevice::elementsHaveNames ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ enableSetConnections()

void InputDevice::enableSetConnections ( SetJoystick setstick)
protected

Establishes necessary connections for set change slots.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ establishPropertyUpdatedConnection

void InputDevice::establishPropertyUpdatedConnection ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ finalRemoval

void InputDevice::finalRemoval ( )
slot
Here is the call graph for this function:

◆ getActiveSetJoystick()

SetJoystick * InputDevice::getActiveSetJoystick ( )
Here is the call graph for this function:

◆ getActiveSetNumber()

int InputDevice::getActiveSetNumber ( )
Here is the caller graph for this function:

◆ getAxesstatesLocal()

QList< int > & InputDevice::getAxesstatesLocal ( )
private
Here is the caller graph for this function:

◆ getButtonDownCount()

int InputDevice::getButtonDownCount ( )

◆ getButtonstatesLocal()

QList< bool > & InputDevice::getButtonstatesLocal ( )
private
Here is the caller graph for this function:

◆ getCali()

QHash< int, JoyAxis::ThrottleTypes > & InputDevice::getCali ( )
protected
Here is the caller graph for this function:

◆ getCalibrationBackend()

InputDeviceCalibration * InputDevice::getCalibrationBackend ( )

Returns a pointer to the internal calibration storage backend.

Here is the caller graph for this function:

◆ getCalibrationThrottle()

JoyAxis::ThrottleTypes InputDevice::getCalibrationThrottle ( int  axisNum)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getControllerType()

SDL_GameControllerType InputDevice::getControllerType ( ) const
virtual

Returns the current controller model. For non gamecontroller devices it always returns UNKNOWN.

Reimplemented in GameController.

Here is the caller graph for this function:

◆ getDescription()

QString InputDevice::getDescription ( )
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDeviceKeyPressTime()

int InputDevice::getDeviceKeyPressTime ( )
Here is the caller graph for this function:

◆ getDpadstatesLocal()

QList< int > & InputDevice::getDpadstatesLocal ( )
private
Here is the caller graph for this function:

◆ getGUIDString()

virtual QString InputDevice::getGUIDString ( ) const
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getJoyHandle()

SDL_Joystick * InputDevice::getJoyHandle ( ) const
Here is the caller graph for this function:

◆ getJoyNumber()

int InputDevice::getJoyNumber ( )
Here is the caller graph for this function:

◆ getJoystick_sets()

QMap< int, SetJoystick * > & InputDevice::getJoystick_sets ( )
Here is the caller graph for this function:

◆ getJoystickID()

SDL_JoystickID * InputDevice::getJoystickID ( )
protected

◆ getKeyRepeatDelay()

int InputDevice::getKeyRepeatDelay ( )

◆ getKeyRepeatRate()

int InputDevice::getKeyRepeatRate ( )

◆ getName()

virtual QString InputDevice::getName ( )
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getNumberAxes()

int InputDevice::getNumberAxes ( )
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNumberButtons()

int InputDevice::getNumberButtons ( )
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNumberHats()

int InputDevice::getNumberHats ( )
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNumberRawAxes()

virtual int InputDevice::getNumberRawAxes ( )
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getNumberRawButtons()

virtual int InputDevice::getNumberRawButtons ( )
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getNumberRawHats()

virtual int InputDevice::getNumberRawHats ( )
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getNumberSticks()

int InputDevice::getNumberSticks ( )
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNumberVDPads()

int InputDevice::getNumberVDPads ( )
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProductIDString()

virtual QString InputDevice::getProductIDString ( ) const
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getProductVersion()

virtual QString InputDevice::getProductVersion ( ) const
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getProfileName()

QString InputDevice::getProfileName ( )
Here is the caller graph for this function:

◆ getRawAxisDeadZone()

int InputDevice::getRawAxisDeadZone ( )

◆ getRawGUIDString()

QString InputDevice::getRawGUIDString ( ) const
virtual

Reimplemented in GameController.

Here is the call graph for this function:

◆ getRawProductIDString()

QString InputDevice::getRawProductIDString ( ) const
virtual

Reimplemented in GameController.

Here is the call graph for this function:

◆ getRawProductVersion()

QString InputDevice::getRawProductVersion ( ) const
virtual

Reimplemented in GameController.

Here is the call graph for this function:

◆ getRawSensorRate()

virtual double InputDevice::getRawSensorRate ( JoySensorType  type)
pure virtual

Implemented in GameController, and Joystick.

◆ getRawUniqueIDString()

QString InputDevice::getRawUniqueIDString ( ) const
virtual

Reimplemented in GameController.

Here is the call graph for this function:

◆ getRawVendorString()

QString InputDevice::getRawVendorString ( ) const
virtual

Reimplemented in GameController.

Here is the call graph for this function:

◆ getRealJoyNumber()

int InputDevice::getRealJoyNumber ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSDLJoystickID()

virtual SDL_JoystickID InputDevice::getSDLJoystickID ( )
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getSDLName()

virtual QString InputDevice::getSDLName ( )
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getSDLPlatform()

QString InputDevice::getSDLPlatform ( )
Here is the caller graph for this function:

◆ getSerialString()

virtual QString InputDevice::getSerialString ( ) const
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getSetJoystick()

SetJoystick * InputDevice::getSetJoystick ( int  index)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSettings()

AntiMicroSettings * InputDevice::getSettings ( )
Here is the caller graph for this function:

◆ getStringIdentifier()

QString InputDevice::getStringIdentifier ( )
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getUniqueIDString()

virtual QString InputDevice::getUniqueIDString ( ) const
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getVendorString()

virtual QString InputDevice::getVendorString ( ) const
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ getXmlName()

virtual QString InputDevice::getXmlName ( ) const
pure virtual

Implemented in Joystick, and GameController.

Here is the caller graph for this function:

◆ haltServices

void InputDevice::haltServices ( )
slot

◆ hasCalibrationThrottle()

bool InputDevice::hasCalibrationThrottle ( int  axisNum)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasRawSensor()

virtual bool InputDevice::hasRawSensor ( JoySensorType  type)
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ hasSensor()

bool InputDevice::hasSensor ( JoySensorType  type)
virtual

Checks if this input device has a sensor of given type.

Returns
True if sensor is present, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isActive()

bool InputDevice::isActive ( )
Here is the caller graph for this function:

◆ isDeviceEdited()

bool InputDevice::isDeviceEdited ( )
Here is the caller graph for this function:

◆ isEmptyUniqueID()

bool InputDevice::isEmptyUniqueID ( QString  tempUniqueID)

Check if the GUID passed is considered empty.

Parameters
GUIDstring
Returns
if GUID is considered empty.

◆ isGameController()

bool InputDevice::isGameController ( )
virtual

Check if device is using the SDL Game Controller API.

Returns
Status showing if device is using the Game Controller API

Reimplemented in GameController.

Here is the caller graph for this function:

◆ isKeyRepeatEnabled()

bool InputDevice::isKeyRepeatEnabled ( )

◆ isKnownController()

bool InputDevice::isKnownController ( )
virtual
Here is the call graph for this function:

◆ isRelevantUniqueID()

bool InputDevice::isRelevantUniqueID ( QString  tempUniqueID)

Check if GUID passed matches the expected GUID for a device. Needed for xinput GUID abstraction.

Parameters
GUIDstring
Returns
if GUID is considered a match.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ profileEdited

void InputDevice::profileEdited ( )
slot
Here is the caller graph for this function:

◆ profileNameEdited

void InputDevice::profileNameEdited ( QString  text)
signal
Here is the caller graph for this function:

◆ profileUpdated

void InputDevice::profileUpdated ( )
signal
Here is the caller graph for this function:

◆ propertyUpdated

void InputDevice::propertyUpdated ( )
signal
Here is the caller graph for this function:

◆ propogateSetAxisThrottleChange

void InputDevice::propogateSetAxisThrottleChange ( int  index,
int  originset 
)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ propogateSetChange

void InputDevice::propogateSetChange ( int  index)
protectedslot
Here is the caller graph for this function:

◆ rawAxisActivated

void InputDevice::rawAxisActivated ( int  axis,
int  value 
)
signal
Here is the caller graph for this function:

◆ rawAxisButtonClick

void InputDevice::rawAxisButtonClick ( int  axis,
int  buttonindex 
)
signal

◆ rawAxisButtonRelease

void InputDevice::rawAxisButtonRelease ( int  axis,
int  buttonindex 
)
signal

◆ rawAxisEvent()

void InputDevice::rawAxisEvent ( int  index,
int  value 
)
Here is the caller graph for this function:

◆ rawAxisMoved

void InputDevice::rawAxisMoved ( int  axis,
int  value 
)
signal
Here is the caller graph for this function:

◆ rawAxisReleased

void InputDevice::rawAxisReleased ( int  axis,
int  value 
)
signal
Here is the caller graph for this function:

◆ rawButtonClick

void InputDevice::rawButtonClick ( int  index)
signal
Here is the caller graph for this function:

◆ rawButtonRelease

void InputDevice::rawButtonRelease ( int  index)
signal
Here is the caller graph for this function:

◆ rawDPadButtonClick

void InputDevice::rawDPadButtonClick ( int  dpad,
int  buttonindex 
)
signal
Here is the caller graph for this function:

◆ rawDPadButtonRelease

void InputDevice::rawDPadButtonRelease ( int  dpad,
int  buttonindex 
)
signal
Here is the caller graph for this function:

◆ reInitButtons

void InputDevice::reInitButtons ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ released

void InputDevice::released ( int  index)
signal
Here is the caller graph for this function:

◆ removeCalibrationStatus()

void InputDevice::removeCalibrationStatus ( int  axisNum)
Here is the call graph for this function:

◆ removeControlStick()

void InputDevice::removeControlStick ( int  index)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ requestProfileLoad

void InputDevice::requestProfileLoad ( QString  location)
signal
Here is the caller graph for this function:

◆ requestWait

void InputDevice::requestWait ( )
signal
Here is the caller graph for this function:

◆ reset

void InputDevice::reset ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetButtonDownCount

void InputDevice::resetButtonDownCount ( )
slot
Here is the caller graph for this function:

◆ revertProfileEdited()

void InputDevice::revertProfileEdited ( )
Here is the caller graph for this function:

◆ sendLoadProfileRequest()

void InputDevice::sendLoadProfileRequest ( QString  location)

◆ sensorButtonDownEvent

void InputDevice::sensorButtonDownEvent ( int  setindex,
JoySensorType  type,
JoySensorDirection  direction 
)
protectedvirtualslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sensorButtonUpEvent

void InputDevice::sensorButtonUpEvent ( int  setindex,
JoySensorType  type,
JoySensorDirection  direction 
)
protectedvirtualslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setActiveSetNumber

void InputDevice::setActiveSetNumber ( int  index)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAxisButtonName()

void InputDevice::setAxisButtonName ( int  axisIndex,
int  buttonIndex,
QString  tempName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAxisName()

void InputDevice::setAxisName ( int  axisIndex,
QString  tempName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAxisThrottleActivated

void InputDevice::setAxisThrottleActivated ( int  index)
signal

◆ setButtonName()

void InputDevice::setButtonName ( int  index,
QString  tempName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCalibrationStatus()

void InputDevice::setCalibrationStatus ( int  axisNum,
JoyAxis::ThrottleTypes  throttle 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCalibrationThrottle()

void InputDevice::setCalibrationThrottle ( int  axisNum,
JoyAxis::ThrottleTypes  throttle 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setChangeActivated

void InputDevice::setChangeActivated ( int  index)
signal
Here is the caller graph for this function:

◆ setCounterUniques()

virtual void InputDevice::setCounterUniques ( int  counter)
pure virtual

Implemented in GameController, and Joystick.

Here is the caller graph for this function:

◆ setDeviceKeyPressTime

void InputDevice::setDeviceKeyPressTime ( int  newPressTime)
slot
Here is the caller graph for this function:

◆ setDPadButtonName()

void InputDevice::setDPadButtonName ( int  dpadIndex,
int  buttonIndex,
QString  tempName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDPadName()

void InputDevice::setDPadName ( int  dpadIndex,
QString  tempName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIndex()

void InputDevice::setIndex ( int  index)
Here is the caller graph for this function:

◆ setKeyRepeatDelay()

void InputDevice::setKeyRepeatDelay ( int  delay)

◆ setKeyRepeatRate()

void InputDevice::setKeyRepeatRate ( int  rate)

◆ setKeyRepeatStatus()

void InputDevice::setKeyRepeatStatus ( bool  enabled)

◆ setProfileName

void InputDevice::setProfileName ( QString  value)
slot
Here is the caller graph for this function:

◆ setRawAxisDeadZone()

void InputDevice::setRawAxisDeadZone ( int  deadZone)
Here is the caller graph for this function:

◆ setSensorButtonName()

void InputDevice::setSensorButtonName ( JoySensorType  type,
JoySensorDirection  direction,
QString  tempName 
)

Sets the name of a mapped sensor button in all sets Used during XML loading.

Parameters
typeThe sensor type which has the to be renamed button
directionThe direction of the to be renamed button
tempNameThe new name
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSensorName()

void InputDevice::setSensorName ( JoySensorType  type,
QString  tempName 
)

Sets the name of a sensor in all sets Used during XML loading.

Parameters
typeThe sensor type to be renamed
tempNameThe new name
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStickButtonName()

void InputDevice::setStickButtonName ( int  stickIndex,
int  buttonIndex,
QString  tempName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStickName()

void InputDevice::setStickName ( int  stickIndex,
QString  tempName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setVDPadButtonName()

void InputDevice::setVDPadButtonName ( int  vdpadIndex,
int  buttonIndex,
QString  tempName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setVDPadName()

void InputDevice::setVDPadName ( int  vdpadIndex,
QString  tempName 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stickButtonDownEvent

void InputDevice::stickButtonDownEvent ( int  setindex,
int  stickindex,
int  buttonindex 
)
protectedvirtualslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stickButtonUpEvent

void InputDevice::stickButtonUpEvent ( int  setindex,
int  stickindex,
int  buttonindex 
)
protectedvirtualslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ transferReset

void InputDevice::transferReset ( )
slot

Obtain current joystick element values, create new SetJoystick objects, and then transfer most recent joystick element values to new current set.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateAccelerometerCalibration()

void InputDevice::updateAccelerometerCalibration ( double  offsetX,
double  offsetY,
double  offsetZ 
)

Applies calibration to the specified accelerometer in all sets See JoySensor::setCalibration.

Parameters
[in]offsetXOffset angle around the X axis
[in]offsetYOffset angle around the Y axis
[in]offsetZOffset angle around the Z axis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateGyroscopeCalibration()

void InputDevice::updateGyroscopeCalibration ( double  offsetX,
double  offsetY,
double  offsetZ 
)

Updates stored calibration for this controller and applies calibration to the specified gyroscope in all sets See JoySensor::setCalibration.

Parameters
[in]offsetXOffset value for X axis
[in]offsetYOffset value for Y axis
[in]offsetZOffset value for Z axis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSetAxisButtonNames

void InputDevice::updateSetAxisButtonNames ( int  axisIndex,
int  buttonIndex 
)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSetAxisNames

void InputDevice::updateSetAxisNames ( int  axisIndex)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSetButtonNames

void InputDevice::updateSetButtonNames ( int  index)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSetDPadButtonNames

void InputDevice::updateSetDPadButtonNames ( int  dpadIndex,
int  buttonIndex 
)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSetDPadNames

void InputDevice::updateSetDPadNames ( int  dpadIndex)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSetSensorButtonNames

void InputDevice::updateSetSensorButtonNames ( JoySensorType  type,
JoySensorDirection  direction 
)
protectedslot

Rename mapped sensor button in all sets to the name in the active set.

Parameters
typeThe sensor type which has the to be renamed button
directionThe direction of the to be renamed button
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSetSensorNames

void InputDevice::updateSetSensorNames ( JoySensorType  type)
protectedslot

Rename sensor in all sets to the name in the current set.

Parameters
typeThe sensor to rename
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSetStickButtonNames

void InputDevice::updateSetStickButtonNames ( int  stickIndex,
int  buttonIndex 
)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSetStickNames

void InputDevice::updateSetStickNames ( int  stickIndex)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSetVDPadButtonNames

void InputDevice::updateSetVDPadButtonNames ( int  vdpadIndex,
int  buttonIndex 
)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSetVDPadNames

void InputDevice::updateSetVDPadNames ( int  vdpadIndex)
protectedslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateStickCalibration()

void InputDevice::updateStickCalibration ( int  index,
double  offsetX,
double  gainX,
double  offsetY,
double  gainY 
)

Updates stored calibration for this controller and applies calibration to the specified stick in all sets See JoyControlStick::setCalibration.

Parameters
[in]indexStick index
[in]offsetXOffset value for X axis
[in]gainXGain value for X axis
[in]offsetYOffset value for Y axis
[in]gainYGain value for Y axis
Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ active_set

int InputDevice::active_set
private

◆ axesstates

QList<int> InputDevice::axesstates
private

◆ buttonDownCount

int InputDevice::buttonDownCount
private

◆ buttonstates

QList<bool> InputDevice::buttonstates
private

◆ cali

QHash<int, JoyAxis::ThrottleTypes> InputDevice::cali
private

◆ deviceEdited

bool InputDevice::deviceEdited
private

◆ dpadstates

QList<int> InputDevice::dpadstates
private

◆ joyNumber

int InputDevice::joyNumber
private

◆ joystick_sets

QMap<int, SetJoystick *> InputDevice::joystick_sets
private

◆ joystickID

SDL_JoystickID InputDevice::joystickID
private

◆ keyPressTime

int InputDevice::keyPressTime
protected

◆ keyRepeatDelay

int InputDevice::keyRepeatDelay
private

◆ keyRepeatEnabled

bool InputDevice::keyRepeatEnabled
private

◆ keyRepeatRate

int InputDevice::keyRepeatRate
private

◆ m_calibrations

InputDeviceCalibration InputDevice::m_calibrations
protected

◆ m_joyhandle

SDL_Joystick* InputDevice::m_joyhandle
private

◆ m_settings

AntiMicroSettings* InputDevice::m_settings
private

◆ profileName

QString InputDevice::profileName
protected

◆ rawAxisDeadZone

int InputDevice::rawAxisDeadZone
protected

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