summaryrefslogtreecommitdiffstats
path: root/kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp')
-rw-r--r--kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp b/kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp
index 9afe2f9e..71910eff 100644
--- a/kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp
+++ b/kivio/kiviopart/kiviosdk/kiviopolylineconnector.cpp
@@ -79,10 +79,10 @@ namespace Kivio {
return connector;
}
- bool PolyLineConnector::loadCustom(const QDomElement& e)
+ bool PolyLineConnector::loadCustom(const TQDomElement& e)
{
- QDomNode node = e.firstChild();
- QString nodeName;
+ TQDomNode node = e.firstChild();
+ TQString nodeName;
m_points.clear();
while(!node.isNull()) {
@@ -91,8 +91,8 @@ namespace Kivio {
if(nodeName == "KivioArrowHeads") {
loadArrowHeads(node.toElement());
} else if(nodeName == "KivioGeometryPoints") {
- QDomNode pointsNode = node.firstChild();
- QDomElement el;
+ TQDomNode pointsNode = node.firstChild();
+ TQDomElement el;
while(!pointsNode.isNull()) {
if(pointsNode.nodeName() == "KivioPoint") {
@@ -113,14 +113,14 @@ namespace Kivio {
return true;
}
- bool PolyLineConnector::saveCustom(QDomElement& e, QDomDocument& doc)
+ bool PolyLineConnector::saveCustom(TQDomElement& e, TQDomDocument& doc)
{
e.appendChild(saveArrowHeads(doc));
- QDomElement pointsElement = doc.createElement("KivioGeometryPoints");
+ TQDomElement pointsElement = doc.createElement("KivioGeometryPoints");
- for(QValueList<KoPoint>::iterator it = m_points.begin(); it != m_points.end(); ++it) {
+ for(TQValueList<KoPoint>::iterator it = m_points.begin(); it != m_points.end(); ++it) {
KoPoint p = (*it);
- QDomElement el = doc.createElement("KivioPoint");
+ TQDomElement el = doc.createElement("KivioPoint");
XmlWriteFloat(el, "x", p.x());
XmlWriteFloat(el, "y", p.y());
pointsElement.appendChild(el);
@@ -182,8 +182,8 @@ namespace Kivio {
painter->setLineStyle(m_pLineStyle);
painter->setLineWidth(zoom->zoomItY(m_pLineStyle->width()));
- QPointArray pa(m_points.count());
- QValueList<KoPoint>::iterator it;
+ TQPointArray pa(m_points.count());
+ TQValueList<KoPoint>::iterator it;
int i = 0;
for(it = m_points.begin(); it != m_points.end(); ++it) {
@@ -199,17 +199,17 @@ namespace Kivio {
if(startLen) {
startVec.setX(startVec.x() / startLen);
startVec.setY(startVec.y() / startLen);
- QPoint p = pa[0];
- p.setX(p.x() + qRound(startVec.x() * zoom->zoomItX(m_startArrow->cut())));
- p.setY(p.y() + qRound(startVec.y() * zoom->zoomItY(m_startArrow->cut())));
+ TQPoint p = pa[0];
+ p.setX(p.x() + tqRound(startVec.x() * zoom->zoomItX(m_startArrow->cut())));
+ p.setY(p.y() + tqRound(startVec.y() * zoom->zoomItY(m_startArrow->cut())));
}
if(endLen) {
endVec.setX(endVec.x() / endLen);
endVec.setY(endVec.y() / endLen);
- QPoint p = pa[m_points.count() - 1];
- p.setX(p.x() + qRound(endVec.x() * zoom->zoomItX(m_endArrow->cut())));
- p.setY(p.y() + qRound(endVec.y() * zoom->zoomItY(m_endArrow->cut())));
+ TQPoint p = pa[m_points.count() - 1];
+ p.setX(p.x() + tqRound(endVec.x() * zoom->zoomItX(m_endArrow->cut())));
+ p.setY(p.y() + tqRound(endVec.y() * zoom->zoomItY(m_endArrow->cut())));
}
painter->drawPolyline(pa);
@@ -233,7 +233,7 @@ namespace Kivio {
{
KivioPainter* painter = data->painter;
KoZoomHandler* zoomHandler = data->zoomHandler;
- QValueList<KoPoint>::Iterator it;
+ TQValueList<KoPoint>::Iterator it;
int x, y, flag;
x = y = flag = 0;
@@ -384,15 +384,15 @@ namespace Kivio {
{
KoPoint p = m_points.first();
KoPoint topLeft(p.x(), p.y()), bottomRight;
- QValueList<KoPoint>::iterator it;
- QValueList<KoPoint>::iterator itEnd = m_points.end();
+ TQValueList<KoPoint>::iterator it;
+ TQValueList<KoPoint>::iterator itEnd = m_points.end();
for(it = m_points.begin(); it != itEnd; ++it) {
p = (*it);
- topLeft.setX(QMIN(p.x(), topLeft.x()));
- topLeft.setY(QMIN(p.y(), topLeft.y()));
- bottomRight.setX(QMAX(p.x(), bottomRight.x()));
- bottomRight.setY(QMAX(p.y(), bottomRight.y()));
+ topLeft.setX(TQMIN(p.x(), topLeft.x()));
+ topLeft.setY(TQMIN(p.y(), topLeft.y()));
+ bottomRight.setX(TQMAX(p.x(), bottomRight.x()));
+ bottomRight.setY(TQMAX(p.y(), bottomRight.y()));
}
KoRect rect;
@@ -404,20 +404,20 @@ namespace Kivio {
bool PolyLineConnector::isInRect(const KoRect& rect)
{
- QValueList<KoPoint>::Iterator it;
+ TQValueList<KoPoint>::Iterator it;
bool retVal = true;
for(it = m_points.begin(); it != m_points.end(); ++it) {
- retVal = retVal && rect.contains((*it));
+ retVal = retVal && rect.tqcontains((*it));
}
return retVal;
}
- bool PolyLineConnector::loadArrowHeads(const QDomElement& e)
+ bool PolyLineConnector::loadArrowHeads(const TQDomElement& e)
{
bool first = true;
- QDomNode node = e.firstChild();
+ TQDomNode node = e.firstChild();
while(!node.isNull()) {
if(node.nodeName() == "KivioArrowHead") {
@@ -435,9 +435,9 @@ namespace Kivio {
return true;
}
- QDomElement PolyLineConnector::saveArrowHeads(QDomDocument& doc)
+ TQDomElement PolyLineConnector::saveArrowHeads(TQDomDocument& doc)
{
- QDomElement e = doc.createElement("KivioArrowHeads");
+ TQDomElement e = doc.createElement("KivioArrowHeads");
e.appendChild( m_startArrow->saveXML(doc) );
e.appendChild( m_endArrow->saveXML(doc) );