summaryrefslogtreecommitdiffstats
path: root/kchart/kdchart/KDChartHiLoPainter.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kchart/kdchart/KDChartHiLoPainter.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kchart/kdchart/KDChartHiLoPainter.cpp')
-rw-r--r--kchart/kdchart/KDChartHiLoPainter.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kchart/kdchart/KDChartHiLoPainter.cpp b/kchart/kdchart/KDChartHiLoPainter.cpp
index 6cebb723..bb8b2e39 100644
--- a/kchart/kdchart/KDChartHiLoPainter.cpp
+++ b/kchart/kdchart/KDChartHiLoPainter.cpp
@@ -30,7 +30,7 @@
#include <KDChartParams.h>
#include "KDChartTextPiece.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <stdlib.h>
@@ -49,7 +49,7 @@
KDChartAxesPainter( params )
{
// This constructor intentionally left blank so far; we cannot setup the
- // geometry yet since we do not know the size of the painter.
+ // tqgeometry yet since we do not know the size of the painter.
}
@@ -75,9 +75,9 @@ KDChartHiLoPainter::~KDChartHiLoPainter()
\return the fallback text to use for describing the specified
dataset in the legend
*/
-QString KDChartHiLoPainter::fallbackLegendText( uint dataset ) const
+TQString KDChartHiLoPainter::fallbackLegendText( uint dataset ) const
{
- return QObject::tr( "Value " ) + QString::number( dataset + 1 );
+ return TQObject::tr( "Value " ) + TQString::number( dataset + 1 );
}
@@ -106,8 +106,8 @@ int KDChartHiLoPainter::clipShiftUp( bool, double ) const
return 0;
}
-void KDChartHiLoPainter::specificPaintData( QPainter* painter,
- const QRect& ourClipRect,
+void KDChartHiLoPainter::specificPaintData( TQPainter* painter,
+ const TQRect& ourClipRect,
KDChartTableDataBase* data,
KDChartDataRegionList* /*regions*/,
const KDChartAxisParams* axisPara,
@@ -173,22 +173,22 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
++dataset ) {
// The first and the second col are always high and low; we sort them
// accordingly.
- QVariant valueA;
- QVariant valueB;
+ TQVariant valueA;
+ TQVariant valueB;
if( dataset >= datasetStart &&
dataset <= datasetEnd &&
data->cellCoord( dataset, 0, valueA, 1 ) &&
data->cellCoord( dataset, 1, valueB, 1 ) &&
- QVariant::Double == valueA.type() &&
- QVariant::Double == valueB.type() ){
+ TQVariant::Double == valueA.type() &&
+ TQVariant::Double == valueB.type() ){
const double cellValue1 = valueA.toDouble();
const double cellValue2 = valueB.toDouble();
- const double lowValue = QMIN( cellValue1, cellValue2 );
- const double highValue = QMAX( cellValue1, cellValue2 );
+ const double lowValue = TQMIN( cellValue1, cellValue2 );
+ const double highValue = TQMAX( cellValue1, cellValue2 );
const double lowDrawValue = lowValue * pixelsPerUnit;
const double highDrawValue = highValue * pixelsPerUnit;
- painter->setPen( QPen( params()->dataColor( dataset ),
+ painter->setPen( TQPen( params()->dataColor( dataset ),
nLineWidth ) );
// draw line from low to high
int xpos = static_cast<int>(
@@ -212,7 +212,7 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
if( params()->hiLoChartSubType() == KDChartParams::HiLoOpenClose ) {
// Only do this if there is a value in the third col.
if( data->cellCoord( dataset, 2, valueA, 1 ) &&
- QVariant::Double == valueA.type() ) {
+ TQVariant::Double == valueA.type() ) {
hasOpen = true;
openValue = valueA.toDouble();
openDrawValue = openValue * pixelsPerUnit;
@@ -229,10 +229,10 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
// HiLoOpenClose).
if( ( params()->hiLoChartSubType() == KDChartParams::HiLoClose &&
data->cellCoord( dataset, 2, valueA, 1 ) &&
- QVariant::Double == valueA.type() ) ||
+ TQVariant::Double == valueA.type() ) ||
( params()->hiLoChartSubType() == KDChartParams::HiLoOpenClose &&
data->cellCoord( dataset, 3, valueB, 1 ) &&
- QVariant::Double == valueB.type() ) ) {
+ TQVariant::Double == valueB.type() ) ) {
hasClose = true;
closeValue = ( params()->hiLoChartSubType() == KDChartParams::HiLoClose )
? valueA.toDouble()
@@ -247,14 +247,14 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
// Draw the low value, if requested.
if( params()->hiLoChartPrintLowValues() ) {
// PENDING(kalle) Number formatting?
- QFont theFont( params()->hiLoChartLowValuesFont() );
+ TQFont theFont( params()->hiLoChartLowValuesFont() );
if ( params()->hiLoChartLowValuesUseFontRelSize() ) {
int nTxtHeight =
static_cast < int > ( params()->hiLoChartLowValuesFontRelSize()
* averageValueP1000 );
theFont.setPointSizeFloat( nTxtHeight );
}
- KDChartTextPiece lowText( painter, QString::number( lowValue ),
+ KDChartTextPiece lowText( painter, TQString::number( lowValue ),
theFont );
int width = lowText.width();
int height = lowText.height();
@@ -290,14 +290,14 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
// Draw the high value, if requested.
if( params()->hiLoChartPrintHighValues() ) {
// PENDING(kalle) Number formatting?
- QFont theFont( params()->hiLoChartHighValuesFont() );
+ TQFont theFont( params()->hiLoChartHighValuesFont() );
if ( params()->hiLoChartHighValuesUseFontRelSize() ) {
int nTxtHeight =
static_cast < int > ( params()->hiLoChartHighValuesFontRelSize()
* averageValueP1000 );
theFont.setPointSizeFloat( nTxtHeight );
}
- KDChartTextPiece highText( painter, QString::number( highValue ),
+ KDChartTextPiece highText( painter, TQString::number( highValue ),
theFont );
int width = highText.width();
int height = highText.height();
@@ -332,14 +332,14 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
if( params()->hiLoChartPrintOpenValues() &&
params()->hiLoChartSubType() == KDChartParams::HiLoOpenClose ) {
// PENDING(kalle) Number formatting?
- QFont theFont( params()->hiLoChartOpenValuesFont() );
+ TQFont theFont( params()->hiLoChartOpenValuesFont() );
if ( params()->hiLoChartOpenValuesUseFontRelSize() ) {
int nTxtHeight =
static_cast < int > ( params()->hiLoChartOpenValuesFontRelSize()
* averageValueP1000 );
theFont.setPointSizeFloat( nTxtHeight );
}
- KDChartTextPiece openText( painter, QString::number( openValue ),
+ KDChartTextPiece openText( painter, TQString::number( openValue ),
theFont );
int width = openText.width();
int height = openText.height();
@@ -361,14 +361,14 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
||
params()->hiLoChartSubType() == KDChartParams::HiLoClose ) ) {
// PENDING(kalle) Number formatting?
- QFont theFont( params()->hiLoChartCloseValuesFont() );
+ TQFont theFont( params()->hiLoChartCloseValuesFont() );
if ( params()->hiLoChartCloseValuesUseFontRelSize() ) {
int nTxtHeight =
static_cast < int > ( params()->hiLoChartCloseValuesFontRelSize()
* averageValueP1000 );
theFont.setPointSizeFloat( nTxtHeight );
}
- KDChartTextPiece closeText( painter, QString::number( closeValue ),
+ KDChartTextPiece closeText( painter, TQString::number( closeValue ),
theFont );
//int width = closeText.width();
int height = closeText.height();