summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kofficepart/kopart_factory.h
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/app_templates/kofficepart/kopart_factory.h')
-rw-r--r--languages/cpp/app_templates/kofficepart/kopart_factory.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/kofficepart/kopart_factory.h b/languages/cpp/app_templates/kofficepart/kopart_factory.h
new file mode 100644
index 00000000..45f1f649
--- /dev/null
+++ b/languages/cpp/app_templates/kofficepart/kopart_factory.h
@@ -0,0 +1,33 @@
+
+/* This template is based off of the KOffice example written by Torben Weis <[email protected]
+ It was converted to a KDevelop template by Ian Reinhart Geiser <[email protected]>
+*/
+
+#ifndef %{APPNAME}_FACTORY_H
+#define %{APPNAME}_FACTORY_H
+
+#include <koFactory.h>
+
+class KInstance;
+class KAboutData;
+
+class %{APPNAME}Factory : public KoFactory
+{
+ Q_OBJECT
+public:
+ %{APPNAME}Factory( QObject* parent = 0, const char* name = 0 );
+ ~%{APPNAME}Factory();
+
+ virtual KParts::Part *createPartObject( QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KoDocument", const QStringList &args = QStringList() );
+
+ static KInstance* global();
+
+ // _Creates_ a KAboutData but doesn't keep ownership
+ static KAboutData* aboutData();
+
+private:
+ static KInstance* s_global;
+ static KAboutData* s_aboutData;
+};
+
+#endif