From: Abdelrazak Younes Date: Mon, 30 Oct 2006 13:16:18 +0000 (+0000) Subject: * QLPainter: X-Git-Tag: 1.6.10~12135 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=992fe1dba6113b0973593bc82ebda758e6d4c2e8;p=features.git * QLPainter: - ctor and dtor moved to public: - QLPainter(): takes a QPaintdevice instead of a QWidget. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15619 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/QLPainter.C b/src/frontends/qt4/QLPainter.C index da811712fe..beba02550c 100644 --- a/src/frontends/qt4/QLPainter.C +++ b/src/frontends/qt4/QLPainter.C @@ -26,19 +26,15 @@ #include "support/unicode.h" -#include - using std::endl; using std::string; namespace lyx { namespace frontend { -QLPainter::QLPainter(QWidget * qwa) - : qwa_(qwa) +QLPainter::QLPainter(QPaintDevice * device) + : QPainter(device), Painter() { - //lyxerr << "QLPainter::start()" << endl; - QPainter::begin(qwa_); setRenderHint(QPainter::TextAntialiasing); // new QPainter has default QPen: current_color_ = LColor::black; diff --git a/src/frontends/qt4/QLPainter.h b/src/frontends/qt4/QLPainter.h index a88daec579..5403dd6a71 100644 --- a/src/frontends/qt4/QLPainter.h +++ b/src/frontends/qt4/QLPainter.h @@ -25,13 +25,14 @@ class LyXFont; namespace frontend { -class GuiWorkArea; - /** * QLPainter - a painter implementation for Qt4 */ class QLPainter : public QPainter, public Painter { public: + QLPainter(QPaintDevice *); + virtual ~QLPainter(); + /// draw a line from point to point virtual void line( int x1, int y1, @@ -101,10 +102,6 @@ public: lyx::char_type c, LyXFont const & f); private: - friend class GuiWorkArea; - QLPainter(QWidget *); - virtual ~QLPainter(); - /// draw small caps text /** \return width of the drawn text. @@ -117,9 +114,6 @@ private: line_style ls = line_solid, line_width lw = line_thin); - /// the working area - QWidget * qwa_; - LColor::color current_color_; Painter::line_style current_ls_; Painter::line_width current_lw_;