Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Txq2dPrintCanvas Class Reference

The Txq2dPrintCanvas creates a QWidget used for printing a Txq2dCanvas to a printer or a file. More...

#include <Txq2dPrintCanvas.h>

Inheritance diagram for Txq2dPrintCanvas::

Txq2dCanvas QWidget TxqCanvas List of all members.

Public Methods

 Txq2dPrintCanvas (Txq2dCanvas *cvas, QPrinter *pr, bool isPr, QWidget *parent=0, const char *nm=0)
 The constructor requires a Txq2dCanvas and a printer to print the pixmap. More...

virtual ~Txq2dPrintCanvas ()
 the destructor. More...

void print ()
 Used to invoke a print request. More...

int getWidth ()
 Return the width of the printer. More...

int getDpiX ()
 Get the X dots per inch of the printer. More...

int getHeight ()
 Get the height of the printer. More...

int getDpiY ()
 Get the Y dots per inch of the printer. More...


Protected Methods

void paintEvent (QPaintEvent *)
 The paint event. More...


Private Attributes

Txq2dCanvascanvas
 The private Txq2dCanvas. More...

QPrinter* printer
 The printer. More...

bool isPrint
 bool flag to determine if using a printer. More...


Detailed Description

The Txq2dPrintCanvas creates a QWidget used for printing a Txq2dCanvas to a printer or a file.

Copyright 2000 by Tech-X Corporation

Author:
Kelly G. Luetkemeyer

Version:
Id:
Txq2dPrintCanvas.h,v 1.3 2001/10/10 22:41:05 kgl Exp

Definition at line 36 of file Txq2dPrintCanvas.h.


Constructor & Destructor Documentation

Txq2dPrintCanvas::Txq2dPrintCanvas ( Txq2dCanvas * cvas,
QPrinter * pr,
bool isPr,
QWidget * parent = 0,
const char * nm = 0 )
 

The constructor requires a Txq2dCanvas and a printer to print the pixmap.

Parameters:
cvas   the Txq2dCanvas to get the QPixmap to print.
pr   the QPrinter to print the QPixmpap.
isPr   bool to determine if sending to the printer.
parent   the parent widget
nm   the name of this widget

Txq2dPrintCanvas::~Txq2dPrintCanvas ( ) [virtual]
 

the destructor.


Member Function Documentation

int Txq2dPrintCanvas::getDpiX ( )
 

Get the X dots per inch of the printer.

Returns:
the X dots per inch of the printer

int Txq2dPrintCanvas::getDpiY ( )
 

Get the Y dots per inch of the printer.

Returns:
the Y dots per inch of the printer

int Txq2dPrintCanvas::getHeight ( )
 

Get the height of the printer.

Returns:
the height of the printer

int Txq2dPrintCanvas::getWidth ( )
 

Return the width of the printer.

Returns:
the width of the printer

void Txq2dPrintCanvas::paintEvent ( QPaintEvent * g ) [protected]
 

The paint event.

Parameters:
p   the paint device which normally will be a printer.

Reimplemented from Txq2dCanvas.

void Txq2dPrintCanvas::print ( )
 

Used to invoke a print request.


Member Data Documentation

Txq2dCanvas * Txq2dPrintCanvas::canvas [private]
 

The private Txq2dCanvas.

Definition at line 102 of file Txq2dPrintCanvas.h.

bool Txq2dPrintCanvas::isPrint [private]
 

bool flag to determine if using a printer.

Definition at line 112 of file Txq2dPrintCanvas.h.

QPrinter * Txq2dPrintCanvas::printer [private]
 

The printer.

Definition at line 107 of file Txq2dPrintCanvas.h.


The documentation for this class was generated from the following file: Copyright Tech-X Corporation, all rights reserved.