00001 //-------------------------------------------------------------------- 00002 // 00003 // File: Txq2dPrintCanvas.h 00004 // 00005 // Purpose: Print the Txq2dCanvas to a printer 00006 // 00007 // Version: $Id: Txq2dPrintCanvas.h,v 1.3 2001/10/10 22:41:05 kgl Exp $ 00008 // 00009 // Copyright (c) 2000 by Tech-X Corporation. All rights reserved. 00010 // 00011 // Author: Kelly G. Luetkemeyer 00012 // 00013 //-------------------------------------------------------------------- 00014 00015 #ifndef TXQ2D_PRINTCANVAS_H 00016 #define TXQ2D_PRINTCANVAS_H 00017 00018 // Qt includes 00019 #include <qprinter.h> 00020 #include <qpaintdevicemetrics.h> 00021 00022 // Txq includes 00023 #include "Txq2dCanvas.h" 00024 00036 class Txq2dPrintCanvas: public Txq2dCanvas 00037 { 00038 Q_OBJECT 00039 00040 public: 00041 00050 Txq2dPrintCanvas(Txq2dCanvas *cvas, QPrinter *pr, bool isPr, 00051 QWidget *parent=0, const char *nm=0); 00052 00056 virtual ~Txq2dPrintCanvas(); 00057 00061 void print(); 00062 00067 int getWidth(); 00068 00073 int getDpiX(); 00074 00079 int getHeight(); 00080 00085 int getDpiY(); 00086 00087 signals: 00088 00089 protected: 00090 00095 void paintEvent( QPaintEvent * ); 00096 00097 private: 00098 00102 Txq2dCanvas *canvas; 00103 00107 QPrinter *printer; 00108 00112 bool isPrint; 00113 00114 }; 00115 00116 #endif
Copyright Tech-X Corporation, all rights reserved.