Cppcheck
Public Member Functions | Private Attributes | List of all members
PrintableReport Class Reference

Printable (in-memory) report. More...

#include <printablereport.h>

Inheritance diagram for PrintableReport:
Report

Public Member Functions

 PrintableReport ()
 
bool create () override
 Create the report (file). More...
 
void writeHeader () override
 Write report header. More...
 
void writeFooter () override
 Write report footer. More...
 
void writeError (const ErrorItem &error) override
 Write error to report. More...
 
const QString & getFormattedReportText () const
 Returns the formatted report. More...
 
- Public Member Functions inherited from Report
 Report (QString filename)
 
 ~Report () override
 
virtual bool open ()
 Open the existing report (file). More...
 
void close ()
 Close the report (file). More...
 

Private Attributes

QString mFormattedReport
 Stores the formatted report contents. More...
 

Additional Inherited Members

- Public Types inherited from Report
enum  Type { TXT , XMLV2 , CSV }
 
- Protected Member Functions inherited from Report
QFile * getFile ()
 Get the file object where the report is written to. More...
 

Detailed Description

Printable (in-memory) report.

This report formats results and exposes them for printing.

Definition at line 36 of file printablereport.h.

Constructor & Destructor Documentation

◆ PrintableReport()

PrintableReport::PrintableReport ( )

Definition at line 26 of file printablereport.cpp.

Member Function Documentation

◆ create()

bool PrintableReport::create ( )
overridevirtual

Create the report (file).

Returns
true if succeeded, false if file could not be created.

Reimplemented from Report.

Definition at line 30 of file printablereport.cpp.

◆ getFormattedReportText()

const QString & PrintableReport::getFormattedReportText ( ) const

Returns the formatted report.

Definition at line 55 of file printablereport.cpp.

References mFormattedReport.

Referenced by ResultsView::print().

◆ writeError()

void PrintableReport::writeError ( const ErrorItem error)
overridevirtual

Write error to report.

Parameters
errorError data.

Implements Report.

Definition at line 45 of file printablereport.cpp.

References error, mFormattedReport, and GuiSeverity::toString().

◆ writeFooter()

void PrintableReport::writeFooter ( )
overridevirtual

Write report footer.

Implements Report.

Definition at line 40 of file printablereport.cpp.

◆ writeHeader()

void PrintableReport::writeHeader ( )
overridevirtual

Write report header.

Implements Report.

Definition at line 35 of file printablereport.cpp.

Member Data Documentation

◆ mFormattedReport

QString PrintableReport::mFormattedReport
private

Stores the formatted report contents.

Definition at line 72 of file printablereport.h.

Referenced by getFormattedReportText(), and writeError().


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