From eba47f8f0637f451e21348187591e1f1fd58ac74 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 2 Aug 2010 19:23:46 +0000 Subject: TQt conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksvg/impl/SVGLengthImpl.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'ksvg/impl/SVGLengthImpl.cc') diff --git a/ksvg/impl/SVGLengthImpl.cc b/ksvg/impl/SVGLengthImpl.cc index 46529022..a8c9080c 100644 --- a/ksvg/impl/SVGLengthImpl.cc +++ b/ksvg/impl/SVGLengthImpl.cc @@ -20,10 +20,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "SVGLength.h" @@ -48,7 +48,7 @@ using namespace KSVG; #include "ksvg_cacheimpl.h" // keep track of textual description of the unit type -QString UnitText[] = +TQString UnitText[] = { "", "", "%", "em", "ex", "px", "cm", "mm", "in", "pt", "pc" }; @@ -153,7 +153,7 @@ void SVGLengthImpl::setValueAsString(const DOM::DOMString &valueAsString) DOM::DOMString SVGLengthImpl::valueAsString() const { - DOM::DOMString valueAsString = QString::number(m_valueInSpecifiedUnits); + DOM::DOMString valueAsString = TQString::number(m_valueInSpecifiedUnits); valueAsString += UnitText[m_unitType]; return valueAsString; } @@ -209,7 +209,7 @@ bool SVGLengthImpl::getValFromPx() return true; } -void SVGLengthImpl::convertStringToPx(QString s) +void SVGLengthImpl::convertStringToPx(TQString s) { if(s.isEmpty()) return; @@ -289,7 +289,7 @@ void SVGLengthImpl::convertNumToPx() // Look up font-size in a SAFE way, because at this place // processStyle() has NOT yet been called, so we need // a different solution (Niko) - QString useFont = "Arial"; + TQString useFont = "Arial"; double useSize = 12; if(sizeLocal) @@ -307,10 +307,10 @@ void SVGLengthImpl::convertNumToPx() else { // Easiest way, use qfont (Niko) - QFont font(useFont); + TQFont font(useFont); font.setPixelSize(static_cast(useSize)); - QFontMetrics fm(font); + TQFontMetrics fm(font); m_value = m_valueInSpecifiedUnits * fm.boundingRect('x').height(); } } @@ -318,7 +318,7 @@ void SVGLengthImpl::convertNumToPx() }; } -void SVGLengthImpl::convertPercentageToFloat(const QString &perc, float &result) +void SVGLengthImpl::convertPercentageToFloat(const TQString &perc, float &result) { // TODO : more error checking ? if(perc.endsWith("%")) @@ -327,12 +327,12 @@ void SVGLengthImpl::convertPercentageToFloat(const QString &perc, float &result) result = perc.toFloat(); } -QString SVGLengthImpl::convertValToPercentage(const QString &val, float benchmark) +TQString SVGLengthImpl::convertValToPercentage(const TQString &val, float benchmark) { if(val.endsWith("%")) return val; - QString result; + TQString result; float temp = val.toFloat(); temp = (temp / benchmark) * 100.0; @@ -388,7 +388,7 @@ float SVGLengthImpl::percentageOfViewport() if(!m_context->ownerDoc()->canvas()) // Happens when parsing with printnodetest return 0.0; - QPaintDeviceMetrics metrics(m_context->ownerDoc()->canvas()->drawWindow()); + TQPaintDeviceMetrics metrics(m_context->ownerDoc()->canvas()->drawWindow()); if(m_mode == LENGTHMODE_WIDTH) return value * metrics.width(); -- cgit v1.2.1