Skip to content
Snippets Groups Projects
Commit 5c313611 authored by Langella Olivier's avatar Langella Olivier
Browse files

spectrum form completed

parent 102fea87
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,7 @@ void TandemParameters::setParamLabelValue(const QString & label, const QString &
throw pappso::ExceptionNotPossible(QObject::tr("%1 value must be Daltons or ppm (not %2)").arg(label).arg(value));
}
}
if ((label == "spectrum, parent monoisotopic mass isotope error") || (label == "spectrum, use neutral loss window")) {
if ((label == "spectrum, parent monoisotopic mass isotope error") || (label == "spectrum, use neutral loss window") || (label == "spectrum, use contrast angle")) {
if ((value != "yes") && (value != "no")) {
throw pappso::ExceptionNotPossible(QObject::tr("%1 value must be yes or no (not %2)").arg(label).arg(value));
}
......@@ -109,21 +109,19 @@ void TandemParameters::setParamLabelValue(const QString & label, const QString &
}
if ((label == "spectrum, maximum parent charge") || (label == "spectrum, total peaks") || (label == "spectrum, minimum peaks")) {
if ((label == "spectrum, maximum parent charge") || (label == "spectrum, total peaks") || (label == "spectrum, minimum peaks") || (label == "spectrum, sequence batch size") || (label == "spectrum, threads")) {
bool ok;
value.toInt(&ok);
if (!ok) {// not an integer
throw pappso::ExceptionNotPossible(QObject::tr("%1 value must be an integer (not %2)").arg(label).arg(value));
}
}
if (label == "spectrum, fragment mass type") {
if ((value != "monoisotopic") && (value != "average")) {
throw pappso::ExceptionNotPossible(QObject::tr("%1 value must be monoisotopic or average (not %2)").arg(label).arg(value));
}
}
_map_label_value.insert(label, value);
}
void TandemParameters::setMethodName(const QString & method) {
......
......@@ -131,14 +131,28 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-60</y>
<y>-162</y>
<width>976</width>
<height>496</height>
<height>598</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="15" column="2">
<widget class="QPushButton" name="suca_push_button">
<property name="text">
<string>?</string>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Minimum parent MH+ to be considered</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
......@@ -439,29 +453,81 @@
</property>
</widget>
</item>
<item row="14" column="2">
<widget class="QPushButton" name="spsbs_push_button">
<property name="text">
<string>?</string>
</property>
</widget>
</item>
<item row="13" column="2">
<widget class="QPushButton" name="smpmh_push_button">
<property name="text">
<string>?</string>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QLineEdit" name="smpmh_edit"/>
</item>
<item row="14" column="1">
<widget class="QLineEdit" name="spsbs_edit">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QLineEdit" name="smfmz_edit"/>
</item>
<item row="11" column="1">
<widget class="QLineEdit" name="smp_edit"/>
</item>
<item row="13" column="0">
<widget class="QLabel" name="label_15">
<item row="14" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>Minimum parent MH+ to be considered</string>
<string>Alter how protein sequences are retrieved from FASTA files</string>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QLineEdit" name="smpmh_edit"/>
</item>
<item row="13" column="2">
<widget class="QPushButton" name="smpmh_push_button">
<item row="16" column="2">
<widget class="QPushButton" name="st_push_button">
<property name="text">
<string>?</string>
</property>
</widget>
</item>
<item row="15" column="1">
<widget class="QComboBox" name="suca_combo_box">
<item>
<property name="text">
<string>yes</string>
</property>
</item>
<item>
<property name="text">
<string>no</string>
</property>
</item>
</widget>
</item>
<item row="16" column="1">
<widget class="QLineEdit" name="st_edit"/>
</item>
<item row="16" column="0">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Set number of threads</string>
</property>
</widget>
</item>
<item row="15" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Use contrast angle</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
......@@ -639,7 +705,7 @@
<hints>
<hint type="sourcelabel">
<x>995</x>
<y>157</y>
<y>55</y>
</hint>
<hint type="destinationlabel">
<x>1728</x>
......@@ -671,7 +737,7 @@
<hints>
<hint type="sourcelabel">
<x>995</x>
<y>191</y>
<y>89</y>
</hint>
<hint type="destinationlabel">
<x>720</x>
......@@ -687,7 +753,7 @@
<hints>
<hint type="sourcelabel">
<x>995</x>
<y>225</y>
<y>123</y>
</hint>
<hint type="destinationlabel">
<x>1181</x>
......@@ -703,7 +769,7 @@
<hints>
<hint type="sourcelabel">
<x>995</x>
<y>259</y>
<y>157</y>
</hint>
<hint type="destinationlabel">
<x>1037</x>
......@@ -735,7 +801,7 @@
<hints>
<hint type="sourcelabel">
<x>909</x>
<y>157</y>
<y>55</y>
</hint>
<hint type="destinationlabel">
<x>400</x>
......@@ -751,7 +817,7 @@
<hints>
<hint type="sourcelabel">
<x>909</x>
<y>191</y>
<y>89</y>
</hint>
<hint type="destinationlabel">
<x>464</x>
......@@ -767,7 +833,7 @@
<hints>
<hint type="sourcelabel">
<x>909</x>
<y>225</y>
<y>123</y>
</hint>
<hint type="destinationlabel">
<x>798</x>
......@@ -783,7 +849,7 @@
<hints>
<hint type="sourcelabel">
<x>909</x>
<y>259</y>
<y>157</y>
</hint>
<hint type="destinationlabel">
<x>970</x>
......@@ -831,7 +897,7 @@
<hints>
<hint type="sourcelabel">
<x>995</x>
<y>293</y>
<y>191</y>
</hint>
<hint type="destinationlabel">
<x>1209</x>
......@@ -847,7 +913,7 @@
<hints>
<hint type="sourcelabel">
<x>995</x>
<y>327</y>
<y>225</y>
</hint>
<hint type="destinationlabel">
<x>1247</x>
......@@ -863,7 +929,7 @@
<hints>
<hint type="sourcelabel">
<x>995</x>
<y>361</y>
<y>259</y>
</hint>
<hint type="destinationlabel">
<x>1142</x>
......@@ -879,7 +945,7 @@
<hints>
<hint type="sourcelabel">
<x>995</x>
<y>395</y>
<y>293</y>
</hint>
<hint type="destinationlabel">
<x>1322</x>
......@@ -895,7 +961,7 @@
<hints>
<hint type="sourcelabel">
<x>995</x>
<y>429</y>
<y>327</y>
</hint>
<hint type="destinationlabel">
<x>1259</x>
......@@ -911,7 +977,7 @@
<hints>
<hint type="sourcelabel">
<x>995</x>
<y>463</y>
<y>361</y>
</hint>
<hint type="destinationlabel">
<x>1588</x>
......@@ -927,7 +993,7 @@
<hints>
<hint type="sourcelabel">
<x>995</x>
<y>497</y>
<y>395</y>
</hint>
<hint type="destinationlabel">
<x>1674</x>
......@@ -943,7 +1009,7 @@
<hints>
<hint type="sourcelabel">
<x>977</x>
<y>519</y>
<y>417</y>
</hint>
<hint type="destinationlabel">
<x>1611</x>
......@@ -959,7 +1025,7 @@
<hints>
<hint type="sourcelabel">
<x>933</x>
<y>539</y>
<y>437</y>
</hint>
<hint type="destinationlabel">
<x>1711</x>
......@@ -975,7 +1041,7 @@
<hints>
<hint type="sourcelabel">
<x>968</x>
<y>586</y>
<y>484</y>
</hint>
<hint type="destinationlabel">
<x>1642</x>
......@@ -983,6 +1049,54 @@
</hint>
</hints>
</connection>
<connection>
<sender>spsbs_push_button</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>945</x>
<y>513</y>
</hint>
<hint type="destinationlabel">
<x>1579</x>
<y>627</y>
</hint>
</hints>
</connection>
<connection>
<sender>suca_push_button</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>966</x>
<y>559</y>
</hint>
<hint type="destinationlabel">
<x>1734</x>
<y>637</y>
</hint>
</hints>
</connection>
<connection>
<sender>st_push_button</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>922</x>
<y>586</y>
</hint>
<hint type="destinationlabel">
<x>1734</x>
<y>677</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>doCopy()</slot>
......
......@@ -233,6 +233,18 @@ void EditTandemPresetDialog::doHelp() {
{
html_doc.setFileName(":/tandem/resources/html_doc/smpmh.html");
}
if(senderObjName == "spsbs_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/spsbs.html");
}
if(senderObjName == "suca_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/suca.html");
}
if(senderObjName == "st_push_button")
{
html_doc.setFileName(":/tandem/resources/html_doc/st.html");
}
if (html_doc.open(QFile::ReadOnly | QFile::Text)) {
QTextStream in(&html_doc);
......@@ -269,6 +281,9 @@ void EditTandemPresetDialog::readUi() {
_tandem_params.setParamLabelValue("spectrum, minimum peaks", ui->smp_edit->text());
_tandem_params.setParamLabelValue("spectrum, minimum fragment mz", ui->smfmz_edit->text());
_tandem_params.setParamLabelValue("spectrum, minimum parent m+h", ui->smpmh_edit->text());
_tandem_params.setParamLabelValue("spectrum, sequence batch size", ui->spsbs_edit->text());
_tandem_params.setParamLabelValue("spectrum, use contrast angle", ui->suca_combo_box->currentText());
_tandem_params.setParamLabelValue("spectrum, threads", ui->st_edit->text());
}
catch (pappso::PappsoException & error) {
......@@ -335,8 +350,14 @@ void EditTandemPresetDialog::populate() {
ui->smpmh_edit->setText(_tandem_params.getValue("spectrum, minimum parent m+h"));
//<note type="input" label="spectrum, sequence batch size">1000</note>
ui->spsbs_edit->setText(_tandem_params.getValue("spectrum, sequence batch size"));
//<note type="input" label="spectrum, use contrast angle">no</note>
index = ui->suca_combo_box->findText(_tandem_params.getValue("spectrum, use contrast angle"));
if ( index != -1 ) { // -1 for not found
ui->suca_combo_box->setCurrentIndex(index);
}
//<note type="input" label="spectrum, threads">1</note>
ui->st_edit->setText(_tandem_params.getValue("spectrum, threads"));
qDebug() << "EditTandemPresetDialog::populate end";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment