summaryrefslogtreecommitdiffstats
path: root/kommander/working/plugintemplate/widget.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /kommander/working/plugintemplate/widget.h
downloadtdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz
tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/working/plugintemplate/widget.h')
-rw-r--r--kommander/working/plugintemplate/widget.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/kommander/working/plugintemplate/widget.h b/kommander/working/plugintemplate/widget.h
new file mode 100644
index 00000000..56e87f91
--- /dev/null
+++ b/kommander/working/plugintemplate/widget.h
@@ -0,0 +1,46 @@
+%{H_TEMPLATE}
+#ifndef %{APPNAMEUC}_WIDGET_H
+#define %{APPNAMEUC}_WIDGET_H
+
+#include <qwidget.h>
+#include <qstring.h>
+
+#include <kparts/part.h>
+
+#include <kommanderwidget.h>
+
+class QStringList;
+
+//replace QWidget with the widget you want to derive from
+class %{APPNAME}: public QWidget, public KommanderWidget
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ Q_PROPERTY(QStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+
+public:
+ %{APPNAME}(QWidget *parent, const char* name);
+ ~%{APPNAME}();
+
+ virtual bool isKommanderWidget() const;
+ virtual void setAssociatedText(const QStringList&);
+ virtual QStringList associatedText() const;
+ virtual QString currentState() const;
+ virtual QString populationText() const;
+ virtual void setPopulationText(const QString&);
+ virtual void populate();
+
+ virtual QString handleDCOP(int function, const QStringList& args);
+ virtual bool isFunctionSupported(int function);
+
+signals:
+ void contextMenuRequested(int xpos, int ypos);
+
+protected:
+ void contextMenuEvent( QContextMenuEvent * e );
+};
+
+
+#endif