3
* TOra - An Oracle Toolkit for DBA's and developers
4
* Copyright (C) 2003-2005 Quest Software, Inc
5
* Portions Copyright (C) 2005 Other Contributors
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; only version 2 of
10
* the License is valid for this program.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
* As a special exception, you have permission to link this program
22
* with the Oracle Client libraries and distribute executables, as long
23
* as you follow the requirements of the GNU GPL in regard to all of the
24
* software in the executable aside from Oracle client libraries.
26
* Specifically you are not permitted to link this program with the
27
* Qt/UNIX, Qt/Windows or Qt Non Commercial products of TrollTech.
28
* And you are not permitted to distribute binaries compiled against
29
* these libraries without written consent from Quest Software, Inc.
30
* Observe that this does not disallow linking to the Qt Free Edition.
32
* You may link this product with any GPL'd Qt library such as Qt/Free
34
* All trademarks belong to their respective owners.
42
#include "totemplate.h"
46
class toProjectTemplateItem : public toTemplateItem
50
void setup(const QString &name, bool open);
53
toProjectTemplateItem(toTemplateItem *item, QListViewItem *after, QString name, bool open = true);
54
toProjectTemplateItem(QListView *item, QString name = QString::null, bool open = true);
56
virtual QString key(int col, bool asc) const;
58
const QString &filename(void) const
62
void setFilename(const QString &file);
64
virtual void selected(void);
65
toProjectTemplateItem *previousSibling(void);
67
virtual QWidget *selectedWidget(QWidget *parent);
70
class toProject : public QVBox
74
toProjectTemplateItem *Root;
77
std::map<QListViewItem *, toProjectTemplateItem *> ItemMap;
79
void update(toProjectTemplateItem *sourceparent, toResultViewItem *parent);
80
QString generateSQL(toProjectTemplateItem *item);
82
toProject(toProjectTemplateItem *top, QWidget *parent);
85
void selectItem(toProjectTemplateItem *);
90
void newProject(void);
91
void saveProject(void);
92
void generateSQL(void);
93
void selectionChanged(void);
98
class toProjectTemplate : public QObject, public toTemplateProvider
102
toProjectTemplateItem *Root;
103
std::map<QCString, QString> Import;
105
QToolButton *AddFile;
106
QToolButton *DelFile;
110
toProjectTemplate(void)
111
: QObject(NULL, "projecttemplate"), toTemplateProvider("project")
116
virtual void exportData(std::map<QCString, QString> &data, const QCString &prefix);
117
virtual void importData(std::map<QCString, QString> &data, const QCString &prefix);
119
virtual void insertItems(QListView *parent, QToolBar *toolbar);
120
virtual void removeItems(QListViewItem *item);
122
virtual toProject *selectedWidget(QWidget *parent);
124
virtual toProjectTemplateItem *root(void)
129
friend class toProject;
133
void changeItem(QListViewItem *item);