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 &
void TandemParameters::setMethodName(const QString & method) {
_method_name = method;
}
const QString & TandemParameters::getMethodName() const {
return _method_name;
}
const QMap<QString, QString> & TandemParameters::getMapLabelValue() const {
return _map_label_value;
}
......@@ -42,6 +42,7 @@ public:
const QString & getValue(const QString & label) const;
void setMethodName(const QString & method);
const QString & getMethodName() const;
void setParamLabelValue(const QString & label, const QString & value);
const QMap<QString, QString> & getMapLabelValue() const;
private:
......
......@@ -58,6 +58,10 @@ const QString TandemParametersFile::getFilename() const {
const QString TandemParametersFile::getAbsoluteFilePath() const {
return _param_source.absoluteFilePath();
}
bool TandemParametersFile::exists() const
{
return _param_source.exists();
}
void TandemParametersFile::setTandemParameters(const TandemParameters & parameters) const {
......
......@@ -46,6 +46,7 @@ public:
const QString getMethodName() const;
const QString getFilename() const;
const QString getAbsoluteFilePath() const;
bool exists() const;
/** @brief read tandem parameters from XML file
*/
......
......@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>1000</width>
<height>580</height>
<width>1441</width>
<height>730</height>
</rect>
</property>
<property name="minimumSize">
......@@ -50,7 +50,7 @@
</sizepolicy>
</property>
<property name="text">
<string>New</string>
<string>Load</string>
</property>
</widget>
</item>
......@@ -70,13 +70,34 @@
</layout>
</item>
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="widget_2" native="true">
<layout class="QVBoxLayout" name="verticalLayout_7">
<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">
<property name="currentIndex">
<number>0</number>
......@@ -111,8 +132,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>656</width>
<height>198</height>
<width>1125</width>
<height>289</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
......@@ -271,8 +292,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>98</width>
<height>72</height>
<width>1125</width>
<height>289</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
......@@ -314,23 +335,10 @@
</layout>
</widget>
</widget>
<widget class="QTextEdit" name="doc_plain_text_edit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QTextEdit" name="doc_plain_text_edit"/>
</widget>
</item>
<item>
......@@ -392,8 +400,8 @@
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>777</x>
<y>498</y>
<x>1338</x>
<y>654</y>
</hint>
<hint type="destinationlabel">
<x>881</x>
......@@ -408,8 +416,8 @@
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>863</x>
<y>498</y>
<x>1429</x>
<y>654</y>
</hint>
<hint type="destinationlabel">
<x>879</x>
......@@ -424,12 +432,28 @@
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>556</x>
<y>227</y>
<x>1086</x>
<y>307</y>
</hint>
<hint type="destinationlabel">
<x>949</x>
<y>153</y>
<x>1728</x>
<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>
</hints>
</connection>
......@@ -440,12 +464,12 @@
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>573</x>
<y>262</y>
<x>1102</x>
<y>368</y>
</hint>
<hint type="destinationlabel">
<x>936</x>
<y>272</y>
<x>720</x>
<y>364</y>
</hint>
</hints>
</connection>
......@@ -456,12 +480,12 @@
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>564</x>
<y>296</y>
<x>1112</x>
<y>434</y>
</hint>
<hint type="destinationlabel">
<x>952</x>
<y>297</y>
<x>1181</x>
<y>866</y>
</hint>
</hints>
</connection>
......@@ -472,23 +496,136 @@
<slot>doHelp()</slot>
<hints>
<hint type="sourcelabel">
<x>566</x>
<y>331</y>
<x>1091</x>
<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 type="destinationlabel">
<x>994</x>
<y>332</y>
<x>1796</x>
<y>138</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>doNotValidHide(bool)</slot>
<slot>doNotCheckedHide(bool)</slot>
<slot>doNotGroupedHide(bool)</slot>
<slot>doCopy()</slot>
<slot>doEdit(QString)</slot>
<slot>doLoad()</slot>
<slot>doHelp()</slot>
<slot>doActionReplace()</slot>
<slot>doSave()</slot>
<slot>reject()</slot>
<slot>accept()</slot>
<slot>doSelectDir()</slot>
</slots>
</ui>
......@@ -60,10 +60,14 @@ EditTandemPresetDialog::~EditTandemPresetDialog()
}
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();
populate();
}
......@@ -90,6 +94,7 @@ void EditTandemPresetDialog::doHelp() {
}
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 minus", ui->parent_ion_lower_window_edit->text());
......@@ -100,6 +105,7 @@ void EditTandemPresetDialog::readUi() {
}
void EditTandemPresetDialog::populate() {
ui->method_name_line_edit->setText(_tandem_params.getMethodName());
/*
* <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