gSAFE  1.3.8
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HPrintTable Class Reference

#include <printlib.h>

Inherits QDialog.

Public Slots

int drawIt (QPainter *p, double scale=1.0, bool print=false)
int printIt (void)
void scanIt (void)
int updateDisplay (void)


void updateDisplaySignal (void)

Public Member Functions

 HPrintTable (QWidget *parent, HBase *d, QFont *pf=NULL)
 HPtintTable //////////////////////////////////////////////////////////////. More...

Protected Member Functions

int drawList (QPainter *p, bool print=false)
int drawPlainDataMatrix (QPainter *p, bool print=false)
int drawTable (QPainter *p, bool print=false)
void keyPressEvent (QKeyEvent *e)
int newPage (QPainter *p, bool print=false)
void resizeEvent (QResizeEvent *e)
void scanList (void)
void scanPlainDataMatrix (void)
void scanTable (void)

Protected Attributes

int cellh
QList< int > cellrh
QList< int > cellw
int column
bool hide
QVBoxLayout * layout
int page
int pagerun
QLabel * pn
QPrinter * printer
QFont printfont
int rownum
QScrollArea * scrollp

Detailed Description

HPrintTable is a print preview and printer dialog, which can print a HTable or HList or HPlainDataMatrix objects. When you create this object, a popup dialog will appear with a print preview.


This class will generate the printed document according the meta data class (HTable/HList/HPlainDataMatrix) and the data will came from these class too.

HTable *mytable=...
HPrintTable *d = new HPrintTable(this,mytable);
delete d;

or you can print a result of a query

HPlainDataMatrix *pdm = h.submitNResultQuery(3,"SELECT name,age,address FROM peoples;","Error occured");
HPrintTable *d = new HPrintTable(this,pdm);
delete d;
delete pdm;
See Also

Definition at line 95 of file printlib.h.

Constructor & Destructor Documentation

HPrintTable::HPrintTable ( QWidget *  parent,
HBase d,
QFont *  pf = NULL 

HPtintTable //////////////////////////////////////////////////////////////.

Creates a HPrintTable object

parentthe QWidget descendant parent
dthe meta-data class
pfthe front to print

Definition at line 196 of file printlib.cpp.

Member Function Documentation

void HPrintTable::updateDisplaySignal ( void  )

The gui uses this signal to pass the refresh request to the HDataField descendants. This printing class won't use this signal, but I left this signal here avoid the connect error warnings.

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