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

more information in peptide window : precision unit added

parent 34868d2a
No related branches found
No related tags found
No related merge requests found
......@@ -144,7 +144,7 @@
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
......@@ -396,10 +396,27 @@
</hint>
</hints>
</connection>
<connection>
<sender>precision_unit_combobox</sender>
<signal>currentIndexChanged(QString)</signal>
<receiver>PeptideDetailView</receiver>
<slot>doMsmsPrecisionUnitChanged(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>680</x>
<y>355</y>
</hint>
<hint type="destinationlabel">
<x>873</x>
<y>278</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>chooseDefaultMzDataDir()</slot>
<slot>openInPeptideViewer()</slot>
<slot>doMsmsPrecisionValueChanged(double)</slot>
<slot>doMsmsPrecisionUnitChanged(QString)</slot>
</slots>
</ui>
......@@ -227,6 +227,24 @@ void PeptideWindow::setPeptideMatch(PeptideMatch * p_peptide_match) {
qDebug() << "PeptideWindow::setPeptideMatch end";
}
void PeptideWindow::doMsmsPrecisionUnitChanged(QString unit) {
qDebug() << "PeptideWindow::doMsmsPrecisionUnitChanged begin " << unit;
QSettings settings;
pappso::mz precision = ui->precision_spinbox->value();
if (unit == "dalton") {
_p_precision = Precision::getDaltonInstance(precision);
} else {
_p_precision = Precision::getPpmInstance(precision);
}
ui->spectrumWidget->setPrecision(_p_precision);
settings.setValue("peptideview/precision_unit", unit);
qDebug() << "PeptideWindow::doMsmsPrecisionUnitChanged end " << unit;
}
void PeptideWindow::doMsmsPrecisionValueChanged(double precision_value) {
......@@ -242,6 +260,5 @@ void PeptideWindow::doMsmsPrecisionValueChanged(double precision_value) {
}
ui->spectrumWidget->setPrecision(_p_precision);
settings.setValue("peptideview/precision_unit", unit);
settings.setValue("peptideview/precision_value", precision);
}
......@@ -77,6 +77,7 @@ signals:
protected slots:
void doSpectrumSpReady(pappso::SpectrumSp spectrum_sp, QString error);
void doMsmsPrecisionValueChanged(double precision_value);
void doMsmsPrecisionUnitChanged(QString unit);
void chooseDefaultMzDataDir();
void openInPeptideViewer();
protected :
......
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