languages/pascal/compiler/dccoptions/optiontabs.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
#include <kdialog.h>
00011
#include <klocale.h>
00012
00013
#include <qspinbox.h>
00014
#include <qlabel.h>
00015
#include <qlayout.h>
00016
#include <qvbuttongroup.h>
00017
#include <qapplication.h>
00018
#include <qpushbutton.h>
00019
00020
#include "flagboxes.h"
00021
00022
#include "optiontabs.h"
00023
00024 LinkerTab::LinkerTab(
QWidget * parent,
const char * name )
00025 :
QWidget(parent, name), radioController(new
FlagRadioButtonController()),
00026 pathController(new
FlagPathEditController()),
00027 editController(new
FlagEditController())
00028 {
00029
QBoxLayout *layout =
new QVBoxLayout(
this, KDialog::marginHint(), KDialog::spacingHint());
00030 layout->setAutoAdd(
true);
00031
00032
QVButtonGroup *map_group =
new QVButtonGroup(i18n(
"Map File"),
this);
00033
QRadioButton *m_defaultMap =
new QRadioButton(i18n(
"Off"), map_group);
00034 m_defaultMap->setChecked(
true);
00035
new FlagRadioButton(map_group,
radioController,
00036
"-GS", i18n(
"Segments"));
00037
new FlagRadioButton(map_group,
radioController,
00038
"-GP", i18n(
"Publics"));
00039
new FlagRadioButton(map_group,
radioController,
00040
"-GD", i18n(
"Detailed"));
00041 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00042 layout->addSpacing(10);
00043
00044
new FlagPathEdit(
this,
"",
pathController,
00045
"--dynamicloader=", i18n(
"Default dynamic loader:"), KFile::File);
00046 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00047 layout->addSpacing(10);
00048
00049
new FlagSpinEdit(
this, 0, 2147483647, 1024, 1048576,
editController,
00050
"-$M", i18n(
"Reserved address space:"));
00051 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00052 layout->addSpacing(10);
00053
00054 layout->addStretch();
00055 }
00056
00057 LinkerTab::~LinkerTab( )
00058 {
00059
delete radioController;
00060
delete pathController;
00061
delete editController;
00062 }
00063
00064 void LinkerTab::readFlags(
QStringList * str )
00065 {
00066
pathController->
readFlags(str);
00067
radioController->
readFlags(str);
00068
editController->
readFlags(str);
00069 }
00070
00071 void LinkerTab::writeFlags(
QStringList * str )
00072 {
00073
pathController->
writeFlags(str);
00074
radioController->
writeFlags(str);
00075
editController->
writeFlags(str);
00076 }
00077
00078
00079
00080 LocationsTab::LocationsTab(
QWidget * parent,
const char * name )
00081 :
QWidget(parent, name), pathController(new
FlagPathEditController())
00082 {
00083
QBoxLayout *layout =
new QVBoxLayout(
this, KDialog::marginHint(), KDialog::spacingHint());
00084 layout->setAutoAdd(
true);
00085
00086
new FlagPathEdit(
this,
":",
pathController,
00087
"-I", i18n(
"Include search path (delimited by \":\"):"));
00088
new FlagPathEdit(
this,
":",
pathController,
00089
"-R", i18n(
"Resource search path (delimited by \":\"):"));
00090
new FlagPathEdit(
this,
":",
pathController,
00091
"-U", i18n(
"Unit search path (delimited by \":\"):"));
00092
new FlagPathEdit(
this,
":",
pathController,
00093
"-O", i18n(
"Object search path (delimited by \":\"):"));
00094 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00095 layout->addStretch();
00096 }
00097
00098 LocationsTab::~LocationsTab( )
00099 {
00100
delete pathController;
00101 }
00102
00103 void LocationsTab::readFlags(
QStringList * str )
00104 {
00105
pathController->
readFlags(str);
00106 }
00107
00108 void LocationsTab::writeFlags(
QStringList * str )
00109 {
00110
pathController->
writeFlags(str);
00111 }
00112
00113
00114
00115 Locations2Tab::Locations2Tab(
QWidget * parent,
const char * name )
00116 :
QWidget(parent, name), pathController(new
FlagPathEditController())
00117 {
00118
QBoxLayout *layout =
new QVBoxLayout(
this, KDialog::marginHint(), KDialog::spacingHint());
00119 layout->setAutoAdd(
true);
00120
00121
new FlagPathEdit(
this,
"",
pathController,
00122
"-E", i18n(
"Executable output directory:"));
00123
new FlagPathEdit(
this,
"",
pathController,
00124
"-N", i18n(
"Unit output directory:"));
00125
new FlagPathEdit(
this,
"",
pathController,
00126
"-LE", i18n(
"Package directory:"));
00127
new FlagPathEdit(
this,
"",
pathController,
00128
"-LN", i18n(
"Package source code directory:"));
00129 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00130 layout->addStretch();
00131 }
00132
00133 Locations2Tab::~Locations2Tab( )
00134 {
00135
delete pathController;
00136 }
00137
00138 void Locations2Tab::readFlags(
QStringList * str )
00139 {
00140
pathController->
readFlags(str);
00141 }
00142
00143 void Locations2Tab::writeFlags(
QStringList * str )
00144 {
00145
pathController->
writeFlags(str);
00146 }
00147
00148
00149
00150 GeneralTab::GeneralTab(
QWidget * parent,
const char * name )
00151 :
QWidget(parent, name), controller(new
FlagCheckBoxController()),
00152 editController(new
FlagEditController())
00153 {
00154
QBoxLayout *layout =
new QVBoxLayout(
this, KDialog::marginHint(), KDialog::spacingHint());
00155 layout->setAutoAdd(
true);
00156
00157
QVButtonGroup *build_group =
new QVButtonGroup(i18n(
"Build"),
this);
00158
new FlagCheckBox(build_group,
controller,
00159
"-B", i18n(
"Build all units"));
00160
new FlagCheckBox(build_group,
controller,
00161
"-M", i18n(
"Make modified units"));
00162
new FlagCheckBox(build_group,
controller,
00163
"-Q", i18n(
"Quiet compile"));
00164
new FlagCheckBox(build_group,
controller,
00165
"-Z", i18n(
"Disable implicit package compilation"));
00166 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00167
00168 layout->addSpacing(10);
00169
00170
new FlagListEdit(
this,
":",
editController,
"-D", i18n(
"Conditional defines (delimited by \":\"):"));
00171 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00172
00173
new FlagListEdit(
this,
":",
editController,
"-A", i18n(
"Unit aliases in form unit=alias (delimited by \":\"):"));
00174 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00175
00176 layout->addSpacing(10);
00177
00178 QVButtonGroup *message_group =
new QVButtonGroup(i18n(
"Messages"),
this);
00179
new FlagCheckBox(message_group,
controller,
00180
"-H", i18n(
"Output hint messages"));
00181
new FlagCheckBox(message_group,
controller,
00182
"-W", i18n(
"Output warning messages"));
00183 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00184
00185 layout->addSpacing(10);
00186 QVButtonGroup *package_group =
new QVButtonGroup(i18n(
"Packages"),
this);
00187
new FlagListEdit(package_group,
":",
editController,
"-LU", i18n(
"Build with packages (delimited by \":\"):"));
00188 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00189
00190 layout->addStretch();
00191 }
00192
00193
GeneralTab::~GeneralTab( )
00194 {
00195
delete controller;
00196
delete editController;
00197 }
00198
00199
void GeneralTab::readFlags(
QStringList * str )
00200 {
00201
controller->
readFlags(str);
00202
editController->
readFlags(str);
00203 }
00204
00205
void GeneralTab::writeFlags(
QStringList * str )
00206 {
00207
controller->
writeFlags(str);
00208
editController->
writeFlags(str);
00209 }
00210
00211
00212
00213 CodegenTab::CodegenTab(
QWidget * parent,
const char * name )
00214 :
QWidget(parent, name), controller(new
FlagCheckBoxController()),
00215 listController(new
FlagEditController()),
00216 radioController(new
FlagRadioButtonController())
00217 {
00218
QBoxLayout *layout =
new QVBoxLayout(
this, KDialog::marginHint(), KDialog::spacingHint());
00219
00220
00221
QGridLayout *layout2 =
new QGridLayout(layout, 2, 2, KDialog::spacingHint());
00222
00223
QVButtonGroup *align_group =
new QVButtonGroup(i18n(
"Code Alignment && Stack Frames"),
this);
00224
QRadioButton *align_def =
new QRadioButton(i18n(
"Default (-$A8)"), align_group);
00225 align_def->setChecked(
true);
00226
new FlagRadioButton(align_group,
radioController,
00227
"'-$A1'", i18n(
"Never align"));
00228
new FlagRadioButton(align_group,
radioController,
00229
"'-$A2'", i18n(
"On word boundaries"));
00230
new FlagRadioButton(align_group,
radioController,
00231
"'-$A4'", i18n(
"On double word boundaries"));
00232
new FlagRadioButton(align_group,
radioController,
00233
"'-$A8'", i18n(
"On quad word boundaries"));
00234
new FlagCheckBox(align_group,
controller,
00235
"'-$W+'", i18n(
"Generate stack frames"),
"'-$W-'");
00236 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00237 layout2->addWidget(align_group, 0, 0);
00238
00239 QVButtonGroup *enum_group =
new QVButtonGroup(i18n(
"Enumeration Size"),
this);
00240 QRadioButton *enum_def =
new QRadioButton(i18n(
"Default (-$Z1)"), enum_group);
00241 enum_def->setChecked(
true);
00242
new FlagRadioButton(enum_group,
radioController,
00243
"'-$Z1'", i18n(
"Unsigned byte (256 values)"));
00244
new FlagRadioButton(enum_group,
radioController,
00245
"'-$Z2'", i18n(
"Unsigned word (64K values)"));
00246
new FlagRadioButton(enum_group,
radioController,
00247
"'-$Z4'", i18n(
"Unsigned double word (4096M values)"));
00248 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00249 layout2->addWidget(enum_group, 0, 1);
00250
00251 QVButtonGroup *compile_group =
new QVButtonGroup(i18n(
"Compile Time Checks"),
this);
00252
new FlagCheckBox(compile_group,
controller,
00253
"'-$C+'", i18n(
"Assertions"),
"'-$C-'",
"'-$C+'");
00254
new FlagCheckBox(compile_group,
controller,
00255
"'-$B+'", i18n(
"Complete boolean evaluation"),
"'-$B-'");
00256
new FlagCheckBox(compile_group,
controller,
00257
"'-$X+'", i18n(
"Extended syntax"),
"'-$X-'",
"'-$X+'");
00258
new FlagCheckBox(compile_group,
controller,
00259
"'-$H+'", i18n(
"Long strings"),
"'-$H-'",
"'-$H+'");
00260
new FlagCheckBox(compile_group,
controller,
00261
"'-$P+'", i18n(
"Open string parameters"),
"'-$P-'",
"'-$P+'");
00262
new FlagCheckBox(compile_group,
controller,
00263
"'-$T+'", i18n(
"Type-checked pointers"),
"'-$T-'");
00264
new FlagCheckBox(compile_group,
controller,
00265
"'-$V+'", i18n(
"Var-string checking"),
"'-$V-'",
"'-$V+'");
00266
new FlagCheckBox(compile_group,
controller,
00267
"'-$J+'", i18n(
"Writable typed constants"),
"'-$J-'");
00268 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00269 layout2->addWidget(compile_group, 1, 0);
00270
00271 QVButtonGroup *run_group =
new QVButtonGroup(i18n(
"Run Time Checks"),
this);
00272
new FlagCheckBox(run_group,
controller,
00273
"'-$M+'", i18n(
"Runtime type information"),
"'-$M-'");
00274
new FlagCheckBox(run_group,
controller,
00275
"'-$G+'", i18n(
"Imported data references"),
"'-$G-'",
"'-$G+'");
00276
new FlagCheckBox(run_group,
controller,
00277
"'-$I+'", i18n(
"Input/Output checking"),
"'-$I-'",
"'-$I+'");
00278
new FlagCheckBox(run_group,
controller,
00279
"'-$Q+'", i18n(
"Overflow checking"),
"'-$Q-'");
00280
new FlagCheckBox(run_group,
controller,
00281
"'-$R+'", i18n(
"Range checking"),
"'-$R-'");
00282 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00283 layout2->addWidget(run_group, 1, 1);
00284
00285 layout->addStretch();
00286 }
00287
00288 CodegenTab::~CodegenTab( )
00289 {
00290
delete controller;
00291
delete listController;
00292
delete radioController;
00293 }
00294
00295 void CodegenTab::readFlags(
QStringList * str )
00296 {
00297
controller->
readFlags(str);
00298
listController->
readFlags(str);
00299
radioController->
readFlags(str);
00300 }
00301
00302 void CodegenTab::writeFlags(
QStringList * str )
00303 {
00304
controller->
writeFlags(str);
00305
listController->
writeFlags(str);
00306
radioController->
writeFlags(str);
00307 }
00308
00309
00310
00311 DebugOptimTab::DebugOptimTab(
QWidget * parent,
const char * name )
00312 :
QWidget(parent, name), controller(new
FlagCheckBoxController()),
00313 radioController(new
FlagRadioButtonController)
00314 {
00315
QBoxLayout *layout =
new QVBoxLayout(
this, KDialog::marginHint(), KDialog::spacingHint());
00316
00317
00318
QVButtonGroup *optim_group =
new QVButtonGroup(i18n(
"Optimization"),
this);
00319
new FlagCheckBox(optim_group,
controller,
00320
"'-$O+'", i18n(
"Enable optimizations"),
"'-$O-'",
"'-$O+'");
00321 layout->
addWidget(optim_group);
00322 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00323 layout->addSpacing(10);
00324
00325
QBoxLayout *layout2 =
new QHBoxLayout(layout, KDialog::spacingHint());
00326
00327 QVButtonGroup *debug_group =
new QVButtonGroup(i18n(
"Debugging"),
this);
00328
new FlagCheckBox(debug_group,
controller,
00329
"'-$D+'", i18n(
"Debug information"),
"'-$D-'",
"'-$D+'");
00330
new FlagCheckBox(debug_group,
controller,
00331
"'-$L+'", i18n(
"Local symbol information"),
"'-$L-'",
"'-$L+'");
00332
gdb =
new FlagCheckBox(debug_group,
controller,
00333
"-V", i18n(
"Debug information for GDB"));
00334
namespacedb =
new FlagCheckBox(debug_group,
controller,
00335
"-VN", i18n(
"Namespace debug info"));
00336
symboldb =
new FlagCheckBox(debug_group,
controller,
00337
"-VR", i18n(
"Write symbol info in an .rsm file"));
00338 layout2->
addWidget(debug_group);
00339 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00340
00341 QVButtonGroup *debug_add =
new QVButtonGroup(i18n(
"Symbol Reference Information"),
this);
00342
QRadioButton *
m_default =
new QRadioButton(i18n(
"Default (-$YD)"), debug_add);
00343 m_default->setChecked(
true);
00344
new FlagRadioButton(debug_add,
radioController,
00345
"'-$Y-'", i18n(
"No information"));
00346
new FlagRadioButton(debug_add,
radioController,
00347
"'-$YD'", i18n(
"Definition information"));
00348
new FlagRadioButton(debug_add,
radioController,
00349
"'-$Y+'", i18n(
"Full reference information"));
00350 layout2->
addWidget(debug_add);
00351 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00352 layout->addSpacing(10);
00353
00354 QHBoxLayout *layout3 =
new QHBoxLayout(layout, KDialog::spacingHint());
00355
QPushButton *release =
new QPushButton(i18n(
"Release"),
this);
00356 QPushButton *debug =
new QPushButton(i18n(
"Debug"),
this);
00357 layout3->addWidget(release);
00358 layout3->addWidget(debug);
00359 QApplication::sendPostedEvents(
this, QEvent::ChildInserted);
00360 connect(release, SIGNAL(clicked()),
this, SLOT(
setReleaseOptions()));
00361 connect(debug, SIGNAL(clicked()),
this, SLOT(
setDebugOptions()));
00362
00363 layout->addStretch();
00364 }
00365
00366 DebugOptimTab::~ DebugOptimTab( )
00367 {
00368
delete controller;
00369
delete radioController;
00370 }
00371
00372 void DebugOptimTab::readFlags(
QStringList * str )
00373 {
00374
controller->
readFlags(str);
00375
radioController->
readFlags(str);
00376 }
00377
00378 void DebugOptimTab::writeFlags(
QStringList * str )
00379 {
00380
controller->
writeFlags(str);
00381
radioController->
writeFlags(str);
00382 }
00383
00384 void DebugOptimTab::setReleaseOptions()
00385 {
00386
QStringList sl = QStringList::split(
",",
"'-$O+','-$Y-','-$D-','-$L-'");
00387
readFlags(&sl);
00388
gdb->setChecked(
false);
00389
namespacedb->setChecked(
false);
00390
symboldb->setChecked(
false);
00391 }
00392
00393 void DebugOptimTab::setDebugOptions()
00394 {
00395
QStringList sl = QStringList::split(
",",
"'-$O-','-$Y+','-$D+','-$L+',-V,-VN");
00396
readFlags(&sl);
00397 }
00398
00399
#include "optiontabs.moc"
This file is part of the documentation for KDevelop Version 3.0.4.