summaryrefslogtreecommitdiffstats
path: root/ksvg/impl/SVGLengthImpl.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-02 19:23:46 +0000
commiteba47f8f0637f451e21348187591e1f1fd58ac74 (patch)
tree448f10b95c656604acc331a3236c1e59bde5c1ad /ksvg/impl/SVGLengthImpl.cc
parentc7e8736c69373f48b0401319757c742e8607431a (diff)
downloadtdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.tar.gz
tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.zip
TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksvg/impl/SVGLengthImpl.cc')
-rw-r--r--ksvg/impl/SVGLengthImpl.cc28
1 files changed, 14 insertions, 14 deletions
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 <kdebug.h>
-#include <qfont.h>
-#include <qregexp.h>
-#include <qwidget.h>
-#include <qpaintdevicemetrics.h>
+#include <tqfont.h>
+#include <tqregexp.h>
+#include <tqwidget.h>
+#include <tqpaintdevicemetrics.h>
#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<int>(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 <svg width="100%"> 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();