|
libodsstream
Library for mass spectrometry
|
#include <odsdocwriter.h>
Public Member Functions | |
| OdsDocWriter (const QString &filename) | |
| OdsDocWriter (QIODevice *device) | |
| virtual | ~OdsDocWriter () |
| void | close () override |
| void | writeSheet (const QString &sheetName) override |
| void | writeLine () override |
| void | writeCell (const char *) override |
| write a text cell | |
| void | writeCell (const QString &) override |
| void | writeEmptyCell () override |
| void | writeCell (std::size_t) override |
| void | writeCell (int) override |
| void | writeCell (float) override |
| void | writeCell (double) override |
| void | writeCellPercentage (double value) override |
| void | writeCell (bool) override |
| void | writeCell (const QDate &) override |
| void | writeCell (const QDateTime &) override |
| void | writeCell (const QUrl &, const QString &) override |
| OdsTableCellStyleRef | getTableCellStyleRef (const OdsTableCellStyle &style) override |
| void | setTableCellStyleRef (OdsTableCellStyleRef style_ref) override |
| void | setCellAnnotation (const QString &annotation) override |
| set annotation to write in the next cell | |
| void | addColorScale (const OdsColorScale &ods_color_scale) override |
| apply solor scale conditional format on a cell range | |
| QString | getOdsCellCoordinate () override |
| get the last written cell coordinate in ODS coordinate format get the coordinate of the last written cell or an empty string if the writer is not an OdsDocWriter | |
| void | setCurrentOdsTableSettings (const OdsTableSettings &settings) override |
| set ODS table settings of the current sheet (table) | |
Public Member Functions inherited from CalcWriterInterface | |
| virtual | ~CalcWriterInterface () |
| void | clearTableCellStyleRef () |
| virtual void | writeCellVariant (const QVariant &var) |
| write a cell for a given QVariant | |
Private Member Functions | |
| void | openDevice (QIODevice *device) |
| void | clearAnnotation () |
Private Attributes | |
| ContentXml * | _p_content |
| QuaZip * | _p_quaZip |
| QIODevice * | _p_device = nullptr |
| bool | _p_device_delete = false |
| QString | _next_annotation |
| SettingsXml | _settings_xml |
Definition at line 31 of file odsdocwriter.h.
| OdsDocWriter::OdsDocWriter | ( | const QString & | filename | ) |
Definition at line 31 of file odsdocwriter.cpp.
References _p_device_delete, and openDevice().
| OdsDocWriter::OdsDocWriter | ( | QIODevice * | device | ) |
Definition at line 47 of file odsdocwriter.cpp.
References openDevice().
|
virtual |
Definition at line 89 of file odsdocwriter.cpp.
References _p_content, and close().
|
overridevirtual |
apply solor scale conditional format on a cell range
Reimplemented from CalcWriterInterface.
Definition at line 389 of file odsdocwriter.cpp.
References _p_content, and ContentXml::addColorScale().
|
private |
Definition at line 161 of file odsdocwriter.cpp.
References _next_annotation.
Referenced by writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCellPercentage(), and writeEmptyCell().
|
overridevirtual |
ends the document creation. It is required to obtain a correct output
Implements CalcWriterInterface.
Definition at line 103 of file odsdocwriter.cpp.
References _p_content, _p_device, _p_device_delete, _p_quaZip, _settings_xml, ContentXml::close(), and SettingsXml::write().
Referenced by ~OdsDocWriter().
|
overridevirtual |
get the last written cell coordinate in ODS coordinate format get the coordinate of the last written cell or an empty string if the writer is not an OdsDocWriter
Reimplemented from CalcWriterInterface.
Definition at line 396 of file odsdocwriter.cpp.
References _p_content, and ContentXml::getCellCoordinate().
|
overridevirtual |
get a table cell style reference with a style definition
| style | OdsTableCellStyle |
Reimplemented from CalcWriterInterface.
Definition at line 369 of file odsdocwriter.cpp.
References _p_content, and ContentXml::getTableCellStyleRef().
|
private |
Definition at line 53 of file odsdocwriter.cpp.
References _p_content, _p_device, _p_quaZip, and _settings_xml.
Referenced by OdsDocWriter(), and OdsDocWriter().
|
overridevirtual |
set annotation to write in the next cell
| annotation | any comment on this cell |
Implements CalcWriterInterface.
Definition at line 383 of file odsdocwriter.cpp.
References _next_annotation.
|
overridevirtual |
set ODS table settings of the current sheet (table)
Reimplemented from CalcWriterInterface.
Definition at line 402 of file odsdocwriter.cpp.
References _settings_xml, and SettingsXml::setCurrentOdsTableSettings().
|
overridevirtual |
set the cell table style. This is applied to in the stream to following cells. This ends by using an other style reference or by using setTableCellStyleRef function
| style_ref | OdsTableCellStyleRef |
Reimplemented from CalcWriterInterface.
Definition at line 376 of file odsdocwriter.cpp.
References _p_content, and ContentXml::setTableCellStyleRef().
|
overridevirtual |
adds a new cell containing a boolean
| value |
| XMLStreamException |
Implements CalcWriterInterface.
Definition at line 287 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeCell().
|
overridevirtual |
write a text cell
| cell_text | cell text |
Implements CalcWriterInterface.
Definition at line 184 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeCell().
|
overridevirtual |
adds a new cell containing a date
| date |
| XMLStreamException | |
| DatatypeConfigurationException |
Implements CalcWriterInterface.
Definition at line 302 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeCell().
|
overridevirtual |
adds a new cell containing a timestamp
| date |
| XMLStreamException | |
| DatatypeConfigurationException |
Implements CalcWriterInterface.
Definition at line 321 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeCell().
|
overridevirtual |
adds a new text cell to the document
| text |
| XMLStreamException |
Implements CalcWriterInterface.
Definition at line 172 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeCell().
|
overridevirtual |
NOT WORKING, adds a new cell containing a duration
| duration |
| XMLStreamException | |
| DatatypeConfigurationException | adds a new cell containing a text inside an href link |
| theUri | |
| text |
| XMLStreamException |
Implements CalcWriterInterface.
Definition at line 355 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeCell().
|
overridevirtual |
adds a new cell containing a double
| value |
| XMLStreamException |
Implements CalcWriterInterface.
Definition at line 259 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeCell().
|
overridevirtual |
adds a new cell containing a float
| value |
| XMLStreamException |
Implements CalcWriterInterface.
Definition at line 245 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeCell().
|
overridevirtual |
adds a new cell containing an integer
| value |
| XMLStreamException |
Implements CalcWriterInterface.
Definition at line 231 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeCell().
|
overridevirtual |
adds a new cell containing an integer
| value |
| XMLStreamException |
Implements CalcWriterInterface.
Definition at line 216 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeCell().
|
overridevirtual |
adds a new cell containing a percentage
| value |
| XMLStreamException |
Implements CalcWriterInterface.
Definition at line 274 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeCellPercentage().
|
overridevirtual |
writes an empty cell
| XMLStreamException |
Implements CalcWriterInterface.
Definition at line 202 of file odsdocwriter.cpp.
References _next_annotation, _p_content, clearAnnotation(), and ContentXml::writeEmptyCell().
|
overridevirtual |
adds a new line to the document
| XMLStreamException |
Implements CalcWriterInterface.
Definition at line 154 of file odsdocwriter.cpp.
References _p_content, and ContentXml::writeLine().
|
overridevirtual |
adds a new datasheet to the document
| sheetName |
| XMLStreamException |
Implements CalcWriterInterface.
Definition at line 143 of file odsdocwriter.cpp.
References _p_content, and ContentXml::writeSheet().
|
private |
Definition at line 72 of file odsdocwriter.h.
Referenced by clearAnnotation(), setCellAnnotation(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCellPercentage(), and writeEmptyCell().
|
private |
Definition at line 68 of file odsdocwriter.h.
Referenced by ~OdsDocWriter(), addColorScale(), close(), getOdsCellCoordinate(), getTableCellStyleRef(), openDevice(), setTableCellStyleRef(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCell(), writeCellPercentage(), writeEmptyCell(), writeLine(), and writeSheet().
|
private |
Definition at line 70 of file odsdocwriter.h.
Referenced by close(), and openDevice().
|
private |
Definition at line 71 of file odsdocwriter.h.
Referenced by OdsDocWriter(), and close().
|
private |
Definition at line 69 of file odsdocwriter.h.
Referenced by close(), and openDevice().
|
private |
Definition at line 73 of file odsdocwriter.h.
Referenced by close(), openDevice(), and setCurrentOdsTableSettings().