diff options
Diffstat (limited to 'kchart/kdchart/KDChartAxesPainter.cpp')
-rw-r--r-- | kchart/kdchart/KDChartAxesPainter.cpp | 380 |
1 files changed, 190 insertions, 190 deletions
diff --git a/kchart/kdchart/KDChartAxesPainter.cpp b/kchart/kdchart/KDChartAxesPainter.cpp index ee9dc879..24f5b915 100644 --- a/kchart/kdchart/KDChartAxesPainter.cpp +++ b/kchart/kdchart/KDChartAxesPainter.cpp @@ -174,7 +174,7 @@ bool KDChartAxesPainter::calculateAllAxesLabelTextsAndCalcValues( { uint iAxis; double averageValueP1000 = TQMIN(areaWidthP1000, areaHeightP1000);//( areaWidthP1000 + areaHeightP1000 ) / 2.0; - //qDebug("KChart::KDChartAxesPainter::calculateAllAxesLabelTextsAndCalcValues() averageValueP1000: %f", averageValueP1000); + //tqDebug("KChart::KDChartAxesPainter::calculateAllAxesLabelTextsAndCalcValues() averageValueP1000: %f", averageValueP1000); // length of little delimiter-marks indicating axis scaling delimLen = 20.0 * averageValueP1000; // per mille of area @@ -286,8 +286,8 @@ bool KDChartAxesPainter::calculateAllAxesLabelTextsAndCalcValues( && cv2.bSteadyCalc && ( fabs(cv2.nDelta) != fabs(nDelta) || fabs(cv2.nDeltaPix) != fabs(nDeltaPix) ) ){ - //qDebug("\nrecalculating scale for axis %x", iAxis2); - //qDebug("cv2.nDelta %f cv2.nDeltaPix %f nDelta %f nDeltaPix %f\n", + //tqDebug("\nrecalculating scale for axis %x", iAxis2); + //tqDebug("cv2.nDelta %f cv2.nDeltaPix %f nDelta %f nDeltaPix %f\n", // cv2.nDelta,cv2.nDeltaPix,nDelta,nDeltaPix); if( (cv2.nDelta >= 0.0) == (nDelta >= 0.0) ) cv2.nDelta = nDelta; @@ -321,7 +321,7 @@ bool KDChartAxesPainter::calculateAllAxesLabelTextsAndCalcValues( || ( cv2.nDelta == cv.nDelta && cv2.nDeltaPix < cv.nDeltaPix ) ){ // adjust this axis - //qDebug("recalculating scale for this axis %x", iAxis); + //tqDebug("recalculating scale for this axis %x", iAxis); cv.nDelta = cv2.nDelta; cv.nDeltaPix = cv2.nDeltaPix; reCalculateLabelTexts( @@ -335,8 +335,8 @@ bool KDChartAxesPainter::calculateAllAxesLabelTextsAndCalcValues( cv.nSubDelimFactor = cv2.nSubDelimFactor; }else{ // adjust the other axis - //qDebug("\nrecalculating scale for other axis %x", isoRef); - //qDebug("cv2.nDelta %f cv2.nDeltaPix %f cv.nDelta %f cv.nDeltaPix %f", + //tqDebug("\nrecalculating scale for other axis %x", isoRef); + //tqDebug("cv2.nDelta %f cv2.nDeltaPix %f cv.nDelta %f cv.nDeltaPix %f", // cv2.nDelta,cv2.nDeltaPix,cv.nDelta,cv.nDeltaPix); cv2.nDelta = cv.nDelta; cv2.nDeltaPix = cv.nDeltaPix; @@ -380,7 +380,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, // length of little delimiter-marks indicating axis scaling double delimLen; -//qDebug("-------------------------------------------------------------------------------------"); +//tqDebug("-------------------------------------------------------------------------------------"); calculateAllAxesLabelTextsAndCalcValues( painter, data, areaWidthP1000, areaHeightP1000, delimLen ); @@ -539,7 +539,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, // calculate font size const double minTextHeight = para.axisLabelsFontMinSize(); - //qDebug("KChart::KDChartAxesPainter::paintAxes() cv.nTxtHeight: %f minTextHeight: %f", cv.nTxtHeight, minTextHeight); + //tqDebug("KChart::KDChartAxesPainter::paintAxes() cv.nTxtHeight: %f minTextHeight: %f", cv.nTxtHeight, minTextHeight); if ( minTextHeight > cv.nTxtHeight ) cv.nTxtHeight = minTextHeight; TQFont actFont( para.axisLabelsFont() ); @@ -557,8 +557,8 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, TQString commonDtHeader; if( cv.autoDtLabels ){ cv.textAlign = TQt::AlignCenter; - //qDebug(dtLow.toString("\nd.MM.yyyy - h:mm:ss" )); - //qDebug(dtHigh.toString( "d.MM.yyyy - h:mm:ss" )); + //tqDebug(dtLow.toString("\nd.MM.yyyy - h:mm:ss" )); + //tqDebug(dtHigh.toString( "d.MM.yyyy - h:mm:ss" )); const TQDate& dLow = cv.dtLow.date(); const TQTime& tLow = cv.dtLow.time(); const TQDate& dHigh = cv.dtHigh.date(); @@ -619,7 +619,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, else if( sameYear ) commonDtHeader = TQString::number( dLow.year() ); //if( !commonDtHeader.isEmpty() ) - // qDebug(commonDtHeader); + // tqDebug(commonDtHeader); }else{ // make sure all label texts fit into their space // by rotating and/or shrinking the texts @@ -710,15 +710,15 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, < params()->globalLeadingLeft()+1 ){ textsMatching = false; textsDontFitIntoArea = true; - //qDebug("too wide"); + //tqDebug("too wide"); } - //qDebug("nRotation: %i",nRotation); + //tqDebug("nRotation: %i",nRotation); TQRegion sectReg; if( nRotation ){ - //qDebug("test 1"); + //tqDebug("test 1"); sectReg = infosKDD.region.intersect( unitedRegions ); }else{ - //qDebug("test 2"); + //tqDebug("test 2"); TQRect rect( infosKDD.region.boundingRect() ); rect.addCoords(-2,-2,2,2); TQRegion biggerRegion( rect ); @@ -729,7 +729,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, else { textsMatching = false; textsOverlapping = true; - //qDebug("label regions are intersecting"); + //tqDebug("label regions are intersecting"); break; } } @@ -737,9 +737,9 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, /* if(!iAxis){ - qDebug("nTxtHeight: "+TQString::number(cv.nTxtHeight)+" nRotation: "+TQString::number(nRotation)+ + tqDebug("nTxtHeight: "+TQString::number(cv.nTxtHeight)+" nRotation: "+TQString::number(nRotation)+ " matching: "+TQString(textsMatching ? "TRUE":"FALSE")); - qDebug("nUsableAxisHeight: %f, unitedRegions.boundingRect().height(): %i ", + tqDebug("nUsableAxisHeight: %f, unitedRegions.boundingRect().height(): %i ", nUsableAxisHeight, unitedRegions.boundingRect().height()); } */ @@ -750,18 +750,18 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, } } else { if( nUsableAxisWidth < unitedRegions.boundingRect().width() ){ - //qDebug("textsMatching: %s",textsMatching ? "TRUE" : "FALSE"); + //tqDebug("textsMatching: %s",textsMatching ? "TRUE" : "FALSE"); textsMatching = false; textsDontFitIntoArea = true; - //qDebug("too wide"); + //tqDebug("too wide"); } - //else qDebug("not too wide"); + //else tqDebug("not too wide"); } /* if(textsMatching && !iAxis){ - qDebug("--------------------------"); - qDebug("nTxtHeight: "+TQString::number(cv.nTxtHeight)+" nRotation: "+TQString::number(nRotation)); - qDebug("matching"); + tqDebug("--------------------------"); + tqDebug("nTxtHeight: "+TQString::number(cv.nTxtHeight)+" nRotation: "+TQString::number(nRotation)); + tqDebug("matching"); } */ if( !textsMatching ) { @@ -771,7 +771,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, // we try to rotate the texts in 5 steps. // This is done for Abscissa axes only. if ( tryRotating ) { - //qDebug("try rotating"); + //tqDebug("try rotating"); // The following is designed for horizontal axes // since we currently don't support label rotating // on vertical axes. (khz, 2002/08/15) @@ -781,7 +781,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, nRotation = nInitialRotation; } rotatingDoesNotHelp = true; - //qDebug("rotating does not help (a)"); + //tqDebug("rotating does not help (a)"); } else{ if( nRotation ) { @@ -795,7 +795,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, else nRotation = 0; // reset rotation to ZERO rotatingDoesNotHelp = true; - //qDebug("rotating does not help (b)"); + //tqDebug("rotating does not help (b)"); } } else { if( nInitialRotation ) @@ -811,7 +811,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, // rotating them did not help or is forbidden // we try to reduce the font size. if ( tryShrinking && (minTextHeight < cv.nTxtHeight) ) { - //qDebug("try shrinking"); + //tqDebug("try shrinking"); cv.nTxtHeight -= 1.0; if ( minTextHeight > cv.nTxtHeight ) cv.nTxtHeight = minTextHeight; @@ -823,9 +823,9 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, if( tryLeavingOut && textsOverlapping && (nLeaveOut+1 < static_cast < int > ( nLabels ) ) ) { - //qDebug("try leaving out"); + //tqDebug("try leaving out"); ++iStepsLeaveOut; - //if(!iAxis)qDebug("iStepsLeaveOut: %i", iStepsLeaveOut); + //if(!iAxis)tqDebug("iStepsLeaveOut: %i", iStepsLeaveOut); nLeaveOut = iStepsLeaveOut*stepWidthLeaveOut - 1; if( tryShrinking ) @@ -836,13 +836,13 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, } if( tryShrinking ) { actFont.setPixelSize( static_cast < int > ( cv.nTxtHeight ) ); - //qDebug("axis: cv.nTxtHeight: %f", iAxis, cv.nTxtHeight); + //tqDebug("axis: cv.nTxtHeight: %f", iAxis, cv.nTxtHeight); painter->setFont( actFont ); fm = painter->fontMetrics(); } } } -//qDebug("nLeaveOut: %i",nLeaveOut); +//tqDebug("nLeaveOut: %i",nLeaveOut); } while( !textsMatching ); if( nRotation ){ @@ -871,9 +871,9 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, painter->setBrush(oldBrush); */ /*if(!iAxis){ - qDebug("=========================="); - qDebug("nTxtHeight: "+TQString::number(nTxtHeight)+" nRotation: "+TQString::number(nRotation)); - qDebug(textsMatching ? "matching":"not matching"); + tqDebug("=========================="); + tqDebug("nTxtHeight: "+TQString::number(nTxtHeight)+" nRotation: "+TQString::number(nRotation)); + tqDebug(textsMatching ? "matching":"not matching"); }*/ } @@ -986,7 +986,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, double nSubDelim = ( labelTexts->count() - 1 ) / cv.nSubDelimFactor; - //qDebug("subDelim: %f", + //tqDebug("subDelim: %f", modf( nSubDelim, &nSubDelim ); int logarithCnt = 1; @@ -1137,14 +1137,14 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, if( cv.autoDtLabels ) { /* - qDebug("\ndtLow: %i %i %i %i:%i:%i", + tqDebug("\ndtLow: %i %i %i %i:%i:%i", dtLow.date().year(), dtLow.date().month(), dtLow.date().day(), dtLow.time().hour(), dtLow.time().minute(), dtLow.time().second()); - qDebug("dtHigh: %i %i %i %i:%i:%i", + tqDebug("dtHigh: %i %i %i %i:%i:%i", dtHigh.date().year(), dtHigh.date().month(), dtHigh.date().day(), @@ -1253,10 +1253,10 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, ? cv.dtHigh : newDt ); /* - qDebug(" dt: %i %i %i %i:%i:%i", + tqDebug(" dt: %i %i %i %i:%i:%i", newDt.date().year(),newDt.date().month(),newDt.date().day(), newDt.time().hour(),newDt.time().minute(),newDt.time().second()); - qDebug("testDt: %i %i %i %i:%i:%i", + tqDebug("testDt: %i %i %i %i:%i:%i", testDt.date().year(),testDt.date().month(),testDt.date().day(), testDt.time().hour(),testDt.time().minute(),testDt.time().second()); */ @@ -1412,18 +1412,18 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, TQPoint( static_cast<int>( p2X + pXD ), static_cast<int>( p2Y + pYD ) ) ); /* - qDebug("line"); - qDebug("pXDelta / 2.0 : %f", pXDelta/2.0); - qDebug("p2X - pHourX : %f", p2X - pHourX); + tqDebug("line"); + tqDebug("pXDelta / 2.0 : %f", pXDelta/2.0); + tqDebug("p2X - pHourX : %f", p2X - pHourX); */ if( (pXDelta/2.0 < p2X - pHourX) || (pYDelta/2.0 < p2Y - pHourY) ){ /* - qDebug("pHourX %f", pHourX ); - qDebug(" +pXD %i", pXD ); - qDebug(" -orgXD %i", orgXD); - qDebug("pHourY %f", pHourY ); - qDebug(" +pYD %i", pYD ); - qDebug(" -orgYD %i", orgYD); + tqDebug("pHourX %f", pHourX ); + tqDebug(" +pXD %i", pXD ); + tqDebug(" -orgXD %i", orgXD); + tqDebug("pHourY %f", pHourY ); + tqDebug(" +pYD %i", pYD ); + tqDebug(" -orgYD %i", orgYD); */ TQPen oldPen( painter->pen() ); painter->setPen( TQPen( labelsColor ) ); @@ -1852,7 +1852,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, y -= mult * pYDelta; axisZeroLineStartX = x; axisZeroLineStartY = y; - //qDebug( "axisZeroLineStartX %f, axisZeroLineStartY %f", + //tqDebug( "axisZeroLineStartX %f, axisZeroLineStartY %f", // axisZeroLineStartX, axisZeroLineStartY ); } @@ -1913,7 +1913,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, + xFactor * _dataRect.width() ), static_cast<int>( para.axisZeroLineStartY() + yFactor * _dataRect.height() ) ); - //qDebug("------"); + //tqDebug("------"); saveDrawLine( *painter, pZ0, pZ, @@ -1935,7 +1935,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter, internal__KDChart__CalcValues& cv2 = calcVal[ KDChartAxisParams::AxisPosBottom ]; const KDChartAxisParams& pa1 = params()->axisParams( KDChartAxisParams::AxisPosLeft ); const KDChartAxisParams& pa2 = params()->axisParams( KDChartAxisParams::AxisPosBottom ); -qDebug("\n\nx1: %i y1: %i w1: %i\nx2: %i y2: %i w2: %i", +tqDebug("\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 ){ @@ -1953,7 +1953,7 @@ cv2.orig.x(), cv2.orig.y(), pa2.axisTrueLineWidth() ); TQPointArray a; a.putPoints( 0, 3, pA.x(),pA.y(), pB.x(),pB.y(), pC.x(),pC.y() ); painter->drawPolyline( a ); -qDebug("done\n" ); +tqDebug("done\n" ); } */ // 2. draw the axes using their normal color @@ -2048,7 +2048,7 @@ void KDChartAxesPainter::calculateLabelTexts( double trueDelta, double trueDeltaPix ) { -//qDebug("\nentering KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight)); +//tqDebug("\nentering KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight)); const KDChartAxisParams & para = params.axisParams( axisNumber ); // store whether the labels are to be drawn in reverted order @@ -2072,9 +2072,9 @@ void KDChartAxesPainter::calculateLabelTexts( : para.axisTrueAreaRect().topRight(); pYDelimDeltaFaktor = 1.0; pXDeltaFactor = bDecreasing ? -1.0 : 1.0; - //qDebug("\nsetting pXDeltaFactor for axis %x", axisNumber); - //qDebug(bDecreasing ? "bDecreasing = TRUE" : "bDecreasing = FALSE"); - //qDebug("pXDeltaFactor = %f\n",pXDeltaFactor); + //tqDebug("\nsetting pXDeltaFactor for axis %x", axisNumber); + //tqDebug(bDecreasing ? "bDecreasing = TRUE" : "bDecreasing = FALSE"); + //tqDebug("pXDeltaFactor = %f\n",pXDeltaFactor); } break; case KDChartAxisParams::AxisPosLeft: { @@ -2115,7 +2115,7 @@ void KDChartAxesPainter::calculateLabelTexts( break; default: { axisLength = 0; - qDebug( "IMPLEMENTATION ERROR: KDChartAxesPainter::paintAxes() unhandled enum value." ); + tqDebug( "IMPLEMENTATION ERROR: KDChartAxesPainter::paintAxes() unhandled enum value." ); } break; } @@ -2126,7 +2126,7 @@ void KDChartAxesPainter::calculateLabelTexts( dataset = KDCHART_ALL_DATASETS; dataset2 = KDCHART_ALL_DATASETS; chart = 0; - //qDebug("\nautomatic set values: chart: %u,\ndataset: %u, dataset2: %u", + //tqDebug("\nautomatic set values: chart: %u,\ndataset: %u, dataset2: %u", //chart, dataset, dataset2); } // which dataset(s) with mode DataEntry (or mode ExtraLinesAnchor, resp.) @@ -2166,20 +2166,20 @@ void KDChartAxesPainter::calculateLabelTexts( } else { // Should not happen - qDebug( "IMPLEMENTATION ERROR: findDatasets( DataEntry, ExtraLinesAnchor ) should *always* return true. (b)" ); + tqDebug( "IMPLEMENTATION ERROR: findDatasets( DataEntry, ExtraLinesAnchor ) should *always* return true. (b)" ); dataDataset = KDCHART_ALL_DATASETS; } - //qDebug("\naxisNumber: %x\nchart: %x\ndataset: %x, dataset2: %x,\ndataDataset: %x, dataDataset2: %x", + //tqDebug("\naxisNumber: %x\nchart: %x\ndataset: %x, dataset2: %x,\ndataDataset: %x, dataDataset2: %x", //axisNumber, chart, dataset, dataset2, dataDataset, dataDataset2); if ( para.axisLabelsFontUseRelSize() ){ nTxtHeight = para.axisLabelsFontRelSize() * averageValueP1000; -//qDebug("using rel. size in KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight)); +//tqDebug("using rel. size in KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight)); }else { TQFontInfo info( para.axisLabelsFont() ); nTxtHeight = info.pointSize(); -//qDebug("using FIXED size in KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight)); +//tqDebug("using FIXED size in KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight)); } const KDChartEnums::NumberNotation notation = para.axisLabelsNotation(); @@ -2248,7 +2248,7 @@ void KDChartAxesPainter::calculateLabelTexts( } default: // Should not happen - qDebug( "KDChart: Unknown label texts source" ); + tqDebug( "KDChart: Unknown label texts source" ); } // if necessary adjust text params *including* the steady value calc setting @@ -2280,8 +2280,8 @@ void KDChartAxesPainter::calculateLabelTexts( (KDChartParams::Line == params_chartType) && (KDChartAxisParams::AxisCalcLogarithmic == para.axisCalcMode()); - //qDebug(bSteadyCalc ? "bSteadyCalc":"NOT bSteadyCalc"); - //qDebug(isLogarithmic? "isLogarithmic":"NOT isLogarithmic"); + //tqDebug(bSteadyCalc ? "bSteadyCalc":"NOT bSteadyCalc"); + //tqDebug(isLogarithmic? "isLogarithmic":"NOT isLogarithmic"); // store whether this is a vertical axis or a horizontal axis const bool bVertAxis = (KDChartAxisParams::AxisPosLeft == basicPos) || @@ -2346,9 +2346,9 @@ void KDChartAxesPainter::calculateLabelTexts( double nVal = nLow; bDone = false; bool bShowVeryLastLabel = false; - //qDebug("\n nLow: %f, nHigh: %f, nDelta: %f", nLow, nHigh, nDelta ); + //tqDebug("\n nLow: %f, nHigh: %f, nDelta: %f", nLow, nHigh, nDelta ); while( bShowVeryLastLabel || (upwards ? (nVal <= nHigh) : (nVal >= nHigh)) ){ - //qDebug("nVal : %f", nVal ); + //tqDebug("nVal : %f", nVal ); labelTexts.append( applyLabelsFormat( nVal, divPow10, behindComma, @@ -2363,7 +2363,7 @@ void KDChartAxesPainter::calculateLabelTexts( padFill, blockAlign ) ); nVal += nDelta; - //qDebug("nVal-neu: %f", nVal ); + //tqDebug("nVal-neu: %f", nVal ); if( ! (upwards ? (nVal <= nHigh) : (nVal >= nHigh)) ){ // work around a rounding error: show the last label, even if not nVal == nHigh is not matching exactly if( bShowVeryLastLabel ) @@ -2396,13 +2396,13 @@ void KDChartAxesPainter::calculateLabelTexts( padFill, blockAlign ) ); bShowVeryLastLabel = (sValue == sHigh); - //qDebug("test: sHigh: "+sHigh+" sValue: "+sValue ); + //tqDebug("test: sHigh: "+sHigh+" sValue: "+sValue ); } } bDone = true; } ( ( KDChartAxisParams& ) para ).setTrueAxisLowHighDelta( nLow, nHigh, nDelta ); - //qDebug("\n[Z-0] nLow: %f, nHigh: %f, nDelta: %f", nLow, nHigh, nDelta ); + //tqDebug("\n[Z-0] nLow: %f, nHigh: %f, nDelta: %f", nLow, nHigh, nDelta ); } // look if a string list was specified else if ( para.axisLabelStringCount() ) { int nLabels = bSteadyCalc @@ -2542,7 +2542,7 @@ void KDChartAxesPainter::calculateLabelTexts( // find out if the associated dataset contains only strings // if yes, we will take these as label texts uint dset = ( dataset == KDCHART_ALL_DATASETS ) ? 0 : dataset; - //qDebug("\ndset: %u", dset); + //tqDebug("\ndset: %u", dset); bDone = false; TQVariant value; for ( uint col = 0; col < data.usedCols(); ++col ) { @@ -2638,7 +2638,7 @@ void KDChartAxesPainter::calculateLabelTexts( break; default: { // Should not happen - qDebug( "IMPLEMENTATION ERROR: Unknown params_chartType in calculateLabelTexts()" ); + tqDebug( "IMPLEMENTATION ERROR: Unknown params_chartType in calculateLabelTexts()" ); mode = Normal; } } @@ -2654,7 +2654,7 @@ void KDChartAxesPainter::calculateLabelTexts( nDelta = fabs( trueDelta ); pDelimDelta = trueDeltaPix; nLow = TQMIN( para.trueAxisLow(), para.trueAxisHigh() ); - //qDebug("\nsearching: para.trueAxisLow() %f para.trueAxisHigh() %f",para.trueAxisLow(),para.trueAxisHigh()); + //tqDebug("\nsearching: para.trueAxisLow() %f para.trueAxisHigh() %f",para.trueAxisLow(),para.trueAxisHigh()); double orgLow( nLow ); modf( nLow / nDelta, &nLow ); nLow *= nDelta; @@ -2709,7 +2709,7 @@ void KDChartAxesPainter::calculateLabelTexts( nSubDelimFactor = 0.25; bOrdFactorsOk = true; }else{ - //qDebug("\ngo: nLow: %f nHigh: %f", nLow, nHigh ); + //tqDebug("\ngo: nLow: %f nHigh: %f", nLow, nHigh ); // get the raw start value const bool bStackedMode = (mode == Stacked); if( bAutoCalcStart ){ @@ -2719,7 +2719,7 @@ void KDChartAxesPainter::calculateLabelTexts( ? TQMIN( data.minColSum(), 0.0 ) : data.minValue( coordinate, isLogarithmic ); - //qDebug("\n1: nLow: %f", nLow ); + //tqDebug("\n1: nLow: %f", nLow ); }else{ dtLow = data.minDtValue( coordinate ); @@ -2768,7 +2768,7 @@ void KDChartAxesPainter::calculateLabelTexts( dtHigh = data.maxDtInRows( dataDataset,dataDataset2, coordinate ); } - //qDebug("\nbAutoCalcEnd:\n nLow: %f\n nHigh: %f", nLow, nHigh ); + //tqDebug("\nbAutoCalcEnd:\n nLow: %f\n nHigh: %f", nLow, nHigh ); }else{ if( bIsDouble ){ if( TQVariant::Double == para.axisValueEnd().type() ) @@ -2781,20 +2781,20 @@ void KDChartAxesPainter::calculateLabelTexts( } - //qDebug("\nnew: nLow: %f nHigh: %f", nLow, nHigh ); + //tqDebug("\nnew: nLow: %f nHigh: %f", nLow, nHigh ); if( bIsDouble ) { if( DBL_MAX == nLow || ( ( 0.0 == nHigh || 0 == nHigh ) && ( 0.0 == nLow || 0 == nLow ) ) ) { - // qDebug("NO values or all values have ZERO value, showing 0.0 - 10.0 span"); + // tqDebug("NO values or all values have ZERO value, showing 0.0 - 10.0 span"); nLow = 0.0; nHigh = 10.0; nDist = 10.0; nDelta = 1.0; nSubDelimFactor = 0.5; bOrdFactorsOk = true; - //qDebug("nLow: %f, nHigh: %f", nLow, nHigh); + //tqDebug("nLow: %f, nHigh: %f", nLow, nHigh); }else if( nLow == nHigh ){ // if both values are equal, but NOT Zero // -> move the appropriate one to Zero @@ -2802,7 +2802,7 @@ void KDChartAxesPainter::calculateLabelTexts( nHigh = 0.0; else nLow = 0.0; - //qDebug("nLow: %f, nHigh: %f", nLow, nHigh); + //tqDebug("nLow: %f, nHigh: %f", nLow, nHigh); }else if( nHigh < nLow ){ // make sure nLow is <= nHigh double nTmp = nLow; @@ -2881,7 +2881,7 @@ void KDChartAxesPainter::calculateLabelTexts( bool gotoEndOfMonth = false; switch( dtDeltaScale ) { case KDChartAxisParams::ValueScaleSecond: - //qDebug("\nKDChartAxisParams::ValueScaleSecond"); + //tqDebug("\nKDChartAxisParams::ValueScaleSecond"); if( 5.0 < aDist ){ secondLowD = secondLow % 5; if( secondHigh % 5 ) @@ -2889,19 +2889,19 @@ void KDChartAxesPainter::calculateLabelTexts( } break; case KDChartAxisParams::ValueScaleMinute: - //qDebug("\nKDChartAxisParams::ValueScaleMinute"); + //tqDebug("\nKDChartAxisParams::ValueScaleMinute"); secondLowD = secondLow; secondHighD = 59-secondHigh; break; case KDChartAxisParams::ValueScaleHour: - //qDebug("\nKDChartAxisParams::ValueScaleHour"); + //tqDebug("\nKDChartAxisParams::ValueScaleHour"); minuteLowD = minuteLow; secondLowD = secondLow; minuteHighD = 59-minuteHigh; secondHighD = 59-secondHigh; break; case KDChartAxisParams::ValueScaleDay: - //qDebug("\nKDChartAxisParams::ValueScaleDay"); + //tqDebug("\nKDChartAxisParams::ValueScaleDay"); hourLowD = hourLow; minuteLowD = minuteLow; secondLowD = secondLow; @@ -2910,7 +2910,7 @@ void KDChartAxesPainter::calculateLabelTexts( secondHighD = 59-secondHigh; break; case KDChartAxisParams::ValueScaleWeek: - //qDebug("\nKDChartAxisParams::ValueScaleWeek"); + //tqDebug("\nKDChartAxisParams::ValueScaleWeek"); // khz: week scaling is disabled at the moment /* dayLowD = dowLow - 1; @@ -2922,7 +2922,7 @@ void KDChartAxesPainter::calculateLabelTexts( */ break; case KDChartAxisParams::ValueScaleMonth: - //qDebug("\nKDChartAxisParams::ValueScaleMonth"); + //tqDebug("\nKDChartAxisParams::ValueScaleMonth"); if( 1 < dayLow ) dayLowD = dayLow - 1; hourLowD = hourLow; @@ -2931,7 +2931,7 @@ void KDChartAxesPainter::calculateLabelTexts( gotoEndOfMonth = true; break; case KDChartAxisParams::ValueScaleQuarter: - //qDebug("\nKDChartAxisParams::ValueScaleQuarter"); + //tqDebug("\nKDChartAxisParams::ValueScaleQuarter"); monthLowD = ( monthLow - 1 ) % 3; dayLowD = dayLow; hourLowD = hourLow; @@ -2942,7 +2942,7 @@ void KDChartAxesPainter::calculateLabelTexts( gotoEndOfMonth = true; break; case KDChartAxisParams::ValueScaleYear: - //qDebug("\nKDChartAxisParams::ValueScaleYear"); + //tqDebug("\nKDChartAxisParams::ValueScaleYear"); monthLowD = monthLow; dayLowD = dayLow; hourLowD = hourLow; @@ -2995,7 +2995,7 @@ void KDChartAxesPainter::calculateLabelTexts( // that may to contain NO data entries) int maxEmpty = para.axisMaxEmptyInnerSpan(); if( bAutoCalcStart ) { - //qDebug("\nbAutoCalcStart:\n nLow: %f\n nHigh: %f", nLow, nHigh ); + //tqDebug("\nbAutoCalcStart:\n nLow: %f\n nHigh: %f", nLow, nHigh ); if( 0.0 < nLow ) { if( maxEmpty == KDCHART_AXIS_IGNORE_EMPTY_INNER_SPAN || maxEmpty > ( nLow / nHigh * 100.0 ) ) @@ -3006,10 +3006,10 @@ void KDChartAxesPainter::calculateLabelTexts( else if( nDist / 100.0 < fabs( nLow ) ) nLow -= nDist / 100.0; // shift lowest value nDist = nHigh - nLow; - //qDebug("* nLow: %f\n nHigh: %f", nLow, nHigh ); + //tqDebug("* nLow: %f\n nHigh: %f", nLow, nHigh ); } if( bAutoCalcEnd ) { - //qDebug("\nbAutoCalcEnd:\n nLow: %f\n nHigh: %f", nLow, nHigh ); + //tqDebug("\nbAutoCalcEnd:\n nLow: %f\n nHigh: %f", nLow, nHigh ); if( 0.0 > nHigh ) { if( maxEmpty == KDCHART_AXIS_IGNORE_EMPTY_INNER_SPAN || maxEmpty > ( nHigh / nLow * 100.0 ) ) @@ -3020,7 +3020,7 @@ void KDChartAxesPainter::calculateLabelTexts( else if( nDist / 100.0 < fabs( nHigh ) ) nHigh += nDist / 100.0; // shift highest value nDist = nHigh - nLow; - //qDebug("* nLow: %f\n nHigh: %f\n\n", nLow, nHigh ); + //tqDebug("* nLow: %f\n nHigh: %f\n\n", nLow, nHigh ); } } } @@ -3028,7 +3028,7 @@ void KDChartAxesPainter::calculateLabelTexts( if( isLogarithmic ){ if( bIsDouble ) { - //qDebug("\n[L--] nLow: %f, nHigh: %f, nDelta: %f", nLow, nHigh, nDelta ); + //tqDebug("\n[L--] nLow: %f, nHigh: %f, nDelta: %f", nLow, nHigh, nDelta ); if( 0.0 == TQABS( nLow ) ) nLow = -5; else{ @@ -3040,10 +3040,10 @@ void KDChartAxesPainter::calculateLabelTexts( } nHigh = log10( TQABS( nHigh ) ); - //qDebug("[L-0] nLow: %f, nHigh: %f", nLow, nHigh ); + //tqDebug("[L-0] nLow: %f, nHigh: %f", nLow, nHigh ); double intPart=0.0; // initialization necessary for Borland C++ double fractPart = modf( nLow, &intPart ); - //qDebug(" intPart: %f\nfractPart: %f", intPart, fractPart ); + //tqDebug(" intPart: %f\nfractPart: %f", intPart, fractPart ); if( 0.0 > nLow && 0.0 != fractPart ) nLow = intPart - 1.0; else @@ -3055,7 +3055,7 @@ void KDChartAxesPainter::calculateLabelTexts( nDist = nHigh - nLow; nDelta = 1.0; nSubDelimFactor = 0.1; - //qDebug("\n[L-1] nLow: %f, nHigh: %f, nDelta: %f", nLow, nHigh, nDelta ); + //tqDebug("\n[L-1] nLow: %f, nHigh: %f, nDelta: %f", nLow, nHigh, nDelta ); bOrdFactorsOk = true; } } @@ -3067,7 +3067,7 @@ void KDChartAxesPainter::calculateLabelTexts( double nDivisor; double nRound; nDist = nHigh - nLow; - //qDebug("* nLow: %f\n nHigh: %f nDist: %f\n\n", nLow, nHigh, nDist ); + //tqDebug("* nLow: %f\n nHigh: %f nDist: %f\n\n", nLow, nHigh, nDist ); // find out factors and adjust nLow and nHigh orgLow = nLow; orgHigh = nHigh; @@ -3077,17 +3077,17 @@ void KDChartAxesPainter::calculateLabelTexts( nLow, nHigh ); nLabels = params.roundVal( nDist / nDelta ); - //qDebug("\n0. nOrgHigh: %f\n nOrgLow: %f", + //tqDebug("\n0. nOrgHigh: %f\n nOrgLow: %f", // orgHigh, orgLow); - //qDebug("\n nDist: %f\n nHigh: %f\n nLow: %f", + //tqDebug("\n nDist: %f\n nHigh: %f\n nLow: %f", // nDist, nHigh, nLow); - //qDebug(" nDelta: %f", nDelta); - //qDebug(" nRound: %f", nRound); - //qDebug(" nLabels: %u", nLabels); + //tqDebug(" nDelta: %f", nDelta); + //tqDebug(" nRound: %f", nRound); + //tqDebug(" nLabels: %u", nLabels); if( para.axisSteadyValueCalc() ) { ++nLabels; - //qDebug("* nLabels: %u", nLabels ); + //tqDebug("* nLabels: %u", nLabels ); } } @@ -3100,13 +3100,13 @@ void KDChartAxesPainter::calculateLabelTexts( nDelta = para.axisValueDelta(); nLabels = params.roundVal( nDist / nDelta ); - //qDebug("\nI nLow: %f\n nHigh: %f\n nDelta: %f\n nLabels: %u", + //tqDebug("\nI nLow: %f\n nHigh: %f\n nDelta: %f\n nLabels: %u", // nLow, nHigh, nDelta, nLabels ); if( para.axisSteadyValueCalc() ) { ++nLabels; - //qDebug("* nLabels: %u", nLabels ); + //tqDebug("* nLabels: %u", nLabels ); } } @@ -3120,10 +3120,10 @@ void KDChartAxesPainter::calculateLabelTexts( //make sure to avoid inf double areaHeight = para.axisTrueAreaRect().height()>0?para.axisTrueAreaRect().height():1.0; double widthHeight = areaWidth / areaHeight; - //qDebug( "widthHeight %f, nDelta %f", widthHeight, nDelta); - //qDebug( "maxValue %f", data.maxValue()); - //qDebug( "maxColSum %f", data.maxColSum()); - //qDebug( "axisValueEnd() %f", para.axisValueEnd().toDouble()); + //tqDebug( "widthHeight %f, nDelta %f", widthHeight, nDelta); + //tqDebug( "maxValue %f", data.maxValue()); + //tqDebug( "maxColSum %f", data.maxColSum()); + //tqDebug( "axisValueEnd() %f", para.axisValueEnd().toDouble()); double nDivisor; double nRound; orgLow = nLow; @@ -3145,7 +3145,7 @@ void KDChartAxesPainter::calculateLabelTexts( } else { orgHigh = nHigh = para.axisValueEnd().toDouble(); } - //qDebug("\ncalc ordinate 0. nDist: %f\n nLow: %f\n nHigh: %f\n nDelta: %f\n nLabels: %u", nDist, nLow, nHigh, nDelta, nLabels ); + //tqDebug("\ncalc ordinate 0. nDist: %f\n nLow: %f\n nHigh: %f\n nDelta: %f\n nLabels: %u", nDist, nLow, nHigh, nDelta, nLabels ); bool bTryNext = false; uint minLabels = para.axisSteadyValueCalc() ? 3 : 2; // the following must be processed at least twice - to avoid rounding errors @@ -3155,7 +3155,7 @@ void KDChartAxesPainter::calculateLabelTexts( nLow = orgLow; nHigh = orgHigh; /* - qDebug("\n=============================================================================\ncalc ordinate 1. nDist: %f\n nLow: %f\n nHigh: %f\n nDelta: %f\n nLabels: %u", + tqDebug("\n=============================================================================\ncalc ordinate 1. nDist: %f\n nLow: %f\n nHigh: %f\n nDelta: %f\n nLabels: %u", nDist, nLow, nHigh, nDelta, nLabels ); */ calculateOrdinateFactors( para, isLogarithmic, @@ -3165,23 +3165,23 @@ void KDChartAxesPainter::calculateLabelTexts( bTryNext ); nLabels = params.roundVal( nDist / nDelta ); - //qDebug("\ncalc ordinate 2. nDist: %f\n+ nLow: %f\n nHigh: %f\n nDelta: %f\n nLabels: %u", + //tqDebug("\ncalc ordinate 2. nDist: %f\n+ nLow: %f\n nHigh: %f\n nDelta: %f\n nLabels: %u", //nDist, nLow, nHigh, nDelta, nLabels ); //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()); + //tqDebug("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. if( !bAutoCalcEnd && orgHigh > nLow + nLabels * nDelta ) { ++nLabels; - //qDebug("\nnLabels: %u\n", nLabels ); + //tqDebug("\nnLabels: %u\n", nLabels ); } if( para.axisSteadyValueCalc() ) { ++nLabels; - //qDebug("\nnLabels: %u\n", nLabels ); + //tqDebug("\nnLabels: %u\n", nLabels ); } - //qDebug("calc ordinate n. nDist = nHigh - nLow: %f = %f - %f",nDist, nHigh, nLow); - //qDebug(" nRound: %f\n", nRound); + //tqDebug("calc ordinate n. nDist = nHigh - nLow: %f = %f - %f",nDist, nHigh, nLow); + //tqDebug(" nRound: %f\n", nRound); bTryNext = true; ++pass; }while ( ( pass < 2 ) @@ -3229,13 +3229,13 @@ void KDChartAxesPainter::calculateLabelTexts( } // save our true Low and High value - //qDebug(para.axisSteadyValueCalc()?"\ntrue " : "\nfalse"); - //qDebug("nVal: %f, nDelta: %f", nVal, nDelta ); + //tqDebug(para.axisSteadyValueCalc()?"\ntrue " : "\nfalse"); + //tqDebug("nVal: %f, nDelta: %f", nVal, nDelta ); if ( para.axisSteadyValueCalc() ) { nHigh = nVal - nDelta; } ( ( KDChartAxisParams& ) para ).setTrueAxisLowHighDelta( nLow, nHigh, nDelta ); - //qDebug("[Z] nLow: %f, nHigh: %f, nDelta: %f", nLow, nHigh, nDelta ); + //tqDebug("[Z] nLow: %f, nHigh: %f, nDelta: %f", nLow, nHigh, nDelta ); } else { bool goDown = dtLow > dtHigh; @@ -3243,29 +3243,29 @@ void KDChartAxesPainter::calculateLabelTexts( TQDateTime dt( dtLow ); nLabels = 0; /* - qDebug("dtLow: "); - qDebug(dtLow.toString( Qt::ISODate )); - qDebug("dtHigh: "); - qDebug(dtHigh.toString( Qt::ISODate )); + tqDebug("dtLow: "); + tqDebug(dtLow.toString( Qt::ISODate )); + tqDebug("dtHigh: "); + tqDebug(dtHigh.toString( Qt::ISODate )); */ bool bDone=false; while( !bDone ) { /* - qDebug("dtLow: %i %i %i %i:%i:%i", + tqDebug("dtLow: %i %i %i %i:%i:%i", dtLow.date().year(), dtLow.date().month(), dtLow.date().day(), dtLow.time().hour(), dtLow.time().minute(), dtLow.time().second()); - qDebug("dtHigh: %i %i %i %i:%i:%i", + tqDebug("dtHigh: %i %i %i %i:%i:%i", dtHigh.date().year(), dtHigh.date().month(), dtHigh.date().day(), dtHigh.time().hour(), dtHigh.time().minute(), dtHigh.time().second()); - qDebug("dt: %i %i %i %i:%i:%i", + tqDebug("dt: %i %i %i %i:%i:%i", dt.date().year(), dt.date().month(), dt.date().day(), @@ -3336,15 +3336,15 @@ void KDChartAxesPainter::calculateLabelTexts( : (data.usedCols() ? data.usedCols() : 1); //double start( 1.0 ); double start( 1.0 + (bSteadyCalc ? 0.0 : static_cast < double >(data.colsScrolledBy())) ); -//qDebug("colsScrolledBy: %i", data.colsScrolledBy()); +//tqDebug("colsScrolledBy: %i", data.colsScrolledBy()); //if(bVertAxis) -//qDebug("vert nVal starting: %f",start); +//tqDebug("vert nVal starting: %f",start); //else -//qDebug("horz nVal starting: %f",start); +//tqDebug("horz nVal starting: %f",start); //if(bSteadyCalc) -//qDebug("bSteadyCalc"); +//tqDebug("bSteadyCalc"); //else -//qDebug("not bSteadyCalc"); +//tqDebug("not bSteadyCalc"); double delta( 1.0 ); double finis( start + delta * ( count - 1 ) ); const bool startIsDouble = TQVariant::Double == para.axisValueStart().type(); @@ -3362,7 +3362,7 @@ void KDChartAxesPainter::calculateLabelTexts( if( endIsDouble ){ finis = para.axisValueEnd().toDouble(); start = finis - delta * ( count - 1 ); -//qDebug("1 changing: start: %f",start); +//tqDebug("1 changing: start: %f",start); } else { // // @@ -3374,7 +3374,7 @@ void KDChartAxesPainter::calculateLabelTexts( }else{ if ( startIsDouble ) { start = para.axisValueStart().toDouble() + (bSteadyCalc ? 0.0 : static_cast < double >(data.colsScrolledBy())); -//qDebug("2 changing: start: %f",start); +//tqDebug("2 changing: start: %f",start); } else { // // @@ -3416,7 +3416,7 @@ void KDChartAxesPainter::calculateLabelTexts( : para.axisDigitsBehindComma(); double s = start; double f = finis; -//qDebug("label loop: s: %f f: %f",s,f); +//tqDebug("label loop: s: %f f: %f",s,f); bool up = ( 0.0 < delta ); // check the text widths of one large(?) entry // and hope all the entries will @@ -3506,17 +3506,17 @@ void KDChartAxesPainter::calculateLabelTexts( ( ( KDChartAxisParams& ) para ).setTrueAxisDeltaPixels( pDelimDelta ); - //qDebug("\nsetting: para.trueAxisLow() %f para.trueAxisHigh() %f",para.trueAxisLow(),para.trueAxisHigh()); - //qDebug("\npDelimDelta: %f", pDelimDelta ); + //tqDebug("\nsetting: para.trueAxisLow() %f para.trueAxisHigh() %f",para.trueAxisLow(),para.trueAxisHigh()); + //tqDebug("\npDelimDelta: %f", pDelimDelta ); /* - qDebug( "Found label texts:" ); + tqDebug( "Found label texts:" ); for ( TQStringList::Iterator it = labelTexts.begin(); it != labelTexts.end(); ++it ) - qDebug( ">>> %s", (*it).latin1() ); - qDebug( "\n" ); + tqDebug( ">>> %s", (*it).latin1() ); + tqDebug( "\n" ); */ -//qDebug("\nleaving KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight)); +//tqDebug("\nleaving KDChartAxesPainter::calculateLabelTexts() : nTxtHeight: "+TQString::number(nTxtHeight)); } @@ -3575,7 +3575,7 @@ void KDChartAxesPainter::calculateBasicTextFactors( double nTxtHeight, + delimLen * 1.33; textAlign = TQt::AlignHCenter | TQt::AlignTop; /* - qDebug("pTextsW %f wid %f nLabels %u", pTextsW, wid, nLabels ); + tqDebug("pTextsW %f wid %f nLabels %u", pTextsW, wid, nLabels ); */ } break; @@ -3626,7 +3626,7 @@ void KDChartAxesPainter::calculateBasicTextFactors( double nTxtHeight, } break; default: { - qDebug( "IMPLEMENTATION ERROR: KDChartAxesPainter::calculateBasicTextFactors() unhandled enum value." ); + tqDebug( "IMPLEMENTATION ERROR: KDChartAxesPainter::calculateBasicTextFactors() unhandled enum value." ); // NOOP since the 'basicPos' does not support more that these four values. } break; @@ -3660,8 +3660,8 @@ TQString KDChartAxesPainter::truncateBehindComma( const double nVal, TQString sVal; sVal.setNum( nVal, 'f', bUseAutoDigits ? nTrustedPrecision : TQMIN(behindComma, nTrustedPrecision) ); - //qDebug("nVal: %f sVal: "+sVal, nVal ); - //qDebug( TQString(" %1").arg(sVal)); + //tqDebug("nVal: %f sVal: "+sVal, nVal ); + //tqDebug( TQString(" %1").arg(sVal)); if ( bUseAutoDigits ) { int comma = sVal.find( '.' ); if ( -1 < comma ) { @@ -3697,7 +3697,7 @@ TQString KDChartAxesPainter::truncateBehindComma( const double nVal, } } } - //qDebug( TQString(" - %1").arg(trueBehindComma)); + //tqDebug( TQString(" - %1").arg(trueBehindComma)); return sVal; } @@ -3742,16 +3742,16 @@ TQString KDChartAxesPainter::applyLabelsFormat( const double nVal_, if( notation == KDChartEnums::NumberNotationScientific || notation == KDChartEnums::NumberNotationScientificBig ){ valLog10 = (nVal != 0.0) ? trunc( log10(TQABS(nVal)) ) : 0.0; - //qDebug("nVal old: %f valLog10: %f",nVal,valLog10); + //tqDebug("nVal old: %f valLog10: %f",nVal,valLog10); nVal /= fastPow10( valLog10 ); nDelta /= fastPow10( valLog10 ); - //qDebug("nVal new: %f",nVal); + //tqDebug("nVal new: %f",nVal); } TQString sVal = truncateBehindComma( nVal, behindComma, nDelta, trueBehindComma ); - //qDebug("sVal : "+sVal+" behindComma: %i",behindComma); + //tqDebug("sVal : "+sVal+" behindComma: %i",behindComma); int posComma = sVal.find( '.' ); if( 0 <= posComma ){ @@ -3890,12 +3890,12 @@ void KDChartAxesPainter::calculateOrdinateFactors( nDelta *= -1.0; /* - qDebug(" n D i s t : %f", nDist ); - qDebug(" n D i v i s o r : %f", nDivisor); - qDebug(" n R o u n d : %f", nRound ); - qDebug(" n D e l t a : %f", nDelta ); - qDebug(" nHigh : %f", nHigh ); - qDebug(" nLow : %f", nLow ); + tqDebug(" n D i s t : %f", nDist ); + tqDebug(" n D i v i s o r : %f", nDivisor); + tqDebug(" n R o u n d : %f", nRound ); + tqDebug(" n D e l t a : %f", nDelta ); + tqDebug(" nHigh : %f", nHigh ); + tqDebug(" nLow : %f", nLow ); */ if( KDCHART_AXIS_LABELS_AUTO_LIMIT == para.axisValueStart() || !para.axisValueStartIsExact() ) { @@ -3931,8 +3931,8 @@ void KDChartAxesPainter::calculateOrdinateFactors( } } - //qDebug(" n H i g h : %f", nHigh ); - //qDebug(" n L o w : %f\n\n", nLow ); + //tqDebug(" n H i g h : %f", nHigh ); + //tqDebug(" n L o w : %f\n\n", nLow ); if ( 1.0 == nRound ) nSubDelimFactor = 0.5; @@ -3947,7 +3947,7 @@ void KDChartAxesPainter::calculateOrdinateFactors( nSubDelimFactor = 0.2; else { // Should not happen - qDebug( "IMPLEMENTATION ERROR: Unknown nRound in calculateOrdinateFactors()" ); + tqDebug( "IMPLEMENTATION ERROR: Unknown nRound in calculateOrdinateFactors()" ); nSubDelimFactor = 1.0; } @@ -3974,7 +3974,7 @@ void KDChartAxesPainter::saveDrawLine( TQPainter& painter, /**** static ****/ void KDChartAxesPainter::dtAddSecs( const TQDateTime& org, const int secs, TQDateTime& dest ) { - //qDebug("entering KDChartAxesPainter::dtAddSecs() .."); + //tqDebug("entering KDChartAxesPainter::dtAddSecs() .."); int s = org.time().second(); int m = org.time().minute(); int h = org.time().hour(); @@ -4003,13 +4003,13 @@ void KDChartAxesPainter::dtAddSecs( const TQDateTime& org, const int secs, TQDat dest.setDate( org.date() ); if( days ) dtAddDays( dest, days, dest ); - //qDebug(".. KDChartAxesPainter::dtAddSecs() done."); + //tqDebug(".. KDChartAxesPainter::dtAddSecs() done."); } /**** static ****/ void KDChartAxesPainter::dtAddDays( const TQDateTime& org, const int days, TQDateTime& dest ) { - //qDebug("entering KDChartAxesPainter::dtAddDays() .."); + //tqDebug("entering KDChartAxesPainter::dtAddDays() .."); int d = org.date().day(); int m = org.date().month(); int y = org.date().year(); @@ -4041,13 +4041,13 @@ void KDChartAxesPainter::dtAddDays( const TQDateTime& org, const int days, TQDat di += dd; } dest = TQDateTime( TQDate( y,m,d ), org.time() ); - //qDebug(".. KDChartAxesPainter::dtAddDays() done."); + //tqDebug(".. KDChartAxesPainter::dtAddDays() done."); } /**** static ****/ void KDChartAxesPainter::dtAddMonths( const TQDateTime& org, const int months, TQDateTime& dest ) { - //qDebug("entering KDChartAxesPainter::dtAddMonths() .."); + //tqDebug("entering KDChartAxesPainter::dtAddMonths() .."); int d = org.date().day(); int m = org.date().month(); int y = org.date().year(); @@ -4067,13 +4067,13 @@ void KDChartAxesPainter::dtAddMonths( const TQDateTime& org, const int months, T // TQMIN takes care for intercalary day dest = TQDateTime( TQDate( y,m,TQMIN( d, TQDate( y,m,1 ).daysInMonth() ) ), org.time() ); - //qDebug(".. KDChartAxesPainter::dtAddMonths() done."); + //tqDebug(".. KDChartAxesPainter::dtAddMonths() done."); } /**** static ****/ void KDChartAxesPainter::dtAddYears( const TQDateTime& org, const int years, TQDateTime& dest ) { - //qDebug("entering KDChartAxesPainter::dtAddYears() .."); + //tqDebug("entering KDChartAxesPainter::dtAddYears() .."); int d = org.date().day(); int m = org.date().month(); int y = org.date().year() + years; @@ -4081,7 +4081,7 @@ void KDChartAxesPainter::dtAddYears( const TQDateTime& org, const int years, TQD // TQMIN takes care for intercalary day dest = TQDateTime( TQDate( y,m,TQMIN( d, TQDate( y,m,d ).daysInMonth() ) ), org.time() ); - //qDebug(".. KDChartAxesPainter::dtAddYears() done."); + //tqDebug(".. KDChartAxesPainter::dtAddYears() done."); } @@ -4160,9 +4160,9 @@ void KDChartAxesPainter::calculateAbscissaInfos( const KDChartParams& params, ? ( infos.abscissaSpan / infos.numLabels ) : infos.abscissaSpan ); - //qDebug( bAbscissaDecreasing ? "bAbscissaDecreasing = TRUE" : "bAbscissaDecreasing = FALSE"); - //qDebug( abscissaHasTrueAxisValues ? "abscissaHasTrueAxisValues = TRUE" : "abscissaHasTrueAxisValues = FALSE"); - //qDebug( "abscissaDelta = %f", abscissaDelta); + //tqDebug( bAbscissaDecreasing ? "bAbscissaDecreasing = TRUE" : "bAbscissaDecreasing = FALSE"); + //tqDebug( abscissaHasTrueAxisValues ? "abscissaHasTrueAxisValues = TRUE" : "abscissaHasTrueAxisValues = FALSE"); + //tqDebug( "abscissaDelta = %f", abscissaDelta); infos.bAbscissaHasTrueAxisDtValues = (TQVariant::DateTime == type2Ref) && @@ -4205,10 +4205,10 @@ void KDChartAxesPainter::calculateAbscissaInfos( const KDChartParams& params, infos.abscissaDtEnd.time().minute(), infos.abscissaDtEnd.time().second(), 999 ) ); - //qDebug( infos.abscissaPara->trueAxisDtLow().toString("yyyy-MM-dd-hh:mm:ss.zzz")); - //qDebug( infos.abscissaPara->trueAxisDtHigh().toString("yyyy-MM-dd-hh:mm:ss.zzz")); - //qDebug(infos.abscissaDtStart.toString("yyyy-MM-dd-hh:mm:ss.zzz")); - //qDebug(infos.abscissaDtEnd.toString("yyyy-MM-dd-hh:mm:ss.zzz")); + //tqDebug( infos.abscissaPara->trueAxisDtLow().toString("yyyy-MM-dd-hh:mm:ss.zzz")); + //tqDebug( infos.abscissaPara->trueAxisDtHigh().toString("yyyy-MM-dd-hh:mm:ss.zzz")); + //tqDebug(infos.abscissaDtStart.toString("yyyy-MM-dd-hh:mm:ss.zzz")); + //tqDebug(infos.abscissaDtEnd.toString("yyyy-MM-dd-hh:mm:ss.zzz")); /* infos.bScaleLessThanDay = ( infos.bAbscissaHasTrueAxisDtValues ? infos.abscissaPara->trueAxisDtDeltaScale() @@ -4265,19 +4265,19 @@ void KDChartAxesPainter::calculateAbscissaInfos( const KDChartParams& params, //const double infos.abscissaZeroPos2 = -1.0 * infos.abscissaPixelsPerUnit * infos.abscissaStart; infos.abscissaZeroPos = infos.abscissaPara->axisZeroLineStartX() - dataRect.x(); - //qDebug("abscissaZeroPos %f abscissaZeroPos2 %f",abscissaZeroPos,abscissaZeroPos2); + //tqDebug("abscissaZeroPos %f abscissaZeroPos2 %f",abscissaZeroPos,abscissaZeroPos2); /* - qDebug(abscissaPara ? + tqDebug(abscissaPara ? "\nabscissaPara: OK" : "\nabscissaPara: leer"); - qDebug(abscissaHasTrueAxisValues ? + tqDebug(abscissaHasTrueAxisValues ? "abscissaHasTrueAxisValues: TRUE" : "abscissaHasTrueAxisValues: FALSE"); - qDebug("abscissaStart: %f", abscissaStart); - qDebug("abscissaEnd : %f", abscissaEnd); - qDebug("abscissaPara->trueAxisDelta(): %f", abscissaPara->trueAxisDelta()); - qDebug("numValues : %u, numLabels : %u", numValues, numLabels); + tqDebug("abscissaStart: %f", abscissaStart); + tqDebug("abscissaEnd : %f", abscissaEnd); + tqDebug("abscissaPara->trueAxisDelta(): %f", abscissaPara->trueAxisDelta()); + tqDebug("numValues : %u, numLabels : %u", numValues, numLabels); */ } @@ -4309,7 +4309,7 @@ bool KDChartAxesPainter::calculateAbscissaAxisValue( const TQVariant& value, ? ai.abscissaDtStart.secsTo( dtVal ) : ai.abscissaDtStart.daysTo( dtVal ); /* - qDebug("abscissaDtStart: %i %i %i %i:%i:%i.%i", + tqDebug("abscissaDtStart: %i %i %i %i:%i:%i.%i", ai.abscissaDtStart.date().year(), ai.abscissaDtStart.date().month(), ai.abscissaDtStart.date().day(), @@ -4318,10 +4318,10 @@ bool KDChartAxesPainter::calculateAbscissaAxisValue( const TQVariant& value, ai.abscissaDtStart.time().second(), ai.abscissaDtStart.time().msec()); */ - //qDebug("days to = %f",dT); + //tqDebug("days to = %f",dT); /* - qDebug(" dtVal: %i %i %i %i:%i:%i.%i", + tqDebug(" dtVal: %i %i %i %i:%i:%i.%i", dtVal.date().year(), dtVal.date().month(), dtVal.date().day(), @@ -4336,7 +4336,7 @@ bool KDChartAxesPainter::calculateAbscissaAxisValue( const TQVariant& value, / ( ai.bScaleLessThanDay ? 1000.0 : (1000.0 * 86400.0) ); - //qDebug("xValue: %f",xValue); + //tqDebug("xValue: %f",xValue); if( !ai.bScaleLessThanDay ){ if( dtVal.time().second() ) xValue += (ai.abscissaDtPixelsPerScaleUnit * dtVal.time().second()) @@ -4350,7 +4350,7 @@ bool KDChartAxesPainter::calculateAbscissaAxisValue( const TQVariant& value, } xValue *= ai.bAbscissaDecreasing ? -1.0 : 1.0; xValue += ai.dtLowPos; - // qDebug("xValue = dtLowPos + abscissaDtPixelsPerScaleUnit * dT\n%f = %f + %f * %f", + // tqDebug("xValue = dtLowPos + abscissaDtPixelsPerScaleUnit * dT\n%f = %f + %f * %f", // xValue, dtLowPos, abscissaDtPixelsPerScaleUnit, dT); } else @@ -4482,19 +4482,19 @@ void KDChartAxesPainter::paintData( TQPainter* painter, datasetEnd = chartDatasetEnd; } - //qDebug("\n==========================================================" + //tqDebug("\n==========================================================" // "\naxis %u axisDatasetStart %u axisDatasetEnd %u / chartDatasetStart %u chartDatasetEnd %u", //axis, axisDatasetStart, axisDatasetEnd, chartDatasetStart, chartDatasetEnd ); double logHeight = axisPara->axisTrueAreaRect().height(); double axisYOffset = axisPara->axisTrueAreaRect().y() - _dataRect.y(); - //qDebug("\n==========================================================\naxis %u logHeight %f axisDatasetStart %u chartDatasetStart %u axisDatasetEnd %u chartDatasetEnd %u", + //tqDebug("\n==========================================================\naxis %u logHeight %f axisDatasetStart %u chartDatasetStart %u axisDatasetEnd %u chartDatasetEnd %u", //axis, logHeight, axisDatasetStart, chartDatasetStart, axisDatasetEnd, chartDatasetEnd ); //if( KDCHART_ALL_DATASETS == axisDatasetStart ) - // qDebug(" ALL DATASETS"); + // tqDebug(" ALL DATASETS"); //if( KDCHART_NO_DATASET == axisDatasetStart ) - // qDebug(" N O DATESETS"); + // tqDebug(" N O DATESETS"); double maxColumnValue = axisPara->trueAxisHigh(); double minColumnValue = axisPara->trueAxisLow(); |