AntiMicroX
Loading...
Searching...
No Matches
gamecontrollerset.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 GAMECONTROLLERSET_H
20#define GAMECONTROLLERSET_H
21
22#include "setjoystick.h"
23
24#include <SDL2/SDL_gamecontroller.h>
25
27class InputDevice;
28
33{
35
36 public:
37 explicit GameControllerSet(InputDevice *device, int index, QObject *parent = nullptr);
38
39 virtual void refreshAxes();
40
41 virtual void readConfig(QXmlStreamReader *xml);
42
43 protected:
44 void populateSticksDPad();
45
46 public slots:
47 virtual void reset();
48 void applyHapticTrigger();
49
50 private:
52 void resetSticks();
53};
54
55#endif // GAMECONTROLLERSET_H
A SetJoystick specialized for gamepads.
Definition gamecontrollerset.h:33
void resetSticks()
Definition gamecontrollerset.cpp:62
void getElemFromXml(QString elemName, QXmlStreamReader *xml)
Definition gamecontrollerset.cpp:165
virtual void reset()
Definition gamecontrollerset.cpp:42
virtual void readConfig(QXmlStreamReader *xml)
Deserializes the given XML stream into a SetJoystick object.
Definition gamecontrollerset.cpp:123
virtual void refreshAxes()
Definition gamecontrollerset.cpp:233
void applyHapticTrigger()
Applies haptic feedback to the triggers of the controller.
Definition gamecontrollerset.cpp:50
void populateSticksDPad()
Definition gamecontrollerset.cpp:68
Abstract class representing a hardware input device, e.g a joystick or controller.
Definition inputdevice.h:51
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