![]() |
AntiMicroX
|
Represents a gyroscope mapping in a SetJoystick. More...
#include <joygyroscopebutton.h>
Public Member Functions | |
JoyGyroscopeButton (JoySensor *sensor, int index, int originset, SetJoystick *parentSet, QObject *parent) | |
virtual QString | getDirectionName () const override |
Get translated gyroscope direction name of this button. More... | |
![]() | |
JoySensorButton (JoySensor *sensor, int index, int originset, SetJoystick *parentSet, QObject *parent) | |
virtual int | getRealJoyNumber () const override |
Get a 0 indexed number of button. More... | |
virtual QString | getPartialName (bool forceFullFormat=false, bool displayNames=false) const override |
Get the name of the button. Shows the sensor direction name instead of a button number. More... | |
virtual QString | getXmlName () override |
Get the XML tag name of this button type. More... | |
virtual double | getDistanceFromDeadZone () override |
Get the distance that an element is away from its assigned dead zone. More... | |
virtual double | getMouseDistanceFromDeadZone () override |
Get the distance factor that should be used for mouse movement. More... | |
virtual void | setChangeSetCondition (SetChangeCondition condition, bool passive=false, bool updateActiveString=true) override |
virtual bool | isPartRealAxis () override |
Check if button should be considered a part of a real controller axis. Needed for some dialogs so the program won't have to resort to type checking. More... | |
virtual JoyMouseCurve | getDefaultMouseCurve () const override |
Returns the default mouse curve for JoySensorButtons. More... | |
JoySensor * | getSensor () const |
Get the JoySensor associated to this button. More... | |
JoySensorDirection | getDirection () const |
returns the direction of this button. More... | |
![]() | |
JoyGradientButton (int sdl_button_index, int originset, SetJoystick *parentSet, QObject *parent) | |
virtual QString | getPartialName (bool forceFullFormat=false, bool displayNames=false) const |
virtual void | setChangeSetCondition (SetChangeCondition condition, bool passive=false, bool updateActiveString=true) |
![]() | |
JoyButton (int sdl_button_index, int originset, SetJoystick *parentSet, QObject *parent) | |
~JoyButton () | |
void | joyEvent (bool pressed, bool ignoresets=false) |
Activates mapped slots and generates QT events which highlight pressed controller buttons. More... | |
void | queuePendingEvent (bool pressed, bool ignoresets=false) |
void | activatePendingEvent () |
void | setJoyNumber (int index) |
void | clearPendingEvent () |
void | setCustomName (QString name) |
void | setUpdateInitAccel (bool state) |
void | removeVDPad () |
void | setIgnoreEventState (bool ignore) |
void | setMouseMode (JoyMouseMovementMode mousemode) |
void | setMouseCurve (JoyMouseCurve selectedCurve) |
void | setWhileHeldStatus (bool status) |
void | setCycleResetStatus (bool enabled) |
void | copyAssignments (JoyButton *destButton) |
Copy assignments and properties from one button to another. Used for set copying. More... | |
void | resetAccelerationDistances () |
void | setExtraAccelerationStatus (bool status) |
void | setExtraAccelerationMultiplier (double value) |
void | setCycleResetTime (int interval) |
void | setMinAccelThreshold (double value) |
void | setExtraAccelerationCurve (JoyExtraAccelerationCurve curve) |
void | setSpringDeadCircleMultiplier (int value) |
void | setAccelExtraDuration (double value) |
void | setStartAccelMultiplier (double value) |
void | setMaxAccelThreshold (double value) |
void | setChangeSetSelection (int index, bool updateActiveString=true) |
void | activateMiniSlots (JoyButtonSlot *slot, JoyButtonSlot *mix) |
bool | hasPendingEvent () |
bool | getToggleState () |
bool | isUsingTurbo () |
bool | getButtonState () |
Checks if this button is currently active. More... | |
bool | containsSequence () |
bool | containsDistanceSlots () |
bool | containsReleaseSlots () |
bool | getIgnoreEventState () |
bool | getWhileHeldStatus () |
bool | hasActiveSlots () |
bool | isCycleResetActive () |
bool | isRelativeSpring () |
bool | isPartVDPad () |
bool | isExtraAccelerationEnabled () |
double | getMinAccelThreshold () |
double | getMaxAccelThreshold () |
double | getStartAccelMultiplier () |
double | getAccelExtraDuration () |
double | getExtraAccelerationMultiplier () |
double | getSensitivity () |
double | getEasingDuration () |
int | getJoyNumber () |
Get 0 indexed number of SDL button index. More... | |
int | getTurboInterval () |
int | getMouseSpeedX () |
int | getMouseSpeedY () |
int | getWheelSpeedX () |
int | getWheelSpeedY () |
int | getSetSelection () |
int | getOriginSet () |
int | getSpringWidth () |
int | getSpringHeight () |
int | getCycleResetTime () |
int | getSpringDeadCircleMultiplier () |
QString | getCustomName () |
QString | getActionName () |
QString | getButtonName () |
QList< JoyButtonSlot * > * | getAssignedSlots () |
const QList< JoyButtonSlot * > & | getActiveSlots () |
virtual bool | isModifierButton () |
bool | isDefault () |
Check if button properties are at their default values. More... | |
virtual double | getLastMouseDistanceFromDeadZone () |
virtual double | getAccelerationDistance () |
virtual double | getLastAccelerationDistance () |
virtual void | initializeDistanceValues () |
virtual void | setTurboMode (TurboMode mode) |
Set the turbo mode that the button should use. More... | |
virtual void | setDefaultButtonName (QString tempname) |
virtual void | copyLastMouseDistanceFromDeadZone (JoyButton *srcButton) |
virtual void | copyLastAccelerationDistance (JoyButton *srcButton) |
virtual void | setVDPad (VDPad *vdpad) |
virtual QString | getSlotsSummary () |
Generate a string representing a summary of the slots currently assigned to a button. More... | |
virtual QString | getSlotsString () |
Generate a string representing all the currently assigned slots for a button. More... | |
virtual QString | getActiveZoneSummary () |
Generate a string that represents slots that will be activated or slots that are currently active if a button is pressed. More... | |
virtual QString | getCalculatedActiveZoneSummary () |
virtual QString | getName (bool forceFullFormat=false, bool displayNames=false) |
virtual QString | getDefaultButtonName () |
virtual QList< JoyButtonSlot * > | getActiveZoneList () |
SetChangeCondition | getChangeSetCondition () |
VDPad * | getVDPad () |
JoyMouseMovementMode | getMouseMode () |
JoyMouseCurve | getMouseCurve () |
SetJoystick * | getParentSet () |
TurboMode | getTurboMode () |
Get currently assigned turbo mode. More... | |
JoyExtraAccelerationCurve | getExtraAccelerationCurve () |
bool | insertAssignedSlot (JoyButtonSlot *slot, bool updateActiveString=true) |
bool | insertAssignedSlot (JoyButtonSlot *newSlot, int index, bool updateActiveString=true) |
bool | containsJoyMixSlot () |
Additional Inherited Members | |
![]() | |
enum | SetChangeCondition { SetChangeDisabled = 0, SetChangeOneWay, SetChangeTwoWay, SetChangeWhileHeld } |
enum | JoyMouseMovementMode { MouseCursor = 0, MouseSpring } |
enum | JoyMouseCurve { EnhancedPrecisionCurve = 0, LinearCurve, QuadraticCurve, CubicCurve, QuadraticExtremeCurve, PowerCurve, EasingQuadraticCurve, EasingCubicCurve } |
enum | JoyExtraAccelerationCurve { LinearAccelCurve, EaseOutSineCurve, EaseOutQuadAccelCurve, EaseOutCubicAccelCurve } |
enum | TurboMode { NormalTurbo = 0, GradientTurbo, PulseTurbo } |
typedef struct JoyButton::_mouseCursorInfo | mouseCursorInfo |
![]() | |
void | setTurboInterval (int interval) |
void | setToggle (bool toggle) |
void | setUseTurbo (bool useTurbo) |
void | setMouseSpeedX (int speed) |
void | setMouseSpeedY (int speed) |
void | setWheelSpeed (int speed, QChar ax) |
void | setSpringWidth (int value) |
void | setSpringHeight (int value) |
void | setSensitivity (double value) |
void | setSpringRelativeStatus (bool value) |
void | setActionName (QString tempName) |
void | setButtonName (QString tempName) |
void | setEasingDuration (double value) |
void | establishPropertyUpdatedConnections () |
void | disconnectPropertyUpdatedConnections () |
void | removeAssignedSlot (int index) |
virtual void | reset () |
virtual void | reset (int index) |
virtual void | resetProperties () |
virtual void | clearSlotsEventReset (bool clearSignalEmit=true) |
virtual void | eventReset () |
virtual void | mouseEvent () |
Calculate mouse movement coordinates for mouse movement slots currently active. More... | |
static void | establishMouseTimerConnections () |
Change initial settings used for mouse event timer being used by the application. More... | |
bool | setAssignedSlot (int code, int alias, int index, JoyButtonSlot::JoySlotInputAction mode=JoyButtonSlot::JoyKeyboard) |
Create new JoyButtonSlot with data provided and replace an existing slot in the assignment list if one exists. More... | |
bool | setAssignedSlot (int code, JoyButtonSlot::JoySlotInputAction mode=JoyButtonSlot::JoyKeyboard) |
Create new JoyButtonSlot with data provided and append the new slot an existing to the assignment list. More... | |
bool | setAssignedSlot (int code, int alias, JoyButtonSlot::JoySlotInputAction mode=JoyButtonSlot::JoyKeyboard) |
Create new JoyButtonSlot with data provided and append the new slot an existing to the assignment list. More... | |
bool | setAssignedSlot (JoyButtonSlot *otherSlot, int index) |
bool | insertAssignedSlot (int code, int alias, int index, JoyButtonSlot::JoySlotInputAction mode=JoyButtonSlot::JoyKeyboard) |
Create new JoyButtonSlot with data provided and insert it into assignments list if it is valid. More... | |
void | buildActiveZoneSummaryString () |
Generate active zone string and notify other objects. More... | |
![]() | |
void | setAssignmentChanged (JoySensorDirection direction, JoySensorType type, int associated_set, int mode) |
![]() | |
void | clicked (int index) |
void | released (int index) |
void | keyChanged (int keycode) |
void | mouseChanged (int mousecode) |
void | setChangeActivated (int index) |
void | setAssignmentChanged (int current_button, int associated_set, int mode) |
void | finishedPause () |
void | turboChanged (bool state) |
void | toggleChanged (bool state) |
void | turboIntervalChanged (int interval) |
void | slotsChanged () |
void | actionNameChanged () |
void | buttonNameChanged () |
void | propertyUpdated () |
void | activeZoneChanged () |
![]() | |
static int | calculateFinalMouseSpeed (JoyMouseCurve curve, int value, const float joyspeed) |
Calculate maximum mouse speed when using a given mouse curve. More... | |
static bool | hasCursorEvents (QList< JoyButton::mouseCursorInfo > *cursorXSpeedsList, QList< JoyButton::mouseCursorInfo > *cursorYSpeedsList) |
static bool | hasSpringEvents (QList< PadderCommon::springModeInfo > *springXSpeedsList, QList< PadderCommon::springModeInfo > *springYSpeedsList) |
static bool | shouldInvokeMouseEvents (QList< JoyButton * > *pendingMouseButtons, QTimer *staticMouseEventTimer, QElapsedTimer *testOldMouseTime) |
static void | setWeightModifier (double modifier, double maxWeightModifier, double &weightModifier) |
Set the weight modifier to use for mouse smoothing. More... | |
static void | moveMouseCursor (int &movedX, int &movedY, int &movedElapsed, QList< double > *mouseHistoryX, QList< double > *mouseHistoryY, QElapsedTimer *testOldMouseTime, QTimer *staticMouseEventTimer, int mouseRefreshRate, int mouseHistorySize, QList< JoyButton::mouseCursorInfo > *cursorXSpeeds, QList< JoyButton::mouseCursorInfo > *cursorYSpeeds, double &cursorRemainderX, double &cursorRemainderY, double weightModifier, int idleMouseRefrRate, QList< JoyButton * > *pendingMouseButtonse) |
Take cursor mouse information provided by all buttons and send a cursor mode mouse event to the display server. More... | |
static void | moveSpringMouse (int &movedX, int &movedY, bool &hasMoved, int springModeScreen, QList< PadderCommon::springModeInfo > *springXSpeeds, QList< PadderCommon::springModeInfo > *springYSpeeds, QList< JoyButton * > *pendingMouseButtons, int mouseRefreshRate, int idleMouseRefrRate, QTimer *staticMouseEventTimer) |
Take spring mouse information provided by all buttons and send a spring mode mouse event to the display server. More... | |
static void | setMouseHistorySize (int size, int maxMouseHistSize, int &mouseHistSize, QList< double > *mouseHistoryX, QList< double > *mouseHistoryY) |
Set mouse history buffer size used for mouse smoothing. More... | |
static void | setMouseRefreshRate (int refresh, int &mouseRefreshRate, int idleMouseRefrRate, JoyButtonMouseHelper *mouseHelper, QList< double > *mouseHistoryX, QList< double > *mouseHistoryY, QElapsedTimer *testOldMouseTime, QTimer *staticMouseEventTimer) |
Set the mouse refresh rate when a mouse slot is active. More... | |
static void | setSpringModeScreen (int screen, int &springModeScreen) |
static void | resetActiveButtonMouseDistances (JoyButtonMouseHelper *mouseHelper) |
static void | setGamepadRefreshRate (int refresh, int &gamepadRefreshRate, JoyButtonMouseHelper *mouseHelper) |
Set the gamepad poll rate to be used in the application. More... | |
static void | restartLastMouseTime (QElapsedTimer *testOldMouseTime) |
static void | setStaticMouseThread (QThread *thread, QTimer *staticMouseEventTimer, QElapsedTimer *testOldMouseTime, int idleMouseRefrRate, JoyButtonMouseHelper *mouseHelper) |
static void | indirectStaticMouseThread (QThread *thread, QTimer *staticMouseEventTimer, JoyButtonMouseHelper *mouseHelper) |
static void | invokeMouseEvents (JoyButtonMouseHelper *mouseHelper) |
static JoyButtonMouseHelper * | getMouseHelper () |
static QList< JoyButton * > * | getPendingMouseButtons () |
Get the list of buttons that have a pending mouse movement event. More... | |
static QList< JoyButton::mouseCursorInfo > * | getCursorXSpeeds () |
static QList< JoyButton::mouseCursorInfo > * | getCursorYSpeeds () |
static QList< PadderCommon::springModeInfo > * | getSpringXSpeeds () |
static QList< PadderCommon::springModeInfo > * | getSpringYSpeeds () |
static QTimer * | getStaticMouseEventTimer () |
static QElapsedTimer * | getTestOldMouseTime () |
![]() | |
static const JoyMouseCurve | DEFAULTMOUSECURVE = JoyButton::EnhancedPrecisionCurve |
static const SetChangeCondition | DEFAULTSETCONDITION = JoyButton::SetChangeDisabled |
static const JoyMouseMovementMode | DEFAULTMOUSEMODE = JoyButton::MouseCursor |
static const TurboMode | DEFAULTTURBOMODE = JoyButton::NormalTurbo |
static const JoyExtraAccelerationCurve | DEFAULTEXTRAACCELCURVE = JoyButton::LinearAccelCurve |
![]() | |
virtual void | turboEvent () |
Activate a turbo event on a button. More... | |
virtual void | wheelEventVertical () |
virtual void | wheelEventHorizontal () |
![]() | |
virtual void | turboEvent () |
virtual void | wheelEventVertical () |
virtual void | wheelEventHorizontal () |
void | createDeskEvent () |
void | releaseDeskEvent (bool skipsetchange=false) |
![]() | |
int | getPreferredKeyPressTime () |
Obtain the appropriate key press time for the current event. Order of preference: active key press time slot value -> profile value -> program default value. More... | |
double | getTotalSlotDistance (JoyButtonSlot *slot) |
bool | distanceEvent () |
bool | checkForDelaySequence () |
TODO: CHECK IF METHOD WOULD BE USEFUL. CURRENTLY NOT USED. More... | |
void | clearAssignedSlots (bool signalEmit=true) |
void | releaseSlotEvent () |
void | checkForPressedSetChange () |
void | checkTurboCondition (JoyButtonSlot *slot) |
Check if turbo should be disabled for a slot. More... | |
void | vdpadPassEvent (bool pressed, bool ignoresets=false) |
void | localBuildActiveZoneSummaryString () |
Generate active zone string but do not notify any other object. More... | |
virtual double | getCurrentSpringDeadCircle () |
QString | buildActiveZoneSummary (QList< JoyButtonSlot * > &tempList) |
![]() | |
static bool | hasFutureSpringEvents (QList< JoyButton * > *pendingMouseButtons) |
![]() | |
TurboMode | currentTurboMode |
int | m_index_sdl |
int | turboInterval |
int | wheelSpeedX |
int | wheelSpeedY |
int | setSelection |
int | tempTurboInterval |
int | springDeadCircleMultiplier |
bool | isButtonPressed |
bool | isKeyPressed |
double | lastDistance |
double | lastWheelVerticalDistance |
double | lastWheelHorizontalDistance |
QTimer | turboTimer |
QTimer | mouseWheelVerticalEventTimer |
QTimer | mouseWheelHorizontalEventTimer |
QElapsedTimer | wheelVerticalTime |
QElapsedTimer | wheelHorizontalTime |
QElapsedTimer | turboHold |
QPointer< SetJoystick > | m_parentSet |
SetChangeCondition | setSelectionCondition |
JoyButtonSlot * | currentWheelVerticalEvent |
JoyButtonSlot * | currentWheelHorizontalEvent |
QQueue< bool > | ignoreSetQueue |
QQueue< bool > | isButtonPressedQueue |
QQueue< JoyButtonSlot * > | mouseWheelVerticalEventQueue |
QQueue< JoyButtonSlot * > | mouseWheelHorizontalEventQueue |
QString | buttonName |
QString | defaultButtonName |
![]() | |
static int | timeBetweenMiniSlots = 55 |
static int | allSlotTimeBetweenSlots = 0 |
static QList< JoyButtonSlot * > | mouseSpeedModList |
static QList< mouseCursorInfo > | cursorXSpeeds |
static QList< mouseCursorInfo > | cursorYSpeeds |
static QList< PadderCommon::springModeInfo > | springXSpeeds |
static QList< PadderCommon::springModeInfo > | springYSpeeds |
static QList< JoyButton * > | pendingMouseButtons |
static JoyButtonSlot * | lastActiveKey = nullptr |
static JoyButtonMouseHelper | mouseHelper |
Represents a gyroscope mapping in a SetJoystick.
|
explicit |
|
overridevirtual |
Get translated gyroscope direction name of this button.
Implements JoySensorButton.