Commit fbb938fb authored by Langella Olivier's avatar Langella Olivier
Browse files

edit preset signals and slots

parent 90da89da
...@@ -75,6 +75,9 @@ void TandemParameters::setParamLabelValue(const QString & label, const QString & ...@@ -75,6 +75,9 @@ void TandemParameters::setParamLabelValue(const QString & label, const QString &
void TandemParameters::setMethodName(const QString & method) { void TandemParameters::setMethodName(const QString & method) {
_method_name = method; _method_name = method;
} }
const QString & TandemParameters::getMethodName() const {
return _method_name;
}
const QMap<QString, QString> & TandemParameters::getMapLabelValue() const { const QMap<QString, QString> & TandemParameters::getMapLabelValue() const {
return _map_label_value; return _map_label_value;
} }
...@@ -42,6 +42,7 @@ public: ...@@ -42,6 +42,7 @@ public:
const QString & getValue(const QString & label) const; const QString & getValue(const QString & label) const;
void setMethodName(const QString & method); void setMethodName(const QString & method);
const QString & getMethodName() const;
void setParamLabelValue(const QString & label, const QString & value); void setParamLabelValue(const QString & label, const QString & value);
const QMap<QString, QString> & getMapLabelValue() const; const QMap<QString, QString> & getMapLabelValue() const;
private: private:
......
...@@ -58,6 +58,10 @@ const QString TandemParametersFile::getFilename() const { ...@@ -58,6 +58,10 @@ const QString TandemParametersFile::getFilename() const {
const QString TandemParametersFile::getAbsoluteFilePath() const { const QString TandemParametersFile::getAbsoluteFilePath() const {
return _param_source.absoluteFilePath(); return _param_source.absoluteFilePath();
} }
bool TandemParametersFile::exists() const
{
return _param_source.exists();
}
void TandemParametersFile::setTandemParameters(const TandemParameters & parameters) const { void TandemParametersFile::setTandemParameters(const TandemParameters & parameters) const {
......
...@@ -46,6 +46,7 @@ public: ...@@ -46,6 +46,7 @@ public:
const QString getMethodName() const; const QString getMethodName() const;
const QString getFilename() const; const QString getFilename() const;
const QString getAbsoluteFilePath() const; const QString getAbsoluteFilePath() const;
bool exists() const;
/** @brief read tandem parameters from XML file /** @brief read tandem parameters from XML file
*/ */
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1000</width> <width>1441</width>
<height>580</height> <height>730</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>New</string> <string>Load</string>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -70,13 +70,34 @@ ...@@ -70,13 +70,34 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QWidget" name="widget" native="true"> <widget class="QSplitter" name="splitter">
<layout class="QGridLayout" name="gridLayout"> <property name="orientation">
<item row="0" column="1"> <enum>Qt::Horizontal</enum>
<widget class="QSplitter" name="splitter"> </property>
<property name="orientation"> <widget class="QWidget" name="widget_2" native="true">
<enum>Qt::Horizontal</enum> <layout class="QVBoxLayout" name="verticalLayout_7">
</property> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLineEdit" name="method_name_line_edit"/>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Copy</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="save">
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
...@@ -111,8 +132,8 @@ ...@@ -111,8 +132,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>656</width> <width>1125</width>
<height>198</height> <height>289</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
...@@ -271,8 +292,8 @@ ...@@ -271,8 +292,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>98</width> <width>1125</width>
<height>72</height> <height>289</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_6">
...@@ -314,23 +335,10 @@ ...@@ -314,23 +335,10 @@
</layout> </layout>
</widget> </widget>
</widget> </widget>
<widget class="QTextEdit" name="doc_plain_text_edit"> </item>
<property name="sizePolicy"> </layout>
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> </widget>
<horstretch>0</horstretch> <widget class="QTextEdit" name="doc_plain_text_edit"/>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item> <item>
...@@ -392,8 +400,8 @@ ...@@ -392,8 +400,8 @@
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>777</x> <x>1338</x>
<y>498</y> <y>654</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>881</x> <x>881</x>
...@@ -408,8 +416,8 @@ ...@@ -408,8 +416,8 @@
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>863</x> <x>1429</x>
<y>498</y> <y>654</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>879</x> <x>879</x>
...@@ -424,12 +432,28 @@ ...@@ -424,12 +432,28 @@
<slot>doHelp()</slot> <slot>doHelp()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>556</x> <x>1086</x>
<y>227</y> <y>307</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>949</x> <x>1728</x>
<y>153</y> <y>321</y>
</hint>
</hints>
</connection>
<connection>
<sender>save</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doSave()</slot>
<hints>
<hint type="sourcelabel">
<x>1134</x>
<y>175</y>
</hint>
<hint type="destinationlabel">
<x>1542</x>
<y>134</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
...@@ -440,12 +464,12 @@ ...@@ -440,12 +464,12 @@
<slot>doHelp()</slot> <slot>doHelp()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>573</x> <x>1102</x>
<y>262</y> <y>368</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>936</x> <x>720</x>
<y>272</y> <y>364</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
...@@ -456,12 +480,12 @@ ...@@ -456,12 +480,12 @@
<slot>doHelp()</slot> <slot>doHelp()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>564</x> <x>1112</x>
<y>296</y> <y>434</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>952</x> <x>1181</x>
<y>297</y> <y>866</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
...@@ -472,23 +496,136 @@ ...@@ -472,23 +496,136 @@
<slot>doHelp()</slot> <slot>doHelp()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>566</x> <x>1091</x>
<y>331</y> <y>494</y>
</hint>
<hint type="destinationlabel">
<x>1037</x>
<y>901</y>
</hint>
</hints>
</connection>
<connection>
<sender>pushButton</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doCopy()</slot>
<hints>
<hint type="sourcelabel">
<x>1017</x>
<y>186</y>
</hint>
<hint type="destinationlabel">
<x>707</x>
<y>1103</y>
</hint>
</hints>
</connection>
<connection>
<sender>parent_ion_window_unit_combo_box</sender>
<signal>activated(QString)</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doEdit(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>939</x>
<y>319</y>
</hint>
<hint type="destinationlabel">
<x>400</x>
<y>897</y>
</hint>
</hints>
</connection>
<connection>
<sender>parent_ion_lower_window_edit</sender>
<signal>textChanged(QString)</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doEdit(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>846</x>
<y>363</y>
</hint>
<hint type="destinationlabel">
<x>464</x>
<y>1032</y>
</hint>
</hints>
</connection>
<connection>
<sender>parent_ion_upper_window_edit</sender>
<signal>textChanged(QString)</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doEdit(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>932</x>
<y>435</y>
</hint>
<hint type="destinationlabel">
<x>798</x>
<y>842</y>
</hint>
</hints>
</connection>
<connection>
<sender>anticipate_carbon_combo_box</sender>
<signal>activated(QString)</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doEdit(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>980</x>
<y>477</y>
</hint>
<hint type="destinationlabel">
<x>970</x>
<y>797</y>
</hint>
</hints>
</connection>
<connection>
<sender>pushButton_5</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doLoad()</slot>
<hints>
<hint type="sourcelabel">
<x>1154</x>
<y>84</y>
</hint>
<hint type="destinationlabel">
<x>1737</x>
<y>106</y>
</hint>
</hints>
</connection>
<connection>
<sender>pushButton_6</sender>
<signal>clicked()</signal>
<receiver>EditTandemPresetView</receiver>
<slot>doSelectDir()</slot>
<hints>
<hint type="sourcelabel">
<x>1273</x>
<y>87</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>994</x> <x>1796</x>
<y>332</y> <y>138</y>
</hint> </hint>
</hints> </hints>
</connection> </connection>
</connections> </connections>
<slots> <slots>
<slot>doNotValidHide(bool)</slot> <slot>doCopy()</slot>
<slot>doNotCheckedHide(bool)</slot> <slot>doEdit(QString)</slot>
<slot>doNotGroupedHide(bool)</slot> <slot>doLoad()</slot>
<slot>doHelp()</slot> <slot>doHelp()</slot>
<slot>doActionReplace()</slot> <slot>doSave()</slot>
<slot>reject()</slot> <slot>reject()</slot>
<slot>accept()</slot> <slot>accept()</slot>
<slot>doSelectDir()</slot>
</slots> </slots>
</ui> </ui>
...@@ -60,10 +60,14 @@ EditTandemPresetDialog::~EditTandemPresetDialog() ...@@ -60,10 +60,14 @@ EditTandemPresetDialog::~EditTandemPresetDialog()
} }
void EditTandemPresetDialog::setTandemParametersFiles(const TandemParametersFile & tandem_preset_file) { void EditTandemPresetDialog::setTandemParametersFiles(const TandemParametersFile & tandem_preset_file) {
_p_tandem_preset_file = new TandemParametersFile( tandem_preset_file);
if (tandem_preset_file.exists()) {
_p_tandem_preset_file = new TandemParametersFile( tandem_preset_file);
} else {
_p_tandem_preset_file = new TandemParametersFile(":/tandem/ressources/model/QExactive_analysis_FDR_nosemi.xml");
}
_tandem_params = _p_tandem_preset_file->getTandemParameters(); _tandem_params = _p_tandem_preset_file->getTandemParameters();
populate(); populate();
} }
...@@ -90,6 +94,7 @@ void EditTandemPresetDialog::doHelp() { ...@@ -90,6 +94,7 @@ void EditTandemPresetDialog::doHelp() {
} }
void EditTandemPresetDialog::readUi() { void EditTandemPresetDialog::readUi() {
_tandem_params.setParamLabelValue("spectrum, parent monoisotopic mass error units", ui->parent_ion_window_unit_combo_box->itemData(ui->parent_ion_window_unit_combo_box->currentIndex()).toString()); _tandem_params.setParamLabelValue("spectrum, parent monoisotopic mass error units", ui->parent_ion_window_unit_combo_box->itemData(ui->parent_ion_window_unit_combo_box->currentIndex()).toString());
_tandem_params.setParamLabelValue("spectrum, parent monoisotopic mass error minus", ui->parent_ion_lower_window_edit->text()); _tandem_params.setParamLabelValue("spectrum, parent monoisotopic mass error minus", ui->parent_ion_lower_window_edit->text());
...@@ -100,6 +105,7 @@ void EditTandemPresetDialog::readUi() { ...@@ -100,6 +105,7 @@ void EditTandemPresetDialog::readUi() {
} }
void EditTandemPresetDialog::populate() { void EditTandemPresetDialog::populate() {
ui->method_name_line_edit->setText(_tandem_params.getMethodName());
/* /*
* <note type="input" label="spectrum, parent monoisotopic mass error units">ppm</note> * <note type="input" label="spectrum, parent monoisotopic mass error units">ppm</note>
* */ * */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment