summaryrefslogtreecommitdiffstats
path: root/kviewshell/renderedDocumentPagePrinter.h
diff options
context:
space:
mode:
Diffstat (limited to 'kviewshell/renderedDocumentPagePrinter.h')
-rw-r--r--kviewshell/renderedDocumentPagePrinter.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/kviewshell/renderedDocumentPagePrinter.h b/kviewshell/renderedDocumentPagePrinter.h
new file mode 100644
index 00000000..44bdc6d2
--- /dev/null
+++ b/kviewshell/renderedDocumentPagePrinter.h
@@ -0,0 +1,46 @@
+// -*- C++ -*-
+//
+// Class: RenderedDocumentPagePrinter
+//
+// Widget for displaying TeX DVI files.
+// Part of KDVI- A previewer for TeX DVI files.
+//
+// (C) 2005 Stefan Kebekus. Distributed under the GPL.
+
+
+#ifndef _rendereddocumentpageprinter_h_
+#define _rendereddocumentpageprinter_h_
+
+#include "renderedDocumentPage.h"
+#include <qpainter.h>
+
+class KPrinter;
+
+
+class RenderedDocumentPagePrinter: public RenderedDocumentPage
+{
+public:
+ RenderedDocumentPagePrinter(KPrinter *kp);
+
+ virtual ~RenderedDocumentPagePrinter() { delete printerPainter; }
+
+ /** Returns a pointer to the paintDevice, in this implementation
+ either 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() { return printerPainter; }
+
+ virtual QSize size();
+
+ /** This method does nothing. In particular, it does NOT delete the
+ QPainter. The QPainter is deleted automatically when this
+ RenderedDocumentPagePrinter is destructed. */
+ virtual void returnPainter(QPainter *) {;}
+
+private:
+ KPrinter *printer;
+ QPainter *printerPainter;
+};
+
+
+#endif