not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / libs / kephal / kded_kephal / dbus / dbusapi_outputs.h
blobaa068db3358f94ee1cb392a4f89a6d2202ddc0de
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 DBUSAPI_OUTPUTS_H
22 #define DBUSAPI_OUTPUTS_H
25 #include <QObject>
27 #include "kephal/kephal.h"
29 #include <QSize>
30 #include <QPoint>
31 #include <QStringList>
32 #include <QMap>
34 namespace Kephal {
35 class Output;
38 class DBusAPIOutputs : public QObject
40 Q_OBJECT
41 Q_CLASSINFO("D-Bus Interface", "org.kde.Kephal.Outputs")
43 public:
44 DBusAPIOutputs(QObject * parent);
46 public Q_SLOTS:
47 QStringList outputIds();
48 QSize size(QString id);
49 int numAvailableSizes(QString id);
50 QSize availableSize(QString id, int index);
51 QPoint position(QString id);
52 bool isConnected(QString id);
53 bool isActivated(QString id);
54 int rotation(QString id);
55 qreal rate(QString id);
56 bool reflectX(QString id);
57 bool reflectY(QString id);
58 int numAvailableRates(QString id);
59 qreal availableRate(QString id, int index);
61 Q_SIGNALS:
62 void outputConnected(QString id);
63 void outputDisconnected(QString id);
64 void outputActivated(QString id);
65 void outputDeactivated(QString id);
66 void outputResized(QString id);
67 void outputMoved(QString id);
68 void outputRateChanged(QString id);
69 void outputRotated(QString id);
70 void outputReflected(QString id);
72 private Q_SLOTS:
73 void outputConnectedSlot(Kephal::Output * o);
74 void outputDisconnectedSlot(Kephal::Output * o);
75 void outputActivatedSlot(Kephal::Output * o);
76 void outputDeactivatedSlot(Kephal::Output * o);
77 void outputResizedSlot(Kephal::Output * o, QSize oldSize, QSize newSize);
78 void outputMovedSlot(Kephal::Output * o, QPoint oldPosition, QPoint newPosition);
79 void outputRateChangedSlot(Kephal::Output * o, float oldRate, float newRate);
80 void outputRotatedSlot(Kephal::Output * o, Kephal::Rotation oldRotation, Kephal::Rotation newRotation);
81 void outputReflectedSlot(Kephal::Output * o, bool oldX, bool oldY, bool newX, bool newY);
83 private:
84 QMap<QString, QList<QSize> > m_sizes;
85 QMap<QString, QList<float> > m_rates;
89 #endif // DBUSAPI_OUTPUTS_H