diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 47d455dd55be855e4cc691c32f687f723d9247ee (patch) | |
tree | 52e236aaa2576bdb3840ebede26619692fed6d7d /kviewshell/renderedDocumentPagePixmap.h | |
download | tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kviewshell/renderedDocumentPagePixmap.h')
-rw-r--r-- | kviewshell/renderedDocumentPagePixmap.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/kviewshell/renderedDocumentPagePixmap.h b/kviewshell/renderedDocumentPagePixmap.h new file mode 100644 index 00000000..112650ba --- /dev/null +++ b/kviewshell/renderedDocumentPagePixmap.h @@ -0,0 +1,59 @@ +// -*- C++ -*- +// +// Class: RenderedDocumentPagePixmap +// +// Widget for displaying TeX DVI files. +// Part of KDVI- A previewer for TeX DVI files. +// +// (C) 2004-2005 Stefan Kebekus. Distributed under the GPL. + + +#ifndef _rendereddocumentpagepixmap_h_ +#define _rendereddocumentpagepixmap_h_ + +#include "renderedDocumentPage.h" + +#include <qpainter.h> +#include <qpixmap.h> + + +// This class contains everything documentRenderer needs to know +// about a certain page. +class RenderedDocumentPagePixmap: public RenderedDocumentPage, public QPixmap +{ + Q_OBJECT + +public: + RenderedDocumentPagePixmap(); + + virtual ~RenderedDocumentPagePixmap(); + + /** Returns a pointer to the paintDevice (in most implementation + either a QPixmap, or a QPrinter). The pointer returned is valid + as long as *this RenderedDocumentPage exists. This method is + used by the renderer to draw on the page. */ + virtual QPainter *getPainter(); + + /** This implementation delete the QPainter *pt (and thereby initiates the drawing) */ + virtual void returnPainter(QPainter *pt) {delete pt;} + + QPixmap accessiblePixmap(); + + void resize(const QSize& size); + void resize(int width, int height); + + virtual QSize size() { return QPixmap::size(); } + virtual int width() { return QPixmap::width(); } + virtual int height() { return QPixmap::height(); } + + /** Returns the amount of memory used by this pixmap */ + unsigned int memory(); + +private: + QPixmap* _accessiblePixmap; + /** true if _accessiblePixmap needs updateing */ + bool dirty; +}; + + +#endif |