AntiMicroX
Loading...
Searching...
No Matches
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
26class InputDevice;
28
37class InputDeviceXml : public QObject
38{
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:
50
51 private:
53
54 // ensures that readConfig returns when reading is finished even for reading in different thread
56};
57
58#endif // INPUTDEVICEXML_H
Definition antimicrosettings.h:27
Generic InputDevice XML serialization/deserialization helper class Reads data from the supplied Input...
Definition inputdevicexml.h:38
void writeConfig(QXmlStreamWriter *xml)
Serializes an InputDevice object into the the given XML stream.
Definition inputdevicexml.cpp:381
QMutex m_mutex_read_config
Definition inputdevicexml.h:55
void readConfig(QXmlStreamReader *xml)
Deserializes the given XML stream into an InputDevice object.
Definition inputdevicexml.cpp:47
void readConfigSig(QXmlStreamReader *xml)
InputDevice * m_inputDevice
Definition inputdevicexml.h:52
Abstract class representing a hardware input device, e.g a joystick or controller.
Definition inputdevice.h:51
Definition joydpadxml.h:27