35 const QAbstractProxyModel *p_table_model)
36 : mp_writer(p_writer), mp_tableModel(p_table_model)
48 for(
int j = 0; j < col_number; j++)
52 mp_tableModel->headerData(j, Qt::Horizontal, Qt::DisplayRole);
53 if(head_var.toString() == column_title)
56 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__
65 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__
66 <<
" col=" << column_index.column();
67 QModelIndex nIndex =
mp_tableModel->mapFromSource(column_index);
69 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__
70 <<
" col=" << nIndex.column();
87 for(
int j = 0; j < col_number; j++)
91 mp_tableModel->headerData(j, Qt::Horizontal, Qt::ToolTipRole);
100 head_var =
mp_tableModel->headerData(j, Qt::Horizontal, Qt::DisplayRole);
101 if(head_var.isNull())
111 for(
int i = 0; i < line_number; i++)
114 for(
int j = 0; j < col_number; j++)
117 QVariant var =
mp_tableModel->data(index, Qt::CheckStateRole);
129 double var_float = var.toDouble(&ok);
149 if(var == Qt::Checked)
virtual void writeEmptyCell()=0
write an empty cell
virtual void writeCell(const char *cell_text)=0
write a text cell
virtual void setCellAnnotation(const QString &annotation)=0
set annotation to write in the next cell
virtual void writeCellPercentage(double value)=0
write a double as a percentage
virtual void writeSheet(const QString &sheetName)=0
open a new sheet
virtual void setCurrentOdsTableSettings(const OdsTableSettings &settings)
set ODS table settings of the current sheet (table)
virtual void writeLine()=0
open a new line
void setVerticalSplit(unsigned int position)
void setFormatPercentForColumn(const QString &column_title)
std::map< int, bool > m_percentColumns
void writeSheet(const QString &sheetName)
write the entire table in a sheet
const QAbstractProxyModel * mp_tableModel
QtableWriter(CalcWriterInterface *p_writer, const QAbstractProxyModel *p_table_model)
CalcWriterInterface * mp_writer
write an entire table sheet from a QAbstractModel