#include <QicsHTMLExport.h>
Public Member Functions | |
| QicsHTMLExport (QicsTable *table, const QicsHTMLExportOptions &options=QicsHTMLExportOptions()) | |
| bool | exportToFile (const QString &fileName) |
Private Member Functions | |
| void | doExportCell (const QicsCell &cell) |
| void | doExportPen (const QPen &pen, Qics::QicsBoxBorders border) |
Private Attributes | |
| QicsTable * | m_table |
| QFileInfo | fi |
| QTextStream | ts |
| QTextStream | ss |
| QTextStream | fs |
| QString | temp_style |
| QString | temp_html |
| QMap< QString, QString > | styleMap |
| QicsHTMLExportOptions | m_opts |
To specify which attributes of the table to export, use QicsHTMLExportOptions structure passing it to QicsHTMLExport constructor.
Example of usage:
void exportTable(QicsTable *table) { QicsHTMLExportOptions opts; // create export options structure QString fileName("table.html"); // name of the HTML file opts.pixFormat = "JPG"; // export format is JPEG opts.pixQuality = 80; // quality of the images is 80% opts.pixNamingTemplate = "image%1-%2"; // all the exported images will get names like "image5-3.jpg" // (where %1 is cell index, %2 is row index) opts.selection = false; // do not mark currently selected region in HTML QicsHTMLExport exporter(table, opts); // create exporter object exporter.exportToFile(fileName); // export the table }
| QicsHTMLExport::QicsHTMLExport | ( | QicsTable * | table, | |
| const QicsHTMLExportOptions & | options = QicsHTMLExportOptions() | |||
| ) |
Constructor.
| bool QicsHTMLExport::exportToFile | ( | const QString & | fileName | ) |
Exports table's contents to HTML file.