AntiMicroX
Public Slots | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
GameControllerTrigger Class Reference

#include <gamecontrollertrigger.h>

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

Public Slots

virtual void reset ()
 
virtual void reset (int index)
 
- Public Slots inherited from JoyAxis
virtual void reset ()
 
virtual void reset (int index)
 
void propogateThrottleChange ()
 
void setDeadZone (int value)
 
void setMaxZoneValue (int value)
 
void setAxisName (QString tempName)
 
void setButtonsSpringRelativeStatus (bool value)
 
void setButtonsEasingDuration (double value)
 
void establishPropertyUpdatedConnection ()
 
void disconnectPropertyUpdatedConnection ()
 

Public Member Functions

 GameControllerTrigger (int index, int originset, SetJoystick *parentSet, QObject *parent=nullptr)
 
virtual QString getXmlName ()
 
virtual QString getPartialName (bool forceFullFormat, bool displayNames)
 
virtual int getDefaultDeadZone ()
 
virtual int getDefaultMaxZone ()
 
virtual ThrottleTypes getDefaultThrottle ()
 
virtual bool hasHapticTrigger () const override
 Checks if the trigger supports haptic feedback. More...
 
virtual HapticTriggerPs5getHapticTrigger () const override
 Recalculates haptic trigger effect positions, e.g. after dead zone change, and returns the current HapticTriggerPs5 object. More...
 
virtual void setHapticTriggerMode (HapticTriggerModePs5 mode) override
 Changes the haptic feedback effect mode. More...
 
- Public Member Functions inherited from JoyAxis
 JoyAxis (int index, int originset, SetJoystick *parentSet, QObject *parent)
 
virtual ~JoyAxis ()
 
void joyEvent (int value, bool ignoresets=false, bool updateLastValues=true)
 
void queuePendingEvent (int value, bool ignoresets=false, bool updateLastValues=true)
 
void activatePendingEvent ()
 
bool hasPendingEvent ()
 
void clearPendingEvent ()
 
bool inDeadZone (int value)
 
virtual QString getName (bool forceFullFormat=false, bool displayNames=false)
 
void setIndex (int index)
 
int getIndex ()
 
int getRealJoyIndex ()
 
JoyAxisButtongetPAxisButton ()
 
JoyAxisButtongetNAxisButton ()
 
int getDeadZone ()
 
int getMaxZoneValue ()
 
void setThrottle (int value)
 Set throttle value for axis. More...
 
void setInitialThrottle (int value)
 Set the initial calibrated throttle based on the first event passed by SDL. More...
 
void updateCurrentThrottledValue (int newValue)
 
int getThrottle ()
 
int getCurrentThrottledValue ()
 
int getCurrentRawValue ()
 
int getCurrentThrottledDeadValue ()
 
int getCurrentlyAssignedSet ()
 
JoyAxisButtongetAxisButtonByValue (int value)
 
double getDistanceFromDeadZone ()
 
double getDistanceFromDeadZone (int value)
 
double getRawDistance (int value)
 Get the current value for an axis in either direction converted to the range of -1.0 to 1.0. More...
 
void setControlStick (JoyControlStick *stick)
 
void removeControlStick (bool performRelease=true)
 
bool isPartControlStick ()
 
JoyControlStickgetControlStick ()
 
bool hasControlOfButtons ()
 
void removeVDPads ()
 
void setButtonsMouseMode (JoyButton::JoyMouseMovementMode mode)
 
bool hasSameButtonsMouseMode ()
 
JoyButton::JoyMouseMovementMode getButtonsPresetMouseMode ()
 
void setButtonsMouseCurve (JoyButton::JoyMouseCurve mouseCurve)
 
bool hasSameButtonsMouseCurve ()
 
JoyButton::JoyMouseCurve getButtonsPresetMouseCurve ()
 
void setButtonsSpringWidth (int value)
 
int getButtonsPresetSpringWidth ()
 
void setButtonsSpringHeight (int value)
 
int getButtonsPresetSpringHeight ()
 
void setButtonsSensitivity (double value)
 
double getButtonsPresetSensitivity ()
 
void setButtonsWheelSpeedX (int value)
 
void setButtonsWheelSpeedY (int value)
 
double getButtonsEasingDuration ()
 
bool isCalibrated () const
 Check if the axis is calibrated. More...
 
void resetCalibration ()
 Resets the axis calibration back to uncalibrated state. More...
 
void getCalibration (double *offset, double *gain) const
 Reads the axis calibration values. More...
 
void setCalibration (double offset, double gain)
 Sets the axis calibration values and sets the calibration flag. Calibrated value is calculated by the formula "a+b*x". More...
 
virtual QString getAxisName ()
 
virtual void setDefaultAxisName (QString tempname)
 
virtual QString getDefaultAxisName ()
 
SetJoystickgetParentSet ()
 
virtual bool isDefault ()
 
bool isRelativeSpring ()
 
void copyAssignments (JoyAxis *destAxis)
 
int getLastKnownThrottleValue ()
 
int getLastKnownRawValue ()
 
