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