2
* Copyright 2009 Aaron Seigo <aseigo@kde.org>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Library General Public License as
6
* published by the Free Software Foundation; either version 2, or
7
* (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.
25
#include <QStringList>
27
#include "../plasmagenericshell_export.h"
36
namespace WorkspaceScripting
41
class PLASMAGENERICSHELL_EXPORT AppInterface : public QObject
44
Q_PROPERTY(bool locked READ coronaLocked WRITE lockCorona)
45
Q_PROPERTY(bool hasBattery READ hasBattery)
46
Q_PROPERTY(int screenCount READ screenCount)
47
Q_PROPERTY(QList<int> activityIds READ activityIds)
48
Q_PROPERTY(QList<int> panelIds READ panelIds)
49
Q_PROPERTY(QStringList knownPanelTypes READ knownPanelTypes)
50
Q_PROPERTY(QStringList knownActivityTypes READ knownActivityTypes)
51
Q_PROPERTY(QStringList knownWidgetTypes READ knownWidgetTypes)
52
Q_PROPERTY(QString theme READ theme WRITE setTheme)
53
Q_PROPERTY(QString applicationVersion READ applicationVersion)
54
Q_PROPERTY(QString platformVersion READ platformVersion)
55
Q_PROPERTY(int scriptingVersion READ scriptingVersion)
56
Q_PROPERTY(bool multihead READ multihead)
57
Q_PROPERTY(bool multiheadScreen READ multihead)
60
AppInterface(ScriptEngine *env);
62
bool hasBattery() const;
63
int screenCount() const;
64
QList<int> activityIds() const;
65
QList<int> panelIds() const;
67
QStringList knownWidgetTypes() const;
68
QStringList knownActivityTypes() const;
69
QStringList knownPanelTypes() const;
70
QStringList knownContainmentTypes(const QString &type) const;
72
QString applicationVersion() const;
73
QString platformVersion() const;
74
int scriptingVersion() const;
76
QString theme() const;
77
void setTheme(const QString &name);
79
bool multihead() const;
80
int multiheadScreen() const;
82
bool coronaLocked() const;
85
QRectF screenGeometry(int screen) const;
86
void lockCorona(bool locked);
90
void print(const QString &string);
94
QStringList m_knownWidgets;