add more spacing
[personal-kdebase.git] / workspace / libs / kephal / xml / configurations_xml.h
blob13253f03c7b74db43dbffaae8f2b70be436547a9
1 /*
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
24 #include "xmltype.h"
25 #include "kephal/kephal.h"
26 #include "kephal/backend.h"
28 #include <QString>
31 namespace Kephal {
33 class ScreenXML : public XMLType {
34 Q_OBJECT
36 PROPERTY(int, id, setId)
37 PROPERTY(int, rightOf, setRightOf)
38 PROPERTY(int, bottomOf, setBottomOf)
39 PROPERTY(bool, privacy, setPrivacy)
41 public:
42 ScreenXML() : m_rightOf(-1), m_bottomOf(-1) {}
47 class ConfigurationXML : public XMLType {
48 Q_OBJECT
50 PROPERTY(QString, name, setName)
51 PROPERTY(bool, modifiable, setModifiable)
52 PROPERTY(int, primaryScreen, setPrimaryScreen)
54 public:
55 ConfigurationXML();
57 QList<ScreenXML *> & screens();
59 private:
60 QList<ScreenXML *> m_screens;
65 class OutputXML : public XMLType {
66 Q_OBJECT
68 PROPERTY(QString, name, setName)
69 PROPERTY(int, screen, setScreen)
70 PROPERTY(QString, vendor, setVendor)
71 PROPERTY(int, product, setProduct)
72 PROPERTY(unsigned int, serial, setSerial)
73 PROPERTY(int, width, setWidth)
74 PROPERTY(int, height, setHeight)
75 PROPERTY(int, rotation, setRotation)
76 PROPERTY(bool, reflectX, setReflectX)
77 PROPERTY(bool, reflectY, setReflectY)
78 PROPERTY(double, rate, setRate)
79 PROPERTY(QString, actualOutput, setActualOutput)
81 public:
82 OutputXML() : m_screen(-1), m_product(-1), m_serial(0),
83 m_width(-1), m_height(-1), m_rotation(0),
84 m_reflectX(false), m_reflectY(false), m_rate(0)
85 { }
90 class OutputsXML : public XMLType {
91 Q_OBJECT
93 PROPERTY(QString, configuration, setConfiguration)
95 public:
96 QList<OutputXML *> & outputs() { return m_outputs; }
97 private:
98 QList<OutputXML *> m_outputs;
103 class ConfigurationsXML : public XMLType {
104 Q_OBJECT
106 PROPERTY(bool, polling, setPolling)
108 public:
109 ConfigurationsXML() : m_polling(false) {}
111 QList<ConfigurationXML *> & configurations();
112 QList<OutputsXML *> & outputs();
114 private:
115 QList<ConfigurationXML *> m_configurations;
116 QList<OutputsXML *> m_outputs;
119 class ConfigurationsXMLFactory : public XMLRootFactory {
120 public:
121 ConfigurationsXMLFactory();
123 protected:
124 virtual XMLType * newInstance();
125 virtual void schema();
130 #endif // KEPHAL_CONFIGURATIONSXML_H