18 #include <QHBoxLayout>
19 #include <QVBoxLayout>
23 #include <QPushButton>
24 #include <QMessageBox>
25 #include <QButtonGroup>
29 #include <QStringList>
30 #include <QPushButton>
31 #include <QFileDialog>
32 #include <QGridLayout>
43 setWindowTitle(tr(
"Document Settings"));
47 Expr.setPattern(
"[0-9a-zA-Z /\\]+");
50 vLayout =
new QVBoxLayout(
this);
52 QGroupBox * codeGroup =
new QGroupBox (tr(
"Code Creation Settings"));
54 QVBoxLayout *vbox =
new QVBoxLayout();
55 codeGroup->setLayout(vbox);
57 QGridLayout * all =
new QGridLayout ();
65 all->addWidget (
IconButt, 0, 0, 1, 1);
71 all->addWidget (
IconEdit, 0, 1, 1, 3);
77 QLabel * l1 =
new QLabel (tr(
"Output file:"));
78 l1->setAlignment (Qt::AlignRight);
79 all->addWidget (l1, 1, 0, 1, 1);
91 QLabel * l2 =
new QLabel (tr(
"Icon description:"));
92 l2->setAlignment (Qt::AlignRight);
93 all->addWidget (l2, 2, 0);
101 QLabel * l3 =
new QLabel (tr(
"Description:"));
102 l3->setAlignment (Qt::AlignRight);
103 all->addWidget (l3, 3, 0);
109 QRadioButton * nonRadio =
110 new QRadioButton (tr(
"unspecified device"));
111 QRadioButton * bjtRadio =
112 new QRadioButton (tr(
"NPN/PNP polarity"));
113 QRadioButton * mosRadio =
114 new QRadioButton (tr(
"NMOS/PMOS polarity"));
119 bjtRadio->setChecked (
true);
121 mosRadio->setChecked (
true);
123 nonRadio->setChecked (
true);
124 all->addMultiCellWidget (nonRadio, 4, 4, 0, 1);
125 all->addWidget (bjtRadio, 4, 2);
126 all->addMultiCellWidget (mosRadio, 4, 4, 3, 4);
129 QRadioButton * anaRadio =
130 new QRadioButton (tr(
"analog only"));
131 QRadioButton * digRadio =
132 new QRadioButton (tr(
"digital only"));
133 QRadioButton * allRadio =
134 new QRadioButton (tr(
"both"));
139 allRadio->setChecked (
true);
141 anaRadio->setChecked (
true);
143 digRadio->setChecked (
true);
144 all->addMultiCellWidget (anaRadio, 5, 5, 0, 1);
145 all->addWidget (allRadio, 5, 2);
146 all->addMultiCellWidget (digRadio, 5, 5, 3, 4);
148 QHBoxLayout * Buttons =
new QHBoxLayout ();
149 vbox->addLayout(Buttons);
150 QPushButton * ButtonOk =
new QPushButton (tr(
"Ok"));
151 Buttons->addWidget(ButtonOk);
152 QPushButton * ButtonCancel =
new QPushButton (tr(
"Cancel"));
153 Buttons->addWidget(ButtonCancel);
154 connect (ButtonOk, SIGNAL(clicked()), SLOT(
slotOk()));
155 connect (ButtonCancel, SIGNAL(clicked()), SLOT(reject()));
156 ButtonOk->setDefault(
true);
167 bool changed =
false;
209 QString s = QFileDialog::getOpenFileName (
211 tr(
"PNG files")+
" (*.png);;"+
212 tr(
"Any file")+
" (*)",
213 this, 0, tr(
"Enter an Icon File Name"));
QButtonGroup * toggleGroupTyp
Definition of the TextDoc class.
QRegExpValidator * Validator
QCheckBox * RecreateCheck
Definitions and declarations for the main application.
QString getModuleName(void)
TextDoc::getModuleName parse the module name ou of the text file contents.
QLineEdit * ShortDescEdit
void slotSetChanged()
TextDoc::slotSetChanged togles tab icon to indicate unsaved changes.
VASettingsDialog(TextDoc *)
The TextDoc class definition.
QButtonGroup * toggleGroupDev