AntiMicroX
Public Slots | Public Member Functions | Protected Member Functions | Private Member Functions
GameControllerSet Class Reference

A SetJoystick specialized for gamepads. More...

#include <gamecontrollerset.h>

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

Public Slots

virtual void reset ()
 
void applyHapticTrigger ()
 Applies haptic feedback to the triggers of the controller. More...
 
- Public Slots inherited from SetJoystick
virtual void reset ()
 Re-enumerates inputs from the associated device and resets all mappings in this set. More...
 
void copyAssignments (SetJoystick *destSet)
 
void propogateSetChange (int index)
 
void propogateSetButtonAssociation (int button, int newset, int mode)
 
void propogateSetAxisButtonAssociation (int button, int axis, int newset, int mode)
 
void propogateSetStickButtonAssociation (int button, int stick, int newset, int mode)
 
void propagateSetSensorButtonAssociation (JoySensorDirection direction, JoySensorType sensor, int newset, int mode)
 Forwards set change slot mapping event to InputDevice. More...
 
void propogateSetDPadButtonAssociation (int button, int dpad, int newset, int mode)
 
void propogateSetVDPadButtonAssociation (int button, int dpad, int newset, int mode)
 
void establishPropertyUpdatedConnection ()
 
void disconnectPropertyUpdatedConnection ()
 

Public Member Functions

 GameControllerSet (InputDevice *device, int index, QObject *parent=nullptr)
 
virtual void refreshAxes ()
 
virtual void readConfig (QXmlStreamReader *xml)
 Deserializes the given XML stream into a SetJoystick object. More...
 
- Public Member Functions inherited from SetJoystick
 SetJoystick (InputDevice *device, int index, QObject *parent)
 
 SetJoystick (InputDevice *device, int index, bool runreset, QObject *parent)
 
 ~SetJoystick ()
 
JoyAxisgetJoyAxis (int index) const
 
JoyButtongetJoyButton (int index) const
 
JoyDPadgetJoyDPad (int index) const
 
JoyControlStickgetJoyStick (int index) const
 
JoySensorgetSensor (JoySensorType type) const
 
VDPadgetVDPad (int index) const
 
int getNumberButtons () const
 
int getNumberAxes () const
 
int getNumberHats () const
 
int getNumberSticks () const
 
bool hasSensor (JoySensorType type) const
 Checks if this set has a sensor. More...
 
int getNumberVDPads () const
 
const QHash< int, JoyButton * > & getButtons () const
 
const QHash< int, JoyDPad * > & getHats () const
 
const QHash< int, JoyControlStick * > & getSticks () const
 
const QHash< JoySensorType, JoySensor * > & getSensors () const
 Get all sensor objects in this set. More...
 
const QHash< int, VDPad * > & getVdpads () const
 
QHash< int, JoyAxis * > * getAxes ()
 
int getIndex () const
 
int getRealIndex () const
 
virtual void refreshButtons ()
 
virtual void refreshHats ()
 
virtual void refreshSensors ()
 Setup sensor objects for all available hardware sensors. More...
 
void release ()
 Perform a release of all elements of a set. Stick and vdpad releases will be handled by the associated button or axis. More...
 
void addControlStick (int index, JoyControlStick *stick)
 
void removeControlStick (int index)
 
void addVDPad (int index, VDPad *vdpad)
 
void removeVDPad (int index)
 
void setIgnoreEventState (bool ignore)
 
InputDevicegetInputDevice () const
 
void setName (QString name)
 
QString getName () const
 
QString getSetLabel ()
 
void raiseAxesDeadZones (int deadZone=0)
 Raise the dead zones for axes. Used when launching the controller mapping window. More...
 
void currentAxesDeadZones (QList< int > *axesDeadZones)
 
void setAxesDeadZones (QList< int > *axesDeadZones)
 
void setAxisThrottle (int axisNum, JoyAxis::ThrottleTypes throttle)
 
const QList< JoyButton * > & getLastClickedButtons () const
 
void removeAllBtnFromQueue ()
 
int getCountBtnInList (QString partialName)
 
bool isSetEmpty ()
 Check if this set has any mapped event. More...
 
- Public Member Functions inherited from SetJoystickXml
 SetJoystickXml (SetJoystick *setJoystick, QObject *parent=nullptr)
 
virtual void writeConfig (QXmlStreamWriter *xml)
 Serializes a SetJoystick object into the the given XML stream. More...
 

Protected Member Functions

void populateSticksDPad ()
 
- Protected Member Functions inherited from SetJoystick
void deleteButtons ()
 
void deleteAxes ()
 
void deleteHats ()
 
void deleteSticks ()
 
void deleteSensors ()
 Destroy all sensor objects in this set. More...
 
void deleteVDpads ()
 
void enableButtonConnections (JoyButton *button)
 
void enableAxisConnections (JoyAxis *axis)
 
void enableHatConnections (JoyDPad *dpad)
 
void enableSensorConnections (JoySensor *sensor)
 Establishes connections for event propagation between JoySensor and InputDevice. More...
 

Private Member Functions

