summaryrefslogtreecommitdiffstats
path: root/libkdchart/KDChartAxesPainter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdchart/KDChartAxesPainter.cpp')
-rw-r--r--libkdchart/KDChartAxesPainter.cpp788
1 files changed, 394 insertions, 394 deletions
diff --git a/libkdchart/KDChartAxesPainter.cpp b/libkdchart/KDChartAxesPainter.cpp
index 68e70af..4c592ea 100644
--- a/libkdchart/KDChartAxesPainter.cpp
+++ b/libkdchart/KDChartAxesPainter.cpp
@@ -26,8 +26,8 @@
** licensing are not clear to you.
**
**********************************************************************/
-#include <qpainter.h>
-#include <qlabel.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
#include <KDDrawText.h>
#include "KDChartAxesPainter.h"
@@ -42,9 +42,9 @@
between UTC start date 1970/01/01 00:00 and a given date \c dt.
The return value is negative for \c dt < 1970/01/01.
*/
-int secondsSinceUTCStart( const QDateTime& dt )
+int secondsSinceUTCStart( const TQDateTime& dt )
{
- QDateTime dtStart( QDate( 1970, 1, 1 ) );
+ TQDateTime dtStart( TQDate( 1970, 1, 1 ) );
return dtStart.secsTo( dt );
}
@@ -65,7 +65,7 @@ int secondsSinceUTCStart( const QDateTime& dt )
KDChartPainter( params )
{
// Intentionally left blank.
- // We cannot setup the geometry yet
+ // We cannot setup the tqgeometry yet
// since we do not know the size of the painter.
}
@@ -78,32 +78,32 @@ KDChartAxesPainter::~KDChartAxesPainter()
}
-#if COMPAT_QT_VERSION < 0x030000
-QDateTime dateTimeFromString( const QString& s ) // only ISODate is allowed
+#if COMPAT_TQT_VERSION < 0x030000
+TQDateTime dateTimeFromString( const TQString& s ) // only ISODate is allowed
{
int year( s.mid( 0, 4 ).toInt() );
int month( s.mid( 5, 2 ).toInt() );
int day( s.mid( 8, 2 ).toInt() );
- QString t( s.mid( 11 ) );
+ TQString t( s.mid( 11 ) );
int hour( t.mid( 0, 2 ).toInt() );
int minute( t.mid( 3, 2 ).toInt() );
int second( t.mid( 6, 2 ).toInt() );
int msec( t.mid( 9, 3 ).toInt() );
if ( year && month && day )
- return QDateTime( QDate( year, month, day ),
- QTime( hour, minute, second, msec ) );
+ return TQDateTime( TQDate( year, month, day ),
+ TQTime( hour, minute, second, msec ) );
else
- return QDateTime();
+ return TQDateTime();
}
-QString dateTimeToString( const QDateTime& dt ) // ISODate is returned
+TQString dateTimeToString( const TQDateTime& dt ) // ISODate is returned
{
- QString date;
- QString month(
- QString::number( dt.date().month() ).rightJustify( 2, '0' ) );
- QString day(
- QString::number( dt.date().day() ).rightJustify( 2, '0' ) );
- date = QString::number( dt.date().year() ) + "-" + month + "-" + day;
- QString time;
+ TQString date;
+ TQString month(
+ TQString::number( dt.date().month() ).rightJustify( 2, '0' ) );
+ TQString day(
+ TQString::number( dt.date().day() ).rightJustify( 2, '0' ) );
+ date = TQString::number( dt.date().year() ) + "-" + month + "-" + day;
+ TQString time;
time.sprintf( "%.2d:%.2d:%.2d",
dt.time().hour(), dt.time().minute(), dt.time().second() );
return date + "T" + time;
@@ -117,7 +117,7 @@ QString dateTimeToString( const QDateTime& dt ) // ISODate is returned
This is necessary to build isometric axes.
*/
void reCalculateLabelTexts(
- QPainter* painter,
+ TQPainter* painter,
const KDChartTableDataBase& data,
const KDChartParams& params,
uint axisNumber,
@@ -166,14 +166,14 @@ void reCalculateLabelTexts(
bool KDChartAxesPainter::calculateAllAxesLabelTextsAndCalcValues(
- QPainter* painter,
+ TQPainter* painter,
KDChartTableDataBase* data,
double areaWidthP1000,
double areaHeightP1000,
double& delimLen)
{
uint iAxis;
- double averageValueP1000 = QMIN(areaWidthP1000, areaHeightP1000);//( areaWidthP1000 + areaHeightP1000 ) / 2.0;
+ double averageValueP1000 = TQMIN(areaWidthP1000, areaHeightP1000);//( areaWidthP1000 + areaHeightP1000 ) / 2.0;
//qDebug("KChart::KDChartAxesPainter::calculateAllAxesLabelTextsAndCalcValues() averageValueP1000: %f", averageValueP1000);
// length of little delimiter-marks indicating axis scaling
delimLen = 20.0 * averageValueP1000; // per mille of area
@@ -195,7 +195,7 @@ bool KDChartAxesPainter::calculateAllAxesLabelTextsAndCalcValues(
cv.pTextsY = 0.0;
cv.pTextsW = 0.0;
cv.pTextsH = 0.0;
- cv.textAlign = Qt::AlignHCenter | Qt::AlignVCenter;
+ cv.textAlign = TQt::AlignHCenter | TQt::AlignVCenter;
cv.isDateTime = false;
cv.autoDtLabels = false;
calculateLabelTexts( painter,
@@ -362,10 +362,10 @@ bool KDChartAxesPainter::calculateAllAxesLabelTextsAndCalcValues(
/**
Paints the actual axes areas.
- \param painter the QPainter onto which the chart should be painted
+ \param painter the TQPainter onto which the chart should be painted
\param data the data that will be displayed as a chart
*/
-void KDChartAxesPainter::paintAxes( QPainter* painter,
+void KDChartAxesPainter::paintAxes( TQPainter* painter,
KDChartTableDataBase* data )
{
if ( !painter || !data || 0 == params() )
@@ -376,7 +376,7 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
double areaWidthP1000 = _logicalWidth / 1000.0;
double areaHeightP1000 = _logicalHeight / 1000.0;
- double averageValueP1000 = QMIN(areaWidthP1000, areaHeightP1000);//( areaWidthP1000 + areaHeightP1000 ) / 2.0;
+ double averageValueP1000 = TQMIN(areaWidthP1000, areaHeightP1000);//( areaWidthP1000 + areaHeightP1000 ) / 2.0;
// length of little delimiter-marks indicating axis scaling
double delimLen;
@@ -387,7 +387,7 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
// Now the labels are known, so let us paint the axes...
painter->save();
- painter->setPen( Qt::NoPen );
+ painter->setPen( TQt::NoPen );
bool screenOutput = params()->optimizeOutputForScreen();
uint iAxis;
@@ -400,10 +400,10 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
internal__KDChart__CalcValues& cv = calcVal[iAxis];
- const QColor labelsColor( para.axisLabelsColor() );
+ const TQColor labelsColor( para.axisLabelsColor() );
// Debugging axis areas:
- //painter->fillRect(para.axisTrueAreaRect(), Qt::yellow);
+ //painter->fillRect(para.axisTrueAreaRect(), TQt::yellow);
uint lineWidth = 0 <= para.axisLineWidth()
? para.axisLineWidth()
@@ -489,20 +489,20 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
= (KDChartAxisParams::AxisPosBottom == cv.basicPos) ||
(KDChartAxisParams::AxisPosTop == cv.basicPos);
- QStringList* labelTexts = ( QStringList* ) para.axisLabelTexts();
+ TQStringList* labelTexts = ( TQStringList* ) para.axisLabelTexts();
uint nLabels = ( 0 != labelTexts )
? labelTexts->count()
: 0;
// start point of 1st delimiter on the axis-line == grid-start
- QPoint p1( cv.orig );
+ TQPoint p1( cv.orig );
// end point of 1st delimiter near the label text
- QPoint p2( cv.orig );
+ TQPoint p2( cv.orig );
// end point of small sub-delimiter
- QPoint p2a( cv.orig );
+ TQPoint p2a( cv.orig );
// start point of 1st grid-line (beginnig at the axis)
- QPoint pGA( cv.orig );
+ TQPoint pGA( cv.orig );
// end point of 1st grid-line at the other side of the chart
- QPoint pGZ( cv.orig );
+ TQPoint pGZ( cv.orig );
// start point of zero-line, this is often identical with p1
// but will be different in case of shifted zero-line
double axisZeroLineStartX = p1.x();
@@ -530,39 +530,39 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
const double pYDelta = cv.pYDeltaFactor * cv.pDelimDelta;
// draw label texts and delimiters and grid
- painter->setPen( QPen( para.axisLineColor(),
+ painter->setPen( TQPen( para.axisLineColor(),
lineWidth ) );
- const QString formatDT = cv.isDateTime
+ const TQString formatDT = cv.isDateTime
? para.axisLabelsDateTimeFormat()
- : QString();
+ : TQString();
// calculate font size
const double minTextHeight = para.axisLabelsFontMinSize();
//qDebug("KChart::KDChartAxesPainter::paintAxes() cv.nTxtHeight: %f minTextHeight: %f", cv.nTxtHeight, minTextHeight);
if ( minTextHeight > cv.nTxtHeight )
cv.nTxtHeight = minTextHeight;
- QFont actFont( para.axisLabelsFont() );
+ TQFont actFont( para.axisLabelsFont() );
if ( para.axisLabelsFontUseRelSize() ) {
actFont.setPixelSize( static_cast < int > ( cv.nTxtHeight ) );
}
painter->setFont( actFont );
- QFontMetrics fm( painter->fontMetrics() );
+ TQFontMetrics fm( painter->fontMetrics() );
int nLeaveOut = 0;
int nRotation = 0;
// Draw simple string labels
// or calculate and draw nice Date/Time ruler?
- QString commonDtHeader;
+ TQString commonDtHeader;
if( cv.autoDtLabels ){
- cv.textAlign = Qt::AlignCenter;
+ cv.textAlign = TQt::AlignCenter;
//qDebug(dtLow.toString("\nd.MM.yyyy - h:mm:ss" ));
//qDebug(dtHigh.toString( "d.MM.yyyy - h:mm:ss" ));
- const QDate& dLow = cv.dtLow.date();
- const QTime& tLow = cv.dtLow.time();
- const QDate& dHigh = cv.dtHigh.date();
- const QTime& tHigh = cv.dtHigh.time();
+ const TQDate& dLow = cv.dtLow.date();
+ const TQTime& tLow = cv.dtLow.time();
+ const TQDate& dHigh = cv.dtHigh.date();
+ const TQTime& tHigh = cv.dtHigh.time();
bool sameYear = dLow.year() == dHigh.year();
bool sameMonth = sameYear && (dLow.month() == dHigh.month() );
bool sameDay = sameMonth && (dLow.day() == dHigh.day() );
@@ -570,28 +570,28 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
bool sameMinute = sameHour && (tLow.minute() == tHigh.minute());
bool sameSecond = sameMinute && (tLow.second() == tHigh.second());
if( sameDay ){
- commonDtHeader = QString::number( dLow.day() )
+ commonDtHeader = TQString::number( dLow.day() )
+ ". "
-#if COMPAT_QT_VERSION >= 0x030000
- + QDate::longMonthName( dLow.month() )
+#if COMPAT_TQT_VERSION >= 0x030000
+ + TQDate::longMonthName( dLow.month() )
#else
+ dLow.monthName( dLow.month() )
#endif
+ ' '
- + QString::number( dLow.year() );
+ + TQString::number( dLow.year() );
if( sameHour ){
commonDtHeader += " / "
- + QString::number( tLow.hour() )
+ + TQString::number( tLow.hour() )
+ ':';
if( sameMinute ){
if( 10 > tLow.minute() )
commonDtHeader += '0';
- commonDtHeader += QString::number( tLow.minute() )
+ commonDtHeader += TQString::number( tLow.minute() )
+ ':';
if( sameSecond ){
if( 10 > tLow.second() )
commonDtHeader += '0';
- commonDtHeader += QString::number( tLow.second() );
+ commonDtHeader += TQString::number( tLow.second() );
//
// " Huston, we have a problem! "
//
@@ -609,22 +609,22 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
commonDtHeader += "00";
}
}else if( sameMonth )
-#if COMPAT_QT_VERSION >= 0x030000
- commonDtHeader = QDate::longMonthName( dLow.month() )
+#if COMPAT_TQT_VERSION >= 0x030000
+ commonDtHeader = TQDate::longMonthName( dLow.month() )
#else
commonDtHeader = dLow.monthName( dLow.month() )
#endif
+ ' '
- + QString::number( dLow.year() );
+ + TQString::number( dLow.year() );
else if( sameYear )
- commonDtHeader = QString::number( dLow.year() );
+ commonDtHeader = TQString::number( dLow.year() );
//if( !commonDtHeader.isEmpty() )
// qDebug(commonDtHeader);
}else{
// make sure all label texts fit into their space
// by rotating and/or shrinking the texts
// or by leaving out some of the labels
- QRegion unitedRegions;
+ TQRegion unitedRegions;
const bool tryLeavingOut =
( para.axisValueLeaveOut() == KDCHART_AXIS_LABELS_AUTO_LEAVEOUT )
@@ -661,14 +661,14 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
textsOverlapping = false;
textsMatching = true;
// test if all texts match without mutually overlapping
- unitedRegions = QRegion();
+ unitedRegions = TQRegion();
int align = nRotation
- ? (Qt::AlignRight | Qt::AlignVCenter) // adjusting for rotation
+ ? (TQt::AlignRight | TQt::AlignVCenter) // adjusting for rotation
: cv.textAlign;
- QPoint anchor(200,200);
+ TQPoint anchor(200,200);
int iLeaveOut = 0;
double iLabel=0.0;
- for ( QStringList::Iterator it = labelTexts->begin();
+ for ( TQStringList::Iterator it = labelTexts->begin();
it != labelTexts->end();
++it ) {
iLabel += 1.0;
@@ -680,16 +680,16 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
anchor.setY( p2.y() + static_cast < int > ( pYDelta * (iLabel - 0.5) ) );
// allow for shearing and/or scaling of the painter
- anchor = painter->worldMatrix().map( anchor );
+ anchor = painter->tqworldMatrix().map( anchor );
- QString text;
+ TQString text;
if( cv.isDateTime ){
-#if COMPAT_QT_VERSION >= 0x030000
- QDateTime dt( QDateTime::fromString( *it,
+#if COMPAT_TQT_VERSION >= 0x030000
+ TQDateTime dt( TQDateTime::fromString( *it,
Qt::ISODate ) );
text = dt.toString( formatDT );
#else
- QDateTime dt( dateTimeFromString( *it ) );
+ TQDateTime dt( dateTimeFromString( *it ) );
text = dt.toString();
#endif
}else{
@@ -713,15 +713,15 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
//qDebug("too wide");
}
//qDebug("nRotation: %i",nRotation);
- QRegion sectReg;
+ TQRegion sectReg;
if( nRotation ){
//qDebug("test 1");
sectReg = infosKDD.region.intersect( unitedRegions );
}else{
//qDebug("test 2");
- QRect rect( infosKDD.region.boundingRect() );
+ TQRect rect( infosKDD.region.boundingRect() );
rect.addCoords(-2,-2,2,2);
- QRegion biggerRegion( rect );
+ TQRegion biggerRegion( rect );
sectReg = biggerRegion.intersect( unitedRegions );
}
if ( sectReg.isEmpty() )
@@ -737,8 +737,8 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
/*
if(!iAxis){
- qDebug("nTxtHeight: "+QString::number(cv.nTxtHeight)+" nRotation: "+QString::number(nRotation)+
- " matching: "+QString(textsMatching ? "TRUE":"FALSE"));
+ qDebug("nTxtHeight: "+TQString::number(cv.nTxtHeight)+" nRotation: "+TQString::number(nRotation)+
+ " matching: "+TQString(textsMatching ? "TRUE":"FALSE"));
qDebug("nUsableAxisHeight: %f, unitedRegions.boundingRect().height(): %i ",
nUsableAxisHeight, unitedRegions.boundingRect().height());
}
@@ -760,7 +760,7 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
/*
if(textsMatching && !iAxis){
qDebug("--------------------------");
- qDebug("nTxtHeight: "+QString::number(cv.nTxtHeight)+" nRotation: "+QString::number(nRotation));
+ qDebug("nTxtHeight: "+TQString::number(cv.nTxtHeight)+" nRotation: "+TQString::number(nRotation));
qDebug("matching");
}
*/
@@ -849,12 +849,12 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
// The following is designed for horizontal axes
// since we currently don't support label rotating
// on vertical axes. (khz, 2002/08/15)
- //int oldVert = textAlign & (Qt::AlignTop | Qt::AlignBottom);
+ //int oldVert = textAlign & (TQt::AlignTop | TQt::AlignBottom);
//int steepness = abs(270-nRotation);
//bool steep = (30 > steepness);
- cv.textAlign = Qt::AlignRight | Qt::AlignVCenter; // adjusting for rotation
- //cv.textAlign = Qt::AlignRight | Qt::AlignVCenter;
- /* ( steep ? Qt::AlignVCenter : oldVert);*/
+ cv.textAlign = TQt::AlignRight | TQt::AlignVCenter; // adjusting for rotation
+ //cv.textAlign = TQt::AlignRight | TQt::AlignVCenter;
+ /* ( steep ? TQt::AlignVCenter : oldVert);*/
//int dx = pXDelta / 2 - steep ? (nTxtHeight / 4) : 0;
double dx = (pXDelta / 2) - (cv.nTxtHeight / 4);
double dy = /*steep ? 0 : */(cv.nTxtHeight / 2.0);
@@ -862,26 +862,26 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
cv.pTextsY += dy;
}
/*
- QBrush oldBrush = painter->brush();
- QRegion oldReg = painter->clipRegion();//QPainter::CoordPainter);
- painter->setBrush(Qt::Dense4Pattern);
- painter->setClipRegion(unitedRegions);//,QPainter::CoordPainter);
+ TQBrush oldBrush = painter->brush();
+ TQRegion oldReg = painter->clipRegion();//TQPainter::CoordPainter);
+ painter->setBrush(TQt::Dense4Pattern);
+ painter->setClipRegion(unitedRegions);//,TQPainter::CoordPainter);
painter->drawRect(0,0,2000,1500);
- painter->setClipRegion(oldReg);//,QPainter::CoordPainter);
+ painter->setClipRegion(oldReg);//,TQPainter::CoordPainter);
painter->setBrush(oldBrush);
*/
/*if(!iAxis){
qDebug("==========================");
- qDebug("nTxtHeight: "+QString::number(nTxtHeight)+" nRotation: "+QString::number(nRotation));
+ qDebug("nTxtHeight: "+TQString::number(nTxtHeight)+" nRotation: "+TQString::number(nRotation));
qDebug(textsMatching ? "matching":"not matching");
}*/
}
painter->setFont( actFont );
- fm = QFontMetrics( painter->fontMetrics() );
+ fm = TQFontMetrics( painter->fontMetrics() );
// set colour of grid pen
- QPen gridPen, leaveOutGridPen;
+ TQPen gridPen, leaveOutGridPen;
if( para.axisShowGrid() && !bMultiRowBarChart )
gridPen.setColor( para.axisGridColor() );
@@ -927,7 +927,7 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
&& para.axisShowSubDelimiters()
&& para.axisLabelsVisible()
&& !nLeaveOut ) {
- QPen pen( para.axisLineColor(), static_cast < int > ( 0.5 * lineWidth ) );
+ TQPen pen( para.axisLineColor(), static_cast < int > ( 0.5 * lineWidth ) );
uint penWidth = pen.width();
bool bOk = true;
@@ -975,13 +975,13 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
pGZY = yGZ;
// set up grid pen for drawing the sub-grid lines
- const QPen oldGridPen( gridPen );
+ const TQPen oldGridPen( gridPen );
if ( para.axisShowGrid() ) {
gridPen.setColor( para.axisGridSubColor() );
gridPen.setWidth( gridSubLineWidth );
gridPen.setStyle( para.axisGridSubStyle() );
}
- const QPen oldPen( painter->pen() );
+ const TQPen oldPen( painter->pen() );
painter->setPen( pen );
double nSubDelim = ( labelTexts->count() - 1 )
/ cv.nSubDelimFactor;
@@ -1027,9 +1027,9 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
if( 0.0 != modf((iDelim-1.0) * cv.nSubDelimFactor, &dDummy) )
saveDrawLine( *painter,
- QPoint( static_cast<int>( pGAX - pGXMicroAdjust ),
+ TQPoint( static_cast<int>( pGAX - pGXMicroAdjust ),
static_cast<int>( pGAY - pGYMicroAdjust ) ),
- QPoint( static_cast<int>( pGZX - pGXMicroAdjust ),
+ TQPoint( static_cast<int>( pGZX - pGXMicroAdjust ),
static_cast<int>( pGZY - pGYMicroAdjust ) ),
gridPen );
@@ -1059,8 +1059,8 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
// PENDING: Michel - make sure not to draw the sub-delimiters over the main ones.
// by testing if it is a sub delimiter or a main one
if ( paint )
- painter->drawLine( QPoint( static_cast<int>( p1X ), static_cast<int>( p1Y ) ),
- QPoint( static_cast<int>( p2X ), static_cast<int>( p2Y ) ) );
+ painter->drawLine( TQPoint( static_cast<int>( p1X ), static_cast<int>( p1Y ) ),
+ TQPoint( static_cast<int>( p2X ), static_cast<int>( p2Y ) ) );
mainDelim += 1.0;
@@ -1087,9 +1087,9 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
&& para.axisShowGrid() ) {
saveDrawLine( *painter,
- QPoint( static_cast<int>( pGAX - pGXMicroAdjust ),
+ TQPoint( static_cast<int>( pGAX - pGXMicroAdjust ),
static_cast<int>( pGAY - pGYMicroAdjust ) ),
- QPoint( static_cast<int>( pGZX - pGXMicroAdjust ),
+ TQPoint( static_cast<int>( pGZX - pGXMicroAdjust ),
static_cast<int>( pGZY - pGYMicroAdjust ) ),
gridPen );
@@ -1190,11 +1190,11 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
double pXYDelta = fabs( pXDelta ) + fabs( pYDelta );
if( 0.0 == para.trueAxisDeltaPixels() )
- ( ( KDChartAxisParams& ) para ).setTrueAxisDeltaPixels( QMIN(_logicalWidth, _logicalHeight) / 150 );
+ ( ( KDChartAxisParams& ) para ).setTrueAxisDeltaPixels( TQMIN(_logicalWidth, _logicalHeight) / 150 );
bool dtGoDown = cv.dtLow > cv.dtHigh;
int mult = dtGoDown ? -1 : 1;
- const QDateTime& startDt = dtGoDown ? cv.dtHigh : cv.dtLow;
+ const TQDateTime& startDt = dtGoDown ? cv.dtHigh : cv.dtLow;
( ( KDChartAxisParams& ) para ).setAxisDtLowPos( x1, y1 );
// adjust stored dt-low and scale settings
@@ -1208,12 +1208,12 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
gridPen.setWidth( gridLineWidth );
gridPen.setStyle( para.axisGridStyle() );
}
- QPen subGridPen( gridPen.color(), 1, para.axisGridStyle() );
- QPen subSubGridPen( gridPen.color(), 1, para.axisGridSubStyle() );
- QPen pen = subGridPen;
+ TQPen subGridPen( gridPen.color(), 1, para.axisGridStyle() );
+ TQPen subSubGridPen( gridPen.color(), 1, para.axisGridSubStyle() );
+ TQPen pen = subGridPen;
- QDateTime dt( startDt );
- QDateTime newDt( startDt );
+ TQDateTime dt( startDt );
+ TQDateTime newDt( startDt );
for( uint i=1; i <= nLabels; ++i ){
switch( cv.dtDeltaScale ) {
case KDChartAxisParams::ValueScaleSecond:
@@ -1244,7 +1244,7 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
dtAddDays( dt, 1 * mult, newDt );
break;
}
- const QDateTime& testDt
+ const TQDateTime& testDt
= dtGoDown
? ( ( newDt < cv.dtLow )
? cv.dtLow
@@ -1304,53 +1304,53 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
// (not wise to do that when supporting sec1000
// and the like some day...)
if( newDt.time().second() != dt.time().second() ){
- painter->drawLine( QPoint( p1X, p1Y ), QPoint( p1X+pXD, p1Y+pYD ) );
- painter->drawLine( QPoint( p1X+pXD, p1Y+pYD ),
- QPoint( p1X+pXD + pXDelta, p1Y+pYD + pYDelta ) );
+ painter->drawLine( TQPoint( p1X, p1Y ), TQPoint( p1X+pXD, p1Y+pYD ) );
+ painter->drawLine( TQPoint( p1X+pXD, p1Y+pYD ),
+ TQPoint( p1X+pXD + pXDelta, p1Y+pYD + pYDelta ) );
painter->drawText( p1X+pXD-orgXD, p1Y+pYD-orgYD,
pTextsW, pTextsH,
- textAlign | Qt::DontClip,
- QString::number( dt.time().second() ) );
+ textAlign | TQt::DontClip,
+ TQString::number( dt.time().second() ) );
pXD += orgXD;
pYD += orgYD;
}
*/
if( secPaint ){
- painter->drawLine( QPoint( static_cast<int>( pSecX+pXD ),
+ painter->drawLine( TQPoint( static_cast<int>( pSecX+pXD ),
static_cast<int>( pSecY+pYD ) ),
- QPoint( static_cast<int>( p2X + pXD ),
+ TQPoint( static_cast<int>( p2X + pXD ),
static_cast<int>( p2Y + pYD ) ) );
if( (pXDelta/2.0 < p2X - pSecX) || (pYDelta/2.0 < p2Y - pSecY) ){
- QPen oldPen( painter->pen() );
- painter->setPen( QPen( labelsColor ) );
+ TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen( labelsColor ) );
painter->drawText( static_cast<int>( pSecX+pXD-orgXD ),
static_cast<int>( pSecY+pYD-orgYD ),
static_cast<int>( fabs((0.0 == pXDelta) ? cv.pTextsW : (p2X - pSecX))),
static_cast<int>( fabs((0.0 == pYDelta) ? cv.pTextsH : (p2Y - pSecY))),
- cv.textAlign | Qt::DontClip,
- QString::number( dt.time().second() ) );
+ cv.textAlign | TQt::DontClip,
+ TQString::number( dt.time().second() ) );
painter->setPen( oldPen );
if ( para.axisShowGrid() ){
saveDrawLine( *painter,
- QPoint( static_cast<int>( pSecX ),
+ TQPoint( static_cast<int>( pSecX ),
static_cast<int>( pSecY ) ),
- QPoint( static_cast<int>( pSecX + gridDX ),
+ TQPoint( static_cast<int>( pSecX + gridDX ),
static_cast<int>( pSecY + gridDY ) ),
pen );
pen = gridPen;
}
if( !minPaint || pMinX != pSecX || pMinY != pSecY ){
- painter->drawLine( QPoint( static_cast<int>( pSecX ),
+ painter->drawLine( TQPoint( static_cast<int>( pSecX ),
static_cast<int>( pSecY ) ),
- QPoint( static_cast<int>( pSecX+pXD ),
+ TQPoint( static_cast<int>( pSecX+pXD ),
static_cast<int>( pSecY+pYD ) ) );
}
}
if( endLoop && !minPaint )
- painter->drawLine( QPoint( static_cast<int>( p2X ),
+ painter->drawLine( TQPoint( static_cast<int>( p2X ),
static_cast<int>( p2Y ) ),
- QPoint( static_cast<int>( p2X+pXD ),
+ TQPoint( static_cast<int>( p2X+pXD ),
static_cast<int>( p2Y+pYD ) ) );
pSecX = p1X + pXDelta;
pSecY = p1Y + pYDelta;
@@ -1358,48 +1358,48 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
pYD += orgYD;
}
if( minPaint ){
- painter->drawLine( QPoint( static_cast<int>( pMinX+pXD ),
+ painter->drawLine( TQPoint( static_cast<int>( pMinX+pXD ),
static_cast<int>( pMinY+pYD ) ),
- QPoint( static_cast<int>( p2X + pXD ),
+ TQPoint( static_cast<int>( p2X + pXD ),
static_cast<int>( p2Y + pYD ) ) );
if( (pXDelta/2.0 < p2X - pMinX) || (pYDelta/2.0 < p2Y - pMinY) ){
- QPen oldPen( painter->pen() );
- painter->setPen( QPen( labelsColor ) );
+ TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen( labelsColor ) );
painter->drawText( static_cast<int>( pMinX+pXD-orgXD ),
static_cast<int>( pMinY+pYD-orgYD ),
static_cast<int>( fabs((0.0 == pXDelta) ? cv.pTextsW : (p2X - pMinX)) ),
static_cast<int>( fabs((0.0 == pYDelta) ? cv.pTextsH : (p2Y - pMinY)) ),
- cv.textAlign | Qt::DontClip,
- QString::number( dt.time().minute() ) );
+ cv.textAlign | TQt::DontClip,
+ TQString::number( dt.time().minute() ) );
painter->setPen( oldPen );
if ( para.axisShowGrid() ){
if( !secPaint && 10 < pXYDelta ){
saveDrawLine( *painter,
- QPoint( static_cast<int>( pMinX+pXDelta/2 ),
+ TQPoint( static_cast<int>( pMinX+pXDelta/2 ),
static_cast<int>( pMinY+pYDelta/2 ) ),
- QPoint( static_cast<int>( pMinX+pXDelta/2 + gridDX ),
+ TQPoint( static_cast<int>( pMinX+pXDelta/2 + gridDX ),
static_cast<int>( pMinY+pYDelta/2 + gridDY ) ),
subSubGridPen );
}
saveDrawLine( *painter,
- QPoint( static_cast<int>( pMinX ),
+ TQPoint( static_cast<int>( pMinX ),
static_cast<int>( pMinY ) ),
- QPoint( static_cast<int>( pMinX + gridDX ),
+ TQPoint( static_cast<int>( pMinX + gridDX ),
static_cast<int>( pMinY + gridDY ) ),
pen );
pen = gridPen;
}
if( !hourPaint || pHourX != pMinX || pHourY != pMinY ){
- painter->drawLine( QPoint( static_cast<int>( pMinX ),
+ painter->drawLine( TQPoint( static_cast<int>( pMinX ),
static_cast<int>( pMinY ) ),
- QPoint( static_cast<int>( pMinX+pXD ),
+ TQPoint( static_cast<int>( pMinX+pXD ),
static_cast<int>( pMinY+pYD ) ) );
}
}
if( endLoop && !hourPaint )
- painter->drawLine( QPoint( static_cast<int>( p2X ),
+ painter->drawLine( TQPoint( static_cast<int>( p2X ),
static_cast<int>( p2Y ) ),
- QPoint( static_cast<int>( p2X+pXD ),
+ TQPoint( static_cast<int>( p2X+pXD ),
static_cast<int>( p2Y+pYD ) ) );
pMinX = p1X + pXDelta;
pMinY = p1Y + pYDelta;
@@ -1407,9 +1407,9 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
pYD += orgYD;
}
if( hourPaint ){
- painter->drawLine( QPoint( static_cast<int>( pHourX+pXD ),
+ painter->drawLine( TQPoint( static_cast<int>( pHourX+pXD ),
static_cast<int>( pHourY+pYD ) ),
- QPoint( static_cast<int>( p2X + pXD ),
+ TQPoint( static_cast<int>( p2X + pXD ),
static_cast<int>( p2Y + pYD ) ) );
/*
qDebug("line");
@@ -1425,43 +1425,43 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
qDebug(" +pYD %i", pYD );
qDebug(" -orgYD %i", orgYD);
*/
- QPen oldPen( painter->pen() );
- painter->setPen( QPen( labelsColor ) );
+ TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen( labelsColor ) );
painter->drawText( static_cast<int>( pHourX+pXD-orgXD ),
static_cast<int>( pHourY+pYD-orgYD ),
static_cast<int>( fabs((0.0 == pXDelta) ? cv.pTextsW : (p2X - pHourX))),
static_cast<int>( fabs((0.0 == pYDelta) ? cv.pTextsH : (p2Y - pHourY))),
- cv.textAlign | Qt::DontClip,
- QString::number( dt.time().hour() ) );
+ cv.textAlign | TQt::DontClip,
+ TQString::number( dt.time().hour() ) );
painter->setPen( oldPen );
if ( para.axisShowGrid() ){
if( !minPaint && 10 < pXYDelta ){
saveDrawLine( *painter,
- QPoint( static_cast<int>( pHourX+pXDelta/2 ),
+ TQPoint( static_cast<int>( pHourX+pXDelta/2 ),
static_cast<int>( pHourY+pYDelta/2 ) ),
- QPoint( static_cast<int>( pHourX+pXDelta/2 + gridDX ),
+ TQPoint( static_cast<int>( pHourX+pXDelta/2 + gridDX ),
static_cast<int>( pHourY+pYDelta/2 + gridDY ) ),
subSubGridPen );
}
saveDrawLine( *painter,
- QPoint( static_cast<int>( pHourX ),
+ TQPoint( static_cast<int>( pHourX ),
static_cast<int>( pHourY ) ),
- QPoint( static_cast<int>( pHourX + gridDX ),
+ TQPoint( static_cast<int>( pHourX + gridDX ),
static_cast<int>( pHourY + gridDY ) ),
pen );
pen = gridPen;
}
if( !dayPaint || pDayX != pHourX || pDayY != pHourY ){
- painter->drawLine( QPoint( static_cast<int>( pHourX ),
+ painter->drawLine( TQPoint( static_cast<int>( pHourX ),
static_cast<int>( pHourY ) ),
- QPoint( static_cast<int>( pHourX+pXD ),
+ TQPoint( static_cast<int>( pHourX+pXD ),
static_cast<int>( pHourY+pYD ) ) );
}
}
if( endLoop && !dayPaint )
- painter->drawLine( QPoint( static_cast<int>( p2X ),
+ painter->drawLine( TQPoint( static_cast<int>( p2X ),
static_cast<int>( p2Y ) ),
- QPoint( static_cast<int>( p2X+pXD ),
+ TQPoint( static_cast<int>( p2X+pXD ),
static_cast<int>( p2Y+pYD ) ) );
pHourX = p1X + pXDelta;
pHourY = p1Y + pYDelta;
@@ -1469,19 +1469,19 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
pYD += orgYD;
}
if( dayPaint ){
- painter->drawLine( QPoint( static_cast<int>( pDayX+pXD ),
+ painter->drawLine( TQPoint( static_cast<int>( pDayX+pXD ),
static_cast<int>( pDayY+pYD ) ),
- QPoint( static_cast<int>( p2X + pXD ),
+ TQPoint( static_cast<int>( p2X + pXD ),
static_cast<int>( p2Y + pYD ) ) );
if( (pXDelta/2.0 < p2X - pDayX) || (pYDelta/2.0 < p2Y - pDayY) ){
- QPen oldPen( painter->pen() );
- painter->setPen( QPen( labelsColor ) );
+ TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen( labelsColor ) );
painter->drawText( static_cast<int>( pDayX+pXD-orgXD ),
static_cast<int>( pDayY+pYD-orgYD ),
static_cast<int>( fabs((0.0 == pXDelta) ? cv.pTextsW : (p2X - pDayX)) ),
static_cast<int>( fabs((0.0 == pYDelta) ? cv.pTextsH : (p2Y - pDayY)) ),
- cv.textAlign | Qt::DontClip,
- QString::number( dt.date().day() ) );
+ cv.textAlign | TQt::DontClip,
+ TQString::number( dt.date().day() ) );
painter->setPen( oldPen );
/* khz: currently not used
if( !weekPaint || pWeekX != pDayX || pWeekY != pDayY )
@@ -1489,24 +1489,24 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
if ( para.axisShowGrid() ){
if( !hourPaint && 10 < pXYDelta ){
saveDrawLine( *painter,
- QPoint( static_cast<int>( pDayX+pXDelta/2 ),
+ TQPoint( static_cast<int>( pDayX+pXDelta/2 ),
static_cast<int>( pDayY+pYDelta/2 ) ),
- QPoint( static_cast<int>( pDayX+pXDelta/2 + gridDX ),
+ TQPoint( static_cast<int>( pDayX+pXDelta/2 + gridDX ),
static_cast<int>( pDayY+pYDelta/2 + gridDY ) ),
subSubGridPen );
}
saveDrawLine( *painter,
- QPoint( static_cast<int>( pDayX ),
+ TQPoint( static_cast<int>( pDayX ),
static_cast<int>( pDayY ) ),
- QPoint( static_cast<int>( pDayX + gridDX ),
+ TQPoint( static_cast<int>( pDayX + gridDX ),
static_cast<int>( pDayY + gridDY ) ),
pen );
pen = gridPen;
}
if( !monthPaint || pMonthX != pDayX || pMonthY != pDayY ){
- painter->drawLine( QPoint( static_cast<int>( pDayX ),
+ painter->drawLine( TQPoint( static_cast<int>( pDayX ),
static_cast<int>( pDayY ) ),
- QPoint( static_cast<int>( pDayX+pXD ),
+ TQPoint( static_cast<int>( pDayX+pXD ),
static_cast<int>( pDayY+pYD ) ) );
}
}
@@ -1514,9 +1514,9 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
if( endLoop && !weekPaint )
*/
if( endLoop && !monthPaint )
- painter->drawLine( QPoint( static_cast<int>( p2X ),
+ painter->drawLine( TQPoint( static_cast<int>( p2X ),
static_cast<int>( p2Y ) ),
- QPoint( static_cast<int>( p2X+pXD ),
+ TQPoint( static_cast<int>( p2X+pXD ),
static_cast<int>( p2Y+pYD ) ) );
pDayX = p1X + pXDelta;
pDayY = p1Y + pYDelta;
@@ -1525,41 +1525,41 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
}
/* khz: currently unused
if( weekPaint ){
- painter->drawLine( QPoint( pWeekX+pXD, pWeekY+pYD ),
- QPoint( p2X + pXD, p2Y + pYD ) );
+ painter->drawLine( TQPoint( pWeekX+pXD, pWeekY+pYD ),
+ TQPoint( p2X + pXD, p2Y + pYD ) );
if( (pXDelta/2.0 < p2X - pWeekX) || (pYDelta/2.0 < p2Y - pWeekY) ){
- QPen oldPen( painter->pen() );
- painter->setPen( QPen( labelsColor ) );
+ TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen( labelsColor ) );
painter->drawText( pWeekX+pXD-orgXD, pWeekY+pYD-orgYD,
painter->setPen( oldPen );
fabs((0.0 == pXDelta) ? pTextsW : (p2X - pWeekX)),
fabs((0.0 == pYDelta) ? pTextsH : (p2Y - pWeekY)),
- textAlign | Qt::DontClip,
- QString::number( dt.date().week() ) );
+ textAlign | TQt::DontClip,
+ TQString::number( dt.date().week() ) );
if ( para.axisShowGrid() ){
if( !dayPaint && 40 < pXYDelta ){
// draw 7 lines:
//saveDrawLine( *painter,
- // QPoint( pWeekX+pXDelta/2,
+ // TQPoint( pWeekX+pXDelta/2,
// pWeekY+pYDelta/2 ),
- // QPoint( pWeekX+pXDelta/2 + gridDX,
+ // TQPoint( pWeekX+pXDelta/2 + gridDX,
// pWeekY+pYDelta/2 + gridDY ),
// subSubGridPen );
}
saveDrawLine( *painter,
- QPoint( pWeekX,
+ TQPoint( pWeekX,
pWeekY ),
- QPoint( pWeekX + gridDX,
+ TQPoint( pWeekX + gridDX,
pWeekY + gridDY ),
pen );
pen = gridPen;
}
if( !monthPaint || pMonthX != pDayX || pMonthY != pDayY ){
- painter->drawLine( QPoint( pWeekX, pWeekY ), QPoint( pWeekX+pXD, pWeekY+pYD ) );
+ painter->drawLine( TQPoint( pWeekX, pWeekY ), TQPoint( pWeekX+pXD, pWeekY+pYD ) );
}
}
if( endLoop && !monthPaint )
- painter->drawLine( QPoint( p2X, p2Y ), QPoint( p2X+pXD, p2Y+pYD ) );
+ painter->drawLine( TQPoint( p2X, p2Y ), TQPoint( p2X+pXD, p2Y+pYD ) );
pWeekX = p1X + pXDelta;
pWeekY = p1Y + pYDelta;
pXD += orgXD;
@@ -1567,51 +1567,51 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
}
*/
if( monthPaint ){
- painter->drawLine( QPoint( static_cast<int>( pMonthX+pXD ),
+ painter->drawLine( TQPoint( static_cast<int>( pMonthX+pXD ),
static_cast<int>( pMonthY+pYD ) ),
- QPoint( static_cast<int>( p2X + pXD ),
+ TQPoint( static_cast<int>( p2X + pXD ),
static_cast<int>( p2Y + pYD ) ) );
if( (pXDelta/2.0 < p2X - pMonthX) || (pYDelta/2.0 < p2Y - pMonthY) ){
- QPen oldPen( painter->pen() );
- painter->setPen( QPen( labelsColor ) );
+ TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen( labelsColor ) );
painter->drawText( static_cast<int>( pMonthX+pXD-orgXD ),
static_cast<int>( pMonthY+pYD-orgYD ),
static_cast<int>( fabs((0.0 == pXDelta) ? cv.pTextsW : (p2X - pMonthX)) ),
static_cast<int>( fabs((0.0 == pYDelta) ? cv.pTextsH : (p2Y - pMonthY)) ),
- cv.textAlign | Qt::DontClip,
- QString::number( dt.date().month() ) );
+ cv.textAlign | TQt::DontClip,
+ TQString::number( dt.date().month() ) );
painter->setPen( oldPen );
if ( para.axisShowGrid() ){
/* khz: currently unused
if( !weekPaint &&
&& 10 < pXYDelta ){
saveDrawLine( *painter,
- QPoint( pMonthX+pXDelta/2,
+ TQPoint( pMonthX+pXDelta/2,
pMonthY+pYDelta/2 ),
- QPoint( pMonthX+pXDelta/2 + gridDX,
+ TQPoint( pMonthX+pXDelta/2 + gridDX,
pMonthY+pYDelta/2 + gridDY ),
subSubGridPen );
}
*/
saveDrawLine( *painter,
- QPoint( static_cast<int>( pMonthX ),
+ TQPoint( static_cast<int>( pMonthX ),
static_cast<int>( pMonthY ) ),
- QPoint( static_cast<int>( pMonthX + gridDX ),
+ TQPoint( static_cast<int>( pMonthX + gridDX ),
static_cast<int>( pMonthY + gridDY ) ),
pen );
pen = gridPen;
}
if( !yearPaint || pYearX != pMonthX || pYearY != pMonthY ){
- painter->drawLine( QPoint( static_cast<int>( pMonthX ),
+ painter->drawLine( TQPoint( static_cast<int>( pMonthX ),
static_cast<int>( pMonthY ) ),
- QPoint( static_cast<int>( pMonthX+pXD ),
+ TQPoint( static_cast<int>( pMonthX+pXD ),
static_cast<int>( pMonthY+pYD ) ) );
}
}
if( endLoop && !yearPaint )
- painter->drawLine( QPoint( static_cast<int>( p2X ),
+ painter->drawLine( TQPoint( static_cast<int>( p2X ),
static_cast<int>( p2Y ) ),
- QPoint( static_cast<int>( p2X+pXD ),
+ TQPoint( static_cast<int>( p2X+pXD ),
static_cast<int>( p2Y+pYD ) ) );
pMonthX = p1X + pXDelta;
pMonthY = p1Y + pYDelta;
@@ -1619,46 +1619,46 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
pYD += orgYD;
}
if( yearPaint ){
- painter->drawLine( QPoint( static_cast<int>( pYearX+pXD ),
+ painter->drawLine( TQPoint( static_cast<int>( pYearX+pXD ),
static_cast<int>( pYearY+pYD ) ),
- QPoint( static_cast<int>( p2X + pXD ),
+ TQPoint( static_cast<int>( p2X + pXD ),
static_cast<int>( p2Y + pYD ) ) );
if( (pXDelta/2.0 < p2X - pYearX) || (pYDelta/2.0 < p2Y - pYearY) ){
- QPen oldPen( painter->pen() );
- painter->setPen( QPen( labelsColor ) );
+ TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen( labelsColor ) );
painter->drawText( static_cast<int>( pYearX+pXD-orgXD ),
static_cast<int>( pYearY+pYD-orgYD ),
static_cast<int>( fabs((0.0 == pXDelta) ? cv.pTextsW : (p2X - pYearX)) ),
static_cast<int>( fabs((0.0 == pYDelta) ? cv.pTextsH : (p2Y - pYearY)) ),
- cv.textAlign | Qt::DontClip,
- QString::number( dt.date().year() ) );
+ cv.textAlign | TQt::DontClip,
+ TQString::number( dt.date().year() ) );
painter->setPen( oldPen );
if ( para.axisShowGrid() ){
if( !monthPaint && 10 < pXYDelta ){
saveDrawLine( *painter,
- QPoint( static_cast<int>( pYearX+pXDelta/2 ),
+ TQPoint( static_cast<int>( pYearX+pXDelta/2 ),
static_cast<int>( pYearY+pYDelta/2 ) ),
- QPoint( static_cast<int>( pYearX+pXDelta/2 + gridDX ),
+ TQPoint( static_cast<int>( pYearX+pXDelta/2 + gridDX ),
static_cast<int>( pYearY+pYDelta/2 + gridDY ) ),
subSubGridPen );
}
saveDrawLine( *painter,
- QPoint( static_cast<int>( pYearX ),
+ TQPoint( static_cast<int>( pYearX ),
static_cast<int>( pYearY ) ),
- QPoint( static_cast<int>( pYearX + gridDX ),
+ TQPoint( static_cast<int>( pYearX + gridDX ),
static_cast<int>( pYearY + gridDY ) ),
pen );
pen = gridPen;
}
- painter->drawLine( QPoint( static_cast<int>( pYearX ),
+ painter->drawLine( TQPoint( static_cast<int>( pYearX ),
static_cast<int>( pYearY ) ),
- QPoint( static_cast<int>( pYearX+pXD ),
+ TQPoint( static_cast<int>( pYearX+pXD ),
static_cast<int>( pYearY+pYD ) ) );
}
if( endLoop )
- painter->drawLine( QPoint( static_cast<int>( p2X ),
+ painter->drawLine( TQPoint( static_cast<int>( p2X ),
static_cast<int>( p2Y ) ),
- QPoint( static_cast<int>( p2X+pXD ),
+ TQPoint( static_cast<int>( p2X+pXD ),
static_cast<int>( p2Y+pYD ) ) );
pYearX = p1X + pXDelta;
pYearY = p1Y + pYDelta;
@@ -1671,22 +1671,22 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
iLabel += 1.0;
}
if( !commonDtHeader.isEmpty() ){
- QPen oldPen( painter->pen() );
- painter->setPen( QPen( labelsColor ) );
+ TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen( labelsColor ) );
painter->drawText( static_cast<int>( x1 + pXD ), static_cast<int>( y1 + pYD ),
commonDtHeader );
painter->setPen( oldPen );
}
}else{
int iLeaveOut = nLeaveOut;
- QString label;
- for ( QStringList::Iterator labelIter = labelTexts->begin();
+ TQString label;
+ for ( TQStringList::Iterator labelIter = labelTexts->begin();
labelIter != labelTexts->end();
++labelIter ) {
- QDateTime dt;
+ TQDateTime dt;
if( cv.isDateTime ){
-#if COMPAT_QT_VERSION >= 0x030000
- dt = QDateTime::fromString( *labelIter,
+#if COMPAT_TQT_VERSION >= 0x030000
+ dt = TQDateTime::fromString( *labelIter,
Qt::ISODate );
label = dt.toString( formatDT );
#else
@@ -1712,18 +1712,18 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
// draw the main grid line
saveDrawLine( *painter,
- QPoint( static_cast<int>( pGAX - pGXMicroAdjust ),
+ TQPoint( static_cast<int>( pGAX - pGXMicroAdjust ),
static_cast<int>( pGAY - pGYMicroAdjust ) ),
- QPoint( static_cast<int>( pGZX - pGXMicroAdjust ),
+ TQPoint( static_cast<int>( pGZX - pGXMicroAdjust ),
static_cast<int>( pGZY - pGYMicroAdjust ) ),
gridPen );
else if( para.axisShowSubDelimiters() )
// draw a thin sub grid line instead of main line
saveDrawLine( *painter,
- QPoint( static_cast<int>( pGAX - pGXMicroAdjust ),
+ TQPoint( static_cast<int>( pGAX - pGXMicroAdjust ),
static_cast<int>( pGAY - pGYMicroAdjust ) ),
- QPoint( static_cast<int>( pGZX - pGXMicroAdjust ),
+ TQPoint( static_cast<int>( pGZX - pGXMicroAdjust ),
static_cast<int>( pGZY - pGYMicroAdjust ) ),
leaveOutGridPen );
}
@@ -1737,18 +1737,18 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
*also paint or dont paint the delimiter corresponding to this label - default is paint.
*/
if ( !label.isNull() || showDelim )
- painter->drawLine( QPoint( static_cast<int>( p1X ),
+ painter->drawLine( TQPoint( static_cast<int>( p1X ),
static_cast<int>( p1Y ) ),
- QPoint( static_cast<int>( p2X ),
+ TQPoint( static_cast<int>( p2X ),
static_cast<int>( p2Y ) ) );
cv.pLastX = p1X;
cv.pLastY = p1Y;
- QPen oldPen( painter->pen() );
- painter->setPen( QPen( labelsColor ) );
+ TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen( labelsColor ) );
if( para.axisLabelsDontShrinkFont()
&& isHorizontalAxis
- && (Qt::AlignHCenter == (cv.textAlign & Qt::AlignHCenter)) ) {
+ && (TQt::AlignHCenter == (cv.textAlign & TQt::AlignHCenter)) ) {
double w = fm.width( label ) + 4.0;
double x0 = cv.pTextsX + cv.pTextsW / 2.0;
@@ -1762,8 +1762,8 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
KDDrawText::drawRotatedText(
painter,
nRotation,
- painter->worldMatrix().map(
- QPoint( static_cast<int>( cv.pTextsX ),
+ painter->tqworldMatrix().map(
+ TQPoint( static_cast<int>( cv.pTextsX ),
static_cast<int>( cv.pTextsY ) ) ),
label,
0,
@@ -1778,7 +1778,7 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
static_cast<int>( cv.pTextsY ),
static_cast<int>( cv.pTextsW ),
static_cast<int>( cv.pTextsH ),
- cv.textAlign | Qt::DontClip,
+ cv.textAlign | TQt::DontClip,
label );
// debugging text rect
@@ -1873,30 +1873,30 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
xFactor = 1.0;
yFactor = 0.0;
axisZeroLineStart = axisZeroLineStartY;
- minCoord = QMIN( cv.orig.y(), cv.dest.y() );
- maxCoord = QMAX( cv.orig.y(), cv.dest.y() );
+ minCoord = TQMIN( cv.orig.y(), cv.dest.y() );
+ maxCoord = TQMAX( cv.orig.y(), cv.dest.y() );
break;
case KDChartAxisParams::AxisPosRight:
xFactor = -1.0;
yFactor = 0.0;
axisZeroLineStart = axisZeroLineStartY;
- minCoord = QMIN( cv.orig.y(), cv.dest.y() );
- maxCoord = QMAX( cv.orig.y(), cv.dest.y() );
+ minCoord = TQMIN( cv.orig.y(), cv.dest.y() );
+ maxCoord = TQMAX( cv.orig.y(), cv.dest.y() );
break;
case KDChartAxisParams::AxisPosTop:
xFactor = 0.0;
yFactor = 1.0;
axisZeroLineStart = axisZeroLineStartX;
- minCoord = QMIN( cv.orig.x(), cv.dest.x() );
- maxCoord = QMAX( cv.orig.x(), cv.dest.x() );
+ minCoord = TQMIN( cv.orig.x(), cv.dest.x() );
+ maxCoord = TQMAX( cv.orig.x(), cv.dest.x() );
break;
case KDChartAxisParams::AxisPosBottom:
xFactor = 0.0;
yFactor = -1.0;
axisZeroLineStart = axisZeroLineStartX;
- minCoord = QMIN( cv.orig.x(), cv.dest.x() );
- maxCoord = QMAX( cv.orig.x(), cv.dest.x() );
+ minCoord = TQMIN( cv.orig.x(), cv.dest.x() );
+ maxCoord = TQMAX( cv.orig.x(), cv.dest.x() );
break;
default:
xFactor = 0.0;
@@ -1907,9 +1907,9 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
}
if( axisZeroLineStart >= minCoord &&
axisZeroLineStart <= maxCoord ){
- QPoint pZ0( static_cast<int>( para.axisZeroLineStartX() ),
+ TQPoint pZ0( static_cast<int>( para.axisZeroLineStartX() ),
static_cast<int>( para.axisZeroLineStartY() ) );
- QPoint pZ( static_cast<int>( para.axisZeroLineStartX()
+ TQPoint pZ( static_cast<int>( para.axisZeroLineStartX()
+ xFactor * _dataRect.width() ),
static_cast<int>( para.axisZeroLineStartY()
+ yFactor * _dataRect.height() ) );
@@ -1917,7 +1917,7 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
saveDrawLine( *painter,
pZ0,
pZ,
- QPen( para.axisZeroLineColor(),
+ TQPen( para.axisZeroLineColor(),
lineWidth ) );
}
}
@@ -1929,7 +1929,7 @@ void KDChartAxesPainter::paintAxes( QPainter* painter,
// Drawing all the axes lines:
/*
// 1. test if the standard axes are share one or several corner points
- // if yes, we first draw a polyline using a "Qt::MiterJoin" PenJoinStyle
+ // if yes, we first draw a polyline using a "TQt::MiterJoin" PenJoinStyle
// to make sure the corners are filled
internal__KDChart__CalcValues& cv1 = calcVal[ KDChartAxisParams::AxisPosLeft ];
internal__KDChart__CalcValues& cv2 = calcVal[ KDChartAxisParams::AxisPosBottom ];
@@ -1939,18 +1939,18 @@ qDebug("\n\nx1: %i y1: %i w1: %i\nx2: %i y2: %i w2: %i",
cv1.orig.x(), cv1.orig.y(), pa1.axisTrueLineWidth(),
cv2.orig.x(), cv2.orig.y(), pa2.axisTrueLineWidth() );
if( cv1.orig == cv2.orig ){
- const QColor c1( pa1.axisLineColor() );
- const QColor c2( pa2.axisLineColor() );
- const QPoint pA( cv1.dest );
- const QPoint pB( cv1.orig );
- const QPoint pC( cv2.dest );
- QPen pen( QColor( (c1.red() + c2.red()) /2,
+ const TQColor c1( pa1.axisLineColor() );
+ const TQColor c2( pa2.axisLineColor() );
+ const TQPoint pA( cv1.dest );
+ const TQPoint pB( cv1.orig );
+ const TQPoint pC( cv2.dest );
+ TQPen pen( TQColor( (c1.red() + c2.red()) /2,
(c1.green() + c2.green())/2,
(c1.blue() + c2.blue()) /2 ),
- QMIN(pa1.axisTrueLineWidth(), pa2.axisTrueLineWidth()) );
- pen.setJoinStyle( Qt::MiterJoin );
+ TQMIN(pa1.axisTrueLineWidth(), pa2.axisTrueLineWidth()) );
+ pen.setJoinStyle( TQt::MiterJoin );
painter->setPen( pen );
- QPointArray a;
+ TQPointArray a;
a.putPoints( 0, 3, pA.x(),pA.y(), pB.x(),pB.y(), pC.x(),pC.y() );
painter->drawPolyline( a );
qDebug("done\n" );
@@ -1961,15 +1961,15 @@ qDebug("done\n" );
internal__KDChart__CalcValues& cv = calcVal[iAxis];
const KDChartAxisParams & para = params()->axisParams( iAxis );
if( cv.processThisAxis && para.axisLineVisible() ){
- painter->setPen( QPen( para.axisLineColor(),
+ painter->setPen( TQPen( para.axisLineColor(),
para.axisTrueLineWidth() ) );
int x = cv.dest.x();
- if( 2.0 >= QABS(cv.pLastX - x) )
+ if( 2.0 >= TQABS(cv.pLastX - x) )
x = static_cast < int > ( cv.pLastX );
int y = cv.dest.y();
- if( 2.0 >= QABS(cv.pLastY - y) )
+ if( 2.0 >= TQABS(cv.pLastY - y) )
y = static_cast < int > ( cv.pLastY );
- painter->drawLine( cv.orig, QPoint(x,y) );
+ painter->drawLine( cv.orig, TQPoint(x,y) );
}
}
@@ -2002,7 +2002,7 @@ double fastPow10( double x )
axis must be set, this means you may only call it when
\c KDChartPainter::setupGeometry() has been called before.
- \param painter the QPainter onto which the chart should be painted
+ \param painter the TQPainter onto which the chart should be painted
\param data the data that will be displayed as a chart
\param params the KDChartParams that were specified globally
\param axisNumber the number of this axis (used in some params structures)
@@ -2016,7 +2016,7 @@ double fastPow10( double x )
*/
/**** static ****/
void KDChartAxesPainter::calculateLabelTexts(
- QPainter* painter,
+ TQPainter* painter,
const KDChartTableDataBase& data,
const KDChartParams& params,
uint axisNumber,
@@ -2024,8 +2024,8 @@ void KDChartAxesPainter::calculateLabelTexts(
double delimLen,
// start of return parameters
KDChartAxisParams::AxisPos& basicPos,
- QPoint& orig,
- QPoint& dest,
+ TQPoint& orig,
+ TQPoint& dest,
double& pXDeltaFactor,
double& pYDeltaFactor,
double& pXDelimDeltaFaktor,
@@ -2041,14 +2041,14 @@ void KDChartAxesPainter::calculateLabelTexts(
bool& isLogarithmic,
bool& isDateTime,
bool& autoDtLabels,
- QDateTime& dtLow,
- QDateTime& dtHigh,
+ TQDateTime& dtLow,
+ TQDateTime& dtHigh,
KDChartAxisParams::ValueScale& dtDeltaScale,
bool adjustTheValues,
double trueDelta,
double trueDeltaPix )
{
-//qDebug("\nentering KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+QString::number(nTxtHeight));
+//qDebug("\nentering KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight));
const KDChartAxisParams & para = params.axisParams( axisNumber );
// store whether the labels are to be drawn in reverted order
@@ -2149,7 +2149,7 @@ void KDChartAxesPainter::calculateLabelTexts(
int dds = (KDCHART_ALL_DATASETS != dataDataset)
? dataDataset
: 0;
- dataDataset = QMAX( ds, dds );
+ dataDataset = TQMAX( ds, dds );
}
if( ( KDCHART_ALL_DATASETS != dataset2
&& KDCHART_NO_DATASET != dataset2 )
@@ -2161,7 +2161,7 @@ void KDChartAxesPainter::calculateLabelTexts(
int dds2 = (KDCHART_ALL_DATASETS != dataDataset2)
? dataDataset2
: KDCHART_MAX_AXES-1;
- dataDataset2 = QMIN( ds2, dds2 );
+ dataDataset2 = TQMIN( ds2, dds2 );
}
}
else {
@@ -2175,35 +2175,35 @@ void KDChartAxesPainter::calculateLabelTexts(
if ( para.axisLabelsFontUseRelSize() ){
nTxtHeight = para.axisLabelsFontRelSize()
* averageValueP1000;
-//qDebug("using rel. size in KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+QString::number(nTxtHeight));
+//qDebug("using rel. size in KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight));
}else {
- QFontInfo info( para.axisLabelsFont() );
+ TQFontInfo info( para.axisLabelsFont() );
nTxtHeight = info.pointSize();
-//qDebug("using FIXED size in KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+QString::number(nTxtHeight));
+//qDebug("using FIXED size in KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight));
}
const KDChartEnums::NumberNotation notation = para.axisLabelsNotation();
const int behindComma = para.axisDigitsBehindComma();
const int divPow10 = para.axisLabelsDivPow10();
- const QString decimalPoint = para.axisLabelsDecimalPoint();
- const QString thousandsPoint = para.axisLabelsThousandsPoint();
- const QString prefix = para.axisLabelsPrefix();
- const QString postfix = para.axisLabelsPostfix();
+ const TQString decimalPoint = para.axisLabelsDecimalPoint();
+ const TQString thousandsPoint = para.axisLabelsThousandsPoint();
+ const TQString prefix = para.axisLabelsPrefix();
+ const TQString postfix = para.axisLabelsPostfix();
const int totalLen = para.axisLabelsTotalLen();
- const QChar padFill = para.axisLabelsPadFill();
+ const TQChar padFill = para.axisLabelsPadFill();
const bool blockAlign = para.axisLabelsBlockAlign();
- QStringList labelTexts;
+ TQStringList labelTexts;
int colNum = para.labelTextsDataRow();
bool bDone = true;
switch ( para.axisLabelTextsFormDataRow() ) {
case KDChartAxisParams::LabelsFromDataRowYes: {
// Take whatever is in the specified column (even if not a string)
int trueBehindComma = -1;
- QVariant value;
+ TQVariant value;
for ( uint iDataset = 0; iDataset < data.usedRows(); iDataset++ ) {
if( data.cellCoord( iDataset, colNum, value, 1 ) ){
- if( QVariant::String == value.type() )
+ if( TQVariant::String == value.type() )
labelTexts.append( value.toString() );
else {
labelTexts.append( applyLabelsFormat( value.toDouble(),
@@ -2226,11 +2226,11 @@ void KDChartAxesPainter::calculateLabelTexts(
break;
}
case KDChartAxisParams::LabelsFromDataRowGuess: {
- QVariant value;
+ TQVariant value;
for ( uint iDataset = 0; iDataset < data.usedRows(); iDataset++ ) {
if( data.cellCoord( iDataset, colNum, value, 1 ) ){
- if( QVariant::String == value.type() ){
- const QString sVal( value.toString() );
+ if( TQVariant::String == value.type() ){
+ const TQString sVal( value.toString() );
if( !sVal.isEmpty() && !sVal.isNull() )
labelTexts.append( sVal );
}
@@ -2290,13 +2290,13 @@ void KDChartAxesPainter::calculateLabelTexts(
// store the coordinate number to be used for this axis
const int coordinate = bVertAxis ? 1 : 2;
- // store whether our coordinates are double or QDateTime values
- const QVariant::Type valueType =
+ // store whether our coordinates are double or TQDateTime values
+ const TQVariant::Type valueType =
(KDCHART_ALL_DATASETS == dataDataset)
? data.cellsValueType( coordinate )
: data.cellsValueType( dataDataset, dataDataset2, coordinate );
- isDateTime = valueType == QVariant::DateTime;
- bool bIsDouble = valueType == QVariant::Double;
+ isDateTime = valueType == TQVariant::DateTime;
+ bool bIsDouble = valueType == TQVariant::Double;
autoDtLabels = isDateTime && ( KDCHART_AXIS_LABELS_AUTO_DATETIME_FORMAT
== para.axisLabelsDateTimeFormat() );
@@ -2317,7 +2317,7 @@ void KDChartAxesPainter::calculateLabelTexts(
: dataDataset2;
for (uint i = ds1; i <= ds2; ++i)
labelTexts.append(
- QObject::tr( "Series " ) + QString::number( i + 1 ) );
+ TQObject::tr( "Series " ) + TQString::number( i + 1 ) );
bDone = true;
}
@@ -2369,7 +2369,7 @@ void KDChartAxesPainter::calculateLabelTexts(
if( bShowVeryLastLabel )
bShowVeryLastLabel = false;
else{
- QString sHigh( applyLabelsFormat( nHigh,
+ TQString sHigh( applyLabelsFormat( nHigh,
divPow10,
behindComma,
nDelta,
@@ -2382,7 +2382,7 @@ void KDChartAxesPainter::calculateLabelTexts(
totalLen,
padFill,
blockAlign ) );
- QString sValue( applyLabelsFormat( nVal,
+ TQString sValue( applyLabelsFormat( nVal,
divPow10,
behindComma,
nDelta,
@@ -2415,30 +2415,30 @@ void KDChartAxesPainter::calculateLabelTexts(
pTextsX, pTextsY, pTextsW, pTextsH,
textAlign );
bool useShortLabels = false;
- QStringList tmpList( para.axisLabelStringList() );
+ TQStringList tmpList( para.axisLabelStringList() );
// find start- and/or end-entry
int iStart = 0;
int iEnd = para.axisLabelStringCount() - 1;
if( ! ( KDCHART_AXIS_LABELS_AUTO_LIMIT == para.axisValueStart() )
|| ! ( KDCHART_AXIS_LABELS_AUTO_LIMIT == para.axisValueEnd() ) ) {
- const bool testStart = !( QVariant::String == para.axisValueStart().type() );
- const bool testEnd = !( QVariant::String == para.axisValueEnd().type() );
- QString sStart = testStart
+ const bool testStart = !( TQVariant::String == para.axisValueStart().type() );
+ const bool testEnd = !( TQVariant::String == para.axisValueEnd().type() );
+ TQString sStart = testStart
? para.axisValueStart().toString().upper()
- : QString::null;
- QString sEnd = testEnd
+ : TQString();
+ TQString sEnd = testEnd
? para.axisValueEnd().toString().upper()
- : QString::null;
+ : TQString();
uint i = 0;
- for ( QStringList::Iterator it = tmpList.begin();
+ for ( TQStringList::Iterator it = tmpList.begin();
it != tmpList.end(); ++it, ++i ) {
if ( 0 == iStart &&
- 0 == QString::compare( sStart, ( *it ).upper() ) ) {
+ 0 == TQString::compare( sStart, ( *it ).upper() ) ) {
iStart = i;
}
- if ( 0 == QString::compare( sEnd, ( *it ).upper() ) ) {
+ if ( 0 == TQString::compare( sEnd, ( *it ).upper() ) ) {
iEnd = i;
}
}
@@ -2449,13 +2449,13 @@ void KDChartAxesPainter::calculateLabelTexts(
if ( para.axisLabelStringCount()
&& para.axisShortLabelsStringCount()
&& para.axisLabelStringList() != para.axisShortLabelsStringList() ) {
- QFont font( para.axisLabelsFont() );
+ TQFont font( para.axisLabelsFont() );
if ( para.axisLabelsFontUseRelSize() )
font.setPixelSize( static_cast < int > ( nTxtHeight ) );
painter->setFont( font );
- QFontMetrics fm( painter->fontMetrics() );
+ TQFontMetrics fm( painter->fontMetrics() );
- QStringList::Iterator it = tmpList.begin();
+ TQStringList::Iterator it = tmpList.begin();
for ( int i = 0; i < nLabels; ++i ) {
if ( it != tmpList.end() ) {
if ( fm.width( *it ) > pTextsW ) {
@@ -2479,8 +2479,8 @@ void KDChartAxesPainter::calculateLabelTexts(
modf( ddelta, &ddelta );
bool positive = ( 0.0 <= ddelta );
int delta = static_cast < int > ( fabs( ddelta ) );
- // find 1st significant entry
- QStringList::Iterator it = positive
+ // tqfind 1st significant entry
+ TQStringList::Iterator it = positive
? tmpList.begin()
: tmpList.fromLast();
if ( positive )
@@ -2544,11 +2544,11 @@ void KDChartAxesPainter::calculateLabelTexts(
uint dset = ( dataset == KDCHART_ALL_DATASETS ) ? 0 : dataset;
//qDebug("\ndset: %u", dset);
bDone = false;
- QVariant value;
+ TQVariant value;
for ( uint col = 0; col < data.usedCols(); ++col ) {
if( data.cellCoord( dset, col, value, coordinate ) ){
- if( QVariant::String == value.type() ){
- const QString sVal = value.toString();
+ if( TQVariant::String == value.type() ){
+ const TQString sVal = value.toString();
if( !sVal.isEmpty() && !sVal.isNull() ){
labelTexts.append( sVal );
bDone = true;
@@ -2653,7 +2653,7 @@ void KDChartAxesPainter::calculateLabelTexts(
if( adjustTheValues ){
nDelta = fabs( trueDelta );
pDelimDelta = trueDeltaPix;
- nLow = QMIN( para.trueAxisLow(), para.trueAxisHigh() );
+ nLow = TQMIN( para.trueAxisLow(), para.trueAxisHigh() );
//qDebug("\nsearching: para.trueAxisLow() %f para.trueAxisHigh() %f",para.trueAxisLow(),para.trueAxisHigh());
double orgLow( nLow );
modf( nLow / nDelta, &nLow );
@@ -2716,7 +2716,7 @@ void KDChartAxesPainter::calculateLabelTexts(
if ( dataDataset == KDCHART_ALL_DATASETS ) {
if( bIsDouble ){
nLow = bStackedMode
- ? QMIN( data.minColSum(), 0.0 )
+ ? TQMIN( data.minColSum(), 0.0 )
: data.minValue( coordinate,
isLogarithmic );
//qDebug("\n1: nLow: %f", nLow );
@@ -2727,7 +2727,7 @@ void KDChartAxesPainter::calculateLabelTexts(
} else {
if( bIsDouble ){
nLow = bStackedMode
- ? QMIN( data.minColSum( dataDataset, dataDataset2 ),
+ ? TQMIN( data.minColSum( dataDataset, dataDataset2 ),
0.0 )
: data.minInRows( dataDataset,dataDataset2,
coordinate,
@@ -2739,10 +2739,10 @@ void KDChartAxesPainter::calculateLabelTexts(
}
}else{
if( bIsDouble ){
- if( QVariant::Double == para.axisValueStart().type() )
+ if( TQVariant::Double == para.axisValueStart().type() )
nLow = para.axisValueStart().toDouble();
}else{
- if( QVariant::DateTime == para.axisValueStart().type() )
+ if( TQVariant::DateTime == para.axisValueStart().type() )
dtLow = para.axisValueStart().toDateTime();
}
}
@@ -2752,7 +2752,7 @@ void KDChartAxesPainter::calculateLabelTexts(
if ( dataDataset == KDCHART_ALL_DATASETS ) {
if( bIsDouble ){
nHigh = bStackedMode
- ? QMAX( data.maxColSum(), 0.0 )
+ ? TQMAX( data.maxColSum(), 0.0 )
: data.maxValue( coordinate );
}else{
dtHigh = data.maxDtValue( coordinate );
@@ -2760,7 +2760,7 @@ void KDChartAxesPainter::calculateLabelTexts(
} else {
if( bIsDouble )
nHigh = bStackedMode
- ? QMAX( data.maxColSum( dataDataset, dataDataset2 ),
+ ? TQMAX( data.maxColSum( dataDataset, dataDataset2 ),
0.0 )
: data.maxInRows( dataDataset,dataDataset2,
coordinate );
@@ -2771,10 +2771,10 @@ void KDChartAxesPainter::calculateLabelTexts(
//qDebug("\nbAutoCalcEnd:\n nLow: %f\n nHigh: %f", nLow, nHigh );
}else{
if( bIsDouble ){
- if( QVariant::Double == para.axisValueEnd().type() )
+ if( TQVariant::Double == para.axisValueEnd().type() )
nHigh = para.axisValueEnd().toDouble();
}else{
- if( QVariant::DateTime == para.axisValueEnd().type() )
+ if( TQVariant::DateTime == para.axisValueEnd().type() )
dtHigh = para.axisValueEnd().toDateTime();
}
}
@@ -2812,7 +2812,7 @@ void KDChartAxesPainter::calculateLabelTexts(
} else if( isDateTime ){
bool toggleDts = dtLow > dtHigh;
if( toggleDts ) {
- QDateTime dt( dtLow );
+ TQDateTime dt( dtLow );
dtLow = dtHigh;
dtHigh = dt;
}
@@ -2823,7 +2823,7 @@ void KDChartAxesPainter::calculateLabelTexts(
const double secHour = 60.0 * secMin;
const double secDay = 24.0 * secHour;
//
- // we temporarily disable week alignment until bug
+ // we temporarily disable week tqalignment until bug
// is fixed (1st week of year must not start in the
// preceeding year but rather be shown incompletely)
//
@@ -2965,20 +2965,20 @@ void KDChartAxesPainter::calculateLabelTexts(
dtAddMonths( dtHigh, monthHighD, dtHigh );
dtAddYears( dtHigh, yearHighD, dtHigh );
if( gotoEndOfMonth ){
- dtHigh.setDate( QDate( dtHigh.date().year(),
+ dtHigh.setDate( TQDate( dtHigh.date().year(),
dtHigh.date().month(),
dtHigh.date().daysInMonth() ) );
- dtHigh.setTime( QTime( 23, 59, 59 ) );
+ dtHigh.setTime( TQTime( 23, 59, 59 ) );
}
if( toggleDts ) {
- QDateTime dt( dtLow );
+ TQDateTime dt( dtLow );
dtLow = dtHigh;
dtHigh = dt;
}
// secDist = dtLow.secsTo( dtHigh );
// NOTE: nSubDelimFactor is not set here since it
- // cannot be used for QDateTime values.
+ // cannot be used for TQDateTime values.
nSubDelimFactor = 0.0;
bOrdFactorsOk = true;
}
@@ -3029,16 +3029,16 @@ void KDChartAxesPainter::calculateLabelTexts(
if( isLogarithmic ){
if( bIsDouble ) {
//qDebug("\n[L--] nLow: %f, nHigh: %f, nDelta: %f", nLow, nHigh, nDelta );
- if( 0.0 == QABS( nLow ) )
+ if( 0.0 == TQABS( nLow ) )
nLow = -5;
else{
// find the Low / High values for the log. axis
- nLow = log10( QABS( nLow ) );
+ nLow = log10( TQABS( nLow ) );
//if( 0.0 >= nLow ){
//nLow = fastPow10( -nLow );
//}
}
- nHigh = log10( QABS( nHigh ) );
+ nHigh = log10( TQABS( nHigh ) );
//qDebug("[L-0] nLow: %f, nHigh: %f", nLow, nHigh );
double intPart=0.0; // initialization necessary for Borland C++
@@ -3167,8 +3167,8 @@ void KDChartAxesPainter::calculateLabelTexts(
//qDebug("\ncalc ordinate 2. nDist: %f\n+ nLow: %f\n nHigh: %f\n nDelta: %f\n nLabels: %u",
//nDist, nLow, nHigh, nDelta, nLabels );
- //QString sDelta;sDelta.setNum( nDelta, 'f', 24 );
- //QString sLow; sLow.setNum( nLow, 'f', 24 );
+ //TQString sDelta;sDelta.setNum( nDelta, 'f', 24 );
+ //TQString sLow; sLow.setNum( nLow, 'f', 24 );
//qDebug("nLow: %f, sLow: %s, sDelta: %s", nLow, sLow.latin1(), sDelta.latin1());
// special case: End values was set by the user, but no Detla values was set.
@@ -3240,7 +3240,7 @@ void KDChartAxesPainter::calculateLabelTexts(
} else {
bool goDown = dtLow > dtHigh;
int mult = goDown ? -1 : 1;
- QDateTime dt( dtLow );
+ TQDateTime dt( dtLow );
nLabels = 0;
/*
qDebug("dtLow: ");
@@ -3277,7 +3277,7 @@ void KDChartAxesPainter::calculateLabelTexts(
if( autoDtLabels )
labelTexts.append( "x" );
else
-#if COMPAT_QT_VERSION >= 0x030000
+#if COMPAT_TQT_VERSION >= 0x030000
labelTexts.append( dt.toString( Qt::ISODate ) );
#else
labelTexts.append( dateTimeToString( dt ) );
@@ -3347,8 +3347,8 @@ void KDChartAxesPainter::calculateLabelTexts(
//qDebug("not bSteadyCalc");
double delta( 1.0 );
double finis( start + delta * ( count - 1 ) );
- const bool startIsDouble = QVariant::Double == para.axisValueStart().type();
- const bool endIsDouble = QVariant::Double == para.axisValueEnd().type();
+ const bool startIsDouble = TQVariant::Double == para.axisValueStart().type();
+ const bool endIsDouble = TQVariant::Double == para.axisValueEnd().type();
bool deltaIsAuto = true;
if ( !( KDCHART_AXIS_LABELS_AUTO_DELTA == para.axisValueDelta() ) ) {
@@ -3405,8 +3405,8 @@ void KDChartAxesPainter::calculateLabelTexts(
finis = start + delta * ( count - 1 );
}
}
- QString prefix( QObject::tr( "Item " ) );
- QString postfix;
+ TQString prefix( TQObject::tr( "Item " ) );
+ TQString postfix;
if ( startIsDouble && endIsDouble ) {
@@ -3434,14 +3434,14 @@ void KDChartAxesPainter::calculateLabelTexts(
pDelimDelta,
pTextsX, pTextsY, pTextsW, pTextsH,
textAlign );
- QFont font( para.axisLabelsFont() );
+ TQFont font( para.axisLabelsFont() );
if ( para.axisLabelsFontUseRelSize() )
font.setPixelSize( static_cast < int > ( nTxtHeight ) );
painter->setFont( font );
- QFontMetrics fm( painter->fontMetrics() );
+ TQFontMetrics fm( painter->fontMetrics() );
if ( fm.width( prefix +
- QString::number( -fabs( ( s + f ) / 2.0 + delta ),
+ TQString::number( -fabs( ( s + f ) / 2.0 + delta ),
'f', precis ) )
> pTextsW ) {
prefix = "";
@@ -3451,7 +3451,7 @@ void KDChartAxesPainter::calculateLabelTexts(
value = up ? s : f;
while ( up ? ( value <= f ) : ( value >= s ) ) {
labelTexts.append(
- prefix + QString::number( value, 'f', precis )
+ prefix + TQString::number( value, 'f', precis )
+ postfix );
value += delta * up ? 1.0 : -1.0;
}
@@ -3467,13 +3467,13 @@ void KDChartAxesPainter::calculateLabelTexts(
pDelimDelta,
pTextsX, pTextsY, pTextsW, pTextsH,
textAlign );
- QFont font( para.axisLabelsFont() );
+ TQFont font( para.axisLabelsFont() );
if ( para.axisLabelsFontUseRelSize() )
font.setPixelSize( static_cast < int > ( nTxtHeight ) );
painter->setFont( font );
- QFontMetrics fm( painter->fontMetrics() );
+ TQFontMetrics fm( painter->fontMetrics() );
- if ( fm.width( prefix + QString::number( count - 1 ) )
+ if ( fm.width( prefix + TQString::number( count - 1 ) )
> pTextsW ) {
prefix = "";
postfix = "";
@@ -3481,7 +3481,7 @@ void KDChartAxesPainter::calculateLabelTexts(
// now transfer the strings into labelTexts
for ( uint i = 1; i <= count; ++i )
labelTexts.append(
- prefix + QString::number( i ) + postfix );
+ prefix + TQString::number( i ) + postfix );
}
}
}
@@ -3511,12 +3511,12 @@ void KDChartAxesPainter::calculateLabelTexts(
/*
qDebug( "Found label texts:" );
- for ( QStringList::Iterator it = labelTexts.begin();
+ for ( TQStringList::Iterator it = labelTexts.begin();
it != labelTexts.end(); ++it )
qDebug( ">>> %s", (*it).latin1() );
qDebug( "\n" );
*/
-//qDebug("\nleaving KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+QString::number(nTxtHeight));
+//qDebug("\nleaving KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight));
}
@@ -3545,7 +3545,7 @@ void KDChartAxesPainter::calculateBasicTextFactors( double nTxtHeight,
const KDChartAxisParams& para,
double /*averageValueP1000*/,
KDChartAxisParams::AxisPos basicPos,
- const QPoint& orig,
+ const TQPoint& orig,
double delimLen,
uint nLabels,
// start of return params
@@ -3573,7 +3573,7 @@ void KDChartAxesPainter::calculateBasicTextFactors( double nTxtHeight,
pTextsH = para.axisTrueAreaRect().height() - delimLen * 1.33;
pTextsY = orig.y()
+ delimLen * 1.33;
- textAlign = Qt::AlignHCenter | Qt::AlignTop;
+ textAlign = TQt::AlignHCenter | TQt::AlignTop;
/*
qDebug("pTextsW %f wid %f nLabels %u", pTextsW, wid, nLabels );
*/
@@ -3589,7 +3589,7 @@ void KDChartAxesPainter::calculateBasicTextFactors( double nTxtHeight,
pTextsW = para.axisTrueAreaRect().width()
- delimLen * 1.33 - 2.0;
pTextsH = nTxtHeight;
- textAlign = Qt::AlignRight | Qt::AlignVCenter;
+ textAlign = TQt::AlignRight | TQt::AlignVCenter;
}
break;
case KDChartAxisParams::AxisPosTop: {
@@ -3609,7 +3609,7 @@ void KDChartAxesPainter::calculateBasicTextFactors( double nTxtHeight,
: 0.0 );
pTextsH = para.axisTrueAreaRect().height() - delimLen * 1.33;
pTextsY = para.axisTrueAreaRect().topLeft().y();
- textAlign = Qt::AlignHCenter | Qt::AlignBottom;
+ textAlign = TQt::AlignHCenter | TQt::AlignBottom;
}
break;
case KDChartAxisParams::AxisPosRight: {
@@ -3622,7 +3622,7 @@ void KDChartAxesPainter::calculateBasicTextFactors( double nTxtHeight,
pTextsW = para.axisTrueAreaRect().width()
- delimLen * 1.33 - 2.0;
pTextsH = nTxtHeight;
- textAlign = Qt::AlignLeft | Qt::AlignVCenter;
+ textAlign = TQt::AlignLeft | TQt::AlignVCenter;
}
break;
default: {
@@ -3635,7 +3635,7 @@ void KDChartAxesPainter::calculateBasicTextFactors( double nTxtHeight,
/**
- Takes double \c nVal and returns a QString showing the amount of digits
+ Takes double \c nVal and returns a TQString showing the amount of digits
behind the comma that was specified by \c behindComma (or calculated
automatically by removing trailing zeroes, resp.).
To make sure the resulting string looks fine together with other strings
@@ -3648,7 +3648,7 @@ void KDChartAxesPainter::calculateBasicTextFactors( double nTxtHeight,
\note This function is reserved for internal use.
*/
-QString KDChartAxesPainter::truncateBehindComma( const double nVal,
+TQString KDChartAxesPainter::truncateBehindComma( const double nVal,
const int behindComma,
const double nDelta,
int& trueBehindComma )
@@ -3657,13 +3657,13 @@ QString KDChartAxesPainter::truncateBehindComma( const double nVal,
const bool bUseAutoDigits = KDCHART_AXIS_LABELS_AUTO_DIGITS == behindComma;
const bool bAutoDelta = KDCHART_AXIS_LABELS_AUTO_DELTA == nDelta;
- QString sVal;
+ TQString sVal;
sVal.setNum( nVal, 'f', bUseAutoDigits ? nTrustedPrecision
- : QMIN(behindComma, nTrustedPrecision) );
+ : TQMIN(behindComma, nTrustedPrecision) );
//qDebug("nVal: %f sVal: "+sVal, nVal );
- //qDebug( QString(" %1").arg(sVal));
+ //qDebug( TQString(" %1").tqarg(sVal));
if ( bUseAutoDigits ) {
- int comma = sVal.find( '.' );
+ int comma = sVal.tqfind( '.' );
if ( -1 < comma ) {
if ( bAutoDelta ) {
int i = sVal.length();
@@ -3675,7 +3675,7 @@ QString KDChartAxesPainter::truncateBehindComma( const double nVal,
sVal.truncate( i - 1 );
} else {
if ( 0 > trueBehindComma ) {
- QString sDelta = QString::number( nDelta, 'f', nTrustedPrecision );
+ TQString sDelta = TQString::number( nDelta, 'f', nTrustedPrecision );
int i = sDelta.length();
while ( 1 < i
&& '0' == sDelta[ i - 1 ] )
@@ -3684,7 +3684,7 @@ QString KDChartAxesPainter::truncateBehindComma( const double nVal,
if ( '.' == sDelta[ i - 1 ] )
trueBehindComma = 0;
else {
- int deltaComma = sDelta.find( '.' );
+ int deltaComma = sDelta.tqfind( '.' );
if ( -1 < deltaComma )
trueBehindComma = sDelta.length() - deltaComma - 1;
else
@@ -3697,13 +3697,13 @@ QString KDChartAxesPainter::truncateBehindComma( const double nVal,
}
}
}
- //qDebug( QString(" - %1").arg(trueBehindComma));
+ //qDebug( TQString(" - %1").tqarg(trueBehindComma));
return sVal;
}
#if 0
-#if defined ( Q_WS_WIN)
+#if defined ( TQ_WS_WIN)
#define trunc(x) ((int)(x))
#endif
@@ -3721,18 +3721,18 @@ double trunc(double x)
#endif
-QString KDChartAxesPainter::applyLabelsFormat( const double nVal_,
+TQString KDChartAxesPainter::applyLabelsFormat( const double nVal_,
int divPow10,
int behindComma,
double nDelta_,
int& trueBehindComma,
KDChartEnums::NumberNotation notation,
- const QString& decimalPoint,
- const QString& thousandsPoint,
- const QString& prefix,
- const QString& postfix,
+ const TQString& decimalPoint,
+ const TQString& thousandsPoint,
+ const TQString& prefix,
+ const TQString& postfix,
int totalLen,
- const QChar& padFill,
+ const TQChar& padFill,
bool blockAlign )
{
double nVal = nVal_ / fastPow10( divPow10 );
@@ -3741,21 +3741,21 @@ QString KDChartAxesPainter::applyLabelsFormat( const double nVal_,
double valLog10 = 0.0;
if( notation == KDChartEnums::NumberNotationScientific ||
notation == KDChartEnums::NumberNotationScientificBig ){
- valLog10 = (nVal != 0.0) ? trunc( log10(QABS(nVal)) ) : 0.0;
+ valLog10 = (nVal != 0.0) ? trunc( log10(TQABS(nVal)) ) : 0.0;
//qDebug("nVal old: %f valLog10: %f",nVal,valLog10);
nVal /= fastPow10( valLog10 );
nDelta /= fastPow10( valLog10 );
//qDebug("nVal new: %f",nVal);
}
- QString sVal = truncateBehindComma( nVal,
+ TQString sVal = truncateBehindComma( nVal,
behindComma,
nDelta,
trueBehindComma );
//qDebug("sVal : "+sVal+" behindComma: %i",behindComma);
- int posComma = sVal.find( '.' );
+ int posComma = sVal.tqfind( '.' );
if( 0 <= posComma ){
- sVal.replace( posComma, 1, decimalPoint);
+ sVal.tqreplace( posComma, 1, decimalPoint);
}else{
posComma = sVal.length();
}
@@ -3765,7 +3765,7 @@ QString KDChartAxesPainter::applyLabelsFormat( const double nVal_,
sVal.append( "e" );
else
sVal.append( "E" );
- sVal.append( QString::number( valLog10, 'f', 0 ) );
+ sVal.append( TQString::number( valLog10, 'f', 0 ) );
} else {
if( thousandsPoint.length() ){
const int minLen = (0 < sVal.length() && '-' == sVal[0])
@@ -3795,8 +3795,8 @@ QString KDChartAxesPainter::applyLabelsFormat( const double nVal_,
*and the user has set axisLabelsDigitsBehindComma() == 0
*return an empty string
*/
- if ( behindComma == 0 && QString::number(nVal).find('.') > 0 )
- sVal = QString::null;//sVal = "";
+ if ( behindComma == 0 && TQString::number(nVal).tqfind('.') > 0 )
+ sVal = TQString();//sVal = "";
return sVal;
}
@@ -3835,7 +3835,7 @@ void KDChartAxesPainter::calculateOrdinateFactors(
}
} else {
nDivisor = 1.0;
- QString sDistDigis2;
+ TQString sDistDigis2;
sDistDigis2.setNum( nDist, 'f', 24);
if ( 1.0 > nDist ) {
sDistDigis2.remove( 0, 2 );
@@ -3854,7 +3854,7 @@ void KDChartAxesPainter::calculateOrdinateFactors(
if ( 100.0 > nDist )
nDivisor = 1.0;
else {
- int comma = sDistDigis2.find( '.' );
+ int comma = sDistDigis2.tqfind( '.' );
if ( -1 < comma )
sDistDigis2.truncate( comma );
nDivisor = fastPow10( (int)sDistDigis2.length() - 2 );
@@ -3955,12 +3955,12 @@ void KDChartAxesPainter::calculateOrdinateFactors(
}
/**** static ****/
-void KDChartAxesPainter::saveDrawLine( QPainter& painter,
- QPoint pA,
- QPoint pZ,
- QPen pen )
+void KDChartAxesPainter::saveDrawLine( TQPainter& painter,
+ TQPoint pA,
+ TQPoint pZ,
+ TQPen pen )
{
- const QPen oldPen( painter.pen() );
+ const TQPen oldPen( painter.pen() );
bool bNice = ( pen.color() == oldPen.color() )
&& ( pen.width() == oldPen.width() )
&& ( pen.style() == oldPen.style() );
@@ -3972,7 +3972,7 @@ void KDChartAxesPainter::saveDrawLine( QPainter& painter,
}
/**** static ****/
-void KDChartAxesPainter::dtAddSecs( const QDateTime& org, const int secs, QDateTime& dest )
+void KDChartAxesPainter::dtAddSecs( const TQDateTime& org, const int secs, TQDateTime& dest )
{
//qDebug("entering KDChartAxesPainter::dtAddSecs() ..");
int s = org.time().second();
@@ -3999,7 +3999,7 @@ void KDChartAxesPainter::dtAddSecs( const QDateTime& org, const int secs, QDateT
}
}
}
- dest.setTime( QTime(h,m,s) );
+ dest.setTime( TQTime(h,m,s) );
dest.setDate( org.date() );
if( days )
dtAddDays( dest, days, dest );
@@ -4007,7 +4007,7 @@ void KDChartAxesPainter::dtAddSecs( const QDateTime& org, const int secs, QDateT
}
/**** static ****/
-void KDChartAxesPainter::dtAddDays( const QDateTime& org, const int days, QDateTime& dest )
+void KDChartAxesPainter::dtAddDays( const TQDateTime& org, const int days, TQDateTime& dest )
{
//qDebug("entering KDChartAxesPainter::dtAddDays() ..");
int d = org.date().day();
@@ -4021,7 +4021,7 @@ void KDChartAxesPainter::dtAddDays( const QDateTime& org, const int days, QDateT
if( 1 > d ){
if( 1 < m ){
--m;
- d = QDate( y,m,1 ).daysInMonth();
+ d = TQDate( y,m,1 ).daysInMonth();
}
else{
--y;
@@ -4029,7 +4029,7 @@ void KDChartAxesPainter::dtAddDays( const QDateTime& org, const int days, QDateT
d = 31;
}
// overrunning day?
- }else if( QDate( y,m,1 ).daysInMonth() < d ){
+ }else if( TQDate( y,m,1 ).daysInMonth() < d ){
if( 12 > m )
++m;
else{
@@ -4040,12 +4040,12 @@ void KDChartAxesPainter::dtAddDays( const QDateTime& org, const int days, QDateT
}
di += dd;
}
- dest = QDateTime( QDate( y,m,d ), org.time() );
+ dest = TQDateTime( TQDate( y,m,d ), org.time() );
//qDebug(".. KDChartAxesPainter::dtAddDays() done.");
}
/**** static ****/
-void KDChartAxesPainter::dtAddMonths( const QDateTime& org, const int months, QDateTime& dest )
+void KDChartAxesPainter::dtAddMonths( const TQDateTime& org, const int months, TQDateTime& dest )
{
//qDebug("entering KDChartAxesPainter::dtAddMonths() ..");
int d = org.date().day();
@@ -4064,22 +4064,22 @@ void KDChartAxesPainter::dtAddMonths( const QDateTime& org, const int months, QD
}
mi += md;
}
- // QMIN takes care for intercalary day
- dest = QDateTime( QDate( y,m,QMIN( d, QDate( y,m,1 ).daysInMonth() ) ),
+ // TQMIN takes care for intercalary day
+ dest = TQDateTime( TQDate( y,m,TQMIN( d, TQDate( y,m,1 ).daysInMonth() ) ),
org.time() );
//qDebug(".. KDChartAxesPainter::dtAddMonths() done.");
}
/**** static ****/
-void KDChartAxesPainter::dtAddYears( const QDateTime& org, const int years, QDateTime& dest )
+void KDChartAxesPainter::dtAddYears( const TQDateTime& org, const int years, TQDateTime& dest )
{
//qDebug("entering KDChartAxesPainter::dtAddYears() ..");
int d = org.date().day();
int m = org.date().month();
int y = org.date().year() + years;
dest.setTime( org.time() );
- // QMIN takes care for intercalary day
- dest = QDateTime( QDate( y,m,QMIN( d, QDate( y,m,d ).daysInMonth() ) ),
+ // TQMIN takes care for intercalary day
+ dest = TQDateTime( TQDate( y,m,TQMIN( d, TQDate( y,m,d ).daysInMonth() ) ),
org.time() );
//qDebug(".. KDChartAxesPainter::dtAddYears() done.");
}
@@ -4091,7 +4091,7 @@ void KDChartAxesPainter::calculateAbscissaInfos( const KDChartParams& params,
uint datasetStart,
uint datasetEnd,
double logWidth,
- const QRect& dataRect,
+ const TQRect& dataRect,
abscissaInfos& infos )
{
if( params.axisParams( KDChartAxisParams::AxisPosBottom ).axisVisible()
@@ -4133,7 +4133,7 @@ void KDChartAxesPainter::calculateAbscissaInfos( const KDChartParams& params,
else
infos.numValues = data.usedCols();
- QVariant::Type type2Ref = QVariant::Invalid;
+ TQVariant::Type type2Ref = TQVariant::Invalid;
infos.bCellsHaveSeveralCoordinates =
data.cellsHaveSeveralCoordinates( datasetStart, datasetEnd,
&type2Ref );
@@ -4165,7 +4165,7 @@ void KDChartAxesPainter::calculateAbscissaInfos( const KDChartParams& params,
//qDebug( "abscissaDelta = %f", abscissaDelta);
infos.bAbscissaHasTrueAxisDtValues =
- (QVariant::DateTime == type2Ref) &&
+ (TQVariant::DateTime == type2Ref) &&
infos.abscissaPara &&
infos.abscissaPara->trueAxisDtLow().isValid();
if( infos.bAbscissaHasTrueAxisDtValues ){
@@ -4181,10 +4181,10 @@ void KDChartAxesPainter::calculateAbscissaInfos( const KDChartParams& params,
: logWidth;
infos.abscissaDtStart = infos.bAbscissaHasTrueAxisDtValues
? infos.abscissaPara->trueAxisDtLow()
- : QDateTime();
+ : TQDateTime();
infos.abscissaDtEnd = infos.bAbscissaHasTrueAxisDtValues
? infos.abscissaPara->trueAxisDtHigh()
- : QDateTime();
+ : TQDateTime();
//Pending Michel case when same hh:mm:ss but different msecs
infos.bScaleLessThanDay = ( infos.bAbscissaHasTrueAxisDtValues
@@ -4196,12 +4196,12 @@ void KDChartAxesPainter::calculateAbscissaInfos( const KDChartParams& params,
// adjust the milli seconds:
infos.abscissaDtStart.setTime(
- QTime( infos.abscissaDtStart.time().hour(),
+ TQTime( infos.abscissaDtStart.time().hour(),
infos.abscissaDtStart.time().minute(),
infos.abscissaDtStart.time().second(),
0 ) );
infos.abscissaDtEnd.setTime(
- QTime( infos.abscissaDtEnd.time().hour(),
+ TQTime( infos.abscissaDtEnd.time().hour(),
infos.abscissaDtEnd.time().minute(),
infos.abscissaDtEnd.time().second(),
999 ) );
@@ -4283,13 +4283,13 @@ void KDChartAxesPainter::calculateAbscissaInfos( const KDChartParams& params,
-bool KDChartAxesPainter::calculateAbscissaAxisValue( const QVariant& value,
+bool KDChartAxesPainter::calculateAbscissaAxisValue( const TQVariant& value,
abscissaInfos& ai,
int colNumber,
double& xValue )
{
if( ai.bCellsHaveSeveralCoordinates ) {
- if( QVariant::Double == value.type() ) {
+ if( TQVariant::Double == value.type() ) {
double dVal = value.toDouble();
if( ai.bAbscissaIsLogarithmic ){
if( 0.0 < dVal )
@@ -4303,8 +4303,8 @@ bool KDChartAxesPainter::calculateAbscissaAxisValue( const QVariant& value,
xValue += ai.abscissaZeroPos;
}
else if( ai.bAbscissaHasTrueAxisDtValues &&
- QVariant::DateTime == value.type() ) {
- const QDateTime dtVal = value.toDateTime();
+ TQVariant::DateTime == value.type() ) {
+ const TQDateTime dtVal = value.toDateTime();
double dT = ( ai.bScaleLessThanDay )
? ai.abscissaDtStart.secsTo( dtVal )
: ai.abscissaDtStart.daysTo( dtVal );
@@ -4376,13 +4376,13 @@ bool KDChartAxesPainter::calculateAbscissaAxisValue( const QVariant& value,
Paints the actual data area and registers the region for the data
points if \a regions is not 0.
- \param painter the QPainter onto which the chart should be painted
+ \param painter the TQPainter onto which the chart should be painted
\param data the data that will be displayed as a chart
\param paint2nd specifies whether the main chart or the additional chart is to be drawn now
\param regions a pointer to a list of regions that will be filled
with regions representing the data segments, if not null
*/
-void KDChartAxesPainter::paintData( QPainter* painter,
+void KDChartAxesPainter::paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions )
@@ -4412,7 +4412,7 @@ void KDChartAxesPainter::paintData( QPainter* painter,
double areaWidthP1000 = logWidth / 1000.0;
int nClipShiftUp = clipShiftUp(bNormalMode, areaWidthP1000);
- QRect ourClipRect( _dataRect );
+ TQRect ourClipRect( _dataRect );
if ( 0 < ourClipRect.top() ) {
ourClipRect.setTop( ourClipRect.top() - nClipShiftUp );
ourClipRect.setHeight( ourClipRect.height() + nClipShiftUp - 1 );
@@ -4424,9 +4424,9 @@ void KDChartAxesPainter::paintData( QPainter* painter,
//ourClipRect.setLeft( ourClipRect.left() + 1 );
//ourClipRect.setRight( ourClipRect.right() - 1 );
- const QWMatrix & world = painter->worldMatrix();
+ const TQWMatrix & world = painter->tqworldMatrix();
ourClipRect =
-#if COMPAT_QT_VERSION >= 0x030000
+#if COMPAT_TQT_VERSION >= 0x030000
world.mapRect( ourClipRect );
#else
world.map( ourClipRect );
@@ -4463,7 +4463,7 @@ void KDChartAxesPainter::paintData( QPainter* painter,
if( axisDatasetStart >= chartDatasetStart
&& axisDatasetStart <= chartDatasetEnd )
- datasetStart = QMAX( axisDatasetStart, chartDatasetStart );
+ datasetStart = TQMAX( axisDatasetStart, chartDatasetStart );
else if( axisDatasetStart <= chartDatasetStart
&& axisDatasetEnd >= chartDatasetStart )
datasetStart = chartDatasetStart;
@@ -4471,7 +4471,7 @@ void KDChartAxesPainter::paintData( QPainter* painter,
datasetStart = 20;
if( axisDatasetEnd >= chartDatasetStart
&& axisDatasetEnd <= chartDatasetEnd )
- datasetEnd = QMIN( axisDatasetEnd, chartDatasetEnd );
+ datasetEnd = TQMIN( axisDatasetEnd, chartDatasetEnd );
else if( axisDatasetEnd >= chartDatasetEnd
&& axisDatasetStart <= chartDatasetEnd )
datasetEnd = chartDatasetEnd;