Loading...
Searching...
No Matches
TsvOutputStream Class Reference

`#include <tsvoutputstream.h>`

Inheritance diagram for TsvOutputStream:

## Public Member Functions

| TsvOutputStream (QTextStream &otxtstream)
virtual | ~TsvOutputStream ()
void | close () override
virtual void | writeSheet (const QString &sheetName) override
| open a new sheet
void | setNoSheetName (bool no_sheet_name)
| toggle writing sheet name in text stream to off usefull if you only need one sheet the wrisheet function can also be overloaded in a derived class
Public Member Functions inherited from TsvDirectoryWriter
| TsvDirectoryWriter (const QDir &directory)
virtual | ~TsvDirectoryWriter ()
void | writeLine () override
| open a new line
void | writeCell (const char *) override
| write a text cell
void | writeCell (const QString &) override
| write a text cell
void | writeEmptyCell () override
| write an empty cell
void | writeCell (std::size_t) override
| write an unsigned integer in a cell
void | writeCell (int) override
| write an integer in a cell
void | writeCell (float) override
| write a float in a cell
void | writeCell (double) override
| write a double in a cell
void | writeCellPercentage (double value) override
| write a double as a percentage
void | writeCell (bool) override
| write a boolean in a cell
void | writeCell (const QDate &) override
| write a date in a cell
void | writeCell (const QDateTime &) override
| write a timestamp in a cell
void | writeCell (const QUrl &, const QString &) override
| write a text cell with an URL link
void | setCellAnnotation (const QString &annotation) override
| set annotation to write in the next cell
void | setSeparator (TsvSeparator separator)
| sets the separator to use between values (cells)
TsvSeparator | getSeparator () const
| get the separator used between values (cells)
bool | setQuoteStrings (bool quote_strings)
| set a flag to quote strings
bool | isQuoteStrings () const
| tells if the quote string flag is enabled
bool | setFlushLines (bool flushOk)
| enable a physical flush on device at each new line enables this if you want to ensure that each line is written. This costs a little overhead
bool | isFlushLines () const
| tells if the flush lines flag is enabled
Public Member Functions inherited from CalcWriterInterface
virtual | ~CalcWriterInterface ()
virtual OdsTableCellStyleRef | getTableCellStyleRef (const OdsTableCellStyle &style)
virtual void | setTableCellStyleRef (OdsTableCellStyleRef style_ref)
void | clearTableCellStyleRef ()
virtual void | addColorScale (const OdsColorScale &ods_color_scale)
| apply solor scale conditional format on a cell range
virtual QString | getOdsCellCoordinate ()
| 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
virtual void | setCurrentOdsTableSettings (const OdsTableSettings &settings)
| set ODS table settings of the current sheet (table)
virtual void | writeCellVariant (const QVariant &var)
| write a cell for a given QVariant

## Private Attributes

bool | _no_sheet_name = false

## Additional Inherited Members

Protected Member Functions inherited from TsvDirectoryWriter
| TsvDirectoryWriter ()
void | writeRawCell (const QString &text)
void | initializeSheet ()
Protected Attributes inherited from TsvDirectoryWriter
QString | m_separator = "\t"
QString | _end_of_line = "\n"
QTextStream * | mpa_otxtstream = nullptr
unsigned int | numFloatPrecision = 12

## Detailed Description

Definition at line 24 of file tsvoutputstream.h.

## Constructor & Destructor Documentation

## TsvOutputStream()

TsvOutputStream::TsvOutputStream | ( | QTextStream & | otxtstream | ) |

Definition at line 22 of file tsvoutputstream.cpp.

: TsvDirectoryWriter()
{
mpa_otxtstream = &otxtstream;
}
TsvDirectoryWriter::TsvDirectoryWriter
TsvDirectoryWriter()
Definition tsvdirectorywriter.cpp:26
TsvDirectoryWriter::mpa_otxtstream
QTextStream * mpa_otxtstream
Definition tsvdirectorywriter.h:105

References TsvDirectoryWriter::TsvDirectoryWriter(), and TsvDirectoryWriter::mpa_otxtstream.

## ~TsvOutputStream()

TsvOutputStream::~TsvOutputStream | ( |  | ) |

virtual

Definition at line 27 of file tsvoutputstream.cpp.

{
// close();
mpa_otxtstream = nullptr;
}

References TsvDirectoryWriter::mpa_otxtstream.

## Member Function Documentation

## close()

void TsvOutputStream::close | ( |  | ) |

override virtual

Reimplemented from TsvDirectoryWriter.

Definition at line 34 of file tsvoutputstream.cpp.

{
mpa_otxtstream->flush();
}

References TsvDirectoryWriter::mpa_otxtstream.

## setNoSheetName()

void TsvOutputStream::setNoSheetName | ( | bool | no_sheet_name | ) |

toggle writing sheet name in text stream to off usefull if you only need one sheet the wrisheet function can also be overloaded in a derived class

Definition at line 40 of file tsvoutputstream.cpp.

{
_no_sheet_name = no_sheet_name;
}
TsvOutputStream::_no_sheet_name
bool _no_sheet_name
Definition tsvoutputstream.h:40

References _no_sheet_name.

## writeSheet()

void TsvOutputStream::writeSheet | ( | const QString & | sheetName | ) |

override virtual

open a new sheet

Parameters

  sheetName | the sheet name

Reimplemented from TsvDirectoryWriter.

Definition at line 46 of file tsvoutputstream.cpp.

{
if(_no_sheet_name)
return;
*mpa_otxtstream << _end_of_line << _end_of_line << "**** " << sheetName
<< " ****" << _end_of_line;
}
TsvDirectoryWriter::_end_of_line
QString _end_of_line
Definition tsvdirectorywriter.h:104

References TsvDirectoryWriter::_end_of_line, _no_sheet_name, and TsvDirectoryWriter::mpa_otxtstream.

## Member Data Documentation

## _no_sheet_name

bool TsvOutputStream::_no_sheet_name = false

private

Definition at line 40 of file tsvoutputstream.h.

Referenced by setNoSheetName(), and writeSheet().

The documentation for this class was generated from the following files:

- odsstream/tsvoutputstream.h
- odsstream/tsvoutputstream.cpp