24 #include <qhgroupbox.h>
25 #include <qpushbutton.h>
28 #include <qcombobox.h>
36 : QDialog(parent, 0, false, Qt::WDestructiveClose)
38 setCaption(
"QucsTranscalc "+tr(
"Options"));
41 vLayout =
new QVBoxLayout(
this);
42 vLayout->setMargin(3);
43 vLayout->setSpacing(3);
45 QHGroupBox * h =
new QHGroupBox(tr(
"Units"),
this);
46 vLayout->addWidget(h);
47 QVBox * l =
new QVBox(h);
49 QLabel * lfr =
new QLabel(tr(
"Frequency"),l);
50 lfr->setAlignment (Qt::AlignRight);
51 QLabel * lle =
new QLabel(tr(
"Length"),l);
52 lle->setAlignment (Qt::AlignRight);
53 QLabel * lre =
new QLabel(tr(
"Resistance"),l);
54 lre->setAlignment (Qt::AlignRight);
55 QLabel * lan =
new QLabel(tr(
"Angle"),l);
56 lan->setAlignment (Qt::AlignRight);
57 QVBox * r =
new QVBox(h);
59 for (
int j = 0; j < 4; j++) {
60 units[j] =
new QComboBox(r);
69 QHBox * h2 =
new QHBox(
this);
70 vLayout->addWidget(h2);
72 QPushButton *ButtonSave =
new QPushButton(tr(
"Save as Default"), h2);
73 connect(ButtonSave, SIGNAL(clicked()), SLOT(slotSave()));
75 QPushButton *ButtonClose =
new QPushButton(tr(
"Dismiss"), h2);
76 connect(ButtonClose, SIGNAL(clicked()), SLOT(slotClose()));
77 ButtonClose->setFocus();
85 void OptionsDialog::slotClose()
90 void OptionsDialog::slotSave()