Source: /app/hbasic/hbasic/gui_db_access/report_preview_widget.h


Annotated List
Files
Globals
Hierarchy
Index

#include 
#include "../src/report_document.h"

// class QSqlCursor;
class QSqlQuery;
class CReportDisplayWidget;
class CReportDocument;
class HBReportElmt;

/* ####################################################################### */
/**
 * @short Editor widget for database reports.
 *
 * Desc: Widget that may compute the contents of a report to display it on
 * the screen or print it.                                                 */

class CReportPreviewWidget : public QWidget
{
public:               /* variables */

public:               /* methods */
	CReportPreviewWidget( QWidget *parent, CReportDocument *new_rep_desc );
	void initReportDisplay( QPainter *p, REP_OUTPUT_SIZE *rep_size,
		int page_pix_width, int page_pix_height );

	/* Display one page of report output to paint device */
	short displayReportPage( QPainter *p, REP_OUTPUT_SIZE *rep_size );
	void printContents( void );
	void setDisplayMode( bool fullpage );
	CReportDisplayWidget *preview_widget;
	void setNewScale( void );

private:              /* variables */
	double editor_page_width;
	double editor_page_height;
	double display_page_width;
	double display_page_height;
	double dscale_x;   /* scaling factors for full page. */
	double dscale_y;
	int more_query_rows;
//	QSqlCursor *query_cursor;
	QSqlQuery *query_cursor;
	HBDbTable *table_desc;
	CReportDocument *report_description;

private:              /* methods */
	void printCurrentDocument( void );
	void displayReportPart( CReportPart *part_desc_ptr, QPainter *p, 
		REP_OUTPUT_SIZE *rep_size, double *ystart );
	QString *valueInterpreter( char *expression );
	QString getFieldRtValue( HBReportElmt *elmt_ptr );
	void resizeEvent( QResizeEvent *evt );
	void initQueryExecution( CReportDocument *rep_desc_ptr );
	void prepareNewQueryRow( void );
	void finishQueryExecution( void );
};

Generated by: root on linux on Sun Jul 13 18:06:35 2003, using kdoc 2.0a54.