Simple HTML report builder for MEG/EEG analysis results. More...
#include <report.h>
Public Member Functions | |
| 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.
Usage:
|
explicit |
Construct a report with a title.
Definition at line 45 of file report.cpp.
| void Report::addCode | ( | const QString & | sTitle, |
| const QString & | sCode ) |
Add a preformatted code block.
Definition at line 107 of file report.cpp.
| void Report::addKeyValue | ( | const QString & | sTitle, |
| const QList< QPair< QString, QString > > & | pairs ) |
Add a key-value section.
| [in] | sTitle | Section title. |
| [in] | pairs | List of (key, value) pairs. |
Definition at line 89 of file report.cpp.
| void Report::addTable | ( | const QString & | sTitle, |
| const QStringList & | headers, | ||
| const QList< QStringList > & | rows ) |
Add a table section.
| [in] | sTitle | Section title. |
| [in] | headers | Column headers. |
| [in] | rows | Row data (list of string lists). |
Definition at line 62 of file report.cpp.
| void Report::addText | ( | const QString & | sTitle, |
| const QString & | sContent ) |
Add a text section.
| [in] | sTitle | Section title. |
| [in] | sContent | Text content (plain text or HTML). |
Definition at line 52 of file report.cpp.
| bool Report::save | ( | const QString & | sPath | ) | const |
Save the report to an HTML file.
| [in] | sPath | Output file path. |
Definition at line 160 of file report.cpp.
|
inline |
|
inline |
| QString Report::toHtml | ( | ) | const |
Generate the full HTML string.
Definition at line 117 of file report.cpp.