diff options
Diffstat (limited to 'src/svnfrontend/graphtree/graphtreelabel.cpp')
-rw-r--r-- | src/svnfrontend/graphtree/graphtreelabel.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/svnfrontend/graphtree/graphtreelabel.cpp b/src/svnfrontend/graphtree/graphtreelabel.cpp index 9770fef..cf51c9b 100644 --- a/src/svnfrontend/graphtree/graphtreelabel.cpp +++ b/src/svnfrontend/graphtree/graphtreelabel.cpp @@ -19,13 +19,13 @@ ***************************************************************************/ #include "graphtreelabel.h" #include "graphtree_defines.h" -#include <qpainter.h> +#include <tqpainter.h> -GraphTreeLabel::GraphTreeLabel(const QString&text, const QString&_nodename,const QRect&r,QCanvas*c) - : QCanvasRectangle(r,c),StoredDrawParams() +GraphTreeLabel::GraphTreeLabel(const TQString&text, const TQString&_nodename,const TQRect&r,TQCanvas*c) + : TQCanvasRectangle(r,c),StoredDrawParams() { m_Nodename = _nodename; - m_SourceNode = QString::null; + m_SourceNode = TQString(); setText(0,text); setPosition(0, DrawParams::TopCenter); drawFrame(true); @@ -35,7 +35,7 @@ GraphTreeLabel::~GraphTreeLabel() { } -const QString&GraphTreeLabel::nodename()const +const TQString&GraphTreeLabel::nodename()const { return m_Nodename; } @@ -45,14 +45,14 @@ int GraphTreeLabel::rtti()const return GRAPHTREE_LABEL; } -void GraphTreeLabel::setBgColor(const QColor&c) +void GraphTreeLabel::setBgColor(const TQColor&c) { _backColor=c; } -void GraphTreeLabel::drawShape(QPainter& p) +void GraphTreeLabel::drawShape(TQPainter& p) { - QRect r = rect(); + TQRect r = rect(); /* p.setPen(blue); p.drawRect(r); @@ -65,23 +65,23 @@ void GraphTreeLabel::drawShape(QPainter& p) void GraphTreeLabel::setSelected(bool s) { - QCanvasRectangle::setSelected(s); + TQCanvasRectangle::setSelected(s); StoredDrawParams::setSelected(s); update(); } -const QString&GraphTreeLabel::source()const +const TQString&GraphTreeLabel::source()const { return m_SourceNode; } -void GraphTreeLabel::setSource(const QString&_s) +void GraphTreeLabel::setSource(const TQString&_s) { m_SourceNode=_s; } -GraphEdge::GraphEdge(QCanvas*c) - : QCanvasSpline(c) +GraphEdge::GraphEdge(TQCanvas*c) + : TQCanvasSpline(c) { } @@ -89,12 +89,12 @@ GraphEdge::~GraphEdge() { } -void GraphEdge::drawShape(QPainter& p) +void GraphEdge::drawShape(TQPainter& p) { p.drawPolyline(poly); } -QPointArray GraphEdge::areaPoints() const +TQPointArray GraphEdge::areaPoints() const { int minX = poly[0].x(), minY = poly[0].y(); int maxX = minX, maxY = minY; @@ -109,7 +109,7 @@ QPointArray GraphEdge::areaPoints() const if (poly[i].y() > maxY) maxY = poly[i].y(); if (0) qDebug(" P %d: %d/%d", i, poly[i].x(), poly[i].y()); } - QPointArray a = poly.copy(), b = poly.copy(); + TQPointArray a = poly.copy(), b = poly.copy(); if (minX == maxX) { a.translate(-2, 0); b.translate(2, 0); @@ -137,14 +137,14 @@ int GraphEdge::rtti()const return GRAPHTREE_LINE; } -GraphEdgeArrow::GraphEdgeArrow(GraphEdge*_parent,QCanvas*c) - : QCanvasPolygon(c),_edge(_parent) +GraphEdgeArrow::GraphEdgeArrow(GraphEdge*_tqparent,TQCanvas*c) + : TQCanvasPolygon(c),_edge(_tqparent) { } -void GraphEdgeArrow::drawShape(QPainter&p) +void GraphEdgeArrow::drawShape(TQPainter&p) { - QCanvasPolygon::drawShape(p); + TQCanvasPolygon::drawShape(p); } int GraphEdgeArrow::rtti()const @@ -158,10 +158,10 @@ GraphEdge*GraphEdgeArrow::edge() } /* taken from KCacheGrind project */ -QPixmap*GraphMark::_p=0; +TQPixmap*GraphMark::_p=0; -GraphMark::GraphMark(GraphTreeLabel*n,QCanvas*c) - : QCanvasRectangle(c) +GraphMark::GraphMark(GraphTreeLabel*n,TQCanvas*c) + : TQCanvasRectangle(c) { if (!_p) { @@ -169,27 +169,27 @@ GraphMark::GraphMark(GraphTreeLabel*n,QCanvas*c) float v1 = 130.0, v2 = 10.0, v = v1, f = 1.03; // calculate pix size - QRect r(0, 0, 30, 30); + TQRect r(0, 0, 30, 30); while (v>v2) { r.setRect(r.x()-d, r.y()-d, r.width()+2*d, r.height()+2*d); v /= f; } - _p = new QPixmap(r.size()); - _p->fill(Qt::white); - QPainter p(_p); - p.setPen(Qt::NoPen); + _p = new TQPixmap(r.size()); + _p->fill(TQt::white); + TQPainter p(_p); + p.setPen(TQt::NoPen); r.moveBy(-r.x(), -r.y()); while (v<v1) { v *= f; - p.setBrush(QColor(265-(int)v, 265-(int)v, 265-(int)v)); + p.setBrush(TQColor(265-(int)v, 265-(int)v, 265-(int)v)); - p.drawRect(QRect(r.x(), r.y(), r.width(), d)); - p.drawRect(QRect(r.x(), r.bottom()-d, r.width(), d)); - p.drawRect(QRect(r.x(), r.y()+d, d, r.height()-2*d)); - p.drawRect(QRect(r.right()-d, r.y()+d, d, r.height()-2*d)); + p.drawRect(TQRect(r.x(), r.y(), r.width(), d)); + p.drawRect(TQRect(r.x(), r.bottom()-d, r.width(), d)); + p.drawRect(TQRect(r.x(), r.y()+d, d, r.height()-2*d)); + p.drawRect(TQRect(r.right()-d, r.y()+d, d, r.height()-2*d)); r.setRect(r.x()+d, r.y()+d, r.width()-2*d, r.height()-2*d); } @@ -204,7 +204,7 @@ GraphMark::~ GraphMark() { } -bool GraphMark::hit(const QPoint&)const +bool GraphMark::hit(const TQPoint&)const { return false; } @@ -214,7 +214,7 @@ int GraphMark::rtti()const return GRAPHTREE_MARK; } -void GraphMark::drawShape(QPainter&p) +void GraphMark::drawShape(TQPainter&p) { p.drawPixmap( int(x()), int(y()), *_p ); } |