~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to libs/kephal/service/dbus/dbusapi_outputs.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright 2008 Aike J Sommer <dev@aikesommer.name>
 
3
 *
 
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.
 
8
 *
 
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
 
13
 *
 
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.
 
18
 */
 
19
 
 
20
 
 
21
#ifndef DBUSAPI_OUTPUTS_H
 
22
#define DBUSAPI_OUTPUTS_H
 
23
 
 
24
 
 
25
#include <QObject>
 
26
 
 
27
#include "kephal.h"
 
28
 
 
29
#include <QSize>
 
30
#include <QPoint>
 
31
#include <QStringList>
 
32
#include <QMap>
 
33
 
 
34
namespace Kephal {
 
35
    class Output;
 
36
}
 
37
 
 
38
class DBusAPIOutputs : public QObject
 
39
{
 
40
    Q_OBJECT
 
41
    Q_CLASSINFO("D-Bus Interface", "org.kde.Kephal.Outputs")
 
42
 
 
43
    public:
 
44
        DBusAPIOutputs(QObject * parent);
 
45
 
 
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
        double rate(QString id);
 
56
        bool reflectX(QString id);
 
57
        bool reflectY(QString id);
 
58
        int numAvailableRates(QString id);
 
59
        double availableRate(QString id, int index);
 
60
 
 
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);
 
71
 
 
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);
 
82
 
 
83
    private:
 
84
        QMap<QString, QList<QSize> > m_sizes;
 
85
        QMap<QString, QList<float> > m_rates;
 
86
};
 
87
 
 
88
 
 
89
#endif // DBUSAPI_OUTPUTS_H
 
90