47#include <QDesktopServices>
73 fFitRangeStart_lineEdit->setValidator(
new QDoubleValidator(fFitRangeStart_lineEdit) );
74 fFitRangeEnd_lineEdit->setValidator(
new QDoubleValidator(fFitRangeEnd_lineEdit) );
77 for (
int i=0; i<fFileFormat_comboBox->count(); i++) {
78 if (fFileFormat_comboBox->itemText(i) ==
"DB") {
84 fFileFormat_comboBox->setCurrentIndex(idx);
103 str =
"RUN " + fRunFileName_lineEdit->text() +
" ";
104 str += fBeamline_lineEdit->text().toUpper() +
" ";
105 str += fInstitute_comboBox->currentText() +
" ";
106 str += fFileFormat_comboBox->currentText() +
" (name beamline institute data-file-format)\n";
126 QString str = fMap_lineEdit->text().trimmed().remove(
" ");
129 for (
int i=0; i<str.length(); i++) {
130 if (!str[i].isDigit()) {
136 str =
"map " + fMap_lineEdit->text() +
"\n";
159 if (fXData_lineEdit->text().isEmpty() || fYData_lineEdit->text().isEmpty()) {
163 str += fXData_lineEdit->text() +
" ";
164 str += fYData_lineEdit->text() +
"\n";
189 if (fFitRangeStart_lineEdit->text().isEmpty() || fFitRangeEnd_lineEdit->text().isEmpty()) {
190 str +=
"fit 0.0 10.0\n";
194 str += fFitRangeStart_lineEdit->text() +
" ";
195 str += fFitRangeEnd_lineEdit->text() +
"\n";
213 QMessageBox::information(
this,
"INFO",
"Will eventually show a help window");
215 bool ok = QDesktopServices::openUrl(QUrl(
fHelpUrl, QUrl::TolerantMode));
217 QString msg = QString(
"<p>Sorry: Couldn't open default web-browser for the help.<br>Please try: <a href=\"%1\">musrfit docu</a> in your web-browser.").arg(
fHelpUrl);
218 QMessageBox::critical(
nullptr, tr(
"FATAL ERROR"), msg, QMessageBox::Close );
Dialog for creating non-muSR RUN blocks in msr files.
PGetNonMusrRunBlockDialog(const QString helpUrl="")
Constructs the non-muSR RUN block dialog.
QString getXYData(bool &valid)
Generates the xy-data specification line.
QString fHelpUrl
URL to the online documentation for non-muSR RUN blocks.
QString getMap(bool &valid)
Generates the parameter map line.
QString getFitRange(bool &valid)
Generates the fit range specification line.
QString getRunHeaderInfo()
Generates the RUN header line.
void helpContent()
Opens the online help for non-muSR RUN blocks.