blob: 5f51648c6a5bf4a53bf333c2b2f02e5f11624bee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/**********************************************************************
This file is based on TQt 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 <tqiconview.h>
class FormFile;
class NewItem : public TQIconViewItem
{
public:
enum Type {Form, CustomForm};
NewItem( TQIconView *view, const TQString &text ) : TQIconViewItem( view, text ) {}
virtual void insert( ) = 0;
};
class FormItem : public NewItem
{
public:
enum FormType {Dialog, Wizard, MainWindow};
FormItem( TQIconView *view, const TQString &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( TQIconView *view, const TQString &text );
void insert();
int rtti() const {return (int)CustomForm; }
void setTemplateFile(const TQString &tf) {templFile = tf;}
TQString templateFileName() const {return templFile;}
private:
TQString templFile;
};
class NewForm : public NewFormBase
{
Q_OBJECT
TQ_OBJECT
public:
NewForm( TQWidget *parent, const TQString &templatePath );
void accept();
protected slots:
void itemChanged(TQIconViewItem *item);
private:
TQPtrList<TQIconViewItem> allItems;
};
#endif
|