AntiMicroX
Loading...
Searching...
No Matches
gamecontrollertrigger.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 GAMECONTROLLERTRIGGER_H
20#define GAMECONTROLLERTRIGGER_H
21
22#include "joyaxis.h"
23
27class SetJoystick;
28
30{
32
33 public:
34 explicit GameControllerTrigger(int index, int originset, SetJoystick *parentSet, QObject *parent = nullptr);
35
36 virtual QString getXmlName(); // GameControllerTriggerXml class
37 virtual QString getPartialName(bool forceFullFormat, bool displayNames);
38
39 virtual int getDefaultDeadZone();
40 virtual int getDefaultMaxZone();
42
44
45 virtual bool hasHapticTrigger() const override;
46 virtual HapticTriggerPs5 *getHapticTrigger() const override;
47 virtual void setHapticTriggerMode(HapticTriggerModePs5 mode) override;
48
49 public slots:
50 virtual void reset();
51 virtual void reset(int index);
52
53 protected:
55
57};
58
59#endif // GAMECONTROLLERTRIGGER_H
Definition gamecontrollertrigger.h:30
HapticTriggerPs5 * m_haptic_trigger
Definition gamecontrollertrigger.h:56
virtual HapticTriggerPs5 * getHapticTrigger() const override
Recalculates haptic trigger effect positions, e.g. after dead zone change, and returns the current Ha...
Definition gamecontrollertrigger.cpp:148
virtual int getDefaultMaxZone()
Definition gamecontrollertrigger.cpp:130
virtual ThrottleTypes getDefaultThrottle()
Definition gamecontrollertrigger.cpp:132
virtual int getDefaultDeadZone()
Definition gamecontrollertrigger.cpp:128
static const ThrottleTypes DEFAULTTHROTTLE
Definition gamecontrollertrigger.h:43
virtual QString getPartialName(bool forceFullFormat, bool displayNames)
Definition gamecontrollertrigger.cpp:88
virtual void reset()
Definition gamecontrollertrigger.cpp:61
void correctJoystickThrottle()
Definition gamecontrollertrigger.cpp:117
virtual QString getXmlName()
Definition gamecontrollertrigger.cpp:86
virtual void setHapticTriggerMode(HapticTriggerModePs5 mode) override
Changes the haptic feedback effect mode.
Definition gamecontrollertrigger.cpp:185
virtual bool hasHapticTrigger() const override
Checks if the trigger supports haptic feedback.
Definition gamecontrollertrigger.cpp:141
Represents a single haptic trigger effect on a PS5 controller. See https://gist.github....
Definition haptictriggerps5.h:34
Represents single axis of of joystick (or other input)
Definition joyaxis.h:41
ThrottleTypes
Definition joyaxis.h:49
Definition joydpadxml.h:27
A set of mapped events which can by switched by a controller event. Contains controller input objects...
Definition setjoystick.h:40
HapticTriggerModePs5
Enum of the supported haptic trigger effect for a PS5 controller.
Definition haptictriggermodeps5.h:23