summaryrefslogtreecommitdiffstats
path: root/ksvg/impl/SVGSVGElementImpl.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /ksvg/impl/SVGSVGElementImpl.cc
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksvg/impl/SVGSVGElementImpl.cc')
-rw-r--r--ksvg/impl/SVGSVGElementImpl.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/ksvg/impl/SVGSVGElementImpl.cc b/ksvg/impl/SVGSVGElementImpl.cc
index c9b82445..b436ee73 100644
--- a/ksvg/impl/SVGSVGElementImpl.cc
+++ b/ksvg/impl/SVGSVGElementImpl.cc
@@ -166,7 +166,7 @@ void SVGSVGElementImpl::setAttributes()
m_viewport->setWidth(width()->baseVal()->value());
m_viewport->setHeight(height()->baseVal()->value());
- if(isRootElement() && ownerDoc()->parentImage() == 0)
+ if(isRootElement() && ownerDoc()->tqparentImage() == 0)
{
if(ownerDoc()->canvas())
ownerDoc()->canvas()->setViewportDimension(int(ceil(width()->baseVal()->value() * currentScale())), int(ceil(height()->baseVal()->value() * currentScale())));
@@ -271,7 +271,7 @@ void SVGSVGElementImpl::setCurrentScale(float currentScale)
if( m_currentScale != currentScale )
{
m_currentScale = currentScale;
- invalidateCachedMatrices();
+ tqinvalidateCachedMatrices();
if(hasEventListener(SVGEvent::ZOOM_EVENT, true))
dispatchEvent(SVGEvent::ZOOM_EVENT, false, false);
@@ -289,7 +289,7 @@ void SVGSVGElementImpl::setCurrentTranslate(const TQPoint &p)
{
m_currentTranslate->setX(p.x());
m_currentTranslate->setY(p.y());
- invalidateCachedMatrices();
+ tqinvalidateCachedMatrices();
if(hasEventListener(SVGEvent::SCROLL_EVENT, true))
dispatchEvent(SVGEvent::SCROLL_EVENT, false, false);
}
@@ -372,18 +372,18 @@ DOM::NodeList SVGSVGElementImpl::getEnclosureList(SVGRectImpl *rect, SVGElementI
for(; !node.isNull(); node = node.nextSibling())
{
SVGElementImpl *element = ownerDoc()->getElementFromHandle(node.handle());
- SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
- if(shape)
+ SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element);
+ if(tqshape)
{
- if(shape->isContainer())
+ if(tqshape->isContainer())
// TODO : pass it on to container::getEnclosureList() which should return a NodeList
- kdDebug() << "!shape" << endl;
+ kdDebug() << "!tqshape" << endl;
else
{
- // TODO : add the shape to list if the test succeeds
- SVGRectImpl *current = shape->getBBox();
- if(rect->qrect().contains(current->qrect(), true))
- kdDebug() << "shape : " << element->nodeName().string() << " is fully enclosed" << endl;
+ // TODO : add the tqshape to list if the test succeeds
+ SVGRectImpl *current = tqshape->getBBox();
+ if(rect->qrect().tqcontains(current->qrect(), true))
+ kdDebug() << "tqshape : " << element->nodeName().string() << " is fully enclosed" << endl;
current->deref();
}
@@ -395,11 +395,11 @@ DOM::NodeList SVGSVGElementImpl::getEnclosureList(SVGRectImpl *rect, SVGElementI
bool SVGSVGElementImpl::checkIntersection(SVGElementImpl *element, SVGRectImpl *rect)
{
- SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
- if(!shape)
+ SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element);
+ if(!tqshape)
return false;
- SVGRectImpl *current = shape->getBBox();
+ SVGRectImpl *current = tqshape->getBBox();
bool result = rect->qrect().intersects(current->qrect());
current->deref();
return result;
@@ -407,12 +407,12 @@ bool SVGSVGElementImpl::checkIntersection(SVGElementImpl *element, SVGRectImpl *
bool SVGSVGElementImpl::checkEnclosure(SVGElementImpl *element, SVGRectImpl *rect)
{
- SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
- if(!shape)
+ SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element);
+ if(!tqshape)
return false;
- SVGRectImpl *current = shape->getBBox();
- bool result = rect->qrect().contains(current->qrect());
+ SVGRectImpl *current = tqshape->getBBox();
+ bool result = rect->qrect().tqcontains(current->qrect());
current->deref();
return result;
}
@@ -672,7 +672,7 @@ bool SVGSVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SV
elem = (*it)->element();
if(elem)
{
- // Check if mouse is over a certain shape...
+ // Check if mouse is over a certain tqshape...
// mop: once an element has been found check eventlisteners and leave immediately
ret = elem->prepareMouseEvent(p, userA, mev);
if(ret) break;
@@ -693,7 +693,7 @@ bool SVGSVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SV
dorerender = true; // mop: if it has the event then rerender
}
- // If a mouse "moves" over a shape, it's also "over" the shape
+ // If a mouse "moves" over a tqshape, it's also "over" the tqshape
if(mev->id() == SVGEvent::MOUSEMOVE_EVENT)
{
mev->target()->setMouseOver(true);
@@ -742,7 +742,7 @@ bool SVGSVGElementImpl::prepareMouseEvent(const TQPoint &p, const TQPoint &a, SV
}
}
- // The mouse is over a shape, so we have a target..we need to register that for a mouseout
+ // The mouse is over a tqshape, so we have a target..we need to register that for a mouseout
ownerDoc()->setLastTarget(mev->target());
}