ICS

QicsTable Documentation Set

QicsHTMLExport Class Reference

QicsHTMLExport is a helper class that allows saving table data to HTML. More...

#include <QicsHTMLExport.h>

List of all members.

Public Member Functions

 QicsHTMLExport (QicsTable *table, const QicsHTMLExportOptions &options=QicsHTMLExportOptions())
bool exportToFile (const QString &fileName)

Private Member Functions

void doExportCell (QicsCell *cell)

Private Attributes

QicsTablem_table
QFileInfo fi
QTextStream ts
QicsHTMLExportOptions m_opts


Detailed Description

QicsHTMLExport is a helper class that allows saving table data to HTML.

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
    }


Constructor & Destructor Documentation

QicsHTMLExport::QicsHTMLExport ( QicsTable table,
const QicsHTMLExportOptions options = QicsHTMLExportOptions() 
)

Constructor.

See also:
QicsHTMLExportOptions


Member Function Documentation

void QicsHTMLExport::doExportCell ( QicsCell cell  )  [private]

Performs export in HTML of cell cell

bool QicsHTMLExport::exportToFile ( const QString &  fileName  ) 

Exports table's contents to HTML file.


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

All trademarks and copyrights on this page are properties of their respective owners.
The rest is copyright 1999-2006 Integrated Computer Solutions, Inc.