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

TxqPrintPixmapFrame Class Reference

The TxqPrintPixmapFrame prints a Qt pixmap to a printer or a file or to a Preview canvas. More...

#include <TxqPrintPixmapFrame.h>

Inheritance diagram for TxqPrintPixmapFrame::

TxqFrame QFrame List of all members.

Public Slots

void print ()
 slot to print the canvas. More...


Public Methods

 TxqPrintPixmapFrame (QPixmap pm, QPrinter *pr, bool isPr, QWidget *parent=0, const char *nm=0, WFlags f=WType_TopLevel)
 The constructor will print a QPixmap to a printer if the bool is set. More...

 TxqPrintPixmapFrame (QPrinter *pr, bool isPr, QWidget *parent=0, const char *nm=0, WFlags f=WType_TopLevel)
 The constructor will print a QPixmap to a printer if the bool is set. More...

virtual ~TxqPrintPixmapFrame ()
 The destructor will delete the printer. More...

void setPixmap (QPixmap pm)
 Set the pixmap. More...

int getWidth ()
 Get 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 init (QPrinter *pr, bool isPr)
 Iinitialize the class variables. More...

virtual void addMenuBarItems ()
 Add the default menu bar items. More...

virtual void addSubMenuBarItems ()
 Add the sub menu bar items The sub menubar items are any menus in the menubar that may need items inserted into it. More...

void paintEvent (QPaintEvent *p)
 The paint event will paint upon the preview canvas. More...


Private Attributes

QPixmap pixmap
 the private pixmap. More...

QPrinter* printer
 the printer. More...

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


Detailed Description

The TxqPrintPixmapFrame prints a Qt pixmap to a printer or a file or to a Preview canvas.

Copyright 2000 by Tech-X Corporation

Author:
Kelly G. Luetkemeyer

Version:
Id:
TxqPrintPixmapFrame.h,v 1.3 2001/10/09 23:36:44 kgl Exp

Definition at line 40 of file TxqPrintPixmapFrame.h.


Constructor & Destructor Documentation

TxqPrintPixmapFrame::TxqPrintPixmapFrame ( QPixmap pm,
QPrinter * pr,
bool isPr,
QWidget * parent = 0,
const char * nm = 0,
WFlags f = WType_TopLevel )
 

The constructor will print a QPixmap to a printer if the bool is set.

Parameters:
pm   the QPixmap to print.
pr   the QPrinter to print the QPixmap.
isPr   the bool to determine if printing.
parent   the QWidget parent default to null
nm   the QWidget name default to null
f   the window flags default to WType_TopLevel

TxqPrintPixmapFrame::TxqPrintPixmapFrame ( QPrinter * pr,
bool isPr,
QWidget * parent = 0,
const char * nm = 0,
WFlags f = WType_TopLevel )
 

The constructor will print a QPixmap to a printer if the bool is set.

The QPixmap must be set by the class setPixmap method.

Parameters:
pr   the QPrinter to print the QPixmap.
isPr   the bool to determine if printing.
parent   the QWidget parent default to null
nm   the QWidget name default to null
f   the window flags default to WType_TopLevel

TxqPrintPixmapFrame::~TxqPrintPixmapFrame ( ) [virtual]
 

The destructor will delete the printer.


Member Function Documentation

void TxqPrintPixmapFrame::addMenuBarItems ( ) [protected, virtual]
 

Add the default menu bar items.

Reimplemented from TxqFrame.

void TxqPrintPixmapFrame::addSubMenuBarItems ( ) [protected, virtual]
 

Add the sub menu bar items The sub menubar items are any menus in the menubar that may need items inserted into it.

Reimplemented from TxqFrame.

int TxqPrintPixmapFrame::getDpiX ( )
 

Get the X dots per inch of the printer.

Returns:
the X dots per inch of the printer

int TxqPrintPixmapFrame::getDpiY ( )
 

Get the Y dots per inch of the printer.

Returns:
the Y dots per inch of the printer

int TxqPrintPixmapFrame::getHeight ( )
 

Get the height of the printer.

Returns:
the height of the printer

int TxqPrintPixmapFrame::getWidth ( )
 

Get the width of the printer.

Returns:
the width of the printer

void TxqPrintPixmapFrame::init ( QPrinter * pr,
bool isPr ) [protected]
 

Iinitialize the class variables.

Parameters:
pr   the printer pointer
isPr   the bool for printing.

void TxqPrintPixmapFrame::paintEvent ( QPaintEvent * p ) [protected]
 

The paint event will paint upon the preview canvas.

Parameters:
p   the QPaintEvent

void TxqPrintPixmapFrame::print ( ) [virtual, slot]
 

slot to print the canvas.

Reimplemented from TxqFrame.

void TxqPrintPixmapFrame::setPixmap ( QPixmap pm )
 

Set the pixmap.

Parameters:
pm   the QPixmap to print.


Member Data Documentation

bool TxqPrintPixmapFrame::isPrint [private]
 

bool flag to determine if using a printer.

Reimplemented from TxqFrame.

Definition at line 155 of file TxqPrintPixmapFrame.h.

QPixmap TxqPrintPixmapFrame::pixmap [private]
 

the private pixmap.

Definition at line 145 of file TxqPrintPixmapFrame.h.

QPrinter * TxqPrintPixmapFrame::printer [private]
 

the printer.

Reimplemented from TxqFrame.

Definition at line 150 of file TxqPrintPixmapFrame.h.


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