20 #ifndef PLASMA_APPLETSCRIPT_H
21 #define PLASMA_APPLETSCRIPT_H
23 #include <QtCore/QObject>
24 #include <QtCore/QRect>
25 #include <QtCore/QSizeF>
27 #include <kgenericfactory.h>
28 #include <kplugininfo.h>
43 class AppletScriptPrivate;
85 virtual void paintInterface(QPainter *painter,
87 const QRect &contentsRect);
92 Q_INVOKABLE QSizeF size()
const;
105 virtual void constraintsEvent(Plasma::Constraints constraints);
113 virtual QList<QAction*> contextualActions();
118 virtual QPainterPath shape()
const;
125 void setHasConfigurationInterface(
bool hasInterface);
130 void setConfigurationRequired(
bool req,
const QString &reason = QString());
135 void setFailedToLaunch(
bool failed,
const QString &reason = QString());
140 void configNeedsSaving()
const;
153 bool drawWallpaper()
const;
159 void setDrawWallpaper(
bool drawWallpaper);
177 void saveState(KConfigGroup &group)
const;
182 void popupEvent(
bool popped)
const;
189 virtual void showConfigurationInterface();
194 virtual void configChanged();
201 Q_INVOKABLE
DataEngine *dataEngine(
const QString &engine)
const;
206 QString mainScript()
const;
213 const Package *package()
const;
218 KPluginInfo description()
const;
226 KConfigDialog *standardConfigurationDialog();
234 void addStandardConfigurationPages(KConfigDialog *dialog);
239 void showMessage(
const QIcon &icon,
const QString &message,
const MessageButtons buttons);
244 void registerAsDragHandle(QGraphicsItem *item);
249 void unregisterAsDragHandle(QGraphicsItem *item);
254 bool isRegisteredAsDragHandle(QGraphicsItem *item);
268 AppletScriptPrivate *
const d;
271 #define K_EXPORT_PLASMA_APPLETSCRIPTENGINE(libname, classname) \
272 K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
273 K_EXPORT_PLUGIN(factory("plasma_appletscriptengine_" #libname))
Extends applets to allow detachable parts.
Abstract representation of a single animation.
The base class for scripting interfaces to be used in loading plasmoids of a given language...
Data provider for plasmoids (Plasma plugins)
Provides a restricted interface for scripted applets.
object representing an installed Plasmagik package
static QScriptValue type(QScriptContext *ctx, QScriptEngine *eng)