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

display current mz on spectrum

parent 3d8a3a2d
No related branches found
No related tags found
No related merge requests found
......@@ -110,6 +110,9 @@ PeptideWindow::~PeptideWindow()
void PeptideWindow::setMz(double mz) {
if (_spectrum_is_ready) {
ui->statusbar->showMessage(tr("mz=%1").arg(mz));
}
}
void PeptideWindow::doIdentificationGroupGrouped(IdentificationGroup * p_identification_group) {
......@@ -195,6 +198,7 @@ void PeptideWindow::doSpectrumSpReady(SpectrumSp spectrum_sp, QString error) {
ui->file_not_found->setVisible(true);
ui->spectrumWidget->setVisible(false);
_spectrum_is_ready = false;
}
else {
ui->statusbar->showMessage(tr(""));
......@@ -205,6 +209,7 @@ void PeptideWindow::doSpectrumSpReady(SpectrumSp spectrum_sp, QString error) {
ui->spectrumWidget->setQualifiedSpectrum(spectrum_copy);
ui->file_not_found->setVisible(false);
ui->spectrumWidget->setVisible(true);
_spectrum_is_ready = true;
}
qDebug() << "PeptideWindow::doSpectrumSpReady end";
......@@ -213,6 +218,7 @@ void PeptideWindow::doSpectrumSpReady(SpectrumSp spectrum_sp, QString error) {
void PeptideWindow::setPeptideMatch(PeptideMatch * p_peptide_match) {
qDebug() << "PeptideWindow::setPeptideMatch begin";
_p_peptide_match = p_peptide_match;
_spectrum_is_ready = false;
qDebug() << "PeptideWindow::setPeptideMatch emit loadSpectrumSp(_p_peptide_match)";
emit loadSpectrumSp(_p_peptide_match);
......@@ -272,9 +278,9 @@ void PeptideWindow::doSaveSvg() {
try {
QSettings settings;
QString default_location = settings.value("path/export_svg", "").toString();
QString proposed_filename = QString("%1/%2_%3.svg").arg(default_location).arg(_p_peptide_match->getMsRunP()->getSampleName()).arg(_p_peptide_match->getScan());
if (_p_peptide_match->getValidationState() == ValidationState::grouped) {
proposed_filename = QString("%1/%2_%3_%4.svg").arg(default_location).arg(_p_peptide_match->getGrpPeptideSp().get()->getGroupingId()).arg(_p_peptide_match->getMsRunP()->getSampleName()).arg(_p_peptide_match->getScan());
}
......
......@@ -94,6 +94,7 @@ private:
pappso::PrecisionP _p_precision;
LoadingOverlay * _p_spectrum_overlay;
bool _spectrum_is_ready=false;
};
......
......@@ -67,6 +67,44 @@
<item>
<widget class="QTableView" name="tableView"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>search</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="search_combobox">
<item>
<property name="text">
<string>peptide</string>
</property>
</item>
<item>
<property name="text">
<string>sample</string>
</property>
</item>
<item>
<property name="text">
<string>subgroup</string>
</property>
</item>
<item>
<property name="text">
<string>modification</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLineEdit" name="peptide_search_edit"/>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
......@@ -90,8 +128,8 @@
<slot>doNotValidHide(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>245</x>
<y>53</y>
<x>409</x>
<y>112</y>
</hint>
<hint type="destinationlabel">
<x>839</x>
......@@ -106,8 +144,8 @@
<slot>doNotCheckedHide(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>482</x>
<y>47</y>
<x>612</x>
<y>112</y>
</hint>
<hint type="destinationlabel">
<x>920</x>
......@@ -122,8 +160,8 @@
<slot>doNotGroupedHide(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>688</x>
<y>57</y>
<x>815</x>
<y>112</y>
</hint>
<hint type="destinationlabel">
<x>1079</x>
......@@ -131,10 +169,44 @@
</hint>
</hints>
</connection>
<connection>
<sender>peptide_search_edit</sender>
<signal>textChanged(QString)</signal>
<receiver>PeptideView</receiver>
<slot>doPeptideSearchEdit(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>318</x>
<y>360</y>
</hint>
<hint type="destinationlabel">
<x>852</x>
<y>291</y>
</hint>
</hints>
</connection>
<connection>
<sender>search_combobox</sender>
<signal>currentTextChanged(QString)</signal>
<receiver>PeptideView</receiver>
<slot>doSearchOn(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>96</x>
<y>351</y>
</hint>
<hint type="destinationlabel">
<x>-38</x>
<y>346</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>doNotValidHide(bool)</slot>
<slot>doNotCheckedHide(bool)</slot>
<slot>doNotGroupedHide(bool)</slot>
<slot>doPeptideSearchEdit(QString)</slot>
<slot>doSearchOn(QString)</slot>
</slots>
</ui>
......@@ -152,15 +152,22 @@ void PeptideListWindow::doNotGroupedHide(bool hide) {
}
void PeptideListWindow::onPeptideSearchEdit(QString protein_search_string) {
qDebug() << "PeptideListWindow::onProteinSearchEdit begin " << protein_search_string;
_p_proxy_model->setPeptideSearchString( protein_search_string);
emit peptideDataChanged();
}
void PeptideListWindow::askPeptideDetailView(PeptideMatch * p_peptide_match) {
qDebug() << "PeptideListWindow::askPeptideDetailView begin";
_project_window->doViewPeptideDetail(p_peptide_match);
qDebug() << "PeptideListWindow::askPeptideDetailView end";
//updateStatusBar();
}
void PeptideListWindow::doPeptideSearchEdit(QString protein_search_string) {
qDebug() << "PeptideListWindow::onProteinSearchEdit begin " << protein_search_string;
_p_proxy_model->setPeptideSearchString( protein_search_string);
emit peptideDataChanged();
}
void PeptideListWindow::doSearchOn(QString search_on) {
qDebug() << "PeptideListWindow::doSearchOn begin " << search_on;
_p_proxy_model->setSearchOn( search_on);
//emit proteinDataChanged();
emit peptideDataChanged();
}
......@@ -67,7 +67,8 @@ protected slots:
void doNotValidHide(bool hide);
void doNotCheckedHide(bool hide);
void doNotGroupedHide(bool hide);
void onPeptideSearchEdit(QString protein_search_string);
void doPeptideSearchEdit(QString peptide_search_string);
void doSearchOn(QString search_on);
private:
Ui::PeptideView *ui;
......
......@@ -148,6 +148,9 @@ void PeptideTableProxyModel::hideNotGrouped(bool hide) {
_hide_not_grouped = hide;
}
void PeptideTableProxyModel::setSearchOn(QString search_on) {
_search_on = search_on;
}
void PeptideTableProxyModel::setPeptideSearchString(QString peptide_search_string) {
_peptide_search_string = peptide_search_string;
}
......@@ -47,6 +47,7 @@ public:
void hideNotChecked(bool hide);
void hideNotGrouped(bool hide);
void setPeptideSearchString(QString peptide_search_string);
void setSearchOn(QString search_on);
public slots:
void onTableClicked(const QModelIndex &index);
......@@ -58,6 +59,7 @@ private:
bool _hide_not_valid = true;
bool _hide_not_checked = true;
bool _hide_not_grouped = true;
QString _search_on = "peptide";
};
#endif // PEPTIDETABLEPROXYMODEL_H
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