![]() |
AntiMicroX
|
Represents single axis of of joystick (or other input) More...
#include <joyaxis.h>
Public Types | |
enum | ThrottleTypes { NegativeHalfThrottle = -2, NegativeThrottle = -1, NormalThrottle = 0, PositiveThrottle = 1, PositiveHalfThrottle = 2 } |
Public Slots | |
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 () |
Signals | |
void | active (int value) |
void | released (int value) |
void | moved (int value) |
void | throttleChangePropogated (int index) |
void | throttleChanged () |
void | axisNameChanged () |
void | propertyUpdated () |
void | hapticTriggerChanged () |
Public Member Functions | |
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) |
virtual QString | getPartialName (bool forceFullFormat=false, bool displayNames=false) |
virtual QString | getXmlName () |
void | setIndex (int index) |
int | getIndex () |
int | getRealJoyIndex () |
JoyAxisButton * | getPAxisButton () |
JoyAxisButton * | getNAxisButton () |
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 () |
JoyAxisButton * | getAxisButtonByValue (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 () |
JoyControlStick * | getControlStick () |
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 int | getDefaultDeadZone () |
virtual int | getDefaultMaxZone () |
virtual ThrottleTypes | getDefaultThrottle () |
virtual void | setDefaultAxisName (QString tempname) |
virtual QString | getDefaultAxisName () |
SetJoystick * | getParentSet () |
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) |
virtual bool | hasHapticTrigger () const |
Checks if the axis supports haptic trigger feedback. More... | |
virtual HapticTriggerPs5 * | getHapticTrigger () const |
Always returns nullptr for JoyAxis base objects. More... | |
virtual void | setHapticTriggerMode (HapticTriggerModePs5) |
Changes the haptic trigger effect mode. More... | |
Static Public Attributes | |
static const ThrottleTypes | DEFAULTTHROTTLE = JoyAxis::NormalThrottle |
Protected Member Functions | |
void | createDeskEvent (bool ignoresets=false) |
void | adjustRange () |
void | performCalibration (int value) |
void | stickPassEvent (int value, bool ignoresets=false, bool updateLastValues=true) |
Protected Attributes | |
JoyAxisButton * | paxisbutton |
JoyAxisButton * | naxisbutton |
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 |
JoyAxisButton * | activeButton |
Private Member Functions | |
void | resetPrivateVars () |
Private Attributes | |
int | m_originset |
JoyControlStick * | m_stick |
SetJoystick * | m_parentSet |
bool | m_calibrated |
double | m_offset |
double | m_gain |
Represents single axis of of joystick (or other input)
|
explicit |
|
virtual |
void JoyAxis::activatePendingEvent | ( | ) |
|
signal |
|
protected |
|
signal |
int JoyAxis::calculateThrottledValue | ( | int | value | ) |
void JoyAxis::clearPendingEvent | ( | ) |
|
protected |
|
slot |
|
slot |
|
virtual |
JoyAxisButton * JoyAxis::getAxisButtonByValue | ( | int | value | ) |
|
virtual |
double JoyAxis::getButtonsEasingDuration | ( | ) |
JoyButton::JoyMouseCurve JoyAxis::getButtonsPresetMouseCurve | ( | ) |
JoyButton::JoyMouseMovementMode JoyAxis::getButtonsPresetMouseMode | ( | ) |
double JoyAxis::getButtonsPresetSensitivity | ( | ) |
int JoyAxis::getButtonsPresetSpringHeight | ( | ) |
int JoyAxis::getButtonsPresetSpringWidth | ( | ) |
void JoyAxis::getCalibration | ( | double * | offset, |
double * | gain | ||
) | const |
Reads the axis calibration values.
[out] | offset | Offset value "a" |
[out] | gain | Gain value "b" |
JoyControlStick * JoyAxis::getControlStick | ( | ) |
int JoyAxis::getCurrentlyAssignedSet | ( | ) |
int JoyAxis::getCurrentRawValue | ( | ) |
int JoyAxis::getCurrentThrottledDeadValue | ( | ) |
int JoyAxis::getCurrentThrottledValue | ( | ) |
int JoyAxis::getDeadZone | ( | ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in GameControllerTrigger.
double JoyAxis::getDistanceFromDeadZone | ( | ) |
double JoyAxis::getDistanceFromDeadZone | ( | int | value | ) |
JoyButton::JoyExtraAccelerationCurve JoyAxis::getExtraAccelerationCurve | ( | ) |
|
virtual |
Always returns nullptr for JoyAxis base objects.
Reimplemented in GameControllerTrigger.
int JoyAxis::getIndex | ( | ) |
int JoyAxis::getLastKnownRawValue | ( | ) |
int JoyAxis::getLastKnownThrottleValue | ( | ) |
int JoyAxis::getMaxZoneValue | ( | ) |
|
virtual |
JoyAxisButton * JoyAxis::getNAxisButton | ( | ) |
SetJoystick * JoyAxis::getParentSet | ( | ) |
|
virtual |
Reimplemented in GameControllerTrigger.
JoyAxisButton * JoyAxis::getPAxisButton | ( | ) |
int JoyAxis::getProperReleaseValue | ( | ) |
Determine an appropriate release value for an axis depending on the current throttle setting being used.
double JoyAxis::getRawDistance | ( | int | value | ) |
Get the current value for an axis in either direction converted to the range of -1.0 to 1.0.
Current | interger value of the axis |
int JoyAxis::getRealJoyIndex | ( | ) |
int JoyAxis::getThrottle | ( | ) |
|
virtual |
|
signal |
bool JoyAxis::hasControlOfButtons | ( | ) |
|
virtual |
Checks if the axis supports haptic trigger feedback.
Reimplemented in GameControllerTrigger.
bool JoyAxis::hasPendingEvent | ( | ) |
bool JoyAxis::hasSameButtonsMouseCurve | ( | ) |
bool JoyAxis::hasSameButtonsMouseMode | ( | ) |
bool JoyAxis::inDeadZone | ( | int | value | ) |
bool JoyAxis::isCalibrated | ( | ) | const |
Check if the axis is calibrated.
|
virtual |
bool JoyAxis::isPartControlStick | ( | ) |
bool JoyAxis::isRelativeSpring | ( | ) |
void JoyAxis::joyEvent | ( | int | value, |
bool | ignoresets = false , |
||
bool | updateLastValues = true |
||
) |
|
signal |
|
protected |
|
signal |
|
slot |
void JoyAxis::queuePendingEvent | ( | int | value, |
bool | ignoresets = false , |
||
bool | updateLastValues = true |
||
) |
|
signal |
void JoyAxis::removeControlStick | ( | bool | performRelease = true | ) |
void JoyAxis::removeVDPads | ( | ) |
|
virtualslot |
|
virtualslot |
void JoyAxis::resetCalibration | ( | ) |
Resets the axis calibration back to uncalibrated state.
|
private |
|
slot |
|
slot |
void JoyAxis::setButtonsMouseCurve | ( | JoyButton::JoyMouseCurve | mouseCurve | ) |
void JoyAxis::setButtonsMouseMode | ( | JoyButton::JoyMouseMovementMode | mode | ) |
void JoyAxis::setButtonsSensitivity | ( | double | value | ) |
void JoyAxis::setButtonsSpringHeight | ( | int | value | ) |
|
slot |
void JoyAxis::setButtonsSpringWidth | ( | int | value | ) |
void JoyAxis::setButtonsWheelSpeedX | ( | int | value | ) |
void JoyAxis::setButtonsWheelSpeedY | ( | int | value | ) |
void JoyAxis::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".
void JoyAxis::setControlStick | ( | JoyControlStick * | stick | ) |
void JoyAxis::setCurrentRawValue | ( | int | value | ) |
|
slot |
|
virtual |
void JoyAxis::setExtraAccelerationCurve | ( | JoyButton::JoyExtraAccelerationCurve | curve | ) |
|
virtual |
Changes the haptic trigger effect mode.
[in] | mode | New haptic trigger effect mode. |
Reimplemented in GameControllerTrigger.
void JoyAxis::setIndex | ( | int | index | ) |
void JoyAxis::setInitialThrottle | ( | int | value | ) |
Set the initial calibrated throttle based on the first event passed by SDL.
Current | value for axis. |
|
slot |
void JoyAxis::setThrottle | ( | int | value | ) |
Set throttle value for axis.
Current | value for axis. |
|
protected |
|
signal |
|
signal |
void JoyAxis::updateCurrentThrottledValue | ( | int | newValue | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |