21 #include <qlineedit.h>
22 #include <qvalidator.h>
23 #include <qpushbutton.h>
24 #include <qmessagebox.h>
25 #include <qbuttongroup.h>
26 #include <qradiobutton.h>
27 #include <qvgroupbox.h>
29 #include <qstringlist.h>
37 : QDialog(Doc_, 0, true, Qt::WDestructiveClose)
40 setCaption(tr(
"Document Settings"));
42 Expr.setPattern(
"[0-9][0-9a-zA-Z ]+");
43 Validator =
new QRegExpValidator(Expr,
this);
45 QVBoxLayout *all =
new QVBoxLayout(
this);
48 QVGroupBox *setGroup =
new QVGroupBox(tr(
"Digital Simulation Settings"),
this);
49 all->addWidget(setGroup);
51 QButtonGroup *toggleGroup =
new QButtonGroup();
52 simRadio =
new QRadioButton(tr(
"Simulation"), setGroup);
55 QHBox *hb1 =
new QHBox(setGroup);
57 TimeLabel =
new QLabel(tr(
"Duration of Simulation:"), hb1);
63 QRadioButton *
comRadio =
new QRadioButton(tr(
"Precompile Module"), setGroup);
65 toggleGroup->insert(comRadio);
66 connect(toggleGroup, SIGNAL(clicked(
int)), SLOT(slotChangeMode(
int)));
68 QHBox *hb3 =
new QHBox(setGroup);
70 NameLabel =
new QLabel(tr(
"Library Name:"), hb3);
74 setGroup->addSpace(15);
75 QHBox *hb2 =
new QHBox(setGroup);
77 LibLabel =
new QLabel(tr(
"Libraries:"), hb2);
83 QHBox *Buttons =
new QHBox(
this);
84 all->addWidget(Buttons);
85 QPushButton *ButtonOk =
new QPushButton(tr(
"Ok"), Buttons);
86 QPushButton *ButtonCancel =
new QPushButton(tr(
"Cancel"), Buttons);
87 connect(ButtonOk, SIGNAL(clicked()), SLOT(slotOk()));
88 connect(ButtonCancel, SIGNAL(clicked()), SLOT(reject()));
95 ButtonOk->setDefault(
true);
111 void DigiSettingsDialog::slotOk()
113 bool changed =
false;
117 if(!
VHDL_Time(s, tr(
"Document Settings"))) {
118 QMessageBox::critical(
this, tr(
"Error"), s.mid(1));
128 QStringList lst = QStringList::split(
' ',
LibEdit->text());
138 QString lib =
NameEdit->text().stripWhiteSpace();
150 void DigiSettingsDialog::slotChangeMode(
int idx)