mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
* 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
This commit is contained in:
parent
eb651c3d61
commit
992fe1dba6
@ -26,19 +26,15 @@
|
|||||||
|
|
||||||
#include "support/unicode.h"
|
#include "support/unicode.h"
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
namespace lyx {
|
namespace lyx {
|
||||||
namespace frontend {
|
namespace frontend {
|
||||||
|
|
||||||
QLPainter::QLPainter(QWidget * qwa)
|
QLPainter::QLPainter(QPaintDevice * device)
|
||||||
: qwa_(qwa)
|
: QPainter(device), Painter()
|
||||||
{
|
{
|
||||||
//lyxerr << "QLPainter::start()" << endl;
|
|
||||||
QPainter::begin(qwa_);
|
|
||||||
setRenderHint(QPainter::TextAntialiasing);
|
setRenderHint(QPainter::TextAntialiasing);
|
||||||
// new QPainter has default QPen:
|
// new QPainter has default QPen:
|
||||||
current_color_ = LColor::black;
|
current_color_ = LColor::black;
|
||||||
|
@ -25,13 +25,14 @@ class LyXFont;
|
|||||||
|
|
||||||
namespace frontend {
|
namespace frontend {
|
||||||
|
|
||||||
class GuiWorkArea;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* QLPainter - a painter implementation for Qt4
|
* QLPainter - a painter implementation for Qt4
|
||||||
*/
|
*/
|
||||||
class QLPainter : public QPainter, public Painter {
|
class QLPainter : public QPainter, public Painter {
|
||||||
public:
|
public:
|
||||||
|
QLPainter(QPaintDevice *);
|
||||||
|
virtual ~QLPainter();
|
||||||
|
|
||||||
/// draw a line from point to point
|
/// draw a line from point to point
|
||||||
virtual void line(
|
virtual void line(
|
||||||
int x1, int y1,
|
int x1, int y1,
|
||||||
@ -101,10 +102,6 @@ public:
|
|||||||
lyx::char_type c, LyXFont const & f);
|
lyx::char_type c, LyXFont const & f);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class GuiWorkArea;
|
|
||||||
QLPainter(QWidget *);
|
|
||||||
virtual ~QLPainter();
|
|
||||||
|
|
||||||
/// draw small caps text
|
/// draw small caps text
|
||||||
/**
|
/**
|
||||||
\return width of the drawn text.
|
\return width of the drawn text.
|
||||||
@ -117,9 +114,6 @@ private:
|
|||||||
line_style ls = line_solid,
|
line_style ls = line_solid,
|
||||||
line_width lw = line_thin);
|
line_width lw = line_thin);
|
||||||
|
|
||||||
/// the working area
|
|
||||||
QWidget * qwa_;
|
|
||||||
|
|
||||||
LColor::color current_color_;
|
LColor::color current_color_;
|
||||||
Painter::line_style current_ls_;
|
Painter::line_style current_ls_;
|
||||||
Painter::line_width current_lw_;
|
Painter::line_width current_lw_;
|
||||||
|
Loading…
Reference in New Issue
Block a user