2
* Copyright 2008 Aike J Sommer <dev@aikesommer.name>
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
6
* published by the Free Software Foundation; either version 2,
7
* or (at your option) any later version.
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
14
* You should have received a copy of the GNU Library General Public
15
* License along with this program; if not, write to the
16
* Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
#ifndef KEPHAL_CONFIGURATIONSXML_H
22
#define KEPHAL_CONFIGURATIONSXML_H
31
class ScreenXML : public XMLType {
34
ScreenXML(QObject * parent = 0);
38
PROPERTY(int, id, setId)
39
PROPERTY(int, rightOf, setRightOf)
40
PROPERTY(int, bottomOf, setBottomOf)
41
PROPERTY(bool, privacy, setPrivacy)
47
class ConfigurationXML : public XMLType {
50
ConfigurationXML(QObject * parent = 0);
53
QList<ScreenXML *> & screens();
56
PROPERTY(QString, name, setName)
57
PROPERTY(bool, modifiable, setModifiable)
58
PROPERTY(int, primaryScreen, setPrimaryScreen)
61
QList<ScreenXML *> m_screens;
66
class OutputXML : public XMLType {
69
PROPERTY(QString, name, setName)
70
PROPERTY(int, screen, setScreen)
71
PROPERTY(QString, vendor, setVendor)
72
PROPERTY(int, product, setProduct)
73
PROPERTY(unsigned int, serial, setSerial)
74
PROPERTY(int, width, setWidth)
75
PROPERTY(int, height, setHeight)
76
PROPERTY(int, rotation, setRotation)
77
PROPERTY(bool, reflectX, setReflectX)
78
PROPERTY(bool, reflectY, setReflectY)
79
PROPERTY(double, rate, setRate)
80
PROPERTY(QString, actualOutput, setActualOutput)
83
OutputXML(QObject * parent = 0);
90
class OutputsXML : public XMLType {
93
OutputsXML(QObject * parent = 0);
96
PROPERTY(QString, configuration, setConfiguration)
99
QList<OutputXML *> & outputs() { return m_outputs; }
101
QList<OutputXML *> m_outputs;
106
class ConfigurationsXML : public XMLType {
109
PROPERTY(bool, polling, setPolling)
112
ConfigurationsXML(QObject * parent = 0);
113
virtual ~ConfigurationsXML();
115
QList<ConfigurationXML *> & configurations();
116
QList<OutputsXML *> & outputs();
119
QList<ConfigurationXML *> m_configurations;
120
QList<OutputsXML *> m_outputs;
123
class ConfigurationsXMLFactory : public XMLRootFactory {
125
ConfigurationsXMLFactory();
126
~ConfigurationsXMLFactory();
129
virtual XMLType * newInstance();
130
virtual void schema();
135
#endif // KEPHAL_CONFIGURATIONSXML_H