• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libplasma

appletscript.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2007 by Aaron Seigo <aseigo@kde.org>
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU Library General Public License as
00006  *   published by the Free Software Foundation; either version 2, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details
00013  *
00014  *   You should have received a copy of the GNU Library General Public
00015  *   License along with this program; if not, write to the
00016  *   Free Software Foundation, Inc.,
00017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 
00020 #ifndef PLASMA_APPLETSCRIPT_H
00021 #define PLASMA_APPLETSCRIPT_H
00022 
00023 
00024 #include <QtCore/QObject>
00025 #include <QtCore/QRect>
00026 #include <QtCore/QSizeF>
00027 
00028 #include <KDE/KGenericFactory>
00029 
00030 #include <plasma/plasma_export.h>
00031 #include <plasma/scripting/scriptengine.h>
00032 
00033 class QAction;
00034 class QPainter;
00035 class QStyleOptionGraphicsItem;
00036 
00037 namespace Plasma
00038 {
00039 
00040 class AppletScriptPrivate;
00041 
00042 class PLASMA_EXPORT AppletScript : public ScriptEngine
00043 {
00044     Q_OBJECT
00045 
00046 public:
00054     explicit AppletScript(QObject *parent = 0);
00055     ~AppletScript();
00056 
00060     void setApplet(Plasma::Applet *applet);
00061 
00065     Plasma::Applet* applet() const;
00066 
00073     virtual void paintInterface(QPainter* painter,
00074                                 const QStyleOptionGraphicsItem* option,
00075                                 const QRect &contentsRect);
00076 
00080     Q_INVOKABLE QSizeF size() const;
00081 
00093     virtual void constraintsEvent(Plasma::Constraints constraints);
00094 
00101     virtual QList<QAction*> contextualActions();
00102 
00106     virtual QPainterPath shape() const;
00107 
00108 public Q_SLOTS:
00109 
00113     virtual void showConfigurationInterface();
00114 
00115 protected:
00120     Q_INVOKABLE DataEngine* dataEngine(const QString &engine) const;
00121 
00125     QString mainScript() const;
00126 
00132     const Package* package() const;
00133 
00134 private:
00135     AppletScriptPrivate * const d;
00136 };
00137 
00138 #define K_EXPORT_PLASMA_APPLETSCRIPTENGINE(libname, classname) \
00139 K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
00140 K_EXPORT_PLUGIN(factory("plasma_appletscriptengine_" #libname))
00141 
00142 } //Plasma namespace
00143 
00144 #endif

libplasma

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal