2 Copyright 2008 Google Inc.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
17 #ifndef GGADGET_GGL_APPLET_SCRIPT_H__
18 #define GGADGET_GGL_APPLET_SCRIPT_H__
20 #include <Plasma/AppletScript>
24 class DecoratedViewHost
;
25 class ViewHostInterface
;
41 expanded_main_view_host(NULL
),
42 details_view_host(NULL
),
43 options_view_host(NULL
),
45 location(Plasma::Floating
)
47 ggadget::PlasmaHost
*host
;
48 ggadget::Gadget
*gadget
;
49 Plasma::Applet
*applet
;
50 Plasma::AppletScript
*script
;
51 ggadget::qt::QtViewWidget
*widget
;
52 ggadget::DecoratedViewHost
*main_view_host
;
53 ggadget::ViewHostInterface
*expanded_main_view_host
;
54 ggadget::ViewHostInterface
*details_view_host
;
55 ggadget::ViewHostInterface
*options_view_host
;
57 Plasma::Location location
;
60 class GglAppletScript
: public Plasma::AppletScript
{
63 GglAppletScript(QObject
*parent
, const QVariantList
&args
);
64 virtual ~GglAppletScript();
67 virtual void constraintsEvent(Plasma::Constraints constraints
);
68 virtual void paintInterface(QPainter
*painter
,
69 const QStyleOptionGraphicsItem
*option
,
70 const QRect
&contentsRect
);
71 virtual void mousePressEvent(QGraphicsSceneMouseEvent
*event
);
72 virtual QList
<QAction
*> contextualActions();
75 virtual void showConfigurationInterface();