From a2b7feff8b6c540edfb8dffe94fecb878a59dbb1 Mon Sep 17 00:00:00 2001
From: Olivier Langella <olivier.langella@u-psud.fr>
Date: Sun, 8 Oct 2017 23:13:20 +0200
Subject: [PATCH] protein form is OK

---
 .../edit_tandem_preset_dialog.ui              | 181 +++++++++++++++++-
 .../edittandempresetdialog.cpp                |  40 +++-
 2 files changed, 212 insertions(+), 9 deletions(-)

diff --git a/src/gui/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui b/src/gui/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui
index 65e1fb4ca..a6d78747e 100644
--- a/src/gui/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui
+++ b/src/gui/edit_tandem_preset_dialog/edit_tandem_preset_dialog.ui
@@ -571,6 +571,41 @@
               <layout class="QVBoxLayout" name="verticalLayout_6">
                <item>
                 <layout class="QGridLayout" name="gridLayout_3">
+                 <item row="9" column="0">
+                  <widget class="QLabel" name="label_25">
+                   <property name="text">
+                    <string>Interpretation of peptide phosphorylation model</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="7" column="2">
+                  <widget class="QComboBox" name="pqa_combo_box">
+                   <item>
+                    <property name="text">
+                     <string>yes</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>no</string>
+                    </property>
+                   </item>
+                  </widget>
+                 </item>
+                 <item row="8" column="0">
+                  <widget class="QLabel" name="label_24">
+                   <property name="text">
+                    <string>Protein N-terminus cyclisation</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="7" column="0">
+                  <widget class="QLabel" name="label_23">
+                   <property name="text">
+                    <string>Protein N-terminus common modifications</string>
+                   </property>
+                  </widget>
+                 </item>
                  <item row="3" column="2">
                   <widget class="QLineEdit" name="pcntmc_edit"/>
                  </item>
@@ -663,19 +698,19 @@
                  <item row="2" column="2">
                   <widget class="QLineEdit" name="pcctmc_edit"/>
                  </item>
-                 <item row="5" column="0">
+                 <item row="6" column="2">
+                  <widget class="QLineEdit" name="pntrmm_edit"/>
+                 </item>
+                 <item row="4" column="2">
+                  <widget class="QLineEdit" name="pctrmm_edit"/>
+                 </item>
+                 <item row="6" column="0">
                   <widget class="QLabel" name="label_22">
                    <property name="text">
                     <string>Moiety added to protein N-terminus</string>
                    </property>
                   </widget>
                  </item>
-                 <item row="4" column="2">
-                  <widget class="QLineEdit" name="pctrmm_edit"/>
-                 </item>
-                 <item row="5" column="2">
-                  <widget class="QLineEdit" name="pntrmm_edit"/>
-                 </item>
                  <item row="4" column="3">
                   <widget class="QPushButton" name="pctrmm_push_button">
                    <property name="text">
@@ -683,13 +718,79 @@
                    </property>
                   </widget>
                  </item>
-                 <item row="5" column="3">
+                 <item row="6" column="3">
                   <widget class="QPushButton" name="pntrmm_push_button">
                    <property name="text">
                     <string>?</string>
                    </property>
                   </widget>
                  </item>
+                 <item row="9" column="2">
+                  <widget class="QComboBox" name="pstpb_combo_box">
+                   <item>
+                    <property name="text">
+                     <string>yes</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>no</string>
+                    </property>
+                   </item>
+                  </widget>
+                 </item>
+                 <item row="8" column="2">
+                  <widget class="QComboBox" name="pqp_combo_box">
+                   <item>
+                    <property name="text">
+                     <string>yes</string>
+                    </property>
+                   </item>
+                   <item>
+                    <property name="text">
+                     <string>no</string>
+                    </property>
+                   </item>
+                  </widget>
+                 </item>
+                 <item row="10" column="0">
+                  <widget class="QLabel" name="label_26">
+                   <property name="text">
+                    <string>Modify the residue masses of one or all amino acids</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="10" column="2">
+                  <widget class="QLineEdit" name="pmrmf_edit"/>
+                 </item>
+                 <item row="7" column="3">
+                  <widget class="QPushButton" name="pqa_push_button">
+                   <property name="text">
+                    <string>?</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="8" column="3">
+                  <widget class="QPushButton" name="pqp_push_button">
+                   <property name="text">
+                    <string>?</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="9" column="3">
+                  <widget class="QPushButton" name="pstpb_push_button">
+                   <property name="text">
+                    <string>?</string>
+                   </property>
+                  </widget>
+                 </item>
+                 <item row="10" column="3">
+                  <widget class="QPushButton" name="pmrmf_push_button">
+                   <property name="text">
+                    <string>?</string>
+                   </property>
+                  </widget>
+                 </item>
                 </layout>
                </item>
                <item>
