#include "support/unicode.h"
-#include <QWidget>
-
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;
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,
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.
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_;