154 QString param, str, spaces;
157 str = fParamNo_spinBox->text();
158 if (str.toInt() < 10)
159 param =
" " + str +
" ";
161 param =
" " + str +
" ";
164 str = fName_lineEdit->text();
166 QMessageBox::critical(
this,
"ERROR",
167 "empty parameter name not allowed!",
168 QMessageBox::Ok, QMessageBox::NoButton);
172 if (str.length() < 13)
173 param += spaces.fill(
' ', 13-str.length());
179 str = fValue_lineEdit->text();
181 QMessageBox::critical(
this,
"ERROR",
182 "empty parameter value not allowed!",
183 QMessageBox::Ok, QMessageBox::NoButton);
187 if (str.length() < 10)
188 param += spaces.fill(
' ', 10-str.length());
194 str = fStep_lineEdit->text();
196 QMessageBox::critical(
this,
"ERROR",
197 "empty parameter step not allowed!",
198 QMessageBox::Ok, QMessageBox::NoButton);
202 if (str.length() < 10)
203 param += spaces.fill(
' ', 10-str.length());
211 if ((fLower_lineEdit->text() !=
"none") || (fUpper_lineEdit->text() !=
"none")) {
213 str = fLower_lineEdit->text();
215 double val = str.toDouble(&ok);
216 if (!ok && (str !=
"none")) {
217 QMessageBox::critical(
this,
"ERROR",
218 "invalid lower boundary! Must be a double are the key word 'none'",
219 QMessageBox::Ok, QMessageBox::NoButton);
223 if (str.length() < 10)
224 param += spaces.fill(
' ', 10-str.length());
230 str = fUpper_lineEdit->text();
231 val = str.toDouble(&ok);
232 if (!ok && (str !=
"none")) {
233 QMessageBox::critical(
this,
"ERROR",
234 "invalid upper boundary! Must be a double are the key word 'none'",
235 QMessageBox::Ok, QMessageBox::NoButton);
239 if (str.length() < 10)
240 param += spaces.fill(
' ', 10-str.length());
249 fParam_plainTextEdit->appendPlainText(param);
252 fParamNo_spinBox->stepUp();
255 fName_lineEdit->setText(
"");
258 fValue_lineEdit->setText(
"");
261 fStep_lineEdit->setText(
"");
264 fLower_lineEdit->setText(
"none");
267 fUpper_lineEdit->setText(
"none");
269 fName_lineEdit->setFocus();