• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • sources
  • kde-4.12
  • kdelibs
  • plasma
  • scripting
scriptengine.h
Go to the documentation of this file.
1 /*
2  * Copyright 2007 by Aaron Seigo <aseigo@kde.org>
3  *
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.
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 #ifndef PLASMA_SCRIPTENGINE_H
21 #define PLASMA_SCRIPTENGINE_H
22 
23 #include <plasma/plasma_export.h>
24 #include <plasma/packagestructure.h>
25 #include <plasma/plasma.h>
26 
27 #include <QtCore/QObject>
28 #include <QtCore/QRect>
29 #include <QtCore/QSizeF>
30 
31 class QPainter;
32 class QStyleOptionGraphicsItem;
33 
34 namespace Plasma
35 {
36 
37 class AbstractRunner;
38 class Applet;
39 class AppletScript;
40 class DataEngine;
41 class DataEngineScript;
42 class RunnerScript;
43 class Wallpaper;
44 class WallpaperScript;
45 class Package;
46 class ScriptEnginePrivate;
47 
65 class PLASMA_EXPORT ScriptEngine : public QObject
66 {
67  Q_OBJECT
68 
69 public:
70  ~ScriptEngine();
71 
75  virtual bool init();
76 
77 protected:
78  explicit ScriptEngine(QObject *parent = 0);
79 
83  virtual QString mainScript() const;
84 
90  virtual const Package *package() const;
91 
92 private:
93  ScriptEnginePrivate *const d;
94 };
95 
101 PLASMA_EXPORT QStringList knownLanguages(ComponentTypes types);
102 
111 PLASMA_EXPORT AppletScript *loadScriptEngine(const QString &language, Applet *applet);
112 
121 PLASMA_EXPORT DataEngineScript *loadScriptEngine(const QString &language, DataEngine *dataEngine);
122 
131 PLASMA_EXPORT RunnerScript *loadScriptEngine(const QString &language, AbstractRunner *runner);
132 
141 PLASMA_EXPORT WallpaperScript *loadScriptEngine(const QString &language, Wallpaper *wallpaper);
142 
150 PLASMA_EXPORT PackageStructure::Ptr packageStructure(const QString &language, ComponentType type);
151 
152 } // namespace Plasma
153 
154 #endif
155 
Plasma::ComponentType
ComponentType
The ComonentType enumeration refers to the various types of components, or plugins, supported by plasma.
Definition: plasma.h:225
Plasma::RunnerScript
Provides a restricted interface for scripting a runner.
Definition: runnerscript.h:40
Plasma::AbstractRunner
An abstract base class for Plasma Runner plugins.
Definition: abstractrunner.h:63
Plasma::WallpaperScript
Provides a restricted interface for scripting a Wallpaper.
Definition: wallpaperscript.h:42
QObject
Plasma::loadScriptEngine
AppletScript * loadScriptEngine(const QString &language, Applet *applet)
Loads an Applet script engine for the given language.
Definition: scriptengine.cpp:206
Plasma::Applet
The base Applet class.
Definition: applet.h:77
Plasma::ScriptEngine
The base class for scripting interfaces to be used in loading plasmoids of a given language...
Definition: scriptengine.h:65
Plasma::PackageStructure::Ptr
KSharedPtr< PackageStructure > Ptr
Definition: packagestructure.h:77
Plasma::DataEngine
Data provider for plasmoids (Plasma plugins)
Definition: dataengine.h:58
Plasma::DataEngineScript
Provides a restricted interface for scripting a DataEngine.
Definition: dataenginescript.h:41
Plasma::AppletScript
Provides a restricted interface for scripted applets.
Definition: appletscript.h:51
Plasma::Package
object representing an installed Plasmagik package
Definition: package.h:42
plasma.h
Plasma::type
static QScriptValue type(QScriptContext *ctx, QScriptEngine *eng)
Definition: easingcurve.cpp:63
Plasma::knownLanguages
QStringList knownLanguages(ComponentTypes types)
Definition: scriptengine.cpp:67
packagestructure.h
QStyleOptionGraphicsItem
Plasma::packageStructure
PackageStructure::Ptr packageStructure(const QString &language, ComponentType type)
Loads an appropriate PackageStructure for the given language and type.
Definition: scriptengine.cpp:274
plasma_export.h
Plasma::Wallpaper
The base Wallpaper class.
Definition: wallpaper.h:56
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:34 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal