AntiMicroX
Loading...
Searching...
No Matches
src
uihelpers
joytabwidgethelper.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 JOYTABWIDGETHELPER_H
20
#define JOYTABWIDGETHELPER_H
21
22
#include <QObject>
23
24
class
InputDevice
;
25
class
XMLConfigReader
;
26
class
XMLConfigWriter
;
27
28
class
JoyTabWidgetHelper
:
public
QObject
29
{
30
Q_OBJECT
31
32
public
:
33
explicit
JoyTabWidgetHelper
(
InputDevice
*
device
, QObject *
parent
=
nullptr
);
34
~JoyTabWidgetHelper
();
35
36
bool
hasReader
();
37
XMLConfigReader
*
getReader
();
38
39
bool
hasWriter
();
40
XMLConfigWriter
*
getWriter
();
41
42
bool
hasError
();
43
QString
getErrorString
();
44
45
protected
:
46
InputDevice
*
device
;
47
XMLConfigReader
*
reader
;
48
XMLConfigWriter
*
writer
;
49
bool
errorOccurred
;
50
QString
lastErrorString
;
51
52
public
slots
:
53
bool
readConfigFile
(
QString
filepath
);
54
bool
readConfigFileWithRevert
(
QString
filepath
);
55
bool
writeConfigFile
(
QString
filepath
);
56
void
reInitDevice
();
57
void
reInitDeviceWithRevert
();
58
};
59
60
#endif
// JOYTABWIDGETHELPER_H
InputDevice
Abstract class representing a hardware input device, e.g a joystick or controller.
Definition
inputdevice.h:51
JoyDPadXml
Definition
joydpadxml.h:27
JoyTabWidgetHelper
Definition
joytabwidgethelper.h:29
JoyTabWidgetHelper::getWriter
XMLConfigWriter * getWriter()
Definition
joytabwidgethelper.cpp:63
JoyTabWidgetHelper::hasWriter
bool hasWriter()
Definition
joytabwidgethelper.cpp:61
JoyTabWidgetHelper::lastErrorString
QString lastErrorString
Definition
joytabwidgethelper.h:50
JoyTabWidgetHelper::~JoyTabWidgetHelper
~JoyTabWidgetHelper()
Definition
joytabwidgethelper.cpp:42
JoyTabWidgetHelper::errorOccurred
bool errorOccurred
Definition
joytabwidgethelper.h:49
JoyTabWidgetHelper::writer
XMLConfigWriter * writer
Definition
joytabwidgethelper.h:48
JoyTabWidgetHelper::device
InputDevice * device
Definition
joytabwidgethelper.h:46
JoyTabWidgetHelper::hasReader
bool hasReader()
Definition
joytabwidgethelper.cpp:57
JoyTabWidgetHelper::getReader
XMLConfigReader * getReader()
Definition
joytabwidgethelper.cpp:59
JoyTabWidgetHelper::getErrorString
QString getErrorString()
Definition
joytabwidgethelper.cpp:67
JoyTabWidgetHelper::reader
XMLConfigReader * reader
Definition
joytabwidgethelper.h:47
JoyTabWidgetHelper::readConfigFileWithRevert
bool readConfigFileWithRevert(QString filepath)
Definition
joytabwidgethelper.cpp:99
JoyTabWidgetHelper::hasError
bool hasError()
Definition
joytabwidgethelper.cpp:65
JoyTabWidgetHelper::reInitDeviceWithRevert
void reInitDeviceWithRevert()
Definition
joytabwidgethelper.cpp:144
JoyTabWidgetHelper::writeConfigFile
bool writeConfigFile(QString filepath)
XML write entry point for the GUI.
Definition
joytabwidgethelper.cpp:109
JoyTabWidgetHelper::readConfigFile
bool readConfigFile(QString filepath)
XML read entry point for the GUI.
Definition
joytabwidgethelper.cpp:72
JoyTabWidgetHelper::reInitDevice
void reInitDevice()
Definition
joytabwidgethelper.cpp:129
XMLConfigReader
Main XML config reader class.
Definition
xmlconfigreader.h:34
XMLConfigWriter
Definition
xmlconfigwriter.h:30
Generated by
1.9.8