AntiMicroX
Loading...
Searching...
No Matches
joyaxisbutton.h
Go to the documentation of this file.
1/* antimicrox Gamepad to KB+M event mapper
2 * Copyright (C) 2015 Travis Nickles <nickles.travis@gmail.com>
3 * Copyright (C) 2020 Jagoda Górska <juliagoda.pl@protonmail>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef JOYAXISBUTTON_H
20#define JOYAXISBUTTON_H
21
23#include "logger.h"
24
25class VDPad;
26class SetJoystick;
27class JoyAxis;
28
30{
32
33 public:
34 explicit JoyAxisButton(JoyAxis *axis, int index, int originset, SetJoystick *parentSet, QObject *parent);
35
36 virtual QString getPartialName(bool forceFullFormat = false, bool displayNames = false) const;
37 virtual QString getXmlName();
38 virtual double getDistanceFromDeadZone();
39
40 virtual double getMouseDistanceFromDeadZone();
41 virtual double getLastMouseDistanceFromDeadZone();
42
43 virtual void setChangeSetCondition(SetChangeCondition condition, bool passive = false, bool updateActiveString = true);
44 virtual void setVDPad(VDPad *vdpad);
45 virtual void setTurboMode(TurboMode mode);
46 virtual bool isPartRealAxis();
47
48 virtual double getAccelerationDistance();
49 virtual double getLastAccelerationDistance();
50
51 JoyAxis *getAxis() const;
52
53 signals:
55
56 private:
58};
59
60#endif // JOYAXISBUTTON_H
Definition joyaxisbutton.h:30
virtual double getDistanceFromDeadZone()
Get the distance that an element is away from its assigned dead zone.
Definition joyaxisbutton.cpp:129
virtual void setTurboMode(TurboMode mode)
Set the turbo mode that the button should use.
Definition joyaxisbutton.cpp:151
virtual bool isPartRealAxis()
Check if button should be considered a part of a real controller axis. Needed for some dialogs so the...
Definition joyaxisbutton.cpp:165
virtual double getAccelerationDistance()
Definition joyaxisbutton.cpp:167
virtual void setChangeSetCondition(SetChangeCondition condition, bool passive=false, bool updateActiveString=true)
Definition joyaxisbutton.cpp:86
virtual double getLastAccelerationDistance()
Definition joyaxisbutton.cpp:169
virtual double getLastMouseDistanceFromDeadZone()
Definition joyaxisbutton.cpp:171
JoyAxis * getAxis() const
Definition joyaxisbutton.cpp:183
virtual void setVDPad(VDPad *vdpad)
Definition joyaxisbutton.cpp:137
void setAssignmentChanged(int current_button, int axis_index, int associated_set, int mode)
virtual QString getPartialName(bool forceFullFormat=false, bool displayNames=false) const
Definition joyaxisbutton.cpp:38
virtual double getMouseDistanceFromDeadZone()
Get the distance factor that should be used for mouse movement.
Definition joyaxisbutton.cpp:135
virtual QString getXmlName()
Definition joyaxisbutton.cpp:84
JoyAxis * m_axis
Definition joyaxisbutton.h:57
Represents single axis of of joystick (or other input)
Definition joyaxis.h:41
SetChangeCondition
Definition joybutton.h:55
TurboMode
Definition joybutton.h:86
Definition joydpadxml.h:27
Definition joygradientbutton.h:27
A set of mapped events which can by switched by a controller event. Contains controller input objects...
Definition setjoystick.h:40
Definition vdpad.h:27