AntiMicroX
Loading...
Searching...
No Matches
src
xml
inputdevicexml.h
Go to the documentation of this file.
1
/* antimicrox Gamepad to KB+M event mapper
2
* Copyright (C) 2020 Jagoda Górska <juliagoda.pl@protonmail>
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef INPUTDEVICEXML_H
19
#define INPUTDEVICEXML_H
20
21
#include <QMutex>
22
#include <QObject>
23
24
class
QXmlStreamReader
;
25
class
QXmlStreamWriter
;
26
class
InputDevice
;
27
class
AntiMicroSettings
;
28
37
class
InputDeviceXml
:
public
QObject
38
{
39
Q_OBJECT
40
public
:
41
explicit
InputDeviceXml
(
InputDevice
*
inputDevice
, QObject *
parent
=
nullptr
);
42
43
public
slots
:
44
45
void
readConfig
(
QXmlStreamReader
*xml);
// InputDeviceXml class
46
void
writeConfig
(
QXmlStreamWriter
*xml);
// InputDeviceXml class
47
48
signals
:
49
void
readConfigSig
(
QXmlStreamReader
*xml);
50
51
private
:
52
InputDevice
*
m_inputDevice
;
53
54
// ensures that readConfig returns when reading is finished even for reading in different thread
55
QMutex
m_mutex_read_config
;
56
};
57
58
#endif
// INPUTDEVICEXML_H
AntiMicroSettings
Definition
antimicrosettings.h:27
InputDeviceXml
Generic InputDevice XML serialization/deserialization helper class Reads data from the supplied Input...
Definition
inputdevicexml.h:38
InputDeviceXml::writeConfig
void writeConfig(QXmlStreamWriter *xml)
Serializes an InputDevice object into the the given XML stream.
Definition
inputdevicexml.cpp:381
InputDeviceXml::m_mutex_read_config
QMutex m_mutex_read_config
Definition
inputdevicexml.h:55
InputDeviceXml::readConfig
void readConfig(QXmlStreamReader *xml)
Deserializes the given XML stream into an InputDevice object.
Definition
inputdevicexml.cpp:47
InputDeviceXml::readConfigSig
void readConfigSig(QXmlStreamReader *xml)
InputDeviceXml::m_inputDevice
InputDevice * m_inputDevice
Definition
inputdevicexml.h:52
InputDevice
Abstract class representing a hardware input device, e.g a joystick or controller.
Definition
inputdevice.h:51
JoyDPadXml
Definition
joydpadxml.h:27
Generated by
1.9.8