Skip to content
Snippets Groups Projects
Commit f1c92e0d authored by Langella Olivier's avatar Langella Olivier
Browse files
parents 3efed8a7 0fc10a9e
No related branches found
Tags xtpcpp_0.1.16-1
No related merge requests found
......@@ -28,8 +28,8 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Xml_EXECUTABLE_COMPILE_FLAGS} ${Qt5
#sudo apt-get install libpappsomspp-dev
#FIND_PACKAGE( Pappsomspp REQUIRED )
#SET (PAPPSOMSPP_DIR "/home/olivier/eclipse/git/pappsomspp")
SET (PAPPSOMSPP_DIR "/home/langella/developpement/git/pappsomspp")
SET (PAPPSOMSPP_DIR "/home/olivier/eclipse/git/pappsomspp")
# SET (PAPPSOMSPP_DIR "/home/langella/developpement/git/pappsomspp")
SET (PAPPSOMSPP_INCLUDE_DIR "${PAPPSOMSPP_DIR}/src")
SET (PAPPSOMSPP_QT5_LIBRARY "${PAPPSOMSPP_DIR}/cbuild/src/libpappsomspp-qt5.so")
SET (PAPPSOMSPP_WIDGET_QT5_LIBRARY "${PAPPSOMSPP_DIR}/cbuild/src/pappsomspp/widget/libpappsomspp-widget-qt5.so")
......
......@@ -293,28 +293,7 @@
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QComboBox" name="precision_unit_combobox">
<item>
<property name="text">
<string>dalton</string>
</property>
</item>
<item>
<property name="text">
<string>ppm</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="precision_spinbox">
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.500000000000000</double>
</property>
</widget>
<widget class="pappso::PrecisionWidget" name="precision_widget" native="true"/>
</item>
</layout>
</widget>
......@@ -353,6 +332,12 @@
<header>pappsomspp/widget/spectrumwidget/spectrumwidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>pappso::PrecisionWidget</class>
<extends>QWidget</extends>
<header>pappsomspp/widget/precisionwidget/precisionwidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections>
......@@ -372,38 +357,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>precision_spinbox</sender>
<signal>valueChanged(double)</signal>
<receiver>PeptideDetailView</receiver>
<slot>doMsmsPrecisionValueChanged(double)</slot>
<hints>
<hint type="sourcelabel">
<x>801</x>
<y>346</y>
</hint>
<hint type="destinationlabel">
<x>870</x>
<y>368</y>
</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>716</x>
<y>324</y>
</hint>
<hint type="destinationlabel">
<x>873</x>
<y>278</y>
</hint>
</hints>
</connection>
<connection>
<sender>pushButton_2</sender>
<signal>clicked()</signal>
......@@ -436,12 +389,30 @@
</hint>
</hints>
</connection>
<connection>
<sender>precision_widget</sender>
<signal>precisionChanged(pappso::PrecisionP)</signal>
<receiver>PeptideDetailView</receiver>
<slot>doMsmsPrecisionChanged(pappso::PrecisionP)</slot>
<hints>
<hint type="sourcelabel">
<x>373</x>
<y>117</y>
</hint>
<hint type="destinationlabel">
<x>977</x>
<y>204</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>chooseDefaultMzDataDir()</slot>
<slot>openInPeptideViewer()</slot>
<slot>doMsmsPrecisionValueChanged(double)</slot>
<slot>doMsmsPrecisionUnitChanged(QString)</slot>
<slot>doSaveSvg()</slot>
<slot>doMsmsPrecisionChanged(pappso::PrecisionP)</slot>
</slots>
</ui>
......@@ -76,17 +76,9 @@ PeptideWindow::PeptideWindow(ProjectWindow *parent):
QSettings settings;
QString unit = settings.value("peptideview/precision_unit", "dalton").toString();
pappso::mz precision = settings.value("peptideview/precision_value", "0.2").toDouble();
ui->precision_unit_combobox->setCurrentIndex(ui->precision_unit_combobox->findText(unit));
ui->precision_spinbox->setValue(precision);
if (unit == "dalton") {
_p_precision = pappso::Precision::getDaltonInstance(precision);
} else {
_p_precision = pappso::Precision::getPpmInstance(precision);
}
QString precision_str = settings.value("peptideview/precision", "0.2 dalton").toString();
_p_precision = pappso::Precision::fromString(precision_str);
ui->file_not_found->setVisible(false);
......@@ -292,48 +284,20 @@ void PeptideWindow::setPeptideEvidence(PeptideEvidence * p_peptide_evidence) {
qDebug() << "PeptideWindow::setPeptideEvidence end";
}
void PeptideWindow::doMsmsPrecisionUnitChanged(QString unit) {
void PeptideWindow::doMsmsPrecisionChanged(pappso::PrecisionP precision) {
qDebug() << "PeptideWindow::doMsmsPrecisionUnitChanged begin " << unit;
qDebug() << "PeptideWindow::doMsmsPrecisionChanged begin " << precision->toString();
QSettings settings;
pappso::mz precision = ui->precision_spinbox->value();
if (unit == "dalton") {
_p_precision = pappso::Precision::getDaltonInstance(precision);
} else {
_p_precision = pappso::Precision::getPpmInstance(precision);
}
_p_precision = precision;
ui->spectrum_widget->setMs2Precision(_p_precision);
qDebug() << "PeptideWindow::doMsmsPrecisionUnitChanged plot ";
ui->spectrum_widget->plot();
settings.setValue("peptideview/precision_unit", unit);
qDebug() << "PeptideWindow::doMsmsPrecisionUnitChanged end " << unit;
}
void PeptideWindow::doMsmsPrecisionValueChanged(double precision_value) {
settings.setValue("peptideview/precision", precision->toString());
QSettings settings;
QString unit = ui->precision_unit_combobox->currentText();
pappso::mz precision = precision_value;
if (unit == "dalton") {
_p_precision = pappso::Precision::getDaltonInstance(precision);
} else {
_p_precision = pappso::Precision::getPpmInstance(precision);
}
ui->spectrum_widget->setMs2Precision(_p_precision);
qDebug() << "PeptideWindow::doMsmsPrecisionValueChanged plot ";
ui->spectrum_widget->plot();
settings.setValue("peptideview/precision_value", precision);
qDebug() << "PeptideWindow::doMsmsPrecisionUnitChanged end ";
}
void PeptideWindow::doSaveSvg() {
try {
......
......@@ -79,8 +79,7 @@ signals:
protected slots:
void doSpectrumSpReady(pappso::SpectrumSp spectrum_sp, QString error, QString fatal_error);
void doMsmsPrecisionValueChanged(double precision_value);
void doMsmsPrecisionUnitChanged(QString unit);
void doMsmsPrecisionChanged(pappso::PrecisionP);
void doSaveSvg();
void chooseDefaultMzDataDir();
void openInPeptideViewer();
......
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