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

ods output bug fixed

parent bf5782f3
No related branches found
No related tags found
No related merge requests found
......@@ -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());
}
......
......@@ -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) {
......
......@@ -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;
};
......
......@@ -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) {
......
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