int getProperReleaseValue ()
 Determine an appropriate release value for an axis depending on the current throttle setting being used. More...
 
void setCurrentRawValue (int value)
 
void copyRawValues (JoyAxis *srcAxis)
 
void copyThrottledValues (JoyAxis *srcAxis)
 
void setExtraAccelerationCurve (JoyButton::JoyExtraAccelerationCurve curve)
 
JoyButton::JoyExtraAccelerationCurve getExtraAccelerationCurve ()
 
virtual void eventReset ()
 
int calculateThrottledValue (int value)
 

Static Public Attributes

static const ThrottleTypes DEFAULTTHROTTLE
 
- Static Public Attributes inherited from JoyAxis
static const ThrottleTypes DEFAULTTHROTTLE = JoyAxis::NormalThrottle
 

Protected Member Functions

void correctJoystickThrottle ()
 
- Protected Member Functions inherited from JoyAxis
void createDeskEvent (bool ignoresets=false)
 
void adjustRange ()
 
void performCalibration (int value)
 
void stickPassEvent (int value, bool ignoresets=false, bool updateLastValues=true)
 

Protected Attributes

HapticTriggerPs5m_haptic_trigger
 
- Protected Attributes inherited from JoyAxis
JoyAxisButtonpaxisbutton
 
JoyAxisButtonnaxisbutton
 
QString axisName
 
QString defaultAxisName
 
int throttle
 
int deadZone
 
int maxZoneValue
 
int currentRawValue
 
int currentThrottledValue
 
int currentThrottledDeadValue
 
int m_index
 
int lastKnownThottledValue
 
int lastKnownRawValue
 
int pendingValue
 
bool isActive
 
bool pendingEvent
 
bool pendingIgnoreSets
 
bool eventActive
 
JoyAxisButtonactiveButton
 

Additional Inherited Members

- Public Types inherited from JoyAxis
enum  ThrottleTypes {
  NegativeHalfThrottle = -2, NegativeThrottle = -1, NormalThrottle = 0, PositiveThrottle = 1,
  PositiveHalfThrottle = 2
}
 
- Signals inherited from JoyAxis
void active (int value)
 
void released (int value)
 
void moved (int value)
 
void throttleChangePropogated (int index)
 
void throttleChanged ()
 
void axisNameChanged ()
 
void propertyUpdated ()
 
void hapticTriggerChanged ()
 

Constructor & Destructor Documentation

◆ GameControllerTrigger()

GameControllerTrigger::GameControllerTrigger ( int  index,
int  originset,
SetJoystick parentSet,
QObject *  parent = nullptr 
)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ correctJoystickThrottle()

void GameControllerTrigger::correctJoystickThrottle ( )
protected
Here is the call graph for this function:

◆ getDefaultDeadZone()

int GameControllerTrigger::getDefaultDeadZone ( )
virtual

Reimplemented from JoyAxis.

◆ getDefaultMaxZone()

int GameControllerTrigger::getDefaultMaxZone ( )
virtual

Reimplemented from JoyAxis.

◆ getDefaultThrottle()

JoyAxis::ThrottleTypes GameControllerTrigger::getDefaultThrottle ( )
virtual

Reimplemented from JoyAxis.

◆ getHapticTrigger()

HapticTriggerPs5 * GameControllerTrigger::getHapticTrigger ( ) const
overridevirtual

Recalculates haptic trigger effect positions, e.g. after dead zone change, and returns the current HapticTriggerPs5 object.

Returns
Pointer to HapticTriggerPs5 object of this trigger.

Reimplemented from JoyAxis.

Here is the call graph for this function:

◆ getPartialName()

QString GameControllerTrigger::getPartialName ( bool  forceFullFormat,
bool  displayNames 
)
virtual

Reimplemented from JoyAxis.

Here is the call graph for this function:

◆ getXmlName()

QString GameControllerTrigger::getXmlName ( )
virtual

Reimplemented from JoyAxis.

◆ hasHapticTrigger()

bool GameControllerTrigger::hasHapticTrigger ( ) const
overridevirtual

Checks if the trigger supports haptic feedback.

Returns
True if the trigger supports haptic feedback, false otherwise.

Reimplemented from JoyAxis.

◆ reset [1/2]

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

◆ reset [2/2]

void GameControllerTrigger::reset ( int  index)
virtualslot
Here is the call graph for this function:

◆ setHapticTriggerMode()

void GameControllerTrigger::setHapticTriggerMode ( HapticTriggerModePs5  mode)
overridevirtual

Changes the haptic feedback effect mode.

Parameters
[in]modeNew haptic feedback effect mode.

Reimplemented from JoyAxis.

Here is the call graph for this function:

Field Documentation

◆ DEFAULTTHROTTLE

const GameControllerTrigger::ThrottleTypes GameControllerTrigger::DEFAULTTHROTTLE
static

◆ m_haptic_trigger

HapticTriggerPs5* GameControllerTrigger::m_haptic_trigger
protected

The documentation for this class was generated from the following files:
JoyAxis::PositiveHalfThrottle
@ PositiveHalfThrottle
Definition: joyaxis.h:54