not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / libs / kephal / configurations / dbus / dbusconfigurations.h
blobd38e6394af6ef5fd1c41f3bf4c29358697d0ed8a
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_DBUSCONFIGURATIONS_H
22 #define KEPHAL_DBUSCONFIGURATIONS_H
24 #include <QPoint>
25 #include "kephal/configurations.h"
26 #include "configurations_interface.h"
29 namespace Kephal {
31 class DBusConfigurations;
33 class DBusConfiguration : public Configuration {
34 Q_OBJECT
35 public:
36 DBusConfiguration(DBusConfigurations * parent, QString name);
38 QString name();
39 bool isModifiable();
40 bool isActivated();
41 QMap<int, QPoint> layout();
42 int primaryScreen();
44 public Q_SLOTS:
45 void activate();
47 private:
48 QString m_name;
49 DBusConfigurations * m_parent;
53 class DBusConfigurations : public Configurations {
54 Q_OBJECT
55 public:
56 DBusConfigurations(QObject * parent);
58 QMap<QString, Configuration *> configurations();
59 Configuration * activeConfiguration();
60 QList<Configuration *> alternateConfigurations();
61 QList<QPoint> possiblePositions(Output * output);
62 bool move(Output * output, const QPoint & position);
63 bool resize(Output * output, const QSize & size);
64 bool rotate(Output * output, Rotation rotation);
65 bool reflectX(Output * output, bool reflect);
66 bool reflectY(Output * output, bool reflect);
67 bool changeRate(Output * output, float rate);
68 int screen(Output * output);
69 void applyOutputSettings();
70 void setPolling(bool polling);
71 bool polling();
72 void confirm();
73 void revert();
75 bool isValid();
76 org::kde::Kephal::Configurations * interface();
78 private Q_SLOTS:
79 void configurationActivatedSlot(QString name);
81 private:
82 org::kde::Kephal::Configurations * m_interface;
83 bool m_valid;
84 QMap<QString, DBusConfiguration *> m_configs;
90 #endif // KEPHAL_DBUSCONFIGURATIONS_H