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

Displayed label in ptm island list

parent 62f06aaa
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,9 @@ PtmIslandListWindow::PtmIslandListWindow(ProjectWindow *parent): ...@@ -56,6 +56,9 @@ PtmIslandListWindow::PtmIslandListWindow(ProjectWindow *parent):
_statusbar_displayed_label = new QLabel("");
ui->statusbar->addWidget(_statusbar_displayed_label);
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
// Qt5 code // Qt5 code
connect (this, &PtmIslandListWindow::ptmIslandDataChanged, _ptm_table_model_p, &PtmIslandTableModel::onPtmIslandDataChanged); connect (this, &PtmIslandListWindow::ptmIslandDataChanged, _ptm_table_model_p, &PtmIslandTableModel::onPtmIslandDataChanged);
...@@ -63,6 +66,7 @@ PtmIslandListWindow::PtmIslandListWindow(ProjectWindow *parent): ...@@ -63,6 +66,7 @@ PtmIslandListWindow::PtmIslandListWindow(ProjectWindow *parent):
connect (_project_window, &ProjectWindow::identificationPtmGroupGrouped, this,&PtmIslandListWindow::doIdentificationPtmGroupGrouped); connect (_project_window, &ProjectWindow::identificationPtmGroupGrouped, this,&PtmIslandListWindow::doIdentificationPtmGroupGrouped);
connect (_project_window, &ProjectWindow::identificationGroupGrouped, this,&PtmIslandListWindow::doIdentificationGroupGrouped); connect (_project_window, &ProjectWindow::identificationGroupGrouped, this,&PtmIslandListWindow::doIdentificationGroupGrouped);
connect(ui->ptm_island_tableview, &QTableView::clicked, _ptm_proxy_model_p, &PtmIslandProxyModel::onTableClicked); connect(ui->ptm_island_tableview, &QTableView::clicked, _ptm_proxy_model_p, &PtmIslandProxyModel::onTableClicked);
connect(_ptm_table_model_p, &PtmIslandTableModel::layoutChanged, this, &PtmIslandListWindow::updateStatusBar);
#else #else
// Qt4 code // Qt4 code
connect (this, SIGNAL(ptmIslandDataChanged()), _ptm_table_model_p, SLOT(onPtmIslandDataChanged())); connect (this, SIGNAL(ptmIslandDataChanged()), _ptm_table_model_p, SLOT(onPtmIslandDataChanged()));
...@@ -78,6 +82,7 @@ PtmIslandListWindow::~PtmIslandListWindow() ...@@ -78,6 +82,7 @@ PtmIslandListWindow::~PtmIslandListWindow()
{ {
delete _ptm_table_model_p; delete _ptm_table_model_p;
delete _ptm_proxy_model_p; delete _ptm_proxy_model_p;
delete _statusbar_displayed_label;
} }
ProjectWindow * PtmIslandListWindow::getProjectWindowP() { ProjectWindow * PtmIslandListWindow::getProjectWindowP() {
...@@ -157,3 +162,13 @@ void PtmIslandListWindow::askViewPtmPeptideList(PtmIsland * ptm_island) { ...@@ -157,3 +162,13 @@ void PtmIslandListWindow::askViewPtmPeptideList(PtmIsland * ptm_island) {
const IdentificationGroup * PtmIslandListWindow::getIdentificationGroup() const { const IdentificationGroup * PtmIslandListWindow::getIdentificationGroup() const {
return _p_identification_group; return _p_identification_group;
} }
void PtmIslandListWindow::updateStatusBar() {
if (_p_identification_group == nullptr) {
}
else {
_statusbar_displayed_label->setText(tr("displayed: %1").arg(_ptm_proxy_model_p->rowCount()));
}
}
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#ifndef PTMISLANDLISTWINDOW_H #ifndef PTMISLANDLISTWINDOW_H
#define PTMISLANDLISTWINDOW_H #define PTMISLANDLISTWINDOW_H
#include <QMainWindow> #include <QMainWindow>
#include <QLabel>
#include "ptmislandtablemodel.h" #include "ptmislandtablemodel.h"
#include "ptmislandproxymodel.h" #include "ptmislandproxymodel.h"
#include "../../core/identificationgroup.h" #include "../../core/identificationgroup.h"
...@@ -57,10 +58,13 @@ public: ...@@ -57,10 +58,13 @@ public:
public slots: public slots:
void doIdentificationPtmGroupGrouped(IdentificationGroup * p_identification_group); void doIdentificationPtmGroupGrouped(IdentificationGroup * p_identification_group);
void doIdentificationGroupGrouped(IdentificationGroup * p_identification_group); void doIdentificationGroupGrouped(IdentificationGroup * p_identification_group);
protected slots:
void updateStatusBar();
signals: signals:
void ptmIslandDataChanged(); void ptmIslandDataChanged();
protected: protected:
void askViewPtmPeptideList(PtmIsland * ptm_island); void askViewPtmPeptideList(PtmIsland * ptm_island);
private: private:
...@@ -71,10 +75,12 @@ private: ...@@ -71,10 +75,12 @@ private:
PtmIslandTableModel * _ptm_table_model_p = nullptr; PtmIslandTableModel * _ptm_table_model_p = nullptr;
PtmIslandProxyModel * _ptm_proxy_model_p = nullptr; PtmIslandProxyModel * _ptm_proxy_model_p = nullptr;
ProjectWindow * _project_window; ProjectWindow * _project_window;
PtmPeptideListWindow * _p_current_ptm_peptide_list_window; PtmPeptideListWindow * _p_current_ptm_peptide_list_window;
std::vector<PtmPeptideListWindow *> _ptm_peptide_list_window_collection; std::vector<PtmPeptideListWindow *> _ptm_peptide_list_window_collection;
QLabel * _statusbar_displayed_label;
}; };
#endif // PTMISLANDLISTWINDOW_H #endif // PTMISLANDLISTWINDOW_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