Simple HTML report builder for MEG/EEG analysis results.
More...
#include <report.h>
|
| | Report (const QString &sTitle="MNE-CPP Report") |
| | Construct a report with a title.
|
| void | addText (const QString &sTitle, const QString &sContent) |
| | Add a text section.
|
| void | addTable (const QString &sTitle, const QStringList &headers, const QList< QStringList > &rows) |
| | Add a table section.
|
| void | addKeyValue (const QString &sTitle, const QList< QPair< QString, QString > > &pairs) |
| | Add a key-value section.
|
| void | addCode (const QString &sTitle, const QString &sCode) |
| | Add a preformatted code block.
|
| int | sectionCount () const |
| | Get the number of sections.
|
| QString | toHtml () const |
| | Generate the full HTML string.
|
| bool | save (const QString &sPath) const |
| | Save the report to an HTML file.
|
| const QString & | title () const |
| | Get the report title.
|
Simple HTML report builder for MEG/EEG analysis results.
Definition at line 67 of file report.h.
◆ Report()
| Report::Report |
( |
const QString & | sTitle = "MNE-CPP Report" | ) |
|
|
explicit |
Construct a report with a title.
- Parameters
-
| [in] | sTitle | Report title, used for the HTML page title and main heading. |
Definition at line 45 of file report.cpp.
◆ addCode()
| void Report::addCode |
( |
const QString & | sTitle, |
|
|
const QString & | sCode ) |
Add a preformatted code block.
- Parameters
-
| [in] | sTitle | Section title. |
| [in] | sCode | Code text; it is HTML-escaped and wrapped in a preformatted block. |
Definition at line 107 of file report.cpp.
◆ addKeyValue()
| void Report::addKeyValue |
( |
const QString & | sTitle, |
|
|
const QList< QPair< QString, QString > > & | pairs ) |
Add a key-value section.
- Parameters
-
| [in] | sTitle | Section title. |
| [in] | pairs | List of (key, value) pairs. |
Definition at line 89 of file report.cpp.
◆ addTable()
| void Report::addTable |
( |
const QString & | sTitle, |
|
|
const QStringList & | headers, |
|
|
const QList< QStringList > & | rows ) |
Add a table section.
- Parameters
-
| [in] | sTitle | Section title. |
| [in] | headers | Column headers. |
| [in] | rows | Row data (list of string lists). |
Definition at line 62 of file report.cpp.
◆ addText()
| void Report::addText |
( |
const QString & | sTitle, |
|
|
const QString & | sContent ) |
Add a text section.
- Parameters
-
| [in] | sTitle | Section title. |
| [in] | sContent | Text content (plain text or HTML). |
Definition at line 52 of file report.cpp.
◆ save()
| bool Report::save |
( |
const QString & | sPath | ) |
const |
Save the report to an HTML file.
- Parameters
-
| [in] | sPath | Output file path. |
- Returns
- true if successful.
Definition at line 160 of file report.cpp.
◆ sectionCount()
| int UTILSLIB::Report::sectionCount |
( |
| ) |
const |
|
inline |
Get the number of sections.
- Returns
- Number of sections added so far.
Definition at line 124 of file report.h.
◆ title()
| const QString & UTILSLIB::Report::title |
( |
| ) |
const |
|
inline |
Get the report title.
- Returns
- Title passed at construction.
Definition at line 153 of file report.h.
◆ toHtml()
| QString Report::toHtml |
( |
| ) |
const |
Generate the full HTML string.
- Returns
- Self-contained HTML document containing the title and all sections.
Definition at line 117 of file report.cpp.
The documentation for this class was generated from the following files: