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.
39
#include <qgroupbox.h>
41
#include <qcheckbox.h>
44
#include <qgroupbox.h>
46
#include "tofilesize.h"
47
#include "tostoragedefinition.h"
49
#include "tostoragedefinitionui.moc"
51
toStorageDefinition::toStorageDefinition(QWidget* parent, const char* name, WFlags fl)
52
: toStorageDefinitionUI(parent, name, fl)
54
InitialSize->setTitle(tr("&Initial size"));
55
InitialSize->setValue(50);
57
NextSize->setTitle(tr("&Next size"));
58
NextSize->setValue(50);
60
OptimalSize->setTitle(tr("&Size"));
61
OptimalSize->setEnabled(false);
64
std::list<QString> toStorageDefinition::sql(void)
66
QString str(QString::fromLatin1("STORAGE (INITIAL "));
67
str.append(InitialSize->sizeString());
68
str.append(QString::fromLatin1(" NEXT "));
69
str.append(NextSize->sizeString());
70
str.append(QString::fromLatin1(" MINEXTENTS "));
71
str.append(InitialExtent->text());
72
str.append(QString::fromLatin1(" MAXEXTENTS "));
73
if (UnlimitedExtent->isChecked())
74
str.append(QString::fromLatin1("UNLIMITED"));
76
str.append(MaximumExtent->text());
77
if (!Optimal->isEnabled())
79
str.append(QString::fromLatin1(" PCTINCREASE "));
80
str.append(PCTIncrease->text());
83
if (!OptimalNull->isChecked())
85
str.append(QString::fromLatin1(" OPTIMAL "));
86
str.append(OptimalSize->sizeString());
88
str.append(QString::fromLatin1(")"));
89
std::list<QString> ret;
90
ret.insert(ret.end(), str);
94
void toStorageDefinition::forRollback(bool val)
96
Optimal->setEnabled(val);
97
PCTIncrease->setEnabled(!val);
98
InitialExtent->setMinValue(2);
99
InitialExtent->setValue(4);