diff options
Diffstat (limited to 'src/gui/editors/matrix/QCanvasMatrixDiamond.cpp')
-rw-r--r-- | src/gui/editors/matrix/QCanvasMatrixDiamond.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp index 582b53a..128d3f9 100644 --- a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp +++ b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp @@ -27,17 +27,17 @@ #include "MatrixElement.h" #include "QCanvasMatrixRectangle.h" -#include <qcanvas.h> -#include <qpainter.h> -#include <qpointarray.h> -#include <qpoint.h> +#include <tqcanvas.h> +#include <tqpainter.h> +#include <tqpointarray.h> +#include <tqpoint.h> namespace Rosegarden { QCanvasMatrixDiamond::QCanvasMatrixDiamond(MatrixElement &n, - QCanvas* canvas) : + TQCanvas* canvas) : QCanvasMatrixRectangle(n, canvas) {} @@ -46,34 +46,34 @@ QCanvasMatrixDiamond::~QCanvasMatrixDiamond() hide(); } -QPointArray QCanvasMatrixDiamond::areaPoints() const +TQPointArray QCanvasMatrixDiamond::areaPoints() const { - QPointArray pa(4); + TQPointArray pa(4); int pw = (pen().width() + 1) / 2; if ( pw < 1 ) pw = 1; if ( pen() == NoPen ) pw = 0; - pa[0] = QPoint((int)x() - height() / 2 - pw, (int)y() - pw); - pa[1] = pa[0] + QPoint(height() + pw * 2, 0); - pa[2] = pa[1] + QPoint(0, height() + pw * 2); - pa[3] = pa[0] + QPoint(0, height() + pw * 2); + pa[0] = TQPoint((int)x() - height() / 2 - pw, (int)y() - pw); + pa[1] = pa[0] + TQPoint(height() + pw * 2, 0); + pa[2] = pa[1] + TQPoint(0, height() + pw * 2); + pa[3] = pa[0] + TQPoint(0, height() + pw * 2); return pa; } -void QCanvasMatrixDiamond::drawShape(QPainter & p) +void QCanvasMatrixDiamond::drawShape(TQPainter & p) { p.save(); p.setWorldXForm(false); - QPointArray pa(4); + TQPointArray pa(4); int q = height() / 2 + 2; - QPoint mapPos = p.worldMatrix().map(QPoint(int(x()), int(y()))); + TQPoint mapPos = p.worldMatrix().map(TQPoint(int(x()), int(y()))); - pa[0] = QPoint(mapPos.x(), mapPos.y() - 3); - pa[1] = QPoint(mapPos.x() + q, mapPos.y() - 3 + q); - pa[2] = pa[0] + QPoint(0, q * 2); - pa[3] = pa[1] - QPoint(q * 2, 0); + pa[0] = TQPoint(mapPos.x(), mapPos.y() - 3); + pa[1] = TQPoint(mapPos.x() + q, mapPos.y() - 3 + q); + pa[2] = pa[0] + TQPoint(0, q * 2); + pa[3] = pa[1] - TQPoint(q * 2, 0); p.drawConvexPolygon(pa); p.restore(); |