The Kugar library includes two widgets for use.
The KReportViewer
class is designed for TDE
developers. It supports a TDE printing system and Unix-like localization
via i18n()
calls.
The MReportViewer
class is designed for TQt™
developers and provides real crossplatforming. It can be used not
only on Unix-like platforms, but also on Windows® and Mac® OS.
In order to build a program that uses the Kugar library, it should be linked
with libkugar.so
shared library, which is provided with the Kugar distribution on all
Unix-like platforms.
Include files are kugarqt.h
and kugar.h
for TQt™ and TDE programs respectively.
For a detailed example of how Kugar classes can be used, look in the /shell
folder in the Kugar sources.
MReportViewer
(and KReportViewer
too)
contains several public methods that can be used.
void renderReport(
)
;
Renders the report onto a screen.
void printReport(
)
;
Calls the print dialog to print the report.
void clearReport(
)
;
Clears the report on a screen and frees report data. Call this before opening the new report.
bool setReportData( | data_file_name) ; |
const TQString & | data_file_name; |
Sets report data from data_file_name
file.
bool setReportData( | data_io_device) ; |
const TQIODevice & | data_io_device; |
Sets report data fromdata_io_device
file. IO device can be any successor of theTQIODevice
class. For example, to fetch records directly from the database, create aTQIODevice
successor and redefine all necessary functionality.
bool setReportTemplate( | template_file_name) ; |
const TQString & | template_file_name; |
Sets report template from template_file_name
file.
bool setReportTemplate( | template_io_device) ; |
const TQIODevice & | template_io_device; |
Sets report template fromtemplate_io_device
file. IO device can be any successor of theTQIODevice
class. For example, to obtain a report template from network storage or database, create a TQIODevice successor and redefine all necessary functionality.
Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team