summaryrefslogtreecommitdiffstats
path: root/kommander/editor/newformimpl.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/editor/newformimpl.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/editor/newformimpl.h')
-rw-r--r--kommander/editor/newformimpl.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/kommander/editor/newformimpl.h b/kommander/editor/newformimpl.h
new file mode 100644
index 00000000..12fec22c
--- /dev/null
+++ b/kommander/editor/newformimpl.h
@@ -0,0 +1,73 @@
+/**********************************************************************
+ This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS.  All rights reserved.
+
+ This file may be distributed and/or modified under the terms of the
+ GNU General Public License version 2 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.
+
+ This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ See http://www.trolltech.com/gpl/ for GPL licensing information.
+
+ Modified for Kommander:
+ (C) 2004 Michal Rudolf <mrudolf@kdewebdev.org>
+
+**********************************************************************/
+
+#ifndef NEWFORMIMPL_H
+#define NEWFORMIMPL_H
+
+#include "newform.h"
+#include <qiconview.h>
+
+class FormFile;
+
+
+class NewItem : public QIconViewItem
+{
+public:
+ enum Type {Form, CustomForm};
+ NewItem( QIconView *view, const QString &text ) : QIconViewItem( view, text ) {}
+ virtual void insert( ) = 0;
+};
+
+class FormItem : public NewItem
+{
+public:
+ enum FormType {Dialog, Wizard, MainWindow};
+ FormItem( QIconView *view, const QString &text);
+ void insert();
+ int rtti() const {return (int)Form;}
+ void setFormType(FormType ft) {fType = ft;}
+ FormType formType() const {return fType;}
+private:
+ FormType fType;
+};
+
+class CustomFormItem : public NewItem
+{
+public:
+ CustomFormItem( QIconView *view, const QString &text );
+ void insert();
+ int rtti() const {return (int)CustomForm; }
+ void setTemplateFile(const QString &tf) {templFile = tf;}
+ QString templateFileName() const {return templFile;}
+private:
+ QString templFile;
+};
+
+class NewForm : public NewFormBase
+{
+ Q_OBJECT
+public:
+ NewForm( QWidget *parent, const QString &templatePath );
+ void accept();
+protected slots:
+ void itemChanged(QIconViewItem *item);
+private:
+ QPtrList<QIconViewItem> allItems;
+};
+
+#endif