diff --git a/src/gui/protein_list_view/proteintablemodel.cpp b/src/gui/protein_list_view/proteintablemodel.cpp index 6b499c28374942da840f80273f98707d5b6daaeb..d96c4af817256725d08eb976f76452e9e28c3777 100644 --- a/src/gui/protein_list_view/proteintablemodel.cpp +++ b/src/gui/protein_list_view/proteintablemodel.cpp @@ -81,14 +81,20 @@ int ProteinTableModel::columnCount(const QModelIndex &parent ) const { } return 0; } - const QString ProteinTableModel::getTitle(ProteinListColumn column) { - ProteinTableModel::getTitle((std::int8_t) column); - } - const QString ProteinTableModel::getDescription(ProteinListColumn column) { - ProteinTableModel::getDescription((std::int8_t) column); - } +const QString ProteinTableModel::getTitle(ProteinListColumn column) { + qDebug() << "ProteinTableModel::getTitle begin "; + return ProteinTableModel::getTitle((std::int8_t) column); + //qDebug() << "ProteinTableModel::getTitle end "; +} +const QString ProteinTableModel::getDescription(ProteinListColumn column) { + qDebug() << "ProteinTableModel::columnCount begin "; + return ProteinTableModel::getDescription((std::int8_t) column); + //qDebug() << "ProteinTableModel::columnCount end "; +} const QString ProteinTableModel::getTitle(std::int8_t column) { + + qDebug() << "ProteinTableModel::getTitle begin " << column; switch (column) { case (std::int8_t) ProteinListColumn::checked: @@ -136,6 +142,8 @@ const QString ProteinTableModel::getTitle(std::int8_t column) { } const QString ProteinTableModel::getDescription(std::int8_t column) { + + qDebug() << "ProteinTableModel::getDescription begin " << column; switch (column) { case (std::int8_t) ProteinListColumn::checked: @@ -259,7 +267,7 @@ QVariant ProteinTableModel::data(const QModelIndex &index, int role ) const { if (_column_assignment[col] == (std::int8_t) ProteinListColumn::log_evalue ) { return QVariant ((qreal)_p_identification_group->getProteinMatchList().at(row)->getLogEvalue()); } - + if (_column_assignment[col] == (std::int8_t) ProteinListColumn::evalue ) { return QVariant ((qreal)_p_identification_group->getProteinMatchList().at(row)->getEvalue()); } diff --git a/src/gui/ptm_island_list_view/ptmislandtablemodel.cpp b/src/gui/ptm_island_list_view/ptmislandtablemodel.cpp index ebddc2a5fb8257626b01317e8f1ecf03422ad3c7..37457a85d56d30825e3f881c3f65d7cb40da99f1 100644 --- a/src/gui/ptm_island_list_view/ptmislandtablemodel.cpp +++ b/src/gui/ptm_island_list_view/ptmislandtablemodel.cpp @@ -54,6 +54,18 @@ PtmIslandTableModel::~PtmIslandTableModel() { } + +const QString PtmIslandTableModel::getTitle(PtmIslandListColumn column) { + qDebug() << "PtmIslandTableModel::getTitle begin "; + return PtmIslandTableModel::getTitle((std::int8_t) column); + //qDebug() << "ProteinTableModel::getTitle end "; +} +const QString PtmIslandTableModel::getDescription(PtmIslandListColumn column) { + qDebug() << "PtmIslandTableModel::columnCount begin "; + return PtmIslandTableModel::getDescription((std::int8_t) column); + //qDebug() << "ProteinTableModel::columnCount end "; +} + const QString PtmIslandTableModel::getTitle(std::int8_t column) { switch (column) { diff --git a/src/gui/ptm_island_list_view/ptmislandtablemodel.h b/src/gui/ptm_island_list_view/ptmislandtablemodel.h index b976ef8eaebb811cf91edd7687a50bc2586184d1..dfac66fec683e1f0bb65e57215941e571d8a1a85 100644 --- a/src/gui/ptm_island_list_view/ptmislandtablemodel.h +++ b/src/gui/ptm_island_list_view/ptmislandtablemodel.h @@ -41,16 +41,16 @@ */ enum class PtmIslandListColumn { - ptm_island_id, ///< ptm_island_id - accession, ///< protein accession - description, ///< protein description - ptm_position_list, ///< ptm position list - spectrum, ///< count sample scans - sequence, ///< unique sequence count - multiptm, ///< count multi ptm peptide match - ptm_island_start, ///< start position of the ptm island on the protein - ptm_island_length, ///< length of the ptm island - + ptm_island_id, ///< ptm_island_id + accession, ///< protein accession + description, ///< protein description + ptm_position_list, ///< ptm position list + spectrum, ///< count sample scans + sequence, ///< unique sequence count + multiptm, ///< count multi ptm peptide match + ptm_island_start, ///< start position of the ptm island on the protein + ptm_island_length, ///< length of the ptm island + }; @@ -68,21 +68,22 @@ public: virtual int columnCount(const QModelIndex &parent = QModelIndex()) const override; virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const override; virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - - - static const QString getTitle(std::int8_t column); - static const QString getDescription(std::int8_t column); - - + + static const QString getTitle(PtmIslandListColumn column); + static const QString getDescription(PtmIslandListColumn column); + + using columnMap = std::int8_t[20]; public slots: void onPtmIslandDataChanged(); private : - const PtmGroupingExperiment * getPtmGroupingExperiment() const; + const PtmGroupingExperiment * getPtmGroupingExperiment() const; + static const QString getTitle(std::int8_t column); + static const QString getDescription(std::int8_t column); private : IdentificationGroup * _p_identification_group=nullptr; - + static columnMap _column_assignment; }; diff --git a/src/output/ods/proteinsheet.cpp b/src/output/ods/proteinsheet.cpp index 15fefe3d99ca0889afccf444d9c69ea1f1f04f58..1c6f396a8fe3f54de00a8356fb4fef9039d77620 100644 --- a/src/output/ods/proteinsheet.cpp +++ b/src/output/ods/proteinsheet.cpp @@ -44,8 +44,10 @@ ProteinSheet::ProteinSheet (OdsExport * p_ods_export, CalcWriterInterface * p_wr } } void ProteinSheet::writeCellHeader(ProteinListColumn column) { + qDebug() << "ProteinSheet::writeCellHeader begin " << (std::int8_t) column; _p_writer->setCellAnnotation(ProteinTableModel::getDescription(column)); _p_writer->writeCell(ProteinTableModel::getTitle(column)); + qDebug() << "ProteinSheet::writeCellHeader end" ; } void ProteinSheet::writeHeaders(IdentificationGroup * p_ident) {