]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/QLPainter.h
* support/qstring_helpers.h: erase ucs4_to_qstring() method.
[features.git] / src / frontends / qt4 / QLPainter.h
index 145e974c564f410d5aad3d812f3e16ae019a4f23..3050ea4946fd187e2ab8d2b83e549bfc89509c6f 100644 (file)
 #ifndef QLPAINTER_H
 #define QLPAINTER_H
 
-#include "Painter.h"
+#include "frontends/Painter.h"
 
-#include <boost/scoped_ptr.hpp>
+#include "LColor.h"
+
+#include <QPainter>
 
-class LyXFont;
-class QPaintDevice;
-class QPainter;
 class QString;
-class QPixmap;
-class QImage;
 
 namespace lyx {
-namespace frontend {
 
-class GuiWorkArea;
+class LyXFont;
+
+namespace frontend {
 
 /**
  * QLPainter - a painter implementation for Qt4
  */
-class QLPainter : public Painter {
+class QLPainter : public QPainter, public Painter {
 public:
-       QLPainter(GuiWorkArea *);
-
-       ~QLPainter();
-
-       /// begin painting
-       virtual void start();
-
-       /// end painting
-       virtual void end();
-
-       /// return the width of the work area in pixels
-       virtual int paperWidth() const;
-       /// return the height of the work area in pixels
-       virtual int paperHeight() const;
+       QLPainter(QPaintDevice *);
+       virtual ~QLPainter();
 
        /// draw a line from point to point
        virtual void line(
@@ -106,23 +92,10 @@ public:
        virtual int text(int x, int y,
                lyx::docstring const & str, LyXFont const & f);
 
-       /** Draw a string at position x, y (y is the baseline)
-        *  This is just for fast drawing
-        */
-       virtual int text(int x, int y,
-                lyx::char_type const * str, size_t l,
-               LyXFont const & f);
-
        /// draw a char at position x, y (y is the baseline)
        virtual int text(int x, int y,
                 lyx::char_type c, LyXFont const & f);
 
-       /// draw a pixmap from the image cache
-       virtual void drawPixmap(int x, int y, QPixmap const & pixmap);
-
-       /// draw a pixmap from the image cache
-       virtual void drawImage(int x, int y, QImage const & image);
-
 private:
        /// draw small caps text
        /**
@@ -136,12 +109,6 @@ private:
                line_style ls = line_solid,
                line_width lw = line_thin);
 
-       /// our qt painter
-       boost::scoped_ptr<QPainter> qp_;
-
-       /// the working area
-       GuiWorkArea * qwa_;
-
        LColor::color current_color_;
        Painter::line_style current_ls_;
        Painter::line_width current_lw_;