summaryrefslogtreecommitdiffstats
path: root/kalzium/src/kalziumutils.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
commit0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch)
tree2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /kalzium/src/kalziumutils.cpp
parent83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff)
downloadtdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz
tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalzium/src/kalziumutils.cpp')
-rw-r--r--kalzium/src/kalziumutils.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/kalzium/src/kalziumutils.cpp b/kalzium/src/kalziumutils.cpp
index 2e4dd127..1522e495 100644
--- a/kalzium/src/kalziumutils.cpp
+++ b/kalzium/src/kalziumutils.cpp
@@ -15,27 +15,27 @@
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qfont.h>
-#include <qrect.h>
-#include <qpainter.h>
-#include <qglobal.h>
+#include <tqfont.h>
+#include <tqrect.h>
+#include <tqpainter.h>
+#include <tqglobal.h>
#include <math.h>
#if defined(Q_OS_SOLARIS)
#include <ieeefp.h>
#endif
-int KalziumUtils::maxSize( const QString& string, const QRect& rect, QFont font, QPainter* p, int minFontSize, int maxFontSize )
+int KalziumUtils::maxSize( const TQString& string, const TQRect& rect, TQFont font, TQPainter* p, int minFontSize, int maxFontSize )
{
bool goodSizeFound = false;
int size = maxFontSize;
- QRect r;
+ TQRect r;
do
{
font.setPointSize( size );
p->setFont( font );
- r = p->boundingRect( QRect(), Qt::AlignAuto, string );
+ r = p->boundingRect( TQRect(), Qt::AlignAuto, string );
r.moveBy( rect.left(), rect.top() );
if ( rect.contains( r ) )
@@ -48,14 +48,14 @@ int KalziumUtils::maxSize( const QString& string, const QRect& rect, QFont font,
return size;
}
-int KalziumUtils::StringHeight( const QString& string, const QFont& font, QPainter* p )
+int KalziumUtils::StringHeight( const TQString& string, const TQFont& font, TQPainter* p )
{
- return p->boundingRect( QRect(), Qt::AlignAuto, string ).height();
+ return p->boundingRect( TQRect(), Qt::AlignAuto, string ).height();
}
-int KalziumUtils::StringWidth( const QString& string, const QFont& font, QPainter* p )
+int KalziumUtils::StringWidth( const TQString& string, const TQFont& font, TQPainter* p )
{
- return p->boundingRect( QRect(), Qt::AlignAuto, string ).width();
+ return p->boundingRect( TQRect(), Qt::AlignAuto, string ).width();
}
double KalziumUtils::strippedValue( double num )
@@ -74,9 +74,9 @@ double KalziumUtils::strippedValue( double num )
return num * power / 10000;
}
-QString KalziumUtils::localizedValue( double val, int precision, unsigned long options )
+TQString KalziumUtils::localizedValue( double val, int precision, unsigned long options )
{
- QString str = KGlobal::locale()->formatNumber( val, precision );
+ TQString str = KGlobal::locale()->formatNumber( val, precision );
while( str.endsWith("0") )
str.truncate( str.length()-1);
if ( str.endsWith( KGlobal::locale()->decimalSymbol() ) )