only show N0 estimate dialog in chisq if fittype fits.

This commit is contained in:
2017-02-06 09:19:19 +01:00
parent d13c6565ca
commit 3a112cd391
3 changed files with 29 additions and 2 deletions

View File

@@ -62,6 +62,31 @@ PSubTextEdit::PSubTextEdit(PAdmin *admin, QWidget *parent) :
{
}
//----------------------------------------------------------------------------------------------------
/**
* @brief PSubTextEdit::getFitType
* @return
*/
int PSubTextEdit::getFitType()
{
QString str = toPlainText();
int idx = str.indexOf("fittype");
if (idx == -1)
return -1;
bool ok;
for (int i=idx+7; i<str.length(); i++) {
if (str[i] != ' ') {
idx = QString(str[i]).toInt(&ok);
if (!ok)
idx = -1;
break;
}
}
return idx;
}
//----------------------------------------------------------------------------------------------------
/**
* <p>Starts the msr-title input dialog window.