Plasma
ggl_applet_script.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GGADGET_GGL_APPLET_SCRIPT_H__
00018 #define GGADGET_GGL_APPLET_SCRIPT_H__
00019
00020 #include <Plasma/AppletScript>
00021
00022 namespace ggadget {
00023 class PlasmaHost;
00024 class DecoratedViewHost;
00025 class ViewHostInterface;
00026 }
00027
00028 namespace Plasma {
00029 class Applet;
00030 }
00031
00032 class GadgetInfo {
00033 public:
00034 GadgetInfo()
00035 : host(NULL),
00036 gadget(NULL),
00037 applet(NULL),
00038 script(NULL),
00039 widget(NULL),
00040 main_view_host(NULL),
00041 expanded_main_view_host(NULL),
00042 details_view_host(NULL),
00043 options_view_host(NULL),
00044 view_debug_mode(0),
00045 location(Plasma::Floating)
00046 {}
00047 ggadget::PlasmaHost *host;
00048 ggadget::Gadget *gadget;
00049 Plasma::Applet *applet;
00050 Plasma::AppletScript *script;
00051 ggadget::qt::QtViewWidget *widget;
00052 ggadget::DecoratedViewHost *main_view_host;
00053 ggadget::ViewHostInterface *expanded_main_view_host;
00054 ggadget::ViewHostInterface *details_view_host;
00055 ggadget::ViewHostInterface *options_view_host;
00056 int view_debug_mode;
00057 Plasma::Location location;
00058 };
00059
00060 class GglAppletScript : public Plasma::AppletScript {
00061 Q_OBJECT
00062 public:
00063 GglAppletScript(QObject *parent, const QVariantList &args);
00064 virtual ~GglAppletScript();
00065
00066 virtual bool init();
00067 virtual void constraintsEvent(Plasma::Constraints constraints);
00068 virtual void paintInterface(QPainter *painter,
00069 const QStyleOptionGraphicsItem *option,
00070 const QRect &contentsRect);
00071 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
00072 virtual QList<QAction*> contextualActions();
00073
00074 public Q_SLOTS:
00075 virtual void showConfigurationInterface();
00076
00077 private Q_SLOTS:
00078 void loadGadget();
00079
00080 private:
00081 class Private;
00082 Private *const d;
00083 };
00084
00085 #endif