From 458efa7b0c935cbaafa2791021a5f8f7241aa876 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 2 May 2011 22:38:52 +0000 Subject: Initial TQt4 port of Rosegarden This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/gui/editors/notation/NotePixmapPainter.h | 44 ++++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/gui/editors/notation/NotePixmapPainter.h') diff --git a/src/gui/editors/notation/NotePixmapPainter.h b/src/gui/editors/notation/NotePixmapPainter.h index ff8edae..51918ec 100644 --- a/src/gui/editors/notation/NotePixmapPainter.h +++ b/src/gui/editors/notation/NotePixmapPainter.h @@ -33,7 +33,7 @@ namespace Rosegarden { class NotePixmapPainter { // Just a trivial class that instructs two painters to do the - // same thing (one for the pixmap, one for the mask). We only + // same thing (one for the pixmap, one for the tqmask). We only // duplicate those methods we actually use in NotePixmapFactory public: @@ -55,23 +55,23 @@ public: } } - bool begin(TQPaintDevice *device, TQPaintDevice *mask = 0, bool unclipped = false) { + bool begin(TQPaintDevice *device, TQPaintDevice *tqmask = 0, bool unclipped = false) { m_externalPainter = 0; - if (mask) { + if (tqmask) { m_useMask = true; - m_maskPainter.begin(mask, unclipped); + m_tqmaskPainter.tqbegin(tqmask, unclipped); } else { m_useMask = false; } m_painter = &m_myPainter; - return m_painter->begin(device, unclipped); + return m_painter->tqbegin(device, unclipped); } bool end() { - if (m_useMask) m_maskPainter.end(); + if (m_useMask) m_tqmaskPainter.end(); return m_painter->end(); } @@ -79,66 +79,66 @@ public: return *m_painter; } - TQPainter &maskPainter() { - return m_maskPainter; + TQPainter &tqmaskPainter() { + return m_tqmaskPainter; } void drawPoint(int x, int y) { m_painter->drawPoint(x, y); - if (m_useMask) m_maskPainter.drawPoint(x, y); + if (m_useMask) m_tqmaskPainter.drawPoint(x, y); } void drawLine(int x1, int y1, int x2, int y2) { m_painter->drawLine(x1, y1, x2, y2); - if (m_useMask) m_maskPainter.drawLine(x1, y1, x2, y2); + if (m_useMask) m_tqmaskPainter.drawLine(x1, y1, x2, y2); } void drawRect(int x, int y, int w, int h) { m_painter->drawRect(x, y, w, h); - if (m_useMask) m_maskPainter.drawRect(x, y, w, h); + if (m_useMask) m_tqmaskPainter.drawRect(x, y, w, h); } void drawArc(int x, int y, int w, int h, int a, int alen) { m_painter->drawArc(x, y, w, h, a, alen); - if (m_useMask) m_maskPainter.drawArc(x, y, w, h, a, alen); + if (m_useMask) m_tqmaskPainter.drawArc(x, y, w, h, a, alen); } void drawPolygon(const TQPointArray &a, bool winding = false, int index = 0, int n = -1) { - m_painter->drawPolygon(a, winding, index, n); - if (m_useMask) m_maskPainter.drawPolygon(a, winding, index, n); + m_painter->tqdrawPolygon(a, winding, index, n); + if (m_useMask) m_tqmaskPainter.tqdrawPolygon(a, winding, index, n); } void drawPolyline(const TQPointArray &a, int index = 0, int n = -1) { - m_painter->drawPolyline(a, index, n); - if (m_useMask) m_maskPainter.drawPolyline(a, index, n); + m_painter->tqdrawPolyline(a, index, n); + if (m_useMask) m_tqmaskPainter.tqdrawPolyline(a, index, n); } void drawPixmap(int x, int y, const TQPixmap &pm, int sx = 0, int sy = 0, int sw = -1, int sh = -1) { - m_painter->drawPixmap(x, y, pm, sx, sy, sw, sh); - if (m_useMask) m_maskPainter.drawPixmap(x, y, *(pm.mask()), sx, sy, sw, sh); + m_painter->tqdrawPixmap(x, y, pm, sx, sy, sw, sh); + if (m_useMask) m_tqmaskPainter.tqdrawPixmap(x, y, *(pm.tqmask()), sx, sy, sw, sh); } void drawText(int x, int y, const TQString &string) { m_painter->drawText(x, y, string); - if (m_useMask) m_maskPainter.drawText(x, y, string); + if (m_useMask) m_tqmaskPainter.drawText(x, y, string); } void drawNoteCharacter(int x, int y, const NoteCharacter &character) { character.draw(m_painter, x, y); - if (m_useMask) character.drawMask(&m_maskPainter, x, y); + if (m_useMask) character.drawMask(&m_tqmaskPainter, x, y); } void drawEllipse(int x, int y, int w, int h) { m_painter->drawEllipse(x, y, w, h); - if (m_useMask) m_maskPainter.drawEllipse(x, y, w, h); + if (m_useMask) m_tqmaskPainter.drawEllipse(x, y, w, h); } private: bool m_useMask; TQPainter m_myPainter; - TQPainter m_maskPainter; + TQPainter m_tqmaskPainter; TQPainter *m_externalPainter; TQPainter *m_painter; }; -- cgit v1.2.1