AntiMicroX
setjoystickxml.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 SETJOYSTICKXML_H
19 #define SETJOYSTICKXML_H
20 
21 #include <QObject>
22 
23 class SetJoystick;
24 class JoyAxisXml;
25 class JoyButtonXml;
26 class QXmlStreamReader;
27 class QXmlStreamWriter;
28 
34 class SetJoystickXml : public QObject
35 {
36  Q_OBJECT
37 
38  public:
39  explicit SetJoystickXml(SetJoystick *setJoystick, QObject *parent = nullptr);
40 
41  virtual void readConfig(QXmlStreamReader *xml);
42  virtual void writeConfig(QXmlStreamWriter *xml);
43 
44  private:
46 
47  // JoyDPadXml* joydpadXml;
50 };
51 
52 #endif // SETJOYSTICKXML_H
SetJoystickXml::readConfig
virtual void readConfig(QXmlStreamReader *xml)
Deserializes the given XML stream into a SetJoystick object.
Definition: setjoystickxml.cpp:50
SetJoystick::getIndex
int getIndex() const
Definition: setjoystick.cpp:507
joycontrolstick.h
SetJoystick::getSensor
JoySensor * getSensor(JoySensorType type) const
Definition: setjoystick.cpp:71
SetJoystickXml::joyAxisXml
JoyAxisXml * joyAxisXml
Definition: setjoystickxml.h:48
JoyAxis
Represents single axis of of joystick (or other input)
Definition: joyaxis.h:40
JoyAxis::hasControlOfButtons
bool hasControlOfButtons()
Definition: joyaxis.cpp:538
SetJoystick::getSensors
const QHash< JoySensorType, JoySensor * > & getSensors() const
Get all sensor objects in this set.
Definition: setjoystick.cpp:1113
SetJoystick::getName
QString getName() const
Definition: setjoystick.cpp:948
SetJoystickXml::SetJoystickXml
SetJoystickXml(SetJoystick *setJoystick, QObject *parent=nullptr)
Definition: setjoystickxml.cpp:40
SetJoystick::getHats
const QHash< int, JoyDPad * > & getHats() const
Definition: setjoystick.cpp:1105
joysensor.h
joybuttonxml.h
joyaxisxml.h
JoyAxisXml::writeConfig
virtual void writeConfig(QXmlStreamWriter *xml)
Definition: joyaxisxml.cpp:69
SetJoystick::getVDPad
VDPad * getVDPad(int index) const
Definition: setjoystick.cpp:67
JoyDPadXml::readConfig
void readConfig(QXmlStreamReader *xml)
Definition: joydpadxml.cpp:23
JoyDPadXml
Definition: joydpadxml.h:26
SetJoystick
A set of mapped events which can by switched by a controller event. Contains controller input objects...
Definition: setjoystick.h:39
joydpadxml.h
JoyAxisXml
Definition: joyaxisxml.h:29
SetJoystick::getJoyStick
JoyControlStick * getJoyStick(int index) const
Definition: setjoystick.cpp:69
JoySensorType
JoySensorType
Definition: joysensortype.h:23
vdpad.h
SetJoystickXml::joyButtonXml
JoyButtonXml * joyButtonXml
Definition: setjoystickxml.h:49
SetJoystick::getVdpads
const QHash< int, VDPad * > & getVdpads() const
Definition: setjoystick.cpp:1115
VDPad
Definition: vdpad.h:26
setjoystickxml.h
JoyDPadXml::writeConfig
void writeConfig(QXmlStreamWriter *xml)
Definition: joydpadxml.cpp:41
SetJoystickXml::writeConfig
virtual void writeConfig(QXmlStreamWriter *xml)
Serializes a SetJoystick object into the the given XML stream.
Definition: setjoystickxml.cpp:144
JoySensor::readConfig
void readConfig(QXmlStreamReader *xml)
Take a XML stream and set the sensor and direction button properties according to the values containe...
Definition: joysensor.cpp:682
JoyDPad
Definition: joydpad.h:24
SetJoystick::getJoyButton
JoyButton * getJoyButton(int index) const
Definition: setjoystick.cpp:57
joybutton.h
JoyAxisXml::readConfig
virtual void readConfig(QXmlStreamReader *xml)
Definition: joyaxisxml.cpp:45
JoyControlStick::readConfig
virtual void readConfig(QXmlStreamReader *xml)
Take a XML stream and set the stick and direction button properties according to the values contained...
Definition: joycontrolstick.cpp:990
JoyControlStick
Represents stick of a joystick.
Definition: joycontrolstick.h:37
JoyButtonXml::writeConfig
virtual void writeConfig(QXmlStreamWriter *xml)
Definition: joybuttonxml.cpp:342
JoyButton
Represents a single joystick button being part of a SetJoystick Contains multiple JoyButtonSlots whic...
Definition: joybutton.h:46
SetJoystick::getJoyDPad
JoyDPad * getJoyDPad(int index) const
Definition: setjoystick.cpp:65
SetJoystickXml::m_setJoystick
SetJoystick * m_setJoystick
Definition: setjoystickxml.h:45
joyaxis.h
SetJoystick::getJoyAxis
JoyAxis * getJoyAxis(int index) const
Definition: setjoystick.cpp:59
JoySensor
Represents one sensor in a SetJoystick and its connections to other parts of the application....
Definition: joysensor.h:39
setjoystick.h
SetJoystick::getButtons
const QHash< int, JoyButton * > & getButtons() const
Definition: setjoystick.cpp:1103
JoyButtonXml::readConfig
virtual void readConfig(QXmlStreamReader *xml)
Definition: joybuttonxml.cpp:322
SetJoystick::getAxes
QHash< int, JoyAxis * > * getAxes()
Definition: setjoystick.cpp:1101
JoyAxis::isPartControlStick
bool isPartControlStick()
Definition: joyaxis.cpp:522
SetJoystick::getSticks
const QHash< int, JoyControlStick * > & getSticks() const
Definition: setjoystick.cpp:1107
SetJoystickXml
SetJoystick XML serialization/deserialization helper class Reads data from the supplied SetJoystick o...
Definition: setjoystickxml.h:34
JoyButton::isPartVDPad
bool isPartVDPad()
Definition: joybutton.cpp:3461
SetJoystick::isSetEmpty
bool isSetEmpty()
Check if this set has any mapped event.
Definition: setjoystick.cpp:363
joydpad.h
JoyButtonXml
Definition: joybuttonxml.h:27
number
it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such this License incorporates the limitation as if written in the body of this License The Free Software Foundation may publish revised and or new versions of the Lesser General Public License from time to time Such new versions will be similar in spirit to the present but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Library specifies a version number of this License which applies to it and any later you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation If the Library does not specify a license version number
Definition: lgpl-2.1.txt:423
SetJoystick::setName
void setName(QString name)
Definition: setjoystick.cpp:933