void getElemFromXml (QString elemName, QXmlStreamReader *xml)
 
void resetSticks ()
 

Additional Inherited Members

- Signals inherited from SetJoystick
void setChangeActivated (int index)
 
void setAssignmentButtonChanged (int button, int originset, int newset, int mode)
 
void setAssignmentAxisChanged (int button, int axis, int originset, int newset, int mode)
 
void setAssignmentStickChanged (int button, int stick, int originset, int newset, int mode)
 
void setAssignmentSensorChanged (JoySensorDirection direction, JoySensorType sensor, int originset, int newset, int mode)
 
void setAssignmentDPadChanged (int button, int dpad, int originset, int newset, int mode)
 
void setAssignmentVDPadChanged (int button, int dpad, int originset, int newset, int mode)
 
void setAssignmentAxisThrottleChanged (int axis, int originset)
 
void setButtonClick (int index, int button)
 
void setButtonRelease (int index, int button)
 
void setAxisButtonClick (int setindex, int axis, int button)
 
void setAxisButtonRelease (int setindex, int axis, int button)
 
void setAxisActivated (int setindex, int axis, int value)
 
void setAxisReleased (int setindex, int axis, int value)
 
void setStickButtonClick (int setindex, int stick, int button)
 
void setStickButtonRelease (int setindex, int stick, int button)
 
void setSensorActivated (int setindex, JoySensorType type, int value)
 
void setSensorReleased (int setindex, JoySensorType, int value)
 
void setSensorButtonClick (int setindex, JoySensorType type, JoySensorDirection direction)
 
void setSensorButtonRelease (int setindex, JoySensorType type, JoySensorDirection direction)
 
void setDPadButtonClick (int setindex, int dpad, int button)
 
void setDPadButtonRelease (int setindex, int dpad, int button)
 
void setButtonNameChange (int index)
 
void setAxisButtonNameChange (int axisIndex, int buttonIndex)
 
void setStickButtonNameChange (int stickIndex, int buttonIndex)
 
void setSensorButtonNameChange (JoySensorType type, JoySensorDirection direction)
 
void setDPadButtonNameChange (int dpadIndex, int buttonIndex)
 
void setVDPadButtonNameChange (int vdpadIndex, int buttonIndex)
 
void setAxisNameChange (int axisIndex)
 
void setStickNameChange (int stickIndex)
 
void setSensorNameChange (JoySensorType type)
 
void setDPadNameChange (int dpadIndex)
 
void setVDPadNameChange (int vdpadIndex)
 
void propertyUpdated ()
 
- Protected Slots inherited from SetJoystick
void propogateSetAxisThrottleSetting (int index)
 
void propogateSetButtonClick (int button)
 
void propogateSetButtonRelease (int button)
 
void propogateSetAxisButtonClick (int button)
 
void propogateSetAxisButtonRelease (int button)
 
void propogateSetStickButtonClick (int button)
 
void propogateSetStickButtonRelease (int button)
 
void propagateSetSensorButtonClick (int button)
 
void propagateSetSensorButtonRelease (int button)
 
void propogateSetDPadButtonClick (int button)
 
void propogateSetDPadButtonRelease (int button)
 
void propogateSetAxisActivated (int value)
 
void propogateSetAxisReleased (int value)
 
void propogateSetButtonNameChange ()
 
void propogateSetAxisButtonNameChange ()
 
void propogateSetStickButtonNameChange ()
 
void propagateSetSensorButtonNameChange ()
 Propagate button rename event to InputDevice. More...
 
void propogateSetDPadButtonNameChange ()
 
void propogateSetVDPadButtonNameChange ()
 
void propogateSetAxisNameChange ()
 
void propogateSetStickNameChange ()
 
void propagateSetSensorNameChange ()
 
void propogateSetDPadNameChange ()
 
void propogateSetVDPadNameChange ()
 

Detailed Description

A SetJoystick specialized for gamepads.

Constructor & Destructor Documentation

◆ GameControllerSet()

GameControllerSet::GameControllerSet ( InputDevice device,
int  index,
QObject *  parent = nullptr 
)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ applyHapticTrigger

void GameControllerSet::applyHapticTrigger ( )
slot

Applies haptic feedback to the triggers of the controller.

This fetches the current haptic feedback effects from all triggers of the controller, builds a low level message and sends the message to the controller.

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

◆ getElemFromXml()

void GameControllerSet::getElemFromXml ( QString  elemName,
QXmlStreamReader *  xml 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ populateSticksDPad()

void GameControllerSet::populateSticksDPad ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readConfig()

void GameControllerSet::readConfig ( QXmlStreamReader *  xml)
virtual

Deserializes the given XML stream into a SetJoystick object.

Parameters
[in]xmlThe XML stream to read from

Reimplemented from SetJoystickXml.

Here is the call graph for this function:

◆ refreshAxes()

void GameControllerSet::refreshAxes ( )
virtual

Reimplemented from SetJoystick.

Here is the call graph for this function:

◆ reset

void GameControllerSet::reset ( )
virtualslot
Here is the call graph for this function:

◆ resetSticks()

void GameControllerSet::resetSticks ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

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