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
25
#include "configurations.h"
26
#include "configurations_interface.h"
31
class DBusConfigurations;
34
* Client side representation of a Configuration.
35
* Basic implementation of the Configuration interface for DBusConfigurations to return.
36
* Most methods are implemented by calling back through to DBusConfigurations.
38
class DBusConfiguration : public Configuration {
41
DBusConfiguration(DBusConfigurations * parent, QString name);
44
* @reimp Kephal::Configuration
48
* @reimp Kephal::Configuration
50
bool isModifiable() const;
52
* @reimp Kephal::Configuration
54
bool isActivated() const;
56
* @reimp Kephal::Configuration
58
QMap<int, QPoint> layout() const;
60
* @reimp Kephal::Configuration
62
int primaryScreen() const;
69
DBusConfigurations * m_parent;
74
* DBUS stub to remote configurations provided by Kephal daemon
76
class DBusConfigurations : public Configurations {
79
DBusConfigurations(QObject * parent);
82
* @reimp Kephal::Configurations
84
QMap<QString, Configuration *> configurations();
86
* @reimp Kephal::Configurations
88
Configuration * activeConfiguration();
90
* @reimp Kephal::Configurations
92
QList<Configuration *> alternateConfigurations();
94
* @reimp Kephal::Configurations
96
QList<QPoint> possiblePositions(const Output * output);
98
* @reimp Kephal::Configurations
100
bool move(Output * output, const QPoint & position);
102
* @reimp Kephal::Configurations
104
bool resize(Output * output, const QSize & size);
106
* @reimp Kephal::Configurations
108
bool rotate(Output * output, Rotation rotation);
110
* @reimp Kephal::Configurations
112
bool reflectX(Output * output, bool reflect);
114
* @reimp Kephal::Configurations
116
bool reflectY(Output * output, bool reflect);
118
* @reimp Kephal::Configurations
120
bool changeRate(Output * output, float rate);
122
* @reimp Kephal::Configurations
124
int screen(Output * output);
125
void applyOutputSettings();
126
void setPolling(bool polling);
127
bool polling() const;
132
org::kde::Kephal::Configurations * interface();
135
void configurationActivatedSlot(QString name);
138
org::kde::Kephal::Configurations * m_interface;
140
QMap<QString, DBusConfiguration *> m_configs;
146
#endif // KEPHAL_DBUSCONFIGURATIONS_H