2
Copyright (C) 2012 Dan Vratil <dvratil@redhat.com>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Lesser General Public
6
License as published by the Free Software Foundation; either
7
version 2.1 of the License, or (at your option) any later version.
9
This library 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 GNU
12
Lesser General Public License for more details.
14
You should have received a copy of the GNU Lesser General Public
15
License along with this library; if not, write to the Free Software
16
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
#include <QDeclarativeItem>
25
#define QML_PATH "kcm_displayconfiguration/qml/"
31
class QDeclarativeContext;
33
class QMLOutputView : public QDeclarativeItem
37
Q_PROPERTY(QList<QMLOutput*> outputs READ outputs NOTIFY outputsChanged);
38
Q_PROPERTY(QMLOutput* activeOutput READ activeOutput NOTIFY activeOutputChanged);
41
virtual ~QMLOutputView();
43
void addOutput(QDeclarativeEngine* engine, KScreen::Output* output);
45
QList<QMLOutput*> outputs() const;
46
QMLOutput * activeOutput() const;
48
Q_INVOKABLE QMLOutput* getPrimaryOutput() const;
53
/* Property notifications */
54
void outputsChanged();
55
void activeOutputChanged(QMLOutput *output);
58
void outputMoved(bool snap);
60
void primaryTriggered();
61
void viewSizeChanged();
62
void viewSizeChanged(bool initialPlacement);
65
QDeclarativeContext * context() const;
67
QList<QMLOutput*> m_outputs;
68
QMLOutput *m_activeOutput;
72
#endif // MONITORVIEW_H