summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
commit11f31c37e5fa4889d9989f10272f44845449cb7b (patch)
tree4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/editors/matrix/QCanvasMatrixDiamond.cpp
parent832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff)
downloadrosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz
rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/editors/matrix/QCanvasMatrixDiamond.cpp')
-rw-r--r--src/gui/editors/matrix/QCanvasMatrixDiamond.cpp36
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();