@@ -1298,6 +1399,70 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>pqa_push_button</sender>
+   <signal>clicked()</signal>
+   <receiver>EditTandemPresetView</receiver>
+   <slot>doHelp()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>981</x>
+     <y>392</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>1521</x>
+     <y>405</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>pqp_push_button</sender>
+   <signal>clicked()</signal>
+   <receiver>EditTandemPresetView</receiver>
+   <slot>doHelp()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>974</x>
+     <y>420</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>1521</x>
+     <y>432</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>pstpb_push_button</sender>
+   <signal>clicked()</signal>
+   <receiver>EditTandemPresetView</receiver>
+   <slot>doHelp()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>973</x>
+     <y>456</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>1521</x>
+     <y>473</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>pmrmf_push_button</sender>
+   <signal>clicked()</signal>
+   <receiver>EditTandemPresetView</receiver>
+   <slot>doHelp()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>976</x>
+     <y>482</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>1521</x>
+     <y>506</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
  <slots>
   <slot>doCopy()</slot>
diff --git a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp
index b66698780..ef7e66367 100644
--- a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp
+++ b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp
@@ -270,7 +270,22 @@ void EditTandemPresetDialog::doHelp() {
     {
         html_doc.setFileName(":/tandem/resources/html_doc/pntrmm.html");
     }
-
+    if(senderObjName == "pqa_push_button")
+    {
+        html_doc.setFileName(":/tandem/resources/html_doc/pqa.html");
+    }
+    if(senderObjName == "pqp_push_button")
+    {
+        html_doc.setFileName(":/tandem/resources/html_doc/pqp.html");
+    }
+    if(senderObjName == "pstpb_push_button")
+    {
+        html_doc.setFileName(":/tandem/resources/html_doc/pstpb.html");
+    }
+    if(senderObjName == "pmrmf_push_button")
+    {
+        html_doc.setFileName(":/tandem/resources/html_doc/pmrmf.html");
+    }
 
     if (html_doc.open(QFile::ReadOnly | QFile::Text)) {
         QTextStream in(&html_doc);
@@ -316,6 +331,10 @@ void EditTandemPresetDialog::readUi() {
         _tandem_params.setParamLabelValue("protein, cleavage semi", ui->pcsemi_combo_box->currentText());
         _tandem_params.setParamLabelValue("protein, cleavage C-terminal mass change", ui->pcctmc_edit->text());
         _tandem_params.setParamLabelValue("protein, cleavage N-terminal mass change", ui->pcntmc_edit->text());
+        _tandem_params.setParamLabelValue("protein, quick acetyl", ui->pqa_combo_box->currentText());
+        _tandem_params.setParamLabelValue("protein, quick pyrolidone", ui->pqp_combo_box->currentText());
+        _tandem_params.setParamLabelValue("protein, stP bias", ui->pstpb_combo_box->currentText());
+        _tandem_params.setParamLabelValue("protein, modified residue mass file", ui->pmrmf_edit->text());
 
 
     }
@@ -411,6 +430,25 @@ void EditTandemPresetDialog::populate() {
     ui->pctrmm_edit->setText(_tandem_params.getValue("protein, C-terminal residue modification mass"));
     //<note type="input" label="protein, N-terminal residue modification mass">0.0</note>
     ui->pntrmm_edit->setText(_tandem_params.getValue("protein, N-terminal residue modification mass"));
+
+    //<note type="input" label="protein, quick acetyl">yes</note>
+    index = ui->pqa_combo_box->findText(_tandem_params.getValue("protein, quick acetyl"));
+    if ( index != -1 ) { // -1 for not found
+        ui->pqa_combo_box->setCurrentIndex(index);
+    }
+    //<note type="input" label="protein, quick pyrolidone">yes</note>
+    index = ui->pqp_combo_box->findText(_tandem_params.getValue("protein, quick pyrolidone"));
+    if ( index != -1 ) { // -1 for not found
+        ui->pqp_combo_box->setCurrentIndex(index);
+    }
+    //<note type="input" label="protein, stP bias">yes</note>
+    index = ui->pstpb_combo_box->findText(_tandem_params.getValue("protein, stP bias"));
+    if ( index != -1 ) { // -1 for not found
+        ui->pstpb_combo_box->setCurrentIndex(index);
+    }
+    //<note type="input" label="protein, modified residue mass file"></note>
+    ui->pmrmf_edit->setText(_tandem_params.getValue("protein, modified residue mass file"));
+
     qDebug() << "EditTandemPresetDialog::populate end";
 }
 
-- 
GitLab