add more spacing
[personal-kdebase.git] / workspace / plasma / scriptengines / qedjescript / qedje_applet.h
blob2df0476c7337517b776d373473ee485da9405fd9
1 /***************************************************************************
2 * Copyright (C) 2008 by Artur Duque de Souza <morpheuz@gmail.com> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, 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 General Public License *
15 * 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 ***************************************************************************/
21 #ifndef QEDJEAPPLETSCRIPT_HEADER
22 #define QEDJEAPPLETSCRIPT_HEADER
24 #include "ui_qedjeConfig.h"
26 // Include qedje stuff
27 #include <qzion.h>
28 #include <qedje.h>
30 #include <Plasma/AppletScript>
33 // Define our plasma AppletScript
34 class QEdjeAppletScript: public Plasma::AppletScript
36 Q_OBJECT
37 public:
38 // Basic Create/Destroy
39 QEdjeAppletScript(QObject *parent, const QVariantList &args);
40 ~QEdjeAppletScript();
42 virtual bool init();
43 virtual void resizeAll(QSize size);
45 // The paintInterface procedure paints the applet to screen
46 virtual void paintInterface(QPainter *painter,
47 const QStyleOptionGraphicsItem *option,
48 const QRect& contentsRect);
50 public Q_SLOTS:
51 void showConfigurationInterface();
52 void configChanged();
53 void groupSelected(int index);
55 private:
56 QEdje *world;
57 QZionCanvas *canvas;
58 QGraphicsProxyWidget *proxy;
60 // everything needed by the fancy setup UI
61 Ui::qedjeConfig ui;
62 KDialog *dialog;
63 QWidget *config_widget;
64 QEdje *previewWorld;
65 QZionCanvas *previewCanvas;
67 QString m_edje_file;
68 QString m_edje_group;
69 QStringList m_groups_list;
70 int currentIndex;
72 void setup_canvas();
75 #endif