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 9221b2d105d1f1a60aaaefba509c0fbdf691ea59..edb268df285c4614f8ab4f3536dbf96d39eec791 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 @@ -100,7 +100,7 @@ <item> <widget class="QTabWidget" name="tabWidget"> <property name="currentIndex"> - <number>0</number> + <number>1</number> </property> <widget class="QWidget" name="spectrum_tab"> <property name="sizePolicy"> @@ -679,8 +679,8 @@ <rect> <x>0</x> <y>0</y> - <width>500</width> - <height>360</height> + <width>1012</width> + <height>468</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_6"> @@ -693,20 +693,6 @@ </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"> @@ -783,25 +769,11 @@ </property> </widget> </item> - <item row="1" column="2"> - <widget class="QComboBox" name="pcsemi_combo_box"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <item> - <property name="text"> - <string>yes</string> - </property> - </item> - <item> - <property name="text"> - <string>no</string> - </property> - </item> - </widget> + <item row="2" column="2"> + <widget class="QLineEdit" name="pcctmc_edit"/> + </item> + <item row="6" column="2"> + <widget class="QLineEdit" name="pntrmm_edit"/> </item> <item row="4" column="0"> <widget class="QLabel" name="label_21"> @@ -810,12 +782,6 @@ </property> </widget> </item> - <item row="2" column="2"> - <widget class="QLineEdit" name="pcctmc_edit"/> - </item> - <item row="6" column="2"> - <widget class="QLineEdit" name="pntrmm_edit"/> - </item> <item row="4" column="2"> <widget class="QLineEdit" name="pctrmm_edit"/> </item> @@ -840,33 +806,8 @@ </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 row="10" column="2"> + <widget class="QLineEdit" name="pmrmf_edit"/> </item> <item row="10" column="0"> <widget class="QLabel" name="label_26"> @@ -875,9 +816,6 @@ </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"> @@ -906,6 +844,154 @@ </property> </widget> </item> + <item row="1" column="2"> + <layout class="QHBoxLayout" name="horizontalLayout_10"> + <item> + <widget class="QRadioButton" name="pcsemi_yes_radio_button"> + <property name="text"> + <string>&yes</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">pcsemi_button_group</string> + </attribute> + </widget> + </item> + <item> + <widget class="QRadioButton" name="pcsemi_no_radio_button"> + <property name="text"> + <string>no</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">pcsemi_button_group</string> + </attribute> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_7"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item row="7" column="2"> + <layout class="QHBoxLayout" name="horizontalLayout_12"> + <item> + <widget class="QRadioButton" name="pqa_yes_radio_button"> + <property name="text"> + <string>yes</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">pqa_button_group</string> + </attribute> + </widget> + </item> + <item> + <widget class="QRadioButton" name="pqa_no_radio_button"> + <property name="text"> + <string>no</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">pqa_button_group</string> + </attribute> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_8"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item row="8" column="2"> + <layout class="QHBoxLayout" name="horizontalLayout_13"> + <item> + <widget class="QRadioButton" name="pqp_yes_radio_button"> + <property name="text"> + <string>yes</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">pqp_button_group</string> + </attribute> + </widget> + </item> + <item> + <widget class="QRadioButton" name="pqp_no_radio_button"> + <property name="text"> + <string>no</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">pqp_button_group</string> + </attribute> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_9"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item row="9" column="2"> + <layout class="QHBoxLayout" name="horizontalLayout_14"> + <item> + <widget class="QRadioButton" name="pstpb_yes_radio_button"> + <property name="text"> + <string>yes</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">pstpb_button_group</string> + </attribute> + </widget> + </item> + <item> + <widget class="QRadioButton" name="pstpb_no_radio_button"> + <property name="text"> + <string>no</string> + </property> + <attribute name="buttonGroup"> + <string notr="true">pstpb_button_group</string> + </attribute> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_10"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> </layout> </item> <item> @@ -942,8 +1028,8 @@ <rect> <x>0</x> <y>0</y> - <width>331</width> - <height>326</height> + <width>1012</width> + <height>468</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_9"> @@ -1138,8 +1224,8 @@ <rect> <x>0</x> <y>0</y> - <width>98</width> - <height>46</height> + <width>1012</width> + <height>468</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_11"> @@ -1188,8 +1274,8 @@ <rect> <x>0</x> <y>0</y> - <width>98</width> - <height>46</height> + <width>1012</width> + <height>468</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_14"> @@ -1238,8 +1324,8 @@ <rect> <x>0</x> <y>0</y> - <width>98</width> - <height>46</height> + <width>1012</width> + <height>468</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_15"> @@ -2048,10 +2134,14 @@ <slot>doSelectDir()</slot> </slots> <buttongroups> + <buttongroup name="suca_button_group"/> + <buttongroup name="sfmmeu_button_group"/> <buttongroup name="spmmie_button_group"/> <buttongroup name="spmmeu_button_group"/> <buttongroup name="sunlw_button_group"/> - <buttongroup name="sfmmeu_button_group"/> - <buttongroup name="suca_button_group"/> + <buttongroup name="pcsemi_button_group"/> + <buttongroup name="pqa_button_group"/> + <buttongroup name="pqp_button_group"/> + <buttongroup name="pstpb_button_group"/> </buttongroups> </ui> diff --git a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp index 1fa6c49a99f7d3d553904a09ea729fa406aa531e..0b5fe2f95d5fcd11db2edd2810979f6f2ad2fa04 100644 --- a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp +++ b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp @@ -359,13 +359,23 @@ void EditTandemPresetDialog::readUi() { _tandem_params.setParamLabelValue("spectrum, threads", ui->st_edit->text()); - _tandem_params.setParamLabelValue("protein, cleavage site", ui->pcs_edit->text()); - _tandem_params.setParamLabelValue("protein, cleavage semi", ui->pcsemi_combo_box->currentText()); + _tandem_params.setParamLabelValue("protein, cleavage site", ui->pcs_edit->text()); _tandem_params.setParamLabelValue("protein, cleavage semi", "no"); + if (ui->pcsemi_yes_radio_button->isChecked()) { + _tandem_params.setParamLabelValue("protein, cleavage semi", "yes"); + } _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, cleavage N-terminal mass change", ui->pcntmc_edit->text()); _tandem_params.setParamLabelValue("protein, quick acetyl", "no"); + if (ui->pqa_yes_radio_button->isChecked()) { + _tandem_params.setParamLabelValue("protein, quick acetyl", "yes"); + } + _tandem_params.setParamLabelValue("protein, quick pyrolidone", "no"); + if (ui->pqp_yes_radio_button->isChecked()) { + _tandem_params.setParamLabelValue("protein, quick pyrolidone", "yes"); + } + _tandem_params.setParamLabelValue("protein, stP bias", "no"); + if (ui->pstpb_yes_radio_button->isChecked()) { + _tandem_params.setParamLabelValue("protein, stP bias", "yes"); + } _tandem_params.setParamLabelValue("protein, modified residue mass file", ui->pmrmf_edit->text()); @@ -469,9 +479,11 @@ void EditTandemPresetDialog::populate() { //<note type="input" label="protein, cleavage site">[RK]|{P}</note> ui->pcs_edit->setText(_tandem_params.getValue("protein, cleavage site")); //<note type="input" label="protein, cleavage semi">no</note> - index = ui->pcsemi_combo_box->findText(_tandem_params.getValue("protein, cleavage semi")); - if ( index != -1 ) { // -1 for not found - ui->pcsemi_combo_box->setCurrentIndex(index); + ui->pcsemi_yes_radio_button->setChecked(true); + ui->pcsemi_no_radio_button->setChecked(false); + if ( _tandem_params.getValue("protein, cleavage semi") == "no" ) { // -1 for not found + ui->pcsemi_yes_radio_button->setChecked(false); + ui->pcsemi_no_radio_button->setChecked(true); } @@ -486,20 +498,30 @@ void EditTandemPresetDialog::populate() { 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); + ui->pqa_yes_radio_button->setChecked(true); + ui->pqa_no_radio_button->setChecked(false); + if ( _tandem_params.getValue("protein, quick acetyl") == "no" ) { // -1 for not found + ui->pqa_yes_radio_button->setChecked(false); + ui->pqa_no_radio_button->setChecked(true); } + //<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); + ui->pqp_yes_radio_button->setChecked(true); + ui->pqp_no_radio_button->setChecked(false); + if ( _tandem_params.getValue("protein, quick pyrolidone") == "no" ) { // -1 for not found + ui->pqp_yes_radio_button->setChecked(false); + ui->pqp_no_radio_button->setChecked(true); } + + //<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); + ui->pstpb_yes_radio_button->setChecked(true); + ui->pstpb_no_radio_button->setChecked(false); + if ( _tandem_params.getValue("protein, stP bias") == "no" ) { // -1 for not found + ui->pstpb_yes_radio_button->setChecked(false); + ui->pstpb_no_radio_button->setChecked(true); } + //<note type="input" label="protein, modified residue mass file"></note> ui->pmrmf_edit->setText(_tandem_params.getValue("protein, modified residue mass file"));