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.
2
/* BEGIN_COMMON_COPYRIGHT_HEADER
4
* TOra - An Oracle Toolkit for DBA's and developers
6
* Shared/mixed copyright is held throughout files in this product
8
* Portions Copyright (C) 2000-2001 Underscore AB
9
* Portions Copyright (C) 2003-2005 Quest Software, Inc.
10
* Portions Copyright (C) 2004-2008 Numerous Other Contributors
12
* This program is free software; you can redistribute it and/or
13
* modify it under the terms of the GNU General Public License
14
* as published by the Free Software Foundation; only version 2 of
15
* the License is valid for this program.
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* You should have received a copy of the GNU General Public License
23
* along with this program; if not, write to the Free Software
24
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
* As a special exception, you have permission to link this program
27
* with the Oracle Client libraries and distribute executables, as long
28
* as you follow the requirements of the GNU GPL in regard to all of the
29
* software in the executable aside from Oracle client libraries.
31
* Specifically you are not permitted to link this program with the
32
* Qt/UNIX, Qt/Windows or Qt Non Commercial products of TrollTech.
33
* And you are not permitted to distribute binaries compiled against
36
* You may link this product with any GPL'd Qt library.
38
* All trademarks belong to their respective owners.
40
* END_COMMON_COPYRIGHT_HEADER */
38
42
#ifndef TOTEMPLATE_H
39
43
#define TOTEMPLATE_H
136
151
* @param parent The list into which to insert the item.
137
152
* @param toolbar The template toolbar if any buttons are to be added on it.
139
virtual void insertItems(QListView *parent, QToolBar *toolbar) = 0;
154
virtual void insertItems(toTreeWidget *parent, QToolBar *toolbar) = 0;
141
156
/** Save settings for this template provider.
142
157
* @param data Map of data.
143
158
* @param prefix Prefix of where to save info.
145
virtual void exportData(std::map<QCString, QString> &data, const QCString &prefix);
160
virtual void exportData(std::map<QString, QString> &data, const QString &prefix);
146
161
/** Save settings for all template providers.
147
162
* @param data Map of data.
148
163
* @param prefix Prefix of where to save info.
150
static void exportAllData(std::map<QCString, QString> &data, const QCString &prefix);
165
static void exportAllData(std::map<QString, QString> &data, const QString &prefix);
152
167
* @param data Data to read from a map.
153
168
* @param prefix Prefix to read data from.
155
virtual void importData(std::map<QCString, QString> &data, const QCString &prefix);
170
virtual void importData(std::map<QString, QString> &data, const QString &prefix);
156
171
/** Import data for all template providers.
157
172
* @param data Data to read from a map.
158
173
* @param prefix Prefix to read data from.
160
static void importAllData(std::map<QCString, QString> &data, const QCString &prefix);
175
static void importAllData(std::map<QString, QString> &data, const QString &prefix);
162
177
/** Used internally to indicate if template help is shown.
164
179
static void setShown(bool shown);
165
180
/** Used internally to indicate tool key string
167
static void setToolKey(const QCString &key);
182
static void setToolKey(const QString &key);
169
184
friend class toTemplate;
331
348
friend class toTemplateSQLObject;
352
class toTemplatePrefs : public QWidget,
353
public Ui::toTemplateSetupUI,
362
toTemplatePrefs(toTool *tool, QWidget *parent, const char *name = 0);
365
virtual void saveSetting(void);
366
virtual void addFile(void);
367
virtual void editFile(void);
368
virtual void delFile(void);
372
class toTemplateAddFile : public QDialog, public Ui::toTemplateAddFileUI
377
toTemplateAddFile(QWidget *parent, const char *name = 0);
380
virtual void browse(void);
381
virtual void valid(void);
384
class toTemplateEdit : public QDialog,
385
public Ui::toTemplateEditUI,
390
std::map<QString, QString> &TemplateMap;
391
std::map<QString, QString>::iterator LastTemplate;
394
void connectList(bool conn);
395
toTreeWidgetItem *findLast(void);
396
void allocateItem(void);
397
bool clearUnused(toTreeWidgetItem *first, const QString &pre);
398
toTemplateEdit(std::map<QString, QString> &pairs, QWidget *parent, const char *name = 0);
399
QString name(toTreeWidgetItem *item);
402
virtual void updateFromMap(void);
403
virtual void remove(void);
404
virtual void preview(void);
405
virtual void newTemplate(void);
406
virtual void changeSelection(void);