kviewshell
renderedDocumentPagePixmap.h
Go to the documentation of this file.00001 // -*- C++ -*- 00002 // 00003 // Class: RenderedDocumentPagePixmap 00004 // 00005 // Widget for displaying TeX DVI files. 00006 // Part of KDVI- A previewer for TeX DVI files. 00007 // 00008 // (C) 2004-2005 Stefan Kebekus. Distributed under the GPL. 00009 00010 00011 #ifndef _rendereddocumentpagepixmap_h_ 00012 #define _rendereddocumentpagepixmap_h_ 00013 00014 #include "renderedDocumentPage.h" 00015 00016 #include <qpainter.h> 00017 #include <qpixmap.h> 00018 00019 00020 // This class contains everything documentRenderer needs to know 00021 // about a certain page. 00022 class RenderedDocumentPagePixmap: public RenderedDocumentPage, public QPixmap 00023 { 00024 Q_OBJECT 00025 00026 public: 00027 RenderedDocumentPagePixmap(); 00028 00029 virtual ~RenderedDocumentPagePixmap(); 00030 00035 virtual QPainter *getPainter(); 00036 00038 virtual void returnPainter(QPainter *pt) {delete pt;} 00039 00040 QPixmap accessiblePixmap(); 00041 00042 void resize(const QSize& size); 00043 void resize(int width, int height); 00044 00045 virtual QSize size() { return QPixmap::size(); } 00046 virtual int width() { return QPixmap::width(); } 00047 virtual int height() { return QPixmap::height(); } 00048 00050 unsigned int memory(); 00051 00052 private: 00053 QPixmap* _accessiblePixmap; 00055 bool dirty; 00056 }; 00057 00058 00059 #endif