summaryrefslogtreecommitdiffstats
path: root/libkdchart
diff options
context:
space:
mode:
Diffstat (limited to 'libkdchart')
-rw-r--r--libkdchart/KDChart.cpp154
-rw-r--r--libkdchart/KDChart.h40
-rw-r--r--libkdchart/KDChartAreaPainter.cpp6
-rw-r--r--libkdchart/KDChartAreaPainter.h2
-rw-r--r--libkdchart/KDChartAxesPainter.cpp788
-rw-r--r--libkdchart/KDChartAxesPainter.h66
-rw-r--r--libkdchart/KDChartAxisParams.cpp240
-rw-r--r--libkdchart/KDChartAxisParams.h203
-rw-r--r--libkdchart/KDChartAxisParamsWrapper.cpp34
-rw-r--r--libkdchart/KDChartAxisParamsWrapper.h31
-rw-r--r--libkdchart/KDChartBWPainter.cpp102
-rw-r--r--libkdchart/KDChartBWPainter.h10
-rw-r--r--libkdchart/KDChartBarPainter.cpp142
-rw-r--r--libkdchart/KDChartBarPainter.h14
-rw-r--r--libkdchart/KDChartCustomBox.cpp150
-rw-r--r--libkdchart/KDChartCustomBox.h165
-rw-r--r--libkdchart/KDChartCustomBoxWrapper.cpp2
-rw-r--r--libkdchart/KDChartCustomBoxWrapper.h5
-rw-r--r--libkdchart/KDChartDataIntern.cpp34
-rw-r--r--libkdchart/KDChartDataIntern.h160
-rw-r--r--libkdchart/KDChartDataRegion.h66
-rw-r--r--libkdchart/KDChartEnums.cpp8
-rw-r--r--libkdchart/KDChartEnums.h57
-rw-r--r--libkdchart/KDChartGlobal.h135
-rw-r--r--libkdchart/KDChartHiLoPainter.cpp52
-rw-r--r--libkdchart/KDChartHiLoPainter.h10
-rw-r--r--libkdchart/KDChartLinesPainter.cpp127
-rw-r--r--libkdchart/KDChartLinesPainter.h12
-rw-r--r--libkdchart/KDChartListTable.h58
-rw-r--r--libkdchart/KDChartNotEnoughSpaceException.h2
-rw-r--r--libkdchart/KDChartObjectFactory.cpp196
-rw-r--r--libkdchart/KDChartObjectFactory.h50
-rw-r--r--libkdchart/KDChartPainter.cpp614
-rw-r--r--libkdchart/KDChartPainter.h118
-rw-r--r--libkdchart/KDChartParams.cpp789
-rw-r--r--libkdchart/KDChartParams.h576
-rw-r--r--libkdchart/KDChartParamsWrapper.cpp40
-rw-r--r--libkdchart/KDChartParamsWrapper.h43
-rw-r--r--libkdchart/KDChartParams_frame.cpp20
-rw-r--r--libkdchart/KDChartParams_io.cpp594
-rw-r--r--libkdchart/KDChartPiePainter.cpp124
-rw-r--r--libkdchart/KDChartPiePainter.h24
-rw-r--r--libkdchart/KDChartPolarPainter.cpp178
-rw-r--r--libkdchart/KDChartPolarPainter.h26
-rw-r--r--libkdchart/KDChartPropertySet.cpp60
-rw-r--r--libkdchart/KDChartPropertySet.h97
-rw-r--r--libkdchart/KDChartRingPainter.cpp62
-rw-r--r--libkdchart/KDChartRingPainter.h8
-rw-r--r--libkdchart/KDChartSeriesCollection.cpp26
-rw-r--r--libkdchart/KDChartSeriesCollection.h18
-rw-r--r--libkdchart/KDChartTable.h4
-rw-r--r--libkdchart/KDChartTableBase.cpp178
-rw-r--r--libkdchart/KDChartTableBase.h77
-rw-r--r--libkdchart/KDChartTableDataWrapper.cpp6
-rw-r--r--libkdchart/KDChartTableDataWrapper.h15
-rw-r--r--libkdchart/KDChartTextPiece.cpp100
-rw-r--r--libkdchart/KDChartTextPiece.h51
-rw-r--r--libkdchart/KDChartUnknownTypeException.h8
-rw-r--r--libkdchart/KDChartVectorSeries.cpp8
-rw-r--r--libkdchart/KDChartVectorSeries.h14
-rw-r--r--libkdchart/KDChartVectorTable.h45
-rw-r--r--libkdchart/KDChartWidget.cpp72
-rw-r--r--libkdchart/KDChartWidget.h53
-rw-r--r--libkdchart/KDChartWrapperFactory.cpp12
-rw-r--r--libkdchart/KDChartWrapperFactory.h6
-rw-r--r--libkdchart/KDDrawText.cpp232
-rw-r--r--libkdchart/KDDrawText.h44
-rw-r--r--libkdchart/KDFrame.cpp124
-rw-r--r--libkdchart/KDFrame.h149
-rw-r--r--libkdchart/KDFrameProfileSection.cpp24
-rw-r--r--libkdchart/KDFrameProfileSection.h38
-rw-r--r--libkdchart/KDXMLTools.cpp330
-rw-r--r--libkdchart/KDXMLTools.h128
-rw-r--r--libkdchart/kdchart_export.h2
74 files changed, 4090 insertions, 4168 deletions
diff --git a/libkdchart/KDChart.cpp b/libkdchart/KDChart.cpp
index 5a4b471..c7c8025 100644
--- a/libkdchart/KDChart.cpp
+++ b/libkdchart/KDChart.cpp
@@ -39,14 +39,14 @@
#include <KDChartGlobal.h>
#include <KDChartAxisParams.h>
-#include <qglobal.h>
-#include <qpainter.h>
-#include <qpaintdevice.h>
-#include <qpaintdevicemetrics.h>
+#include <tqglobal.h>
+#include <tqpainter.h>
+#include <tqpaintdevice.h>
+#include <tqpaintdevicemetrics.h>
-#ifdef QSA
+#ifdef TQSA
#if 0 // Disabled by ingwa to make it compile
-#include <qsinterpreter.h>
+#include <tqsinterpreter.h>
#include "KDChartWrapperFactory.h"
#include "KDChartObjectFactory.h"
#endif
@@ -56,15 +56,15 @@
\class KDChart KDChart.h
\brief Provides a single entry-point to the charting engine for
- applications that wish to provide their own QPainter.
+ applications that wish to provide their own TQPainter.
- It is not useful to instantiate this class as it contains
+ It is not useful to instantiate this class as it tqcontains
static methods only.
\note If for some reason you are NOT using the
KDChartWidget class but calling the painting methods of KDChart directly,
you probably will also use the KDChartDataRegionList class:
- This class is derived from QPtrList, so all of the Qt documentation
+ This class is derived from TQPtrList, so all of the TQt documentation
for this class is valid for KDChartDataRegionList too, e.g. freeing
of the pointers stored can either be done automatically or
manually - so PLEASE take the time to read the reference information for this class!
@@ -107,9 +107,9 @@ bool hasCartesianAxes( KDChartParams::ChartType chartType )
/**
- Calculates the drawing area from a given QPainter.
+ Calculates the drawing area from a given TQPainter.
- Use this function to get a QRect that you may pass to
+ Use this function to get a TQRect that you may pass to
KDChart::setupGeometry() if you need to know the positions and
sizes of the axis areas and/or the data area *before* drawing
the chart. After calling KDChart::setupGeometry() you may use
@@ -119,16 +119,16 @@ bool hasCartesianAxes( KDChartParams::ChartType chartType )
\return True if the painter was valid and the drawing area
could be calculated successfully, else false.
*/
-bool KDChart::painterToDrawRect( QPainter* painter, QRect& drawRect )
+bool KDChart::painterToDrawRect( TQPainter* painter, TQRect& drawRect )
{
if( painter ){
- QPaintDeviceMetrics painterMetrics( painter->device() );
- drawRect = QRect( 0, 0, painterMetrics.width(), painterMetrics.height() );
+ TQPaintDeviceMetrics painterMetrics( painter->device() );
+ drawRect = TQRect( 0, 0, painterMetrics.width(), painterMetrics.height() );
drawRect.setWidth( drawRect.width() -2 );
drawRect.setHeight( drawRect.height()-2 );
return true;
}else{
- drawRect = QRect( QPoint(0,0), QSize(0,0) );
+ drawRect = TQRect( TQPoint(0,0), TQSize(0,0) );
qDebug("ERROR: KDChartPainter::painterToDrawRect() was called with *no* painter.");
return false;
}
@@ -145,7 +145,7 @@ bool KDChart::painterToDrawRect( QPainter* painter, QRect& drawRect )
KDChartParams::axisArea() and/or KDChartParams::dataArea()
to retrieve the desired information.
- To get the right drawing area from a given QPainter please
+ To get the right drawing area from a given TQPainter please
use the static method KDChart::painterToDrawRect().
\param painter the painter that is eventually to be used for drawing
@@ -153,10 +153,10 @@ bool KDChart::painterToDrawRect( QPainter* painter, QRect& drawRect )
\param data the data that should be displayed as a chart
\param drawRect the position and size of the drawing area to be used
*/
-bool KDChart::setupGeometry( QPainter* painter,
+bool KDChart::setupGeometry( TQPainter* painter,
KDChartParams* params,
KDChartTableDataBase* data,
- const QRect& drawRect )
+ const TQRect& drawRect )
{
//qDebug("INVOKING: KDChart::setupGeometry()");
if( !params ){
@@ -168,11 +168,11 @@ bool KDChart::setupGeometry( QPainter* painter,
return false;
}
// don't crash due to memory problems when running on windows
-#ifdef Q_WS_WIN
- QPixmap::setDefaultOptimization(QPixmap::MemoryOptim);
+#ifdef TQ_WS_WIN
+ TQPixmap::setDefaultOptimization(TQPixmap::MemoryOptim);
#endif
- // Install a cleanup routine that is called when the Qt
+ // Install a cleanup routine that is called when the TQt
// application shuts down and cleans up any potentially still
// existing painters. Only do this once.
static bool bFirstCleanUpInstall = true;
@@ -239,7 +239,7 @@ bool KDChart::setupGeometry( QPainter* painter,
data structure, in case you need to keep track of region information,
that was valid for such previous times.
- \param painter the QPainter onto which the chart should be painted
+ \param painter the TQPainter onto which the chart should be painted
\param params the parameters defining the chart
\param data the data that should be displayed as a chart
\param regions if not null, this points to a
@@ -253,14 +253,14 @@ bool KDChart::setupGeometry( QPainter* painter,
immediately after a previous call of setupGeometry() to save some
time in case you have specified a lot of data cells.
*/
-void KDChart::paint( QPainter* painter,
+void KDChart::paint( TQPainter* painter,
KDChartParams* paraParams,
KDChartTableDataBase* paraData,
KDChartDataRegionList* regions,
- const QRect* rect,
+ const TQRect* rect,
bool mustCalculateGeometry )
{
-//qDebug("KDChart::paint() mustCalculateGeometry: "+QString(mustCalculateGeometry?"TRUE":"FALSE") );
+//qDebug("KDChart::paint() mustCalculateGeometry: "+TQString(mustCalculateGeometry?"TRUE":"FALSE") );
#if defined KDAB_EVAL
EvalDialog::checkEvalLicense( "KD Chart" );
#endif
@@ -291,7 +291,7 @@ void KDChart::paint( QPainter* painter,
data->setCell( 2, 0, 15.0 );
}
- QRect drawRect;
+ TQRect drawRect;
bool bOk = true;
if( mustCalculateGeometry || !cpainter || cpainter->outermostRect().isNull() ){
if( rect )
@@ -302,7 +302,7 @@ void KDChart::paint( QPainter* painter,
}
//qDebug("xxx" );
if( (params || data) && !setupGeometry( painter, params, data, drawRect ) ){
- qDebug("ERROR: KDChart::paint() could not calculate the chart geometry.");
+ qDebug("ERROR: KDChart::paint() could not calculate the chart tqgeometry.");
bOk = false;
}
}else{
@@ -340,7 +340,7 @@ void KDChart::paint( QPainter* painter,
/**
Paints a chart with the specified parameters on the specified
- painter which should use a QPrinter as it's output device.
+ painter which should use a TQPrinter as it's output device.
This method is provided for your convenience, it behaves
like the paint() method described above but additionally
@@ -351,10 +351,10 @@ void KDChart::paint( QPainter* painter,
\sa paint
*/
-void KDChart::print( QPainter* painter, KDChartParams* params,
+void KDChart::print( TQPainter* painter, KDChartParams* params,
KDChartTableDataBase* data,
KDChartDataRegionList* regions,
- const QRect* rect,
+ const TQRect* rect,
bool mustCalculateGeometry )
{
bool oldOpt=true;
@@ -379,23 +379,23 @@ void cleanupPainter()
KDChart::oldParams = 0;
}
-#ifdef QSA
-void KDChart::initInterpreter( QSInterpreter* interpreter )
+#ifdef TQSA
+void KDChart::initInterpreter( TQSInterpreter* interpreter )
{
privateInitInterpreter( interpreter );
interpreter->evaluate( globals() );
}
-void KDChart::initProject( QSProject* project )
+void KDChart::initProject( TQSProject* project )
{
- project->createScript( QString::fromLatin1( "KDCHART_Globals" ), globals() );
+ project->createScript( TQString::tqfromLatin1( "KDCHART_Globals" ), globals() );
privateInitInterpreter( project->interpreter() );
}
-QString KDChart::globals()
+TQString KDChart::globals()
{
- QString globals;
- QMap<char*, double> intMap;
+ TQString globals;
+ TQMap<char*, double> intMap;
intMap.insert( "KDCHART_POS_INFINITE", KDCHART_POS_INFINITE );
intMap.insert( "KDCHART_NEG_INFINITE", KDCHART_NEG_INFINITE );
@@ -429,60 +429,60 @@ QString KDChart::globals()
intMap.insert( "DBL_MIN", DBL_MIN );
intMap.insert( "DBL_MAX", DBL_MAX );
- for( QMapIterator<char*,double> it= intMap.begin(); it != intMap.end(); ++it ) {
+ for( TQMapIterator<char*,double> it= intMap.begin(); it != intMap.end(); ++it ) {
// This is written this way to be efficient
- globals += QString::fromLatin1( "const " );
+ globals += TQString::tqfromLatin1( "const " );
globals += it.key();
globals += " = ";
- globals += QString::number( it.data() );
+ globals += TQString::number( it.data() );
globals += ";\n";
}
- globals += QString::fromLatin1( "const KDCHART_AXIS_LABELS_AUTO_DATETIME_FORMAT=\"%1\";\n" )
- .arg( QString::fromLatin1( KDCHART_AXIS_LABELS_AUTO_DATETIME_FORMAT ) );
- globals += QString::fromLatin1( "const KDCHART_AXIS_LABELS_AUTO_LIMIT = 140319.64;\n" );
- globals += QString::fromLatin1( "const KDCHART_DEFAULT_AXIS_GRID_COLOR = new Color(\"%1\");\n" )
- .arg(KDCHART_DEFAULT_AXIS_GRID_COLOR.name());
- globals += QString::fromLatin1( "const KDCHART_DATA_VALUE_AUTO_COLOR = new Color(\"%1\");\n" )
- .arg( (KDCHART_DATA_VALUE_AUTO_COLOR)->name());
-
-
- QMap<char*,QColor> colorMap;
- colorMap.insert( "Qt.color0", Qt::color0 );
- colorMap.insert( "Qt.color1", Qt::color1 );
- colorMap.insert( "Qt.black", Qt::black );
- colorMap.insert( "Qt.white", Qt::white );
- colorMap.insert( "Qt.darkGray", Qt::darkGray );
- colorMap.insert( "Qt.gray", Qt::gray );
- colorMap.insert( "Qt.lightGray", Qt::lightGray );
- colorMap.insert( "Qt.red", Qt::red );
- colorMap.insert( "Qt.green", Qt::green );
- colorMap.insert( "Qt.blue", Qt::blue );
- colorMap.insert( "Qt.cyan", Qt::cyan );
- colorMap.insert( "Qt.magenta", Qt::magenta );
- colorMap.insert( "Qt.yellow", Qt::yellow );
- colorMap.insert( "Qt.darkRed", Qt::darkRed );
- colorMap.insert( "Qt.darkGreen", Qt::darkGreen );
- colorMap.insert( "Qt.darkBlue", Qt::darkBlue );
- colorMap.insert( "Qt.darkCyan", Qt::darkCyan );
- colorMap.insert( "Qt.darkMagenta", Qt::darkMagenta );
- colorMap.insert( "Qt.darkYellow", Qt::darkYellow );
- for( QMapIterator<char*,QColor> it2= colorMap.begin(); it2 != colorMap.end(); ++it2 ) {
+ globals += TQString::tqfromLatin1( "const KDCHART_AXIS_LABELS_AUTO_DATETIME_FORMAT=\"%1\";\n" )
+ .tqarg( TQString::tqfromLatin1( KDCHART_AXIS_LABELS_AUTO_DATETIME_FORMAT ) );
+ globals += TQString::tqfromLatin1( "const KDCHART_AXIS_LABELS_AUTO_LIMIT = 140319.64;\n" );
+ globals += TQString::tqfromLatin1( "const KDCHART_DEFAULT_AXIS_GRID_COLOR = new Color(\"%1\");\n" )
+ .tqarg(KDCHART_DEFAULT_AXIS_GRID_COLOR.name());
+ globals += TQString::tqfromLatin1( "const KDCHART_DATA_VALUE_AUTO_COLOR = new Color(\"%1\");\n" )
+ .tqarg( (KDCHART_DATA_VALUE_AUTO_COLOR)->name());
+
+
+ TQMap<char*,TQColor> colorMap;
+ colorMap.insert( "TQt.color0", TQt::color0 );
+ colorMap.insert( "TQt.color1", TQt::color1 );
+ colorMap.insert( "TQt.black", TQt::black );
+ colorMap.insert( "TQt.white", TQt::white );
+ colorMap.insert( "TQt.darkGray", TQt::darkGray );
+ colorMap.insert( "TQt.gray", TQt::gray );
+ colorMap.insert( "TQt.lightGray", TQt::lightGray );
+ colorMap.insert( "TQt.red", TQt::red );
+ colorMap.insert( "TQt.green", TQt::green );
+ colorMap.insert( "TQt.blue", TQt::blue );
+ colorMap.insert( "TQt.cyan", TQt::cyan );
+ colorMap.insert( "TQt.magenta", TQt::magenta );
+ colorMap.insert( "TQt.yellow", TQt::yellow );
+ colorMap.insert( "TQt.darkRed", TQt::darkRed );
+ colorMap.insert( "TQt.darkGreen", TQt::darkGreen );
+ colorMap.insert( "TQt.darkBlue", TQt::darkBlue );
+ colorMap.insert( "TQt.darkCyan", TQt::darkCyan );
+ colorMap.insert( "TQt.darkMagenta", TQt::darkMagenta );
+ colorMap.insert( "TQt.darkYellow", TQt::darkYellow );
+ for( TQMapIterator<char*,TQColor> it2= colorMap.begin(); it2 != colorMap.end(); ++it2 ) {
// This is written this way to be efficient
- globals += QString::fromLatin1( it2.key() );
- globals += QString::fromLatin1( " = new Color( " );
- globals += QString::number( it2.data().red() );
+ globals += TQString::tqfromLatin1( it2.key() );
+ globals += TQString::tqfromLatin1( " = new Color( " );
+ globals += TQString::number( it2.data().red() );
globals += ',';
- globals += QString::number( it2.data().green() );
+ globals += TQString::number( it2.data().green() );
globals += ',';
- globals += QString::number( it2.data().blue() );
- globals += QString::fromLatin1( " );\n" );
+ globals += TQString::number( it2.data().blue() );
+ globals += TQString::tqfromLatin1( " );\n" );
}
//qDebug( "%s",globals.latin1() );
return globals;
}
-void KDChart::privateInitInterpreter( QSInterpreter* interpreter )
+void KDChart::privateInitInterpreter( TQSInterpreter* interpreter )
{
interpreter->addWrapperFactory( new KDChartWrapperFactory );
interpreter->addObjectFactory ( new KDChartObjectFactory );
diff --git a/libkdchart/KDChart.h b/libkdchart/KDChart.h
index 4d4944e..1f91f25 100644
--- a/libkdchart/KDChart.h
+++ b/libkdchart/KDChart.h
@@ -29,9 +29,9 @@
#ifndef __KDCHART_H__
#define __KDCHART_H__
-#ifdef QSA
-#include <qsproject.h>
-#endif // QSA
+#ifdef TQSA
+#include <tqsproject.h>
+#endif // TQSA
#include "KDChartGlobal.h"
#include "KDChartTable.h"
@@ -41,15 +41,15 @@
/** \file KDChart.h
\brief Definition of a single entry-point to the charting engine for
- applications that wish to provide their own QPainter.
+ applications that wish to provide their own TQPainter.
- It is not useful to instantiate the KDChart class as it only contains
+ It is not useful to instantiate the KDChart class as it only tqcontains
static methods.
*/
class KDChartPainter;
-class QPainter;
-class QSInterpreter;
+class TQPainter;
+class TQSInterpreter;
class KDCHART_EXPORT KDChart
@@ -57,26 +57,26 @@ class KDCHART_EXPORT KDChart
friend void cleanupPainter();
public:
- static bool setupGeometry( QPainter* painter,
+ static bool setupGeometry( TQPainter* painter,
KDChartParams* params,
KDChartTableDataBase* data,
- const QRect& drawRect );
+ const TQRect& drawRect );
- static bool painterToDrawRect( QPainter* painter, QRect& drawRect );
+ static bool painterToDrawRect( TQPainter* painter, TQRect& drawRect );
- static void paint( QPainter*, KDChartParams*, KDChartTableDataBase*,
+ static void paint( TQPainter*, KDChartParams*, KDChartTableDataBase*,
KDChartDataRegionList* regions = 0,
- const QRect* rect = 0,
+ const TQRect* rect = 0,
bool mustCalculateGeometry = true );
- static void print( QPainter*, KDChartParams*, KDChartTableDataBase*,
+ static void print( TQPainter*, KDChartParams*, KDChartTableDataBase*,
KDChartDataRegionList* regions = 0,
- const QRect* rect = 0,
+ const TQRect* rect = 0,
bool mustCalculateGeometry = true );
-#ifdef QSA
- static void initInterpreter( QSInterpreter* );
- static void initProject( QSProject* );
+#ifdef TQSA
+ static void initInterpreter( TQSInterpreter* );
+ static void initProject( TQSProject* );
#endif
private:
@@ -88,9 +88,9 @@ class KDCHART_EXPORT KDChart
static KDChartParams::ChartType cpainterType;
static KDChartParams::ChartType cpainterType2;
-#ifdef QSA
- static QString globals();
- static void privateInitInterpreter( QSInterpreter* interpreter );
+#ifdef TQSA
+ static TQString globals();
+ static void privateInitInterpreter( TQSInterpreter* interpreter );
#endif
};
diff --git a/libkdchart/KDChartAreaPainter.cpp b/libkdchart/KDChartAreaPainter.cpp
index 19a8123..6c47aee 100644
--- a/libkdchart/KDChartAreaPainter.cpp
+++ b/libkdchart/KDChartAreaPainter.cpp
@@ -43,7 +43,7 @@
KDChartLinesPainter( params )
{
// This constructor intentionally left blank so far; we cannot setup the
- // geometry yet since we do not know the size of the painter.
+ // tqgeometry yet since we do not know the size of the painter.
}
@@ -59,13 +59,13 @@ KDChartAreaPainter::~KDChartAreaPainter()
/**
Paints the actual data area.
- \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 KDChartAreaPainter::paintData( QPainter* painter,
+void KDChartAreaPainter::paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions )
diff --git a/libkdchart/KDChartAreaPainter.h b/libkdchart/KDChartAreaPainter.h
index f334783..b862aab 100644
--- a/libkdchart/KDChartAreaPainter.h
+++ b/libkdchart/KDChartAreaPainter.h
@@ -41,7 +41,7 @@ class KDChartAreaPainter : public KDChartLinesPainter
KDChartAreaPainter( KDChartParams* params );
virtual ~KDChartAreaPainter();
- virtual void paintData( QPainter* painter,
+ virtual void paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions = 0 );
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;
diff --git a/libkdchart/KDChartAxesPainter.h b/libkdchart/KDChartAxesPainter.h
index 29e955b..bae3eb5 100644
--- a/libkdchart/KDChartAxesPainter.h
+++ b/libkdchart/KDChartAxesPainter.h
@@ -29,14 +29,14 @@
#ifndef __KDCHARTAXESPAINTER_H__
#define __KDCHARTAXESPAINTER_H__
-#include <qpen.h>
-#include <qpainter.h>
+#include <tqpen.h>
+#include <tqpainter.h>
#include <KDChartPainter.h>
#include <KDChartTable.h>
#include <KDChartAxisParams.h>
-class QDateTime;
+class TQDateTime;
class KDChartParams;
class KDChartAxesPainter : public KDChartPainter
@@ -45,10 +45,10 @@ class KDChartAxesPainter : public KDChartPainter
KDChartAxesPainter( KDChartParams* params );
virtual ~KDChartAxesPainter();
- virtual void paintAxes( QPainter* painter,
+ virtual void paintAxes( TQPainter* painter,
KDChartTableDataBase* data );
- virtual void paintData( QPainter* painter,
+ virtual void paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions );
@@ -66,8 +66,8 @@ class KDChartAxesPainter : public KDChartPainter
virtual int clipShiftUp( bool normalMode, double areaWidthP1000 ) const = 0;
// The actual, chart type specific drawing of the data.
- virtual void specificPaintData( QPainter* painter,
- const QRect& ourClipRect,
+ virtual void specificPaintData( TQPainter* painter,
+ const TQRect& ourClipRect,
KDChartTableDataBase* data,
KDChartDataRegionList* regions,
const KDChartAxisParams* axisPara,
@@ -86,7 +86,7 @@ class KDChartAxesPainter : public KDChartPainter
uint datasetEnd ) = 0;
virtual bool calculateAllAxesLabelTextsAndCalcValues(
- QPainter* painter,
+ TQPainter* painter,
KDChartTableDataBase* data,
double areaWidthP1000,
double areaHeightP1000,
@@ -112,8 +112,8 @@ class KDChartAxesPainter : public KDChartPainter
bool bAbscissaHasTrueAxisDtValues;
double dtLowPos;
double dtHighPos;
- QDateTime abscissaDtStart;
- QDateTime abscissaDtEnd;
+ TQDateTime abscissaDtStart;
+ TQDateTime abscissaDtEnd;
bool bScaleLessThanDay;
double abscissaDtSpan;
double abscissaDtPixelsPerScaleUnit;
@@ -127,19 +127,19 @@ class KDChartAxesPainter : public KDChartPainter
uint datasetStart,
uint datasetEnd,
double logWidth,
- const QRect& dataRect,
+ const TQRect& dataRect,
abscissaInfos& infos );
- static bool calculateAbscissaAxisValue( const QVariant& value,
+ static bool calculateAbscissaAxisValue( const TQVariant& value,
abscissaInfos& ai,
int colNumber,
double& xValue );
- static void saveDrawLine( QPainter& painter,
- QPoint pA,
- QPoint pZ,
- QPen pen );
+ static void saveDrawLine( TQPainter& painter,
+ TQPoint pA,
+ TQPoint pZ,
+ TQPen pen );
static void calculateLabelTexts(
- QPainter* painter,
+ TQPainter* painter,
const KDChartTableDataBase& data,
const KDChartParams& params,
uint axisNumber,
@@ -147,8 +147,8 @@ class KDChartAxesPainter : public KDChartPainter
double delimLen,
// start of return parameters
KDChartAxisParams::AxisPos& basicPos,
- QPoint& orig,
- QPoint& dest,
+ TQPoint& orig,
+ TQPoint& dest,
double& pXDeltaFactor,
double& pYDeltaFactor,
double& pXDelimDeltaFaktor,
@@ -164,8 +164,8 @@ class KDChartAxesPainter : public KDChartPainter
bool& isLogarithmic,
bool& isDateTime,
bool& autoDtLabels,
- QDateTime& dtLow,
- QDateTime& dtHigh,
+ TQDateTime& dtLow,
+ TQDateTime& dtHigh,
KDChartAxisParams::ValueScale& dtDeltaScale,
bool adjustTheValues = false,
double trueDelta = 0.0,
@@ -174,7 +174,7 @@ class KDChartAxesPainter : public KDChartPainter
const KDChartAxisParams& para,
double averageValueP1000,
KDChartAxisParams::AxisPos basicPos,
- const QPoint& orig,
+ const TQPoint& orig,
double delimLen,
uint nLabels,
// start of return parameters
@@ -184,22 +184,22 @@ class KDChartAxesPainter : public KDChartPainter
double& pTextsW,
double& pTextsH,
int& textAlign );
- static QString truncateBehindComma( const double nVal,
+ static TQString truncateBehindComma( const double nVal,
const int behindComma,
const double nDelta,
int& trueBehindComma );
- static QString applyLabelsFormat( const double nVal,
+ static TQString 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 );
static void calculateOrdinateFactors( const KDChartAxisParams& para,
bool bLogarithmic,
@@ -211,10 +211,10 @@ class KDChartAxesPainter : public KDChartPainter
double& nLow,
double& nHigh,
bool findNextRound = false );
- static void dtAddSecs( const QDateTime& org, const int secs, QDateTime& dest );
- static void dtAddDays( const QDateTime& org, const int days, QDateTime& dest );
- static void dtAddMonths( const QDateTime& org, const int months, QDateTime& dest );
- static void dtAddYears( const QDateTime& org, const int years, QDateTime& dest );
+ static void dtAddSecs( const TQDateTime& org, const int secs, TQDateTime& dest );
+ static void dtAddDays( const TQDateTime& org, const int days, TQDateTime& dest );
+ static void dtAddMonths( const TQDateTime& org, const int months, TQDateTime& dest );
+ static void dtAddYears( const TQDateTime& org, const int years, TQDateTime& dest );
};
#endif
diff --git a/libkdchart/KDChartAxisParams.cpp b/libkdchart/KDChartAxisParams.cpp
index 158ea1a..31ec8de 100644
--- a/libkdchart/KDChartAxisParams.cpp
+++ b/libkdchart/KDChartAxisParams.cpp
@@ -152,7 +152,7 @@ KDChartAxisParams::KDChartAxisParams()
_axisLineWidth = -3; // == 3/1000
_axisTrueLineWidth = 1;
_axisLineVisible = true;
- _axisLineColor = QColor( 0, 0, 0 );
+ _axisLineColor = TQColor( 0, 0, 0 );
_axisShowFractionalValuesDelimiters = true;
_axisShowGrid = false;
@@ -165,18 +165,18 @@ KDChartAxisParams::KDChartAxisParams()
_axisGridSubLineWidth = KDCHART_AXIS_GRID_AUTO_LINEWIDTH;
_axisGridSubStyle = Qt::DotLine;
- _axisZeroLineColor = QColor( 0x00, 0x00, 0x80 );
+ _axisZeroLineColor = TQColor( 0x00, 0x00, 0x80 );
_axisLabelsVisible = true;
- _axisLabelsFont = QFont( "helvetica", 12,
- QFont::Normal, false );
+ _axisLabelsFont = TQFont( "helvetica", 12,
+ TQFont::Normal, false );
_axisLabelsFontUseRelSize = true;
_axisLabelsFontRelSize = 32;
_axisLabelsFontMinSize = 6;
_axisLabelsDontShrinkFont = false;
_axisLabelsDontAutoRotate = false;
_axisLabelsRotation = 0;
- _axisLabelsColor = QColor( 0, 0, 0 );
+ _axisLabelsColor = TQColor( 0, 0, 0 );
_axisSteadyValueCalc = true;
_axisValueStartIsExact = true;
@@ -202,7 +202,7 @@ KDChartAxisParams::KDChartAxisParams()
setAxisLastLabelText();
setTrueAxisDeltaPixels( 0.0 );
setTrueAxisLowHighDelta( 0.0, 0.0, 0.0 );
- setTrueAxisDtLowHighDeltaScale( QDateTime(), QDateTime(), ValueScaleDay );
+ setTrueAxisDtLowHighDeltaScale( TQDateTime(), TQDateTime(), ValueScaleDay );
_axisLabelsDivPow10 = 0;
_axisDigitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS;
@@ -297,7 +297,7 @@ become wider or more narrow.
Also the graphical representation of the date will be comparable
since all your charts will use the same scale if you wish this.
-- Let the program calculate the chart layout based upon the kind
+- Let the program calculate the chart tqlayout based upon the kind
of and width of the labels to be drawn at the axes.
Also the program can calculate the labels for you and find the
boundary values for start and end of the scale automatically.
@@ -476,7 +476,7 @@ KDChartAxisParams::AxisAreaMode KDChartAxisParams::axisAreaMode() const
\param mode the axis area mode enum to convert
\return the string representation of the mode enum
*/
-QString KDChartAxisParams::axisAreaModeToString( AxisAreaMode mode ) {
+TQString KDChartAxisParams::axisAreaModeToString( AxisAreaMode mode ) {
switch( mode ) {
case AxisAreaModeFixedSize:
return "FixedSize";
@@ -496,7 +496,7 @@ QString KDChartAxisParams::axisAreaModeToString( AxisAreaMode mode ) {
\param string the string to convert
\return the axis area mode enum value
*/
-KDChartAxisParams::AxisAreaMode KDChartAxisParams::stringToAxisAreaMode( const QString& type ) {
+KDChartAxisParams::AxisAreaMode KDChartAxisParams::stringToAxisAreaMode( const TQString& type ) {
if( type == "FixedSize" )
return AxisAreaModeFixedSize;
else if( type == "AutoSize" )
@@ -723,7 +723,7 @@ void KDChartAxisParams::setAxisCalcMode( AxisCalcMode axisCalcMode )
\param mode the axis calc mode enum to convert
\return the string representation of the mode enum
*/
-QString KDChartAxisParams::axisCalcModeToString( AxisCalcMode mode ) {
+TQString KDChartAxisParams::axisCalcModeToString( AxisCalcMode mode ) {
switch( mode ) {
case AxisCalcLinear:
return "Linear";
@@ -741,7 +741,7 @@ QString KDChartAxisParams::axisCalcModeToString( AxisCalcMode mode ) {
\param string the string to convert
\return the axis calc mode enum value
*/
-KDChartAxisParams::AxisCalcMode KDChartAxisParams::stringToAxisCalcMode( const QString& type ) {
+KDChartAxisParams::AxisCalcMode KDChartAxisParams::stringToAxisCalcMode( const TQString& type ) {
if( type == "Linear" )
return AxisCalcLinear;
else if( type == "Logarithmic" )
@@ -838,7 +838,7 @@ void KDChartAxisParams::setIsometricReferenceAxis( uint isoRefAxis )
*/
/**
- \fn void KDChartAxisParams::setAxisTrueAreaRect( const QRect& axisTrueAreaRect )
+ \fn void KDChartAxisParams::setAxisTrueAreaRect( const TQRect& axisTrueAreaRect )
Specifies the true axis area rectangle.
\param axisAreaMax the true axis area rectangle
@@ -855,7 +855,7 @@ void KDChartAxisParams::setIsometricReferenceAxis( uint isoRefAxis )
*/
/**
- \fn QRect KDChartAxisParams::axisTrueAreaRect() const
+ \fn TQRect KDChartAxisParams::axisTrueAreaRect() const
Returns the true axis area rectangle
as calculated and drawn.
@@ -981,14 +981,14 @@ void KDChartAxisParams::setAxisLineWidth( int axisLineWidth )
\param axisLineColor the axis line colour.
\sa axisLineColor
*/
-void KDChartAxisParams::setAxisLineColor( QColor axisLineColor )
+void KDChartAxisParams::setAxisLineColor( TQColor axisLineColor )
{
_axisLineColor = axisLineColor;
emit changed();
}
/**
- \fn QColor KDChartAxisParams::axisLineColor() const
+ \fn TQColor KDChartAxisParams::axisLineColor() const
Returns the axis line colour.
\return the axis line colour.
@@ -1036,14 +1036,14 @@ void KDChartAxisParams::setAxisShowGrid( bool axisShowGrid )
\param axisGridColor the axis grid color.
\sa axisGridColor, setAxisShowGrid
*/
-void KDChartAxisParams::setAxisGridColor( QColor axisGridColor )
+void KDChartAxisParams::setAxisGridColor( TQColor axisGridColor )
{
_axisGridColor = axisGridColor;
emit changed();
}
/**
- \fn QColor KDChartAxisParams::axisGridColor() const
+ \fn TQColor KDChartAxisParams::axisGridColor() const
Returns the axis grid color.
\return the axis grid color.
@@ -1061,7 +1061,7 @@ void KDChartAxisParams::setAxisGridColor( QColor axisGridColor )
\param axisGridSubColor the axis grid sub color.
\sa axisGridSubColor, setAxisGridColor, setAxisShowGrid, setAxisShowSubDelimiters
*/
-void KDChartAxisParams::setAxisGridSubColor( QColor axisGridSubColor )
+void KDChartAxisParams::setAxisGridSubColor( TQColor axisGridSubColor )
{
_axisGridSubColor = axisGridSubColor;
emit changed();
@@ -1069,7 +1069,7 @@ void KDChartAxisParams::setAxisGridSubColor( QColor axisGridSubColor )
/**
- \fn QColor KDChartAxisParams::axisGridSubColor() const
+ \fn TQColor KDChartAxisParams::axisGridSubColor() const
Returns the axis grid sub color.
\return the axis grid sub color.
@@ -1089,7 +1089,7 @@ of the respective grid lines and use different grid colours
to show two grids at the same time. In such cases it might
also be a good idea to deactivate \c setAxisShowSubDelimiters
thus avoiding the dotted sub-grid lines or to set their
-style to Qt::NoPen to get sub-delimiters on the axis
+style to TQt::NoPen to get sub-delimiters on the axis
but no sub-grid lines.
You may use setAxisGridLineWidth( KDCHART_AXIS_GRID_AUTO_LINEWIDTH )
@@ -1137,7 +1137,7 @@ void KDChartAxisParams::setAxisGridSubLineWidth( int axisGridSubLineWidth )
/**
- \fn QColor KDChartAxisParams::axisGridSubLineWidth() const
+ \fn TQColor KDChartAxisParams::axisGridSubLineWidth() const
Returns the axis grid sub line width.
\return the axis grid sub line width.
@@ -1151,14 +1151,14 @@ void KDChartAxisParams::setAxisGridSubLineWidth( int axisGridSubLineWidth )
\param axisGridStyle the axis grid line pattern.
\sa axisGridStyle, setAxisShowGrid
*/
-void KDChartAxisParams::setAxisGridStyle( PenStyle axisGridStyle )
+void KDChartAxisParams::setAxisGridStyle( Qt::PenStyle axisGridStyle )
{
_axisGridStyle = axisGridStyle;
emit changed();
}
/**
- \fn PenStyle KDChartAxisParams::axisGridStyle() const
+ \fn Qt::PenStyle KDChartAxisParams::axisGridStyle() const
Returns the axis grid line pattern.
\return the axis grid line pattern.
@@ -1175,14 +1175,14 @@ void KDChartAxisParams::setAxisGridStyle( PenStyle axisGridStyle )
\sa axisGridSubStyle, setAxisGridStyle, axisGridStyle
\sa setAxisShowGrid
*/
-void KDChartAxisParams::setAxisGridSubStyle( PenStyle axisGridSubStyle )
+void KDChartAxisParams::setAxisGridSubStyle( Qt::PenStyle axisGridSubStyle )
{
_axisGridSubStyle = axisGridSubStyle;
emit changed();
}
/**
- \fn PenStyle KDChartAxisParams::axisGridSubStyle() const
+ \fn Qt::PenStyle KDChartAxisParams::axisGridSubStyle() const
Returns the axis grid line pattern for the thin lines
showing the sub-delimiter values.
@@ -1200,14 +1200,14 @@ void KDChartAxisParams::setAxisGridSubStyle( PenStyle axisGridSubStyle )
\param axisZeroLineColor the zero-line colour.
\sa axisZeroLineColor
*/
-void KDChartAxisParams::setAxisZeroLineColor( QColor axisZeroLineColor )
+void KDChartAxisParams::setAxisZeroLineColor( TQColor axisZeroLineColor )
{
_axisZeroLineColor = axisZeroLineColor;
emit changed();
}
/**
- \fn QColor KDChartAxisParams::axisZeroLineColor() const
+ \fn TQColor KDChartAxisParams::axisZeroLineColor() const
Returns the colour used for the zero-value line
that is drawn if zero is not at the lower
edge of the chart.
@@ -1296,14 +1296,14 @@ void KDChartAxisParams::setAxisLabelsTouchEdges( bool axisLabelsTouchEdges )
\sa setAxisLabelsFontRelSize, setAxisLabelsFontUseRelSize
\sa axisLabelsFont, axisLabelsFontRelSize
*/
-void KDChartAxisParams::setAxisLabelsFont( QFont axisLabelsFont, bool useFontSize )
+void KDChartAxisParams::setAxisLabelsFont( TQFont axisLabelsFont, bool useFontSize )
{
_axisLabelsFont = axisLabelsFont;
_axisLabelsFontUseRelSize = ! useFontSize;
emit changed();
}
/**
- \fn QFont KDChartAxisParams::axisLabelsFont() const
+ \fn TQFont KDChartAxisParams::axisLabelsFont() const
Returns the axis labels font.
\return the axis labels font.
@@ -1434,14 +1434,14 @@ void KDChartAxisParams::setAxisLabelsFontRelSize( int axisLabelsFontRelSize )
\param axisLabelsColor the axis labels colour.
\sa axisLabelsColor
*/
-void KDChartAxisParams::setAxisLabelsColor( QColor axisLabelsColor )
+void KDChartAxisParams::setAxisLabelsColor( TQColor axisLabelsColor )
{
_axisLabelsColor = axisLabelsColor;
emit changed();
}
/**
- \fn QColor KDChartAxisParams::axisLabelsColor() const
+ \fn TQColor KDChartAxisParams::axisLabelsColor() const
Returns the axis labels colour.
\return the axis labels colour.
@@ -1482,8 +1482,8 @@ void KDChartAxisParams::setAxisLabelsCalc( int divPow10,
\sa setAxisLabelsNotation
\sa axisLabelsDecimalPoint, axisLabelsThousandsPoint
*/
-void KDChartAxisParams::setAxisLabelsRadix( const QString& decimalPoint,
- const QString& thousandsPoint )
+void KDChartAxisParams::setAxisLabelsRadix( const TQString& decimalPoint,
+ const TQString& thousandsPoint )
{
_axisLabelsDecimalPoint = decimalPoint;
_axisLabelsThousandsPoint = thousandsPoint;
@@ -1532,10 +1532,10 @@ void KDChartAxisParams::setAxisLabelsNotation( KDChartEnums::NumberNotation nota
\sa axisLabelsPrefix, axisLabelsPostfix, axisLabelsTotalLen
\sa axisLabelsPadFill, axisLabelsBlockAlign
*/
-void KDChartAxisParams::setAxisLabelsFormat( const QString& prefix,
- const QString& postfix,
+void KDChartAxisParams::setAxisLabelsFormat( const TQString& prefix,
+ const TQString& postfix,
const int& totalLen,
- const QChar& padFill,
+ const TQChar& padFill,
const bool& blockAlign )
{
_axisLabelsPrefix = prefix;
@@ -1574,7 +1574,7 @@ void KDChartAxisParams::setAxisLabelsFormat( const QString& prefix,
\param mode the enum to convert
\return the string representation of the mode enum
*/
-QString KDChartAxisParams::labelsFromDataRowToString( LabelsFromDataRow mode ) {
+TQString KDChartAxisParams::labelsFromDataRowToString( LabelsFromDataRow mode ) {
switch( mode ) {
case LabelsFromDataRowYes:
return "Yes";
@@ -1594,7 +1594,7 @@ QString KDChartAxisParams::labelsFromDataRowToString( LabelsFromDataRow mode )
\param string the string to convert
\return the data row mode enum value
*/
-KDChartAxisParams::LabelsFromDataRow KDChartAxisParams::stringToLabelsFromDataRow( const QString& type ) {
+KDChartAxisParams::LabelsFromDataRow KDChartAxisParams::stringToLabelsFromDataRow( const TQString& type ) {
if( type == "Yes" )
return LabelsFromDataRowYes;
else if( type == "No" )
@@ -1640,7 +1640,7 @@ It shall be added once the automatic string support has been added!
Currently the following strings are supported by the automatical
numbering feature. (These strings are implemented for your convenience,
-you may specify any other set of label texts by passing a \c QStringList
+you may specify any other set of label texts by passing a \c TQStringList
pointer to \c axisLabelStringList.)
\li Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
@@ -1683,9 +1683,9 @@ By using negative numbers you can specify backward stepping.
\note Start and end values are \c KDChartData so you may either
specify numerical data or pass a string. <br>
However if passing a string make sure to also specify a
- valid QStringList* for \c axisLabelStringList.
+ valid TQStringList* for \c axisLabelStringList.
In that case it could be wise to also also specify a second
- QStringList* for \c axisShortLabelsStringsList to be used in
+ TQStringList* for \c axisShortLabelsStringsList to be used in
case the axes area is not wide enough to display the
label texts in their full length.
@@ -1800,11 +1800,11 @@ It will show no digits behind the comma.
KDChartParams p;
KDChartAxisParams pa( p.axisParams( KDChartAxisParams::AxisPosBottom ) );
-QStringList abscissaNames;
+TQStringList abscissaNames;
abscissaNames << "Sunday" << "Monday" << "Tuesday" << "Wednesday"
<< "Thursday" << "Friday" << "Saturday";
-QStringList abscissaShortNames;
+TQStringList abscissaShortNames;
abscissaShortNames << "Sun" << "Mon" << "Tue" << "Wed"
<< "Thu" << "Fri" << "Sat";
@@ -1824,10 +1824,10 @@ counting the days of the week as far as neccessary to represent
all the entries in the associated dataset.
Note this \c LabelsFromDataRowNo indicating that the texts are <b>not</b> to
be taken from a data row and note \c &abscissaNames indicating the
-\c QStringList where to take the texts from instead. (In case the axis area
+\c TQStringList where to take the texts from instead. (In case the axis area
is not wide enough to display the strings in their full length their
counterparts stored in abscissaShortNames will be displayed instead.)
-<b>Note also:</b> The strings in those two QStringList are <b>not</b>
+<b>Note also:</b> The strings in those two TQStringList are <b>not</b>
copied into the \c KDChartAxisParams nor into the \c KDChartParams
so please make sure the Lists are alive and valid till the end of
the param objects. Otherwise you will not be able to display the
@@ -1841,8 +1841,8 @@ texts.
\param axisDigitsBehindComma specifies how many digits are to be shown behind the axis label texts comma.
\param axisMaxEmptyInnerSpan specifies the percentage of the y-axis range that may to contain NO data entries, if - and only if - axisValueStart (or axisValueEnd, resp.) is set to KDCHART_AXIS_LABELS_AUTO_LIMIT. To prevent \c setAxisValues from changing the current setting you may specify KDCHART_DONT_CHANGE_EMPTY_INNER_SPAN_NOW here, to deactivate taking into account the inner span entirely just use KDCHART_AXIS_IGNORE_EMPTY_INNER_SPAN.
\param takeLabelsFromDataRow specifies whether the labels texts shall be taken from a special row (reserved for this in each dataset) or not.
-\param axisLabelStringList points to a \c QStringList containing the label texts to be used.
-\param axisShortLabelsStringList points to a \c QStringList containing the label texts to be used in case their full-size counterparts cannot be shown due to limited axis area size.
+\param axisLabelStringList points to a \c TQStringList containing the label texts to be used.
+\param axisShortLabelsStringList points to a \c TQStringList containing the label texts to be used in case their full-size counterparts cannot be shown due to limited axis area size.
\param axisValueLeaveOut is used for horizontal (top or bottom) axes only; it specifies whether some of the axis labels are to be skipped if there is not enough room for drawing them all without overlapping - this parameter may be set to KDCHART_AXIS_LABELS_AUTO_LEAVEOUT or to zero or to another positive value.
\param axisValueDeltaScale is used to specify the scaling mode of \c axisValueDelta - either just ValueScaleNumbers of a special time scale indicator.
\sa setAxisValueStart, setAxisValueEnd, setAxisValueDelta, setAxisValuesDecreasing
@@ -1851,15 +1851,15 @@ texts.
\sa axisSteadyValueCalc, setAxisValueLeaveOut
*/
void KDChartAxisParams::setAxisValues( bool axisSteadyValueCalc,
- const QVariant& axisValueStart,
- const QVariant& axisValueEnd,
+ const TQVariant& axisValueStart,
+ const TQVariant& axisValueEnd,
double axisValueDelta,
int axisDigitsBehindComma,
int axisMaxEmptyInnerSpan,
LabelsFromDataRow takeLabelsFromDataRow,
int labelTextsDataRow,
- QStringList* axisLabelStringList,
- QStringList* axisShortLabelsStringList,
+ TQStringList* axisLabelStringList,
+ TQStringList* axisShortLabelsStringList,
int axisValueLeaveOut,
ValueScale axisValueDeltaScale )
{
@@ -1891,7 +1891,7 @@ void KDChartAxisParams::setAxisValues( bool axisSteadyValueCalc,
setAxisLabelTexts( 0 );
setTrueAxisDeltaPixels( 0.0 );
setTrueAxisLowHighDelta( 0.0, 0.0, 0.0 );
- setTrueAxisDtLowHighDeltaScale( QDateTime(), QDateTime(), ValueScaleDay );
+ setTrueAxisDtLowHighDeltaScale( TQDateTime(), TQDateTime(), ValueScaleDay );
emit changed();
}
@@ -1933,7 +1933,7 @@ void KDChartAxisParams::setAxisValues( bool axisSteadyValueCalc,
with the next value lower than your start value that can be
divided by the delta factor.
- \param isExactValue set this to FALSE if KD Chart shall find
+ \param isExactValue set this to FALSE if KD Chart shall tqfind
a better value than the one you have specified by setAxisValueStart()
\sa setAxisValues, setAxisValueEnd, setAxisValueDelta
\sa axisValueStartIsExact, axisValueStart
@@ -2147,7 +2147,7 @@ void KDChartAxisParams::setTrueAxisLowHighDelta( double nLow, double nHigh, dou
-void KDChartAxisParams::setTrueAxisDtLowHighDeltaScale( QDateTime dtLow, QDateTime dtHigh,
+void KDChartAxisParams::setTrueAxisDtLowHighDeltaScale( TQDateTime dtLow, TQDateTime dtHigh,
ValueScale dtDeltaScale )
{
_trueDtLow = dtLow;
@@ -2156,12 +2156,12 @@ void KDChartAxisParams::setTrueAxisDtLowHighDeltaScale( QDateTime dtLow, QDateT
}
/**
- \fn void KDChartAxisParams::setTrueAxisDtLow( QDateTime dtLow )
+ \fn void KDChartAxisParams::setTrueAxisDtLow( TQDateTime dtLow )
*/
/**
- \fn void KDChartAxisParams::void setTrueAxisDtHigh( QDateTime dtHigh )
+ \fn void KDChartAxisParams::void setTrueAxisDtHigh( TQDateTime dtHigh )
*/
@@ -2171,12 +2171,12 @@ void KDChartAxisParams::setTrueAxisDtLowHighDeltaScale( QDateTime dtLow, QDateT
*/
/**
- \fn void KDChartAxisParams::QDateTime trueAxisDtLow() const
+ \fn void KDChartAxisParams::TQDateTime trueAxisDtLow() const
*/
/**
- \fn void KDChartAxisParams::QDateTime trueAxisDtHigh() const
+ \fn void KDChartAxisParams::TQDateTime trueAxisDtHigh() const
*/
@@ -2340,20 +2340,20 @@ void KDChartAxisParams::setAxisDtHighPos( double x, double y )
*/
/**
- \fn void KDChartAxisParams::setAxisLabelsDateTimeFormat( const QString& format )
+ \fn void KDChartAxisParams::setAxisLabelsDateTimeFormat( const TQString& format )
Specifies the format to be used for displaying abscissa axis
- QDateTime item labels.
+ TQDateTime item labels.
- \note This feature is only available when using Qt 3.0 or newer,
+ \note This feature is only available when using TQt 3.0 or newer,
previous versions use a non changable format.
To calculate the format automatically (based on the
time span to be displayed) use the special value
\c KDCHART_AXIS_LABELS_AUTO_DATETIME_FORMAT - this is the default setting.
- See Qt documentation on the format to be used here:
+ See TQt documentation on the format to be used here:
- $QTDIR/doc/html/qdatetime.html#toString-2
+ $TQTDIR/doc/html/qdatetime.html#toString-2
\note Insert a '\n' character if you want to print the labels in two rows, e.g. "h:mm:ss\nd.MM.yyyy" would do that.
@@ -2361,9 +2361,9 @@ void KDChartAxisParams::setAxisDtHighPos( double x, double y )
*/
/**
- \fn QString KDChartAxisParams::axisLabelsDateTimeFormat() const
+ \fn TQString KDChartAxisParams::axisLabelsDateTimeFormat() const
Returns the format to be used for displaying abscissa axis
- QDateTime item labels.
+ TQDateTime item labels.
\sa setAxisLabelsDateTimeFormat
*/
@@ -2401,7 +2401,7 @@ void KDChartAxisParams::setAxisDtHighPos( double x, double y )
\note Calling this function results in overwriting the information
that you might have set by previous calls of that function.
Only <b>one</b> data row can be specified as containing label texts.
- To specify a data row that contains (or might contain) axis label texts just
+ To specify a data row that tqcontains (or might contain) axis label texts just
call this function with \c LabelsFromDataRowYes (or \c LabelsFromDataRowGuess,
resp.) specifying this row but do <b>not</b> call the function n times with
the \c LabelsFromDataRowNo parameter to 'deactivate' the other rows.
@@ -2409,7 +2409,7 @@ void KDChartAxisParams::setAxisDtHighPos( double x, double y )
the data rows is containing the axis label texts (this is the default
setting).
- \param row the data row number that contains (or might contain, resp.) the labels
+ \param row the data row number that tqcontains (or might contain, resp.) the labels
\param mode the state of our information concerning that row (see: \c LabelsFromDataRow)
\sa LabelsFromDataRow, axisLabelTextsFormDataRow, setAxisValues
@@ -2434,24 +2434,24 @@ void KDChartAxisParams::setLabelTextsFormDataRow( int row, LabelsFromDataRow mo
/**
\fn int KDChartAxisParams::labelTextsDataRow() const
- Returns the number of the data row that contains (or might contain,
+ Returns the number of the data row that tqcontains (or might contain,
resp.) the texts to be taken for the axis labels.
<br>
Use \c axisLabelTextsFormDataRow to make sure the texts are
to be taken from that row.
<br>
- Use \c axisLabelStringList to get a QStringList* of texts from
+ Use \c axisLabelStringList to get a TQStringList* of texts from
which the texts to be drawn will be taken.
- Use \c axisShortLabelsStringList to get a QStringList* of texts from
+ Use \c axisShortLabelsStringList to get a TQStringList* of texts from
which the texts to be drawn will be taken in case the axis area size
is too small to display their full-size counterparts stored in
\c axisLabelStringList.
- Use \c axisLabelTexts to get a QStringList* containing the label
+ Use \c axisLabelTexts to get a TQStringList* containing the label
texts that are <b>actually</b> drawn at the axis.
- \return the number of the data row that contains (or might contain,
+ \return the number of the data row that tqcontains (or might contain,
resp.) the texts to be taken for the axis labels.
\sa setAxisValues
\sa axisValueStart, axisValueEnd
@@ -2461,7 +2461,7 @@ void KDChartAxisParams::setLabelTextsFormDataRow( int row, LabelsFromDataRow mo
/**
- Specifies a \c QStringList which the axis label texts are to
+ Specifies a \c TQStringList which the axis label texts are to
be taken from, the second parameter (if not zero) specifies an
alternative list of strings that are to be displayed in case
the axis area size is too small for showing the full-length names.
@@ -2472,10 +2472,10 @@ void KDChartAxisParams::setLabelTextsFormDataRow( int row, LabelsFromDataRow mo
the strings between these two values only, as shown here:
\verbatim
- QStringList abscissaNames;
+ TQStringList abscissaNames;
abscissaNames << "Sunday" << "Monday" << "Tuesday" << "Wednesday"
<< "Thursday" << "Friday" << "Saturday";
- QStringList abscissaShortNames;
+ TQStringList abscissaShortNames;
abscissaShortNames << "Sun" << "Mon" << "Tue" << "Wed"
<< "Thu" << "Fri" << "Sat";
@@ -2491,23 +2491,23 @@ void KDChartAxisParams::setLabelTextsFormDataRow( int row, LabelsFromDataRow mo
\endverbatim
- \param QStringList* axisLabelStringList points to the list of labels to be displayed
- \param QStringList* axisShortLabelStringList points to
+ \param TQStringList* axisLabelStringList points to the list of labels to be displayed
+ \param TQStringList* axisShortLabelStringList points to
an alternative list of short names to be displayed if the long labels take too much place
- \param QString valueStart ( default null ) the label to begin with
- \param QString valueEnd ( default null ) the label to end with
+ \param TQString valueStart ( default null ) the label to begin with
+ \param TQString valueEnd ( default null ) the label to end with
\sa KDChartParams::setAxisLabelStringParams
\sa axisLabelStringList, axisShortLabelsStringList
\sa setAxisValues, setLabelTextsFormDataRow
\sa axisLabelTexts
*/
-void KDChartAxisParams::setAxisLabelStringLists( QStringList* axisLabelStringList,
- QStringList* axisShortLabelStringList,
- const QString& valueStart,
- const QString& valueEnd )
+void KDChartAxisParams::setAxisLabelStringLists( TQStringList* axisLabelStringList,
+ TQStringList* axisShortLabelStringList,
+ const TQString& valueStart,
+ const TQString& valueEnd )
{
- QVariant axisValueStart, axisValueEnd;
+ TQVariant axisValueStart, axisValueEnd;
if( valueStart.isNull() )
axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT;
@@ -2535,11 +2535,11 @@ void KDChartAxisParams::setAxisLabelStringLists( QStringList* axisLabelString
/**
- \fn QStringList KDChartAxisParams::axisLabelStringList() const
- Returns a \c QStringList containing the label texts to be used.
+ \fn TQStringList KDChartAxisParams::axisLabelStringList() const
+ Returns a \c TQStringList containing the label texts to be used.
Calling \c axisShortLabelsStringList() instead will return
- another \c QStringList containing the label texts to be displayed
+ another \c TQStringList containing the label texts to be displayed
in case the axis area size is too small to show the full-size names.
\note This is the list of texts you specified by \c setAxisValues
@@ -2550,7 +2550,7 @@ void KDChartAxisParams::setAxisLabelStringLists( QStringList* axisLabelString
are calculated automatically the resulting labels are also stored in a
second list that you may access via \c axisLabelTexts().
- \return a \c QStringList containing the label texts to be used.
+ \return a \c TQStringList containing the label texts to be used.
\sa axisShortLabelsStringList
\sa setAxisLabelStringLists
\sa setAxisValues
@@ -2568,13 +2568,13 @@ void KDChartAxisParams::setAxisLabelStringLists( QStringList* axisLabelString
*/
/**
- \fn QStringList KDChartAxisParams::axisShortLabelsStringList() const
- Returns a \c QStringList containing the label texts to be used
+ \fn TQStringList KDChartAxisParams::axisShortLabelsStringList() const
+ Returns a \c TQStringList containing the label texts to be used
in case the axis area size is too small to show the full-size
label texts.
Calling \c axisLabelStringList() instead will return
- another \c QStringList containing their full-size counterparts.
+ another \c TQStringList containing their full-size counterparts.
\note This is the list of texts you specified by \c setAxisValues
or by \c setAxisShortLabelsStringList.
@@ -2584,7 +2584,7 @@ void KDChartAxisParams::setAxisLabelStringLists( QStringList* axisLabelString
are calculated automatically the resulting labels are also stored in a
second list that you may access via \c axisLabelTexts().
- \return a \c QStringList containing the label texts to be used
+ \return a \c TQStringList containing the label texts to be used
in case the axis area size is too small to show the full-size
label texts.
\sa axisLabelStringList
@@ -2605,8 +2605,8 @@ void KDChartAxisParams::setAxisLabelStringLists( QStringList* axisLabelString
/**
- \fn const QStringList* KDChartAxisParamsaxisLabelTexts() const
- Returns a \c QStringList containing the label texts
+ \fn const TQStringList* KDChartAxisParamsaxisLabelTexts() const
+ Returns a \c TQStringList containing the label texts
that are <b>actually</b> drawn at the axis.
In case the texts are unknown returns zero.
@@ -2618,7 +2618,7 @@ void KDChartAxisParams::setAxisLabelStringLists( QStringList* axisLabelString
automatically the resulting labels also stored in this list - it will
allways be a true copy of the texts painted at the axis.
- \return a \c QStringList containing the label texts actually being used.
+ \return a \c TQStringList containing the label texts actually being used.
\sa setAxisValues
\sa axisValueStart, axisValueEnd, axisLabelStringList
\sa axisLabelsFromDataRow, setLabelTextsFormDataRow
@@ -2637,7 +2637,7 @@ void KDChartAxisParams::setAxisLabelStringLists( QStringList* axisLabelString
For specifying another list of strings to be used as label texts
you might rather want to call \c setAxisLabelStringLists() or
\c setLabelTextsFormDataRow() depending from whether your texts
- are stored in a \c QStringList or in a data row.
+ are stored in a \c TQStringList or in a data row.
\param axisLabelTexts specifies the texts that are
<b>actually</b> drawn at the axis labels are unknown.
@@ -2645,7 +2645,7 @@ void KDChartAxisParams::setAxisLabelStringLists( QStringList* axisLabelString
\sa setAxisLabelStringLists, setLabelTextsFormDataRow, setAxisValues
\sa setAxisFirstLabelText, setAxisLastLabelText
*/
-void KDChartAxisParams::setAxisLabelTexts( const QStringList* axisLabelTexts )
+void KDChartAxisParams::setAxisLabelTexts( const TQStringList* axisLabelTexts )
{
_axisLabelTexts.clear();
_axisLabelTextsDirty = ( 0 == axisLabelTexts );
@@ -2665,7 +2665,7 @@ void KDChartAxisParams::setAxisLabelTexts( const QStringList* axisLabelTexts )
For specifying another list of strings to be used as label texts
you might rather want to call \c setAxisLabelStringLists() or
\c setLabelTextsFormDataRow() depending from whether your texts
- are stored in a \c QStringList or in a data row.
+ are stored in a \c TQStringList or in a data row.
\param axisLabelTextsDirty specifies whether the texts are
<b>actually</b> drawn at the axis labels are unknown.
@@ -2701,7 +2701,7 @@ void KDChartAxisParams::setAxisLabelTexts( const QStringList* axisLabelTexts )
\param axisFirstLabelText specifies the text that is
<b>actually</b> drawn as the first label: a NULL string
- ( as produced by QString() ) will be ignored, to suppress
+ ( as produced by TQString() ) will be ignored, to suppress
the first label please specify an EMPTY but NOT NULL string
by passing "" as parameter.
@@ -2709,7 +2709,7 @@ void KDChartAxisParams::setAxisLabelTexts( const QStringList* axisLabelTexts )
\sa setAxisLastLabelText
\sa setAxisLabelStringLists, setLabelTextsFormDataRow, setAxisValues
*/
-void KDChartAxisParams::setAxisFirstLabelText( const QString& axisFirstLabelText )
+void KDChartAxisParams::setAxisFirstLabelText( const TQString& axisFirstLabelText )
{
_axisFirstLabelText = axisFirstLabelText;
}
@@ -2729,14 +2729,14 @@ void KDChartAxisParams::setAxisFirstLabelText( const QString& axisFirstLabelTex
\param axisFirstLabelText specifies the text that is
<b>actually</b> drawn as the last label: a NULL string
- ( as produced by QString() ) will be ignored, to suppress
+ ( as produced by TQString() ) will be ignored, to suppress
the first label please specify an EMPTY but NOT NULL string
by passing "" as parameter.
\sa setAxisFirstLabelText
\sa setAxisLabelStringLists, setLabelTextsFormDataRow, setAxisValues
*/
-void KDChartAxisParams::setAxisLastLabelText( const QString& axisLastLabelText )
+void KDChartAxisParams::setAxisLastLabelText( const TQString& axisLastLabelText )
{
_axisLastLabelText = axisLastLabelText;
}
@@ -2763,7 +2763,7 @@ void KDChartAxisParams::setAxisLastLabelText( const QString& axisLastLabelText
*/
/**
- \fn KDChartAxisParams::KDChartAxisParams( const KDChartAxisParams& R ) : QObject()
+ \fn KDChartAxisParams::KDChartAxisParams( const KDChartAxisParams& R ) : TQObject()
Copy-constructor: By calling the copy method,
see also the assignment operator.
*/
@@ -2874,7 +2874,7 @@ void KDChartAxisParams::deepCopy( KDChartAxisParams& D, const KDChartAxisParams&
\param type the axis type enum to convert
\return the string representation of the axis type enum
*/
-QString KDChartAxisParams::axisTypeToString( AxisType type ) {
+TQString KDChartAxisParams::axisTypeToString( AxisType type ) {
switch( type ) {
case AxisTypeUnknown:
return "Unknown";
@@ -2896,7 +2896,7 @@ QString KDChartAxisParams::axisTypeToString( AxisType type ) {
\param string the string to convert
\return the axis type enum value
*/
-KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString& type ) {
+KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const TQString& type ) {
if( type == "Unknown" )
return AxisTypeUnknown;
else if( type == "East" )
@@ -3009,7 +3009,7 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString&
*/
/**
- \var QRect _axisTrueAreaRect
+ \var TQRect _axisTrueAreaRect
Specifies the true axis area rectangle
as it was calculated and drawn.
@@ -3043,7 +3043,7 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString&
*/
/**
- \var QColor _axisLineColor
+ \var TQColor _axisLineColor
Specifies the axis line colour.
\sa setAxisLineColor
@@ -3057,7 +3057,7 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString&
*/
/**
- \var QColor _axisGridColor
+ \var TQColor _axisGridColor
Specifies the axis grid colour.
\sa setAxisGridColor, setAxisShowGrid
@@ -3072,7 +3072,7 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString&
*/
/**
- \var QColor _axisGridSubColor
+ \var TQColor _axisGridSubColor
Specifies the axis grid sub colour.
\sa setAxisGridSubColor, setAxisShowGrid, setAxisShowSubDelimiters
@@ -3087,21 +3087,21 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString&
*/
/**
- \var PenStyle _axisGridStyle
+ \var Qt::PenStyle _axisGridStyle
Specifies the axis grid line pattern for main grid lines.
\sa setAxisGridStyle, setAxisShowGrid
*/
/**
- \var PenStyle _axisGridSubStyle
+ \var Qt::PenStyle _axisGridSubStyle
Specifies the axis grid line pattern for sub-delimiter grid lines.
\sa setAxisGridSubStyle, setAxisGridStyle, setAxisShowGrid
*/
/**
- \var QColor _axisZeroLineColor
+ \var TQColor _axisZeroLineColor
Specifies the zero-line colour.
\sa setAxisZeroLineColor
@@ -3115,7 +3115,7 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString&
*/
/**
- \var QFont _axisLabelsFont
+ \var TQFont _axisLabelsFont
Specifies the axis labels font.
\sa setAxisLabelsFont
@@ -3141,7 +3141,7 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString&
*/
/**
- \var QColor _axisLabelsColor
+ \var TQColor _axisLabelsColor
Specifies the axis labels color.
\sa setAxisLabelsColor
@@ -3285,8 +3285,8 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString&
*/
/**
- \var QStringList _axisLabelStringList
- Specifies a QStringList containing the label texts to be used.
+ \var TQStringList _axisLabelStringList
+ Specifies a TQStringList containing the label texts to be used.
\sa _axisShortLabelsStringList
\sa setAxisValues, _axisLabelTexts, _axisLabelTextsDirty
@@ -3294,8 +3294,8 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString&
/**
- \var QStringList _axisShortLabelsStringList
- Specifies a QStringList containing the label texts to be used
+ \var TQStringList _axisShortLabelsStringList
+ Specifies a TQStringList containing the label texts to be used
in case the axis area is not wide enough to show their full-size
counterparts.
@@ -3304,7 +3304,7 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString&
*/
/**
- \var QStringList _axisLabelTexts
+ \var TQStringList _axisLabelTexts
Contains the label texts <b>actually</b> being used.
\sa setAxisValues, _axisLabelStringList, _axisLabelTextsDirty
@@ -3312,7 +3312,7 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const QString&
/**
\var bool _axisLabelTextsDirty
- Specifies whether the QStringList _axisLabelTexts content is invalid.
+ Specifies whether the TQStringList _axisLabelTexts content is invalid.
\sa setAxisValues, _axisLabelTexts
*/
diff --git a/libkdchart/KDChartAxisParams.h b/libkdchart/KDChartAxisParams.h
index 5817b37..b581970 100644
--- a/libkdchart/KDChartAxisParams.h
+++ b/libkdchart/KDChartAxisParams.h
@@ -29,14 +29,14 @@
#ifndef __KDCHARTAXISPARAMS_H__
#define __KDCHARTAXISPARAMS_H__
-#include <qfont.h>
-#include <qcolor.h>
-#include <qmap.h>
-#include <qobject.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qvariant.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqvariant.h>
#include "KDChartGlobal.h"
#include "KDChartEnums.h"
@@ -49,7 +49,7 @@ class KDChartParams;
\sa setAxisValues
*/
-#define KDCHART_AXIS_LABELS_AUTO_LIMIT QVariant( 140319.64 )
+#define KDCHART_AXIS_LABELS_AUTO_LIMIT TQVariant( 140319.64 )
// If you edit the above, also edit KD Chart.cpp
/**
@@ -93,7 +93,7 @@ class KDChartParams;
*/
-#define KDCHART_DEFAULT_AXIS_GRID_COLOR QColor( 0xA0, 0xA0, 0xA0 )
+#define KDCHART_DEFAULT_AXIS_GRID_COLOR TQColor( 0xA0, 0xA0, 0xA0 )
/**
Use this to specify that the width of the axis grid lines
@@ -129,9 +129,10 @@ class KDChartParams;
Use the KDChartAxisParams class to modify parameters of one axis each.
*/
-class KDCHART_EXPORT KDChartAxisParams : public QObject
+class KDCHART_EXPORT KDChartAxisParams : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS(AxisType)
Q_ENUMS(AxisPos)
Q_ENUMS(AxisAreaMode)
@@ -139,7 +140,7 @@ class KDCHART_EXPORT KDChartAxisParams : public QObject
Q_ENUMS(LabelsFromDataRow)
Q_ENUMS(ValueScale)
- // Neede by QSA
+ // Neede by TQSA
Q_ENUMS( PenStyle )
public:
@@ -154,8 +155,8 @@ public slots: // PENDING(blackie) Go through this file and reorder, so all slot
AxisType axisType() const { return _axisType; }
- static QString axisTypeToString( AxisType type );
- static AxisType stringToAxisType( const QString& type );
+ static TQString axisTypeToString( AxisType type );
+ static AxisType stringToAxisType( const TQString& type );
public:
@@ -202,8 +203,8 @@ public:
public slots:
void setAxisAreaMode( AxisAreaMode axisAreaMode );
AxisAreaMode axisAreaMode() const;
- static QString axisAreaModeToString( AxisAreaMode mode );
- static AxisAreaMode stringToAxisAreaMode( const QString& type );
+ static TQString axisAreaModeToString( AxisAreaMode mode );
+ static AxisAreaMode stringToAxisAreaMode( const TQString& type );
void setAxisAreaMin( int axisAreaMin );
//Returns the axis area minimum width (or height, resp.).
@@ -224,52 +225,52 @@ public:
public slots:
void setAxisCalcMode( AxisCalcMode axisCalcMode );
AxisCalcMode axisCalcMode() const { return _axisCalcMode; }
- static QString axisCalcModeToString( AxisCalcMode mode );
- static AxisCalcMode stringToAxisCalcMode( const QString& type );
+ static TQString axisCalcModeToString( AxisCalcMode mode );
+ static AxisCalcMode stringToAxisCalcMode( const TQString& type );
void setIsometricReferenceAxis( uint isoRefAxis );
uint isometricReferenceAxis() const { return _axisIsoRefAxis; }
void setAxisTrueAreaSize( int axisTrueAreaSize ) { _axisTrueAreaSize = axisTrueAreaSize; }
int axisTrueAreaSize() const { return _axisTrueAreaSize; }
- void setAxisTrueAreaRect( const QRect& axisTrueAreaRect ) { _axisTrueAreaRect = axisTrueAreaRect; }
- QRect axisTrueAreaRect() const { return _axisTrueAreaRect; }
+ void setAxisTrueAreaRect( const TQRect& axisTrueAreaRect ) { _axisTrueAreaRect = axisTrueAreaRect; }
+ TQRect axisTrueAreaRect() const { return _axisTrueAreaRect; }
void setAxisLineVisible( bool axisLineVisible );
bool axisLineVisible() const { return _axisLineVisible; }
void setAxisLineWidth( int axisLineWidth );
int axisLineWidth() const { return _axisLineWidth; }
void setAxisTrueLineWidth( int axisTrueLineWidth ) { _axisTrueLineWidth = axisTrueLineWidth; }
int axisTrueLineWidth() const { return _axisTrueLineWidth; }
- void setAxisLineColor( QColor axisLineColor );
- QColor axisLineColor() const { return _axisLineColor; }
+ void setAxisLineColor( TQColor axisLineColor );
+ TQColor axisLineColor() const { return _axisLineColor; }
// main grid:
void setAxisShowFractionalValuesDelimiters( bool axisShowFractValDelim );
bool axisShowFractionalValuesDelimiters() const { return _axisShowFractionalValuesDelimiters; }
void setAxisShowGrid( bool axisShowGrid );
bool axisShowGrid() const { return _axisShowGrid; }
- void setAxisGridStyle( PenStyle axisGridStyle );
- PenStyle axisGridStyle() const { return _axisGridStyle; }
- void setAxisGridColor( QColor axisGridColor );
- QColor axisGridColor() const { return _axisGridColor; }
+ void setAxisGridStyle( Qt::PenStyle axisGridStyle );
+ Qt::PenStyle axisGridStyle() const { return _axisGridStyle; }
+ void setAxisGridColor( TQColor axisGridColor );
+ TQColor axisGridColor() const { return _axisGridColor; }
void setAxisGridLineWidth( int axisGridLineWidth );
int axisGridLineWidth() const { return _axisGridLineWidth; }
// sub grid:
void setAxisShowSubDelimiters( bool axisShowSubDelimiters );
bool axisShowSubDelimiters() const { return _axisShowSubDelimiters; }
- void setAxisGridSubStyle( PenStyle axisGridSubStyle );
- PenStyle axisGridSubStyle() const { return _axisGridSubStyle; }
- void setAxisGridSubColor( QColor axisGridSubColor );
- QColor axisGridSubColor() const { return _axisGridSubColor; }
+ void setAxisGridSubStyle( Qt::PenStyle axisGridSubStyle );
+ Qt::PenStyle axisGridSubStyle() const { return _axisGridSubStyle; }
+ void setAxisGridSubColor( TQColor axisGridSubColor );
+ TQColor axisGridSubColor() const { return _axisGridSubColor; }
void setAxisGridSubLineWidth( int axisGridSubLineWidth );
int axisGridSubLineWidth() const { return _axisGridSubLineWidth; }
- void setAxisZeroLineColor( QColor axisZeroLineColor );
- QColor axisZeroLineColor() const { return _axisZeroLineColor; }
+ void setAxisZeroLineColor( TQColor axisZeroLineColor );
+ TQColor axisZeroLineColor() const { return _axisZeroLineColor; }
void setAxisLabelsVisible( bool axisLabelsVisible );
bool axisLabelsVisible() const { return _axisLabelsVisible; }
void setAxisLabelsTouchEdges( bool axisLabelsTouchEdges );
bool axisLabelsTouchEdges() const { return _axisLabelsTouchEdges; }
- void setAxisLabelsFont( QFont axisLabelsFont, bool useFontSize );
- QFont axisLabelsFont() const { return _axisLabelsFont; }
+ void setAxisLabelsFont( TQFont axisLabelsFont, bool useFontSize );
+ TQFont axisLabelsFont() const { return _axisLabelsFont; }
void setAxisLabelsFontUseRelSize( bool axisLabelsFontUseRelSize );
bool axisLabelsFontUseRelSize() const { return _axisLabelsFontUseRelSize; }
void setAxisLabelsFontRelSize( int axisLabelsFontRelSize );
@@ -282,30 +283,30 @@ public slots:
bool axisLabelsDontAutoRotate() const { return _axisLabelsDontAutoRotate; }
void setAxisLabelsRotation( int rotation ) { _axisLabelsRotation = rotation; }
int axisLabelsRotation() const { return _axisLabelsRotation; }
- void setAxisLabelsColor( QColor axisLabelsColor );
- QColor axisLabelsColor() const { return _axisLabelsColor; }
+ void setAxisLabelsColor( TQColor axisLabelsColor );
+ TQColor axisLabelsColor() const { return _axisLabelsColor; }
void setAxisLabelsCalc( int divPow10 = 0,
int digitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS );
int axisLabelsDivPow10() const { return _axisLabelsDivPow10; }
int axisLabelsDigitsBehindComma() const { return _axisDigitsBehindComma; }
- void setAxisLabelsRadix( const QString& decimalPoint,
- const QString& thousandsPoint );
- QString axisLabelsDecimalPoint() const { return _axisLabelsDecimalPoint; }
- QString axisLabelsThousandsPoint() const { return _axisLabelsThousandsPoint; }
+ void setAxisLabelsRadix( const TQString& decimalPoint,
+ const TQString& thousandsPoint );
+ TQString axisLabelsDecimalPoint() const { return _axisLabelsDecimalPoint; }
+ TQString axisLabelsThousandsPoint() const { return _axisLabelsThousandsPoint; }
void setAxisLabelsNotation( KDChartEnums::NumberNotation notation );
KDChartEnums::NumberNotation axisLabelsNotation() const { return _axisLabelsNotation; }
- void setAxisLabelsFormat( const QString& prefix = "",
- const QString& postfix = "",
+ void setAxisLabelsFormat( const TQString& prefix = "",
+ const TQString& postfix = "",
const int& totalLen = 0,
- const QChar& padFill = ' ',
+ const TQChar& padFill = ' ',
const bool& blockAlign = true );
- QString axisLabelsPrefix() const { return _axisLabelsPrefix; }
- QString axisLabelsPostfix() const { return _axisLabelsPostfix; }
+ TQString axisLabelsPrefix() const { return _axisLabelsPrefix; }
+ TQString axisLabelsPostfix() const { return _axisLabelsPostfix; }
int axisLabelsTotalLen() const { return _axisLabelsTotalLen; }
- QChar axisLabelsPadFill() const { return _axisLabelsPadFill; }
+ TQChar axisLabelsPadFill() const { return _axisLabelsPadFill; }
bool axisLabelsBlockAlign() const { return _axisLabelsBlockAlign; }
public:
@@ -314,8 +315,8 @@ public:
LabelsFromDataRowGuess };
public slots:
- static QString labelsFromDataRowToString( LabelsFromDataRow mode );
- static LabelsFromDataRow stringToLabelsFromDataRow( const QString& type );
+ static TQString labelsFromDataRowToString( LabelsFromDataRow mode );
+ static LabelsFromDataRow stringToLabelsFromDataRow( const TQString& type );
public:
enum ValueScale { ValueScaleNumerical = 0, // have gaps here to allow specifying of additional scaling steps in between
@@ -330,25 +331,25 @@ public:
public slots:
void setAxisValues( bool axisSteadyValueCalc = true,
- const QVariant& axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT,
- const QVariant& axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT,
+ const TQVariant& axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT,
+ const TQVariant& axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT,
double axisValueDelta = KDCHART_AXIS_LABELS_AUTO_DELTA,
int axisDigitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS,
int axisMaxEmptyInnerSpan = KDCHART_DONT_CHANGE_EMPTY_INNER_SPAN_NOW,
LabelsFromDataRow takeLabelsFromDataRow = LabelsFromDataRowNo,
int labelTextsDataRow = 0,
- QStringList* axisLabelStringList = 0,
- QStringList* axisShortLabelsStringList = 0,
+ TQStringList* axisLabelStringList = 0,
+ TQStringList* axisShortLabelsStringList = 0,
int axisValueLeaveOut = KDCHART_AXIS_LABELS_AUTO_LEAVEOUT,
ValueScale axisValueDeltaScale = ValueScaleNumerical );
void setAxisValueStartIsExact( bool isExactValue=true ) { _axisValueStartIsExact = isExactValue; }
bool axisValueStartIsExact() const { return _axisValueStartIsExact; }
- void setAxisValueStart( const QVariant& axisValueStart ) { _axisValueStart = axisValueStart; }
- QVariant axisValueStart() const { return _axisValueStart; }
- void setAxisValueEnd( const QVariant& axisValueEnd ) {_axisValueEnd = axisValueEnd; }
- QVariant axisValueEnd() const { return _axisValueEnd; }
+ void setAxisValueStart( const TQVariant& axisValueStart ) { _axisValueStart = axisValueStart; }
+ TQVariant axisValueStart() const { return _axisValueStart; }
+ void setAxisValueEnd( const TQVariant& axisValueEnd ) {_axisValueEnd = axisValueEnd; }
+ TQVariant axisValueEnd() const { return _axisValueEnd; }
void setAxisValueDelta( const double axisValueDelta,
ValueScale scale = ValueScaleNumerical );
double axisValueDelta() const { return _axisValueDelta; }
@@ -366,13 +367,13 @@ public slots:
double trueAxisLow() const { return _trueLow; }
double trueAxisHigh() const { return _trueHigh; }
double trueAxisDelta() const { return _trueDelta; }
- void setTrueAxisDtLowHighDeltaScale( QDateTime dtLow, QDateTime dtHigh,
+ void setTrueAxisDtLowHighDeltaScale( TQDateTime dtLow, TQDateTime dtHigh,
ValueScale dtDeltaScale );
- void setTrueAxisDtLow( QDateTime dtLow ) { _trueDtLow = dtLow; }
- void setTrueAxisDtHigh( QDateTime dtHigh ) { _trueDtHigh = dtHigh; }
+ void setTrueAxisDtLow( TQDateTime dtLow ) { _trueDtLow = dtLow; }
+ void setTrueAxisDtHigh( TQDateTime dtHigh ) { _trueDtHigh = dtHigh; }
void setTrueAxisDtScale( ValueScale scale ) { _trueDtDeltaScale = scale; }
- QDateTime trueAxisDtLow() const { return _trueDtLow; }
- QDateTime trueAxisDtHigh() const { return _trueDtHigh; }
+ TQDateTime trueAxisDtLow() const { return _trueDtLow; }
+ TQDateTime trueAxisDtHigh() const { return _trueDtHigh; }
ValueScale trueAxisDtDeltaScale() const { return _trueDtDeltaScale; }
void setAxisZeroLineStart( double x, double y );
double axisZeroLineStartX() const { return _axisZeroLineStartX; }
@@ -385,29 +386,29 @@ public slots:
double axisDtHighPosY() const { return _axisDtHighPosY; }
void setAxisDigitsBehindComma( const int digits ) { _axisDigitsBehindComma = digits; }
int axisDigitsBehindComma() const { return _axisDigitsBehindComma; }
- void setAxisLabelsDateTimeFormat( const QString& format ) { _axisLabelsDateTimeFormat = format; }
- QString axisLabelsDateTimeFormat() const { return _axisLabelsDateTimeFormat; }
+ void setAxisLabelsDateTimeFormat( const TQString& format ) { _axisLabelsDateTimeFormat = format; }
+ TQString axisLabelsDateTimeFormat() const { return _axisLabelsDateTimeFormat; }
void setAxisMaxEmptyInnerSpan( const int maxEmpty ) { _axisMaxEmptyInnerSpan = maxEmpty; }
int axisMaxEmptyInnerSpan() const { return _axisMaxEmptyInnerSpan; }
void setLabelTextsFormDataRow( int row, LabelsFromDataRow mode );
LabelsFromDataRow axisLabelTextsFormDataRow() const { return _takeLabelsFromDataRow; }
int labelTextsDataRow() const { return _labelTextsDataRow; }
- void setAxisLabelStringLists( QStringList* axisLabelStringList,
- QStringList* axisShortLabelStringList,
- const QString& valueStart = QString::null,
- const QString& valueEnd = QString::null );
- QStringList axisLabelStringList() const { return _axisLabelStringList; }
+ void setAxisLabelStringLists( TQStringList* axisLabelStringList,
+ TQStringList* axisShortLabelStringList,
+ const TQString& valueStart = TQString(),
+ const TQString& valueEnd = TQString() );
+ TQStringList axisLabelStringList() const { return _axisLabelStringList; }
uint axisLabelStringCount() const { return _axisLabelStringList.count(); }
- QStringList axisShortLabelsStringList() const { return _axisShortLabelsStringList; }
+ TQStringList axisShortLabelsStringList() const { return _axisShortLabelsStringList; }
uint axisShortLabelsStringCount() const { return _axisShortLabelsStringList.count(); }
- const QStringList* axisLabelTexts() const { return _axisLabelTextsDirty ? 0 : &_axisLabelTexts; }
- void setAxisLabelTexts( const QStringList* axisLabelTexts );
+ const TQStringList* axisLabelTexts() const { return _axisLabelTextsDirty ? 0 : &_axisLabelTexts; }
+ void setAxisLabelTexts( const TQStringList* axisLabelTexts );
void setAxisLabelTextsDirty( bool axisLabelTextsDirty ) { _axisLabelTextsDirty = axisLabelTextsDirty; }
bool axisLabelTextsDirty() const { return _axisLabelTextsDirty; }
- void setAxisFirstLabelText( const QString& axisFirstLabelText = QString() );
- void setAxisLastLabelText( const QString& axisLastLabelText = QString() );
- QString axisFirstLabelText() const { return _axisFirstLabelText; }
- QString axisLastLabelText() const { return _axisLastLabelText; }
+ void setAxisFirstLabelText( const TQString& axisFirstLabelText = TQString() );
+ void setAxisLastLabelText( const TQString& axisLastLabelText = TQString() );
+ TQString axisFirstLabelText() const { return _axisFirstLabelText; }
+ TQString axisLastLabelText() const { return _axisLastLabelText; }
bool hasAxisFirstLabelText() const { return !_axisFirstLabelText.isNull(); }
bool hasAxisLastLabelText() const { return !_axisLastLabelText.isNull(); }
void setAxisSteadyValueCalc( bool axisSteadyValueCalc ) { _axisSteadyValueCalc = axisSteadyValueCalc; }
@@ -418,8 +419,8 @@ public:
virtual ~KDChartAxisParams();
KDChartAxisParams& operator=( const KDChartAxisParams& R );
static void deepCopy( KDChartAxisParams& D, const KDChartAxisParams& R );
- friend QTextStream& operator<<( QTextStream& s, const KDChartParams& p );
- friend QTextStream& operator>>( QTextStream& s, KDChartParams& p );
+ friend TQTextStream& operator<<( TQTextStream& s, const KDChartParams& p );
+ friend TQTextStream& operator>>( TQTextStream& s, KDChartParams& p );
friend class KDChartParams;
signals:
@@ -440,38 +441,38 @@ private:
AxisCalcMode _axisCalcMode;
uint _axisIsoRefAxis;
int _axisTrueAreaSize;
- QRect _axisTrueAreaRect;
+ TQRect _axisTrueAreaRect;
bool _axisLineVisible;
int _axisLineWidth;
int _axisTrueLineWidth;
- QColor _axisLineColor;
+ TQColor _axisLineColor;
bool _axisShowFractionalValuesDelimiters;
bool _axisShowGrid;
- QColor _axisGridColor;
+ TQColor _axisGridColor;
int _axisGridLineWidth;
- PenStyle _axisGridStyle;
+ Qt::PenStyle _axisGridStyle;
bool _axisShowSubDelimiters;
- QColor _axisGridSubColor;
+ TQColor _axisGridSubColor;
int _axisGridSubLineWidth;
- PenStyle _axisGridSubStyle;
+ Qt::PenStyle _axisGridSubStyle;
- QColor _axisZeroLineColor;
+ TQColor _axisZeroLineColor;
bool _axisLabelsVisible;
- QFont _axisLabelsFont;
+ TQFont _axisLabelsFont;
bool _axisLabelsFontUseRelSize;
int _axisLabelsFontRelSize;
int _axisLabelsFontMinSize;
bool _axisLabelsDontShrinkFont;
bool _axisLabelsDontAutoRotate;
int _axisLabelsRotation;
- QColor _axisLabelsColor;
+ TQColor _axisLabelsColor;
bool _axisSteadyValueCalc;
bool _axisValueStartIsExact;
- QVariant _axisValueStart;
- QVariant _axisValueEnd;
+ TQVariant _axisValueStart;
+ TQVariant _axisValueEnd;
double _axisValueDelta;
ValueScale _axisValueDeltaScale;
int _axisValueLeaveOut;
@@ -480,8 +481,8 @@ private:
double _trueLow;
double _trueHigh;
double _trueDelta;
- QDateTime _trueDtLow;
- QDateTime _trueDtHigh;
+ TQDateTime _trueDtLow;
+ TQDateTime _trueDtHigh;
ValueScale _trueDtDeltaScale;
double _axisZeroLineStartX;
double _axisZeroLineStartY;
@@ -490,25 +491,25 @@ private:
double _axisDtHighPosX;
double _axisDtHighPosY;
int _axisDigitsBehindComma;
- QString _axisLabelsDateTimeFormat;
+ TQString _axisLabelsDateTimeFormat;
int _axisMaxEmptyInnerSpan;
LabelsFromDataRow _takeLabelsFromDataRow;
int _labelTextsDataRow;
- QStringList _axisLabelStringList;
- QStringList _axisShortLabelsStringList;
- QStringList _axisLabelTexts;
+ TQStringList _axisLabelStringList;
+ TQStringList _axisShortLabelsStringList;
+ TQStringList _axisLabelTexts;
bool _axisLabelTextsDirty;
- QString _axisFirstLabelText;
- QString _axisLastLabelText;
+ TQString _axisFirstLabelText;
+ TQString _axisLastLabelText;
int _axisLabelsDivPow10;
- QString _axisLabelsDecimalPoint;
- QString _axisLabelsThousandsPoint;
+ TQString _axisLabelsDecimalPoint;
+ TQString _axisLabelsThousandsPoint;
KDChartEnums::NumberNotation _axisLabelsNotation;
- QString _axisLabelsPrefix;
- QString _axisLabelsPostfix;
+ TQString _axisLabelsPrefix;
+ TQString _axisLabelsPostfix;
int _axisLabelsTotalLen;
- QChar _axisLabelsPadFill;
+ TQChar _axisLabelsPadFill;
bool _axisLabelsBlockAlign;
};
diff --git a/libkdchart/KDChartAxisParamsWrapper.cpp b/libkdchart/KDChartAxisParamsWrapper.cpp
index 5250a71..8a4a676 100644
--- a/libkdchart/KDChartAxisParamsWrapper.cpp
+++ b/libkdchart/KDChartAxisParamsWrapper.cpp
@@ -1,7 +1,7 @@
#include "KDChartAxisParamsWrapper.h"
#include <KDChartAxisParams.h>
-KDChartAxisParamsWrapper::KDChartAxisParamsWrapper( KDChartAxisParams* data ) :QObject(0), _data(data)
+KDChartAxisParamsWrapper::KDChartAxisParamsWrapper( KDChartAxisParams* data ) :TQObject(0), _data(data)
{
}
@@ -15,31 +15,31 @@ void KDChartAxisParamsWrapper::setAxisValueEnd( double axisValueEnd )
_data->setAxisValueEnd( axisValueEnd);
}
-void KDChartAxisParamsWrapper::setAxisValueStart( const QVariant axisValueStart )
+void KDChartAxisParamsWrapper::setAxisValueStart( const TQVariant axisValueStart )
{
_data->setAxisValueStart( axisValueStart );
}
-void KDChartAxisParamsWrapper::setAxisValueEnd( const QVariant axisValueEnd )
+void KDChartAxisParamsWrapper::setAxisValueEnd( const TQVariant axisValueEnd )
{
_data->setAxisValueEnd( axisValueEnd );
}
void KDChartAxisParamsWrapper::setAxisValues( bool axisSteadyValueCalc,
- QVariant axisValueStart,
- QVariant axisValueEnd,
+ TQVariant axisValueStart,
+ TQVariant axisValueEnd,
double axisValueDelta,
int axisDigitsBehindComma,
int axisMaxEmptyInnerSpan,
int takeLabelsFromDataRow,
int labelTextsDataRow,
- const QVariant& axisLabelStringList,
- const QVariant& axisShortLabelsStringList,
+ const TQVariant& axisLabelStringList,
+ const TQVariant& axisShortLabelsStringList,
int axisValueLeaveOut,
int axisValueDeltaScale )
{
- QStringList l1 = axisLabelStringList.toStringList();
- QStringList l2 = axisShortLabelsStringList.toStringList();
+ TQStringList l1 = axisLabelStringList.toStringList();
+ TQStringList l2 = axisShortLabelsStringList.toStringList();
_data->setAxisValues( axisSteadyValueCalc,
axisValueStart,
axisValueEnd,
@@ -54,19 +54,19 @@ void KDChartAxisParamsWrapper::setAxisValues( bool axisSteadyValueCalc,
(KDChartAxisParams::ValueScale) axisValueDeltaScale );
}
-void KDChartAxisParamsWrapper::setAxisLabelStringLists( const QVariant& axisLabelStringList,
- const QVariant& axisShortLabelStringList,
- const QString& valueStart,
- const QString& valueEnd )
+void KDChartAxisParamsWrapper::setAxisLabelStringLists( const TQVariant& axisLabelStringList,
+ const TQVariant& axisShortLabelStringList,
+ const TQString& valueStart,
+ const TQString& valueEnd )
{
- QStringList l1 = axisLabelStringList.toStringList();
- QStringList l2 = axisShortLabelStringList.toStringList();
+ TQStringList l1 = axisLabelStringList.toStringList();
+ TQStringList l2 = axisShortLabelStringList.toStringList();
_data->setAxisLabelStringLists( &l1, &l2, valueStart, valueEnd );
}
-void KDChartAxisParamsWrapper::setAxisLabelTexts( const QVariant& axisLabelTexts )
+void KDChartAxisParamsWrapper::setAxisLabelTexts( const TQVariant& axisLabelTexts )
{
- QStringList l = axisLabelTexts.toStringList();
+ TQStringList l = axisLabelTexts.toStringList();
_data->setAxisLabelTexts( &l );
}
diff --git a/libkdchart/KDChartAxisParamsWrapper.h b/libkdchart/KDChartAxisParamsWrapper.h
index de8dbcc..a0f14a3 100644
--- a/libkdchart/KDChartAxisParamsWrapper.h
+++ b/libkdchart/KDChartAxisParamsWrapper.h
@@ -1,15 +1,16 @@
#ifndef KDCHARTAXISPARAMSWRAPPER_H
#define KDCHARTAXISPARAMSWRAPPER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <KDChartEnums.h>
#include <KDChartAxisParams.h>
-#include <qstringlist.h>
-#include <qvariant.h>
+#include <tqstringlist.h>
+#include <tqvariant.h>
class KDChartAxisParams;
-class KDChartAxisParamsWrapper :public QObject
+class KDChartAxisParamsWrapper :public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KDChartAxisParamsWrapper( KDChartAxisParams* );
@@ -18,29 +19,29 @@ public slots:
// These overload are only for convenience.
void setAxisValueStart( double axisValueStart );
void setAxisValueEnd( double axisValueEnd );
- void setAxisValueStart( const QVariant axisValueStart );
- void setAxisValueEnd( const QVariant axisValueEnd );
+ void setAxisValueStart( const TQVariant axisValueStart );
+ void setAxisValueEnd( const TQVariant axisValueEnd );
public slots:
void setAxisValues( bool axisSteadyValueCalc = true,
- QVariant axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT,
- QVariant axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT,
+ TQVariant axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT,
+ TQVariant axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT,
double axisValueDelta = KDCHART_AXIS_LABELS_AUTO_DELTA,
int axisDigitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS,
int axisMaxEmptyInnerSpan = KDCHART_DONT_CHANGE_EMPTY_INNER_SPAN_NOW,
int takeLabelsFromDataRow = KDChartAxisParams::LabelsFromDataRowNo,
int labelTextsDataRow = 0,
- const QVariant& axisLabelStringList = QVariant( QStringList() ),
- const QVariant& axisShortLabelsStringList = QVariant( QStringList() ),
+ const TQVariant& axisLabelStringList = TQVariant( TQStringList() ),
+ const TQVariant& axisShortLabelsStringList = TQVariant( TQStringList() ),
int axisValueLeaveOut = KDCHART_AXIS_LABELS_AUTO_LEAVEOUT,
int axisValueDeltaScale = KDChartAxisParams::ValueScaleNumerical );
- void setAxisLabelStringLists( const QVariant& axisLabelStringList,
- const QVariant& axisShortLabelStringList,
- const QString& valueStart = QString::null,
- const QString& valueEnd = QString::null );
+ void setAxisLabelStringLists( const TQVariant& axisLabelStringList,
+ const TQVariant& axisShortLabelStringList,
+ const TQString& valueStart = TQString(),
+ const TQString& valueEnd = TQString() );
- void setAxisLabelTexts( const QVariant& axisLabelTexts );
+ void setAxisLabelTexts( const TQVariant& axisLabelTexts );
private:
KDChartAxisParams* _data;
};
diff --git a/libkdchart/KDChartBWPainter.cpp b/libkdchart/KDChartBWPainter.cpp
index 96bd2bc..f376403 100644
--- a/libkdchart/KDChartBWPainter.cpp
+++ b/libkdchart/KDChartBWPainter.cpp
@@ -30,12 +30,12 @@
#include <KDChartParams.h>
#include "KDChartTextPiece.h"
-#include <qpainter.h>
-#if COMPAT_QT_VERSION >= 0x030000
-#include <qmemarray.h>
+#include <tqpainter.h>
+#if COMPAT_TQT_VERSION >= 0x030000
+#include <tqmemarray.h>
#else
-#include <qarray.h>
-#define QMemArray QArray
+#include <tqarray.h>
+#define TQMemArray TQArray
#endif
#include <stdlib.h>
@@ -55,7 +55,7 @@
KDChartAxesPainter( params )
{
// This constructor intentionally left blank so far; we cannot setup the
- // geometry yet since we do not know the size of the painter.
+ // tqgeometry yet since we do not know the size of the painter.
}
@@ -68,7 +68,7 @@ KDChartBWPainter::~KDChartBWPainter()
}
-void quicksort( QMemArray<double>& a, int lo, int hi )
+void quicksort( TQMemArray<double>& a, int lo, int hi )
{
int i=lo, j=hi;
double h;
@@ -94,13 +94,13 @@ int KDChartBWPainter::calculateStats( KDChartTableDataBase& data,
{
const uint nMax = data.usedCols();
int nUsed = 0;
- QMemArray<double> values( nMax );
+ TQMemArray<double> values( nMax );
double sum = 0.0;
- QVariant vVal;
+ TQVariant vVal;
if( data.sorted() ){
for( uint i=0; i<nMax; ++i){
if( data.cellCoord( dataset, i, vVal, 1 ) &&
- QVariant::Double == vVal.type() ) {
+ TQVariant::Double == vVal.type() ) {
values[nUsed] = vVal.toDouble();
sum += values[nUsed];
++nUsed;
@@ -112,7 +112,7 @@ int KDChartBWPainter::calculateStats( KDChartTableDataBase& data,
double last = 0.0; // <-- avoids an annoying compile-time warning
for( uint i=0; i<nMax; ++i){
if( data.cellCoord( dataset, i, vVal, 1 ) &&
- QVariant::Double == vVal.type() ) {
+ TQVariant::Double == vVal.type() ) {
values[nUsed] = vVal.toDouble();
if( nUsed // skip 1st value
&& last > values[nUsed] )
@@ -145,17 +145,17 @@ int KDChartBWPainter::calculateStats( KDChartTableDataBase& data,
stats[ KDChartParams::Median ] = values[ nUd2 ];
else
stats[ KDChartParams::Median ] =
- (values[ QMAX(nUd2-1, 0) ] + values[ nUd2 ]) /2;
+ (values[ TQMAX(nUd2-1, 0) ] + values[ nUd2 ]) /2;
// find last value of lower quartile
- nLastQ1 = QMAX( nUd2-1, 0 );
- // find 1st value of lower quartile
+ nLastQ1 = TQMAX( nUd2-1, 0 );
+ // tqfind 1st value of lower quartile
nFirstQ1 = nLastQ1 / 2;
// determine how many values are below the median ( == how many are above it)
int nLowerCount = nLastQ1 - nFirstQ1 + 1;
- // find 1st value of upper quartile
- nFirstQ3 = bOdd ? QMIN( nUd2+1, nUsed-1 ) : nUd2;
+ // tqfind 1st value of upper quartile
+ nFirstQ3 = bOdd ? TQMIN( nUd2+1, nUsed-1 ) : nUd2;
// find last value of upper quartile
nLastQ3 = nFirstQ3 + nLowerCount - 1;
@@ -166,16 +166,16 @@ int KDChartBWPainter::calculateStats( KDChartTableDataBase& data,
stats[ KDChartParams::Quartile1 ] = values[ nFirstQ1 ];
else
stats[ KDChartParams::Quartile1 ] =
- (values[ QMAX(nFirstQ1-1, 0) ] + values[ nFirstQ1 ]) /2;
+ (values[ TQMAX(nFirstQ1-1, 0) ] + values[ nFirstQ1 ]) /2;
// find upper quartile
if( bOdd2 ){
stats[ KDChartParams::Quartile3 ] = values[ nLastQ3 ];
}
else{
- //qDebug(" "+QString::number(nLastQ3)+" "+QString::number(KDChartParams::Quartile3)
- // +" "+QString::number(nUsed)+" "+QString::number(QMIN(nLastQ3+1, nUsed-1)));
+ //qDebug(" "+TQString::number(nLastQ3)+" "+TQString::number(KDChartParams::Quartile3)
+ // +" "+TQString::number(nUsed)+" "+TQString::number(TQMIN(nLastQ3+1, nUsed-1)));
stats[ KDChartParams::Quartile3 ] =
- (values[ nLastQ3 ] + values[ QMIN(nLastQ3+1, nUsed-1) ]) /2;
+ (values[ nLastQ3 ] + values[ TQMIN(nLastQ3+1, nUsed-1) ]) /2;
}
// find the interquartile range (IQR)
double iqr = stats[ KDChartParams::Quartile3 ] - stats[ KDChartParams::Quartile1 ];
@@ -210,9 +210,9 @@ int KDChartBWPainter::calculateStats( KDChartTableDataBase& data,
\return the fallback text to use for describing the specified
dataset in the legend
*/
-QString KDChartBWPainter::fallbackLegendText( uint dataset ) const
+TQString KDChartBWPainter::fallbackLegendText( uint dataset ) const
{
- return QObject::tr( "Series " ) + QString::number( dataset + 1 );
+ return TQObject::tr( "Series " ) + TQString::number( dataset + 1 );
}
@@ -245,14 +245,14 @@ int KDChartBWPainter::clipShiftUp( bool, double ) const
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 KDChartBWPainter::specificPaintData( QPainter* painter,
- const QRect& ourClipRect,
+void KDChartBWPainter::specificPaintData( TQPainter* painter,
+ const TQRect& ourClipRect,
KDChartTableDataBase* data,
KDChartDataRegionList* /*regions*/,
const KDChartAxisParams* axisPara,
@@ -286,12 +286,12 @@ void KDChartBWPainter::specificPaintData( QPainter* painter,
// compute the position of the 0 axis
double zeroXAxisI = axisPara->axisZeroLineStartY() - _dataRect.y();
- const int lineWidth = static_cast<int>( pointDist / 66.0 ) * QMAX(params()->lineWidth(), 1);
+ const int lineWidth = static_cast<int>( pointDist / 66.0 ) * TQMAX(params()->lineWidth(), 1);
const int lineWidthD2 = lineWidth * 2 / 3;
- const bool noBrush = Qt::NoBrush == params()->bWChartBrush().style();
+ const bool noBrush = TQt::NoBrush == params()->bWChartBrush().style();
- // Loop over the datasets, draw one box and whisker shape for each series.
+ // Loop over the datasets, draw one box and whisker tqshape for each series.
for ( uint dataset = chartDatasetStart;
dataset <= chartDatasetEnd;
++dataset ) {
@@ -299,7 +299,7 @@ void KDChartBWPainter::specificPaintData( QPainter* painter,
if( dataset >= datasetStart &&
dataset <= datasetEnd &&
0 < calculateStats( *data, dataset ) ) {
- const QColor color( params()->dataColor( dataset ) );
+ const TQColor color( params()->dataColor( dataset ) );
// transform calculated values
double drawUOF = stats[ KDChartParams::UpperOuterFence ] * pixelsPerUnit;
double drawUIF = stats[ KDChartParams::UpperInnerFence ] * pixelsPerUnit;
@@ -312,23 +312,23 @@ void KDChartBWPainter::specificPaintData( QPainter* painter,
double drawMin = stats[ KDChartParams::MinValue ] * pixelsPerUnit;
double drawMean= stats[ KDChartParams::MeanValue ] * pixelsPerUnit;
// get whisker values
- double drawUWhisker = QMIN(drawUIF, drawMax);
- double drawLWhisker = QMAX(drawLIF, drawMin);
+ double drawUWhisker = TQMIN(drawUIF, drawMax);
+ double drawLWhisker = TQMAX(drawLIF, drawMin);
// get the box width
- const int boxWidth = QMAX( 6, static_cast<int>( pointDist * 0.2 ) );
+ const int boxWidth = TQMAX( 6, static_cast<int>( pointDist * 0.2 ) );
// get marker size (for the outliers and/or for the median value)
int markWidth = params()->bWChartOutValMarkerSize();
bool drawOutliers = ( 0 != markWidth );
if( drawOutliers ){
if( 0 > markWidth)
- markWidth = QMAX( 4, markWidth * boxWidth / -100 );
+ markWidth = TQMAX( 4, markWidth * boxWidth / -100 );
else
- markWidth = QMAX( 4, markWidth );
+ markWidth = TQMAX( 4, markWidth );
}
else
markWidth = boxWidth * 25 / 100; // use the default for the Median marker
- painter->setPen( QPen( color, lineWidth ) );
+ painter->setPen( TQPen( color, lineWidth ) );
painter->setBrush( params()->bWChartBrush() );
// draw the box
int boxWidthD2 = boxWidth / 2;
@@ -365,39 +365,39 @@ void KDChartBWPainter::specificPaintData( QPainter* painter,
int xPos2 = static_cast<int>(
pointDist * ( (double)(dataset - chartDatasetStart) + 0.5 )
- lineWidthD2 / 2);
- int markWidthD2 = QMAX(markWidth / 2, 2);
- int markWidthD25 = QMAX(static_cast<int>( 0.85 * markWidth / 2.0), 2);
- int markWidthD35 = QMAX(static_cast<int>( 0.85 * markWidth / 3.0), 2);
+ int markWidthD2 = TQMAX(markWidth / 2, 2);
+ int markWidthD25 = TQMAX(static_cast<int>( 0.85 * markWidth / 2.0), 2);
+ int markWidthD35 = TQMAX(static_cast<int>( 0.85 * markWidth / 3.0), 2);
// draw the outliers
if( drawOutliers ){
const uint nMax = data->usedCols();
int drawVal;
- QVariant vVal;
+ TQVariant vVal;
for( uint i=0; i<nMax; ++i)
if( data->cellCoord( dataset, i, vVal, 1 ) &&
- QVariant::Double == vVal.type() ) {
+ TQVariant::Double == vVal.type() ) {
drawVal = static_cast<int>( pixelsPerUnit * vVal.toDouble() );
if( drawLOF > drawVal || drawUOF < drawVal ) {
- painter->setPen( Qt::NoPen );
+ painter->setPen( TQt::NoPen );
painter->drawChord( xPos2 - markWidthD2,
static_cast<int>(zeroXAxisI - drawVal) - markWidthD2,
markWidth,
markWidth,
0, 5760 );
- painter->setPen( QPen( color, lineWidthD2 ) );
+ painter->setPen( TQPen( color, lineWidthD2 ) );
painter->drawArc( xPos2 - markWidthD2,
static_cast<int>(zeroXAxisI - drawVal) - markWidthD2,
markWidth,
markWidth,
0, 5760 );
} else if( drawLIF > drawVal || drawUIF < drawVal ) {
- painter->setPen( Qt::NoPen );
+ painter->setPen( TQt::NoPen );
painter->drawChord( xPos2 - markWidthD2,
static_cast<int>( zeroXAxisI - drawVal) - markWidthD2,
markWidth,
markWidth,
0, 5760 );
- painter->setPen( QPen( color, lineWidthD2 ) );
+ painter->setPen( TQPen( color, lineWidthD2 ) );
painter->drawLine( xPos2,
static_cast<int>(zeroXAxisI - drawVal) - markWidthD2,
xPos2,
@@ -425,10 +425,10 @@ void KDChartBWPainter::specificPaintData( QPainter* painter,
// use different color brightness for the Mean marker
int h,s,v;
color.hsv(&h,&s,&v);
- painter->setPen( QPen( 128 > v ? color.light(150) : color.dark(150),
+ painter->setPen( TQPen( 128 > v ? color.light(150) : color.dark(150),
lineWidthD2 ) );
} else
- painter->setPen( QPen( color, lineWidthD2 ) );
+ painter->setPen( TQPen( color, lineWidthD2 ) );
painter->drawLine( xPos2 - markWidthD2 - (evenLineWidthD2 ? 0 : 1),
static_cast<int>( zeroXAxisI - drawMean ),
xPos2 + markWidthD2,
@@ -439,13 +439,13 @@ void KDChartBWPainter::specificPaintData( QPainter* painter,
static_cast<int>( zeroXAxisI - drawMean ) + markWidthD2 + (evenLineWidthD2 ? 0 : 1) );
// draw the statistical value texts
- painter->setPen( Qt::NoPen );
+ painter->setPen( TQt::NoPen );
for( int ii = KDChartParams::BWStatValSTART;
ii <= KDChartParams::BWStatValEND;
++ii ){
KDChartParams::BWStatVal i = (KDChartParams::BWStatVal)ii;
if( params()->bWChartPrintStatistics( i ) ) {
- QFont statFont( params()->bWChartStatisticsFont( i ) );
+ TQFont statFont( params()->bWChartStatisticsFont( i ) );
float nTxtHeight = statFont.pointSizeFloat();
if ( params()->bWChartStatisticsUseRelSize( i ) ) {
nTxtHeight = params()->bWChartStatisticsFontRelSize( i )
@@ -453,7 +453,7 @@ void KDChartBWPainter::specificPaintData( QPainter* painter,
statFont.setPointSizeFloat( nTxtHeight );
}
double drawStat = pixelsPerUnit * stats[i];
- KDChartTextPiece statText( painter, QString::number( stats[i] ),
+ KDChartTextPiece statText( painter, TQString::number( stats[i] ),
statFont );
int tw = statText.width();
int xDelta = ( KDChartParams::MaxValue == i
@@ -461,13 +461,13 @@ void KDChartBWPainter::specificPaintData( QPainter* painter,
|| KDChartParams::MinValue == i )
? -1 * (tw + static_cast<int>( 1.3*boxWidthD2 ))
: static_cast<int>( 1.3*boxWidthD2 );
- QBrush brush( params()->bWChartStatisticsBrush( i ) );
+ TQBrush brush( params()->bWChartStatisticsBrush( i ) );
painter->setBrush( brush );
int y = static_cast<int>( zeroXAxisI - drawStat - nTxtHeight/2);
painter->drawRect( xPos + xDelta - 1,
y,
tw + 2,
- QMAX(static_cast < int > ( nTxtHeight ), 8) + 1 );
+ TQMAX(static_cast < int > ( nTxtHeight ), 8) + 1 );
statText.draw( painter,
xPos + xDelta,
y,
diff --git a/libkdchart/KDChartBWPainter.h b/libkdchart/KDChartBWPainter.h
index 3dd9ad7..48963a3 100644
--- a/libkdchart/KDChartBWPainter.h
+++ b/libkdchart/KDChartBWPainter.h
@@ -33,11 +33,11 @@
#include <KDChartParams.h>
#include <KDChartTable.h>
-#include <qnamespace.h>
+#include <tqnamespace.h>
class KDChartParams;
-class KDChartBWPainter : public KDChartAxesPainter, public Qt
+class KDChartBWPainter : public KDChartAxesPainter, public TQt
{
friend class KDChartPainter;
protected:
@@ -46,8 +46,8 @@ class KDChartBWPainter : public KDChartAxesPainter, public Qt
virtual bool isNormalMode() const;
virtual int clipShiftUp( bool, double ) const;
- virtual void specificPaintData( QPainter* painter,
- const QRect& ourClipRect,
+ virtual void specificPaintData( TQPainter* painter,
+ const TQRect& ourClipRect,
KDChartTableDataBase* data,
KDChartDataRegionList* regions,
const KDChartAxisParams* axisPara,
@@ -65,7 +65,7 @@ class KDChartBWPainter : public KDChartAxesPainter, public Qt
uint datasetStart,
uint datasetEnd );
- virtual QString fallbackLegendText( uint dataset ) const;
+ virtual TQString fallbackLegendText( uint dataset ) const;
virtual uint numLegendFallbackTexts( KDChartTableDataBase* data ) const;
private:
int calculateStats( KDChartTableDataBase&, uint );// returns number of used cells containing a double
diff --git a/libkdchart/KDChartBarPainter.cpp b/libkdchart/KDChartBarPainter.cpp
index b41fa34..f8ae89d 100644
--- a/libkdchart/KDChartBarPainter.cpp
+++ b/libkdchart/KDChartBarPainter.cpp
@@ -29,7 +29,7 @@
#include "KDChartBarPainter.h"
#include <KDChartParams.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <stdlib.h>
@@ -48,7 +48,7 @@ KDChartBarPainter::KDChartBarPainter( KDChartParams* params ) :
KDChartAxesPainter( params )
{
// This constructor intentionally left blank so far; we cannot setup the
- // geometry yet since we do not know the size of the painter.
+ // tqgeometry yet since we do not know the size of the painter.
}
@@ -76,7 +76,7 @@ int KDChartBarPainter::clipShiftUp( bool normalMode, double areaWidthP1000 ) con
}
-void KDChartBarPainter::initMyPainter( QPainter* painter )
+void KDChartBarPainter::initMyPainter( TQPainter* painter )
{
_myPainter = painter;
_painterDX = 0.0;
@@ -123,16 +123,16 @@ void KDChartBarPainter::calculateXFront1_2( bool bNormalMode, bool bIsVeryFirstB
}
-QPointArray rectToPointArray( const QRect& r )
+TQPointArray rectToPointArray( const TQRect& r )
{
- QPointArray a(4);
+ TQPointArray a(4);
a.putPoints( 0, 4, r.left(),r.top(), r.right(),r.top(), r.right(),r.bottom(), r.left(),r.bottom() );
return a;
}
-void KDChartBarPainter::specificPaintData( QPainter* painter,
- const QRect& ourClipRect,
+void KDChartBarPainter::specificPaintData( TQPainter* painter,
+ const TQRect& ourClipRect,
KDChartTableDataBase* data,
KDChartDataRegionList* regions,
const KDChartAxisParams* ordinatePara,
@@ -156,7 +156,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
*Store the painted rectangles in order to paint *
*them in relation to each other for more precision. *
****************************************************/
- QRect frontRectPositive,frontRectNegative,
+ TQRect frontRectPositive,frontRectNegative,
rightRectPositive, rightRectNegative,
excessRectPositive,excessRectNegative;
@@ -166,7 +166,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
if( !data ) return;
// qDebug("datasetStart: %i datasetEnd: %i", datasetStart, datasetEnd);
- const QPen defaultOutlinePen( params()->outlineDataColor(),
+ const TQPen defaultOutlinePen( params()->outlineDataColor(),
params()->outlineDataLineWidth(),
params()->outlineDataLineStyle() );
abscissaInfos ai;
@@ -176,7 +176,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
logWidth, _dataRect,
ai );
- const QRect devRect( painter->window() );
+ const TQRect devRect( painter->window() );
initMyPainter( painter );
@@ -226,7 +226,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
? 0.0
: static_cast<int>( valueBlockGap ) * numValues;
- // Set some geometry values that apply to bar charts only
+ // Set some tqgeometry values that apply to bar charts only
double totalNumberOfBars = 0.0;
double spaceBetweenDatasets = 0.0;
switch ( params()->barChartSubType() ) {
@@ -391,10 +391,10 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
dataset <= datasetEnd;
++dataset ) {
- QVariant vVal;
+ TQVariant vVal;
if( data->cellCoord( dataset, value, vVal, 1 )
&& params()->chartSourceMode( dataset ) == KDChartParams::DataEntry
- && QVariant::Double == vVal.type() ){
+ && TQVariant::Double == vVal.type() ){
const double cellValue
= ordinateIsLogarithmic
@@ -409,8 +409,8 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
if( 0.0 <= cellValue )
lastValidPositiveValue = dataset;
- maxValueInThisColumn = QMAX( maxValueInThisColumn, cellValue );
- minValueInThisColumn = QMIN( minValueInThisColumn, cellValue );
+ maxValueInThisColumn = TQMAX( maxValueInThisColumn, cellValue );
+ minValueInThisColumn = TQMIN( minValueInThisColumn, cellValue );
if( params()->barChartSubType() == KDChartParams::BarPercent /*||
params()->barChartSubType() == KDChartParams::BarStacked*/ )
valueTotal += cellValue;
@@ -437,11 +437,11 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
= (params()->chartSourceMode( dataset ) == KDChartParams::DataEntry);
- QVariant coord1;
- QVariant coord2;
+ TQVariant coord1;
+ TQVariant coord2;
int propID;
if( data->cellContent( dataset, value, coord1, coord2, propID )
- && QVariant::Double == coord1.type() ){
+ && TQVariant::Double == coord1.type() ){
const double cellValue
= ordinateIsLogarithmic
@@ -458,7 +458,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
barHeight = pixelsPerUnit * cellValue;
if( 0.0 <= barHeight )
- //barHeight = QMAX(0.0, barHeight - sideBarHeight);
+ //barHeight = TQMAX(0.0, barHeight - sideBarHeight);
barHeight = barHeight - sideBarHeight;
else
barHeight -= sideBarHeight;
@@ -484,20 +484,20 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
ai, 0, xpos );
// adjust bar position to have it horizontally centered to the point
if( ai.bAbscissaHasTrueAxisDtValues &&
- QVariant::DateTime == coord2.type() )
+ TQVariant::DateTime == coord2.type() )
xpos -= frontBarWidth / 2.0;
}
if( !skipMe ){
// Configure colors
- QColor myBarColor( params()->dataColor( dataset ) );
- QColor myShadow1Color( params()->dataShadow1Color( dataset ) );
- QColor myShadow2Color( params()->dataShadow2Color( dataset ) );
+ TQColor myBarColor( params()->dataColor( dataset ) );
+ TQColor myShadow1Color( params()->dataShadow1Color( dataset ) );
+ TQColor myShadow2Color( params()->dataShadow2Color( dataset ) );
// Get default values for extra lines and their markers
const KDChartParams::LineMarkerStyle
defaultMarkerStyle = params()->lineMarkerStyle( dataset );
- const QPen defaultPen( params()->lineColor().isValid()
+ const TQPen defaultPen( params()->lineColor().isValid()
? params()->lineColor()
: params()->dataColor( dataset ),
params()->lineWidth(),
@@ -529,7 +529,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
if( !bDrawExtraLines || bCellPropertiesFound ){
- //QRegion* region = 0;
+ //TQRegion* region = 0;
KDChartDataRegion::PointArrayList * pointArrayList = 0;
if( bDataEntrySourceMode && !bDrawExtraLines ){
painter->setPen( defaultOutlinePen );
@@ -571,7 +571,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
frontX1, frontX2, prevFrontX2 );
const int xm = static_cast < int > ( (frontX1 + frontX2) / 2.0 );
- QRect rect( ourClipRect );
+ TQRect rect( ourClipRect );
rect.setHeight( static_cast<int>( rect.height() + 3.0 * delta ) );
painter->setClipRect( rect );
@@ -579,7 +579,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
//Pending Michel: Make sure the point of the arrow is always at the same distance
//from the X axis reference to the point of the arrow.
int arrowXAxisGap;
- QPoint arrowTop( xm,static_cast<int>( yZero + height1 + 2 * yArrowGap) );
+ TQPoint arrowTop( xm,static_cast<int>( yZero + height1 + 2 * yArrowGap) );
if ( arrowTop.y()== yposNegatives )
arrowXAxisGap = -2;
@@ -608,7 +608,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
*/
// Draw solid excess arrows negatives
- QPointArray points( 5 );
+ TQPointArray points( 5 );
/*this works in a positive view -> 200 500*/
points.setPoint( 0, frontX1, cellValue < 0 ?
static_cast<int>(yZero+height1 - 3.0*delta)+(2*yArrowGap)+ arrowXAxisGap:
@@ -670,7 +670,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
else
userwidth = static_cast <int> (params()->userWidth() * areaWidthP1000);
//if ( userwidth < frontBarWidth ) {
- QRect tmpRect ( points.point(0), points.point(2));
+ TQRect tmpRect ( points.point(0), points.point(2));
points.setPoint(0, static_cast <int>(tmpRect.center().x() - userwidth/2),
points.point(0).y());
points.setPoint(1, static_cast <int>(tmpRect.center().x() + userwidth/2),
@@ -685,8 +685,8 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
painter->drawPolygon( points );
//correct the y position: displaying position for the value label
- QPoint tpLeft (points.point(4).x(), points.point(4).y() - 2 * yArrowGap );
- QPoint tpRight(points.point(2).x(), points.point(2).y() - 2 * yArrowGap );
+ TQPoint tpLeft (points.point(4).x(), points.point(4).y() - 2 * yArrowGap );
+ TQPoint tpRight(points.point(2).x(), points.point(2).y() - 2 * yArrowGap );
//store the front rectangle
excessRectNegative.setTopLeft(tpLeft);
@@ -719,7 +719,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
* The value is too low because over the Min negative value
* The value is not within the configured view..
*/
- QPointArray points( 5 );
+ TQPointArray points( 5 );
/*this works in a positive view -> 200 500*/
points.setPoint( 0, frontX1, cellValue < 0 ?
static_cast<int>(yZero+height1 - 3.0*delta) + arrowXAxisGap:
@@ -777,7 +777,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
else
userwidth = static_cast <int> (params()->userWidth() * areaWidthP1000);
//if ( userwidth < frontBarWidth ) {
- QRect tmpRect ( points.point(0), points.point(2));
+ TQRect tmpRect ( points.point(0), points.point(2));
points.setPoint(0, static_cast <int>(tmpRect.center().x() - userwidth/2),
points.point(0).y());
points.setPoint(1, static_cast <int>(tmpRect.center().x() + userwidth/2),
@@ -791,8 +791,8 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
painter->drawPolygon( points );
//correct the y position: displaying position for the value label
- QPoint tpLeft (points.point(4).x(), points.point(4).y() - 2 * yArrowGap );
- QPoint tpRight(points.point(2).x(), points.point(2).y() - 2 * yArrowGap );
+ TQPoint tpLeft (points.point(4).x(), points.point(4).y() - 2 * yArrowGap );
+ TQPoint tpRight(points.point(2).x(), points.point(2).y() - 2 * yArrowGap );
//store the excess front rectangle
excessRectNegative.setTopLeft(tpLeft);
@@ -815,7 +815,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
pointArrayList->append( points );
}
- QPointArray points2( 6 );
+ TQPointArray points2( 6 );
points2.setPoint( 0, frontX1, cellValue < 0 ?
static_cast<int>( yZero + height1 - 3.0 * delta ) + arrowXAxisGap:
static_cast<int>(yZero + height1) + arrowXAxisGap);
@@ -910,7 +910,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
else {
//
// old code (sometimes not touching the grid):
- //QRect rec( xpos, yZero, frontBarWidth, -barHeight );
+ //TQRect rec( xpos, yZero, frontBarWidth, -barHeight );
//painter->drawRect( rec );
//
@@ -919,8 +919,8 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
/*
if ( cellValue != 0 ) {
pt1Y = static_cast <int> (cellValue * pixelsPerUnit * -2);
- qDebug( "value %s",QString::number(static_cast <int> (cellValue)).latin1());
- qDebug( "pt1Y %s", QString::number(static_cast <int> (cellValue * pixelsPerUnit * -2)).latin1());
+ qDebug( "value %s",TQString::number(static_cast <int> (cellValue)).latin1());
+ qDebug( "pt1Y %s", TQString::number(static_cast <int> (cellValue * pixelsPerUnit * -2)).latin1());
}
else
pt1Y = static_cast < int > ( yZero - barHeight);
@@ -929,8 +929,8 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
xpos, valueBlockGap, datasetGap, frontBarWidth,
frontX1, frontX2, prevFrontX2 );
- QPoint pt1( frontX1, pt1Y );
- QPoint pt2( frontX2,
+ TQPoint pt1( frontX1, pt1Y );
+ TQPoint pt2( frontX2,
static_cast < int > ( yZero + sideBarHeight) );
if( 0.0 > maxColumnValue ){
@@ -961,14 +961,14 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
bDrawExtraLinesInFront );
}else if( bShowThisBar ){
- QSize siz( pt2.x() - pt1.x(),
+ TQSize siz( pt2.x() - pt1.x(),
pt2.y() - pt1.y() );
- QRect rect( pt1, siz );
+ TQRect rect( pt1, siz );
if( 1.5 > frontBarWidth ){
- QPen oldPen( painter->pen() );
- painter->setPen( QPen(painter->brush().color(), 0) );
- painter->drawLine(pt1, QPoint(pt1.x(),pt2.y()));
+ TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen(painter->brush().color(), 0) );
+ painter->drawLine(pt1, TQPoint(pt1.x(),pt2.y()));
painter->setPen( oldPen );
}else{
// store the front rect negative
@@ -1042,9 +1042,9 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
double minDataValueYPos = maxValueYPos - minValueYPos;
double yZero = yposPositives - zeroXAxisI;
//qDebug( "yposPositives %f - zeroXAxisI %f = %f" , yposPositives, zeroXAxisI, yZero );
- //qDebug( "yZero %s", QString::number( yZero ).latin1());
- //qDebug( "minDataValueYPos = %s", QString::number( minDataValueYPos).latin1());
- //qDebug( "positive value %s", QString::number( cellValue).latin1());
+ //qDebug( "yZero %s", TQString::number( yZero ).latin1());
+ //qDebug( "minDataValueYPos = %s", TQString::number( minDataValueYPos).latin1());
+ //qDebug( "positive value %s", TQString::number( cellValue).latin1());
//Pending Michel: draw the default split excess arrows
//when the front top of the 3d chart reach the max Y value
@@ -1076,7 +1076,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
frontX1, frontX2, prevFrontX2 );
const int xm = static_cast < int > ( ( frontX1 + frontX2 ) / 2.0 );
- QRect rect( ourClipRect );
+ TQRect rect( ourClipRect );
rect.setTop( static_cast<int>( rect.top() + 3 * delta ) );
rect.setHeight( static_cast<int>( rect.height() - 3 * delta ) );
@@ -1097,7 +1097,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
}else if( bShowThisBar ){
if( params()->drawSolidExcessArrows() ) {
// Draw solid excess arrows
- QPointArray points( 5 );
+ TQPointArray points( 5 );
/*this works for positive config and 0 include config*/
points.setPoint( 0, frontX1,
(minDataValueYPos < static_cast <int> (yZero))?
@@ -1128,7 +1128,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
else
userwidth = static_cast <int> (params()->userWidth() * areaWidthP1000);
//if ( userwidth < frontBarWidth ) {
- QRect tmpRect ( points.point(0), points.point(2));
+ TQRect tmpRect ( points.point(0), points.point(2));
points.setPoint(0, static_cast <int>(tmpRect.center().x() - userwidth/2),
points.point(0).y());
points.setPoint(1, static_cast <int>(tmpRect.center().x() + userwidth/2),
@@ -1146,8 +1146,8 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
painter->drawPolygon( points );
}
//correct the y position: displaying position for the value label
- QPoint tpLeft (points.point(4).x(), static_cast <int> (points.point(4).y() - yArrowGap));
- QPoint tpRight(points.point(2).x(), static_cast <int> (points.point(2).y() - yArrowGap));
+ TQPoint tpLeft (points.point(4).x(), static_cast <int> (points.point(4).y() - yArrowGap));
+ TQPoint tpRight(points.point(2).x(), static_cast <int> (points.point(2).y() - yArrowGap));
//debugging points
/*
@@ -1184,7 +1184,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
* The value is too high because over the Max positive value
* or it is not within the configured view.
*/
- QPointArray points( 5 );
+ TQPointArray points( 5 );
/*this works for positive config and 0 include config*/
points.setPoint( 0, frontX1,
(minDataValueYPos < static_cast <int> (yZero))?
@@ -1212,7 +1212,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
else
userwidth = static_cast <int> (params()->userWidth() * areaWidthP1000);
//if ( userwidth < frontBarWidth ) {
- QRect tmpRect ( points.point(0), points.point(2));
+ TQRect tmpRect ( points.point(0), points.point(2));
points.setPoint(0, static_cast <int>(tmpRect.center().x() - userwidth/2),
points.point(0).y());
points.setPoint(1, static_cast <int>(tmpRect.center().x() + userwidth/2),
@@ -1250,7 +1250,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
}
}
- QPointArray points2( 6 );
+ TQPointArray points2( 6 );
points2.setPoint( 0, frontX1, static_cast<int>( yZero + height1 - 3.0 * delta ) );
points2.setPoint( 1, xm, static_cast<int>( yZero + height1 ) );
points2.setPoint( 2, frontX2, static_cast<int>( yZero + height1 - 3.0 * delta ) );
@@ -1308,8 +1308,8 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
xpos, valueBlockGap, datasetGap, frontBarWidth,
frontX1, frontX2, prevFrontX2 );
- QPoint pt1( frontX1, pt1Y );
- QPoint pt2( frontX2,
+ TQPoint pt1( frontX1, pt1Y );
+ TQPoint pt2( frontX2,
static_cast < int > ( y0 + shiftUpperBars ) );
if( 0.0 < minColumnValue )
@@ -1341,10 +1341,10 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
bDrawExtraLinesInFront );
}else if( bShowThisBar ){
- QSize siz( pt2.x() - pt1.x(),
+ TQSize siz( pt2.x() - pt1.x(),
pt2.y() - pt1.y());
- QRect rect( pt1, siz );
+ TQRect rect( pt1, siz );
//adjust display for the 3d percent bars - last dataset.
if ( params()->barChartSubType() == KDChartParams::BarPercent && cellValue != 0)
@@ -1367,14 +1367,14 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
if( 1.5 > frontBarWidth ){
//qDebug("1.5 > frontBarWidth ");
- QPen oldPen( painter->pen() );
- painter->setPen( QPen(painter->brush().color(), 0) );
- painter->drawLine(pt1, QPoint(pt1.x(),pt2.y()));
+ TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen(painter->brush().color(), 0) );
+ painter->drawLine(pt1, TQPoint(pt1.x(),pt2.y()));
painter->setPen( oldPen );
}else{
//debugging points and lines
/*
- painter->drawText( rect.topLeft(), QString::number(cellValue).latin1());
+ painter->drawText( rect.topLeft(), TQString::number(cellValue).latin1());
painter->drawText( rect.topRight(), "1f");
painter->drawText( rect.bottomRight(), "2f");
painter->drawText( rect.bottomLeft(), "3f");
@@ -1422,7 +1422,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
if ( bShowThisBar && _bThreeDBars && !bDrawExtraLines ) {
//Pending Michel: no need to use that anymore
//const int maxY = 2*devRect.height();
- QPointArray points( 4 );
+ TQPointArray points( 4 );
if (cellValue <= 0 || cellValue < minColumnValue) {
if ( tooLow || cellValue < minColumnValue ) {
points.setPoint(0, excessRectNegative.topRight());
@@ -1472,7 +1472,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
}
if ( myShadow2Color.isValid() )
- painter->setBrush( QBrush( myShadow2Color, params()->shadowPattern() ) );
+ painter->setBrush( TQBrush( myShadow2Color, params()->shadowPattern() ) );
else
painter->setBrush( NoBrush );
@@ -1503,7 +1503,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
// Dont override the region stored in case of excess values or barPercent this in order to display
// the value labels closer to the corner of the front bar.
if ( pointArrayList && !tooHigh && !tooLow && params()->barChartSubType() != KDChartParams::BarPercent ) {
- QPointArray points2cpy( points.copy() );
+ TQPointArray points2cpy( points.copy() );
//qDebug("g2");
points2cpy.translate( _dataRect.x(), _dataRect.y());
//qDebug("g3");
@@ -1573,7 +1573,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
if (cellValue < 0.0 && maxValueInThisColumn < 0)
painter->setBrush( bMultiRows ? myBarColor : black );
else
- painter->setBrush( QBrush( myShadow1Color, params()->shadowPattern() ) );
+ painter->setBrush( TQBrush( myShadow1Color, params()->shadowPattern() ) );
if ( !myShadow1Color.isValid() )
painter->setBrush( NoBrush ); // override prev. setting
@@ -1613,7 +1613,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
} else {
// just store a rectangle if NOT in 3-D bar mode
region = new KDChartDataRegion( dataset, value, chart,
- pointArrayList->first().boundingRect() );
+ TQT_TQRECT_OBJECT(pointArrayList->first().boundingRect()) );
delete pointArrayList;
}
/*qDebug("KDChartDataRegion stored! x: %i y: %i w: %i h: %i",
@@ -1636,7 +1636,7 @@ void KDChartBarPainter::specificPaintData( QPainter* painter,
iDummy1, iDummy2, prevFrontX2 );
}// if( dataset >= datasetStart && dataset <= datasetEnd )
- // Vertical advancement in stacked or percent only if there was a value
+ //Qt::Vertical advancement in stacked or percent only if there was a value
// Pending Michel add sideBarHeight in case we are in 3D mode but not for Percent
// where we need to display the top rect but cant resize the YAxis.
if ( params()->barChartSubType() == KDChartParams::BarStacked ||
diff --git a/libkdchart/KDChartBarPainter.h b/libkdchart/KDChartBarPainter.h
index 10b0e05..fc57320 100644
--- a/libkdchart/KDChartBarPainter.h
+++ b/libkdchart/KDChartBarPainter.h
@@ -32,11 +32,11 @@
#include "KDChartAxesPainter.h"
#include <KDChartTable.h>
-#include <qnamespace.h>
+#include <tqnamespace.h>
class KDChartParams;
-class KDChartBarPainter : public KDChartAxesPainter, public Qt
+class KDChartBarPainter : public KDChartAxesPainter, public TQt
{
friend class KDChartPainter;
protected:
@@ -44,15 +44,15 @@ class KDChartBarPainter : public KDChartAxesPainter, public Qt
virtual ~KDChartBarPainter();
/*
- virtual void paintData( QPainter* painter,
+ virtual void paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions );
*/
virtual bool isNormalMode() const;
virtual int clipShiftUp( bool normalMode, double areaWidthP1000 ) const;
- virtual void specificPaintData( QPainter* painter,
- const QRect& ourClipRect,
+ virtual void specificPaintData( TQPainter* painter,
+ const TQRect& ourClipRect,
KDChartTableDataBase* data,
KDChartDataRegionList* regions,
const KDChartAxisParams* axisPara,
@@ -73,10 +73,10 @@ class KDChartBarPainter : public KDChartAxesPainter, public Qt
double xpos, double valueBlockGap, double datasetGap, double frontBarWidth,
int& frontX1, int& frontX2, int& previousFrontX2 );
private:
- void initMyPainter( QPainter* painter );
+ void initMyPainter( TQPainter* painter );
void shiftMyPainter( double dx, double dy );
void shiftMyPainterBack();
- QPainter* _myPainter;
+ TQPainter* _myPainter;
double _painterDX;
double _painterDY;
bool _bThreeDBars;
diff --git a/libkdchart/KDChartCustomBox.cpp b/libkdchart/KDChartCustomBox.cpp
index 4f765f0..d500356 100644
--- a/libkdchart/KDChartCustomBox.cpp
+++ b/libkdchart/KDChartCustomBox.cpp
@@ -26,12 +26,12 @@
** licensing are not clear to you.
**
**********************************************************************/
-#include <qpainter.h>
-#include <qregion.h>
-#include <qpalette.h>
-#include <qpoint.h>
-#include <qsimplerichtext.h>
-#include <qpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqregion.h>
+#include <tqpalette.h>
+#include <tqpoint.h>
+#include <tqsimplerichtext.h>
+#include <tqpaintdevicemetrics.h>
#include <KDChartCustomBox.h>
#include <KDXMLTools.h>
@@ -87,7 +87,7 @@ float KDChartCustomBox::trueFontSize( double areaWidthP1000,
if( 0 > _fontSize ) {
if( _fontScaleGlobal ) {
- size = _fontSize * QMIN(areaWidthP1000, areaHeightP1000) * -1.0;//(areaWidthP1000 + areaHeightP1000) / -2.0;
+ size = _fontSize * TQMIN(areaWidthP1000, areaHeightP1000) * -1.0;//(areaWidthP1000 + areaHeightP1000) / -2.0;
} else {
@@ -95,25 +95,25 @@ float KDChartCustomBox::trueFontSize( double areaWidthP1000,
float targetLineSpacing = (_fontSize * rectHeight)/ -1000;
size = targetLineSpacing;
// step #1 - try to make the right font size:
- QFont font( content().font() );
+ TQFont font( content().font() );
font.setPointSizeFloat( size );
- QFontMetrics fm( font );
- //qDebug(QString("\nsize : ")+QString::number(size));
- //qDebug(QString("(float)rectHeight : ")+QString::number((float)rectHeight));
- //qDebug(QString("(float)fm.lineSpacing(): ")+QString::number((float)fm.lineSpacing()));
+ TQFontMetrics fm( font );
+ //qDebug(TQString("\nsize : ")+TQString::number(size));
+ //qDebug(TQString("(float)rectHeight : ")+TQString::number((float)rectHeight));
+ //qDebug(TQString("(float)fm.lineSpacing(): ")+TQString::number((float)fm.lineSpacing()));
size *= targetLineSpacing / fm.lineSpacing();
- //qDebug(QString("size : ")+QString::number(size));
+ //qDebug(TQString("size : ")+TQString::number(size));
// step #2 - make sure the font size is not too big:
font.setPointSizeFloat( size );
- QFontMetrics fm2( font );
+ TQFontMetrics fm2( font );
size *= targetLineSpacing / fm2.lineSpacing();
- //qDebug(QString("(float)rectHeight : ")+QString::number((float)rectHeight));
- //qDebug(QString("(float)fm.lineSpacing(): ")+QString::number((float)fm.lineSpacing()));
- //qDebug(QString("size : ")+QString::number(size));
+ //qDebug(TQString("(float)rectHeight : ")+TQString::number((float)rectHeight));
+ //qDebug(TQString("(float)fm.lineSpacing(): ")+TQString::number((float)fm.lineSpacing()));
+ //qDebug(TQString("size : ")+TQString::number(size));
}
}
else {
-//qDebug(QString("\n_fontsize: ")+QString::number(_fontSize));
+//qDebug(TQString("\n_fontsize: ")+TQString::number(_fontSize));
if( _fontSize )
size = _fontSize;
else{
@@ -132,9 +132,9 @@ int KDChartCustomBox::trueFontLineSpacing( double areaWidthP1000,
double areaHeightP1000,
int rectHeight ) const
{
- QFont font( content().font() );
+ TQFont font( content().font() );
font.setPointSizeFloat( trueFontSize( areaWidthP1000,areaHeightP1000, rectHeight ) );
- QFontMetrics fm( font );
+ TQFontMetrics fm( font );
return fm.lineSpacing();
}
@@ -157,33 +157,33 @@ void KDChartCustomBox::getTrueShift( double areaWidthP1000,
//qDebug("y %i",y);
}
uint deltaAlign = (KDCHART_AlignAuto == _deltaAlign) ? _anchorAlign : _deltaAlign;
- if ( Qt::AlignLeft == (Qt::AlignLeft & deltaAlign) )
+ if ( TQt::AlignLeft == (TQt::AlignLeft & deltaAlign) )
dX = x;
- else if ( Qt::AlignRight == (Qt::AlignRight & deltaAlign) )
+ else if ( TQt::AlignRight == (TQt::AlignRight & deltaAlign) )
dX = -x;
else
dX = 0; // <-- so the _deltaX value becomes ineffective!
- if ( Qt::AlignTop == (Qt::AlignTop & deltaAlign) )
+ if ( TQt::AlignTop == (TQt::AlignTop & deltaAlign) )
dY = y;
- else if ( Qt::AlignBottom == (Qt::AlignBottom & deltaAlign) )
+ else if ( TQt::AlignBottom == (TQt::AlignBottom & deltaAlign) )
dY = -y;
else
dY = 0; // <-- so the _deltaY value becomes ineffective!
}
-QRect KDChartCustomBox::trueRect( QPainter * /*painter*/, QPoint /*anchor*/, double /*areaWidthP1000*/, double /*areaHeightP1000*/ ) const
+TQRect KDChartCustomBox::trueRect( TQPainter * /*painter*/, TQPoint /*anchor*/, double /*areaWidthP1000*/, double /*areaHeightP1000*/ ) const
{
//temporary allow KDC_Presentation to compile
qDebug( "Sorry, not implemented yet: KDChartCustomBox::trueRect()" );
- return QRect( 1, 1, 2, 2 );
+ return TQRect( 1, 1, 2, 2 );
}
-//static QPainter* pppainter=0;
+//static TQPainter* pppainter=0;
//static int pdWidth =1280;
//static int pdHeight =1024;
-QRect KDChartCustomBox::trueRect( QPoint anchor, double areaWidthP1000, double areaHeightP1000 ) const
+TQRect KDChartCustomBox::trueRect( TQPoint anchor, double areaWidthP1000, double areaHeightP1000 ) const
{
int w = (0 > _width ) ? static_cast < int > ( -areaWidthP1000 * _width ) : _width;
int h = (0 > _height) ? static_cast < int > ( -areaHeightP1000 * _height ) : _height;
@@ -192,31 +192,23 @@ QRect KDChartCustomBox::trueRect( QPoint anchor, double areaWidthP1000, double a
if( _fontScaleGlobal && 0 == w && 0 == h ){
//Now calculate the size of the box based upon the content!
- QFont font( content().font() );
+ TQFont font( content().font() );
if ( _fontSize ) {
font.setPointSizeFloat(
(0 > _fontSize)
- ? (_fontSize * QMIN(areaWidthP1000, areaHeightP1000) * -1.0)//(areaWidthP1000 + areaHeightP1000) / -2.0
+ ? (_fontSize * TQMIN(areaWidthP1000, areaHeightP1000) * -1.0)//(areaWidthP1000 + areaHeightP1000) / -2.0
: _fontSize );
- //qDebug("\n_fontSize * QMIN(areaWidthP1000, areaHeightP1000) %i * QMIN(%f, %f) text: %s", _fontSize , areaWidthP1000, areaHeightP1000, content().text().latin1());
+ //qDebug("\n_fontSize * TQMIN(areaWidthP1000, areaHeightP1000) %i * TQMIN(%f, %f) text: %s", _fontSize , areaWidthP1000, areaHeightP1000, content().text().latin1());
}
- QString txt( content().text() );
- QString txtTest( txt.stripWhiteSpace().lower() );
-#if QT_VERSION >= 200 && QT_VERSION < 300
-// version 2.x
- if( !(txtTest.left(4) == "<qt>") )
- txt.prepend( "<qt>" );
- if( !(txtTest.right(5)== "</qt>"))
- txt.append( "</qt>");
-#else
+ TQString txt( content().text() );
+ TQString txtTest( txt.stripWhiteSpace().lower() );
if( !txtTest.startsWith("<qt>" ) )
txt.prepend( "<qt>" );
if( !txtTest.endsWith( "</qt>") )
txt.append( "</qt>");
-#endif
//qDebug("\nw: %i h: %i", w,h );
- QSimpleRichText tmpContent( txt, font );
+ TQSimpleRichText tmpContent( txt, font );
// tmpContent.setWidth(pdWidth);
// tmpContent.setHeight(pdHeight);
// tmpContent.adjustSize();
@@ -232,16 +224,16 @@ QRect KDChartCustomBox::trueRect( QPoint anchor, double areaWidthP1000, double a
//qDebug("\nw: %i h: %i", w,h );
int x,y;
- if ( Qt::AlignLeft == (Qt::AlignLeft & _anchorAlign) )
+ if ( TQt::AlignLeft == (TQt::AlignLeft & _anchorAlign) )
x = 0;
- else if ( Qt::AlignRight == (Qt::AlignRight & _anchorAlign) )
+ else if ( TQt::AlignRight == (TQt::AlignRight & _anchorAlign) )
x = - w + 1;
else
x = - w / 2;
- if ( Qt::AlignTop == (Qt::AlignTop & _anchorAlign) )
+ if ( TQt::AlignTop == (TQt::AlignTop & _anchorAlign) )
y = 0;
- else if ( Qt::AlignBottom == (Qt::AlignBottom & _anchorAlign) )
+ else if ( TQt::AlignBottom == (TQt::AlignBottom & _anchorAlign) )
y = - h + 1;
else
y = - h / 2;
@@ -250,55 +242,55 @@ QRect KDChartCustomBox::trueRect( QPoint anchor, double areaWidthP1000, double a
dX, dY );
//qDebug("trueRect: x %i y %i w %i h %i text: %s", anchor.x()+x+dX, anchor.y()+y+dY, w,h, content().text().latin1());
- return QRect( anchor.x()+x+dX, anchor.y()+y+dY, w, h );
+ return TQRect( anchor.x()+x+dX, anchor.y()+y+dY, w, h );
}
-int KDChartCustomBox::trueRectAlignX(const QRect& rect) const
+int KDChartCustomBox::trueRectAlignX(const TQRect& rect) const
{
int ret = rect.center().x();
- if ( Qt::AlignLeft == (Qt::AlignLeft & _anchorAlign) )
+ if ( TQt::AlignLeft == (TQt::AlignLeft & _anchorAlign) )
ret -= rect.width();
- else if ( Qt::AlignRight == (Qt::AlignRight & _anchorAlign) )
+ else if ( TQt::AlignRight == (TQt::AlignRight & _anchorAlign) )
ret += rect.width();
return ret;
}
-int KDChartCustomBox::trueRectAlignY(const QRect& rect) const
+int KDChartCustomBox::trueRectAlignY(const TQRect& rect) const
{
int ret = rect.center().y();
- if ( Qt::AlignTop == (Qt::AlignTop & _anchorAlign) )
+ if ( TQt::AlignTop == (TQt::AlignTop & _anchorAlign) )
ret -= rect.height();
- else if ( Qt::AlignBottom == (Qt::AlignBottom & _anchorAlign) )
+ else if ( TQt::AlignBottom == (TQt::AlignBottom & _anchorAlign) )
ret += rect.height();
return ret;
}
-void KDChartCustomBox::paint( QPainter* painter,
- QPoint anchor,
+void KDChartCustomBox::paint( TQPainter* painter,
+ TQPoint anchor,
double areaWidthP1000,
double areaHeightP1000,
const KDFrame* frame,
- const QRect& frameRect,
- const QColor * color,
- const QBrush * paper ) const
+ const TQRect& frameRect,
+ const TQColor * color,
+ const TQBrush * paper ) const
{
painter->save();
int rotDX = 0;
int rotDY = 0;
/*
//pppainter=painter;
-const QPaintDeviceMetrics metrics(painter->device());
+const TQPaintDeviceMetrics metrics(painter->device());
pdWidth = metrics.width();
const int aWidthP1000 = metrics.width() /1000;
const int aHeightP1000 = metrics.height()/1000;
//pdHeight = metrics.height();
*/
- QRect myRect( trueRect( anchor, areaWidthP1000, areaHeightP1000 ) );
+ TQRect myRect( trueRect( anchor, areaWidthP1000, areaHeightP1000 ) );
/*
-QPaintDeviceMetrics metrics(painter->device());
+TQPaintDeviceMetrics metrics(painter->device());
int pdWidth = metrics.width();
int dpiY = metrics.logicalDpiY();
int dpiX = metrics.logicalDpiX();
@@ -308,7 +300,7 @@ qDebug("pdWidth: %i box myRect w: %i h %i",pdWidth,myRect.width(),myRect.hei
//myRect.setSize(myRect.size()*6);
- QRect myFrameRect( frameRect );
+ TQRect myFrameRect( frameRect );
if ( myRect.isValid() ) {
//qDebug("box myRect center: x %i y %i",myRect.center().x(),myRect.center().y());
if( _rotation ){
@@ -319,10 +311,10 @@ qDebug("pdWidth: %i box myRect w: %i h %i",pdWidth,myRect.width(),myRect.hei
myFrameRect.moveBy( -rotDX, -rotDY );
//qDebug("\nrotDelta: x %i y %i",rotDX,rotDY);
//qDebug("\nbox myRect center: x %i y %i",myRect.center().x(),myRect.center().y());
- myRect.moveCenter( QPoint( anchor.x() - trueRectAlignX(myRect),
+ myRect.moveCenter( TQPoint( anchor.x() - trueRectAlignX(myRect),
anchor.y() - trueRectAlignY(myRect) ) );
if( frame )
- myFrameRect.moveCenter( QPoint( anchor.x() - trueRectAlignX(myFrameRect),
+ myFrameRect.moveCenter( TQPoint( anchor.x() - trueRectAlignX(myFrameRect),
anchor.y() - trueRectAlignY(myFrameRect) ) );
//qDebug("box myRect center: x %i y %i",myRect.center().x(),myRect.center().y());
painter->translate( anchor.x(), anchor.y() );
@@ -332,7 +324,7 @@ qDebug("pdWidth: %i box myRect w: %i h %i",pdWidth,myRect.width(),myRect.hei
if( frame )
frame->paint( painter, KDFrame::PaintAll, myFrameRect );
if ( _fontSize ) {
- QFont font( content().font() );
+ TQFont font( content().font() );
float trueSize = trueFontSize(areaWidthP1000,areaHeightP1000, myRect.height() );
font.setPointSizeFloat( trueSize );
@@ -354,13 +346,13 @@ qDebug("pdWidth: %i box myRect w: %i h %i",pdWidth,myRect.width(),myRect.hei
}
-void KDChartCustomBox::createCustomBoxNode( QDomDocument& document,
- QDomNode& parent,
- const QString& elementName,
+void KDChartCustomBox::createCustomBoxNode( TQDomDocument& document,
+ TQDomNode& tqparent,
+ const TQString& elementName,
const KDChartCustomBox* custombox )
{
- QDomElement customBoxElement = document.createElement( elementName );
- parent.appendChild( customBoxElement );
+ TQDomElement customBoxElement = document.createElement( elementName );
+ tqparent.appendChild( customBoxElement );
KDXML::createIntNode( document, customBoxElement, "Rotation", custombox->_rotation );
KDXML::createStringNode( document, customBoxElement, "ContentText",
custombox->_content.text() );
@@ -396,12 +388,12 @@ void KDChartCustomBox::createCustomBoxNode( QDomDocument& document,
}
-bool KDChartCustomBox::readCustomBoxNode( const QDomElement& element,
+bool KDChartCustomBox::readCustomBoxNode( const TQDomElement& element,
KDChartCustomBox& custombox )
{
bool ok = true;
- QString tempContentText;
- QFont tempContentFont;
+ TQString tempContentText;
+ TQFont tempContentFont;
int tempRotation = 0; // must be initialized: new parameter, not present in old versions of KDChart
int tempDeltaAlign = KDCHART_AlignAuto; // must be initialized too: new parameter
bool tempDeltaScaleGlobal = true; // must be initialized too: new parameter
@@ -409,14 +401,14 @@ bool KDChartCustomBox::readCustomBoxNode( const QDomElement& element,
tempWidth, tempHeight, tempAnchorArea, tempParentAxisArea, tempAnchorAlign,
tempDataRow, tempDataCol, tempData3rd;
bool tempFontScaleGlobal;
- QColor tempColor;
- QBrush tempPaper;
+ TQColor tempColor;
+ TQBrush tempPaper;
KDChartEnums::PositionFlag tempAnchorPos = KDChartEnums::PosTopLeft;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Rotation" ) {
ok = ok & KDXML::readIntNode( element, tempRotation );
} else if( tagName == "ContentText" ) {
@@ -442,7 +434,7 @@ bool KDChartCustomBox::readCustomBoxNode( const QDomElement& element,
} else if( tagName == "AnchorArea" ) {
ok = ok & KDXML::readIntNode( element, tempAnchorArea );
} else if( tagName == "AnchorPos" ) {
- QString value;
+ TQString value;
ok = ok & KDXML::readStringNode( element, value );
tempAnchorPos = KDChartEnums::stringToPositionFlag( value );
} else if( tagName == "AnchorAlign" ) {
diff --git a/libkdchart/KDChartCustomBox.h b/libkdchart/KDChartCustomBox.h
index f4f8694..e57110a 100644
--- a/libkdchart/KDChartCustomBox.h
+++ b/libkdchart/KDChartCustomBox.h
@@ -29,10 +29,10 @@
#ifndef __KDCHARTCUSTOMBOX_H__
#define __KDCHARTCUSTOMBOX_H__
-#include <qobject.h>
-#include <qtextstream.h>
-#include <qfont.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqtextstream.h>
+#include <tqfont.h>
+#include <tqdom.h>
#include "KDChartGlobal.h"
#include "KDChartEnums.h"
#include "KDChartTextPiece.h"
@@ -40,7 +40,7 @@
class KDFrame;
-// needed because there was no AlignAuto before Qt 3.0
+// needed because there was no AlignAuto before TQt 3.0
#define KDCHART_AlignAuto 0
@@ -51,9 +51,10 @@ class KDFrame;
/**
Class for specifying and drawing custom boxes.
*/
-class KDCHART_EXPORT KDChartCustomBox :public QObject
+class KDCHART_EXPORT KDChartCustomBox :public TQObject
{
Q_OBJECT
+ TQ_OBJECT
friend class KDChartPainter;
friend class KDChartParams;
@@ -71,11 +72,11 @@ public:
_deltaY( 0 ),
_width( 0 ),
_height( 0 ),
- _color( Qt::black ),
- _paper( Qt::NoBrush ),
+ _color( TQt::black ),
+ _paper( TQt::NoBrush ),
_anchorArea( KDChartEnums::AreaInnermost ),
_anchorPos( KDChartEnums::PosTopLeft ),
- _anchorAlign( Qt::AlignTop + Qt::AlignLeft ),
+ _anchorAlign( TQt::AlignTop + TQt::AlignLeft ),
_dataRow( 0 ),
_dataCol( 0 ),
_data3rd( 0 ),
@@ -84,7 +85,7 @@ public:
_anchorBeingCalculated( false ),
_parentAxisArea( -1 )
{
- const KDChartTextPiece piece( 0, "", QFont( "helvetica", 8, QFont::Normal, false ) );
+ const KDChartTextPiece piece( 0, "", TQFont( "helvetica", 8, TQFont::Normal, false ) );
_content.deepCopy( &piece );
}
@@ -115,11 +116,11 @@ public:
_deltaY( 0 ),
_width( 0 ),
_height( 0 ),
- _color( Qt::black ),
- _paper( Qt::NoBrush ),
+ _color( TQt::black ),
+ _paper( TQt::NoBrush ),
_anchorArea( KDChartEnums::AreaInnermost ),
_anchorPos( KDChartEnums::PosTopLeft ),
- _anchorAlign( Qt::AlignTop + Qt::AlignLeft ),
+ _anchorAlign( TQt::AlignTop + TQt::AlignLeft ),
_dataRow( 0 ),
_dataCol( 0 ),
_data3rd( 0 ),
@@ -158,7 +159,7 @@ public:
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect.
\param deltaY The Y distance between the box and its anchor.
\param width The width of the box.
@@ -180,18 +181,18 @@ public:
\param deltaAlign The way how \c deltaX and \deltaY affect the position of the box.
Leave this parameter to its default value KDCHART_AlignAuto to have the delta values
used according to the box's main \c align settings, otherwise specify your own
- alignment settings: e.g. right means there will be a gap between the right side of
+ tqalignment settings: e.g. right means there will be a gap between the right side of
the box and its anchor point - if the main \c align parameter is set to right too
the anchor point will to be outside of the box / if \c align is set to left
(but the \c deltaAlign to right) the anchor point will be inside the box.
Possible values for \c deltaAlign are:
\li \c KDCHART_AlignAuto
- \li \c Qt::AlignLeft | Qt::AlignTop
- \li \c Qt::AlignLeft | Qt::AlignBottom
- \li \c Qt::AlignRight | Qt::AlignTop
- \li \c Qt::AlignRight | Qt::AlignBottom
+ \li \c TQt::AlignLeft | TQt::AlignTop
+ \li \c TQt::AlignLeft | TQt::AlignBottom
+ \li \c TQt::AlignRight | TQt::AlignTop
+ \li \c TQt::AlignRight | TQt::AlignBottom
Using AlignVCenter or AlignHCenter or AlignCenter does not make sense here:
- center delta alignment will cause KDChart to ignore the respective delta
+ center delta tqalignment will cause KDChart to ignore the respective delta
settings: deltaX or deltaY or both will become ineffective.
\param deltaScaleGlobal If true the actual delta X and delta Y values will
be calculated by \c deltaX and \c deltaY based upon the size of the
@@ -205,17 +206,17 @@ public:
int deltaY,
int width,
int height,
- const QColor & color = QColor( Qt::black ),
- const QBrush & paper = QBrush( Qt::NoBrush ),
+ const TQColor & color = TQColor( TQt::black ),
+ const TQBrush & paper = TQBrush( TQt::NoBrush ),
uint area = KDChartEnums::AreaInnermost,
KDChartEnums::PositionFlag position = KDChartEnums::PosTopLeft,
- uint align = Qt::AlignTop + Qt::AlignLeft,
+ uint align = TQt::AlignTop + TQt::AlignLeft,
uint dataRow = 0,
uint dataCol = 0,
uint data3rd = 0,
uint deltaAlign = KDCHART_AlignAuto,
bool deltaScaleGlobal = true,
- int parentAxis = -1 )
+ int tqparentAxis = -1 )
: _rotation( 0 ),
_fontSize( fontSize ),
_fontScaleGlobal( fontScaleGlobal ),
@@ -234,7 +235,7 @@ public:
_deltaAlign( deltaAlign ),
_deltaScaleGlobal( deltaScaleGlobal ),
_anchorBeingCalculated( false ),
- _parentAxisArea( parentAxis )
+ _parentAxisArea( tqparentAxis )
{
_content.deepCopy( &content );
}
@@ -269,13 +270,13 @@ public:
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
width of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in method trueRect.
\param deltaY The Y distance between the box and its anchor.
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
height of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in method trueRect.
\param width The width of the box.
\param height The height of the box.
@@ -296,23 +297,23 @@ public:
\param deltaAlign The way how \c deltaX and \deltaY affect the position of the box.
Leave this parameter to its default value KDCHART_AlignAuto to have the delta values
used according to the box's main \c align settings, otherwise specify your own
- alignment settings: e.g. Qt::AlignRight means the box will be moved to the left
+ tqalignment settings: e.g. TQt::AlignRight means the box will be moved to the left
(by the amount calculated using the \c deltaX value), so there will be a gap
between the right side of the box and its anchor point IF the main \c align flag
- is set to Qt::AlignRight too, so the anchor point will to be outside of the
- box then. However if the main \c align flag is set to Qt::AlignLeft the anchor
+ is set to TQt::AlignRight too, so the anchor point will to be outside of the
+ box then. However if the main \c align flag is set to TQt::AlignLeft the anchor
point will be inside the box.
Possible values for \c deltaAlign are:
\li \c KDCHART_AlignAuto
- \li \c Qt::AlignLeft | Qt::AlignTop
- \li \c Qt::AlignLeft | Qt::AlignBottom
- \li \c Qt::AlignRight | Qt::AlignTop
- \li \c Qt::AlignRight | Qt::AlignBottom
+ \li \c TQt::AlignLeft | TQt::AlignTop
+ \li \c TQt::AlignLeft | TQt::AlignBottom
+ \li \c TQt::AlignRight | TQt::AlignTop
+ \li \c TQt::AlignRight | TQt::AlignBottom
Using AlignVCenter or AlignHCenter or AlignCenter does not make sense here:
- center delta alignment will cause KDChart to ignore the respective delta
+ center delta tqalignment will cause KDChart to ignore the respective delta
settings: deltaX or deltaY or both will become ineffective.
\note Moving of the box due to \c deltaAlign settings is applied after
- the box is rotated: e.g. this means a gap specified by \c deltaAlign = Qt::AlignTop
+ the box is rotated: e.g. this means a gap specified by \c deltaAlign = TQt::AlignTop
gap will actually result in a left gap if the box is rotated by 90 degrees.
\param deltaScaleGlobal If true the actual delta X and delta Y values will
be calculated by \c deltaX and \c deltaY based upon the size of the
@@ -327,17 +328,17 @@ public:
int deltaY,
int width,
int height,
- const QColor & color = QColor( Qt::black ),
- const QBrush & paper = QBrush( Qt::NoBrush ),
+ const TQColor & color = TQColor( TQt::black ),
+ const TQBrush & paper = TQBrush( TQt::NoBrush ),
uint area = KDChartEnums::AreaInnermost,
KDChartEnums::PositionFlag position = KDChartEnums::PosTopLeft,
- uint align = Qt::AlignTop + Qt::AlignLeft,
+ uint align = TQt::AlignTop + TQt::AlignLeft,
uint dataRow = 0,
uint dataCol = 0,
uint data3rd = 0,
uint deltaAlign = KDCHART_AlignAuto,
bool deltaScaleGlobal = true,
- int parentAxis = -1 )
+ int tqparentAxis = -1 )
: _rotation( rotation ),
_fontSize( fontSize ),
_fontScaleGlobal( fontScaleGlobal ),
@@ -356,7 +357,7 @@ public:
_deltaAlign( deltaAlign ),
_deltaScaleGlobal( deltaScaleGlobal ),
_anchorBeingCalculated( false ),
- _parentAxisArea( parentAxis )
+ _parentAxisArea( tqparentAxis )
{
_content.deepCopy( &content );
}
@@ -367,13 +368,13 @@ public:
in a DOM document.
\param document the DOM document to which the node will belong
- \param parent the parent node to which the new node will be appended
+ \param tqparent the tqparent node to which the new node will be appended
\param elementName the name of the new node
\param custombox the custom box to be represented
*/
- static void createCustomBoxNode( QDomDocument& document,
- QDomNode& parent,
- const QString& elementName,
+ static void createCustomBoxNode( TQDomDocument& document,
+ TQDomNode& tqparent,
+ const TQString& elementName,
const KDChartCustomBox* custombox );
/**
@@ -383,7 +384,7 @@ public:
\param element the DOM element to read from
\param settings the custom box object to read the data into
*/
- static bool readCustomBoxNode( const QDomElement& element,
+ static bool readCustomBoxNode( const TQDomElement& element,
KDChartCustomBox& custombox );
public slots: // PENDING(blackie) merge slots sections.
@@ -394,8 +395,8 @@ public slots: // PENDING(blackie) merge slots sections.
int trueFontLineSpacing( double areaWidthP1000,
double areaHeightP1000,
int rectHeight ) const;
- int trueRectAlignX(const QRect& rect) const;
- int trueRectAlignY(const QRect& rect) const;
+ int trueRectAlignX(const TQRect& rect) const;
+ int trueRectAlignY(const TQRect& rect) const;
void getTrueShift( double areaWidthP1000,
double areaHeightP1000,
int rectHeight,
@@ -407,9 +408,9 @@ public slots: // PENDING(blackie) merge slots sections.
Return the actual rectangle which to draw box into.
\note When ever possible, use this method, instead of the other trueRect(), that
- has no \c QPainter parameter. Passing a QPainter will give you more exact results.
+ has no \c TQPainter parameter. Passing a TQPainter will give you more exact results.
- \param painter The QPainter to be used.
+ \param painter The TQPainter to be used.
\param anchor The anchor point which the box is to be aligned to.
This can be any point within the painter drawing area but you
will probably compute a point using anchorArea(), anchorPosition(), anchorAlign()
@@ -419,8 +420,8 @@ public slots: // PENDING(blackie) merge slots sections.
\param areaHeightP1000 The thousands part of the logical height
of the area to be used for drawing.
*/
- QRect trueRect( QPainter * painter,
- QPoint anchor, double areaWidthP1000, double areaHeightP1000 ) const ;
+ TQRect trueRect( TQPainter * painter,
+ TQPoint anchor, double areaWidthP1000, double areaHeightP1000 ) const ;
/**
Return the actual rectangle which to draw box into.
@@ -434,14 +435,14 @@ public slots: // PENDING(blackie) merge slots sections.
\param areaHeightP1000 The thousands part of the logical height
of the area to be used for drawing.
*/
- virtual QRect trueRect( QPoint anchor,
+ virtual TQRect trueRect( TQPoint anchor,
double areaWidthP1000,
double areaHeightP1000 ) const ;
/**
Paints the box.
- \param painter The QPainter to be used for drawing.
+ \param painter The TQPainter to be used for drawing.
\param anchor The anchor point which the box is to be aligned to.
This can be any point within the painter drawing area but you
will probably compute a point using anchorArea(), anchorPosition(), anchorAlign()
@@ -455,14 +456,14 @@ public slots: // PENDING(blackie) merge slots sections.
(that were set via Constructor or via setPosAndSize) and based upon the
logical height (or width, resp.) of the painters drawing area.
*/
- virtual void paint( QPainter* painter,
- QPoint anchor,
+ virtual void paint( TQPainter* painter,
+ TQPoint anchor,
double areaWidthP1000,
double areaHeightP1000,
const KDFrame* frame = 0,
- const QRect& frameRect = QRect(),
- const QColor * color = 0,
- const QBrush * paper = 0 ) const ;
+ const TQRect& frameRect = TQRect(),
+ const TQColor * color = 0,
+ const TQBrush * paper = 0 ) const ;
/**
Specifies the rotation angle of the box in degrees (0..360).
@@ -570,7 +571,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect.
\param deltaY The Y distance between the box and its anchor.
\param width The width of the drawing region.
@@ -613,7 +614,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect.
\param deltaY The Y distance between the box and its anchor.
\param align the way how the values specified for deltaX and/or deltaY
@@ -642,21 +643,21 @@ public slots: // PENDING(blackie) merge slots sections.
Set this to KDHART_KDCHART_AlignAuto to have the delta values
used according to the box's main \c align settings, otherwise specify your own
- alignment settings: e.g. right means there will be a gap between the right side of
+ tqalignment settings: e.g. right means there will be a gap between the right side of
the box and its anchor point - if the main \c align parameter is set to right too
the anchor point will to be outside of the box / if \c align is set to left
(but the \c deltaAlign to right) the anchor point will be inside the box.
Possible values for \c deltaAlign are:
\li \c KDCHART_AlignAuto
- \li \c Qt::AlignLeft | Qt::AlignTop
- \li \c Qt::AlignLeft | Qt::AlignBottom
- \li \c Qt::AlignRight | Qt::AlignTop
- \li \c Qt::AlignRight | Qt::AlignBottom
+ \li \c TQt::AlignLeft | TQt::AlignTop
+ \li \c TQt::AlignLeft | TQt::AlignBottom
+ \li \c TQt::AlignRight | TQt::AlignTop
+ \li \c TQt::AlignRight | TQt::AlignBottom
Using AlignVCenter or AlignHCenter or AlignCenter does not make sense here:
- center delta alignment will cause KDChart to ignore the respective delta
+ center delta tqalignment will cause KDChart to ignore the respective delta
settings: deltaX or deltaY or both will become ineffective.
\note Moving of the box due to \c deltaAlign settings is applied after
- the box is rotated: e.g. this means a gap specified by \c deltaAlign = Qt::AlignTop
+ the box is rotated: e.g. this means a gap specified by \c deltaAlign = TQt::AlignTop
gap will actually result in a left gap if the box is rotated by 90 degrees.
\param deltaScaleGlobal If true the actual delta X and delta Y values will
be calculated by \c deltaX and \c deltaY based upon the size of the
@@ -718,7 +719,7 @@ public slots: // PENDING(blackie) merge slots sections.
\param color The text color.
*/
- void setColor( QColor color )
+ void setColor( TQColor color )
{
_color = color;
}
@@ -728,7 +729,7 @@ public slots: // PENDING(blackie) merge slots sections.
\param paper The brush to be used for the background.
*/
- void setPaper( const QBrush & paper )
+ void setPaper( const TQBrush & paper )
{
_paper = paper;
}
@@ -837,7 +838,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect.
\sa deltaY, deltaAlign, deltaScaleGlobal
@@ -852,7 +853,7 @@ public slots: // PENDING(blackie) merge slots sections.
<b>Note: </b> If greater 0, the value is taken as exact offset,
if less than 0, it is interpreted as being a per-mille value of the
size of the drawing area (or as percent value of the actual font size
- (as returned by QFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
+ (as returned by TQFontMetrics::lineSpacing() ) if deltaScaleGlobal is FALSE, resp.).
Actual drawing position/size is calculated dynamically in methode trueRect.
\sa deltaX, deltaAlign, deltaScaleGlobal
@@ -911,7 +912,7 @@ public slots: // PENDING(blackie) merge slots sections.
/**
Returns the text color.
*/
- QColor color() const
+ TQColor color() const
{
return _color;
}
@@ -919,7 +920,7 @@ public slots: // PENDING(blackie) merge slots sections.
/**
Returns the background brush.
*/
- const QBrush & paper() const
+ const TQBrush & paper() const
{
return _paper;
}
@@ -952,7 +953,7 @@ public:
const KDChartCustomBox* clone() const;
private:
- KDChartCustomBox( const KDChartCustomBox& ) : QObject(0) {}
+ KDChartCustomBox( const KDChartCustomBox& ) : TQObject(0) {}
protected:
/**
@@ -973,13 +974,13 @@ protected:
return _anchorBeingCalculated;
}
- void setParentAxisArea( int parentAxis ) const
+ void setParentAxisArea( int tqparentAxis ) const
{
KDChartCustomBox* that = const_cast<KDChartCustomBox*>(this);
- that->_parentAxisArea = parentAxis;
+ that->_parentAxisArea = tqparentAxis;
}
- int parentAxisArea() const
+ int tqparentAxisArea() const
{
return _parentAxisArea;
}
@@ -997,8 +998,8 @@ private:
int _width;
int _height;
- QColor _color;
- QBrush _paper;
+ TQColor _color;
+ TQBrush _paper;
uint _anchorArea;
KDChartEnums::PositionFlag _anchorPos;
@@ -1026,7 +1027,7 @@ private:
\param p the KDChartCustomBox object to write
\return the text stream after the write operation
*/
-//QTextStream& operator<<( QTextStream& s, const KDChartCustomBox& p );
+//TQTextStream& operator<<( TQTextStream& s, const KDChartCustomBox& p );
/**
@@ -1037,7 +1038,7 @@ private:
\param p the KDChartCustomBox object to read into
\return the text stream after the read operation
*/
-//QTextStream& operator>>( QTextStream& s, KDChartCustomBox& p );
+//TQTextStream& operator>>( TQTextStream& s, KDChartCustomBox& p );
#endif
diff --git a/libkdchart/KDChartCustomBoxWrapper.cpp b/libkdchart/KDChartCustomBoxWrapper.cpp
index 2ee28eb..c62b118 100644
--- a/libkdchart/KDChartCustomBoxWrapper.cpp
+++ b/libkdchart/KDChartCustomBoxWrapper.cpp
@@ -1,6 +1,6 @@
#include "KDChartCustomBoxWrapper.h"
KDChartCustomBoxWrapper::KDChartCustomBoxWrapper( KDChartCustomBox* data)
- :QObject(0), _data(data)
+ :TQObject(0), _data(data)
{
}
diff --git a/libkdchart/KDChartCustomBoxWrapper.h b/libkdchart/KDChartCustomBoxWrapper.h
index b294a24..271aa0d 100644
--- a/libkdchart/KDChartCustomBoxWrapper.h
+++ b/libkdchart/KDChartCustomBoxWrapper.h
@@ -1,13 +1,14 @@
#ifndef KDCHARTCUSTOMBOX_H
#define KDCHARTCUSTOMBOX_H
-#include <qobject.h>
+#include <tqobject.h>
#include "KDChartCustomBox.h"
class KDChartCustomBox;
class KDChartTextPiece;
-class KDChartCustomBoxWrapper :public QObject
+class KDChartCustomBoxWrapper :public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KDChartCustomBoxWrapper( KDChartCustomBox* );
diff --git a/libkdchart/KDChartDataIntern.cpp b/libkdchart/KDChartDataIntern.cpp
index 21640f4..fe4ae2d 100644
--- a/libkdchart/KDChartDataIntern.cpp
+++ b/libkdchart/KDChartDataIntern.cpp
@@ -38,7 +38,7 @@
an extra one for the abscissa axis.
Ordinate values can either be of type double or non-existant,
- abscissa values can either be of type double or QDateTime or non-existant.
+ abscissa values can either be of type double or TQDateTime or non-existant.
\note All methods returning one of the data values (or one of the data
types, resp.) expect a valNo parameter with either a 1 for the first value
@@ -73,9 +73,9 @@
/**
- \fn KDChartData::KDChartData( double yValue, QDateTime xValue )
+ \fn KDChartData::KDChartData( double yValue, TQDateTime xValue )
- Constructor. Assigns a double value and a QDateTime value to this object.
+ Constructor. Assigns a double value and a TQDateTime value to this object.
\param yValue the double value which this object should represent.
\param xValue the position on the abscissa axis which this object
@@ -84,7 +84,7 @@
/**
- \fn KDChartData::KDChartData( const QString& value )
+ \fn KDChartData::KDChartData( const TQString& value )
Constructor. Assigns a string value to this object.
@@ -98,7 +98,7 @@
/**
\fn bool KDChartData::hasValue(int) const
- Returns true if the object represents a value (double or QString)
+ Returns true if the object represents a value (double or TQString)
and false otherwise.
\return true if the object represents a value
@@ -107,19 +107,19 @@
/**
\fn bool KDChartData::isDateTime(int) const
- Returns true if the object represents a QDateTime value and false
+ Returns true if the object represents a TQDateTime value and false
otherwise.
- \return true if the object represents a QDateTime value
+ \return true if the object represents a TQDateTime value
*/
/**
\fn bool KDChartData::isString(int) const
- Returns true if the object represents a QString value and false
+ Returns true if the object represents a TQString value and false
otherwise.
- \return true if the object represents a QString value
+ \return true if the object represents a TQString value
*/
/**
@@ -173,23 +173,23 @@
*/
/**
- \fn QDateTime KDChartData::dateTimeValue( int valNo=1 ) const
+ \fn TQDateTime KDChartData::dateTimeValue( int valNo=1 ) const
- Returns the QDateTime value represented by this object,
- or QDateTime() if this object does not represent a QDateTime value.
+ Returns the TQDateTime value represented by this object,
+ or TQDateTime() if this object does not represent a TQDateTime value.
You may use isDateTime() to check if it
is appropriate to call this function.
- \return the QDateTime value represented by this object,
- or QDateTime() if this object does not represent a QDateTime value
+ \return the TQDateTime value represented by this object,
+ or TQDateTime() if this object does not represent a TQDateTime value
*/
/**
- \fn QString KDChartData::stringValue( int valNo=1 ) const
+ \fn TQString KDChartData::stringValue( int valNo=1 ) const
Returns the string value represented by this object,
- or QString::null if this object does not represent a string value.
+ or TQString() if this object does not represent a string value.
You may use isString() to check if it
is appropriate to call this function.
@@ -198,7 +198,7 @@
in extra data cells.
\return the string value represented by this object,
- or QString::null if this object does not represent a string value
+ or TQString() if this object does not represent a string value
*/
diff --git a/libkdchart/KDChartDataIntern.h b/libkdchart/KDChartDataIntern.h
index cb41b5c..70cd3bd 100644
--- a/libkdchart/KDChartDataIntern.h
+++ b/libkdchart/KDChartDataIntern.h
@@ -29,9 +29,9 @@
#ifndef __KDCHARTDATAINTERN_H__
#define __KDCHARTDATAINTERN_H__
-#include <qvariant.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqvariant.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include "KDChartGlobal.h"
/**
@@ -50,28 +50,28 @@ public:
// 0. default c'tor: initializing all values as undefined
KDChartData() :
- _valueType( QVariant::Invalid ),
- _valueType2( QVariant::Invalid ),
+ _valueType( TQVariant::Invalid ),
+ _valueType2( TQVariant::Invalid ),
_propSetID( 0 )
{}
// 1. simple c'tors: used for 1-coordinate data
KDChartData( double value ) :
- _valueType( QVariant::Double ), dValue( value ),
- _valueType2( QVariant::Invalid ),
+ _valueType( TQVariant::Double ), dValue( value ),
+ _valueType2( TQVariant::Invalid ),
_propSetID( 0 )
{}
/* string values are only supported for legend texts or axis labels */
- KDChartData( const QString& value ) :
- _valueType( QVariant::String ), sValue( value ),
- _valueType2( QVariant::Invalid ),
+ KDChartData( const TQString& value ) :
+ _valueType( TQVariant::String ), sValue( value ),
+ _valueType2( TQVariant::Invalid ),
_propSetID( 0 )
{}
/* date/time values for /ordinate/ axes are not implemented yet
- KDChartData( QDateTime value ) :
- _valueType( QVariant::DateTime ), dtValue( value ),
- _valueType2( QVariant::Invalid ),
+ KDChartData( TQDateTime value ) :
+ _valueType( TQVariant::DateTime ), dtValue( value ),
+ _valueType2( TQVariant::Invalid ),
_propSetID( 0 )
{}*/
@@ -79,65 +79,65 @@ public:
// 2.a) with additional Date/Time: normally used when Date on x-axis
// e.g. for time related index numbers like water level measurements
- KDChartData( double yValue, QDateTime xValue ) :
- _valueType( QVariant::Double ), dValue( yValue ),
- _valueType2( QVariant::DateTime ), dtValue2( xValue ),
+ KDChartData( double yValue, TQDateTime xValue ) :
+ _valueType( TQVariant::Double ), dValue( yValue ),
+ _valueType2( TQVariant::DateTime ), dtValue2( xValue ),
_propSetID( 0 )
{}
- KDChartData( const QVariant& _value1,
- const QVariant& _value2 )
+ KDChartData( const TQVariant& _value1,
+ const TQVariant& _value2 )
{
switch( _value1.type() ){
- case QVariant::Int:
- case QVariant::UInt:
- case QVariant::Double:
- _valueType = QVariant::Double;
+ case TQVariant::Int:
+ case TQVariant::UInt:
+ case TQVariant::Double:
+ _valueType = TQVariant::Double;
dValue = _value1.toDouble();
break;
- case QVariant::DateTime:
- _valueType = QVariant::DateTime;
+ case TQVariant::DateTime:
+ _valueType = TQVariant::DateTime;
dtValue = _value1.toDateTime();
break;
- case QVariant::String:
- _valueType = QVariant::String;
+ case TQVariant::String:
+ _valueType = TQVariant::String;
sValue = _value1.toString();
break;
default:
- _valueType = QVariant::Invalid;
+ _valueType = TQVariant::Invalid;
}
switch( _value2.type() ){
- case QVariant::Int:
- case QVariant::UInt:
- case QVariant::Double:
- _valueType2 = QVariant::Double;
+ case TQVariant::Int:
+ case TQVariant::UInt:
+ case TQVariant::Double:
+ _valueType2 = TQVariant::Double;
dValue2 = _value2.toDouble();
break;
- case QVariant::DateTime:
- _valueType2 = QVariant::DateTime;
+ case TQVariant::DateTime:
+ _valueType2 = TQVariant::DateTime;
dtValue2 = _value2.toDateTime();
break;
default:
- _valueType2 = QVariant::Invalid;
+ _valueType2 = TQVariant::Invalid;
}
_propSetID = 0;
}
/* date/time values for /ordinate/ axes are not implemented yet
- KDChartData( QDateTime yValue, QDateTime xValue ) :
+ KDChartData( TQDateTime yValue, TQDateTime xValue ) :
_valueType( DateTime ), dtValue( yValue ),
_valueType2( DateTime ), dtValue2( xValue ),
_propSetID( 0 )
{}*/
// 2.b) with additional Double: may be used for mathematical data...
KDChartData( double yValue, double xValue ) :
- _valueType( QVariant::Double ), dValue( yValue ),
- _valueType2( QVariant::Double ), dValue2( xValue ),
+ _valueType( TQVariant::Double ), dValue( yValue ),
+ _valueType2( TQVariant::Double ), dValue2( xValue ),
_propSetID( 0 )
{}
/* date/time values for /ordinate/ axes are not implemented yet
- KDChartData( QDateTime yValue, double xValue ) :
+ KDChartData( TQDateTime yValue, double xValue ) :
_valueType( DateTime ), dtValue( yValue ),
_valueType2( Double ), dValue2( xValue ),
_propSetID( 0 )
@@ -200,13 +200,13 @@ public:
bRet = a.valueType( 1 ) == b.valueType( 1 );
if ( bRet ) {
switch ( a.valueType( 1 ) ) {
- case QVariant::String:
+ case TQVariant::String:
bRet = a.stringValue( 1 ) == b.stringValue( 1 );
break;
- case QVariant::Double:
+ case TQVariant::Double:
bRet = a.doubleValue( 1 ) == b.doubleValue( 1 );
break;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
bRet = a.dateTimeValue( 1 ) == b.dateTimeValue( 1 );
break;
default:
@@ -219,10 +219,10 @@ public:
switch ( a.valueType( 2 ) ) {
// note: the 2nd value can not be a string
// - must be a date or a number!
- case QVariant::Double:
+ case TQVariant::Double:
bRet = a.doubleValue( 2 ) == b.doubleValue( 2 );
break;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
bRet = a.dateTimeValue( 2 ) == b.dateTimeValue( 2 );
break;
default:
@@ -230,8 +230,8 @@ public:
}
}
}
- // Note: We do *not* compare the _propSetID here since it contains
- // no values but is used to handle some layout information...
+ // Note: We do *not* compare the _propSetID here since it tqcontains
+ // no values but is used to handle some tqlayout information...
}
return bRet;
}
@@ -264,13 +264,13 @@ public:
_valueType = R._valueType;
_valueType2 = R._valueType2;
switch ( valueType( 1 ) ) {
- case QVariant::String:
+ case TQVariant::String:
sValue = R.sValue;
break;
- case QVariant::Double:
+ case TQVariant::Double:
dValue = R.dValue;
break;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
dtValue = R.dtValue;
break;
default:
@@ -279,21 +279,21 @@ public:
switch ( valueType( 2 ) ) {
// note: the 2nd value can not be a string
// - must be a date or a number!
- case QVariant::Double:
+ case TQVariant::Double:
dValue2 = R.dValue2;
break;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
dtValue2 = R.dtValue2;
break;
default:
/* NOOP */;
}
- // Note: We do *not* copy the _propSetID here since it contains
- // no values but is used to handle some layout information...
+ // Note: We do *not* copy the _propSetID here since it tqcontains
+ // no values but is used to handle some tqlayout information...
}
}
- QVariant::Type valueType( int valNo=1 ) const
+ TQVariant::Type valueType( int valNo=1 ) const
{
return (1 == valNo)
? _valueType
@@ -302,72 +302,72 @@ public:
bool hasValue( int valNo=1 ) const
{
return (1 == valNo)
- ? (_valueType != QVariant::Invalid)
- : ((_valueType2 == QVariant::Double) || (_valueType2 == QVariant::DateTime));
+ ? (_valueType != TQVariant::Invalid)
+ : ((_valueType2 == TQVariant::Double) || (_valueType2 == TQVariant::DateTime));
}
/* string values are only supported for legend texts or axis labels */
bool isString( int valNo=1 ) const
{
return (1 == valNo)
- ? (_valueType == QVariant::String)
+ ? (_valueType == TQVariant::String)
: false;
}
bool isDouble( int valNo=1 ) const
{
return (1 == valNo)
- ? (_valueType == QVariant::Double)
- : (_valueType2 == QVariant::Double);
+ ? (_valueType == TQVariant::Double)
+ : (_valueType2 == TQVariant::Double);
}
bool isDateTime( int valNo=1 ) const
{
return (1 == valNo)
- ? (_valueType == QVariant::DateTime)
- : (_valueType2 == QVariant::DateTime);
+ ? (_valueType == TQVariant::DateTime)
+ : (_valueType2 == TQVariant::DateTime);
}
void clearValue()
{
- _valueType = QVariant::Invalid;
- _valueType2 = QVariant::Invalid;
+ _valueType = TQVariant::Invalid;
+ _valueType2 = TQVariant::Invalid;
_propSetID = 0;
}
- QVariant value( int valNo=1 ) const
+ TQVariant value( int valNo=1 ) const
{
if( 1 == valNo )
switch ( valueType( 1 ) ) {
- case QVariant::String:
+ case TQVariant::String:
return sValue;
- case QVariant::Double:
+ case TQVariant::Double:
return dValue;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
return dtValue;
default:
- return QVariant();
+ return TQVariant();
}
else if( 2 == valNo )
switch ( valueType( 2 ) ) {
- case QVariant::Double:
+ case TQVariant::Double:
return dValue2;
- case QVariant::DateTime:
+ case TQVariant::DateTime:
return dtValue2;
default:
- return QVariant();
+ return TQVariant();
}
else
- return QVariant();
+ return TQVariant();
}
/* string values are only supported for legend texts or axis labels */
- QString stringValue( int valNo=1 ) const
+ TQString stringValue( int valNo=1 ) const
{
// note: the 2nd value can not be a string
// - must be a date or a number!
if ((1 == valNo) && isString( valNo ))
return sValue;
else
- return QString::null;
+ return TQString();
}
double doubleValue( int valNo=1 ) const
{
@@ -375,11 +375,11 @@ public:
? ((1 == valNo) ? dValue : dValue2)
: DBL_MIN;
}
- QDateTime dateTimeValue( int valNo=1 ) const
+ TQDateTime dateTimeValue( int valNo=1 ) const
{
return isDateTime( valNo )
? ((1 == valNo) ? dtValue : dtValue2)
- : QDateTime();
+ : TQDateTime();
}
/**
@@ -414,15 +414,15 @@ public:
private:
// OBLIGATORY 1st value: usually used for ordinate axis
- QVariant::Type _valueType;
- QDateTime dtValue;
+ TQVariant::Type _valueType;
+ TQDateTime dtValue;
double dValue; // Sorry, d(t)Value and sValue cannot be a union,
- QString sValue; // since QString has a non-default constructor.
+ TQString sValue; // since TQString has a non-default constructor.
// OPTIONAL 2nd value: if valid, normally used for abscissa axis
// note: this 2nd value can not be a string - must be a date or a number!
- QVariant::Type _valueType2;
- QDateTime dtValue2;
+ TQVariant::Type _valueType2;
+ TQDateTime dtValue2;
double dValue2;
// ID number of the property set assigned to this cell
diff --git a/libkdchart/KDChartDataRegion.h b/libkdchart/KDChartDataRegion.h
index a1d8303..1379043 100644
--- a/libkdchart/KDChartDataRegion.h
+++ b/libkdchart/KDChartDataRegion.h
@@ -29,8 +29,8 @@
#ifndef __KDCHARTDATAREGION__
#define __KDCHARTDATAREGION__
-#include <qregion.h>
-#include <qpointarray.h>
+#include <tqregion.h>
+#include <tqpointarray.h>
#include "KDChartGlobal.h"
@@ -39,35 +39,35 @@
*/
struct KDCHART_EXPORT KDChartDataRegion
{
- typedef QValueList<QPointArray> PointArrayList;
+ typedef TQValueList<TQPointArray> PointArrayList;
KDChartDataRegion()
{
init();
}
- KDChartDataRegion( QRegion region, uint r, uint c, uint ch )
+ KDChartDataRegion( TQRegion region, uint r, uint c, uint ch )
{
init();
- pRegion = new QRegion( region );
+ pRegion = new TQRegion( region );
row = r;
col = c;
chart = ch;
}
- KDChartDataRegion( uint r, uint c, uint ch, QPointArray array )
+ KDChartDataRegion( uint r, uint c, uint ch, TQPointArray array )
{
init();
- pArray = new QPointArray( array );
+ pArray = new TQPointArray( array );
row = r;
col = c;
chart = ch;
}
- KDChartDataRegion( uint r, uint c, uint ch, QRect rect )
+ KDChartDataRegion( uint r, uint c, uint ch, TQRect rect )
{
init();
- pRect = new QRect( rect );
+ pRect = new TQRect( rect );
row = r;
col = c;
chart = ch;
@@ -99,29 +99,29 @@ struct KDCHART_EXPORT KDChartDataRegion
delete pTextRegion;
}
- QRegion region() const
+ TQRegion region() const
{
if( pPointArrayList && ! pPointArrayList->empty() ){
- QRegion region;
+ TQRegion region;
PointArrayList::iterator it;
for ( it = pPointArrayList->begin(); it != pPointArrayList->end(); ++it ){
- region += QRegion( *it );
+ region += TQRegion( *it );
}
return region;
}
if( pRegion )
return *pRegion;
if( pArray )
- return QRegion( *pArray );
+ return TQRegion( *pArray );
if( pRect )
- return QRegion( *pRect );
- return QRegion();
+ return TQRegion( *pRect );
+ return TQRegion();
}
- QRect rect() const
+ TQRect rect() const
{
if( pPointArrayList && ! pPointArrayList->empty() ){
- QRect rect;
+ TQRect rect;
PointArrayList::iterator it;
for ( it = pPointArrayList->begin(); it != pPointArrayList->end(); ++it ){
rect = rect.unite( (*it).boundingRect() );
@@ -134,26 +134,26 @@ struct KDCHART_EXPORT KDChartDataRegion
return pArray->boundingRect();
if( pRect )
return *pRect;
- return QRect();
+ return TQRect();
}
- bool contains(const QPoint & p) const
+ bool tqcontains(const TQPoint & p) const
{
if( pPointArrayList && ! pPointArrayList->empty() ){
PointArrayList::iterator it;
for ( it = pPointArrayList->begin(); it != pPointArrayList->end(); ++it ){
- QRegion region( *it );
- if( region.contains( p ) )
+ TQRegion region( *it );
+ if( region.tqcontains( p ) )
return true;
}
return false;
}
if( pRegion )
- return pRegion->contains( p );
+ return pRegion->tqcontains( p );
if( pArray )
- return QRegion( *pArray ).contains( p );
+ return TQRegion( *pArray ).tqcontains( p );
if( pRect )
- return pRect->contains( p );
+ return pRect->tqcontains( p );
return false;
}
@@ -173,13 +173,13 @@ struct KDCHART_EXPORT KDChartDataRegion
angleLen = 1;
}
- QRegion* pRegion;
- QPointArray* pArray;
- QRect* pRect;
- QRegion* pTextRegion; // for the data values text
+ TQRegion* pRegion;
+ TQPointArray* pArray;
+ TQRect* pRect;
+ TQRegion* pTextRegion; // for the data values text
// for three-dimensional bars, and for comparable structures, needing
- // more than one QPointArray, we use this list:
+ // more than one TQPointArray, we use this list:
PointArrayList* pPointArrayList;
// For rectangular data representation (bar, line, area, point, ...)
@@ -188,7 +188,7 @@ struct KDCHART_EXPORT KDChartDataRegion
// we store the following additional anchor information:
// store 9 elements: one for each value of KDChartEnums::PositionFlag
- QPointArray points;
+ TQPointArray points;
int startAngle; // Note: 5760 makes a full circle, 2880 is left 'corner'.
int angleLen;
@@ -197,7 +197,7 @@ struct KDCHART_EXPORT KDChartDataRegion
uint col;
// members needed for calculation of data values texts
uint chart;
- QString text; // the data values text
+ TQString text; // the data values text
bool negative; // stores whether the data value is less than zero
};
@@ -207,7 +207,7 @@ struct KDCHART_EXPORT KDChartDataRegion
\brief The collection class used by KD Chart to store data region information.
- This class is derived from QPtrList, so all of the Qt documentation for this class
+ This class is derived from TQPtrList, so all of the TQt documentation for this class
is valid for KDChartDataRegionList too.
\note Normally there is no need to use this class yourself, since it
@@ -221,6 +221,6 @@ struct KDCHART_EXPORT KDChartDataRegion
\sa KDChart, KDChartWidget
*/
-typedef QPtrList < KDChartDataRegion > KDChartDataRegionList;
+typedef TQPtrList < KDChartDataRegion > KDChartDataRegionList;
#endif
diff --git a/libkdchart/KDChartEnums.cpp b/libkdchart/KDChartEnums.cpp
index b94f16d..917136f 100644
--- a/libkdchart/KDChartEnums.cpp
+++ b/libkdchart/KDChartEnums.cpp
@@ -1,6 +1,6 @@
#include "KDChartEnums.h"
-QString KDChartEnums::positionFlagToString( PositionFlag type )
+TQString KDChartEnums::positionFlagToString( PositionFlag type )
{
switch( type ) {
case PosTopLeft:
@@ -27,7 +27,7 @@ QString KDChartEnums::positionFlagToString( PositionFlag type )
}
}
-KDChartEnums::PositionFlag KDChartEnums::stringToPositionFlag( const QString& string )
+KDChartEnums::PositionFlag KDChartEnums::stringToPositionFlag( const TQString& string )
{
if( string == "TopLeft" )
return PosTopLeft;
@@ -51,10 +51,10 @@ KDChartEnums::PositionFlag KDChartEnums::stringToPositionFlag( const QString& st
return PosTopLeft;
}
-QPoint KDChartEnums::positionFlagToPoint( const QRect& rect,
+TQPoint KDChartEnums::positionFlagToPoint( const TQRect& rect,
PositionFlag pos )
{
- QPoint pt;
+ TQPoint pt;
if( rect.isValid() ) {
switch( pos ) {
case KDChartEnums::PosTopLeft:
diff --git a/libkdchart/KDChartEnums.h b/libkdchart/KDChartEnums.h
index 530a66e..c506b39 100644
--- a/libkdchart/KDChartEnums.h
+++ b/libkdchart/KDChartEnums.h
@@ -29,11 +29,11 @@
#ifndef __KDCHARTENUMS_H__
#define __KDCHARTENUMS_H__
-#include <qrect.h>
-#include <qpointarray.h>
+#include <tqrect.h>
+#include <tqpointarray.h>
#include "KDChartGlobal.h"
-#include <qobject.h>
+#include <tqobject.h>
/** \file KDChartEnums.h
\brief Definition of global enums.
@@ -43,19 +43,20 @@
Project global class providing some enums needed both by KDChartParams
and by KDChartCustomBox.
*/
-class KDCHART_EXPORT KDChartEnums :public QObject
+class KDCHART_EXPORT KDChartEnums :public TQObject
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS( TextLayoutPolicy )
Q_ENUMS( AreaName )
Q_ENUMS( PositionFlag )
public:
/**
- Text layout policy: what to do if text that is to be drawn would
+ Text tqlayout policy: what to do if text that is to be drawn would
cover neighboring text or neighboring areas.
- \li \c LayoutJustOverwrite Just ignore the layout collision and write the text nevertheless.
+ \li \c LayoutJustOverwrite Just ignore the tqlayout collision and write the text nevertheless.
\li \c LayoutPolicyRotate Try counter-clockwise rotation to make the text fit into the space.
\li \c LayoutPolicyShiftVertically Shift the text baseline upwards (or downwards, resp.) and draw a connector line between the text and its anchor.
\li \c LayoutPolicyShiftHorizontally Shift the text baseline to the left (or to the right, resp.) and draw a connector line between the text and its anchor.
@@ -70,13 +71,13 @@ public:
LayoutPolicyShrinkFontSize };
/**
- Converts the specified text layout policy enum to a
+ Converts the specified text tqlayout policy enum to a
string representation.
- \param type the text layout policy to convert
- \return the string representation of the text layout policy enum
+ \param type the text tqlayout policy to convert
+ \return the string representation of the text tqlayout policy enum
*/
- static QString layoutPolicyToString( TextLayoutPolicy type ) {
+ static TQString tqlayoutPolicyToString( TextLayoutPolicy type ) {
switch( type ) {
case LayoutJustOverwrite:
return "JustOverwrite";
@@ -89,7 +90,7 @@ public:
case LayoutPolicyShrinkFontSize:
return "ShrinkFontSize";
default: // should not happen
- qDebug( "Unknown text layout policy" );
+ qDebug( "Unknown text tqlayout policy" );
return "JustOverwrite";
}
}
@@ -115,7 +116,7 @@ public:
\param notation the number notation to convert
\return the string representation of the number notation enum
*/
- static QString numberNotationToString( NumberNotation notation ) {
+ static TQString numberNotationToString( NumberNotation notation ) {
switch( notation ) {
case NumberNotationDecimal:
return "NumberNotationDecimal";
@@ -136,7 +137,7 @@ public:
\param string the string to convert
\return the number notation enum value
*/
- static NumberNotation stringToNumberNotation( const QString& notation ) {
+ static NumberNotation stringToNumberNotation( const TQString& notation ) {
if( notation == "NumberNotationDecimal" )
return NumberNotationDecimal;
else if( notation == "NumberNotationScientific" )
@@ -149,12 +150,12 @@ public:
/**
- Converts the specified string to a text layout policy enum value.
+ Converts the specified string to a text tqlayout policy enum value.
\param string the string to convert
- \return the text layout policy enum value
+ \return the text tqlayout policy enum value
*/
- static TextLayoutPolicy stringToLayoutPolicy( const QString& string ) {
+ static TextLayoutPolicy stringToLayoutPolicy( const TQString& string ) {
if( string == "JustOverwrite" )
return LayoutJustOverwrite;
else if( string == "Rotate" )
@@ -239,19 +240,19 @@ public:
\image html "../refman_images/positions.png"
\image latex "../refman_images/positions.png" "the PositionFlag enum" width=4in
- \note The position and alignment of content to be printed at (or
+ \note The position and tqalignment of content to be printed at (or
inside of, resp.) an area or a point -- like for printing data value texts next
to their graphical representations (which might be a bar, line, pie slice,...) --
- is specified by two parameters: a \c PositionFlag and a uint holding a combination of \c Qt::AlignmentFlags.
- Remember that Qt::AlignmentFlags are used to specify <b>with which edge</b> something
+ is specified by two parameters: a \c PositionFlag and a uint holding a combination of \c TQt::AlignmentFlags.
+ Remember that TQt::AlignmentFlags are used to specify <b>with which edge</b> something
is to be aligned to its anchor, e.g. \c AlignLeft means align with the left edge.
The position of content and the way it is aligned to this
position is shown in the following drawing, note that annotation #2 and annotation #3
- share the same PositionFlag but have different alignment flags set:
+ share the same PositionFlag but have different tqalignment flags set:
- \image html "../refman_images/alignment.png"
- \image latex "../refman_images/alignment.png" "positioning and aligning" width=4in
+ \image html "../refman_images/tqalignment.png"
+ \image latex "../refman_images/tqalignment.png" "positioning and aligning" width=4in
\sa KDChartParams::setPrintDataValues
*/
@@ -263,19 +264,19 @@ public:
/**
Returns the point representing a position of a rectangle.
*/
- static QPoint positionFlagToPoint( const QRect& rect,
+ static TQPoint positionFlagToPoint( const TQRect& rect,
PositionFlag pos );
/**
Returns the point representing a position of a corresponding
- QPointArray.
+ TQPointArray.
\note The array \c points <b>must</b> have at least nine elements.
*/
- static QPoint positionFlagToPoint( const QPointArray& points,
+ static TQPoint positionFlagToPoint( const TQPointArray& points,
PositionFlag pos )
{
- QPoint pt;
+ TQPoint pt;
if( 9 <= points.size() )
pt = points[ pos ];
return pt;
@@ -289,7 +290,7 @@ public:
\param type the content position to convert
\return the string representation of the type enum
*/
- static QString positionFlagToString( PositionFlag type );
+ static TQString positionFlagToString( PositionFlag type );
/**
@@ -298,7 +299,7 @@ public:
\param string the string to convert
\return the content position enum value
*/
- static PositionFlag stringToPositionFlag( const QString& string );
+ static PositionFlag stringToPositionFlag( const TQString& string );
};
diff --git a/libkdchart/KDChartGlobal.h b/libkdchart/KDChartGlobal.h
index 4a5f9e7..868dfa3 100644
--- a/libkdchart/KDChartGlobal.h
+++ b/libkdchart/KDChartGlobal.h
@@ -29,11 +29,11 @@
#ifndef __KDCHARTGLOBAL_H__
#define __KDCHARTGLOBAL_H__
-#include <qglobal.h>
+#include <tqglobal.h>
#include <float.h>
-#if defined(unix) || defined(__unix__) || defined(Q_WS_MAC) || defined(Q_WS_LINUX)
+#if defined(unix) || defined(__unix__) || defined(TQ_WS_MAC) || defined(TQ_WS_LINUX)
#include <limits.h>
#else
#define MINDOUBLE DBL_MIN
@@ -53,115 +53,36 @@
#if defined(_MSC_VER)
-#ifndef QT_NO_STL
-#define QT_NO_STL // Avoid a name clash
+#ifndef TQT_NO_STL
+#define TQT_NO_STL // Avoid a name clash
#endif
#endif
-// important: make the old format of QT_VERSION comparable
-// to the new format that is used since Qt 3.0.0
-#if QT_VERSION == 141
-#define COMPAT_QT_VERSION 0x010401
-#endif
-#if QT_VERSION == 142
-#define COMPAT_QT_VERSION 0x010402
-#endif
-#if QT_VERSION == 143
-#define COMPAT_QT_VERSION 0x010403
-#endif
-#if QT_VERSION == 144
-#define COMPAT_QT_VERSION 0x010404
-#endif
-#if QT_VERSION == 145
-#define COMPAT_QT_VERSION 0x010405
-#endif
-#if QT_VERSION == 200
-#define COMPAT_QT_VERSION 0x020000
-#endif
-#if QT_VERSION == 201
-#define COMPAT_QT_VERSION 0x020001
-#endif
-#if QT_VERSION == 202
-#define COMPAT_QT_VERSION 0x020002
-#endif
-#if QT_VERSION == 210
-#define COMPAT_QT_VERSION 0x020100
-#endif
-#if QT_VERSION == 211
-#define COMPAT_QT_VERSION 0x020101
-#endif
-#if QT_VERSION == 220
-#define COMPAT_QT_VERSION 0x020200
-#endif
-#if QT_VERSION == 221
-#define COMPAT_QT_VERSION 0x020201
-#endif
-#if QT_VERSION == 222
-#define COMPAT_QT_VERSION 0x020202
-#endif
-#if QT_VERSION == 223
-#define COMPAT_QT_VERSION 0x020203
-#endif
-#if QT_VERSION == 224
-#define COMPAT_QT_VERSION 0x020204
-#endif
-#if QT_VERSION == 230
-#define COMPAT_QT_VERSION 0x020300
-#endif
-#if QT_VERSION == 231
-#define COMPAT_QT_VERSION 0x020301
-#endif
-#if QT_VERSION == 232
-#define COMPAT_QT_VERSION 0x020302
-#if defined(_MSC_VER)
-#pragma message( "using Qt 2.3.2" )
-#endif
-#endif
-#if QT_VERSION == 300
-#define COMPAT_QT_VERSION 0x030000
-#endif
-#if QT_VERSION == 301
-#define COMPAT_QT_VERSION 0x030001
-#endif
-#if QT_VERSION == 302
-#define COMPAT_QT_VERSION 0x030002
-#endif
-#if QT_VERSION == 303
-#define COMPAT_QT_VERSION 0x030003
-#endif
-#if QT_VERSION == 304
-#define COMPAT_QT_VERSION 0x030004
-#endif
-#if QT_VERSION == 305
-#define COMPAT_QT_VERSION 0x030005
-#endif
-#if QT_VERSION == 310
-#define COMPAT_QT_VERSION 0x030100
-#endif
-// --- new format since Qt 3.0.0 or since 3.0.4 ???
-#ifndef COMPAT_QT_VERSION
+// --- new format since TQt 3.0.0 or since 3.0.4 ???
+#ifndef COMPAT_TQT_VERSION
#if defined(_MSC_VER)
-#pragma message( "using Qt > 2.3.2" )
+#pragma message( "using TQt > 2.3.2" )
#endif
-#define COMPAT_QT_VERSION QT_VERSION
+//#define COMPAT_TQT_VERSION [[[TQT_VERSION IS DEPRECATED]]]
+#define COMPAT_TQT_VERSION 0x039999
#endif
-// since Qt 3.1 they do /not/ include limits.h or climits on windows anymore
+// since TQt 3.1 they do /not/ include limits.h or climits on windows anymore
// so we must include that manually
-#if COMPAT_QT_VERSION > 0x030099
+#if COMPAT_TQT_VERSION > 0x030099
#if defined(_MSC_VER)
#include <climits>
#endif
#endif
-#if COMPAT_QT_VERSION < 0x030000
+#if COMPAT_TQT_VERSION < 0x030000
#if !defined(Q_ASSERT)
-#if defined(QT_CHECK_STATE)
-#if defined(QT_FATAL_ASSERT)
+#if defined(TQT_CHECK_STATE)
+#if defined(TQT_FATAL_ASSERT)
#define Q_ASSERT(x) ((x) ? (void)0 : qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
#else
#define Q_ASSERT(x) ((x) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
@@ -171,32 +92,32 @@
#endif
#endif
-#if !defined(QT_NO_COMPAT)
-// source compatibility with Qt 2.x
+#if !defined(TQT_NO_COMPAT)
+// source compatibility with TQt 2.x
#ifndef Q_OS_TEMP
# if !defined(ASSERT)
# define ASSERT(x) Q_ASSERT(x)
# endif
#endif // Q_OS_TEMP
-#endif // QT_NO_COMPAT
+#endif // TQT_NO_COMPAT
-#define QPtrList QList
-#define QPtrListIterator QListIterator
-#define QPtrVector QVector
-#define QMemArray QArray
+#define TQPtrList TQList
+#define TQPtrListIterator TQListIterator
+#define TQPtrVector TQVector
+#define TQMemArray TQArray
-#include <qlist.h>
-#include <qvector.h>
-#include <qarray.h>
+#include <tqlist.h>
+#include <tqvector.h>
+#include <tqarray.h>
#else
-#include <qptrlist.h>
-#include <qptrvector.h>
-#include <qmemarray.h>
+#include <tqptrlist.h>
+#include <tqptrvector.h>
+#include <tqmemarray.h>
#endif
-// end of #if COMPAT_QT_VERSION < 0x030000
+// end of #if COMPAT_TQT_VERSION < 0x030000
diff --git a/libkdchart/KDChartHiLoPainter.cpp b/libkdchart/KDChartHiLoPainter.cpp
index c95d482..bb8b2e3 100644
--- a/libkdchart/KDChartHiLoPainter.cpp
+++ b/libkdchart/KDChartHiLoPainter.cpp
@@ -30,7 +30,7 @@
#include <KDChartParams.h>
#include "KDChartTextPiece.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <stdlib.h>
@@ -49,7 +49,7 @@
KDChartAxesPainter( params )
{
// This constructor intentionally left blank so far; we cannot setup the
- // geometry yet since we do not know the size of the painter.
+ // tqgeometry yet since we do not know the size of the painter.
}
@@ -75,9 +75,9 @@ KDChartHiLoPainter::~KDChartHiLoPainter()
\return the fallback text to use for describing the specified
dataset in the legend
*/
-QString KDChartHiLoPainter::fallbackLegendText( uint dataset ) const
+TQString KDChartHiLoPainter::fallbackLegendText( uint dataset ) const
{
- return QObject::tr( "Value " ) + QString::number( dataset + 1 );
+ return TQObject::tr( "Value " ) + TQString::number( dataset + 1 );
}
@@ -106,8 +106,8 @@ int KDChartHiLoPainter::clipShiftUp( bool, double ) const
return 0;
}
-void KDChartHiLoPainter::specificPaintData( QPainter* painter,
- const QRect& ourClipRect,
+void KDChartHiLoPainter::specificPaintData( TQPainter* painter,
+ const TQRect& ourClipRect,
KDChartTableDataBase* data,
KDChartDataRegionList* /*regions*/,
const KDChartAxisParams* axisPara,
@@ -173,22 +173,22 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
++dataset ) {
// The first and the second col are always high and low; we sort them
// accordingly.
- QVariant valueA;
- QVariant valueB;
+ TQVariant valueA;
+ TQVariant valueB;
if( dataset >= datasetStart &&
dataset <= datasetEnd &&
data->cellCoord( dataset, 0, valueA, 1 ) &&
data->cellCoord( dataset, 1, valueB, 1 ) &&
- QVariant::Double == valueA.type() &&
- QVariant::Double == valueB.type() ){
+ TQVariant::Double == valueA.type() &&
+ TQVariant::Double == valueB.type() ){
const double cellValue1 = valueA.toDouble();
const double cellValue2 = valueB.toDouble();
- const double lowValue = QMIN( cellValue1, cellValue2 );
- const double highValue = QMAX( cellValue1, cellValue2 );
+ const double lowValue = TQMIN( cellValue1, cellValue2 );
+ const double highValue = TQMAX( cellValue1, cellValue2 );
const double lowDrawValue = lowValue * pixelsPerUnit;
const double highDrawValue = highValue * pixelsPerUnit;
- painter->setPen( QPen( params()->dataColor( dataset ),
+ painter->setPen( TQPen( params()->dataColor( dataset ),
nLineWidth ) );
// draw line from low to high
int xpos = static_cast<int>(
@@ -212,7 +212,7 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
if( params()->hiLoChartSubType() == KDChartParams::HiLoOpenClose ) {
// Only do this if there is a value in the third col.
if( data->cellCoord( dataset, 2, valueA, 1 ) &&
- QVariant::Double == valueA.type() ) {
+ TQVariant::Double == valueA.type() ) {
hasOpen = true;
openValue = valueA.toDouble();
openDrawValue = openValue * pixelsPerUnit;
@@ -229,10 +229,10 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
// HiLoOpenClose).
if( ( params()->hiLoChartSubType() == KDChartParams::HiLoClose &&
data->cellCoord( dataset, 2, valueA, 1 ) &&
- QVariant::Double == valueA.type() ) ||
+ TQVariant::Double == valueA.type() ) ||
( params()->hiLoChartSubType() == KDChartParams::HiLoOpenClose &&
data->cellCoord( dataset, 3, valueB, 1 ) &&
- QVariant::Double == valueB.type() ) ) {
+ TQVariant::Double == valueB.type() ) ) {
hasClose = true;
closeValue = ( params()->hiLoChartSubType() == KDChartParams::HiLoClose )
? valueA.toDouble()
@@ -247,14 +247,14 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
// Draw the low value, if requested.
if( params()->hiLoChartPrintLowValues() ) {
// PENDING(kalle) Number formatting?
- QFont theFont( params()->hiLoChartLowValuesFont() );
+ TQFont theFont( params()->hiLoChartLowValuesFont() );
if ( params()->hiLoChartLowValuesUseFontRelSize() ) {
int nTxtHeight =
static_cast < int > ( params()->hiLoChartLowValuesFontRelSize()
* averageValueP1000 );
theFont.setPointSizeFloat( nTxtHeight );
}
- KDChartTextPiece lowText( painter, QString::number( lowValue ),
+ KDChartTextPiece lowText( painter, TQString::number( lowValue ),
theFont );
int width = lowText.width();
int height = lowText.height();
@@ -278,7 +278,7 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
- lowYPos
+ height/2
+ nLineWidth/2;
- }// else
+ } else
; // no way to draw it (really?)
}
lowText.draw( painter,
@@ -290,14 +290,14 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
// Draw the high value, if requested.
if( params()->hiLoChartPrintHighValues() ) {
// PENDING(kalle) Number formatting?
- QFont theFont( params()->hiLoChartHighValuesFont() );
+ TQFont theFont( params()->hiLoChartHighValuesFont() );
if ( params()->hiLoChartHighValuesUseFontRelSize() ) {
int nTxtHeight =
static_cast < int > ( params()->hiLoChartHighValuesFontRelSize()
* averageValueP1000 );
theFont.setPointSizeFloat( nTxtHeight );
}
- KDChartTextPiece highText( painter, QString::number( highValue ),
+ KDChartTextPiece highText( painter, TQString::number( highValue ),
theFont );
int width = highText.width();
int height = highText.height();
@@ -319,7 +319,7 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
- highYPos
+ height/2
- nLineWidth/2;
- } //else
+ } else
; // no way to draw it (really?)
}
highText.draw( painter,
@@ -332,14 +332,14 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
if( params()->hiLoChartPrintOpenValues() &&
params()->hiLoChartSubType() == KDChartParams::HiLoOpenClose ) {
// PENDING(kalle) Number formatting?
- QFont theFont( params()->hiLoChartOpenValuesFont() );
+ TQFont theFont( params()->hiLoChartOpenValuesFont() );
if ( params()->hiLoChartOpenValuesUseFontRelSize() ) {
int nTxtHeight =
static_cast < int > ( params()->hiLoChartOpenValuesFontRelSize()
* averageValueP1000 );
theFont.setPointSizeFloat( nTxtHeight );
}
- KDChartTextPiece openText( painter, QString::number( openValue ),
+ KDChartTextPiece openText( painter, TQString::number( openValue ),
theFont );
int width = openText.width();
int height = openText.height();
@@ -361,14 +361,14 @@ void KDChartHiLoPainter::specificPaintData( QPainter* painter,
||
params()->hiLoChartSubType() == KDChartParams::HiLoClose ) ) {
// PENDING(kalle) Number formatting?
- QFont theFont( params()->hiLoChartCloseValuesFont() );
+ TQFont theFont( params()->hiLoChartCloseValuesFont() );
if ( params()->hiLoChartCloseValuesUseFontRelSize() ) {
int nTxtHeight =
static_cast < int > ( params()->hiLoChartCloseValuesFontRelSize()
* averageValueP1000 );
theFont.setPointSizeFloat( nTxtHeight );
}
- KDChartTextPiece closeText( painter, QString::number( closeValue ),
+ KDChartTextPiece closeText( painter, TQString::number( closeValue ),
theFont );
//int width = closeText.width();
int height = closeText.height();
diff --git a/libkdchart/KDChartHiLoPainter.h b/libkdchart/KDChartHiLoPainter.h
index 79dd09c..285868f 100644
--- a/libkdchart/KDChartHiLoPainter.h
+++ b/libkdchart/KDChartHiLoPainter.h
@@ -32,11 +32,11 @@
#include "KDChartAxesPainter.h"
#include <KDChartTable.h>
-#include <qnamespace.h>
+#include <tqnamespace.h>
class KDChartParams;
-class KDChartHiLoPainter : public KDChartAxesPainter, public Qt
+class KDChartHiLoPainter : public KDChartAxesPainter, public TQt
{
friend class KDChartPainter;
protected:
@@ -45,8 +45,8 @@ class KDChartHiLoPainter : public KDChartAxesPainter, public Qt
virtual bool isNormalMode() const;
virtual int clipShiftUp( bool, double ) const;
- virtual void specificPaintData( QPainter* painter,
- const QRect& ourClipRect,
+ virtual void specificPaintData( TQPainter* painter,
+ const TQRect& ourClipRect,
KDChartTableDataBase* data,
KDChartDataRegionList* regions,
const KDChartAxisParams* axisPara,
@@ -64,7 +64,7 @@ class KDChartHiLoPainter : public KDChartAxesPainter, public Qt
uint datasetStart,
uint datasetEnd );
- virtual QString fallbackLegendText( uint dataset ) const;
+ virtual TQString fallbackLegendText( uint dataset ) const;
virtual uint numLegendFallbackTexts( KDChartTableDataBase* data ) const;
};
diff --git a/libkdchart/KDChartLinesPainter.cpp b/libkdchart/KDChartLinesPainter.cpp
index 8b80341..aef52b7 100644
--- a/libkdchart/KDChartLinesPainter.cpp
+++ b/libkdchart/KDChartLinesPainter.cpp
@@ -30,12 +30,12 @@
#include <KDChartParams.h>
#include <KDChartPropertySet.h>
-#include <qpainter.h>
+#include <tqpainter.h>
-#if COMPAT_QT_VERSION >= 0x030000
-#include <qvaluevector.h>
+#if COMPAT_TQT_VERSION >= 0x030000
+#include <tqvaluevector.h>
#else
-#include <qarray.h>
+#include <tqarray.h>
#endif
#include <stdlib.h>
@@ -56,7 +56,7 @@ KDChartLinesPainter::KDChartLinesPainter( KDChartParams* params ) :
KDChartAxesPainter( params )
{
// This constructor intentionally left blank so far; we cannot setup the
- // geometry yet since we do not know the size of the painter.
+ // tqgeometry yet since we do not know the size of the painter.
}
@@ -73,13 +73,13 @@ KDChartLinesPainter::~KDChartLinesPainter()
Paints the actual data area. Data regions will only be added 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 KDChartLinesPainter::paintData( QPainter* painter,
+void KDChartLinesPainter::paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions )
@@ -100,7 +100,7 @@ void KDChartLinesPainter::paintData( QPainter* painter,
KDChartLinesPainter::paintData() and
KDChartAreaPainter::paintData().
- \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 centerThePoints if true, the value points will be centered in
their segment (typically used for line charts), if false, the first
@@ -112,7 +112,7 @@ void KDChartLinesPainter::paintData( QPainter* painter,
\param regions a pointer to a list of regions that will be filled
with regions representing the data segments, if not null
*/
-void KDChartLinesPainter::paintDataInternal( QPainter* painter,
+void KDChartLinesPainter::paintDataInternal( TQPainter* painter,
KDChartTableDataBase* data,
bool centerThePoints,
bool drawMarkers,
@@ -137,12 +137,12 @@ void KDChartLinesPainter::paintDataInternal( QPainter* painter,
into a point onto a plane, given two rotation angles around the x
resp. y axis.
*/
-QPoint KDChartLinesPainter::project( int x, int y, int z )
+TQPoint KDChartLinesPainter::project( int x, int y, int z )
{
double xrad = DEGTORAD( params()->threeDLineXRotation() );
double yrad = DEGTORAD( params()->threeDLineYRotation() );
- QPoint ret( static_cast<int>( x*cos( yrad ) + z * sin( yrad ) ),
+ TQPoint ret( static_cast<int>( x*cos( yrad ) + z * sin( yrad ) ),
static_cast<int>( y*cos( xrad ) - z * sin( xrad ) ) );
return ret;
}
@@ -171,15 +171,15 @@ public:
void setSkipThis( bool skipThis ) {
bSkipThis = skipThis;
}
- QPoint p;
+ TQPoint p;
bool bValid;
bool bSkipThis;
double cellValue;
};
-void KDChartLinesPainter::specificPaintData( QPainter* painter,
- const QRect& /*ourClipRect*/,
+void KDChartLinesPainter::specificPaintData( TQPainter* painter,
+ const TQRect& /*ourClipRect*/,
KDChartTableDataBase* data,
KDChartDataRegionList* regions,
const KDChartAxisParams* ordinatePara,
@@ -248,14 +248,14 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
qDebug( "Internal error in KDChartLinesPainter::paintDataInternal(): Unknown subtype" );
- QMap < int, double > currentValueSums;
+ TQMap < int, double > currentValueSums;
if ( mode == Stacked || mode == Percent ) {
// this array is only used for stacked and percent lines, no need
// to waste time initializing it for normal types
for ( int value = 0; value < ai.numValues; ++value )
currentValueSums[ value ] = 0.0;
}
- QMap < int, double > totalValueSums;
+ TQMap < int, double > totalValueSums;
// compute the position of the 0 axis
double zeroXAxisI;
@@ -286,10 +286,10 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
( dataset >= static_cast < int > ( datasetStart ) && dataset >= 0 );
--dataset )
++arrayNumDatasets;
-#if COMPAT_QT_VERSION >= 0x030000
- QValueVector<MyPoint> allPoints(
+#if COMPAT_TQT_VERSION >= 0x030000
+ TQValueVector<MyPoint> allPoints(
#else
- QArray<MyPoint> allPoints(
+ TQArray<MyPoint> allPoints(
#endif
arrayNumDatasets * arrayNumValues );
@@ -303,7 +303,7 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
const KDChartParams::LineMarkerStyle
defaultMarkerStyle = params()->lineMarkerStyle( dataset );
- const QPen default2DPen( params()->lineColor().isValid()
+ const TQPen default2DPen( params()->lineColor().isValid()
? params()->lineColor()
: params()->dataColor( dataset ),
params()->lineWidth(),
@@ -312,8 +312,8 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
if( ai.bAbscissaHasTrueAxisDtValues )
ai.numValues = data->cols();
- QVariant vValY;
- QVariant vValX;
+ TQVariant vValY;
+ TQVariant vValX;
int cellPropID;
for( int value = 0; value < ai.numValues; ++value ) {
//if ( mode == Percent )
@@ -326,14 +326,14 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
dataset2 <= datasetEnd;
++dataset2 ) {
if( data->cellCoord( dataset2, value, vValY, 1 ) &&
- QVariant::Double == vValY.type() )
+ TQVariant::Double == vValY.type() )
valueTotal += vValY.toDouble();
}
}
if( data->cellContent( dataset, value, vValY, vValX, cellPropID ) &&
- QVariant::Double == vValY.type() &&
- ( !ai.bCellsHaveSeveralCoordinates || QVariant::Invalid != vValX.type() ) ){
+ TQVariant::Double == vValY.type() &&
+ ( !ai.bCellsHaveSeveralCoordinates || TQVariant::Invalid != vValX.type() ) ){
//qDebug("a. cellPropID: %i",cellPropID);
// calculate Ordinate axis value
@@ -375,9 +375,9 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
// prevent the point from being toooo far
// below the bottom (or above the top, resp.)
// of the cliprect
- double pY = QMIN( zeroXAxisI - drawValue,
+ double pY = TQMIN( zeroXAxisI - drawValue,
(logHeight + axisYOffset) * 3 );
- pY = QMAX( pY, -(logHeight + axisYOffset) * 3 );
+ pY = TQMAX( pY, -(logHeight + axisYOffset) * 3 );
// specify the Point
int myPointX = static_cast < int > ( xValue ) + xShift;
int myPointY = static_cast < int > ( pY );
@@ -448,7 +448,7 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
- QPointArray previousPoints; // no vector since only areas need it,
+ TQPointArray previousPoints; // no vector since only areas need it,
// and these do not support 3d yet
// Store some (dataset-independend) default values
@@ -463,7 +463,7 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
// to be used unless other properties
// have been specified for the respective data cell:
//
- const QPen default2DPen( params()->lineColor().isValid()
+ const TQPen default2DPen( params()->lineColor().isValid()
? params()->lineColor()
: params()->dataColor( dataset ),
params()->lineWidth(),
@@ -472,18 +472,18 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
const KDChartParams::LineMarkerStyle markerStyle = params()->lineMarkerStyle( dataset );
// the +2 is for the areas (if any)
- QPtrVector< QPointArray > points( 2 );
+ TQPtrVector< TQPointArray > points( 2 );
points.setAutoDelete( true );
/* Pending Michel - we need to keep track of the
* non rotated points for 3D lines
*/
- QPtrVector< QPointArray > oripoints( 2 );
+ TQPtrVector< TQPointArray > oripoints( 2 );
oripoints.setAutoDelete( true );
int i = 0;
for( i = 0; i < 2; ++i ) {
- points.insert( i, new QPointArray( ai.numValues + 2 ) );
- oripoints.insert( i, new QPointArray( ai.numValues + 2 ) );
+ points.insert( i, new TQPointArray( ai.numValues + 2 ) );
+ oripoints.insert( i, new TQPointArray( ai.numValues + 2 ) );
}
if( ai.bAbscissaHasTrueAxisDtValues )
@@ -509,7 +509,7 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
if( curPropSetId != KDChartPropertySet::UndefinedID ){
// we can safely call the following functions and ignore their
// return values since they will touch the parameters' values
- // if the propSet *contains* corresponding own values only.
+ // if the propSet *tqcontains* corresponding own values only.
int iDummy;
curPropSet.hasOwnShowMarker( iDummy, currentDrawMarkers );
}
@@ -539,27 +539,27 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
++point;
int x = mp.p.x();
- int y = QMAX(QMIN(mp.p.y(),
+ int y = TQMAX(TQMIN(mp.p.y(),
static_cast < int > (logHeight +axisYOffset)),
0);
bool markerIsOutside = y != mp.p.y();
// draw the marker and store the region
if ( currentDrawMarkers ){
- uint theAlignment = Qt::AlignCenter;
+ uint theAlignment = TQt::AlignCenter;
bool hasOwnSize = false;
int theWidth = 0;
int theHeight = 0;
- QColor theColor(params()->dataColor( dataset ));
+ TQColor theColor(params()->dataColor( dataset ));
int theStyle = markerStyle;
if( curPropSetId != KDChartPropertySet::UndefinedID ){
// we can safely call the following functions and ignore their
// return values since they will touch the parameters' values
- // if the propSet *contains* corresponding own values only.
+ // if the propSet *tqcontains* corresponding own values only.
int iDummy;
curPropSet.hasOwnMarkerAlign( iDummy, theAlignment );
curPropSet.hasOwnMarkerColor( iDummy, theColor );
curPropSet.hasOwnMarkerStyle( iDummy, theStyle );
- QSize size(theWidth, theHeight);
+ TQSize size(theWidth, theHeight);
hasOwnSize = curPropSet.hasOwnMarkerSize(iDummy, size);
if( hasOwnSize ){
theWidth = size.width();
@@ -576,7 +576,7 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
? KDChartParams::LineMarker1Pixel
: theStyle,
theColor,
- QPoint(x,y),
+ TQPoint(x,y),
dataset, value, chart, regions,
hasOwnSize ? &theWidth : 0,
hasOwnSize ? &theHeight : 0,
@@ -585,10 +585,7 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
}
// store the region
else if( regions ) {
- QRect rect(
- QPoint( x-params()->lineWidth()-1, y-params()->lineWidth()-1 ),
- QPoint( x+params()->lineWidth()+1, y+params()->lineWidth()+1 )
- );
+ TQRect rect( TQPoint( x-1, y-1 ), TQPoint( x+1, y+1 ) );
rect.moveBy( _dataRect.x(), _dataRect.y() );
regions->append(
new KDChartDataRegion(dataset, value, chart, rect) );
@@ -604,17 +601,17 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
// zero axis points or upper border points added for the first
// dataset or with the previous points reversed for all other
// datasets.
- painter->setPen( QPen( Qt::NoPen ) );
- const QBrush datasetBrush( params()->dataColor( dataset ), Qt::SolidPattern );
+ painter->setPen( TQPen( TQt::NoPen ) );
+ const TQBrush datasetBrush( params()->dataColor( dataset ), TQt::SolidPattern );
painter->setBrush( datasetBrush );
- QBrush currentBrush( datasetBrush );
+ TQBrush currentBrush( datasetBrush );
if ( mode == Normal || dataset == (int)datasetEnd ) {
/// first dataset (or any dataset in normal mode, where
/// the datasets overwrite each other)
// no 3d handling for areas yet
- QPoint lastPoint = points[0]->point( point - 1 );
+ TQPoint lastPoint = points[0]->point( point - 1 );
// zeroXAxisI can be too far below the abscissa, but it's
// the only thing we have. Likewise can 0 be too far above
@@ -633,7 +630,7 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
points[0]->setPoint( point, lastPoint.x(), yCoord );
point++;
- QPoint firstPoint = points[0]->point( 0 );
+ TQPoint firstPoint = points[0]->point( 0 );
points[0]->setPoint( point, firstPoint.x(), yCoord );
point++;
@@ -656,19 +653,19 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
curPropSetId = KDChartPropertySet::UndefinedID;
}
// preset with default value
- QBrush theAreaBrush = datasetBrush;
+ TQBrush theAreaBrush = datasetBrush;
if( curPropSetId != KDChartPropertySet::UndefinedID ){
// we can safely call the following functions and ignore their
// return values since they will touch the parameters' values
- // if the propSet *contains* corresponding own values only.
+ // if the propSet *tqcontains* corresponding own values only.
int iDummy;
curPropSet.hasOwnAreaBrush( iDummy, theAreaBrush );
}
painter->setBrush( theAreaBrush );
}
- QPointArray segment( 4 );
+ TQPointArray segment( 4 );
segment.setPoint( 0, points[0]->point( value ) );
segment.setPoint( 1, points[0]->point( value+1 ) );
segment.setPoint( 2, points[0]->point( value+1 ).x(), yCoord );
@@ -689,7 +686,7 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
//qDebug("222");
// no 3d handling for areas yet
- QPointArray thisSection = points[0]->copy();
+ TQPointArray thisSection = points[0]->copy();
thisSection.resize( point + previousPoints.size() );
// append the previous array (there is guaranteed to be
@@ -704,8 +701,8 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
painter->drawPolygon( thisSection );
}
// draw the line with no brush and outline color
- painter->setBrush( Qt::NoBrush );
- painter->setPen( QPen( params()->outlineDataColor(),
+ painter->setBrush( TQt::NoBrush );
+ painter->setPen( TQPen( params()->outlineDataColor(),
params()->outlineDataLineWidth() ) );
} else {
// line
@@ -714,13 +711,13 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
// We draw the line with the data color brush
// and the outline data pen.
painter->setBrush( params()->dataColor( dataset ) );
- painter->setPen( QPen( params()->outlineDataColor(),
+ painter->setPen( TQPen( params()->outlineDataColor(),
params()->outlineDataLineWidth() ) );
} else {
// This is a 2D line:
// We draw the line with the no brush
// and the data color if no special line color was specified.
- painter->setBrush( Qt::NoBrush );
+ painter->setBrush( TQt::NoBrush );
painter->setPen( default2DPen );
}
}
@@ -739,14 +736,14 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
// qDebug( "Draw a segment in dataset %d from %d to %d", dataset, value, value+1 );
//store the rotated points ( see project() )
- QPointArray rotatedSegment( 4 );
+ TQPointArray rotatedSegment( 4 );
rotatedSegment.setPoint( 0, points[0]->point( value ));
rotatedSegment.setPoint( 1, points[0]->point( value+1 ) );
rotatedSegment.setPoint( 2, points[1]->point( value+1 ) );
rotatedSegment.setPoint( 3, points[1]->point( value ) );
//store the true points without rotation
- QPointArray trueSegment( 4 );
+ TQPointArray trueSegment( 4 );
trueSegment.setPoint( 0, oripoints[0]->point( value ));
trueSegment.setPoint( 1, oripoints[0]->point( value+1 ) );
trueSegment.setPoint( 2, oripoints[1]->point( value+1 ) );
@@ -763,7 +760,7 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
int dy12 = rotatedSegment.point(2).y() - rotatedSegment.point(1).y();
// store and paint the "3D" segment
- QPointArray segment( 4 );
+ TQPointArray segment( 4 );
segment.setPoint( 0, trueSegment.point(0) );
segment.setPoint( 1, trueSegment.point(1) );
segment.setPoint( 2, trueSegment.point(1).x() + dx12, trueSegment.point(1).y() + dy12 );
@@ -778,7 +775,7 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
// qDebug( "Can't draw a segment in dataset %d from %d to %d", dataset, value, value+1 );
}
} else {
- QPoint p1, p2;
+ TQPoint p1, p2;
// Note: If markers are drawn very near to each other
// and tiny markers are used
// we don't draw the connecting lines.
@@ -806,19 +803,19 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
}
// preset with default values
int theLineWidth = default2DPen.width();
- QColor theLineColor = default2DPen.color();
+ TQColor theLineColor = default2DPen.color();
Qt::PenStyle theLineStyle = default2DPen.style();
if( curPropSetId != KDChartPropertySet::UndefinedID ){
// we can safely call the following functions and ignore their
// return values since they will touch the parameters' values
- // if the propSet *contains* corresponding own values only.
+ // if the propSet *tqcontains* corresponding own values only.
int iDummy;
curPropSet.hasOwnLineWidth ( iDummy, theLineWidth );
curPropSet.hasOwnLineColor ( iDummy, theLineColor );
curPropSet.hasOwnLineStyle ( iDummy, theLineStyle );
curPropSet.hasOwnShowMarker( iDummy, currentDrawMarkers );
}
- painter->setPen( QPen( theLineColor,
+ painter->setPen( TQPen( theLineColor,
theLineWidth,
theLineStyle ) );
}
@@ -893,7 +890,7 @@ void KDChartLinesPainter::specificPaintData( QPainter* painter,
const KDChartParams::LineMarkerStyle
defaultMarkerStyle = params()->lineMarkerStyle( dataset );
- const QPen default2DPen( params()->lineColor().isValid()
+ const TQPen default2DPen( params()->lineColor().isValid()
? params()->lineColor()
: params()->dataColor( dataset ),
params()->lineWidth(),
diff --git a/libkdchart/KDChartLinesPainter.h b/libkdchart/KDChartLinesPainter.h
index cd2c40f..7528c6c 100644
--- a/libkdchart/KDChartLinesPainter.h
+++ b/libkdchart/KDChartLinesPainter.h
@@ -33,7 +33,7 @@
#include <KDChartTable.h>
#include <KDChartParams.h>
-class QSize;
+class TQSize;
class KDChartLinesPainter : public KDChartAxesPainter
{
@@ -43,14 +43,14 @@ class KDChartLinesPainter : public KDChartAxesPainter
KDChartLinesPainter( KDChartParams* params );
virtual ~KDChartLinesPainter();
- virtual void paintData( QPainter* painter,
+ virtual void paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions = 0 );
virtual bool isNormalMode() const;
virtual int clipShiftUp( bool, double ) const;
- virtual void specificPaintData( QPainter* painter,
- const QRect& ourClipRect,
+ virtual void specificPaintData( TQPainter* painter,
+ const TQRect& ourClipRect,
KDChartTableDataBase* data,
KDChartDataRegionList* regions,
const KDChartAxisParams* axisPara,
@@ -68,14 +68,14 @@ class KDChartLinesPainter : public KDChartAxesPainter
uint datasetStart,
uint datasetEnd );
- void paintDataInternal( QPainter* painter,
+ void paintDataInternal( TQPainter* painter,
KDChartTableDataBase* data,
bool centerThePoints,
bool drawMarkers,
bool isArea,
bool paint2nd,
KDChartDataRegionList* regions = 0 );
- QPoint project( int x, int y, int z );
+ TQPoint project( int x, int y, int z );
private:
KDChartParams::ChartType mChartType;
bool mCenterThePoints;
diff --git a/libkdchart/KDChartListTable.h b/libkdchart/KDChartListTable.h
index a11c44e..5c022ff 100644
--- a/libkdchart/KDChartListTable.h
+++ b/libkdchart/KDChartListTable.h
@@ -29,22 +29,22 @@
#ifndef __KDCHARTLISTTABLE_H__
#define __KDCHARTLISTTABLE_H__
-#include <qvaluelist.h>
-#include <qshared.h>
-#include <qtable.h>
+#include <tqvaluelist.h>
+#include <tqshared.h>
+#include <tqtable.h>
#include <KDChartDataIntern.h>
#include <KDChartTableBase.h>
-class KDCHART_EXPORT KDChartListTablePrivate : public QShared
+class KDCHART_EXPORT KDChartListTablePrivate : public TQShared
{
public:
- KDChartListTablePrivate() : QShared() {
+ KDChartListTablePrivate() : TQShared() {
row_count = 0;
col_count = 0;
}
- KDChartListTablePrivate( uint _rows, uint _cols ) : QShared() {
+ KDChartListTablePrivate( uint _rows, uint _cols ) : TQShared() {
for ( uint i = 0; i < _rows; i++ )
row_list.append( int() );
for ( uint j = 0; j < _cols; j++ )
@@ -56,7 +56,7 @@ class KDCHART_EXPORT KDChartListTablePrivate : public QShared
}
KDChartListTablePrivate( const KDChartListTablePrivate& _t ) :
- QShared(),
+ TQShared(),
matrix( _t.matrix ),
row_list( _t.row_list ),
col_list( _t.col_list ),
@@ -146,54 +146,54 @@ class KDCHART_EXPORT KDChartListTablePrivate : public QShared
void insertColumn( uint _c ) {
Q_ASSERT( _c <= col_count );
++col_count;
- QValueList < KDChartData > ::Iterator it;
+ TQValueList < KDChartData > ::Iterator it;
for ( uint i = 0; i < row_count; ++i ) {
it = matrix.at( i * col_count + _c );
matrix.insert( it, KDChartData() );
}
- QValueList < int > ::Iterator it2 = col_list.at( _c );
+ TQValueList < int > ::Iterator it2 = col_list.at( _c );
col_list.insert( it2, int() );
}
void insertRow( uint _r ) {
Q_ASSERT( _r <= row_count );
++row_count;
- QValueList < KDChartData > ::Iterator it = matrix.at( _r * col_count );
+ TQValueList < KDChartData > ::Iterator it = matrix.at( _r * col_count );
for ( uint i = 0; i < col_count; ++i )
matrix.insert( it, KDChartData() );
- QValueList < int > ::Iterator it2 = row_list.at( _r );
+ TQValueList < int > ::Iterator it2 = row_list.at( _r );
row_list.insert( it2, int() );
}
void removeColumn( uint _c ) {
Q_ASSERT( _c < col_count );
--col_count;
- QValueList < KDChartData > ::Iterator it;
+ TQValueList < KDChartData > ::Iterator it;
for ( uint i = 0; i < row_count; ++i ) {
it = matrix.at( i * col_count + _c );
matrix.remove( it );
}
- QValueList < int > ::Iterator it2 = col_list.at( _c );
+ TQValueList < int > ::Iterator it2 = col_list.at( _c );
col_list.remove( it2 );
}
void removeRow( uint _r ) {
Q_ASSERT( _r < row_count );
--row_count;
- QValueList < KDChartData > ::Iterator it = matrix.at( _r * col_count );
+ TQValueList < KDChartData > ::Iterator it = matrix.at( _r * col_count );
for ( uint i = 0; i < col_count; ++i )
it = matrix.remove( it );
- QValueList < int > ::Iterator it2 = row_list.at( _r );
+ TQValueList < int > ::Iterator it2 = row_list.at( _r );
row_list.remove( it2 );
}
- QValueList < KDChartData > matrix;
- QValueList < int > row_list;
- QValueList < int > col_list;
+ TQValueList < KDChartData > matrix;
+ TQValueList < int > row_list;
+ TQValueList < int > col_list;
uint col_count;
uint row_count;
@@ -210,14 +210,14 @@ class KDChartListTableData : public KDChartTableDataBase
/**
* Typedefs
*/
- typedef QValueList < KDChartData > ::Iterator Iterator;
- typedef QValueList < KDChartData > ::ConstIterator ConstIterator;
+ typedef TQValueList < KDChartData > ::Iterator Iterator;
+ typedef TQValueList < KDChartData > ::ConstIterator ConstIterator;
- typedef QValueList < int > ::Iterator RowIterator;
- typedef QValueList < int > ::ConstIterator ConstRowIterator;
+ typedef TQValueList < int > ::Iterator RowIterator;
+ typedef TQValueList < int > ::ConstIterator ConstRowIterator;
- typedef QValueList < int > ::Iterator ColIterator;
- typedef QValueList < int > ::ConstIterator ConstColIterator;
+ typedef TQValueList < int > ::Iterator ColIterator;
+ typedef TQValueList < int > ::ConstIterator ConstColIterator;
/**
* API
@@ -330,7 +330,7 @@ class KDChartListTableData : public KDChartTableDataBase
}
virtual bool cellCoord( uint _row, uint _col,
- QVariant& _value,
+ TQVariant& _value,
int coordinate=1 ) const
{
if( _row >= sh->row_count || _col >= sh->col_count )
@@ -349,8 +349,8 @@ class KDChartListTableData : public KDChartTableDataBase
}
virtual void setCell( uint _row, uint _col,
- const QVariant& _value1,
- const QVariant& _value2=QVariant() )
+ const TQVariant& _value1,
+ const TQVariant& _value2=TQVariant() )
{
detach();
const KDChartData element( _value1, _value2 );
@@ -432,9 +432,9 @@ class KDChartListTableData : public KDChartTableDataBase
sh->expand( _rows, _cols );
// adjust the usedRows / usedCols, if they had been set before
if( _useUsedCols )
- setUsedCols( QMIN( _usedCols, _cols ) );
+ setUsedCols( TQMIN( _usedCols, _cols ) );
if( _useUsedRows )
- setUsedRows( QMIN( _usedRows, _rows ) );
+ setUsedRows( TQMIN( _usedRows, _rows ) );
}
void setUsedRows( uint _rows ) {
diff --git a/libkdchart/KDChartNotEnoughSpaceException.h b/libkdchart/KDChartNotEnoughSpaceException.h
index b97adde..3520bcf 100644
--- a/libkdchart/KDChartNotEnoughSpaceException.h
+++ b/libkdchart/KDChartNotEnoughSpaceException.h
@@ -31,7 +31,7 @@
#ifdef USE_EXCEPTIONS
-#include <qstring.h>
+#include <tqstring.h>
#include "KDChartGlobal.h"
diff --git a/libkdchart/KDChartObjectFactory.cpp b/libkdchart/KDChartObjectFactory.cpp
index 6106390..b1dac73 100644
--- a/libkdchart/KDChartObjectFactory.cpp
+++ b/libkdchart/KDChartObjectFactory.cpp
@@ -1,67 +1,67 @@
#include "KDChartObjectFactory.h"
#include <KDChartParams.h>
#include <KDChartTable.h>
-#include <qsargument.h>
-#include <qdatetime.h>
+#include <tqsargument.h>
+#include <tqdatetime.h>
#include <KDChartEnums.h>
-#include <qfont.h>
+#include <tqfont.h>
#include <KDChartTextPiece.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include <KDChartWidget.h>
#include <KDChartPropertySet.h>
-#include "factories/QtFactory.h"
-#include "factories/QFontFactory.h"
+#include "factories/TQtFactory.h"
+#include "factories/TQFontFactory.h"
// PENDING(blackie) Clean up code in this file, so it uses the correct getter methods like getBool.
KDChartObjectFactory::KDChartObjectFactory()
{
- registerClass( QString::fromLatin1( "KDChartWidget" ) );
- registerClass( QString::fromLatin1( "KDChartParams" ), new KDChartParams );
- registerClass( QString::fromLatin1( "KDChartTableData" ) );
- registerClass( QString::fromLatin1( "KDChartAxisParams" ), new KDChartAxisParams );
- registerClass( QString::fromLatin1( "KDChartEnums" ), 0, new KDChartEnums );
- registerClass( QString::fromLatin1( "KDChartTextPiece" ) );
- registerClass( QString::fromLatin1( "KDChartCustomBox" ), new KDChartCustomBox );
- registerClass( QString::fromLatin1( "KDChartPropertySet" ), new KDChartPropertySet );
- registerClass( QString::fromLatin1( "KDFrame" ), QString::null, new KDFrame );
-
- registerClass( QString::fromLatin1( "Qt" ), QString::null, new QtFactory() );
- registerClass( QString::fromLatin1( "QFont" ), QString::null, new QFontFactory );
+ registerClass( TQString::tqfromLatin1( "KDChartWidget" ) );
+ registerClass( TQString::tqfromLatin1( "KDChartParams" ), new KDChartParams );
+ registerClass( TQString::tqfromLatin1( "KDChartTableData" ) );
+ registerClass( TQString::tqfromLatin1( "KDChartAxisParams" ), new KDChartAxisParams );
+ registerClass( TQString::tqfromLatin1( "KDChartEnums" ), 0, new KDChartEnums );
+ registerClass( TQString::tqfromLatin1( "KDChartTextPiece" ) );
+ registerClass( TQString::tqfromLatin1( "KDChartCustomBox" ), new KDChartCustomBox );
+ registerClass( TQString::tqfromLatin1( "KDChartPropertySet" ), new KDChartPropertySet );
+ registerClass( TQString::tqfromLatin1( "KDFrame" ), TQString(), new KDFrame );
+
+ registerClass( TQString::tqfromLatin1( "TQt" ), TQString(), new TQtFactory() );
+ registerClass( TQString::tqfromLatin1( "TQFont" ), TQString(), new TQFontFactory );
}
-QObject* KDChartObjectFactory::create( const QString& className, const QSArgumentList& args, QObject* /*context*/ )
+TQObject* KDChartObjectFactory::create( const TQString& className, const TQSArgumentList& args, TQObject* /*context*/ )
{
- if ( className == QString::fromLatin1( "KDChartWidget" ) )
+ if ( className == TQString::tqfromLatin1( "KDChartWidget" ) )
return createKDChartWidget( args );
- if ( className == QString::fromLatin1("KDChartParams") )
+ if ( className == TQString::tqfromLatin1("KDChartParams") )
return new KDChartParams();
- else if ( className == QString::fromLatin1("KDChartTableData") )
+ else if ( className == TQString::tqfromLatin1("KDChartTableData") )
return createKDChartTableData( args );
- else if ( className == QString::fromLatin1("KDChartAxisParams") )
+ else if ( className == TQString::tqfromLatin1("KDChartAxisParams") )
return new KDChartAxisParams();
- else if ( className == QString::fromLatin1( "KDChartTextPiece" ) )
+ else if ( className == TQString::tqfromLatin1( "KDChartTextPiece" ) )
return createKDChartTextPiece( args );
- else if ( className == QString::fromLatin1( "KDChartCustomBox" ) )
+ else if ( className == TQString::tqfromLatin1( "KDChartCustomBox" ) )
return createKDChartCustomBox( args );
- else if ( className == QString::fromLatin1( "KDChartPropertySet" ) )
+ else if ( className == TQString::tqfromLatin1( "KDChartPropertySet" ) )
return createKDChartPropertySet( args );
else
return 0;
}
-QObject* KDChartObjectFactory::createKDChartWidget( const QSArgumentList& args )
+TQObject* KDChartObjectFactory::createKDChartWidget( const TQSArgumentList& args )
{
if ( !checkArgCount( "KDChartWidget", args.count(), 2, 2 ) ) return 0;
- if ( !checkArgsIsQtClass( args, 1, "KDChartParams", "KDChartWidget" ) ) return 0;
- if ( !checkArgsIsQtClass( args, 2, "KDChartTableDataBase", "KDChartWidget" ) ) return 0;
+ if ( !checkArgsIsTQtClass( args, 1, "KDChartParams", "KDChartWidget" ) ) return 0;
+ if ( !checkArgsIsTQtClass( args, 2, "KDChartTableDataBase", "KDChartWidget" ) ) return 0;
KDChartParams* params = static_cast<KDChartParams*>( args[0].qobject() );
KDChartTableDataBase* data = static_cast<KDChartTableDataBase*>( args[1].qobject() );
@@ -69,42 +69,42 @@ QObject* KDChartObjectFactory::createKDChartWidget( const QSArgumentList& args )
}
-QObject* KDChartObjectFactory::createKDChartTableData( const QSArgumentList& args )
+TQObject* KDChartObjectFactory::createKDChartTableData( const TQSArgumentList& args )
{
if ( args.count() != 2 ) {
- throwError( QObject::tr( "wrong number of arguments to KDChartTableData" ) );
+ throwError( TQObject::tr( "wrong number of arguments to KDChartTableData" ) );
return 0;
}
- QSArgument arg1 = args[0];
- QSArgument arg2 = args[1];
+ TQSArgument arg1 = args[0];
+ TQSArgument arg2 = args[1];
- if ( arg1.type() != QSArgument::Variant || !isNumber(arg1.variant()) ) {
- throwError( QObject::tr( "wrong type for argument 1 of KDChartTableData" ) );
+ if ( arg1.type() != TQSArgument::Variant || !isNumber(arg1.variant()) ) {
+ throwError( TQObject::tr( "wrong type for argument 1 of KDChartTableData" ) );
return 0;
}
- if ( arg2.type() != QSArgument::Variant || !isNumber(arg2.variant() ) ) {
- throwError( QObject::tr( "wrong type for argument 2 of KDChartTableData" ) );
+ if ( arg2.type() != TQSArgument::Variant || !isNumber(arg2.variant() ) ) {
+ throwError( TQObject::tr( "wrong type for argument 2 of KDChartTableData" ) );
return 0;
}
return new KDChartTableData( arg1.variant().toUInt(), arg2.variant().toUInt() );
}
-QObject* KDChartObjectFactory::createKDChartTextPiece( const QSArgumentList& args )
+TQObject* KDChartObjectFactory::createKDChartTextPiece( const TQSArgumentList& args )
{
if ( !checkArgCount( "KDChartTextPiece", args.count(), 2, 2 ) ) return 0;
- QSArgument arg1 = args[0];
- QSArgument arg2 = args[1];
+ TQSArgument arg1 = args[0];
+ TQSArgument arg2 = args[1];
- QString str;
+ TQString str;
if ( !getString( args, 1, &str, "KDChartTextPiece" ) ) return 0;
- if ( !checkIsQtVariant( args, 2, QVariant::Font, QString::fromLatin1( "QFont" ), "KDChartTextPiece" ) ) return 0;
- QFont font = args[1].variant().toFont();
+ if ( !checkIsTQtVariant( args, 2, TQVariant::Font, TQString::tqfromLatin1( "TQFont" ), "KDChartTextPiece" ) ) return 0;
+ TQFont font = args[1].variant().toFont();
return new KDChartTextPiece( str, font );
}
-QObject* KDChartObjectFactory::createKDChartCustomBox( const QSArgumentList& args )
+TQObject* KDChartObjectFactory::createKDChartCustomBox( const TQSArgumentList& args )
{
int tmp;
@@ -112,16 +112,16 @@ QObject* KDChartObjectFactory::createKDChartCustomBox( const QSArgumentList& arg
return new KDChartCustomBox();
- if ( args[0].type() == QSArgument::Variant && isNumber( args[0].variant() ) ) {
+ if ( args[0].type() == TQSArgument::Variant && isNumber( args[0].variant() ) ) {
if ( args.count() < 8 ) {
- throwError( QObject::tr( "Too few arguments to KDChartCustomBox" ) );
+ throwError( TQObject::tr( "Too few arguments to KDChartCustomBox" ) );
return 0;
}
int rotation;
if ( !getNumber( args, 1, &rotation, "KDChartCustomBox" ) ) return 0;
- if (!checkArgsIsQtClass( args, 2, "KDChartTextPiece", "KDChartCustomBox" )) return 0;
+ if (!checkArgsIsTQtClass( args, 2, "KDChartTextPiece", "KDChartCustomBox" )) return 0;
KDChartTextPiece* content = static_cast<KDChartTextPiece*>( args[1].qobject() );
int fontSize;
@@ -143,15 +143,15 @@ QObject* KDChartObjectFactory::createKDChartCustomBox( const QSArgumentList& arg
int height;
if ( !getNumber( args, 8, &height, "KDChartCustomBox" ) ) return 0;
- QColor color = Qt::black;
+ TQColor color = TQt::black;
if ( args.count() >= 9 ) {
- if ( !checkIsQtVariant( args, 9, QVariant::Color, QString::fromLatin1( "QColor" ), "KDChartCustomBox" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 9, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartCustomBox" ) ) return 0;
color = args[8].variant().toColor();
}
- QBrush paper = Qt::NoBrush;
+ TQBrush paper = TQt::NoBrush;
if ( args.count() >= 10 ) {
- if ( !checkIsQtVariant( args, 10, QVariant::Brush, QString::fromLatin1( "QBrush" ), "KDChartCustomBox" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 10, TQVariant::Brush, TQString::tqfromLatin1( "TQBrush" ), "KDChartCustomBox" ) ) return 0;
paper = args[9].variant().toBrush();
}
@@ -166,7 +166,7 @@ QObject* KDChartObjectFactory::createKDChartCustomBox( const QSArgumentList& arg
position = (KDChartEnums::PositionFlag) tmp;
}
- uint align = Qt::AlignTop + Qt::AlignLeft;
+ uint align = TQt::AlignTop + TQt::AlignLeft;
if ( args.count() >= 13 ) {
if ( !getNumber( args, 13, &align, "KDChartCustomBox" ) ) return 0;
}
@@ -201,11 +201,11 @@ QObject* KDChartObjectFactory::createKDChartCustomBox( const QSArgumentList& arg
dataCol, data3rd, deltaAlign, deltaScaleGlobal );
}
- if (!checkArgsIsQtClass( args, 1, "KDChartTextPiece", "KDChartCustomBox" )) return 0;
+ if (!checkArgsIsTQtClass( args, 1, "KDChartTextPiece", "KDChartCustomBox" )) return 0;
KDChartTextPiece* content = static_cast<KDChartTextPiece*>( args[0].qobject() );
if ( args.count() < 2 ) {
- throwError( QObject::tr( "Too few arguments to KDChartCustomBox" ) );
+ throwError( TQObject::tr( "Too few arguments to KDChartCustomBox" ) );
return 0;
}
@@ -233,15 +233,15 @@ QObject* KDChartObjectFactory::createKDChartCustomBox( const QSArgumentList& arg
if ( !getNumber( args, 7, &height, "KDChartCustomBox" ) ) return 0;
- QColor color = Qt::black;
+ TQColor color = TQt::black;
if ( args.count() >= 8 ) {
- if ( !checkIsQtVariant( args, 8, QVariant::Color, QString::fromLatin1( "QColor" ), "KDChartCustomBox" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 8, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartCustomBox" ) ) return 0;
color = args[7].variant().toColor();
}
- QBrush paper = Qt::NoBrush;
+ TQBrush paper = TQt::NoBrush;
if ( args.count() >= 9 ) {
- if ( !checkIsQtVariant( args, 9, QVariant::Brush, QString::fromLatin1( "QBrush" ), "KDChartCustomBox" ) ) return 0;
+ if ( !checkIsTQtVariant( args, 9, TQVariant::Brush, TQString::tqfromLatin1( "TQBrush" ), "KDChartCustomBox" ) ) return 0;
paper = args[8].variant().toBrush();
}
@@ -256,7 +256,7 @@ QObject* KDChartObjectFactory::createKDChartCustomBox( const QSArgumentList& arg
position = (KDChartEnums::PositionFlag) tmp;
}
- uint align = Qt::AlignTop + Qt::AlignLeft;
+ uint align = TQt::AlignTop + TQt::AlignLeft;
if ( args.count() >= 12 ) {
if ( !getNumber( args, 12, &align, "KDChartCustomBox" ) ) return 0;
}
@@ -291,12 +291,12 @@ QObject* KDChartObjectFactory::createKDChartCustomBox( const QSArgumentList& arg
paper, area, position, align, dataRow, dataCol, data3rd, deltaAlign, deltaScaleGlobal );
}
-QObject* KDChartObjectFactory::createKDChartPropertySet(const QSArgumentList& args )
+TQObject* KDChartObjectFactory::createKDChartPropertySet(const TQSArgumentList& args )
{
if ( args.count() == 0 )
return new KDChartPropertySet();
- QString name;
+ TQString name;
if ( !getString( args, 1, &name, "KDChartPropertySet" ) ) return 0;
if ( args.count() == 1 )
@@ -318,8 +318,8 @@ QObject* KDChartObjectFactory::createKDChartPropertySet(const QSArgumentList& ar
if ( !getNumber( args, 4,&idLineColor, "KDChartPropertySet" ) ) return 0;
- if ( !checkIsQtVariant( args, 5, QVariant::Color, QString::fromLatin1( "QColor" ), "KDChartPropertySet" ) ) return 0;
- QColor lineColor = args[4].variant().toColor();
+ if ( !checkIsTQtVariant( args, 5, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
+ TQColor lineColor = args[4].variant().toColor();
int idLineStyle;
if ( !getNumber( args, 6,&idLineStyle, "KDChartPropertySet" ) ) return 0;
@@ -362,8 +362,8 @@ QObject* KDChartObjectFactory::createKDChartPropertySet(const QSArgumentList& ar
int idExtraLinesColor;
if ( !getNumber( args, 18,&idExtraLinesColor, "KDChartPropertySet" ) ) return 0;
- if ( !checkIsQtVariant( args, 19, QVariant::Color, QString::fromLatin1( "QColor" ), "KDChartPropertySet" ) ) return 0;
- QColor extraLinesColor = args[18].variant().toColor();
+ if ( !checkIsTQtVariant( args, 19, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
+ TQColor extraLinesColor = args[18].variant().toColor();
int idExtraLinesStyle;
if ( !getNumber( args, 20,&idExtraLinesStyle, "KDChartPropertySet" ) ) return 0;
@@ -380,14 +380,14 @@ QObject* KDChartObjectFactory::createKDChartPropertySet(const QSArgumentList& ar
int idExtraMarkersSize;
if ( !getNumber( args, 24,&idExtraMarkersSize, "KDChartPropertySet" ) ) return 0;
- if ( !checkIsQtVariant( args, 25, QVariant::Size, QString::fromLatin1( "QSize" ), "KDChartPropertySet" ) ) return 0;
- QSize extraMarkersSize = args[24].variant().toSize();
+ if ( !checkIsTQtVariant( args, 25, TQVariant::Size, TQString::tqfromLatin1( "TQSize" ), "KDChartPropertySet" ) ) return 0;
+ TQSize extraMarkersSize = args[24].variant().toSize();
int idExtraMarkersColor;
if ( !getNumber( args, 26,&idExtraMarkersColor, "KDChartPropertySet" ) ) return 0;
- if ( !checkIsQtVariant( args, 27, QVariant::Color, QString::fromLatin1( "QColor" ), "KDChartPropertySet" ) ) return 0;
- QColor extraMarkersColor = args[26].variant().toColor();
+ if ( !checkIsTQtVariant( args, 27, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
+ TQColor extraMarkersColor = args[26].variant().toColor();
int idExtraMarkersStyle;
if ( !getNumber( args, 28,&idExtraMarkersStyle, "KDChartPropertySet" ) ) return 0;
@@ -404,8 +404,8 @@ QObject* KDChartObjectFactory::createKDChartPropertySet(const QSArgumentList& ar
int idBarColor;
if ( !getNumber( args, 32,&idBarColor, "KDChartPropertySet" ) ) return 0;
- if ( !checkIsQtVariant( args, 33, QVariant::Color, QString::fromLatin1( "QColor" ), "KDChartPropertySet" ) ) return 0;
- QColor barColor = args[32].variant().toColor();
+ if ( !checkIsTQtVariant( args, 33, TQVariant::Color, TQString::tqfromLatin1( "TQColor" ), "KDChartPropertySet" ) ) return 0;
+ TQColor barColor = args[32].variant().toColor();
KDChartPropertySet* set = new KDChartPropertySet;
set->setName( name );
@@ -429,42 +429,42 @@ QObject* KDChartObjectFactory::createKDChartPropertySet(const QSArgumentList& ar
}
-bool KDChartObjectFactory::isNumber( const QVariant& v )
+bool KDChartObjectFactory::isNumber( const TQVariant& v )
{
- return ( v.type() == QVariant::Int || v.type() == QVariant::UInt || v.type() == QVariant::Double );
+ return ( v.type() == TQVariant::Int || v.type() == TQVariant::UInt || v.type() == TQVariant::Double );
}
// PENDING(blackie) rework order of parameters so it matches the other methods
-bool KDChartObjectFactory::checkArgCount( const QString& className, int count, int min, int max )
+bool KDChartObjectFactory::checkArgCount( const TQString& className, int count, int min, int max )
{
if ( count < min ) {
- throwError( QObject::tr( "Too few arguments when creating %1 object." ).arg( className ) );
+ throwError( TQObject::tr( "Too few arguments when creating %1 object." ).tqarg( className ) );
return false;
}
if ( count > max ) {
- throwError( QObject::tr( "Too many arguments when creating %1 object." ).arg( className ) );
+ throwError( TQObject::tr( "Too many arguments when creating %1 object." ).tqarg( className ) );
return false;
}
return true;
}
-bool KDChartObjectFactory::checkArgsIsQtClass( const QSArgumentList& args, int index, const char* expected, const char* constructing )
+bool KDChartObjectFactory::checkArgsIsTQtClass( const TQSArgumentList& args, int index, const char* expected, const char* constructing )
{
- const QSArgument& arg = args[index-1];
- if ( arg.type() != QSArgument::QObjectPtr || !arg.qobject()->inherits( expected ) ) {
- throwError( QObject::tr( "Invalid type for argument no %1 to %2, must be a %3" ).arg(index).arg(constructing).arg(expected) );
+ const TQSArgument& arg = args[index-1];
+ if ( arg.type() != TQSArgument::TQObjectPtr || !arg.qobject()->inherits( expected ) ) {
+ throwError( TQObject::tr( "Invalid type for argument no %1 to %2, must be a %3" ).tqarg(index).tqarg(constructing).tqarg(expected) );
return false;
}
return true;
}
-bool KDChartObjectFactory::getString( const QSArgumentList& args, int index, QString* str, const char* constructing )
+bool KDChartObjectFactory::getString( const TQSArgumentList& args, int index, TQString* str, const char* constructing )
{
- const QSArgument& arg = args[index-1];
- if ( arg.type() != QSArgument::Variant || arg.variant().type() != QVariant::String ) {
- throwError( QObject::tr( "Invalid type for argument %1 to %2, must be a string" ).arg(index).arg(constructing) );
+ const TQSArgument& arg = args[index-1];
+ if ( arg.type() != TQSArgument::Variant || arg.variant().type() != TQVariant::String ) {
+ throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a string" ).tqarg(index).tqarg(constructing) );
return false;
}
else {
@@ -473,11 +473,11 @@ bool KDChartObjectFactory::getString( const QSArgumentList& args, int index, QSt
}
}
-bool KDChartObjectFactory::getNumber( const QSArgumentList& args, int index, double* number, const char* constructing )
+bool KDChartObjectFactory::getNumber( const TQSArgumentList& args, int index, double* number, const char* constructing )
{
- const QSArgument& arg = args[index-1];
- if ( arg.type() != QSArgument::Variant || !isNumber(arg.variant()) ) {
- throwError( QObject::tr( "Invalid type for argument %1 to %2, must be a number" ).arg(index).arg( constructing ) );
+ const TQSArgument& arg = args[index-1];
+ if ( arg.type() != TQSArgument::Variant || !isNumber(arg.variant()) ) {
+ throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a number" ).tqarg(index).tqarg( constructing ) );
return false;
}
else {
@@ -486,7 +486,7 @@ bool KDChartObjectFactory::getNumber( const QSArgumentList& args, int index, dou
}
}
-bool KDChartObjectFactory::getNumber( const QSArgumentList& args, int index, int* number, const char* constructing )
+bool KDChartObjectFactory::getNumber( const TQSArgumentList& args, int index, int* number, const char* constructing )
{
double tmp;
bool ok = getNumber( args, index, &tmp, constructing );
@@ -494,7 +494,7 @@ bool KDChartObjectFactory::getNumber( const QSArgumentList& args, int index, int
return ok;
}
-bool KDChartObjectFactory::getNumber( const QSArgumentList& args, int index, uint* number, const char* constructing )
+bool KDChartObjectFactory::getNumber( const TQSArgumentList& args, int index, uint* number, const char* constructing )
{
double tmp;
bool ok = getNumber( args, index, &tmp, constructing );
@@ -504,11 +504,11 @@ bool KDChartObjectFactory::getNumber( const QSArgumentList& args, int index, uin
-bool KDChartObjectFactory::getBool( const QSArgumentList& args, int index, bool* b, const char* constructing )
+bool KDChartObjectFactory::getBool( const TQSArgumentList& args, int index, bool* b, const char* constructing )
{
- const QSArgument& arg = args[index-1];
- if ( arg.type() != QSArgument::Variant || arg.variant().type() != QVariant::Bool ) {
- throwError( QObject::tr( "Invalid type for argument %1 to %2, must be a boolean" ).arg(index).arg( constructing ) );
+ const TQSArgument& arg = args[index-1];
+ if ( arg.type() != TQSArgument::Variant || arg.variant().type() != TQVariant::Bool ) {
+ throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a boolean" ).tqarg(index).tqarg( constructing ) );
return false;
}
else {
@@ -517,11 +517,11 @@ bool KDChartObjectFactory::getBool( const QSArgumentList& args, int index, bool*
}
}
-bool KDChartObjectFactory::checkIsQtVariant( const QSArgumentList& args, int index, QVariant::Type expected, const QString& variantName, const char* constructing )
+bool KDChartObjectFactory::checkIsTQtVariant( const TQSArgumentList& args, int index, TQVariant::Type expected, const TQString& variantName, const char* constructing )
{
- const QSArgument& arg = args[index-1];
- if ( arg.type() != QSArgument::Variant || arg.variant().type() != expected ) {
- throwError( QObject::tr( "Invalid type for argument %1 to %2, must be a %3").arg(index).arg(constructing).arg(variantName) );
+ const TQSArgument& arg = args[index-1];
+ if ( arg.type() != TQSArgument::Variant || arg.variant().type() != expected ) {
+ throwError( TQObject::tr( "Invalid type for argument %1 to %2, must be a %3").tqarg(index).tqarg(constructing).tqarg(variantName) );
return false;
}
else
diff --git a/libkdchart/KDChartObjectFactory.h b/libkdchart/KDChartObjectFactory.h
index 15fdb94..ee3a0c0 100644
--- a/libkdchart/KDChartObjectFactory.h
+++ b/libkdchart/KDChartObjectFactory.h
@@ -1,35 +1,35 @@
#ifndef KDCHARTQSA_H
#define KDCHARTQSA_H
-#include <qsobjectfactory.h>
+#include <tqsobjectfactory.h>
-class KDChartObjectFactory :public QSObjectFactory {
+class KDChartObjectFactory :public TQSObjectFactory {
public:
KDChartObjectFactory();
- virtual QObject* create( const QString& className, const QSArgumentList& args, QObject* context );
+ virtual TQObject* create( const TQString& className, const TQSArgumentList& args, TQObject* context );
protected:
- QObject* createKDChartWidget( const QSArgumentList& args );
- QObject* createKDChartTableData( const QSArgumentList& args );
- QObject* createQDateTime( const QSArgumentList& args );
- QObject* createQDate( const QSArgumentList& args );
- QObject* createQTime( const QSArgumentList& args );
- QObject* createKDChartTextPiece( const QSArgumentList& args );
- QObject* createQFont( const QSArgumentList& args );
- QObject* createKDChartCustomBox( const QSArgumentList& args );
- QObject* createQColor(const QSArgumentList& args );
- QObject* createKDChartPropertySet(const QSArgumentList& args );
-
- bool isNumber( const QVariant& );
- bool checkArgCount( const QString& className, int count, int min, int max );
- bool checkArgsIsQtClass( const QSArgumentList& args, int index, const char* expected, const char* constructing );
- bool getString( const QSArgumentList& arg, int index, QString* str, const char* constructing );
-
- bool getNumber( const QSArgumentList& args, int index, double* number, const char* constructing );
- bool getNumber( const QSArgumentList& args, int index, int* number, const char* constructing );
- bool getNumber( const QSArgumentList& args, int index, uint* number, const char* constructing );
-
- bool getBool( const QSArgumentList& arg, int index, bool* b, const char* constructing );
- bool checkIsQtVariant( const QSArgumentList& arg, int index, QVariant::Type expected, const QString& variantName, const char* constructing );
+ TQObject* createKDChartWidget( const TQSArgumentList& args );
+ TQObject* createKDChartTableData( const TQSArgumentList& args );
+ TQObject* createTQDateTime( const TQSArgumentList& args );
+ TQObject* createTQDate( const TQSArgumentList& args );
+ TQObject* createTQTime( const TQSArgumentList& args );
+ TQObject* createKDChartTextPiece( const TQSArgumentList& args );
+ TQObject* createTQFont( const TQSArgumentList& args );
+ TQObject* createKDChartCustomBox( const TQSArgumentList& args );
+ TQObject* createTQColor(const TQSArgumentList& args );
+ TQObject* createKDChartPropertySet(const TQSArgumentList& args );
+
+ bool isNumber( const TQVariant& );
+ bool checkArgCount( const TQString& className, int count, int min, int max );
+ bool checkArgsIsTQtClass( const TQSArgumentList& args, int index, const char* expected, const char* constructing );
+ bool getString( const TQSArgumentList& arg, int index, TQString* str, const char* constructing );
+
+ bool getNumber( const TQSArgumentList& args, int index, double* number, const char* constructing );
+ bool getNumber( const TQSArgumentList& args, int index, int* number, const char* constructing );
+ bool getNumber( const TQSArgumentList& args, int index, uint* number, const char* constructing );
+
+ bool getBool( const TQSArgumentList& arg, int index, bool* b, const char* constructing );
+ bool checkIsTQtVariant( const TQSArgumentList& arg, int index, TQVariant::Type expected, const TQString& variantName, const char* constructing );
};
diff --git a/libkdchart/KDChartPainter.cpp b/libkdchart/KDChartPainter.cpp
index 7643589..f68b8ff 100644
--- a/libkdchart/KDChartPainter.cpp
+++ b/libkdchart/KDChartPainter.cpp
@@ -27,7 +27,7 @@
**
**********************************************************************/
#include <KDChartParams.h>
-#if defined ( SUN7 ) || defined (_SGIAPI) || defined ( Q_WS_WIN)
+#if defined ( SUN7 ) || defined (_SGIAPI) || defined ( TQ_WS_WIN)
#include <math.h>
#else
#include <cmath>
@@ -55,9 +55,9 @@
#include <KDChart.h> // for static method KDChart::painterToDrawRect()
-#include <qpainter.h>
-#include <qpaintdevice.h>
-#include <qpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqpaintdevice.h>
+#include <tqpaintdevicemetrics.h>
#define DEGTORAD(d) (d)*M_PI/180
@@ -94,7 +94,7 @@
\param params the parameters of the chart to be drawn
*/
KDChartPainter::KDChartPainter( KDChartParams* params ) :
-_outermostRect( QRect(QPoint(0,0), QSize(0,0))),
+_outermostRect( TQRect(TQPoint(0,0), TQSize(0,0))),
_legendTitle( 0 ),
_params( params ),
_legendNewLinesStartAtLeft( true ),
@@ -103,7 +103,7 @@ _legendTitleWidth( 0 ),
_legendTitleMetricsHeight( 0 )
{
// This constructor intentionally left blank so far; we cannot setup the
- // geometry yet since we do not know the size of the painter.
+ // tqgeometry yet since we do not know the size of the painter.
}
/**
@@ -116,7 +116,7 @@ KDChartPainter::~KDChartPainter()
}
bool KDChartPainter::calculateAllAxesLabelTextsAndCalcValues(
- QPainter*,
+ TQPainter*,
KDChartTableDataBase*,
double,
double,
@@ -188,7 +188,7 @@ KDChartPainter* KDChartPainter::create( KDChartParams* params, bool make2nd )
\param painter an implementation object of a user-defined chart
implementation
*/
-void KDChartPainter::registerPainter( const QString& /*painterName*/,
+void KDChartPainter::registerPainter( const TQString& /*painterName*/,
KDChartPainter* /*painter*/ )
{
// PENDING(kalle) Implement this
@@ -205,7 +205,7 @@ void KDChartPainter::registerPainter( const QString& /*painterName*/,
\param the name under which the painter implementation is
registered
*/
-void KDChartPainter::unregisterPainter( const QString& /*painterName*/ )
+void KDChartPainter::unregisterPainter( const TQString& /*painterName*/ )
{
// PENDING(kalle) Implement this
qDebug( "Sorry, not implemented: KDChartPainter::unregisterPainter()" );
@@ -214,22 +214,22 @@ void KDChartPainter::unregisterPainter( const QString& /*painterName*/ )
/**
Paints the chart for which this chart painter is configured on a
- QPainter. This is the method that bundles all the painting
+ TQPainter. This is the method that bundles all the painting
functions that paint specific parts of the chart like axes or
legends. Subclasses can override this method, but should rarely
need to do so.
- \param painter the QPainter onto which the chart should be drawn
+ \param painter the TQPainter onto which the chart should be drawn
\param data the data which will be displayed as a chart
\param regions a pointer to a region list that will be filled with
regions representing the data segments if not null
*/
-void KDChartPainter::paint( QPainter* painter,
+void KDChartPainter::paint( TQPainter* painter,
KDChartTableDataBase* data,
bool paintFirst,
bool paintLast,
KDChartDataRegionList* regions,
- const QRect* rect,
+ const TQRect* rect,
bool mustCalculateGeometry )
{
@@ -241,7 +241,7 @@ void KDChartPainter::paint( QPainter* painter,
if( data->usedCols() == 0 && data->usedRows() == 0 )
return ;
- QRect drawRect;
+ TQRect drawRect;
//Pending Michel: at this point we have to setupGeometry
if( mustCalculateGeometry || _outermostRect.isNull() ){
if( rect )
@@ -329,7 +329,7 @@ void KDChartPainter::paint( QPainter* painter,
/**
Paints an area frame.
*/
-void KDChartPainter::paintArea( QPainter* painter,
+void KDChartPainter::paintArea( TQPainter* painter,
uint area,
KDChartDataRegionList* regions,
uint dataRow,
@@ -342,7 +342,7 @@ void KDChartPainter::paintArea( QPainter* painter,
params()->frameSettings( area, bFound );
if( bFound ) {
bool allCustomBoxes;
- QRect rect( calculateAreaRect( allCustomBoxes,
+ TQRect rect( calculateAreaRect( allCustomBoxes,
area,
dataRow, dataCol, data3rd, regions ) );
@@ -353,7 +353,7 @@ void KDChartPainter::paintArea( QPainter* painter,
}
-void KDChartPainter::paintDataRegionAreas( QPainter* painter,
+void KDChartPainter::paintDataRegionAreas( TQPainter* painter,
KDChartDataRegionList* regions )
{
if( regions ){
@@ -363,7 +363,7 @@ void KDChartPainter::paintDataRegionAreas( QPainter* painter,
params()->frameSettings( KDChartEnums::AreaChartDataRegion, bFound, &iterIdx );
while( bFound ) {
bool bDummy;
- QRect rect( calculateAreaRect( bDummy,
+ TQRect rect( calculateAreaRect( bDummy,
KDChartEnums::AreaChartDataRegion,
settings->dataRow(),
settings->dataCol(),
@@ -388,10 +388,10 @@ void KDChartPainter::paintDataRegionAreas( QPainter* painter,
}
-QRect KDChartPainter::trueFrameRect( const QRect& orgRect,
+TQRect KDChartPainter::trueFrameRect( const TQRect& orgRect,
const KDChartParams::KDChartFrameSettings* settings ) const
{
- QRect rect( orgRect );
+ TQRect rect( orgRect );
if( settings ){
rect.moveBy( -settings->innerGapX(), -settings->innerGapY() );
rect.setWidth( rect.width() + 2*settings->innerGapX() );
@@ -407,8 +407,8 @@ QRect KDChartPainter::trueFrameRect( const QRect& orgRect,
NOTE: areas around KDChartCustomBoxes are _not_ drawn here but
in KDChartCustomBox::paint() which is called by paintCustomBoxes().
*/
-void KDChartPainter::paintAreaWithGap( QPainter* painter,
- QRect rect,
+void KDChartPainter::paintAreaWithGap( TQPainter* painter,
+ TQRect rect,
const KDChartParams::KDChartFrameSettings& settings )
{
if( painter && rect.isValid() )
@@ -421,7 +421,7 @@ void KDChartPainter::paintAreaWithGap( QPainter* painter,
/**
Paints the data value texts near the data representations.
*/
-void KDChartPainter::paintDataValues( QPainter* painter,
+void KDChartPainter::paintDataValues( TQPainter* painter,
KDChartTableDataBase* data,
KDChartDataRegionList* regions )
{
@@ -437,28 +437,28 @@ void KDChartPainter::paintDataValues( QPainter* painter,
// out of loop status saving
painter->save();
- QFont font0( params()->dataValuesFont( 0 ) );
+ TQFont font0( params()->dataValuesFont( 0 ) );
if( params()->dataValuesUseFontRelSize( 0 ) ) {
- float size = QMIN(_areaWidthP1000, _areaHeightP1000) * abs(params()->dataValuesFontRelSize( 0 ));
+ float size = TQMIN(_areaWidthP1000, _areaHeightP1000) * abs(params()->dataValuesFontRelSize( 0 ));
if ( 9.0 > size )
size = 9.0;
font0.setPixelSize( static_cast < int > ( size ) );
}
painter->setFont( font0 );
- QFontMetrics fm0( painter->fontMetrics() );
+ TQFontMetrics fm0( painter->fontMetrics() );
double fm0HeightP100( fm0.height() / 100.0 );
- QFont font1( params()->dataValuesFont( 1 ) );
+ TQFont font1( params()->dataValuesFont( 1 ) );
if( params()->dataValuesUseFontRelSize( 1 ) ) {
- float size = QMIN(_areaWidthP1000, _areaHeightP1000) * abs(params()->dataValuesFontRelSize( 1 ));
+ float size = TQMIN(_areaWidthP1000, _areaHeightP1000) * abs(params()->dataValuesFontRelSize( 1 ));
if ( 9.0 > size )
size = 9.0;
font1.setPixelSize( static_cast < int > ( size ) );
} else
font1.setPixelSize( font0.pixelSize());
painter->setFont( font1 );
- QFontMetrics fm1( painter->fontMetrics() );
+ TQFontMetrics fm1( painter->fontMetrics() );
double fm1HeightP100( fm1.height() / 100.0 );
bool lastDigitIrrelevant0 = true;
@@ -467,13 +467,13 @@ void KDChartPainter::paintDataValues( QPainter* painter,
for ( region=regions->first();
region != 0;
region = regions->next() ) {
- QVariant vValY;
+ TQVariant vValY;
if( data->cellCoord( region->row, region->col, vValY, 1 ) ){
- if( QVariant::String == vValY.type() ){
- const QString sVal( vValY.toString() );
+ if( TQVariant::String == vValY.type() ){
+ const TQString sVal( vValY.toString() );
if( !sVal.isEmpty() )
region->text = sVal;
- }else if( QVariant::Double == vValY.type() ){
+ }else if( TQVariant::Double == vValY.type() ){
double value( vValY.toDouble() );
region->negative = 0.0 > value;
double divi( pow( 10.0, params()->dataValuesDivPow10( region->chart ) ) );
@@ -494,7 +494,7 @@ void KDChartPainter::paintDataValues( QPainter* painter,
region->text = "+LEMNISKATE";
else {
region->text.setNum( value, 'f', digits );
- if ( autoDigits && region->text.contains( '.' ) ) {
+ if ( autoDigits && region->text.tqcontains( '.' ) ) {
int len = region->text.length();
while ( 3 < len
&& '0' == region->text[ len-1 ]
@@ -518,21 +518,21 @@ void KDChartPainter::paintDataValues( QPainter* painter,
region = regions->next() )
if ( ( ( lastDigitIrrelevant0 && !region->chart )
|| ( lastDigitIrrelevant1 && region->chart ) )
- && region->text.contains( '.' )
+ && region->text.tqcontains( '.' )
&& ( 2 < region->text.length() ) )
region->text.truncate ( region->text.length() - 2 );
// draw the Data Value Texts and calculate the text regions
- painter->setPen( Qt::black );
+ painter->setPen( TQt::black );
bool allowOverlapping = params()->allowOverlappingDataValueTexts();
bool drawThisOne;
- QRegion lastRegionDone;
+ TQRegion lastRegionDone;
- QFontMetrics actFM( painter->fontMetrics() );
+ TQFontMetrics actFM( painter->fontMetrics() );
- QFont* oldFont = 0;
+ TQFont* oldFont = 0;
int oldRotation = 0;
uint oldChart = UINT_MAX;
uint oldDatacolorNo = UINT_MAX;
@@ -545,10 +545,10 @@ void KDChartPainter::paintDataValues( QPainter* painter,
if ( region->text.length() ) {
- QVariant vValY;
+ TQVariant vValY;
bool zero =
data->cellCoord( region->row, region->col, vValY, 1 ) &&
- QVariant::Double == vValY.type() &&
+ TQVariant::Double == vValY.type() &&
( 0.0 == vValY.toDouble() || 0 == vValY.toDouble() );
uint align( params()->dataValuesAnchorAlign( region->chart,
region->negative ) );
@@ -574,7 +574,7 @@ void KDChartPainter::paintDataValues( QPainter* painter,
KDChartEnums::PositionFlag anchorPos(
params()->dataValuesAnchorPosition( region->chart, region->negative ) );
- QPoint anchor(
+ TQPoint anchor(
rectangular
? KDChartEnums::positionFlagToPoint( region->rect(), anchorPos )
: KDChartEnums::positionFlagToPoint( region->points, anchorPos ) );
@@ -612,7 +612,7 @@ void KDChartPainter::paintDataValues( QPainter* painter,
double normAngle = angle / 16;
double normAngleRad = DEGTORAD( normAngle );
double sinAngle = sin( normAngleRad );
- QPoint& pM = region->points[ KDChartEnums::PosCenter ];
+ TQPoint pM = TQPoint(region->points[ KDChartEnums::PosCenter ]);
double dX( pM.x() - anchor.x() );
double dY( pM.y() - anchor.y() );
double radialLen( sinAngle ? dY / sinAngle : dY );
@@ -643,9 +643,9 @@ void KDChartPainter::paintDataValues( QPainter* painter,
if( params()->dataValuesShowInfinite( region->chart ) ){
//bool bIsLineChart = KDChartParams::Line == cType;
if( region->text == "-LEMNISKATE" )
- align = Qt::AlignRight + Qt::AlignVCenter;
+ align = TQt::AlignRight + TQt::AlignVCenter;
else
- align = Qt::AlignLeft + Qt::AlignVCenter;
+ align = TQt::AlignLeft + TQt::AlignVCenter;
if( !rotation )
rotation = 90;
else
@@ -657,10 +657,10 @@ void KDChartPainter::paintDataValues( QPainter* painter,
}
if ( rotation ) {
- anchor = painter->worldMatrix().map( anchor );
+ anchor = painter->tqworldMatrix().map( anchor );
// Temporary solution for fixing the data labels size
- // bug when in QPrinter::HighResolution mode:
+ // bug when in TQPrinter::HighResolution mode:
// There seem to be no backdraws by acting like this,
// but further investigation is required to detect the
// real error in the previous code/
@@ -688,10 +688,10 @@ void KDChartPainter::paintDataValues( QPainter* painter,
// oldRotation = rotation;
}
- QFont* actFont = region->chart ? &font1 : &font0;
+ TQFont* actFont = region->chart ? &font1 : &font0;
if( oldFont != actFont ) {
painter->setFont( *actFont );
- actFM = QFontMetrics( painter->fontMetrics() );
+ actFM = TQFontMetrics( painter->fontMetrics() );
// Comment this out - zooming and scrolling
//oldFont = actFont;
}
@@ -707,26 +707,26 @@ void KDChartPainter::paintDataValues( QPainter* painter,
true,
true,
5 );
- //anchor = painter->worldMatrix().map( anchor );
+ //anchor = painter->tqworldMatrix().map( anchor );
if( allowOverlapping ) {
drawThisOne = true;
}else {
- QRegion sectReg( infosKDD.region.intersect( lastRegionDone ) );
+ TQRegion sectReg( infosKDD.region.intersect( lastRegionDone ) );
drawThisOne = sectReg.isEmpty();
}
if( drawThisOne ) {
lastRegionDone = lastRegionDone.unite( infosKDD.region );
- region->pTextRegion = new QRegion( infosKDD.region );
+ region->pTextRegion = new TQRegion( infosKDD.region );
if( params()->dataValuesAutoColor( region->chart ) ) {
if( bIsAreaChart ){
- QColor color( params()->dataColor( region->row ) );
+ TQColor color( params()->dataColor( region->row ) );
/*
if( ( (0.0 > anchorDY) && region->negative )
|| ( (0.0 < anchorDY) && !region->negative ) )
painter->setPen(
- QColor( static_cast < int > ( 255- color.red() ),
+ TQColor( static_cast < int > ( 255- color.red() ),
static_cast < int > ( 255- color.green() ),
static_cast < int > ( 255- color.blue() ) ) );
else
@@ -735,7 +735,7 @@ void KDChartPainter::paintDataValues( QPainter* painter,
}else{
if( zero ) {
if( oldDatacolorNo != UINT_MAX ) {
- painter->setPen( Qt::black );
+ painter->setPen( TQt::black );
oldDatacolorNo = UINT_MAX;
}
}
@@ -746,8 +746,8 @@ void KDChartPainter::paintDataValues( QPainter* painter,
: region->row;
if( oldDatacolorNo != datacolorNo ) {
oldDatacolorNo = datacolorNo;
- QColor color( params()->dataColor( datacolorNo ) );
- painter->setPen( QColor(
+ TQColor color( params()->dataColor( datacolorNo ) );
+ painter->setPen( TQColor(
static_cast < int > (255-color.red() ),
static_cast < int > (255-color.green()),
static_cast < int > (255-color.blue() )));
@@ -773,7 +773,7 @@ void KDChartPainter::paintDataValues( QPainter* painter,
region->chart ? &font1 : &font0,
align,
false, // bool showAnchor
- 0, // const QFontMetrics* fontMet
+ 0, // const TQFontMetrics* fontMet
false, // bool noFirstrotate
false, // bool noBackrotate
0, // KDDrawTextRegionAndTrueRect* infos
@@ -783,7 +783,7 @@ void KDChartPainter::paintDataValues( QPainter* painter,
//Pending Michel Painting data value labels rotated.
painter->drawText( infosKDD.x , infosKDD.y ,
infosKDD.width, infosKDD.height,
- Qt::AlignHCenter | Qt::AlignVCenter | Qt::SingleLine,
+ TQt::AlignHCenter | TQt::AlignVCenter | TQt::SingleLine,
region->text );
}
@@ -796,69 +796,69 @@ void KDChartPainter::paintDataValues( QPainter* painter,
// no rotation:
painter->rotate( -oldRotation );
oldRotation = 0;
- QFontMetrics & fm = region->chart ? fm1 : fm0;
+ TQFontMetrics & fm = region->chart ? fm1 : fm0;
int boundingRectWidth = fm.boundingRect( region->text ).width();
int leftBearing = fm.leftBearing( region->text[ 0 ] );
- const QChar c = region->text.at( region->text.length() - 1 );
+ const TQChar c = region->text.at( region->text.length() - 1 );
int rightBearing = fm.rightBearing( c );
int w = boundingRectWidth + leftBearing + rightBearing + 1;
int h = fm.height(); // ascent + descent + 1
int dx = 0;
int dy = 0;
- switch( align & ( Qt::AlignLeft | Qt::AlignRight | Qt::AlignHCenter ) ) {
- case Qt::AlignRight:
+ switch( align & ( TQt::AlignLeft | TQt::AlignRight | TQt::AlignHCenter ) ) {
+ case TQt::AlignRight:
dx = -w+1;
break;
- case Qt::AlignHCenter:
+ case TQt::AlignHCenter:
// Center on the middle of the bounding rect, not
// the painted area, because numbers appear centered then
dx = -( ( boundingRectWidth / 2 ) + leftBearing );
break;
}
- switch( align & ( Qt::AlignTop | Qt::AlignBottom | Qt::AlignVCenter ) ) {
- case Qt::AlignBottom:
+ switch( align & ( TQt::AlignTop | TQt::AlignBottom | TQt::AlignVCenter ) ) {
+ case TQt::AlignBottom:
dy = -h+1;
break;
- case Qt::AlignVCenter:
+ case TQt::AlignVCenter:
dy = -h / 2;
break;
}
- QRegion thisRegion(
- QRect( anchor.x() + dx, anchor.y() + dy, w, h ) );
+ TQRegion thisRegion(
+ TQRect( anchor.x() + dx, anchor.y() + dy, w, h ) );
if( allowOverlapping )
drawThisOne = true;
else {
- QRegion sectReg( thisRegion.intersect( lastRegionDone ) );
+ TQRegion sectReg( thisRegion.intersect( lastRegionDone ) );
drawThisOne = sectReg.isEmpty();
}
if( drawThisOne ) {
lastRegionDone = lastRegionDone.unite( thisRegion );
- region->pTextRegion = new QRegion( thisRegion );
+ region->pTextRegion = new TQRegion( thisRegion );
#ifdef DEBUG_TEXT_PAINTING
// for testing:
- QRect rect( region->pTextRegion->boundingRect() );
+ TQRect rect( region->pTextRegion->boundingRect() );
painter->drawRect( rect );
- painter->setPen( Qt::red );
+ painter->setPen( TQt::red );
rect.setLeft( rect.left() + leftBearing );
rect.setTop( rect.top() + ( fm.height()-fm.boundingRect( region->text ).height() ) /2 );
rect.setWidth( fm.boundingRect( region->text ).width() );
rect.setHeight( fm.boundingRect( region->text ).height() );
painter->drawRect( rect );
- painter->setPen( Qt::black );
+ painter->setPen( TQt::black );
#endif
/*
NOTE: The following will be REMOVED again once
-the layout policy feature is implemented !!!
+the tqlayout policy feature is implemented !!!
*/
- QRect textRect( region->pTextRegion->boundingRect() );
+ TQRect textRect( region->pTextRegion->boundingRect() );
if( bIsAreaChart ){
- QBrush brush( params()->dataValuesBackground( region->chart ) );
+ TQBrush brush( params()->dataValuesBackground( region->chart ) );
painter->setBrush( brush );
- painter->setPen( Qt::NoPen );
- QRect rect( textRect );
+ painter->setPen( TQt::NoPen );
+ TQRect rect( textRect );
rect.moveBy( -2, 0 );
rect.setWidth( rect.width() + 4 );
painter->drawRect( rect );
@@ -866,12 +866,12 @@ the layout policy feature is implemented !!!
painter->setFont( region->chart ? font1 : font0 );
if( params()->dataValuesAutoColor( region->chart ) ) {
if( bIsAreaChart ){
- QColor color( params()->dataColor( region->row ) );
+ TQColor color( params()->dataColor( region->row ) );
/*
if( ( (0.0 > anchorDY) && region->negative )
|| ( (0.0 < anchorDY) && !region->negative ) )
painter->setPen(
- QColor( static_cast < int > ( 255- color.red() ),
+ TQColor( static_cast < int > ( 255- color.red() ),
static_cast < int > ( 255- color.green() ),
static_cast < int > ( 255- color.blue() ) ) );
else
@@ -879,14 +879,14 @@ the layout policy feature is implemented !!!
painter->setPen( color.dark() );
}else{
if( zero )
- painter->setPen( Qt::black );
+ painter->setPen( TQt::black );
else {
- QColor color( params()->dataColor(
+ TQColor color( params()->dataColor(
( KDChartParams::Pie == params()->chartType()
|| KDChartParams::Ring == params()->chartType() )
? region->col
: region->row ) );
- painter->setPen( QColor( static_cast < int > ( 255- color.red() ),
+ painter->setPen( TQColor( static_cast < int > ( 255- color.red() ),
static_cast < int > ( 255- color.green() ),
static_cast < int > ( 255- color.blue() ) ) );
}
@@ -897,7 +897,7 @@ the layout policy feature is implemented !!!
painter->drawText( textRect.left(), textRect.top(),
textRect.width()+1, textRect.height()+1,
- Qt::AlignLeft | Qt::AlignTop, region->text );
+ TQt::AlignLeft | TQt::AlignTop, region->text );
}
@@ -917,7 +917,7 @@ the layout policy feature is implemented !!!
/**
Paints all custom boxes.
*/
-void KDChartPainter::paintCustomBoxes( QPainter* painter,
+void KDChartPainter::paintCustomBoxes( TQPainter* painter,
KDChartDataRegionList* regions )
{
// paint all of the custom boxes AND their surrounding frames+background (if any)
@@ -945,7 +945,7 @@ void KDChartPainter::paintCustomBoxes( QPainter* painter,
= bIndividualFound ? individualFrameSettings
: bGlobalFound ? globalFrameSettings : 0;
// paint content
- const QPoint anchor( calculateAnchor( *box, regions ) );
+ const TQPoint anchor( calculateAnchor( *box, regions ) );
box->paint( painter,
anchor,
_areaWidthP1000,
@@ -961,10 +961,10 @@ void KDChartPainter::paintCustomBoxes( QPainter* painter,
/**
Calculated the top left corner of a custom box.
*/
-QPoint KDChartPainter::calculateAnchor( const KDChartCustomBox & box,
+TQPoint KDChartPainter::calculateAnchor( const KDChartCustomBox & box,
KDChartDataRegionList* regions ) const
{
- QPoint pt(0,0);
+ TQPoint pt(0,0);
// Recursion handling:
//
@@ -979,14 +979,14 @@ QPoint KDChartPainter::calculateAnchor( const KDChartCustomBox & box,
// Rule:
//
// A box may be aligned to another box (and the 2nd box may again be
- // aligned to a 3rd box and so on) but NO CIRCULAR alignment is allowed.
+ // aligned to a 3rd box and so on) but NO CIRCULAR tqalignment is allowed.
//
if( !box.anchorBeingCalculated() ) {
box.setInternalFlagAnchorBeingCalculated( true );
bool allCustomBoxes;
- QRect rect( calculateAreaRect( allCustomBoxes,
+ TQRect rect( calculateAreaRect( allCustomBoxes,
box.anchorArea(),
box.dataRow(),
box.dataCol(),
@@ -1022,14 +1022,14 @@ QPoint KDChartPainter::calculateAnchor( const KDChartCustomBox & box,
Calculated the rectangle covered by an area.
NOTE: KDChartCustomBox areas are _not_ calculated here.
*/
-QRect KDChartPainter::calculateAreaRect( bool & allCustomBoxes,
+TQRect KDChartPainter::calculateAreaRect( bool & allCustomBoxes,
uint area,
uint dataRow,
uint dataCol,
uint /*data3rd*/,
KDChartDataRegionList* regions ) const
{
- QRect rect(0,0, 0,0);
+ TQRect rect(0,0, 0,0);
allCustomBoxes = false;
uint pos;
switch( area ) {
@@ -1058,7 +1058,7 @@ QRect KDChartPainter::calculateAreaRect( bool & allCustomBoxes,
for( pos = KDChartParams::HdFtPosHeadersSTART;
KDChartParams::HdFtPosHeadersEND >= pos;
++pos ) {
- const QRect& r = params()->headerFooterRect( pos );
+ const TQRect& r = params()->headerFooterRect( pos );
if( r.isValid() ) {
if( bStart )
rect = r;
@@ -1074,7 +1074,7 @@ QRect KDChartPainter::calculateAreaRect( bool & allCustomBoxes,
for( pos = KDChartParams::HdFtPosFootersSTART;
KDChartParams::HdFtPosFootersEND >= pos;
++pos ) {
- const QRect& r = params()->headerFooterRect( pos );
+ const TQRect& r = params()->headerFooterRect( pos );
if( r.isValid() ) {
if( bStart )
rect = r;
@@ -1098,7 +1098,7 @@ QRect KDChartPainter::calculateAreaRect( bool & allCustomBoxes,
for( pos = KDChartParams::HdFtPosSTART;
KDChartParams::HdFtPosEND >= pos;
++pos ) {
- const QRect& r = params()->headerFooterRect( pos );
+ const TQRect& r = params()->headerFooterRect( pos );
if( r.isValid() ) {
if( bStart )
rect = r;
@@ -1140,13 +1140,13 @@ QRect KDChartPainter::calculateAreaRect( bool & allCustomBoxes,
break;
default: {
- uint maskBASE = KDChartEnums::AreaBASEMask & area;
- pos = area - maskBASE;
- if ( KDChartEnums::AreaAxisBASE == maskBASE ) {
+ uint tqmaskBASE = KDChartEnums::AreaBASEMask & area;
+ pos = area - tqmaskBASE;
+ if ( KDChartEnums::AreaAxisBASE == tqmaskBASE ) {
rect = params()->axisParams( pos ).axisTrueAreaRect();
- } else if ( KDChartEnums::AreaHdFtBASE == maskBASE ) {
+ } else if ( KDChartEnums::AreaHdFtBASE == tqmaskBASE ) {
rect = params()->headerFooterRect( pos );
- } else if ( KDChartEnums::AreaCustomBoxesBASE == maskBASE ) {
+ } else if ( KDChartEnums::AreaCustomBoxesBASE == tqmaskBASE ) {
const KDChartCustomBox * box = params()->customBox( pos );
if( box ) {
rect = box->trueRect( calculateAnchor( *box, regions ),
@@ -1160,13 +1160,13 @@ QRect KDChartPainter::calculateAreaRect( bool & allCustomBoxes,
}
-QPoint KDChartPainter::pointOnCircle( const QRect& rect, double angle )
+TQPoint KDChartPainter::pointOnCircle( const TQRect& rect, double angle )
{
// There are two ways of computing this: The simple, but slow one
- // is to use QPointArray.makeArc() and take the first point. The
+ // is to use TQPointArray.makeArc() and take the first point. The
// more advanced, but faster one is to do the trigonometric
// computionations ourselves. Since the comments in
- // QPointArray::makeArc() very often say that the code there is
+ // TQPointArray::makeArc() very often say that the code there is
// "poor", we'd better do it outselves...
double normAngle = angle / 16.0;
@@ -1175,13 +1175,13 @@ QPoint KDChartPainter::pointOnCircle( const QRect& rect, double angle )
double sinAngle = -sin( normAngleRad );
double posX = floor( cosAngle * ( double ) rect.width() / 2.0 + 0.5 );
double posY = floor( sinAngle * ( double ) rect.height() / 2.0 + 0.5 );
- return QPoint( static_cast<int>(posX) + rect.center().x(),
+ return TQPoint( static_cast<int>(posX) + rect.center().x(),
static_cast<int>(posY) + rect.center().y() );
}
-void KDChartPainter::makeArc( QPointArray& points,
- const QRect& rect,
+void KDChartPainter::makeArc( TQPointArray& points,
+ const TQRect& rect,
double startAngle, double angles )
{
double endAngle = startAngle + angles;
@@ -1205,7 +1205,7 @@ void KDChartPainter::makeArc( QPointArray& points,
double sinAngle = -sin( normAngleRad );
double posX = floor( cosAngle * rWid2 + 0.5 );
double posY = floor( sinAngle * rHig2 + 0.5 );
- points[i] = QPoint( ( int ) posX + rCX,
+ points[i] = TQPoint( ( int ) posX + rCX,
( int ) posY + rCY );
if( i+1 >= numSteps-1 )
angle = endAngle; // the very last step width may be smaller than 1.0
@@ -1222,10 +1222,10 @@ void KDChartPainter::makeArc( QPointArray& points,
provide the appropriate drawing code here. This method serves as a
fallback for chart types that do not have axes (like pies).
- \param painter the QPainter onto which the chart should be drawn
+ \param painter the TQPainter onto which the chart should be drawn
\param data the data that will be displayed as a chart
*/
-void KDChartPainter::paintAxes( QPainter* /*painter*/, KDChartTableDataBase* /*data*/ )
+void KDChartPainter::paintAxes( TQPainter* /*painter*/, KDChartTableDataBase* /*data*/ )
{
// This method intentionally left blank.
}
@@ -1238,11 +1238,11 @@ int KDChartPainter::legendTitleVertGap() const
}
-QFont KDChartPainter::trueLegendFont() const
+TQFont KDChartPainter::trueLegendFont() const
{
- QFont trueFont = params()->legendFont();
+ TQFont trueFont = params()->legendFont();
if ( params()->legendFontUseRelSize() ) {
- const double averageValueP1000 = QMIN(_areaWidthP1000, _areaHeightP1000);//( _areaWidthP1000 + _areaHeightP1000 ) / 2.0;
+ const double averageValueP1000 = TQMIN(_areaWidthP1000, _areaHeightP1000);//( _areaWidthP1000 + _areaHeightP1000 ) / 2.0;
trueFont.setPixelSize(
static_cast < int > ( params()->legendFontRelSize() * averageValueP1000 ) );
}
@@ -1253,15 +1253,15 @@ QFont KDChartPainter::trueLegendFont() const
/**
Calculates the size of the rectangle for horizontal legend orientation.
- \param painter the QPainter onto which the chart should be drawn
+ \param painter the TQPainter onto which the chart should be drawn
*/
-void KDChartPainter::calculateHorizontalLegendSize( QPainter* painter,
- QSize& size,
+void KDChartPainter::calculateHorizontalLegendSize( TQPainter* painter,
+ TQSize& size,
bool& legendNewLinesStartAtLeft ) const
{
legendNewLinesStartAtLeft = false;
- QRect legendRect( _legendRect );
+ TQRect legendRect( _legendRect );
/*
* Pending Michel reset the left side before calculating
*the new legend position calculation
@@ -1299,7 +1299,7 @@ void KDChartPainter::calculateHorizontalLegendSize( QPainter* painter,
const int rightEdge = _innermostRect.right()-_legendEMSpace;
bool bFirstLFWithTitle = _legendTitle;
painter->setFont( trueLegendFont() );
- QFontMetrics txtMetrics( painter->fontMetrics() );
+ TQFontMetrics txtMetrics( painter->fontMetrics() );
int dataset;
for ( dataset = 0; dataset < _numLegendTexts; ++dataset ) {
/*
@@ -1317,7 +1317,7 @@ void KDChartPainter::calculateHorizontalLegendSize( QPainter* painter,
ypos += bFirstLFWithTitle ? legendTitleVertGap() : _legendSpacing;
bFirstLFWithTitle = false;
}
- maxX = QMAX(maxX, x2+txtWidth+_legendEMSpace);
+ maxX = TQMAX(maxX, x2+txtWidth+_legendEMSpace);
xpos += txtWidth + em4;
x2 += txtWidth + em4;
@@ -1349,10 +1349,10 @@ bool KDChartPainter::mustDrawVerticalLegend() const
params()->legendPosition() == KDChartParams::LegendBottomRightRight;
}
-QFont KDChartPainter::trueLegendTitleFont() const
+TQFont KDChartPainter::trueLegendTitleFont() const
{
- const double averageValueP1000 = QMIN(_areaWidthP1000, _areaHeightP1000);//( _areaWidthP1000 + _areaHeightP1000 ) / 2.0;
- QFont font( params()->legendTitleFont() );
+ const double averageValueP1000 = TQMIN(_areaWidthP1000, _areaHeightP1000);//( _areaWidthP1000 + _areaHeightP1000 ) / 2.0;
+ TQFont font( params()->legendTitleFont() );
if ( params()->legendTitleFontUseRelSize() ) {
int nTxtHeight =
static_cast < int > ( params()->legendTitleFontRelSize()
@@ -1368,10 +1368,10 @@ QFont KDChartPainter::trueLegendTitleFont() const
draws a standard legend that should be suitable for most chart
types. Subclasses can provide their own implementations.
- \param painter the QPainter onto which the chart should be drawn
+ \param painter the TQPainter onto which the chart should be drawn
\param data the data that will be displayed as a chart
*/
-void KDChartPainter::paintLegend( QPainter* painter,
+void KDChartPainter::paintLegend( TQPainter* painter,
KDChartTableDataBase* /*data*/ )
{
if ( params()->legendPosition() == KDChartParams::NoLegend )
@@ -1385,8 +1385,8 @@ void KDChartPainter::paintLegend( QPainter* painter,
params()->frameSettings( KDChartEnums::AreaLegend, bFrameFound );
// start out with a rectangle around the legend
- //painter->setPen( QPen( Qt::black, 1 ) );
- //painter->setBrush( QBrush::NoBrush );
+ //painter->setPen( TQPen( TQt::black, 1 ) );
+ //painter->setBrush( TQBrush::NoBrush );
//Pending Michel: let us paint the frame at the end of the drawmarker
//and draw text process, in case we need to resize it then
/*
@@ -1416,7 +1416,7 @@ void KDChartPainter::paintLegend( QPainter* painter,
_legendTitle->draw( painter,
xpos,
ypos,
- QRegion( xpos,
+ TQRegion( xpos,
ypos ,
_legendTitleWidth,
_legendTitleHeight ),
@@ -1441,7 +1441,7 @@ void KDChartPainter::paintLegend( QPainter* painter,
const int rightEdge = _legendRect.right();
bool bFirstLF = true;
painter->setFont( trueLegendFont() );
- QFontMetrics txtMetrics( painter->fontMetrics() );
+ TQFontMetrics txtMetrics( painter->fontMetrics() );
int dataset;
for ( dataset = 0; dataset < _numLegendTexts; ++dataset ) {
/*
@@ -1464,11 +1464,11 @@ void KDChartPainter::paintLegend( QPainter* painter,
ypos += bFirstLF ? legendTitleVertGap() : _legendSpacing;
bFirstLF = false;
}
- painter->setBrush( QBrush( params()->dataColor( dataset ),
- QBrush::SolidPattern ) );
+ painter->setBrush( TQBrush( params()->dataColor( dataset ),
+ TQBrush::SolidPattern ) );
if( params()->legendShowLines() ){
- painter->setPen( QPen( params()->dataColor( dataset ), 2,
+ painter->setPen( TQPen( params()->dataColor( dataset ), 2,
params()->lineStyle( dataset ) ) );
painter->drawLine(
xpos - emDiv2,
@@ -1480,7 +1480,7 @@ void KDChartPainter::paintLegend( QPainter* painter,
/*
// draw marker if we have a marker, OR we have no marker and no line
if ( params()->lineMarker() ||
- params()->lineStyle( dataset ) == Qt::NoPen )*/
+ params()->lineStyle( dataset ) == TQt::NoPen )*/
drawMarker( painter,
params(),
_areaWidthP1000, _areaHeightP1000,
@@ -1489,18 +1489,18 @@ void KDChartPainter::paintLegend( QPainter* painter,
? params()->lineMarkerStyle( dataset )
: KDChartParams::LineMarkerSquare,
params()->dataColor(dataset),
- QPoint(xpos + emDiv2,
+ TQPoint(xpos + emDiv2,
bVertical? ypos + emDiv2: !bFirstLF ?ypos + _legendSpacing:_legendRect.center().y() - (legHeight / 2 ))/*ypos + emDiv2*/ ,
0, 0, 0, NULL, // these params are deadweight here. TODO
&legHeight /*&_legendEMSpace*/, &legHeight /*&_legendEMSpace*/,
- bVertical ? Qt::AlignCenter : (Qt::AlignTop | Qt::AlignHCenter) );
+ bVertical ? TQt::AlignCenter : (TQt::AlignTop | TQt::AlignHCenter) );
/*
painter->drawText(_legendRect.topLeft(), "topLeft" );
painter->drawText(_legendRect.topLeft().x(), _legendRect.center().y(), "center" );
painter->drawText(_legendRect.bottomLeft(), "bottomLeft" );
*/
/* old:
- painter->setPen( Qt::black );
+ painter->setPen( TQt::black );
painter->drawRect( xpos,
ypos + ( _legendHeight - _legendEMSpace ) / 2,
_legendEMSpace,
@@ -1511,7 +1511,7 @@ void KDChartPainter::paintLegend( QPainter* painter,
bVertical ? ypos : !bFirstLF ? ypos + _legendSpacing : _legendRect.center().y() - (legHeight / 2 ),
txtWidth,
legHeight,
- Qt::AlignLeft | Qt::AlignVCenter,
+ TQt::AlignLeft | TQt::AlignVCenter,
_legendTexts[ dataset ] );
if( bVertical )
@@ -1523,8 +1523,8 @@ void KDChartPainter::paintLegend( QPainter* painter,
}
}
- painter->setPen( QPen( Qt::black, 1 ) );
- painter->setBrush( QBrush::NoBrush );
+ painter->setPen( TQPen( TQt::black, 1 ) );
+ painter->setBrush( TQBrush::NoBrush );
if( !bFrameFound )
painter->drawRect( _legendRect );
@@ -1577,8 +1577,8 @@ void internSetAxisArea( KDChartParams* params, int axis,
int x0, int y0, int w0, int h0 )
{
// axis may never occupy more than 1000 per mille of the available space
- int nFrom = QMAX(-1000, params->axisParams( axis ).axisUseAvailableSpaceFrom());
- int nTo = QMAX(-1000, params->axisParams( axis ).axisUseAvailableSpaceTo());
+ int nFrom = TQMAX(-1000, params->axisParams( axis ).axisUseAvailableSpaceFrom());
+ int nTo = TQMAX(-1000, params->axisParams( axis ).axisUseAvailableSpaceTo());
adjustFromTo(nFrom,nTo);
KDChartAxisParams::AxisPos basicPos = KDChartAxisParams::basicAxisPos( axis );
@@ -1618,7 +1618,7 @@ void internSetAxisArea( KDChartParams* params, int axis,
}
params->setAxisArea( axis,
- QRect( x,
+ TQRect( x,
y,
w,
h ) );
@@ -1630,32 +1630,32 @@ void internSetAxisArea( KDChartParams* params, int axis,
in KDChartPainter draws a standard header that should be suitable
for most chart types. Subclasses can provide their own implementations.
- \param painter the QPainter onto which the chart should be drawn
+ \param painter the TQPainter onto which the chart should be drawn
\param data the data that will be displayed as a chart
*/
-void KDChartPainter::paintHeaderFooter( QPainter* painter,
+void KDChartPainter::paintHeaderFooter( TQPainter* painter,
KDChartTableDataBase* /*data*/ )
{
- const double averageValueP1000 = QMIN(_areaWidthP1000, _areaHeightP1000);//( _areaWidthP1000 + _areaHeightP1000 ) / 2.0;
+ const double averageValueP1000 = TQMIN(_areaWidthP1000, _areaHeightP1000);//( _areaWidthP1000 + _areaHeightP1000 ) / 2.0;
painter->save();
for( int iHdFt = KDChartParams::HdFtPosSTART;
iHdFt <= KDChartParams::HdFtPosEND; ++iHdFt ){
- QString txt( params()->headerFooterText( iHdFt ) );
+ TQString txt( params()->headerFooterText( iHdFt ) );
if ( !txt.isEmpty() ) {
- QFont actFont( params()->headerFooterFont( iHdFt ) );
+ TQFont actFont( params()->headerFooterFont( iHdFt ) );
if ( params()->headerFooterFontUseRelSize( iHdFt ) )
actFont.setPixelSize( static_cast < int > (
params()->headerFooterFontRelSize( iHdFt ) * averageValueP1000 ) );
painter->setPen( params()->headerFooterColor( iHdFt ) );
painter->setFont( actFont );
- // Note: The alignment flags used here match the rect calculation
+ // Note: The tqalignment flags used here match the rect calculation
// done in KDChartPainter::setupGeometry().
// AlignTop is done to ensure that the hd/ft texts of the same
// group (e.g. Hd2L and Hd2 and Hd2R) have the same baselines.
- QRect rect( params()->headerFooterRect( iHdFt ) );
+ TQRect rect( params()->headerFooterRect( iHdFt ) );
int dXY = iHdFt < KDChartParams::HdFtPosFootersSTART
? _hdLeading/3
: _ftLeading/3;
@@ -1663,7 +1663,7 @@ void KDChartPainter::paintHeaderFooter( QPainter* painter,
rect.setWidth( rect.width() -2*dXY +1 );
rect.setHeight( rect.height()-2*dXY +1 );
painter->drawText( rect,
- Qt::AlignLeft | Qt::AlignTop | Qt::SingleLine,
+ TQt::AlignLeft | TQt::AlignTop | TQt::SingleLine,
txt );
}
}
@@ -1672,7 +1672,7 @@ void KDChartPainter::paintHeaderFooter( QPainter* painter,
int KDChartPainter::calculateHdFtRects(
- QPainter* painter,
+ TQPainter* painter,
double averageValueP1000,
int xposLeft,
int xposRight,
@@ -1690,7 +1690,7 @@ int KDChartPainter::calculateHdFtRects(
bHeader ? KDChartParams::HdFtPosHeaders1START : KDChartParams::HdFtPosFooters1START,
bHeader ? KDChartParams::HdFtPosHeaders2START : KDChartParams::HdFtPosFooters2START };
const int rangeSize = 3;
- QFontMetrics* metrics[rangesCnt * rangeSize];
+ TQFontMetrics* metrics[rangesCnt * rangeSize];
int i;
for( i = 0; i < rangesCnt*rangeSize; ++i )
@@ -1701,16 +1701,16 @@ int KDChartPainter::calculateHdFtRects(
for( iRange = 0; iRange < rangesCnt; ++iRange ){
for( i = 0; i < rangeSize; ++i ){
iHdFt = ranges[iRange] + i;
- QString txt( params()->headerFooterText( iHdFt ) );
+ TQString txt( params()->headerFooterText( iHdFt ) );
if ( !txt.isEmpty() ) {
- QFont actFont( params()->headerFooterFont( iHdFt ) );
+ TQFont actFont( params()->headerFooterFont( iHdFt ) );
if ( params()->headerFooterFontUseRelSize( iHdFt ) ) {
actFont.setPixelSize( static_cast < int > (
params()->headerFooterFontRelSize( iHdFt ) * averageValueP1000 ) );
}
painter->setFont( actFont );
- metrics[ iRange*rangeSize + i ] = new QFontMetrics( painter->fontMetrics() );
- leading = QMAX( leading, metrics[ iRange*rangeSize + i ]->lineSpacing() / 2 );
+ metrics[ iRange*rangeSize + i ] = new TQFontMetrics( painter->fontMetrics() );
+ leading = TQMAX( leading, metrics[ iRange*rangeSize + i ]->lineSpacing() / 2 );
}
}
}
@@ -1736,16 +1736,16 @@ int KDChartPainter::calculateHdFtRects(
for( i = 0; i < rangeSize; ++i ){
iHdFt = ranges[iRange] + i;
if ( metrics[ iRange*rangeSize + i ] ) {
- QFontMetrics& m = *metrics[ iRange*rangeSize + i ];
+ TQFontMetrics& m = *metrics[ iRange*rangeSize + i ];
ascents[i] = m.ascent();
heights[i] = m.height() + leading23;
- // the following adds two spaces to work around a bug in Qt:
+ // the following adds two spaces to work around a bug in TQt:
// bounding rect sometimes is too small, if using italicized fonts
widths[ i] = m.boundingRect( params()->headerFooterText( iHdFt )+" " ).width() + leading23;
- maxAscent = QMAX( maxAscent, ascents[i] );
- maxHeight = QMAX( maxHeight, heights[i] );
+ maxAscent = TQMAX( maxAscent, ascents[i] );
+ maxHeight = TQMAX( maxHeight, heights[i] );
}else{
heights[i] = 0;
}
@@ -1766,7 +1766,7 @@ int KDChartPainter::calculateHdFtRects(
default: x1 = xposLeft + (xposRight-xposLeft-widths[i]) / 2;
}
((KDChartParams*)params())->__internalStoreHdFtRect( iHdFt,
- QRect( x1,
+ TQRect( x1,
bHeader
? yposTop + maxAscent - ascents[i]
: yposBottom + maxAscent - ascents[i],
@@ -1825,7 +1825,7 @@ void KDChartPainter::findChartDatasets( KDChartTableDataBase* data,
void KDChartPainter::calculateAllAxesRects(
- QPainter* painter,
+ TQPainter* painter,
bool finalPrecision,
KDChartTableDataBase* data
)
@@ -1836,7 +1836,7 @@ void KDChartPainter::calculateAllAxesRects(
const int trueWidth = _outermostRect.width();
const int trueHeight = _outermostRect.height();
- const double averageValueP1000 = QMIN(_areaWidthP1000, _areaHeightP1000);//( _areaWidthP1000 + _areaHeightP1000 ) / 2.0;
+ const double averageValueP1000 = TQMIN(_areaWidthP1000, _areaHeightP1000);//( _areaWidthP1000 + _areaHeightP1000 ) / 2.0;
// store the axes' 0 offsets
int nAxesLeft0 = _axesRect.left() - _outermostRect.left();
@@ -1904,11 +1904,11 @@ void KDChartPainter::calculateAllAxesRects(
if ( para.axisLabelsVisible() ) {
int fntHeight;
if ( para.axisLabelsFontUseRelSize() )
- fntHeight = QMAX(static_cast < int > ( para.axisLabelsFontRelSize() * averageValueP1000 ),
+ fntHeight = TQMAX(static_cast < int > ( para.axisLabelsFontRelSize() * averageValueP1000 ),
para.axisLabelsFontMinSize() );
else {
painter->setFont( para.axisLabelsFont() );
- QFontMetrics metrics( painter->fontMetrics() );
+ TQFontMetrics metrics( painter->fontMetrics() );
fntHeight = metrics.height();
}
// adjust text height in case of formatted Date/Time values
@@ -1920,21 +1920,21 @@ void KDChartPainter::calculateAllAxesRects(
qDebug( "IMPLEMENTATION ERROR: findDataset( DataEntry, ... ) should *always* return true. (a)" );
dataDataset = KDCHART_ALL_DATASETS;
}
- QVariant::Type valType = QVariant::Invalid;
+ TQVariant::Type valType = TQVariant::Invalid;
const bool dataCellsHaveSeveralCoordinates =
(KDCHART_ALL_DATASETS == dataDataset)
? data->cellsHaveSeveralCoordinates( &valType )
: data->cellsHaveSeveralCoordinates( dataDataset, dataDataset2, &valType );
- QString format( para.axisLabelsDateTimeFormat() );
+ TQString format( para.axisLabelsDateTimeFormat() );
if( dataCellsHaveSeveralCoordinates
- && QVariant::DateTime == valType ){
+ && TQVariant::DateTime == valType ){
if( KDCHART_AXIS_LABELS_AUTO_DATETIME_FORMAT == format )
- areaMin = QMAX( areaMin, static_cast < int > ( fntHeight * 6.75 ) );
+ areaMin = TQMAX( areaMin, static_cast < int > ( fntHeight * 6.75 ) );
else
- areaMin = QMAX( areaMin, fntHeight * ( 3 + format.contains("\n") ) );
+ areaMin = TQMAX( areaMin, fntHeight * ( 3 + format.tqcontains("\n") ) );
}
else
- areaMin = QMAX( areaMin, fntHeight * 3 );
+ areaMin = TQMAX( areaMin, fntHeight * 3 );
}
break;
case KDChartAxisParams::AxisPosLeft:
@@ -1958,21 +1958,21 @@ void KDChartPainter::calculateAllAxesRects(
internal__KDChart__CalcValues& cv = calcVal[iAxis];
const int nUsableAxisWidth = static_cast < int > (cv.pTextsW);
const KDChartAxisParams & para = params()->axisParams( iAxis );
- QFont axisLabelsFont( para.axisLabelsFont() );
+ TQFont axisLabelsFont( para.axisLabelsFont() );
if ( para.axisLabelsFontUseRelSize() ) {
axisLabelsFont.setPixelSize( static_cast < int > ( cv.nTxtHeight ) );
}
painter->setFont( para.axisLabelsFont() );
- QFontMetrics axisLabelsFontMetrics( painter->fontMetrics() );
+ TQFontMetrics axisLabelsFontMetrics( painter->fontMetrics() );
const int lenEM( axisLabelsFontMetrics.boundingRect("M").width() );
- const QStringList* labelTexts = para.axisLabelTexts();
+ const TQStringList* labelTexts = para.axisLabelTexts();
uint nLabels = ( 0 != labelTexts )
? labelTexts->count()
: 0;
int maxLabelsWidth = 0;
for ( uint i = 0; i < nLabels; ++i )
maxLabelsWidth =
- QMAX( maxLabelsWidth,
+ TQMAX( maxLabelsWidth,
axisLabelsFontMetrics.boundingRect(*labelTexts->at(i)).width() );
if( nUsableAxisWidth < maxLabelsWidth )
areaSize = maxLabelsWidth
@@ -2000,7 +2000,7 @@ void KDChartPainter::calculateAllAxesRects(
case KDChartAxisParams::AxisAreaModeFixedSize:
{
- areaSize = areaMax ? QMIN( areaMin, areaMax ) : areaMin;
+ areaSize = areaMax ? TQMIN( areaMin, areaMax ) : areaMin;
}
break;
}
@@ -2011,11 +2011,11 @@ void KDChartPainter::calculateAllAxesRects(
for( idx = 0; idx <= params()->maxCustomBoxIdx(); ++idx ) {
const KDChartCustomBox * box = params()->customBox( idx );
if ( box )
- if ( box->parentAxisArea() == KDChartAxisParams::AxisPosBottom
- || box->parentAxisArea() == KDChartAxisParams::AxisPosLeft
- || box->parentAxisArea() == KDChartAxisParams::AxisPosTop
- || box->parentAxisArea() == KDChartAxisParams::AxisPosRight )
- boxSize = box->trueRect(QPoint( 0,0 ), _areaWidthP1000, _areaHeightP1000 ).height();
+ if ( box->tqparentAxisArea() == KDChartAxisParams::AxisPosBottom
+ || box->tqparentAxisArea() == KDChartAxisParams::AxisPosLeft
+ || box->tqparentAxisArea() == KDChartAxisParams::AxisPosTop
+ || box->tqparentAxisArea() == KDChartAxisParams::AxisPosRight )
+ boxSize = box->trueRect(TQPoint( 0,0 ), _areaWidthP1000, _areaHeightP1000 ).height();
}
areaSize += boxSize;
@@ -2028,26 +2028,26 @@ void KDChartPainter::calculateAllAxesRects(
}
else{
// areaSize += boxSize;
- nAxesBottomADD = QMAX( nAxesBottomADD + boxSize, areaSize );
+ nAxesBottomADD = TQMAX( nAxesBottomADD + boxSize, areaSize );
}
break;
case KDChartAxisParams::AxisPosLeft:
if( bAddLeft )
nAxesLeftADD += areaSize;
else
- nAxesLeftADD = QMAX( nAxesLeftADD + boxSize, areaSize );
+ nAxesLeftADD = TQMAX( nAxesLeftADD + boxSize, areaSize );
break;
case KDChartAxisParams::AxisPosTop:
if( bAddTop )
nAxesTopADD += areaSize;
else
- nAxesTopADD = QMAX( nAxesTopADD + boxSize, areaSize );
+ nAxesTopADD = TQMAX( nAxesTopADD + boxSize, areaSize );
break;
case KDChartAxisParams::AxisPosRight:
if( bAddRight )
nAxesRightADD += areaSize;
else
- nAxesRightADD = QMAX( nAxesRightADD + boxSize, areaSize );
+ nAxesRightADD = TQMAX( nAxesRightADD + boxSize, areaSize );
break;
default:
break;
@@ -2061,16 +2061,16 @@ void KDChartPainter::calculateAllAxesRects(
}
int nMinDistance = static_cast < int > ( 30.0 * averageValueP1000 );
- int nAxesBottom = QMAX( nAxesBottom0 + nAxesBottomADD, nMinDistance );
+ int nAxesBottom = TQMAX( nAxesBottom0 + nAxesBottomADD, nMinDistance );
- // for micro alignment with the X axis, we adjust the Y axis - but not for Area Charts:
+ // for micro tqalignment with the X axis, we adjust the Y axis - but not for Area Charts:
// otherwise the areas drawn would overwrite the Y axis line.
- int nAxesLeft = QMAX( nAxesLeft0 + nAxesLeftADD, nMinDistance )
+ int nAxesLeft = TQMAX( nAxesLeft0 + nAxesLeftADD, nMinDistance )
- (bIsAreaChart ? 0 : 1);
- int nAxesTop = QMAX( nAxesTop0 + nAxesTopADD, nMinDistance );
+ int nAxesTop = TQMAX( nAxesTop0 + nAxesTopADD, nMinDistance );
- int nAxesRight = QMAX( nAxesRight0 + nAxesRightADD, nMinDistance );
+ int nAxesRight = TQMAX( nAxesRight0 + nAxesRightADD, nMinDistance );
int nBottom = params()->axisParams( KDChartAxisParams::AxisPosBottom ).axisTrueAreaSize();
int nLeft = params()->axisParams( KDChartAxisParams::AxisPosLeft ).axisTrueAreaSize();
@@ -2133,7 +2133,7 @@ void KDChartPainter::calculateAllAxesRects(
nRight2,
trueHeight - nAxesTop - nAxesBottom + 1 );
- _dataRect = QRect( _outermostRect.left() + nAxesLeft,
+ _dataRect = TQRect( _outermostRect.left() + nAxesLeft,
_outermostRect.top() + nAxesTop,
trueWidth - nAxesLeft - nAxesRight + 1,
trueHeight - nAxesTop - nAxesBottom + 1 );
@@ -2143,22 +2143,22 @@ void KDChartPainter::calculateAllAxesRects(
/**
This method will be called whenever any parameters that affect
- geometry have been changed. It will compute the appropriate
+ tqgeometry have been changed. It will compute the appropriate
positions for the various parts of the chart (legend, axes, data
area etc.). The implementation in KDChartPainter computes a
- standard geometry that should be suitable for most chart
+ standard tqgeometry that should be suitable for most chart
types. Subclasses can provide their own implementations.
\param data the data that will be displayed as a chart
\param drawRect the position and size of the area where the chart
is to be displayed in
*/
-void KDChartPainter::setupGeometry( QPainter* painter,
+void KDChartPainter::setupGeometry( TQPainter* painter,
KDChartTableDataBase* data,
- const QRect& drawRect )
+ const TQRect& drawRect )
{
//qDebug("INVOKING: KDChartPainter::setupGeometry()");
- // avoid recursion from repaint() being called due to params() changed signals...
+ // avoid recursion from tqrepaint() being called due to params() changed signals...
const bool oldBlockSignalsState = params()->signalsBlocked();
const_cast < KDChartParams* > ( params() )->blockSignals( true );
@@ -2191,8 +2191,8 @@ void KDChartPainter::setupGeometry( QPainter* painter,
? params()->globalLeadingBottom()
: static_cast < int > ( params()->globalLeadingBottom()* -_areaHeightP1000 );
- _innermostRect = QRect( QPoint(xposLeft, yposTop),
- QPoint(xposRight, yposBottom) );
+ _innermostRect = TQRect( TQPoint(xposLeft, yposTop),
+ TQPoint(xposRight, yposBottom) );
_logicalWidth = xposRight - xposLeft;
_logicalHeight = yposBottom - yposTop;
@@ -2202,7 +2202,7 @@ void KDChartPainter::setupGeometry( QPainter* painter,
_areaWidthP1000 = _logicalWidth / 1000.0;
_areaHeightP1000 = _logicalHeight / 1000.0;
- double averageValueP1000 = QMIN(_areaWidthP1000, _areaHeightP1000);//( _areaWidthP1000 + _areaHeightP1000 ) / 2.0;
+ double averageValueP1000 = TQMIN(_areaWidthP1000, _areaHeightP1000);//( _areaWidthP1000 + _areaHeightP1000 ) / 2.0;
// new code design:
// 1. now min-header-leading is text height/2
@@ -2238,9 +2238,9 @@ void KDChartPainter::setupGeometry( QPainter* painter,
delete _legendTitle;
_legendTitle = 0;
if ( hasLegendTitle ) {
- const QFont font( trueLegendTitleFont() );
+ const TQFont font( trueLegendTitleFont() );
painter->setFont( font );
- QFontMetrics legendTitleMetrics( painter->fontMetrics() );
+ TQFontMetrics legendTitleMetrics( painter->fontMetrics() );
_legendTitleMetricsHeight = legendTitleMetrics.height();
_legendTitle = new KDChartTextPiece( painter,
@@ -2252,7 +2252,7 @@ void KDChartPainter::setupGeometry( QPainter* painter,
}
painter->setFont( trueLegendFont() );
- QFontMetrics legendMetrics( painter->fontMetrics() );
+ TQFontMetrics legendMetrics( painter->fontMetrics() );
_legendSpacing = legendMetrics.lineSpacing();
_legendHeight = legendMetrics.height();
_legendLeading = legendMetrics.leading();
@@ -2263,7 +2263,7 @@ void KDChartPainter::setupGeometry( QPainter* painter,
int sizeY = 0;
for ( int dataset = 0; dataset < _numLegendTexts; dataset++ ) {
- sizeX = QMAX( sizeX, legendMetrics.width( _legendTexts[ dataset ] ) );
+ sizeX = TQMAX( sizeX, legendMetrics.width( _legendTexts[ dataset ] ) );
if( !_legendTexts[ dataset ].isEmpty() )
sizeY += _legendSpacing;
}
@@ -2282,13 +2282,13 @@ void KDChartPainter::setupGeometry( QPainter* painter,
// color box (where the title does not start yet, it is
// left-aligned with the color boxes) and after the title (to
// have some space before the boundary line comes).
- sizeX = QMAX( sizeX, _legendTitleWidth + _legendEMSpace*2 );
+ sizeX = TQMAX( sizeX, _legendTitleWidth + _legendEMSpace*2 );
//qDebug("setupGeometry mustDrawVerticalLegend: %s", mustDrawVerticalLegend() ? "YES":"NO ");
// PENDING Michel: do that after having calculated the position
if( !mustDrawVerticalLegend() ){
- QSize size;
+ TQSize size;
calculateHorizontalLegendSize( painter,
size,
_legendNewLinesStartAtLeft );
@@ -2299,8 +2299,8 @@ void KDChartPainter::setupGeometry( QPainter* painter,
switch ( params()->legendPosition() ) {
case KDChartParams::LegendTop:
if ( headerLineLeading )
- yposTop += QMAX( (int)params()->legendSpacing(), headerLineLeading );
- _legendRect = QRect( xposLeft + ( (xposRight-xposLeft) - sizeX ) / 2,
+ yposTop += TQMAX( (int)params()->legendSpacing(), headerLineLeading );
+ _legendRect = TQRect( xposLeft + ( (xposRight-xposLeft) - sizeX ) / 2,
yposTop, sizeX, sizeY );
yposTop = _legendRect.bottom() + params()->legendSpacing();
//qDebug("A: _legendRect:\n%i,%i\n%i,%i", _legendRect.left(),_legendRect.top(),_legendRect.right(),_legendRect.bottom() );
@@ -2308,7 +2308,7 @@ void KDChartPainter::setupGeometry( QPainter* painter,
case KDChartParams::LegendBottom:
if ( params()->showGrid() )
yposTop += headerLineLeading;
- _legendRect = QRect( xposLeft + ( (xposRight-xposLeft) - sizeX ) / 2,
+ _legendRect = TQRect( xposLeft + ( (xposRight-xposLeft) - sizeX ) / 2,
yposBottom - sizeY,
sizeX, sizeY );
yposBottom = _legendRect.top() - params()->legendSpacing();
@@ -2316,7 +2316,7 @@ void KDChartPainter::setupGeometry( QPainter* painter,
case KDChartParams::LegendLeft:
if ( params()->showGrid() )
yposTop += headerLineLeading;
- _legendRect = QRect( xposLeft + 1, ( yposBottom - yposTop - sizeY ) / 2 +
+ _legendRect = TQRect( xposLeft + 1, ( yposBottom - yposTop - sizeY ) / 2 +
yposTop,
sizeX, sizeY );
xposLeft = _legendRect.right() + params()->legendSpacing();
@@ -2324,75 +2324,75 @@ void KDChartPainter::setupGeometry( QPainter* painter,
case KDChartParams::LegendRight:
if ( params()->showGrid() )
yposTop += headerLineLeading;
- _legendRect = QRect( xposRight - sizeX - 1,
+ _legendRect = TQRect( xposRight - sizeX - 1,
( yposBottom - yposTop - sizeY ) / 2 + yposTop,
sizeX, sizeY );
xposRight = _legendRect.left() - params()->legendSpacing();
break;
case KDChartParams::LegendTopLeft:
if ( headerLineLeading )
- yposTop += QMAX( (int)params()->legendSpacing(), headerLineLeading );
- _legendRect = QRect( xposLeft + 1, yposTop, sizeX, sizeY );
+ yposTop += TQMAX( (int)params()->legendSpacing(), headerLineLeading );
+ _legendRect = TQRect( xposLeft + 1, yposTop, sizeX, sizeY );
yposTop = _legendRect.bottom() + params()->legendSpacing();
xposLeft = _legendRect.right() + params()->legendSpacing();
break;
case KDChartParams::LegendTopLeftTop:
if ( headerLineLeading )
- yposTop += QMAX( (int)params()->legendSpacing(), headerLineLeading );
- _legendRect = QRect( xposLeft + 1, yposTop, sizeX, sizeY );
+ yposTop += TQMAX( (int)params()->legendSpacing(), headerLineLeading );
+ _legendRect = TQRect( xposLeft + 1, yposTop, sizeX, sizeY );
yposTop = _legendRect.bottom() + params()->legendSpacing();
break;
case KDChartParams::LegendTopLeftLeft:
if ( headerLineLeading )
- yposTop += QMAX( (int)params()->legendSpacing(), headerLineLeading );
- _legendRect = QRect( xposLeft + 1, yposTop, sizeX, sizeY );
+ yposTop += TQMAX( (int)params()->legendSpacing(), headerLineLeading );
+ _legendRect = TQRect( xposLeft + 1, yposTop, sizeX, sizeY );
xposLeft = _legendRect.right() + params()->legendSpacing();
break;
case KDChartParams::LegendTopRight:
if ( headerLineLeading )
- yposTop += QMAX( (int)params()->legendSpacing(), headerLineLeading );
- _legendRect = QRect( xposRight - sizeX - 1,
+ yposTop += TQMAX( (int)params()->legendSpacing(), headerLineLeading );
+ _legendRect = TQRect( xposRight - sizeX - 1,
yposTop, sizeX, sizeY );
yposTop = _legendRect.bottom() + params()->legendSpacing();
xposRight = _legendRect.left() - params()->legendSpacing();
break;
case KDChartParams::LegendTopRightTop:
if ( headerLineLeading )
- yposTop += QMAX( (int)params()->legendSpacing(), headerLineLeading );
- _legendRect = QRect( xposRight - sizeX - 1,
+ yposTop += TQMAX( (int)params()->legendSpacing(), headerLineLeading );
+ _legendRect = TQRect( xposRight - sizeX - 1,
yposTop, sizeX, sizeY );
yposTop = _legendRect.bottom() + params()->legendSpacing();
break;
case KDChartParams::LegendTopRightRight:
if ( headerLineLeading )
- yposTop += QMAX( (int)params()->legendSpacing(), headerLineLeading );
- _legendRect = QRect( xposRight - sizeX - 1,
+ yposTop += TQMAX( (int)params()->legendSpacing(), headerLineLeading );
+ _legendRect = TQRect( xposRight - sizeX - 1,
yposTop, sizeX, sizeY );
xposRight = _legendRect.left() - params()->legendSpacing();
break;
case KDChartParams::LegendBottomLeft:
if ( params()->showGrid() )
yposTop += headerLineLeading;
- _legendRect = QRect( xposLeft + 1, yposBottom - sizeY, sizeX, sizeY );
+ _legendRect = TQRect( xposLeft + 1, yposBottom - sizeY, sizeX, sizeY );
yposBottom = _legendRect.top() - params()->legendSpacing();
xposLeft = _legendRect.right() + params()->legendSpacing();
break;
case KDChartParams::LegendBottomLeftBottom:
if ( params()->showGrid() )
yposTop += headerLineLeading;
- _legendRect = QRect( xposLeft + 1, yposBottom - sizeY, sizeX, sizeY );
+ _legendRect = TQRect( xposLeft + 1, yposBottom - sizeY, sizeX, sizeY );
yposBottom = _legendRect.top() - params()->legendSpacing();
break;
case KDChartParams::LegendBottomLeftLeft:
if ( params()->showGrid() )
yposTop += headerLineLeading;
- _legendRect = QRect( xposLeft + 1, yposBottom - sizeY, sizeX, sizeY );
+ _legendRect = TQRect( xposLeft + 1, yposBottom - sizeY, sizeX, sizeY );
xposLeft = _legendRect.right() + params()->legendSpacing();
break;
case KDChartParams::LegendBottomRight:
if ( params()->showGrid() )
yposTop += headerLineLeading;
- _legendRect = QRect( xposRight - sizeX - 1,
+ _legendRect = TQRect( xposRight - sizeX - 1,
yposBottom - sizeY, sizeX, sizeY );
yposBottom = _legendRect.top() - params()->legendSpacing();
xposRight = _legendRect.left() - params()->legendSpacing();
@@ -2400,14 +2400,14 @@ void KDChartPainter::setupGeometry( QPainter* painter,
case KDChartParams::LegendBottomRightBottom:
if ( params()->showGrid() )
yposTop += headerLineLeading;
- _legendRect = QRect( xposRight - sizeX - 1,
+ _legendRect = TQRect( xposRight - sizeX - 1,
yposBottom - sizeY, sizeX, sizeY );
yposBottom = _legendRect.top() - params()->legendSpacing();
break;
case KDChartParams::LegendBottomRightRight:
if ( params()->showGrid() )
yposTop += headerLineLeading;
- _legendRect = QRect( xposRight - sizeX - 1,
+ _legendRect = TQRect( xposRight - sizeX - 1,
yposBottom - sizeY, sizeX, sizeY );
xposRight = _legendRect.left() - params()->legendSpacing();
break;
@@ -2418,11 +2418,11 @@ void KDChartPainter::setupGeometry( QPainter* painter,
_params->setLegendArea( _legendRect );
}else{
- _params->setLegendArea( QRect(QPoint(0,0), QSize(0,0)) );
+ _params->setLegendArea( TQRect(TQPoint(0,0), TQSize(0,0)) );
}
- _axesRect = QRect( QPoint(xposLeft, yposTop), QPoint(xposRight, yposBottom) );
+ _axesRect = TQRect( TQPoint(xposLeft, yposTop), TQPoint(xposRight, yposBottom) );
// important rule: do *not* calculate axes areas for Polar charts!
// (even if left and bottom axes might be set active)
@@ -2458,7 +2458,7 @@ void KDChartPainter::setupGeometry( QPainter* painter,
void KDChartPainter::findLegendTexts( KDChartTableDataBase* data )
{
uint dataset;
- QVariant vValY;
+ TQVariant vValY;
switch ( params()->legendSource() ) {
case KDChartParams::LegendManual: {
// The easiest case: Take manually set strings, no matter whether any
@@ -2472,7 +2472,7 @@ void KDChartPainter::findLegendTexts( KDChartTableDataBase* data )
// Take whatever is in the first column
for ( dataset = 0; dataset < data->usedRows(); dataset++ ){
if( data->cellCoord( dataset, 0, vValY, 1 ) ){
- if( QVariant::String == vValY.type() )
+ if( TQVariant::String == vValY.type() )
_legendTexts[ dataset ] = vValY.toString();
else
_legendTexts[ dataset ] = "";
@@ -2488,7 +2488,7 @@ void KDChartPainter::findLegendTexts( KDChartTableDataBase* data )
// code below
for ( dataset = 0; dataset < data->usedRows(); dataset++ ) {
if( data->cellCoord( dataset, 0, vValY, 1 ) ){
- if( QVariant::String == vValY.type() )
+ if( TQVariant::String == vValY.type() )
_legendTexts[ dataset ] = vValY.toString();
else
_legendTexts[ dataset ] = "";
@@ -2537,9 +2537,9 @@ void KDChartPainter::findLegendTexts( KDChartTableDataBase* data )
\return the fallback text to use for describing the specified
dataset in the legend
*/
-QString KDChartPainter::fallbackLegendText( uint dataset ) const
+TQString KDChartPainter::fallbackLegendText( uint dataset ) const
{
- return QObject::tr( "Series " ) + QString::number( dataset + 1 );
+ return TQObject::tr( "Series " ) + TQString::number( dataset + 1 );
}
@@ -2570,11 +2570,11 @@ uint KDChartPainter::numLegendFallbackTexts( KDChartTableDataBase* data ) const
\param p the center of the marker
\param size the width and height of the marker: both values must be positive.
*/
-void KDChartPainter::drawMarker( QPainter* painter,
+void KDChartPainter::drawMarker( TQPainter* painter,
int style,
- const QColor& color,
- const QPoint& p,
- const QSize& size,
+ const TQColor& color,
+ const TQPoint& p,
+ const TQSize& size,
uint align )
{
int width = size.width();
@@ -2609,15 +2609,15 @@ void KDChartPainter::drawMarker( QPainter* painter,
\return pointer to the KDChartDataRegion that was appended to the regions list,
or zero if if parameter regions was zero
*/
-KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
+KDChartDataRegion* KDChartPainter::drawMarker( TQPainter* painter,
const KDChartParams* params,
double areaWidthP1000,
double areaHeightP1000,
int deltaX,
int deltaY,
int style,
- const QColor& color,
- const QPoint& _p,
+ const TQColor& color,
+ const TQPoint& _p,
uint dataset, uint value, uint chart,
KDChartDataRegionList* regions,
int* width,
@@ -2625,7 +2625,7 @@ KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
uint align )
{
KDChartDataRegion* datReg = 0;
- const double areaSizeP1000 = QMIN(areaWidthP1000, areaHeightP1000);
+ const double areaSizeP1000 = TQMIN(areaWidthP1000, areaHeightP1000);
int xsize = width ? *width : (params ? params->lineMarkerSize().width() : 12);
if( 0 > xsize )
xsize = static_cast < int > (xsize * -areaSizeP1000);
@@ -2633,8 +2633,8 @@ KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
if( 0 > ysize )
ysize = static_cast < int > (ysize * -areaSizeP1000);
if( KDChartParams::LineMarkerCross != style ){
- xsize = QMAX( xsize, 4 );
- ysize = QMAX( ysize, 4 );
+ xsize = TQMAX( xsize, 4 );
+ ysize = TQMAX( ysize, 4 );
}
uint xsize2 = xsize / 2;
uint ysize2 = ysize / 2;
@@ -2643,27 +2643,27 @@ KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
uint xsize6 = xsize / 6;
uint ysize6 = ysize / 6;
painter->setPen( color );
- const uint xysize2 = QMIN( xsize2, ysize2 );
+ const uint xysize2 = TQMIN( xsize2, ysize2 );
int x = _p.x();
int y = _p.y();
- if( align & Qt::AlignLeft )
+ if( align & TQt::AlignLeft )
x += xsize2;
- else if( align & Qt::AlignRight )
+ else if( align & TQt::AlignRight )
x -= xsize2;
- if( align & Qt::AlignTop )
+ if( align & TQt::AlignTop )
y += ysize2;
- else if( align & Qt::AlignBottom )
+ else if( align & TQt::AlignBottom )
y -= ysize2;
- const QPoint p(x, y);
+ const TQPoint p(x, y);
switch ( style ) {
case KDChartParams::LineMarkerSquare: {
- const QPen oldPen( painter->pen() );
- const QBrush oldBrush( painter->brush() );
+ const TQPen oldPen( painter->pen() );
+ const TQBrush oldBrush( painter->brush() );
painter->setBrush( color );
painter->setPen( color );
- QRect rect( QPoint( p.x() - xsize2, p.y() - ysize2 ), QPoint( p.x() + xsize2, p.y() + ysize2 ) );
+ TQRect rect( TQPoint( p.x() - xsize2, p.y() - ysize2 ), TQPoint( p.x() + xsize2, p.y() + ysize2 ) );
painter->drawRect( rect );
// Don't use rect for drawing after this!
rect.moveBy( deltaX, deltaY );
@@ -2679,9 +2679,9 @@ KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
break;
}
case KDChartParams::LineMarkerDiamond:{
- const QBrush oldBrush( painter->brush() );
+ const TQBrush oldBrush( painter->brush() );
painter->setBrush( color );
- QPointArray points( 4 );
+ TQPointArray points( 4 );
points.setPoint( 0, p.x() - xsize2, p.y() );
points.setPoint( 1, p.x(), p.y() - ysize2 );
points.setPoint( 2, p.x() + xsize2, p.y() );
@@ -2699,7 +2699,7 @@ KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
break;
}
case KDChartParams::LineMarker1Pixel: {
- QRect rect( p, p );
+ TQRect rect( p, p );
painter->drawRect( rect );
// Don't use rect for drawing after this!
rect.moveBy( deltaX, deltaY );
@@ -2712,7 +2712,7 @@ KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
break;
}
case KDChartParams::LineMarker4Pixels:{
- QRect rect( p, QPoint( p.x()+1, p.y()+1 ) );
+ TQRect rect( p, TQPoint( p.x()+1, p.y()+1 ) );
painter->drawRect( rect );
// Don't use rect for drawing after this!
rect.moveBy( deltaX, deltaY );
@@ -2725,13 +2725,13 @@ KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
break;
}
case KDChartParams::LineMarkerRing: {
- const QPen oldPen( painter->pen() );
- painter->setPen( QPen( color, QMIN(xsize4, ysize4) ) );
- const QBrush oldBrush( painter->brush() );
- painter->setBrush( Qt::NoBrush );
+ const TQPen oldPen( painter->pen() );
+ painter->setPen( TQPen( color, TQMIN(xsize4, ysize4) ) );
+ const TQBrush oldBrush( painter->brush() );
+ painter->setBrush( TQt::NoBrush );
painter->drawEllipse( p.x() - xsize2, p.y() - ysize2, xsize, ysize );
if ( regions ) {
- QPointArray points;
+ TQPointArray points;
points.makeEllipse( p.x() - xsize2, p.y() - ysize2, xsize, ysize );
// Don't use points for drawing after this!
points.translate( deltaX, deltaY );
@@ -2747,12 +2747,12 @@ KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
break;
}
case KDChartParams::LineMarkerCross: {
- const QPen oldPen( painter->pen() );
+ const TQPen oldPen( painter->pen() );
painter->setPen( color );
- const QBrush oldBrush( painter->brush() );
+ const TQBrush oldBrush( painter->brush() );
painter->setBrush( color );
int numPoints = (ysize && xsize) ? 12 : 4;
- QPointArray points( numPoints );
+ TQPointArray points( numPoints );
if( ysize && xsize ){
points.setPoint( 0, p.x() - xsize6, p.y() - ysize6 );
points.setPoint( 1, p.x() - xsize6, p.y() - ysize2 );
@@ -2791,14 +2791,14 @@ KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
break;
}
case KDChartParams::LineMarkerFastCross: {
- const QPen oldPen( painter->pen() );
+ const TQPen oldPen( painter->pen() );
painter->setPen( color );
- painter->drawLine( QPoint(p.x() - xysize2, p.y()),
- QPoint(p.x() + xysize2, p.y()) );
- painter->drawLine( QPoint(p.x(), p.y() - xysize2),
- QPoint(p.x(), p.y() + xysize2) );
- QRect rect( QPoint( p.x() - 2, p.y() - 2 ),
- QPoint( p.x() + 2, p.y() + 2 ) );
+ painter->drawLine( TQPoint(p.x() - xysize2, p.y()),
+ TQPoint(p.x() + xysize2, p.y()) );
+ painter->drawLine( TQPoint(p.x(), p.y() - xysize2),
+ TQPoint(p.x(), p.y() + xysize2) );
+ TQRect rect( TQPoint( p.x() - 2, p.y() - 2 ),
+ TQPoint( p.x() + 2, p.y() + 2 ) );
// Don't use rect for drawing after this!
rect.moveBy( deltaX, deltaY );
if ( regions ){
@@ -2813,11 +2813,11 @@ KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
}
case KDChartParams::LineMarkerCircle:
default: {
- const QBrush oldBrush( painter->brush() );
+ const TQBrush oldBrush( painter->brush() );
painter->setBrush( color );
painter->drawEllipse( p.x() - xsize2, p.y() - ysize2, xsize, ysize );
if ( regions ) {
- QPointArray points;
+ TQPointArray points;
points.makeEllipse( p.x() - xsize2, p.y() - ysize2, xsize, ysize );
// Don't use points for drawing after this!
points.translate( deltaX, deltaY );
@@ -2837,11 +2837,11 @@ KDChartDataRegion* KDChartPainter::drawMarker( QPainter* painter,
void KDChartPainter::drawExtraLinesAndMarkers(
KDChartPropertySet& propSet,
- const QPen& defaultPen,
+ const TQPen& defaultPen,
const KDChartParams::LineMarkerStyle& defaultMarkerStyle,
int myPointX,
int myPointY,
- QPainter* painter,
+ TQPainter* painter,
const KDChartAxisParams* abscissaPara,
const KDChartAxisParams* ordinatePara,
const double areaWidthP1000,
@@ -2851,20 +2851,20 @@ void KDChartPainter::drawExtraLinesAndMarkers(
// we can safely call the following functions and ignore their
// return values since they will touch the parameters' values
- // if the propSet *contains* corresponding own values only.
+ // if the propSet *tqcontains* corresponding own values only.
int iDummy;
uint extraLinesAlign = 0;
if( propSet.hasOwnExtraLinesAlign( iDummy, extraLinesAlign )
&& ( extraLinesAlign
- & ( Qt::AlignLeft | Qt::AlignRight | Qt::AlignHCenter |
- Qt::AlignTop | Qt::AlignBottom | Qt::AlignVCenter ) ) ){
+ & ( TQt::AlignLeft | TQt::AlignRight | TQt::AlignHCenter |
+ TQt::AlignTop | TQt::AlignBottom | TQt::AlignVCenter ) ) ){
bool extraLinesInFront = false;
propSet.hasOwnExtraLinesInFront( iDummy, extraLinesInFront );
if( bDrawInFront == extraLinesInFront ){
- const double areaSizeP1000 = QMIN(areaWidthP1000, areaHeightP1000);
+ const double areaSizeP1000 = TQMIN(areaWidthP1000, areaHeightP1000);
int extraLinesLength = -20;
int extraLinesWidth = defaultPen.width();
- QColor extraLinesColor = defaultPen.color();
+ TQColor extraLinesColor = defaultPen.color();
Qt::PenStyle extraLinesStyle = defaultPen.style();
uint extraMarkersAlign = 0;
propSet.hasOwnExtraLinesLength( iDummy, extraLinesLength );
@@ -2878,49 +2878,49 @@ void KDChartPainter::drawExtraLinesAndMarkers(
? static_cast<int>(areaHeightP1000 * extraLinesLength) / 2
: extraLinesLength / 2;
// draw the extra line(s)
- QPoint pL( (Qt::AlignLeft == (extraLinesAlign & Qt::AlignLeft))
+ TQPoint pL( (TQt::AlignLeft == (extraLinesAlign & TQt::AlignLeft))
? 0
- : (Qt::AlignHCenter == (extraLinesAlign & Qt::AlignHCenter))
+ : (TQt::AlignHCenter == (extraLinesAlign & TQt::AlignHCenter))
? myPointX - horiLenP2
: myPointX,
myPointY );
- QPoint pR( (Qt::AlignRight == (extraLinesAlign & Qt::AlignRight))
+ TQPoint pR( (TQt::AlignRight == (extraLinesAlign & TQt::AlignRight))
? abscissaPara->axisTrueAreaRect().width()
- : (Qt::AlignHCenter == (extraLinesAlign & Qt::AlignHCenter))
+ : (TQt::AlignHCenter == (extraLinesAlign & TQt::AlignHCenter))
? myPointX + horiLenP2
: myPointX,
myPointY );
- QPoint pT( myPointX,
- (Qt::AlignTop == (extraLinesAlign & Qt::AlignTop))
+ TQPoint pT( myPointX,
+ (TQt::AlignTop == (extraLinesAlign & TQt::AlignTop))
? 0
- : (Qt::AlignVCenter == (extraLinesAlign & Qt::AlignVCenter))
+ : (TQt::AlignVCenter == (extraLinesAlign & TQt::AlignVCenter))
? myPointY - vertLenP2
: myPointY );
- QPoint pB( myPointX,
- (Qt::AlignBottom == (extraLinesAlign & Qt::AlignBottom))
+ TQPoint pB( myPointX,
+ (TQt::AlignBottom == (extraLinesAlign & TQt::AlignBottom))
? ordinatePara->axisTrueAreaRect().height()
- : (Qt::AlignVCenter == (extraLinesAlign & Qt::AlignVCenter))
+ : (TQt::AlignVCenter == (extraLinesAlign & TQt::AlignVCenter))
? myPointY + vertLenP2
: myPointY );
- const QPen extraPen( extraLinesColor,
+ const TQPen extraPen( extraLinesColor,
0 > extraLinesWidth
? static_cast < int > ( areaSizeP1000 * -extraLinesWidth )
: extraLinesWidth,
extraLinesStyle );
- const QPen oldPen( painter->pen() );
+ const TQPen oldPen( painter->pen() );
painter->setPen( extraPen );
- if( extraLinesAlign & ( Qt::AlignLeft | Qt::AlignRight | Qt::AlignHCenter ) )
+ if( extraLinesAlign & ( TQt::AlignLeft | TQt::AlignRight | TQt::AlignHCenter ) )
painter->drawLine( pL, pR );
- if( extraLinesAlign & ( Qt::AlignTop | Qt::AlignBottom | Qt::AlignVCenter ) )
+ if( extraLinesAlign & ( TQt::AlignTop | TQt::AlignBottom | TQt::AlignVCenter ) )
painter->drawLine( pT, pB );
painter->setPen( oldPen );
// draw the marker(s) of the extra line(s)
propSet.hasOwnExtraMarkersAlign( iDummy, extraMarkersAlign );
if( extraMarkersAlign
- & ( Qt::AlignLeft | Qt::AlignRight |
- Qt::AlignTop | Qt::AlignBottom ) ){
- QSize extraMarkersSize = params()->lineMarkerSize();
- QColor extraMarkersColor = extraLinesColor;
+ & ( TQt::AlignLeft | TQt::AlignRight |
+ TQt::AlignTop | TQt::AlignBottom ) ){
+ TQSize extraMarkersSize = params()->lineMarkerSize();
+ TQColor extraMarkersColor = extraLinesColor;
int extraMarkersStyle = defaultMarkerStyle;
propSet.hasOwnExtraMarkersSize( iDummy, extraMarkersSize );
propSet.hasOwnExtraMarkersColor( iDummy, extraMarkersColor );
@@ -2932,7 +2932,7 @@ void KDChartPainter::drawExtraLinesAndMarkers(
w = static_cast < int > (w * -areaSizeP1000);
if( h < 0 )
h = static_cast < int > (h * -areaSizeP1000);
- if( extraMarkersAlign & Qt::AlignLeft )
+ if( extraMarkersAlign & TQt::AlignLeft )
drawMarker( painter,
params(),
_areaWidthP1000, _areaHeightP1000,
@@ -2942,8 +2942,8 @@ void KDChartPainter::drawExtraLinesAndMarkers(
pL,
0, 0, 0, 0,
&w, &h,
- Qt::AlignCenter );
- if( extraMarkersAlign & Qt::AlignRight )
+ TQt::AlignCenter );
+ if( extraMarkersAlign & TQt::AlignRight )
drawMarker( painter,
params(),
_areaWidthP1000, _areaHeightP1000,
@@ -2953,8 +2953,8 @@ void KDChartPainter::drawExtraLinesAndMarkers(
pR,
0, 0, 0, 0,
&w, &h,
- Qt::AlignCenter );
- if( extraMarkersAlign & Qt::AlignTop )
+ TQt::AlignCenter );
+ if( extraMarkersAlign & TQt::AlignTop )
drawMarker( painter,
params(),
_areaWidthP1000, _areaHeightP1000,
@@ -2964,8 +2964,8 @@ void KDChartPainter::drawExtraLinesAndMarkers(
pT,
0, 0, 0, 0,
&w, &h,
- Qt::AlignCenter );
- if( extraMarkersAlign & Qt::AlignBottom )
+ TQt::AlignCenter );
+ if( extraMarkersAlign & TQt::AlignBottom )
drawMarker( painter,
params(),
_areaWidthP1000, _areaHeightP1000,
@@ -2975,7 +2975,7 @@ void KDChartPainter::drawExtraLinesAndMarkers(
pB,
0, 0, 0, 0,
&w, &h,
- Qt::AlignCenter );
+ TQt::AlignCenter );
}
}
}
diff --git a/libkdchart/KDChartPainter.h b/libkdchart/KDChartPainter.h
index a93ef7d..e0f9b57 100644
--- a/libkdchart/KDChartPainter.h
+++ b/libkdchart/KDChartPainter.h
@@ -29,11 +29,11 @@
#ifndef __KDCHARTPAINTER_H__
#define __KDCHARTPAINTER_H__
-#include <qmap.h>
-#include <qrect.h>
-#include <qdatetime.h>
-#include <qregion.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqrect.h>
+#include <tqdatetime.h>
+#include <tqregion.h>
+#include <tqstring.h>
#include "KDChartGlobal.h"
#include "KDChartUnknownTypeException.h"
@@ -47,7 +47,7 @@ class KDChartCustomBox;
class KDChartTextPiece;
class KDChartPropertySet;
class KDChartAxisParams;
-class QPainter;
+class TQPainter;
struct internal__KDChart__CalcValues {
@@ -56,8 +56,8 @@ struct internal__KDChart__CalcValues {
bool bLogarithmic;
bool bDecreasing;
KDChartAxisParams::AxisPos basicPos;
- QPoint orig;
- QPoint dest;
+ TQPoint orig;
+ TQPoint dest;
double pXDeltaFactor;
double pYDeltaFactor;
double pXDelimDeltaFaktor;
@@ -72,8 +72,8 @@ struct internal__KDChart__CalcValues {
int textAlign;
bool isDateTime;
bool autoDtLabels;
- QDateTime dtLow;
- QDateTime dtHigh;
+ TQDateTime dtLow;
+ TQDateTime dtHigh;
KDChartAxisParams::ValueScale dtDeltaScale;
double nLow;
double nHigh;
@@ -92,62 +92,62 @@ class KDCHART_EXPORT KDChartPainter
virtual ~KDChartPainter();
- static void registerPainter( const QString& painterName,
+ static void registerPainter( const TQString& painterName,
KDChartPainter* painter );
- static void unregisterPainter( const QString& painterName );
+ static void unregisterPainter( const TQString& painterName );
- virtual void setupGeometry ( QPainter* painter,
+ virtual void setupGeometry ( TQPainter* painter,
KDChartTableDataBase* data,
- const QRect& rect );
+ const TQRect& rect );
- virtual void paint( QPainter* painter, KDChartTableDataBase* data,
+ virtual void paint( TQPainter* painter, KDChartTableDataBase* data,
bool paintFirst,
bool paintLast,
KDChartDataRegionList* regions = 0,
- const QRect* rect = 0,
+ const TQRect* rect = 0,
bool mustCalculateGeometry = true );
- virtual QRect outermostRect() const { return _outermostRect; }
+ virtual TQRect outermostRect() const { return _outermostRect; }
- static void drawMarker( QPainter* painter,
+ static void drawMarker( TQPainter* painter,
int style,
- const QColor& color,
- const QPoint& p,
- const QSize& size,
- uint align = Qt::AlignCenter );
+ const TQColor& color,
+ const TQPoint& p,
+ const TQSize& size,
+ uint align = TQt::AlignCenter );
protected:
KDChartPainter( KDChartParams* );
// Note: dataRow, dataCol (and data3rd, resp.)
// must only be set if area == KDChartEnums::AreaChartDataRegion
- virtual void paintArea( QPainter* painter,
+ virtual void paintArea( TQPainter* painter,
uint area,
KDChartDataRegionList* regions = 0,
uint dataRow = 0,
uint dataCol = 0,
uint data3rd = 0 );
- virtual void paintDataRegionAreas( QPainter* painter,
+ virtual void paintDataRegionAreas( TQPainter* painter,
KDChartDataRegionList* regions );
- virtual void paintAreaWithGap( QPainter* painter,
- QRect rect,
+ virtual void paintAreaWithGap( TQPainter* painter,
+ TQRect rect,
const KDChartParams::KDChartFrameSettings& settings );
- virtual void paintCustomBoxes( QPainter* painter,
+ virtual void paintCustomBoxes( TQPainter* painter,
KDChartDataRegionList* regions );
- virtual void paintData( QPainter* painter, KDChartTableDataBase* data,
+ virtual void paintData( TQPainter* painter, KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions = 0 ) = 0;
- virtual void paintDataValues( QPainter* painter,
+ virtual void paintDataValues( TQPainter* painter,
KDChartTableDataBase* data,
KDChartDataRegionList* regions );
- virtual void paintAxes( QPainter* painter,
+ virtual void paintAxes( TQPainter* painter,
KDChartTableDataBase* data );
- virtual void paintLegend( QPainter* painter,
+ virtual void paintLegend( TQPainter* painter,
KDChartTableDataBase* data );
- virtual void paintHeaderFooter( QPainter* painter,
+ virtual void paintHeaderFooter( TQPainter* painter,
KDChartTableDataBase* data );
virtual bool axesOverlapping( int axis1, int axis2 );
@@ -157,25 +157,25 @@ class KDCHART_EXPORT KDChartPainter
uint& chartDatasetStart,
uint& chartDatasetEnd );
- virtual void calculateAllAxesRects( QPainter* painter,
+ virtual void calculateAllAxesRects( TQPainter* painter,
bool finalPrecision,
KDChartTableDataBase* data );
- virtual QPoint calculateAnchor( const KDChartCustomBox & box,
+ virtual TQPoint calculateAnchor( const KDChartCustomBox & box,
KDChartDataRegionList* regions = 0 ) const;
- virtual QRect calculateAreaRect( bool & allCustomBoxes,
+ virtual TQRect calculateAreaRect( bool & allCustomBoxes,
uint area,
uint dataRow,
uint dataCol,
uint data3rd,
KDChartDataRegionList* regions ) const;
- virtual QString fallbackLegendText( uint dataset ) const;
+ virtual TQString fallbackLegendText( uint dataset ) const;
virtual uint numLegendFallbackTexts( KDChartTableDataBase* data ) const;
- static QPoint pointOnCircle( const QRect& rect, double angle );
- static void makeArc( QPointArray& points,
- const QRect& rect,
+ static TQPoint pointOnCircle( const TQRect& rect, double angle );
+ static void makeArc( TQPointArray& points,
+ const TQRect& rect,
double startAngle, double angles );
const KDChartParams* params() const
@@ -183,24 +183,24 @@ class KDCHART_EXPORT KDChartPainter
return _params;
}
- QRect _outermostRect; /* The Outermost rect covers the complete
+ TQRect _outermostRect; /* The Outermost rect covers the complete
area of the painter. */
- QRect _innermostRect; /* The Innermost rect covers the area of
+ TQRect _innermostRect; /* The Innermost rect covers the area of
the painter MINUS the the global
left/top/right/bottom leading.
ALL following ones are INSIDE the Innermost.
*/
- QRect _dataRect;
+ TQRect _dataRect;
- QRect _axesRect; /* The Axes rect contains the Data rect. Up to 4
+ TQRect _axesRect; /* The Axes rect contains the Data rect. Up to 4
axes might be at the left and bottom as well
as at the right and/or at the to top of the
chart.
*/
- QRect _legendRect; /* The legend position depends on the parameter
+ TQRect _legendRect; /* The legend position depends on the parameter
settings. If it is not directly to the left or
to the right of the data display, it will be
below the headers and on top of the footers.
@@ -220,11 +220,11 @@ class KDCHART_EXPORT KDChartPainter
double _areaWidthP1000;
double _areaHeightP1000;
- QMap < int, QString > _legendTexts; // precomputed legend texts
+ TQMap < int, TQString > _legendTexts; // precomputed legend texts
internal__KDChart__CalcValues calcVal[ KDCHART_MAX_AXES ];
virtual bool calculateAllAxesLabelTextsAndCalcValues(
- QPainter* painter,
+ TQPainter* painter,
KDChartTableDataBase* data,
double areaWidthP1000,
double areaHeightP1000,
@@ -232,31 +232,31 @@ class KDCHART_EXPORT KDChartPainter
virtual void drawExtraLinesAndMarkers(
KDChartPropertySet& propSet,
- const QPen& defaultPen,
+ const TQPen& defaultPen,
const KDChartParams::LineMarkerStyle& defaultMarkerStyle,
int myPointX,
int myPointY,
- QPainter* painter,
+ TQPainter* painter,
const KDChartAxisParams* abscissaPara,
const KDChartAxisParams* ordinatePara,
const double areaWidthP1000,
const double areaHeightP1000,
bool bDrawInFront = FALSE );
- static KDChartDataRegion* drawMarker( QPainter* painter,
+ static KDChartDataRegion* drawMarker( TQPainter* painter,
const KDChartParams* params,
double areaWidthP1000,
double areaHeightP1000,
int deltaX,
int deltaY,
int style,
- const QColor& color,
- const QPoint& p,
+ const TQColor& color,
+ const TQPoint& p,
uint dataset, uint value, uint chart,
KDChartDataRegionList* regions = 0,
int* width = 0,
int* height = 0,
- uint align = Qt::AlignCenter );
+ uint align = TQt::AlignCenter );
private:
// disallow copy-construction and assignment
@@ -264,21 +264,21 @@ class KDCHART_EXPORT KDChartPainter
KDChartPainter& operator=( const KDChartPainter& );
- QMap < QString, KDChartPainter* > _customPainters;
+ TQMap < TQString, KDChartPainter* > _customPainters;
KDChartParams* _params;
- QRect trueFrameRect( const QRect& orgRect,
+ TQRect trueFrameRect( const TQRect& orgRect,
const KDChartParams::KDChartFrameSettings* settings ) const;
int legendTitleVertGap() const;
- QFont trueLegendTitleFont() const;
- QFont trueLegendFont() const;
- void calculateHorizontalLegendSize( QPainter* painter,
- QSize& size,
+ TQFont trueLegendTitleFont() const;
+ TQFont trueLegendFont() const;
+ void calculateHorizontalLegendSize( TQPainter* painter,
+ TQSize& size,
bool& legendNewLinesStartAtLeft ) const;
bool mustDrawVerticalLegend() const;
void findLegendTexts( KDChartTableDataBase* );
- int calculateHdFtRects( QPainter* painter,
+ int calculateHdFtRects( TQPainter* painter,
double averageValueP1000,
int xposLeft,
int xposRight,
diff --git a/libkdchart/KDChartParams.cpp b/libkdchart/KDChartParams.cpp
index 8673522..4c7bd87 100644
--- a/libkdchart/KDChartParams.cpp
+++ b/libkdchart/KDChartParams.cpp
@@ -39,7 +39,7 @@
class KDChartData;
-//#include <qdom.h>
+//#include <tqdom.h>
/**
\class KDChartParams KDChartParams.h
@@ -52,7 +52,7 @@ class KDChartData;
-//QColor KDChartParams::_internalPointer_DataValueAutoColor = QColor( 0,1,0 );
+//TQColor KDChartParams::_internalPointer_DataValueAutoColor = TQColor( 0,1,0 );
KDChartAutoColor* KDChartAutoColor::mInstance = NULL;
@@ -84,8 +84,8 @@ void KDChartAutoColor::freeInstance()
/*
-static QColor defaultColor;
-QT_STATIC_CONST_IMPL QColor & KDChartParams_AutoColor = defaultColor;
+static TQColor defaultColor;
+QT_STATIC_CONST_IMPL TQColor & KDChartParams_AutoColor = defaultColor;
*/
/**
@@ -114,7 +114,7 @@ KDChartParams::KDChartParams()
setAllowOverlappingDataValueTexts( false );
-#if COMPAT_QT_VERSION >= 0x030100
+#if COMPAT_TQT_VERSION >= 0x030100
setOptimizeOutputForScreen( false );
#else
setOptimizeOutputForScreen( true );
@@ -132,7 +132,7 @@ KDChartParams::KDChartParams()
// Default is to show all values.
setNumValues( static_cast<unsigned int>( -1 ) );
- _defaultFont = QFont( "helvetica", 8, QFont::Normal, false );
+ _defaultFont = TQFont( "helvetica", 8, TQFont::Normal, false );
// The default frame settings: no border, no corners, no background
_noFrame.clearAll();
@@ -162,8 +162,8 @@ KDChartParams::KDChartParams()
// END GENERAL
- setDataArea( QRect( QPoint(0,0), QSize(0,0)) );
- setLegendArea(QRect( QPoint(0,0), QSize(0,0)) );
+ setDataArea( TQRect( TQPoint(0,0), TQSize(0,0)) );
+ setLegendArea(TQRect( TQPoint(0,0), TQSize(0,0)) );
// BAR CHART-SPECIFIC
@@ -228,7 +228,7 @@ KDChartParams::KDChartParams()
setLineMarkerStyle( 0, LineMarkerCircle );
setLineMarkerStyle( 1, LineMarkerSquare );
setLineMarkerStyle( 2, LineMarkerDiamond );
- setLineMarkerSize( QSize( 6, 6 ) );
+ setLineMarkerSize( TQSize( 6, 6 ) );
// 3D line settings
setThreeDLines( false );
@@ -267,7 +267,7 @@ KDChartParams::KDChartParams()
setPolarMarkerStyle( 0, PolarMarkerCircle );
setPolarMarkerStyle( 1, PolarMarkerSquare );
setPolarMarkerStyle( 2, PolarMarkerDiamond );
- setPolarMarkerSize( QSize( -40,-40 ) );
+ setPolarMarkerSize( TQSize( -40,-40 ) );
// default circular axes delimiters
setPolarRotateCircularLabels( false );
@@ -332,14 +332,14 @@ KDChartParams::KDChartParams()
setBWChartFences(1.5, 1.5, 3.0, 3.0);
setBWChartOutValMarkerSize( -25 );
setBWChartPrintStatistics( BWStatValALL, false );
- setBWChartBrush( Qt::white );
+ setBWChartBrush( TQt::white );
// LEGEND
// Distance between legend and data.
setLegendSpacing( 20 );
// Position of the legend
setLegendPosition( LegendRight );
- // Orientation of the legend
+ // Qt::Orientation of the legend
setLegendOrientation( Qt::Vertical );
// Whether the legend shall show lines or just
// show the markers (or squares, resp.)
@@ -347,9 +347,9 @@ KDChartParams::KDChartParams()
// Where the legend labels come from
setLegendSource( LegendAutomatic );
// legend texts are drawn in black by default
- setLegendTextColor( Qt::black );
+ setLegendTextColor( TQt::black );
// legend font size is calculated dynamically, but ignore the font size
- setLegendFont( QFont( "helvetica", 10, QFont::Normal, false ), false );
+ setLegendFont( TQFont( "helvetica", 10, TQFont::Normal, false ), false );
// legend font size is calculated dynamically:
// 40 / 1000 of the minimal value of
// the printable area height and width
@@ -357,10 +357,10 @@ KDChartParams::KDChartParams()
// the default legend title is "Legend"
setLegendTitleText( tr( "Legend" ) );
// legend title is drawn in black by default
- setLegendTitleTextColor( Qt::black );
+ setLegendTitleTextColor( TQt::black );
// legend title font size is calculated dynamically, but ignore
// the font size
- setLegendTitleFont( QFont( "helvetica", 12, QFont::Normal, false ), false );
+ setLegendTitleFont( TQFont( "helvetica", 12, TQFont::Normal, false ), false );
// legend title font size is calculated dynamically:
// 50 / 1000 of the minimal value of
// the printable area height and width
@@ -381,7 +381,7 @@ KDChartParams::KDChartParams()
// Set a default font for all sections not taking the build-in
// defaults from c'tor KDChartParams::HdFtParams::HdFtParams()
- QFont defaultHdFtFont( "helvetica", 14, QFont::Normal, false );
+ TQFont defaultHdFtFont( "helvetica", 14, TQFont::Normal, false );
int relHd0Size = 15;
int relHdSize = 22;
int relHd2Size = 19;
@@ -438,11 +438,11 @@ KDChartParams::KDChartParams()
setProperties(KDCHART_PROPSET_TRANSPARENT_DATA, *tempPropSetA);
// don't show line nor marker, but do show the horizontal line
tempPropSetA->setName("horizontal line");
- tempPropSetA->setExtraLinesAlign( KDChartPropertySet::OwnID, Qt::AlignLeft | Qt::AlignRight );
+ tempPropSetA->setExtraLinesAlign( KDChartPropertySet::OwnID, TQt::AlignLeft | TQt::AlignRight );
setProperties(KDCHART_PROPSET_HORI_LINE, *tempPropSetA);
// don't show line nor marker, but do show the vertical line
tempPropSetA->setName("vertical line");
- tempPropSetA->setExtraLinesAlign( KDChartPropertySet::OwnID, Qt::AlignTop | Qt::AlignBottom );
+ tempPropSetA->setExtraLinesAlign( KDChartPropertySet::OwnID, TQt::AlignTop | TQt::AlignBottom );
setProperties(KDCHART_PROPSET_VERT_LINE, *tempPropSetA);
// END PROPERTY SETS
}
@@ -518,7 +518,7 @@ void KDChartParams::setProperties( int id, KDChartPropertySet& rSet )
{
_propertySetList.setAutoDelete( true );
rSet.mOwnID = id;
- _propertySetList.replace( rSet.mOwnID, rSet.clone() );
+ _propertySetList.tqreplace( rSet.mOwnID, rSet.clone() );
}
/**
@@ -568,7 +568,7 @@ bool KDChartParams::removeProperties( int id )
*/
bool KDChartParams::properties( int id, KDChartPropertySet& rSet ) const
{
- const KDChartPropertySet* R = _propertySetList.find( id );
+ const KDChartPropertySet* R = _propertySetList.tqfind( id );
const bool bFound = (0 != R);
if( bFound )
rSet.deepCopy( R );
@@ -600,7 +600,7 @@ bool KDChartParams::properties( int id, KDChartPropertySet& rSet ) const
*/
KDChartPropertySet* KDChartParams::properties( int id )
{
- return _propertySetList.find( id );
+ return _propertySetList.tqfind( id );
}
@@ -635,26 +635,26 @@ bool KDChartParams::calculateProperties( int startId, KDChartPropertySet& rSet )
bool bOk = properties(startId, startSet);
if( bOk ){
int lineWidth;
- QColor lineColor;
+ TQColor lineColor;
Qt::PenStyle lineStyle;
bool showMarker;
uint markerAlign;
- QSize markerSize;
- QColor markerColor;
+ TQSize markerSize;
+ TQColor markerColor;
int markerStyle;
uint extraLinesAlign;
bool extraLinesInFront;
int extraLinesLength;
int extraLinesWidth;
- QColor extraLinesColor;
+ TQColor extraLinesColor;
Qt::PenStyle extraLinesStyle;
uint extraMarkersAlign;
- QSize extraMarkersSize;
- QColor extraMarkersColor;
+ TQSize extraMarkersSize;
+ TQColor extraMarkersColor;
int extraMarkersStyle;
bool showBar;
- QColor barColor;
- QBrush areaBrush;
+ TQColor barColor;
+ TQBrush areaBrush;
// c'tor sets all IDs to unknown by default
KDChartPropertySet& propSet = *tempPropSetB;
propSet.quickReset("");
@@ -707,7 +707,7 @@ bool KDChartParams::calculateProperties( int startId, KDChartPropertySet& rSet )
break;
++i;
}while( properties(id, propSet) );
- // retrieve marker alignment
+ // retrieve marker tqalignment
propSet.deepCopy( &startSet ); i=0;
do{
if( propSet.hasOwnMarkerAlign( id, markerAlign ) ){
@@ -750,7 +750,7 @@ bool KDChartParams::calculateProperties( int startId, KDChartPropertySet& rSet )
// extra lines:
- // retrieve alignment of extra lines
+ // retrieve tqalignment of extra lines
propSet.deepCopy( &startSet ); i=0;
do{
if( propSet.hasOwnExtraLinesAlign( id, extraLinesAlign ) ){
@@ -813,7 +813,7 @@ bool KDChartParams::calculateProperties( int startId, KDChartPropertySet& rSet )
// markers at the ends of the extra lines:
- // retrieve marker alignment
+ // retrieve marker tqalignment
propSet.deepCopy( &startSet ); i=0;
do{
if( propSet.hasOwnExtraMarkersAlign( id, extraMarkersAlign ) ){
@@ -930,7 +930,7 @@ bool KDChartParams::calculateProperties( int startId, KDChartPropertySet& rSet )
Calling setPrintDataValuesWithDefaultFontParams( chart ) will
<b>reset</b> the respective font size and colour and position
- parameters (but not the QFont itself) and <b>activate</b> printing
+ parameters (but not the TQFont itself) and <b>activate</b> printing
of the values for the \c chart speficied (or for all charts by
using \c KDCHART_ALL_CHARTS, resp.).
@@ -964,7 +964,7 @@ bool KDChartParams::calculateProperties( int startId, KDChartPropertySet& rSet )
\param color the color to be used when printing the values.
To have the color calculated automatically - useful when printing
inside the bars (or pie slices, areas, ... resp.) - please use
- \c KDCHART_DATA_VALUE_AUTO_COLOR instead of a QColor*.
+ \c KDCHART_DATA_VALUE_AUTO_COLOR instead of a TQColor*.
You may use setPrintDataValuesColor to change this parameter setting
without affecting the other ones.
@@ -973,10 +973,10 @@ bool KDChartParams::calculateProperties( int startId, KDChartPropertySet& rSet )
\param negativePosition The anchor position which the text is to be
aligned to.
\param negativeAlign The way how the text is to be aligned to the anchor.
-This must be a reasonable combination of Qt::AlignmentFlags.
+This must be a reasonable combination of TQt::AlignmentFlags.
\param negativeDeltaX The X distance between the <b>anchor
point</b> -- specified by \c negativePosition (or \c
- positivePosition, resp.) -- and the internal <b>alignment point</b>
+ positivePosition, resp.) -- and the internal <b>tqalignment point</b>
of the text -- specified by \c negativeAlign (or \c positiveAlign,
resp.). <b>Note: </b> For better compatibility to the dynamic font
size this parameter is interpreted as being a per-cent value of the
@@ -987,7 +987,7 @@ size of the chart and the specification made via parameter \c size.
\param negativeDeltaY The Y distance between the <b>anchor
point</b> -- specified by \c negativePosition (or \c
- positivePosition, resp.) -- and the internal <b>alignment point</b>
+ positivePosition, resp.) -- and the internal <b>tqalignment point</b>
of the text -- specified by \c negativeAlign (or \c positiveAlign,
resp.). <b>Note: </b> For better compatibility to the dynamic font
size this parameter is interpreted as being a per-cent value of the
@@ -1002,7 +1002,7 @@ special values that you might find usefull for Pie charts or for
Ring charts: \c KDCHART_SAGGITAL_ROTATION and \c
KDCHART_TANGENTIAL_ROTATION both leading to individual
calculation of appropriate rotation for each data value. Rotation
-will be performed around the internal <b>alignment point</b> of the
+will be performed around the internal <b>tqalignment point</b> of the
text -- specified by \c negativeAlign (or \c positiveAlign, resp.).
The following parameters apply to values greater than zero or equal zero:
@@ -1010,10 +1010,10 @@ The following parameters apply to values greater than zero or equal zero:
\param positivePosition The anchor position which the text is to be
aligned to.
\param positiveAlign The way how the text is to be aligned to the anchor.
-This must be a reasonable combination of Qt::AlignmentFlags.
+This must be a reasonable combination of TQt::AlignmentFlags.
\param negativeDeltaX The X distance between the <b>anchor
point</b> -- specified by \c negativePosition (or \c
- positivePosition, resp.) -- and the internal <b>alignment point</b>
+ positivePosition, resp.) -- and the internal <b>tqalignment point</b>
of the text -- specified by \c negativeAlign (or \c positiveAlign,
resp.). <b>Note: </b> For better compatibility to the dynamic font
size this parameter is interpreted as being a per-cent value of the
@@ -1023,7 +1023,7 @@ delta value are calculated dynamically before painting based on the
size of the chart and the specification made via parameter \c size.
\param positiveDeltaY The Y distance between the <b>anchor
point</b> -- specified by \c negativePosition (or \c
- positivePosition, resp.) -- and the internal <b>alignment point</b>
+ positivePosition, resp.) -- and the internal <b>tqalignment point</b>
of the text -- specified by \c negativeAlign (or \c positiveAlign,
resp.). <b>Note: </b> For better compatibility to the dynamic font
size this parameter is interpreted as being a per-cent value of the
@@ -1038,10 +1038,10 @@ special values that you might find usefull for Pie charts or for
Ring charts: \c KDCHART_SAGGITAL_ROTATION and \c
KDCHART_TANGENTIAL_ROTATION both leading to individual
calculation of appropriate rotation for each data value. Rotation
-will be performed around the internal <b>alignment point</b> of the
+will be performed around the internal <b>tqalignment point</b> of the
text -- specified by \c negativeAlign (or \c positiveAlign, resp.).
-\param layoutPolicy The way to handle too narrow space conflicts:
+\param tqlayoutPolicy The way to handle too narrow space conflicts:
what to do if a data text covers a neighboring data text (or a
neighboring data area, resp.).
@@ -1064,9 +1064,9 @@ void KDChartParams::setPrintDataValues( bool active,
uint chart,
int divPow10,
int digitsBehindComma,
- QFont* font,
+ TQFont* font,
uint size,
- const QColor* color,
+ const TQColor* color,
KDChartEnums::PositionFlag negativePosition,
uint negativeAlign,
int negativeDeltaX,
@@ -1103,21 +1103,21 @@ void KDChartParams::setPrintDataValues( bool active,
if ( font )
settings->_dataValuesFont = *font;
else
- settings->_dataValuesFont = QFont( "times", 1, QFont::Bold );
+ settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
settings->_dataValuesUseFontRelSize = true;
settings->_dataValuesFontRelSize = 16;
settings->_dataValuesAutoColor = false; // !!!
- settings->_dataValuesColor = QColor( Qt::darkBlue );
- settings->_dataValuesBrush = QBrush( Qt::NoBrush );
+ settings->_dataValuesColor = TQColor( TQt::darkBlue );
+ settings->_dataValuesBrush = TQBrush( TQt::NoBrush );
// for values below zero:
settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosBottomRight;
- settings->_dataValuesAnchorNegativeAlign = Qt::AlignBottom + Qt::AlignRight;
+ settings->_dataValuesAnchorNegativeAlign = TQt::AlignBottom + TQt::AlignRight;
settings->_dataValuesAnchorNegativeDeltaX = 20;
settings->_dataValuesAnchorNegativeDeltaY = 55;
settings->_dataValuesNegativeRotation = 300;
// for values greater/equal zero:
settings->_dataValuesAnchorPositivePosition = KDChartEnums::PosTopLeft;
- settings->_dataValuesAnchorPositiveAlign = Qt::AlignTop + Qt::AlignLeft;
+ settings->_dataValuesAnchorPositiveAlign = TQt::AlignTop + TQt::AlignLeft;
settings->_dataValuesAnchorPositiveDeltaX = - 20;
settings->_dataValuesAnchorPositiveDeltaY = - 65;
settings->_dataValuesPositiveRotation = 300;
@@ -1129,21 +1129,21 @@ void KDChartParams::setPrintDataValues( bool active,
if ( font )
settings->_dataValuesFont = *font;
else
- settings->_dataValuesFont = QFont( "times", 1, QFont::Normal );
+ settings->_dataValuesFont = TQFont( "times", 1, TQFont::Normal );
settings->_dataValuesUseFontRelSize = true;
settings->_dataValuesFontRelSize = 16;
settings->_dataValuesAutoColor = false; // !!!
- settings->_dataValuesColor = QColor( Qt::darkBlue );
- settings->_dataValuesBrush = QBrush( Qt::NoBrush );
+ settings->_dataValuesColor = TQColor( TQt::darkBlue );
+ settings->_dataValuesBrush = TQBrush( TQt::NoBrush );
// for values below zero:
settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosBottomCenter;
- settings->_dataValuesAnchorNegativeAlign = Qt::AlignTop + Qt::AlignHCenter;
+ settings->_dataValuesAnchorNegativeAlign = TQt::AlignTop + TQt::AlignHCenter;
settings->_dataValuesAnchorNegativeDeltaX = 0;
settings->_dataValuesAnchorNegativeDeltaY = 0;
settings->_dataValuesNegativeRotation = 0;
// for values greater/equal zero:
settings->_dataValuesAnchorPositivePosition = KDChartEnums::PosTopCenter;
- settings->_dataValuesAnchorPositiveAlign = Qt::AlignBottom + Qt::AlignHCenter;
+ settings->_dataValuesAnchorPositiveAlign = TQt::AlignBottom + TQt::AlignHCenter;
settings->_dataValuesAnchorPositiveDeltaX = 0;
settings->_dataValuesAnchorPositiveDeltaY = 0;
settings->_dataValuesPositiveRotation = 0;
@@ -1155,25 +1155,25 @@ void KDChartParams::setPrintDataValues( bool active,
if ( font )
settings->_dataValuesFont = *font;
else
- settings->_dataValuesFont = QFont( "times", 1, QFont::Bold );
+ settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
settings->_dataValuesUseFontRelSize = true;
settings->_dataValuesFontRelSize = 21;
settings->_dataValuesAutoColor = true; // !!!
- settings->_dataValuesColor = QColor( Qt::black );
- settings->_dataValuesBrush = QBrush( Qt::white );
+ settings->_dataValuesColor = TQColor( TQt::black );
+ settings->_dataValuesBrush = TQBrush( TQt::white );
bool bShowOutside = areaChartSubType() == AreaNormal;
// for values below zero:
settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosBottomCenter;
- settings->_dataValuesAnchorNegativeAlign = Qt::AlignHCenter
- + (bShowOutside ? Qt::AlignTop : Qt::AlignBottom);
+ settings->_dataValuesAnchorNegativeAlign = TQt::AlignHCenter
+ + (bShowOutside ? TQt::AlignTop : TQt::AlignBottom);
settings->_dataValuesAnchorNegativeDeltaX = 0;
settings->_dataValuesAnchorNegativeDeltaY = bShowOutside ? 20 : -35;
settings->_dataValuesNegativeRotation = 0;
// for values greater/equal zero:
settings->_dataValuesAnchorPositivePosition = KDChartEnums::PosTopCenter;
- settings->_dataValuesAnchorPositiveAlign = Qt::AlignHCenter
- + (bShowOutside ? Qt::AlignBottom : Qt::AlignTop);
+ settings->_dataValuesAnchorPositiveAlign = TQt::AlignHCenter
+ + (bShowOutside ? TQt::AlignBottom : TQt::AlignTop);
settings->_dataValuesAnchorPositiveDeltaX = 0;
settings->_dataValuesAnchorPositiveDeltaY = bShowOutside ? -20 : 35;
settings->_dataValuesPositiveRotation = 0;
@@ -1191,21 +1191,21 @@ void KDChartParams::setPrintDataValues( bool active,
if ( font )
settings->_dataValuesFont = *font;
else
- settings->_dataValuesFont = QFont( "times", 1, QFont::Bold );
+ settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
settings->_dataValuesUseFontRelSize = true;
settings->_dataValuesFontRelSize = 25;
settings->_dataValuesAutoColor = true; // !!!
- settings->_dataValuesColor = QColor( Qt::black );
- settings->_dataValuesBrush = QBrush( Qt::NoBrush );
+ settings->_dataValuesColor = TQColor( TQt::black );
+ settings->_dataValuesBrush = TQBrush( TQt::NoBrush );
// for values below zero:
settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosTopCenter;
- settings->_dataValuesAnchorNegativeAlign = Qt::AlignTop + Qt::AlignHCenter;
+ settings->_dataValuesAnchorNegativeAlign = TQt::AlignTop + TQt::AlignHCenter;
settings->_dataValuesAnchorNegativeDeltaX = 0;
settings->_dataValuesAnchorNegativeDeltaY = 50;
settings->_dataValuesNegativeRotation = KDCHART_TANGENTIAL_ROTATION;
// for values greater/equal zero:
settings->_dataValuesAnchorPositivePosition = KDChartEnums::PosTopCenter;
- settings->_dataValuesAnchorPositiveAlign = Qt::AlignTop + Qt::AlignHCenter;
+ settings->_dataValuesAnchorPositiveAlign = TQt::AlignTop + TQt::AlignHCenter;
settings->_dataValuesAnchorPositiveDeltaX = 0;
settings->_dataValuesAnchorPositiveDeltaY = 50;
settings->_dataValuesPositiveRotation = KDCHART_TANGENTIAL_ROTATION;
@@ -1217,21 +1217,21 @@ void KDChartParams::setPrintDataValues( bool active,
if ( font )
settings->_dataValuesFont = *font;
else
- settings->_dataValuesFont = QFont( "times", 1, QFont::Bold );
+ settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
settings->_dataValuesUseFontRelSize = true;
settings->_dataValuesFontRelSize = 25;
settings->_dataValuesAutoColor = true; // !!!
- settings->_dataValuesColor = QColor( Qt::black );
- settings->_dataValuesBrush = QBrush( Qt::NoBrush );
+ settings->_dataValuesColor = TQColor( TQt::black );
+ settings->_dataValuesBrush = TQBrush( TQt::NoBrush );
// for values below zero:
settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosCenter;
- settings->_dataValuesAnchorNegativeAlign = Qt::AlignCenter;
+ settings->_dataValuesAnchorNegativeAlign = TQt::AlignCenter;
settings->_dataValuesAnchorNegativeDeltaX = 0;
settings->_dataValuesAnchorNegativeDeltaY = 10;
settings->_dataValuesNegativeRotation = KDCHART_TANGENTIAL_ROTATION;
// for values greater/equal zero:
settings->_dataValuesAnchorPositivePosition = KDChartEnums::PosCenter;
- settings->_dataValuesAnchorPositiveAlign = Qt::AlignCenter;
+ settings->_dataValuesAnchorPositiveAlign = TQt::AlignCenter;
settings->_dataValuesAnchorPositiveDeltaX = 0;
settings->_dataValuesAnchorPositiveDeltaY = 10;
settings->_dataValuesPositiveRotation = KDCHART_TANGENTIAL_ROTATION;
@@ -1245,22 +1245,22 @@ void KDChartParams::setPrintDataValues( bool active,
if ( font )
settings->_dataValuesFont = *font;
else
- settings->_dataValuesFont = QFont( "times", 1, QFont::Bold );
+ settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
settings->_dataValuesUseFontRelSize = true;
settings->_dataValuesFontRelSize = 26;
settings->_dataValuesAutoColor = polarMarker(); // !!!
- settings->_dataValuesColor = QColor( Qt::black );
- settings->_dataValuesBrush = QBrush( Qt::NoBrush );
+ settings->_dataValuesColor = TQColor( TQt::black );
+ settings->_dataValuesBrush = TQBrush( TQt::NoBrush );
// for values below zero:
settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosCenter;
- settings->_dataValuesAnchorNegativeAlign = Qt::AlignCenter;
+ settings->_dataValuesAnchorNegativeAlign = TQt::AlignCenter;
settings->_dataValuesAnchorNegativeDeltaX = 0;
settings->_dataValuesAnchorNegativeDeltaY = 0;
settings->_dataValuesNegativeRotation = 0;
// for values greater/equal zero:
settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosCenter;
- settings->_dataValuesAnchorNegativeAlign = Qt::AlignCenter;
+ settings->_dataValuesAnchorNegativeAlign = TQt::AlignCenter;
settings->_dataValuesAnchorNegativeDeltaX = 0;
settings->_dataValuesAnchorNegativeDeltaY = 0;
settings->_dataValuesNegativeRotation = 0;
@@ -1284,7 +1284,7 @@ void KDChartParams::setPrintDataValues( bool active,
if ( font )
settings->_dataValuesFont = *font;
else
- settings->_dataValuesFont = QFont( "times", 1, QFont::Bold );
+ settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
uint theSize( UINT_MAX == size ? 14 : size );
settings->_dataValuesUseFontRelSize = ( 0 < theSize );
@@ -1292,17 +1292,17 @@ void KDChartParams::setPrintDataValues( bool active,
if ( KDCHART_DATA_VALUE_AUTO_COLOR == color
&& ( Polar != cType || polarMarker() ) ) {
settings->_dataValuesAutoColor = true; // !!!
- settings->_dataValuesColor = QColor( Qt::black );
+ settings->_dataValuesColor = TQColor( TQt::black );
}
else {
settings->_dataValuesAutoColor = false;
if ( 0 == color )
settings->_dataValuesColor
- = QColor( i ? Qt::darkBlue : Qt::black );
+ = TQColor( i ? TQt::darkBlue : TQt::black );
else
settings->_dataValuesColor = *color;
}
- settings->_dataValuesBrush = Qt::NoBrush;
+ settings->_dataValuesBrush = TQBrush(Qt::NoBrush);
// for values below zero:
settings->_dataValuesAnchorNegativePosition = negativePosition;
settings->_dataValuesAnchorNegativeAlign = negativeAlign;
@@ -1449,7 +1449,7 @@ void KDChartParams::setChartSourceMode( SourceMode mode,
uint last = ( KDCHART_NO_DATASET == dataset2 ) ? dataset : dataset2;
for ( i = dataset; i <= last; ++i )
_dataSourceModeAndChart[ i ] = ModeAndChart( mode, chart );
- _maxDatasetSourceMode = QMAX( _maxDatasetSourceMode, --i );
+ _maxDatasetSourceMode = TQMAX( _maxDatasetSourceMode, --i );
_setChartSourceModeWasUsed = true;
} else if ( UnknownMode == mode && dataset == KDCHART_ALL_DATASETS ) {
_dataSourceModeAndChart.clear();
@@ -1514,7 +1514,7 @@ KDChartParams::SourceMode KDChartParams::chartSourceMode( uint dataset,
bool bStart = true;
ModeAndChartMap::ConstIterator it;
- for( it = _dataSourceModeAndChart.find( a );
+ for( it = _dataSourceModeAndChart.tqfind( a );
( it != _dataSourceModeAndChart.end() ) && ( it.key() <= b );
++it ){
if ( bStart ) {
@@ -1656,9 +1656,9 @@ bool KDChartParams::findDatasets( SourceMode modeA,
res = true;
}else{
if( foundA && foundB ){
- if( QMIN(dsA2, dsB2) + 1 == QMAX(dsA1, dsB1) ){
- dataset = QMIN(dsA1, dsB1);
- dataset2 = QMAX(dsA2, dsB2);
+ if( TQMIN(dsA2, dsB2) + 1 == TQMAX(dsA1, dsB1) ){
+ dataset = TQMIN(dsA1, dsB1);
+ dataset2 = TQMAX(dsA2, dsB2);
res = true;
}else{
qDebug("ERROR in KDChartParams::findDatasets(): Datasets found are *not* a contiguous series.");
@@ -1679,7 +1679,7 @@ bool KDChartParams::findDatasets( SourceMode modeA,
dataset but not for a dataset with a lower number (and there is neither
a default value), the color for that dataset with the lower number will
be undefined. If you do not want any color, pass an invalid color
- (i.e. a default-constructed QColor object). This is only useful
+ (i.e. a default-constructed TQColor object). This is only useful
for chart types that have an outline (like bars or pies),
because you would not see anything otherwise.<br>
In charts that can only display one dataset (like pies), the specified
@@ -1691,15 +1691,15 @@ bool KDChartParams::findDatasets( SourceMode modeA,
\sa setDataDefaultColors, setDataRainbowColors, setDataSubduedColors
\sa dataColor, maxDataColor
*/
-void KDChartParams::setDataColor( uint dataset, QColor color )
+void KDChartParams::setDataColor( uint dataset, TQColor color )
{
- QColor shadow1;
- QColor shadow2;
+ TQColor shadow1;
+ TQColor shadow2;
calculateShadowColors( color, shadow1, shadow2 );
_dataColors[ dataset ] = color;
_dataColorsShadow1[ dataset ] = shadow1;
_dataColorsShadow2[ dataset ] = shadow2;
- _maxDatasetColor = QMAX( _maxDatasetColor, dataset );
+ _maxDatasetColor = TQMAX( _maxDatasetColor, dataset );
emit changed();
}
@@ -1741,14 +1741,14 @@ void KDChartParams::setDataDefaultColors()
*/
void KDChartParams::setDataRainbowColors()
{
- setDataColor( 0, QColor(255, 0,196) );
- setDataColor( 1, QColor(255, 0, 96) );
- setDataColor( 2, QColor(255, 128,64) );
- setDataColor( 3, Qt::yellow );
- setDataColor( 4, Qt::green );
- setDataColor( 5, Qt::cyan );
- setDataColor( 6, QColor( 96, 96,255) );
- setDataColor( 7, QColor(160, 0,255) );
+ setDataColor( 0, TQColor(255, 0,196) );
+ setDataColor( 1, TQColor(255, 0, 96) );
+ setDataColor( 2, TQColor(255, 128,64) );
+ setDataColor( 3, TQt::yellow );
+ setDataColor( 4, TQt::green );
+ setDataColor( 5, TQt::cyan );
+ setDataColor( 6, TQColor( 96, 96,255) );
+ setDataColor( 7, TQColor(160, 0,255) );
for( int i=8; i<16; ++i )
setDataColor( i, dataColor(i-8).light() );
}
@@ -1772,25 +1772,25 @@ void KDChartParams::setDataRainbowColors()
void KDChartParams::setDataSubduedColors( bool ordered )
{
static const int NUM_SUBDUEDCOLORS = 18;
-static const QColor SUBDUEDCOLORS[ NUM_SUBDUEDCOLORS ] = {
- QColor( 0xe0,0x7f,0x70 ),
- QColor( 0xe2,0xa5,0x6f ),
- QColor( 0xe0,0xc9,0x70 ),
- QColor( 0xd1,0xe0,0x70 ),
- QColor( 0xac,0xe0,0x70 ),
- QColor( 0x86,0xe0,0x70 ),
- QColor( 0x70,0xe0,0x7f ),
- QColor( 0x70,0xe0,0xa4 ),
- QColor( 0x70,0xe0,0xc9 ),
- QColor( 0x70,0xd1,0xe0 ),
- QColor( 0x70,0xac,0xe0 ),
- QColor( 0x70,0x86,0xe0 ),
- QColor( 0x7f,0x70,0xe0 ),
- QColor( 0xa4,0x70,0xe0 ),
- QColor( 0xc9,0x70,0xe0 ),
- QColor( 0xe0,0x70,0xd1 ),
- QColor( 0xe0,0x70,0xac ),
- QColor( 0xe0,0x70,0x86 ),
+static const TQColor SUBDUEDCOLORS[ NUM_SUBDUEDCOLORS ] = {
+ TQColor( 0xe0,0x7f,0x70 ),
+ TQColor( 0xe2,0xa5,0x6f ),
+ TQColor( 0xe0,0xc9,0x70 ),
+ TQColor( 0xd1,0xe0,0x70 ),
+ TQColor( 0xac,0xe0,0x70 ),
+ TQColor( 0x86,0xe0,0x70 ),
+ TQColor( 0x70,0xe0,0x7f ),
+ TQColor( 0x70,0xe0,0xa4 ),
+ TQColor( 0x70,0xe0,0xc9 ),
+ TQColor( 0x70,0xd1,0xe0 ),
+ TQColor( 0x70,0xac,0xe0 ),
+ TQColor( 0x70,0x86,0xe0 ),
+ TQColor( 0x7f,0x70,0xe0 ),
+ TQColor( 0xa4,0x70,0xe0 ),
+ TQColor( 0xc9,0x70,0xe0 ),
+ TQColor( 0xe0,0x70,0xd1 ),
+ TQColor( 0xe0,0x70,0xac ),
+ TQColor( 0xe0,0x70,0x86 ),
};
if( ordered )
for(int i=0; i<NUM_SUBDUEDCOLORS; ++i)
@@ -1818,13 +1818,13 @@ static const QColor SUBDUEDCOLORS[ NUM_SUBDUEDCOLORS ] = {
}
-void KDChartParams::calculateShadowColors( QColor color,
- QColor& shadow1,
- QColor& shadow2 ) const
+void KDChartParams::calculateShadowColors( TQColor color,
+ TQColor& shadow1,
+ TQColor& shadow2 ) const
{
if ( !color.isValid() ) { // no fill color
- shadow1 = QColor();
- shadow2 = QColor();
+ shadow1 = TQColor();
+ shadow2 = TQColor();
} else {
int hue, saturation, value;
color.hsv( &hue, &saturation, &value );
@@ -1857,25 +1857,25 @@ void KDChartParams::calculateShadowColors( QColor color,
\return the color for this dataset
\sa setDataColor, maxDataColor
*/
-QColor KDChartParams::dataColor( uint dataset ) const
+TQColor KDChartParams::dataColor( uint dataset ) const
{
uint index = dataset % (_maxDatasetColor+1);
- if( _dataColors.find( index ) != _dataColors.end() )
+ if( _dataColors.tqfind( index ) != _dataColors.end() )
return _dataColors[ index ];
else
- return QColor(); // documentation says undefined
+ return TQColor(); // documentation says undefined
}
-QString KDChartParams::dataRegionFrameAreaName( uint dataRow,
+TQString KDChartParams::dataRegionFrameAreaName( uint dataRow,
uint dataCol,
uint data3rd )
{
- return QString( "%1/%2/%3/%4" )
- .arg( KDChartEnums::AreaChartDataRegion, 5 )
- .arg( dataRow, 5 )
- .arg( dataCol, 5 )
- .arg( data3rd, 5 );
+ return TQString( "%1/%2/%3/%4" )
+ .tqarg( KDChartEnums::AreaChartDataRegion, 5 )
+ .tqarg( dataRow, 5 )
+ .tqarg( dataCol, 5 )
+ .tqarg( data3rd, 5 );
}
@@ -1890,7 +1890,7 @@ void KDChartParams::recomputeShadowColors()
{
// Simply reassign the available colors; this will trigger
// recomputation of the shadow colors.
- for( QMap<uint,QColor>::Iterator it = _dataColors.begin();
+ for( TQMap<uint,TQColor>::Iterator it = _dataColors.begin();
it != _dataColors.end(); ++it ) {
setDataColor( it.key(), it.data() );
}
@@ -1912,19 +1912,19 @@ void KDChartParams::recomputeShadowColors()
\return the color for this dataset
\sa setDataColor, maxDataColor, dataShadow2Color
*/
-QColor KDChartParams::dataShadow1Color( uint dataset ) const
+TQColor KDChartParams::dataShadow1Color( uint dataset ) const
{
uint index = dataset % _maxDatasetColor;
if ( _threeDShadowColors )
- if( _dataColorsShadow1.find( index ) != _dataColorsShadow1.end() )
+ if( _dataColorsShadow1.tqfind( index ) != _dataColorsShadow1.end() )
return _dataColorsShadow1[ index ];
else
- return QColor(); // documentation says undefined
+ return TQColor(); // documentation says undefined
else
- if( _dataColors.find( index ) != _dataColors.end() )
+ if( _dataColors.tqfind( index ) != _dataColors.end() )
return _dataColors[ index ];
else
- return QColor(); // documentation says undefined
+ return TQColor(); // documentation says undefined
}
@@ -1941,19 +1941,19 @@ QColor KDChartParams::dataShadow1Color( uint dataset ) const
\return the color for this dataset
\sa setDataColor, maxDataColor, dataShadow1Color
*/
-QColor KDChartParams::dataShadow2Color( uint dataset ) const
+TQColor KDChartParams::dataShadow2Color( uint dataset ) const
{
uint index = dataset % _maxDatasetColor;
if ( _threeDShadowColors )
- if( _dataColorsShadow2.find( index ) != _dataColorsShadow2.end() )
+ if( _dataColorsShadow2.tqfind( index ) != _dataColorsShadow2.end() )
return _dataColorsShadow2[ index ];
else
- return QColor(); // documentation says undefined
+ return TQColor(); // documentation says undefined
else
- if( _dataColors.find( index ) != _dataColors.end() )
+ if( _dataColors.tqfind( index ) != _dataColors.end() )
return _dataColors[ index ];
else
- return QColor(); // documentation says undefined
+ return TQColor(); // documentation says undefined
}
@@ -2159,14 +2159,14 @@ void KDChartParams::setDefaultAxesTypes()
KDChartAxisParams::AxisTypeNORTH );
setAxisLabelsVisible( KDChartAxisParams::AxisPosSaggital, true );
setAxisLabelsFont( KDChartAxisParams::AxisPosSaggital,
- QFont( "helvetica", 1, QFont::Bold ),
+ TQFont( "helvetica", 1, TQFont::Bold ),
-30,
- Qt::darkBlue );
+ TQt::darkBlue );
setAxisLabelsVisible( KDChartAxisParams::AxisPosCircular, true );
setAxisLabelsFont( KDChartAxisParams::AxisPosCircular,
- QFont( "helvetica", 1, QFont::Bold ),
+ TQFont( "helvetica", 1, TQFont::Bold ),
-22,
- Qt::darkBlue );
+ TQt::darkBlue );
setPolarRotateCircularLabels( false );
break;
default: {
@@ -2262,7 +2262,7 @@ void KDChartParams::activateDefaultAxes()
best quality when using a printer.
\note The default of this flag is TRUE, so make sure to deactivate
- it before painting your KDChart onto a QPrinter device!
+ it before painting your KDChart onto a TQPrinter device!
\note This setting is NOT stored together with the other parameters,
it is recommended to set the flag each time when the drawing targed
@@ -2453,8 +2453,8 @@ void KDChartParams::setGlobalLeading( int left, int top, int right, int bottom )
/**
\fn void KDChartParams::setSimpleFrame( uint, int, int, int, int,
- bool, bool, KDFrame::SimpleFrame, int, int, QPen, QBrush, const
- QPixmap*, KDFrame::BackPixmapMode, int, KDFrame::CornerName )
+ bool, bool, KDFrame::SimpleFrame, int, int, TQPen, TQBrush, const
+ TQPixmap*, KDFrame::BackPixmapMode, int, KDFrame::CornerName )
Select a pre-defined frame setting to be used for one of the chart areas.
@@ -2504,8 +2504,8 @@ void KDChartParams::setGlobalLeading( int left, int top, int right, int bottom )
/**
\fn void KDChartParams::setDataRegionFrame( uint, uint, uint, int, int, int, int,
- bool, bool, KDFrame::SimpleFrame, int, int, QPen, QBrush, const
- QPixmap*, KDFrame::BackPixmapMode, int, KDFrame::CornerName )
+ bool, bool, KDFrame::SimpleFrame, int, int, TQPen, TQBrush, const
+ TQPixmap*, KDFrame::BackPixmapMode, int, KDFrame::CornerName )
Select a pre-defined frame setting to be used for one of the data representations
(e.g. to have the frame surrounding one of the bars in a Bar chart).
@@ -2571,8 +2571,8 @@ bool KDChartParams::moveDataRegionFrame( uint oldDataRow,
uint// important: we ignore the data3rd parameter for now!
)
{
- const QString oldKey( dataRegionFrameAreaName( oldDataRow, oldDataCol, 0 ) ); // oldData3rd ) );
- KDChartFrameSettings* it = _areaDict.find( oldKey );
+ const TQString oldKey( dataRegionFrameAreaName( oldDataRow, oldDataCol, 0 ) ); // oldData3rd ) );
+ KDChartFrameSettings* it = _areaDict.tqfind( oldKey );
bool bFound = ( it != 0 );
if( bFound ){
if( KDCHART_NO_DATASET != newDataRow ){
@@ -2582,7 +2582,7 @@ bool KDChartParams::moveDataRegionFrame( uint oldDataRow,
frame->setDataCol( newDataCol );
frame->setData3rd( 0 ); // newData3rd );
_areaDict.setAutoDelete( TRUE );
- _areaDict.replace(
+ _areaDict.tqreplace(
dataRegionFrameAreaName( newDataRow, newDataCol, 0 ), //data3rd 5 ),
frame );
}
@@ -2609,14 +2609,14 @@ const KDChartParams::KDChartFrameSettings* KDChartParams::frameSettings( uint ar
{
if( pIterIdx )
*pIterIdx = 0;
- const QString key( QString( "%1/-----/-----/-----" ).arg( area, 5 ) );
- KDChartFrameSettings* it = _areaDict.find( key );
+ const TQString key( TQString( "%1/-----/-----/-----" ).tqarg( area, 5 ) );
+ KDChartFrameSettings* it = _areaDict.tqfind( key );
bFound = ( it != 0 );
if( bFound )
return it;
else if( pIterIdx ){
- QString keyStart( key.left(6) );
- QDictIterator<KDChartFrameSettings> it2( _areaDict );
+ TQString keyStart( key.left(6) );
+ TQDictIterator<KDChartFrameSettings> it2( _areaDict );
for( ; it2.current(); ++it2 ){
if( it2.currentKey().startsWith( keyStart ) ){
bFound = true;
@@ -2643,7 +2643,7 @@ const KDChartParams::KDChartFrameSettings* KDChartParams::frameSettings( uint ar
*/
bool KDChartParams::removeFrame( uint area )
{
- return _areaDict.remove( QString( "%1/-----/-----/-----" ).arg( area, 5 ) );
+ return _areaDict.remove( TQString( "%1/-----/-----/-----" ).tqarg( area, 5 ) );
}
@@ -2660,14 +2660,14 @@ const KDChartParams::KDChartFrameSettings* KDChartParams::nextFrameSettings( boo
bFound = false;
if( pIterIdx ){
int i=0;
- QDictIterator<KDChartFrameSettings> it( _areaDict );
+ TQDictIterator<KDChartFrameSettings> it( _areaDict );
for( ; it.current(); ++it ){
if( *pIterIdx == i )
break;
++i;
}
if( *pIterIdx == i ){
- QString keyStart( it.currentKey().left(6) );
+ TQString keyStart( it.currentKey().left(6) );
++it;
for( ; it.current(); ++it ){
++*pIterIdx;
@@ -2698,7 +2698,7 @@ uint KDChartParams::insertCustomBox( const KDChartCustomBox & box )
const uint maxIndex = maxCustomBoxIdx();
newIdx = 1 + maxIndex;
for( uint idx = 0; idx <= maxIndex; ++idx ) {
- if( ! _customBoxDict.find( idx ) ) {
+ if( ! _customBoxDict.tqfind( idx ) ) {
newIdx = idx;
_customBoxDictMayContainHoles = true; // we found a hole, so there might be more of them
break;
@@ -2758,7 +2758,7 @@ bool KDChartParams::removeCustomBox( const uint & idx )
*/
const KDChartCustomBox* KDChartParams::customBox( uint box ) const
{
- return _customBoxDict.find( box );
+ return _customBoxDict.tqfind( box );
}
/**
@@ -2776,7 +2776,7 @@ const KDChartCustomBox* KDChartParams::customBox( uint box ) const
*/
KDChartCustomBox* KDChartParams::customBoxRef( uint box )
{
- return _customBoxDict.find( box );
+ return _customBoxDict.tqfind( box );
}
/**
@@ -2789,7 +2789,7 @@ uint KDChartParams::maxCustomBoxIdx() const
uint cnt( _customBoxDict.count() );
if( cnt ) {
int maxIndex = cnt-1;
- QIntDictIterator<KDChartCustomBox> it( _customBoxDict );
+ TQIntDictIterator<KDChartCustomBox> it( _customBoxDict );
for( ; it.current(); ++it )
if( it.currentKey() > maxIndex )
maxIndex = it.currentKey();
@@ -2820,7 +2820,7 @@ uint KDChartParams::maxCustomBoxIdx() const
\note Calling setChartType() results in changing the default data value
texts font settings (i.e. the font size, colour, position, but not the
- QFont itself) <b>if</b> these parameters were not changed by
+ TQFont itself) <b>if</b> these parameters were not changed by
setPrintDataValues().
In order to re-activate this automatical adjustment of font settings
even after you have changed them manually you may call
@@ -3120,12 +3120,12 @@ void KDChartParams::setAdditionalChartType( ChartType chartType )
*/
/**
- \fn void KDChartParams::setOutlineDataColor( QColor color )
+ \fn void KDChartParams::setOutlineDataColor( TQColor color )
Specifies a color for the outlines of data displays. The default is
black.
- \note Use setOutlineDataLineStyle( Qt::NoPen ) to hide the line.
+ \note Use setOutlineDataLineStyle( TQt::NoPen ) to hide the line.
\param color the color to use for the outlines
\sa outlineDataColor, setOutlineDataLineStyle, setOutlineDataLineWidth
@@ -3133,7 +3133,7 @@ void KDChartParams::setAdditionalChartType( ChartType chartType )
/**
- \fn QColor KDChartParams::outlineDataColor() const
+ \fn TQColor KDChartParams::outlineDataColor() const
Returns the color for the outlines of data displays.
@@ -3148,7 +3148,7 @@ void KDChartParams::setAdditionalChartType( ChartType chartType )
Specifies the width of the outlines of data displays. The default is 1
pixel.
- \note Use setOutlineDataLineStyle( Qt::NoPen ) to hide the line.
+ \note Use setOutlineDataLineStyle( TQt::NoPen ) to hide the line.
\param width the line width to use for the outlines
\sa outlineDataLineWidth, setOutlineDataLineStyle, setOutlineDataColor
@@ -3287,7 +3287,7 @@ void KDChartParams::setDataValuesCalc( int divPow10,
\sa dataValuesColor
\sa setPrintDataValuesFontRelSize setPrintDataValuesBackground
*/
-void KDChartParams::setDataValuesFont( QFont* font,
+void KDChartParams::setDataValuesFont( TQFont* font,
uint size,
uint chart )
{
@@ -3359,12 +3359,12 @@ void KDChartParams::setDataValuesPlacing( KDChartEnums::PositionFlag position,
To have the color calculated automatically - useful when printing
inside the bars (or pie slices, areas, ... resp.) - please use
- \c KDCHART_DATA_VALUE_AUTO_COLOR instead of a QColor*.
+ \c KDCHART_DATA_VALUE_AUTO_COLOR instead of a TQColor*.
Setting the background is normally not needed since reasonable
settings are done by default: Area charts have a white background
behind the data value texts while all other chart types use no
- special background (the value is Qt::NoBrush then).
+ special background (the value is TQt::NoBrush then).
In case you want to use it to remove the extra background from
your Area chart's data value texts you should consider changing
@@ -3376,8 +3376,8 @@ void KDChartParams::setDataValuesPlacing( KDChartEnums::PositionFlag position,
\sa dataValuesColor
\sa setPrintDataValuesFontRelSize
*/
-void KDChartParams::setDataValuesColors( const QColor* color,
- const QBrush& background,
+void KDChartParams::setDataValuesColors( const TQColor* color,
+ const TQBrush& background,
uint chart )
{
// first store the color
@@ -3444,7 +3444,7 @@ void KDChartParams::setDataValuesShowInfinite( bool dataValuesShowInfinite,
/* function only there for backward compatibility */
-void KDChartParams::setPrintDataValuesColor( uint chart, const QColor* color )
+void KDChartParams::setPrintDataValuesColor( uint chart, const TQColor* color )
{
uint count = (KDCHART_ALL_CHARTS == chart) ? 2 : 1;
PrintDataValuesSettings * settings = (( 1 < count ) || ( 0 == chart ))
@@ -3453,13 +3453,13 @@ void KDChartParams::setPrintDataValuesColor( uint chart, const QColor* color )
for ( uint i = 0; i < count; ++i ) {
if ( KDCHART_DATA_VALUE_AUTO_COLOR == color ) {
settings->_dataValuesAutoColor = true; // !!!
- settings->_dataValuesColor = QColor( Qt::black );
+ settings->_dataValuesColor = TQColor( TQt::black );
}
else {
settings->_dataValuesAutoColor = false;
if ( 0 == color )
settings->_dataValuesColor
- = QColor( i ? Qt::darkBlue : Qt::black );
+ = TQColor( i ? TQt::darkBlue : TQt::black );
else
settings->_dataValuesColor = *color;
}
@@ -3502,7 +3502,7 @@ void KDChartParams::setPrintDataValuesFontRelSize( uint chart, uint size )
Specifies that data value texts are to be printed with default font
parameters. Calling this methode results in resetting the
respective font size and colour and position parameters but not the
- QFont itself. By setting \c callSetPrintDataValues to true you
+ TQFont itself. By setting \c callSetPrintDataValues to true you
select general enabling of text printing, when doing so it is
<b>not</b> neccessary to call setPrintDataValues() after calling
setPrintDataValuesWithDefaultFontParams().
@@ -3567,7 +3567,7 @@ void KDChartParams::setPrintDataValuesWithDefaultFontParams( uint chart,
/**
- \fn QFont KDChartParams::dataValuesFont( uint chart ) const
+ \fn TQFont KDChartParams::dataValuesFont( uint chart ) const
Returns the font to be used for printing the data values
@@ -3618,7 +3618,7 @@ void KDChartParams::setPrintDataValuesWithDefaultFontParams( uint chart,
/**
- \fn QColor KDChartParams::dataValuesColor( uint chart ) const
+ \fn TQColor KDChartParams::dataValuesColor( uint chart ) const
Returns the colour of the font to be used for printing the
data values.
@@ -3682,7 +3682,7 @@ KDChartEnums::PositionFlag KDChartParams::dataValuesAnchorPosition( uint chart,
/**
Returns the way how the text is to be aligned to the anchor.
- This must be a reasonable combination of Qt::AlignmentFlags.
+ This must be a reasonable combination of TQt::AlignmentFlags.
\param chart The number of the chart: 0 for the first chart, 1 for
the second chart in case there are two charts to be drawn sharing the
@@ -3807,9 +3807,9 @@ int KDChartParams::dataValuesRotation( uint chart, bool negative ) const
a data text covers a neighboring data text (or a neighboring data
area, resp.).
- \note A layout policy different from LayoutJustOverwrite from does
+ \note A tqlayout policy different from LayoutJustOverwrite from does
not mean that this policy is followed in any case. Rather than
- giving up when the selected policy does not result in a good layout
+ giving up when the selected policy does not result in a good tqlayout
the program will automatically try the next policy: if
LayoutPolicyRotate did not succeed LayoutPolicyShiftVertically will
be tried, if this did not succeed either
@@ -3869,7 +3869,7 @@ int KDChartParams::dataValuesRotation( uint chart, bool negative ) const
Predefined (build-in) property ID. used to specify a cell that should be displayed
using a null pen: neither the data representation nor
the connecting line to the next point will be shown,
- but the line will be drawn using line style Qt::NoPen.
+ but the line will be drawn using line style TQt::NoPen.
Use this IDs <b>without</b> previously defining a respective
set of properties via KDChartParams::registerProperties(...).
@@ -3897,7 +3897,7 @@ transpProps);
// Ooops? The build-in property was NOT found!
// OK, never mind, let's specify it from scratch:
transpProps.setName("transparent data");
-transpProps.setLineStyle(KDChartPropertySet::OwnID, Qt::NoPen);
+transpProps.setLineStyle(KDChartPropertySet::OwnID, TQt::NoPen);
transpProps.setShowMarker(
KDCHART_PROPSET_NORMAL_DATA, bDummy);
setProperties(KDCHART_PROPSET_TRANSPARENT_DATA,
@@ -3927,7 +3927,7 @@ see the second example given with \c KDCHART_PROPSET_VERT_LINE.
Data display will be surpressed for this point: neither the data
representation nor the connecting line to the next point will
be shown, actually the point will remain invisible but a horizontal
- line will be drawn instead: using line style Qt::DotLine and the
+ line will be drawn instead: using line style TQt::DotLine and the
respective dataset's line color.
Use this IDs <b>without</b> previously defining a respective
@@ -3946,20 +3946,20 @@ see the second example given with \c KDCHART_PROPSET_VERT_LINE.
// build-in property was found, let's modify it a bit:
horiProps.setExtraMarkersAlign(
KDChartPropertySet::OwnID,
-Qt::AlignLeft | Qt::AlignRight );
+TQt::AlignLeft | TQt::AlignRight );
setProperties(KDCHART_PROPSET_HORI_LINE,
horiProps);
}else{
// Ooops? The build-in property was NOT found!
// OK, never mind, let's specify it from scratch:
horiProps.setName("horizontal line");
-horiProps.setLineStyle(KDChartPropertySet::OwnID, Qt::NoPen);
+horiProps.setLineStyle(KDChartPropertySet::OwnID, TQt::NoPen);
horiProps.setShowMarker( KDChartPropertySet::OwnID, false );
horiProps.setExtraMarkersAlign( KDChartPropertySet::OwnID,
-Qt::AlignLeft | Qt::AlignRight );
+TQt::AlignLeft | TQt::AlignRight );
horiProps.setExtraMarkersAlign(
KDChartPropertySet::OwnID,
-Qt::AlignLeft | Qt::AlignRight );
+TQt::AlignLeft | TQt::AlignRight );
setProperties(KDCHART_PROPSET_HORI_LINE,
horiProps);
}
@@ -3987,7 +3987,7 @@ see the second example given with \c KDCHART_PROPSET_VERT_LINE.
Data display will be surpressed for this point: neither the data
representation nor the connecting line to the next point will
be shown, actually the point will remain invisible but a vertical
- line will be drawn instead: using line style Qt::DotLine and the
+ line will be drawn instead: using line style TQt::DotLine and the
respective dataset's line color.
Use this IDs <b>without</b> previously defining a respective
@@ -4008,20 +4008,20 @@ see the second example given with \c KDCHART_PROPSET_VERT_LINE.
vertProps) ){
// build-in property was found, let's modify it a bit:
vertProps.setExtraMarkersAlign(
-KDChartPropertySet::OwnID, Qt::AlignTop );
+KDChartPropertySet::OwnID, TQt::AlignTop );
setProperties(KDCHART_PROPSET_VERT_LINE,
vertProps);
}else{
// Ooops? The build-in property was NOT found!
// OK, never mind, let's specify it from scratch:
vertProps.setName("vertical line");
-vertProps.setLineStyle(KDChartPropertySet::OwnID, Qt::NoPen);
+vertProps.setLineStyle(KDChartPropertySet::OwnID, TQt::NoPen);
vertProps.setShowMarker( KDChartPropertySet::OwnID, false );
vertProps.setExtraMarkersAlign( KDChartPropertySet::OwnID,
-Qt::AlignTop );
+TQt::AlignTop );
vertProps.setExtraMarkersAlign(
KDChartPropertySet::OwnID,
-Qt::AlignTop );
+TQt::AlignTop );
setProperties(KDCHART_PROPSET_VERT_LINE,
vertProps);
}
@@ -4045,25 +4045,25 @@ dataWithTopLineProps.setName(
"normal data with red vertical line on top");
dataWithTopLineProps.setExtraLinesAlign(
KDChartPropertySet::OwnID,
-Qt::AlignTop );
+TQt::AlignTop );
dataWithTopLineProps.setExtraLinesWidth(
KDChartPropertySet::OwnID,
-2 );
dataWithTopLineProps.setExtraLinesColor(
KDChartPropertySet::OwnID,
- Qt::red );
+ TQt::red );
dataWithTopLineProps.setExtraLinesStyle(
KDChartPropertySet::OwnID,
- Qt::SolidLine );
+ TQt::SolidLine );
dataWithTopLineProps.setExtraMarkersAlign(
KDChartPropertySet::OwnID,
- Qt::AlignTop );
+ TQt::AlignTop );
dataWithTopLineProps.setExtraMarkersSize(
KDChartPropertySet::OwnID,
- QSize(-10, -10) );
+ TQSize(-10, -10) );
dataWithTopLineProps.setExtraMarkersColor(
KDChartPropertySet::OwnID,
- Qt::darkRed );
+ TQt::darkRed );
dataWithTopLineProps.setExtraMarkersStyle(
KDChartPropertySet::OwnID,
KDChartParams::LineMarkerCircle );
@@ -4275,7 +4275,7 @@ void KDChartParams::setThreeDBarAngle( uint angle )
\fn void KDChartParams::setDatasetGap( int gap )
Specifies the number of pixels between two dataset values.
- In addition you might want to use \c setOutlineDataLineStyle( Qt::NoPen ) to hide the line.
+ In addition you might want to use \c setOutlineDataLineStyle( TQt::NoPen ) to hide the line.
Also the method \c setValueBlockGap might be usefull, please read the information given there ...
@@ -4345,7 +4345,7 @@ void KDChartParams::setThreeDBarAngle( uint angle )
Specifies the number of pixels between each value block.
If there is only one dataset shown this gap is appearing between each of the bars, otherwise it is appearing between each of the bar blocks.
- In addition you might want to use \c setOutlineDataLineStyle( Qt::NoPen ) to hide the line.
+ In addition you might want to use \c setOutlineDataLineStyle( TQt::NoPen ) to hide the line.
Also the method \c setDatasetGap might be usefull, please read the information given there ...
@@ -4617,7 +4617,7 @@ void KDChartParams::setThreeDBarAngle( uint angle )
point. Only used if chartType() == Line and if threeDLines() ==
false. The default is not to draw markers.
- \note Use the setLineMarkerStyle function to specify the shape
+ \note Use the setLineMarkerStyle function to specify the tqshape
of the markers, use the setLineWidth function to set the
width of the lines connecting the markers (or to surpress
drawing of such lines, resp.)
@@ -4670,7 +4670,7 @@ void KDChartParams::setThreeDBarAngle( uint angle )
void KDChartParams::setLineMarkerStyle( uint dataset, LineMarkerStyle style )
{
_lineMarkerStyles[ dataset ] = style;
- _maxDatasetLineMarkerStyle = QMAX( dataset,
+ _maxDatasetLineMarkerStyle = TQMAX( dataset,
_maxDatasetLineMarkerStyle );
emit changed();
}
@@ -4685,7 +4685,7 @@ void KDChartParams::setLineMarkerStyle( uint dataset, LineMarkerStyle style )
*/
KDChartParams::LineMarkerStyle KDChartParams::lineMarkerStyle( uint dataset ) const
{
- if( _lineMarkerStyles.find( dataset ) != _lineMarkerStyles.end() )
+ if( _lineMarkerStyles.tqfind( dataset ) != _lineMarkerStyles.end() )
return _lineMarkerStyles[ dataset ];
else
return LineMarkerCircle; // default
@@ -4718,7 +4718,7 @@ void KDChartParams::setLineMarkerStyles( LineMarkerStyleMap map ) {
uint maxDataset = 0;
for( LineMarkerStyleMap::ConstIterator it = _lineMarkerStyles.begin();
it != _lineMarkerStyles.end(); ++it )
- maxDataset = QMAX( maxDataset, it.key() );
+ maxDataset = TQMAX( maxDataset, it.key() );
_maxDatasetLineMarkerStyle = maxDataset;
}
@@ -4749,7 +4749,7 @@ void KDChartParams::setLineMarkerStyles( LineMarkerStyleMap map ) {
/**
- \fn void KDChartParams::setLineMarkerSize( QSize size )
+ \fn void KDChartParams::setLineMarkerSize( TQSize size )
Specifies the sizes of line markers. Only used if chartType() == Line
and lineMarker() == true. The default is 6x6.
@@ -4766,7 +4766,7 @@ void KDChartParams::setLineMarkerStyles( LineMarkerStyleMap map ) {
/**
- \fn QSize KDChartParams::lineMarkerSize() const
+ \fn TQSize KDChartParams::lineMarkerSize() const
Returns the sizes of line markers. Only used if chartType() == Line and
lineMarker() == true.
@@ -4808,7 +4808,7 @@ void KDChartParams::setLineMarkerStyles( LineMarkerStyleMap map ) {
/**
- \fn void KDChartParams::setLineColor( QColor color = QColor() )
+ \fn void KDChartParams::setLineColor( TQColor color = TQColor() )
Specifies the color of the lines in line charts. By default
line chart lines are drawn in the color specified by the
@@ -4823,7 +4823,7 @@ void KDChartParams::setLineMarkerStyles( LineMarkerStyleMap map ) {
or even setLineMarkerStyle( i, LineMarker1Pixel ) and have your
marker dots normally form a contiguous line without the need of
any connecting lines except at the places where missing data
- values would interrupt the 'line'. Using setLineColor( Qt::darkGray)
+ values would interrupt the 'line'. Using setLineColor( TQt::darkGray)
could make your chart more readable in such cases.
\param color of the lines in line charts
@@ -4833,7 +4833,7 @@ void KDChartParams::setLineMarkerStyles( LineMarkerStyleMap map ) {
/**
- \fn QColor KDChartParams::lineColor() const
+ \fn TQColor KDChartParams::lineColor() const
Returns the color of the lines in line charts.
@@ -4852,7 +4852,7 @@ void KDChartParams::setLineMarkerStyles( LineMarkerStyleMap map ) {
Global and dataset specific line styles may be used
simultaneously: If no dataset specific style is
defined the global style is used which by default
- is Qt::SolidLine.
+ is TQt::SolidLine.
Warning: On Windows 95/98, the style setting (other
than NoPen and SolidLine) has no effect for lines with width greater
@@ -4891,7 +4891,7 @@ Qt::PenStyle KDChartParams::lineStyle( uint dataset ) const
if( KDCHART_GLOBAL_LINE_STYLE == dataset )
// global line style
return _lineStyle;
- else if( _datasetLineStyles.find( dataset ) == _datasetLineStyles.end() )
+ else if( _datasetLineStyles.tqfind( dataset ) == _datasetLineStyles.end() )
return lineStyle();
else
return _datasetLineStyles[ dataset ];
@@ -5182,7 +5182,7 @@ Qt::PenStyle KDChartParams::lineStyle( uint dataset ) const
void KDChartParams::setPolarMarkerStyle( uint dataset, PolarMarkerStyle style )
{
_polarMarkerStyles[ dataset ] = style;
- _maxDatasetPolarMarkerStyle = QMAX( dataset,
+ _maxDatasetPolarMarkerStyle = TQMAX( dataset,
_maxDatasetPolarMarkerStyle );
emit changed();
}
@@ -5197,7 +5197,7 @@ void KDChartParams::setPolarMarkerStyle( uint dataset, PolarMarkerStyle style )
*/
KDChartParams::PolarMarkerStyle KDChartParams::polarMarkerStyle( uint dataset ) const
{
- if( _polarMarkerStyles.find( dataset ) != _polarMarkerStyles.end() )
+ if( _polarMarkerStyles.tqfind( dataset ) != _polarMarkerStyles.end() )
return _polarMarkerStyles[ dataset ];
else
return PolarMarkerCircle; // default
@@ -5228,7 +5228,7 @@ void KDChartParams::setPolarMarkerStyles( PolarMarkerStyleMap map ) {
uint maxDataset = 0;
for( PolarMarkerStyleMap::ConstIterator it = _polarMarkerStyles.begin();
it != _polarMarkerStyles.end(); ++it )
- maxDataset = QMAX( maxDataset, it.key() );
+ maxDataset = TQMAX( maxDataset, it.key() );
_maxDatasetPolarMarkerStyle = maxDataset;
}
@@ -5258,7 +5258,7 @@ void KDChartParams::setPolarMarkerStyles( PolarMarkerStyleMap map ) {
/**
- \fn void KDChartParams::setPolarMarkerSize( QSize )
+ \fn void KDChartParams::setPolarMarkerSize( TQSize )
Specifies the sizes of polar markers. Only used if chartType() == Polar
and polarMarker() == true. The default is -40 x -40.
@@ -5272,7 +5272,7 @@ void KDChartParams::setPolarMarkerStyles( PolarMarkerStyleMap map ) {
/**
- \fn QSize KDChartParams::polarMarkerSize() const
+ \fn TQSize KDChartParams::polarMarkerSize() const
Returns the sizes of polar markers. Only used if chartType() ==
Polar and polarMarker() == true.
@@ -5440,7 +5440,7 @@ bool KDChartParams::polarLabelsAtPos( KDChartEnums::PositionFlag pos ) const
/**
- \fn void KDChartParams::setExplodeValues( QValueList<int> explodeList )
+ \fn void KDChartParams::setExplodeValues( TQValueList<int> explodeList )
Specifies which values to explode. Explosion of values only
happens if setExplode( true ) has been called. Normally, all
@@ -5470,7 +5470,7 @@ bool KDChartParams::polarLabelsAtPos( KDChartEnums::PositionFlag pos ) const
/**
- \fn QValueList<int> KDChartParams::explodeValues() const
+ \fn TQValueList<int> KDChartParams::explodeValues() const
Returns which values are exploded in a pie or ring chart. For a detailed
explanation of this feature, please see \a setExplodeValues().
@@ -5482,7 +5482,7 @@ bool KDChartParams::polarLabelsAtPos( KDChartEnums::PositionFlag pos ) const
/**
- \fn void KDChartParams::setExplodeFactors( QMap<int,double> factors )
+ \fn void KDChartParams::setExplodeFactors( TQMap<int,double> factors )
Specifies the explode factors for each segment in percent,
i.e. how much an exploded pie or ring segment is displaced from
@@ -5514,7 +5514,7 @@ setExplodeFactor(), explodeFactor(), explodeFactors()
/**
- \fn QMap<int,double> KDChartParams::explodeFactors() const {
+ \fn TQMap<int,double> KDChartParams::explodeFactors() const {
Returns the list of explode factors. Each explode factor in the
list corresponds to the segment at the same position.
@@ -5752,8 +5752,8 @@ setExplodeFactor(), explodeFactor(), explodeFactors()
\sa hiLoChartHighValuesFontUseRelSize, hiLoChartHighValuesFontUseRelSize
\sa hiLoChartHighValuesFontRelSize, hiLoChartHighValuesFontRelSize
*/
-void KDChartParams::setHiLoChartPrintLowValues( bool active, QFont* font,
- int size, QColor* color )
+void KDChartParams::setHiLoChartPrintLowValues( bool active, TQFont* font,
+ int size, TQColor* color )
{
_hiLoChartPrintLowValues = active;
if ( font )
@@ -5763,7 +5763,7 @@ void KDChartParams::setHiLoChartPrintLowValues( bool active, QFont* font,
_hiLoChartLowValuesUseFontRelSize = ( 0 < size );
_hiLoChartLowValuesFontRelSize = size;
if ( 0 == color )
- _hiLoChartLowValuesColor = QColor( 0, 0, 0 );
+ _hiLoChartLowValuesColor = TQColor( 0, 0, 0 );
else
_hiLoChartLowValuesColor = *color;
emit changed();
@@ -5786,7 +5786,7 @@ void KDChartParams::setHiLoChartPrintLowValues( bool active, QFont* font,
/**
- \fn QFont KDChartParams::hiLoChartLowValuesFont() const
+ \fn TQFont KDChartParams::hiLoChartLowValuesFont() const
Returns the font to be used for printing the
low values
@@ -5833,7 +5833,7 @@ void KDChartParams::setHiLoChartPrintLowValues( bool active, QFont* font,
/**
- \fn QColor KDChartParams::hiLoChartLowValuesColor() const
+ \fn TQColor KDChartParams::hiLoChartLowValuesColor() const
Returns the colour of the font size to be used for printing the
low values.
@@ -5875,8 +5875,8 @@ void KDChartParams::setHiLoChartPrintLowValues( bool active, QFont* font,
\sa hiLoChartLowValuesFontUseRelSize, hiLoChartLowValuesFontUseRelSize
\sa hiLoChartLowValuesFontRelSize, hiLoChartLowValuesFontRelSize
*/
-void KDChartParams::setHiLoChartPrintHighValues( bool active, QFont* font,
- int size, QColor* color )
+void KDChartParams::setHiLoChartPrintHighValues( bool active, TQFont* font,
+ int size, TQColor* color )
{
_hiLoChartPrintHighValues = active;
if ( font )
@@ -5886,7 +5886,7 @@ void KDChartParams::setHiLoChartPrintHighValues( bool active, QFont* font,
_hiLoChartHighValuesUseFontRelSize = ( 0 < size );
_hiLoChartHighValuesFontRelSize = size;
if ( 0 == color )
- _hiLoChartHighValuesColor = QColor( 0, 0, 0 );
+ _hiLoChartHighValuesColor = TQColor( 0, 0, 0 );
else
_hiLoChartHighValuesColor = *color;
emit changed();
@@ -5909,7 +5909,7 @@ void KDChartParams::setHiLoChartPrintHighValues( bool active, QFont* font,
/**
- \fn QFont KDChartParams::hiLoChartHighValuesFont() const
+ \fn TQFont KDChartParams::hiLoChartHighValuesFont() const
Returns the font to be used for printing the
high values.
@@ -5956,7 +5956,7 @@ void KDChartParams::setHiLoChartPrintHighValues( bool active, QFont* font,
/**
- \fn QColor KDChartParams::hiLoChartHighValuesColor() const
+ \fn TQColor KDChartParams::hiLoChartHighValuesColor() const
Returns the colour of the font size to be used for printing the
high values.
@@ -5997,8 +5997,8 @@ void KDChartParams::setHiLoChartPrintHighValues( bool active, QFont* font,
\sa hiLoChartCloseValuesFontUseRelSize, hiLoChartCloseValuesFontUseRelSize
\sa hiLoChartCloseValuesFontRelSize, hiLoChartCloseValuesFontRelSize
*/
-void KDChartParams::setHiLoChartPrintOpenValues( bool active, QFont* font,
- uint size, QColor* color )
+void KDChartParams::setHiLoChartPrintOpenValues( bool active, TQFont* font,
+ uint size, TQColor* color )
{
_hiLoChartPrintOpenValues = active;
if ( font )
@@ -6008,7 +6008,7 @@ void KDChartParams::setHiLoChartPrintOpenValues( bool active, QFont* font,
_hiLoChartOpenValuesUseFontRelSize = ( 0 < size );
_hiLoChartOpenValuesFontRelSize = size;
if ( 0 == color )
- _hiLoChartOpenValuesColor = QColor( 0, 0, 0 );
+ _hiLoChartOpenValuesColor = TQColor( 0, 0, 0 );
else
_hiLoChartOpenValuesColor = *color;
emit changed();
@@ -6031,7 +6031,7 @@ void KDChartParams::setHiLoChartPrintOpenValues( bool active, QFont* font,
/**
- \fn QFont KDChartParams::hiLoChartOpenValuesFont() const
+ \fn TQFont KDChartParams::hiLoChartOpenValuesFont() const
Returns the font to be used for printing the
open values.
@@ -6076,7 +6076,7 @@ void KDChartParams::setHiLoChartPrintOpenValues( bool active, QFont* font,
/**
- \fn QColor KDChartParams::hiLoChartOpenValuesColor() const
+ \fn TQColor KDChartParams::hiLoChartOpenValuesColor() const
Returns the colour of the font size to be used for printing the
open values.
@@ -6117,8 +6117,8 @@ void KDChartParams::setHiLoChartPrintOpenValues( bool active, QFont* font,
\sa hiLoChartOpenValuesFontUseRelSize, hiLoChartOpenValuesFontUseRelSize
\sa hiLoChartOpenValuesFontRelSize, hiLoChartOpenValuesFontRelSize
*/
-void KDChartParams::setHiLoChartPrintCloseValues( bool active, QFont* font,
- int size, QColor* color )
+void KDChartParams::setHiLoChartPrintCloseValues( bool active, TQFont* font,
+ int size, TQColor* color )
{
_hiLoChartPrintCloseValues = active;
if ( font )
@@ -6128,7 +6128,7 @@ void KDChartParams::setHiLoChartPrintCloseValues( bool active, QFont* font,
_hiLoChartCloseValuesUseFontRelSize = ( 0 < size );
_hiLoChartCloseValuesFontRelSize = size;
if ( 0 == color )
- _hiLoChartCloseValuesColor = QColor( 0, 0, 0 );
+ _hiLoChartCloseValuesColor = TQColor( 0, 0, 0 );
else
_hiLoChartCloseValuesColor = *color;
emit changed();
@@ -6150,7 +6150,7 @@ void KDChartParams::setHiLoChartPrintCloseValues( bool active, QFont* font,
/**
- \fn QFont KDChartParams::hiLoChartCloseValuesFont() const
+ \fn TQFont KDChartParams::hiLoChartCloseValuesFont() const
Returns the font to be used for printing the close values.
@@ -6192,7 +6192,7 @@ void KDChartParams::setHiLoChartPrintCloseValues( bool active, QFont* font,
/**
- \fn QColor KDChartParams::hiLoChartCloseValuesColor() const
+ \fn TQColor KDChartParams::hiLoChartCloseValuesColor() const
Returns the colour of the font size to be used for printing the
close values.
@@ -6207,7 +6207,7 @@ void KDChartParams::setHiLoChartPrintCloseValues( bool active, QFont* font,
/**
- \fn void KDChartParams::setHiLoChartPrintFirstValues( bool, QFont*, uint, QColor* )
+ \fn void KDChartParams::setHiLoChartPrintFirstValues( bool, TQFont*, uint, TQColor* )
\obsolete
@@ -6226,7 +6226,7 @@ void KDChartParams::setHiLoChartPrintCloseValues( bool active, QFont* font,
/**
- \fn QFont KDChartParams::hiLoChartFirstValuesFont() const
+ \fn TQFont KDChartParams::hiLoChartFirstValuesFont() const
\obsolete
@@ -6256,7 +6256,7 @@ void KDChartParams::setHiLoChartPrintCloseValues( bool active, QFont* font,
/**
- \fn QColor KDChartParams::hiLoChartFirstValuesColor() const
+ \fn TQColor KDChartParams::hiLoChartFirstValuesColor() const
\obsolete
@@ -6266,7 +6266,7 @@ void KDChartParams::setHiLoChartPrintCloseValues( bool active, QFont* font,
/**
- \fn void KDChartParams::setHiLoChartPrintLastValues( bool, QFont*, int, QColor* )
+ \fn void KDChartParams::setHiLoChartPrintLastValues( bool, TQFont*, int, TQColor* )
\obsolete
@@ -6286,7 +6286,7 @@ void KDChartParams::setHiLoChartPrintCloseValues( bool active, QFont* font,
/**
- \fn QFont KDChartParams::hiLoChartLastValuesFont() const
+ \fn TQFont KDChartParams::hiLoChartLastValuesFont() const
\obsolete
@@ -6316,7 +6316,7 @@ void KDChartParams::setHiLoChartPrintCloseValues( bool active, QFont* font,
/**
- \fn QColor KDChartParams::hiLoChartLastValuesColor() const
+ \fn TQColor KDChartParams::hiLoChartLastValuesColor() const
\obsolete
@@ -6419,7 +6419,7 @@ void KDChartParams::bWChartFences( double& upperInner, double& lowerInner,
/**
- \fn void KDChartParams::setBWChartBrush( const QBrush& bWChartBrush )
+ \fn void KDChartParams::setBWChartBrush( const TQBrush& bWChartBrush )
Specifies the brush to be used to fill the BoxWhisker charts.
@@ -6429,7 +6429,7 @@ void KDChartParams::bWChartFences( double& upperInner, double& lowerInner,
/**
- \fn QBrush KDChartParams::bWChartBrush() const
+ \fn TQBrush KDChartParams::bWChartBrush() const
Returns the brush to be used to fill the BoxWhisker charts.
@@ -6510,10 +6510,10 @@ void KDChartParams::bWChartFences( double& upperInner, double& lowerInner,
*/
void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
bool active,
- QFont* font,
+ TQFont* font,
int size,
- QColor* color,
- QBrush* brush )
+ TQColor* color,
+ TQBrush* brush )
{
BWStatVal statValA = (BWStatValALL == statValue) ? BWStatValSTART : statValue;
BWStatVal statValZ = (BWStatValALL == statValue) ? BWStatValEND : statValue;
@@ -6526,11 +6526,11 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
_BWChartStatistics[ i ].useRelSize = ( 0 < size );
_BWChartStatistics[ i ].relSize = size;
if ( 0 == color )
- _BWChartStatistics[ i ].color = QColor( 0, 0, 0 );
+ _BWChartStatistics[ i ].color = TQColor( 0, 0, 0 );
else
_BWChartStatistics[ i ].color = *color;
if ( 0 == brush )
- _BWChartStatistics[ i ].brush = QBrush( Qt::white );
+ _BWChartStatistics[ i ].brush = TQBrush( TQt::white );
else
_BWChartStatistics[ i ].brush = *brush;
}
@@ -6554,7 +6554,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn QFont KDChartParams::bWChartStatisticsFont( BWStatVal statValue ) const
+ \fn TQFont KDChartParams::bWChartStatisticsFont( BWStatVal statValue ) const
Returns the font to be used for printing the respective statistical values
@@ -6597,7 +6597,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn QColor KDChartParams::bWChartStatisticsColor( BWStatVal statValue ) const
+ \fn TQColor KDChartParams::bWChartStatisticsColor( BWStatVal statValue ) const
Returns the colour
of the font to be used for printing the respective statistical values.
@@ -6612,7 +6612,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn QBrush KDChartParams::bWChartStatisticsBrush( BWStatVal statValue ) const
+ \fn TQBrush KDChartParams::bWChartStatisticsBrush( BWStatVal statValue ) const
Returns the brush used
to fill the text's area before printing the respective statistical values.
@@ -6675,7 +6675,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
prints the legend entries below each other, Qt::Horizontal prints them
aside each other.
- \note Horizontal orientation is only possible if the chart is NOT making
+ \noteQt::Horizontal orientation is only possible if the chart is NOT making
room in horizontal direction, this means you may specify horizontal
orientation if the legend position in one of the following values
only: LegendTop, LegendBottom, LegendTopLeftTop, LegendTopRightTop,
@@ -6729,7 +6729,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
<li>Manual - Uses texts set with setLegendText(); if no text is set for
a dataset, the legend text will be empty.
<li>FirstColumn - Uses values from the first column, no matter what
- this contains.
+ this tqcontains.
<li>Automatic - Tries first to use values from the first column; if
this does not contain any string values, tries to use values set
manually with setLegendText(). If there are no values set manually
@@ -6764,7 +6764,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn void KDChartParams::setLegendText( uint dataset, const QString& text )
+ \fn void KDChartParams::setLegendText( uint dataset, const TQString& text )
Manually specifies a legend text for a certain dataset. This is only
used if legendSource() == Manual or if legendSource() == Automatic and
@@ -6777,7 +6777,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn QString KDChartParams::legendText( uint dataset ) const
+ \fn TQString KDChartParams::legendText( uint dataset ) const
Returns the manually specified legend text for a given dataset.
@@ -6787,7 +6787,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn void KDChartParams::setLegendTextColor( const QColor& color )
+ \fn void KDChartParams::setLegendTextColor( const TQColor& color )
Specifies the color to be used for the legend texts. The
default is black.
@@ -6798,7 +6798,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn QColor KDChartParams::legendTextColor() const
+ \fn TQColor KDChartParams::legendTextColor() const
Returns the color in which the legend texts are drawn. The
default is black.
@@ -6809,7 +6809,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn void KDChartParams::setLegendFont( const QFont& font, bool useFontSize )
+ \fn void KDChartParams::setLegendFont( const TQFont& font, bool useFontSize )
Specifies the font in which the legend texts are drawn. The default is a
10pt helvetica font.
@@ -6824,7 +6824,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn QFont KDChartParams::legendFont() const
+ \fn TQFont KDChartParams::legendFont() const
Returns the font in which the legend texts are drawn.
@@ -6887,7 +6887,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn void KDChartParams::setLegendTitleText( const QString& text )
+ \fn void KDChartParams::setLegendTitleText( const TQString& text )
Specifies a text to be shown as the title of the legend. The
default is "Legend" (possibly localized). To turn off the
@@ -6902,7 +6902,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn QString KDChartParams::legendTitleText() const
+ \fn TQString KDChartParams::legendTitleText() const
Returns the text that is shown as the title of the legend.
@@ -6913,7 +6913,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn void KDChartParams::setLegendTitleTextColor( const QColor& color )
+ \fn void KDChartParams::setLegendTitleTextColor( const TQColor& color )
Specifies the color to be used for the legend title. The
default is black. Note that this color is only the default when
@@ -6925,7 +6925,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn QColor KDChartParams::legendTitleTextColor() const
+ \fn TQColor KDChartParams::legendTitleTextColor() const
Returns the color in which the legend title is drawn. The
default is black.
@@ -6936,7 +6936,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn void KDChartParams::setLegendTitleFont( const QFont& font, bool useFontSize )
+ \fn void KDChartParams::setLegendTitleFont( const TQFont& font, bool useFontSize )
Specifies the font in which the legend title (if any) is drawn. The
default is a 12pt helvetica font.
@@ -6951,7 +6951,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/**
- \fn QFont KDChartParams::legendTitleFont() const
+ \fn TQFont KDChartParams::legendTitleFont() const
Returns the font in which the legend title (if any) is drawn.
@@ -7150,10 +7150,10 @@ void KDChartParams::setAxisDatasets( uint n, uint dataset,
{
uint a1 = ( KDCHART_ALL_AXES == n )
? 0
- : QMIN( n, KDCHART_MAX_AXES-1 );
+ : TQMIN( n, KDCHART_MAX_AXES-1 );
uint a2 = ( KDCHART_ALL_AXES == n )
? KDCHART_MAX_AXES-1
- : QMIN( n, KDCHART_MAX_AXES-1 );
+ : TQMIN( n, KDCHART_MAX_AXES-1 );
for( uint i = a1; i <= a2; ++i ) {
_axisSettings[ i ].params.setAxisVisible( KDCHART_NO_DATASET != dataset );
_axisSettings[ i ].dataset = dataset;
@@ -7240,7 +7240,7 @@ bool KDChartParams::chartAxes( uint chart, uint& cnt, AxesArray& axes ) const
/**
- \fn QRect KDChartParams::axisArea( const uint n ) const
+ \fn TQRect KDChartParams::axisArea( const uint n ) const
Returns the true axis area rectangle as it was was calculate
by KD Chart.
@@ -7256,7 +7256,7 @@ bool KDChartParams::chartAxes( uint chart, uint& cnt, AxesArray& axes ) const
*/
/**
- \fn QRect KDChartParams::legendArea() const
+ \fn TQRect KDChartParams::legendArea() const
Returns the true legend area rectangle as it was was calculate
by KD Chart.
@@ -7270,7 +7270,7 @@ bool KDChartParams::chartAxes( uint chart, uint& cnt, AxesArray& axes ) const
*/
/**
- \fn QRect KDChartParams::dataArea() const
+ \fn TQRect KDChartParams::dataArea() const
Returns the true data area rectangle as it was was calculate
by KD Chart.
@@ -7285,7 +7285,7 @@ bool KDChartParams::chartAxes( uint chart, uint& cnt, AxesArray& axes ) const
/**
- \fn void KDChartParams::setAxisArea( const uint n, const QRect& areaRect )
+ \fn void KDChartParams::setAxisArea( const uint n, const TQRect& areaRect )
Specifies the true axis area rectangle.
@@ -7353,13 +7353,13 @@ bool KDChartParams::chartAxes( uint chart, uint& cnt, AxesArray& axes ) const
\sa KDChartAxisParams::setAxisLabelsFontMinSize
*/
void KDChartParams::setAxisLabelsFont( uint n,
- QFont axisLabelsFont,
+ TQFont axisLabelsFont,
int axisLabelsFontSize,
- QColor axisLabelsColor )
+ TQColor axisLabelsColor )
{
if ( n < KDCHART_MAX_AXES ) {
bool extraSize = (0 != axisLabelsFontSize);
- QFont theFont( axisLabelsFont );
+ TQFont theFont( axisLabelsFont );
bool useFontFixedSize = true;
if ( extraSize ){
if( 0 > axisLabelsFontSize ){
@@ -7381,8 +7381,8 @@ void KDChartParams::setAxisLabelsFont( uint n,
double axisValueDelta, int axisDigitsBehindComma,
int axisMaxEmptyInnerSpan,
KDChartAxisParams::LabelsFromDataRow takeLabelsFromDataRow,
- int labelTextsDataRow, QStringList* axisLabelStringList,
- QStringList* axisShortLabelsStringList )
+ int labelTextsDataRow, TQStringList* axisLabelStringList,
+ TQStringList* axisShortLabelsStringList )
Specifies the label text parameters for one axis.
@@ -7391,7 +7391,7 @@ void KDChartParams::setAxisLabelsFont( uint n,
/**
- Specifies a \c QStringList which the axis label texts for one
+ Specifies a \c TQStringList which the axis label texts for one
axis are to be taken from, the optional short-labels parameter
(if not zero) may be used to specify an alternative list of
strings that are to be displayed in case the axis area size
@@ -7403,10 +7403,10 @@ void KDChartParams::setAxisLabelsFont( uint n,
the strings between these two values only, as shown here:
\verbatim
- QStringList abscissaNames;
+ TQStringList abscissaNames;
abscissaNames << "Sunday" << "Monday" << "Tuesday" << "Wednesday"
<< "Thursday" << "Friday" << "Saturday";
- QStringList abscissaShortNames;
+ TQStringList abscissaShortNames;
abscissaShortNames << "Sun" << "Mon" << "Tue" << "Wed"
<< "Thu" << "Fri" << "Sat";
@@ -7417,19 +7417,19 @@ void KDChartParams::setAxisLabelsFont( uint n,
\param n the ID of the axis
- \param QStringList* axisLabelStringList points to the list of labels to be displayed
- \param QStringList* axisShortLabelStringList points to
+ \param TQStringList* axisLabelStringList points to the list of labels to be displayed
+ \param TQStringList* axisShortLabelStringList points to
an alternative list of short names to be displayed if the long labels take too much place
- \param QString valueStart ( default null ) the label to begin with
- \param QString valueEnd ( default null ) the label to end with
+ \param TQString valueStart ( default null ) the label to begin with
+ \param TQString valueEnd ( default null ) the label to end with
\sa KDChartAxisParams::setAxisLabelStringLists
*/
void KDChartParams::setAxisLabelStringParams( uint n,
- QStringList* axisLabelStringList,
- QStringList* axisShortLabelStringList,
- const QString& valueStart,
- const QString& valueEnd )
+ TQStringList* axisLabelStringList,
+ TQStringList* axisShortLabelStringList,
+ const TQString& valueStart,
+ const TQString& valueEnd )
{
if ( n < KDCHART_MAX_AXES ) {
_axisSettings[ n ].params.setAxisLabelStringLists( axisLabelStringList,
@@ -7487,7 +7487,7 @@ void KDChartParams::setAxisParams( uint n,
You might want to use those sections to show some marginal information
like department name, print date, page number... <br>
<b>Note:</b> Those headers <b>share the same area</b> so make sure to
- specify propper horizontal alignment for each section when using more than
+ specify propper horizontal tqalignment for each section when using more than
one of them. By default \c HdFtPosHeader0 has centered alignement,
\c HdFtPosHeader0L is aligned to the left and \c HdFtPosHeader0R to the
right side. All of them are vertically aligned to the bottom, you may
@@ -7504,7 +7504,7 @@ void KDChartParams::setAxisParams( uint n,
You could use this headers to show the main information such as project name,
chart title or period of time (e.g. census year). <br>
Like their counterparts they share the same part of the printable area so the
- restrictions regarding alignment mentioned above apply also to these three
+ restrictions regarding tqalignment mentioned above apply also to these three
sections.
\li Up to three <b>additional headers</b> ( \c HdFtPosHeader2 , \c
@@ -7513,7 +7513,7 @@ void KDChartParams::setAxisParams( uint n,
This headers could show additional information such as project phase, chart
sub-title or sub-period of time (e.g. census quarter-year). <br>
Like their counterparts they share the same part of the printable area so the
- restrictions regarding alignment mentioned above apply also to these three
+ restrictions regarding tqalignment mentioned above apply also to these three
sections.
<p>
@@ -7524,7 +7524,7 @@ void KDChartParams::setAxisParams( uint n,
You might want to use these footers instead of (or additional to) the
main header(s) for showing the main information... <br>
Like their header-counterparts they share the same part of the printable area
- so the restrictions regarding alignment mentioned above apply also to these
+ so the restrictions regarding tqalignment mentioned above apply also to these
three sections.
\li Up to three <b>additional footers</b> ( \c HdFtPosFooter2 , \c
@@ -7533,7 +7533,7 @@ void KDChartParams::setAxisParams( uint n,
This footers could show additional information instead of (or additional to)
the additional header(s). <br>
Like their counterparts they share the same part of the printable area so the
- restrictions regarding alignment mentioned above apply also to these three
+ restrictions regarding tqalignment mentioned above apply also to these three
sections.
\li Up to three <b>trailing footers</b> ( \c HdFtPosFooter0 , \c
@@ -7542,7 +7542,7 @@ void KDChartParams::setAxisParams( uint n,
You might want to use those sections to show some marginal information
instead of (or additional to) the leading header(s). <br>
Like their counterparts they share the same part of the printable area so the
- restrictions regarding alignment mentioned above apply also to these three
+ restrictions regarding tqalignment mentioned above apply also to these three
sections.
\note The names \c HdFtPosHeader or \c HdFtPosFooter are the basic names also returned by \c basicAxisPos.
@@ -7731,7 +7731,7 @@ void KDChartParams::setAxisParams( uint n,
\sa setHeader2Text(), header2Text()
\sa setFooterText(), footerText()
*/
-void KDChartParams::setHeaderFooterText( uint pos, const QString& text )
+void KDChartParams::setHeaderFooterText( uint pos, const TQString& text )
{
if ( HdFtPosEND >= pos ) {
_hdFtParams[ pos ]._text = text;
@@ -7757,12 +7757,12 @@ void KDChartParams::setHeaderFooterText( uint pos, const QString& text )
\sa setHeader2Text(), header2Text()
\sa setFooterText(), footerText()
*/
-QString KDChartParams::headerFooterText( uint pos ) const
+TQString KDChartParams::headerFooterText( uint pos ) const
{
if ( HdFtPosEND >= pos )
return _hdFtParams[ pos ]._text;
else
- return QString::null;
+ return TQString();
}
@@ -7772,7 +7772,7 @@ QString KDChartParams::headerFooterText( uint pos ) const
Return the position and size of one header/footer area.
<b>Will return valid data only if called after KDChartPainter::setupGeometry()!</b>
*/
-const QRect& KDChartParams::headerFooterRect( uint pos ) const
+const TQRect& KDChartParams::headerFooterRect( uint pos ) const
{
if ( HdFtPosEND >= pos )
return _hdFtParams[ pos ].rect();
@@ -7784,7 +7784,7 @@ const QRect& KDChartParams::headerFooterRect( uint pos ) const
/**
Specifies the colour to be used for the header text (or footer text, resp.)
of the header/footer section specified by \c pos.
- The default colour is <b>QColor( Qt::black )</b>.
+ The default colour is <b>TQColor( TQt::black )</b>.
\note To learn about the different header (or footer, resp.)
sections please see information given at \c HdFtPos enum explanation.
@@ -7799,7 +7799,7 @@ const QRect& KDChartParams::headerFooterRect( uint pos ) const
\sa setHeader2Text(), header2Text()
\sa setFooterText(), footerText()
*/
-void KDChartParams::setHeaderFooterColor( uint pos, const QColor color )
+void KDChartParams::setHeaderFooterColor( uint pos, const TQColor color )
{
if ( HdFtPosEND >= pos ) {
_hdFtParams[ pos ]._color = color;
@@ -7825,12 +7825,12 @@ void KDChartParams::setHeaderFooterColor( uint pos, const QColor color )
\sa setHeader2Text(), header2Text()
\sa setFooterText(), footerText()
*/
-QColor KDChartParams::headerFooterColor( uint pos ) const
+TQColor KDChartParams::headerFooterColor( uint pos ) const
{
if ( HdFtPosEND >= pos )
return _hdFtParams[ pos ]._color;
else
- return QColor( Qt::black );
+ return TQColor( TQt::black );
}
@@ -7855,7 +7855,7 @@ QColor KDChartParams::headerFooterColor( uint pos ) const
\sa setHeader2Text(), header2Text()
\sa setFooterText(), footerText()
*/
-void KDChartParams::setHeaderFooterFont( uint pos, const QFont& font,
+void KDChartParams::setHeaderFooterFont( uint pos, const TQFont& font,
bool fontUseRelSize,
int fontRelSize )
{
@@ -7888,12 +7888,12 @@ void KDChartParams::setHeaderFooterFont( uint pos, const QFont& font,
\sa setHeader2Text(), header2Text()
\sa setFooterText(), footerText()
*/
-QFont KDChartParams::headerFooterFont( uint pos ) const
+TQFont KDChartParams::headerFooterFont( uint pos ) const
{
if ( HdFtPosEND >= pos )
return _hdFtParams[ pos ]._font;
else
- return QApplication::font();
+ return TQApplication::font();
}
@@ -7957,7 +7957,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn void KDChartParams::setHeader1Text( const QString& text )
+ \fn void KDChartParams::setHeader1Text( const TQString& text )
Specifies the text to be displayed as the first header line. The
default is not to display any header text.
@@ -7983,7 +7983,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn QString KDChartParams::header1Text() const
+ \fn TQString KDChartParams::header1Text() const
Returns the text that is displayed as the first header line.
@@ -8008,7 +8008,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn void KDChartParams::setHeader1Font( const QFont& font )
+ \fn void KDChartParams::setHeader1Font( const TQFont& font )
Specifies the font to be used for displaying the first header line.
The default is a 14pt Helvetica font.
@@ -8037,7 +8037,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn QFont KDChartParams::header1Font() const
+ \fn TQFont KDChartParams::header1Font() const
Returns the font used for displaying the second header line.
@@ -8064,7 +8064,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn void KDChartParams::setHeader2Text( const QString& text )
+ \fn void KDChartParams::setHeader2Text( const TQString& text )
Specifies the text to be displayed as the second header line. The
default is not to display any header text.
@@ -8090,7 +8090,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn QString KDChartParams::header2Text() const
+ \fn TQString KDChartParams::header2Text() const
Returns the text that is displayed as the second header line.
@@ -8115,7 +8115,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn void KDChartParams::setHeader2Font( const QFont& font )
+ \fn void KDChartParams::setHeader2Font( const TQFont& font )
Specifies the font to be used for displaying the second header line. The
default is a 12pt Helvetica font.
@@ -8144,7 +8144,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn QFont KDChartParams::header2Font() const
+ \fn TQFont KDChartParams::header2Font() const
Returns the font used for displaying the second header line.
@@ -8171,7 +8171,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn void KDChartParams::setFooterText( const QString& text )
+ \fn void KDChartParams::setFooterText( const TQString& text )
Specifies the text to be displayed as the footer line. The
default is not to display any footer text.
@@ -8197,7 +8197,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn QString KDChartParams::footerText() const
+ \fn TQString KDChartParams::footerText() const
Returns the text that is displayed as the footer line.
@@ -8222,7 +8222,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn void KDChartParams::setFooterFont( const QFont& font )
+ \fn void KDChartParams::setFooterFont( const TQFont& font )
Specifies the font to be used for displaying the footer line. The
default is a 12pt Helvetica font.
@@ -8250,7 +8250,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \fn QFont KDChartParams::footerFont() const
+ \fn TQFont KDChartParams::footerFont() const
Returns the font used for displaying the footer line.
@@ -8327,7 +8327,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
*/
/**
- \var QFont KDChartParams::_defaultFont;
+ \var TQFont KDChartParams::_defaultFont;
Stores our default font used for many different purposes.
*/
@@ -8351,7 +8351,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \var QRect KDChartParams::_noRect;
+ \var TQRect KDChartParams::_noRect;
Stores an empty rectangle.
*/
@@ -8396,7 +8396,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
*/
/**
- \var QMap < uint, QColor > KDChartParams::_dataColors;
+ \var TQMap < uint, TQColor > KDChartParams::_dataColors;
Stores the colors for the datasets.
*/
@@ -8453,21 +8453,21 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
*/
/**
- \var QMap < uint, QColor > KDChartParams::_dataColorsShadow1;
+ \var TQMap < uint, TQColor > KDChartParams::_dataColorsShadow1;
Stores the shadow colors that are somewhat darker than the colors in
_dataColors.
*/
/**
- \var QMap < uint, QColor > KDChartParams::_dataColorsShadow2;
+ \var TQMap < uint, TQColor > KDChartParams::_dataColorsShadow2;
Stores the shadow colors that are even more darker than the colors in
_dataColorsShadow1;
*/
/**
- \var QColor KDChartParams::_outlineDataColor;
+ \var TQColor KDChartParams::_outlineDataColor;
Stores the color to be used for outlines of data displays.
*/
@@ -8650,14 +8650,14 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
*/
/**
- \var QSize KDChartParams::_lineMarkerSize;
+ \var TQSize KDChartParams::_lineMarkerSize;
Stores the size of the line markers.
*/
/**
- \var QColor KDChartParams::_lineColor;
+ \var TQColor KDChartParams::_lineColor;
Stores the color of lines in line charts.
*/
@@ -8721,7 +8721,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
*/
/**
- \var QSize KDChartParams::_polarMarkerSize;
+ \var TQSize KDChartParams::_polarMarkerSize;
Stores the size of the polar markers.
*/
@@ -8776,14 +8776,14 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
*/
/**
- \var QMap<int,double> KDChartParams::_explodeFactors;
+ \var TQMap<int,double> KDChartParams::_explodeFactors;
Stores the list of segment-specific explode factors of pie or
ring segments.
*/
/**
- \var QValueList<int> KDChartParams::_explodeList;
+ \var TQValueList<int> KDChartParams::_explodeList;
Stores the list of pies or ring segments to explode.
*/
@@ -8836,7 +8836,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \var QFont KDChartParams::_hiLoChartLowValuesFont;
+ \var TQFont KDChartParams::_hiLoChartLowValuesFont;
Stores the font to be used for printing the low values.
*/
@@ -8859,7 +8859,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \var QColor KDChartParams::_hiLoChartLowValuesColor;
+ \var TQColor KDChartParams::_hiLoChartLowValuesColor;
Stores the colour of the font size to be used for printing the
low values.
@@ -8874,7 +8874,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \var QFont KDChartParams::_hiLoChartHighValuesFont;
+ \var TQFont KDChartParams::_hiLoChartHighValuesFont;
Stores the font to be used for printing the high values.
*/
@@ -8897,7 +8897,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \var QColor KDChartParams::_hiLoChartHighValuesColor;
+ \var TQColor KDChartParams::_hiLoChartHighValuesColor;
Stores the colour of the font size to be used for printing the
high values.
@@ -8912,7 +8912,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \var QFont KDChartParams::_hiLoChartOpenValuesFont;
+ \var TQFont KDChartParams::_hiLoChartOpenValuesFont;
Stores the font to be used for printing the open values.
*/
@@ -8935,7 +8935,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \var QColor KDChartParams::_hiLoChartOpenValuesColor;
+ \var TQColor KDChartParams::_hiLoChartOpenValuesColor;
Stores the colour of the font size to be used for printing the
open values.
@@ -8950,7 +8950,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \var QFont KDChartParams::_hiLoChartCloseValuesFont;
+ \var TQFont KDChartParams::_hiLoChartCloseValuesFont;
Stores the font to be used for printing the close values.
*/
@@ -8973,7 +8973,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \var QColor KDChartParams::_hiLoChartCloseValuesColor;
+ \var TQColor KDChartParams::_hiLoChartCloseValuesColor;
Stores the colour of the font size to be used for printing the
close values.
@@ -9018,7 +9018,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \var QBrush KDChartParams::_BWChartBrush;
+ \var TQBrush KDChartParams::_BWChartBrush;
Stores the brush to be used.
*/
@@ -9036,20 +9036,20 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
*/
/**
- \var QMap < int, QString > KDChartParams::_legendText;
+ \var TQMap < int, TQString > KDChartParams::_legendText;
Stores the manually set legend texts.
*/
/**
- \var QColor KDChartParams::_legendTextColor;
+ \var TQColor KDChartParams::_legendTextColor;
Stores the color for drawing the legend texts.
*/
/**
- \var QFont KDChartParams::_legendFont;
+ \var TQFont KDChartParams::_legendFont;
Stores the font for drawing the legends.
*/
@@ -9076,21 +9076,21 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/**
- \var QString KDChartParams::_legendTitleText;
+ \var TQString KDChartParams::_legendTitleText;
Stores the legend title text.
*/
/**
- \var QColor KDChartParams::_legendTitleTextColor;
+ \var TQColor KDChartParams::_legendTitleTextColor;
Stores the color for drawing the legend title.
*/
/**
- \var QFont KDChartParams::_legendTitleFont;
+ \var TQFont KDChartParams::_legendTitleFont;
Stores the font for drawing the legend title.
*/
@@ -9166,7 +9166,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
*/
bool KDChartParams::findFirstAxisCustomBoxID( uint n, uint& boxID ) const
{
- QIntDictIterator<KDChartCustomBox> it( _customBoxDict );
+ TQIntDictIterator<KDChartCustomBox> it( _customBoxDict );
for( ; it.current(); ++it ){
if( (*it).anchorArea() == KDChartEnums::AreaAxisBASE + n ){
boxID = it.currentKey();
@@ -9177,9 +9177,9 @@ bool KDChartParams::findFirstAxisCustomBoxID( uint n, uint& boxID ) const
}
void KDChartParams::insertDefaultAxisTitleBox( uint n,
- bool setTitle, const QString& axisTitle,
- bool setColor, const QColor& axisTitleColor,
- bool setFont, const QFont& axisTitleFont,
+ bool setTitle, const TQString& axisTitle,
+ bool setColor, const TQColor& axisTitleColor,
+ bool setFont, const TQFont& axisTitleFont,
bool setFontUseRelSize, bool axisTitleFontUseRelSize,
bool setFontRelSize, int axisTitleFontRelSize )
{
@@ -9203,18 +9203,18 @@ void KDChartParams::insertDefaultAxisTitleBox( uint n,
b3rd = true;
break;
}
- const QFont defaultFont( "helvetica", 6, QFont::Normal, false );
+ const TQFont defaultFont( "helvetica", 6, TQFont::Normal, false );
// SGI IRIX: Compiling error.
- // QString titleString( setTitle ? axisTitle : "<qt><center> </center></qt>" );
- QString titleString;
+ // TQString titleString( setTitle ? axisTitle : "<qt><center> </center></qt>" );
+ TQString titleString;
if( setTitle )
titleString = axisTitle;
else
titleString = "<qt><center> </center></qt>";
- const QString stripTitleString( titleString.simplifyWhiteSpace().upper() );
+ const TQString stripTitleString( titleString.simplifyWhiteSpace().upper() );
if( setTitle ){
if( !stripTitleString.startsWith("<QT>" ) )
titleString.prepend("<qt><center>");
@@ -9238,19 +9238,16 @@ void KDChartParams::insertDefaultAxisTitleBox( uint n,
true,
0, 0,
0, 0,
- setColor ? axisTitleColor : Qt::darkBlue,
+ setColor ? axisTitleColor : TQt::darkBlue,
Qt::NoBrush,
KDChartEnums::AreaAxisBASE + n,
- bVert ? KDChartEnums::PosCenterLeft : KDChartEnums::PosBottomCenter, bVert ? (Qt::AlignTop + Qt::AlignHCenter) : (Qt::AlignBottom + Qt::AlignHCenter),
+ bVert ? KDChartEnums::PosCenterLeft : KDChartEnums::PosBottomCenter, bVert ? (TQt::AlignTop + TQt::AlignHCenter) : (TQt::AlignBottom + TQt::AlignHCenter),
0,0,0,
- bVert ? (Qt::AlignBottom + Qt::AlignRight) : (Qt::AlignTop + Qt::AlignHCenter),
+ bVert ? (TQt::AlignBottom + TQt::AlignRight) : (TQt::AlignTop + TQt::AlignHCenter),
false, n );
customBox.setParentAxisArea( n );
- insertCustomBox( customBox );
- // J.Rodehuser: delete the unused variable 'id'
- // const uint id = insertCustomBox( customBox );
-
+ const uint id = insertCustomBox( customBox );
/*debugging Title box*/
/*
setSimpleFrame(
@@ -9262,8 +9259,8 @@ void KDChartParams::insertDefaultAxisTitleBox( uint n,
KDFrame::FrameFlat,
1,
0,
- Qt::red,
- QBrush( QColor ( 255,248,222 ) ) );
+ TQt::red,
+ TQBrush( TQColor ( 255,248,222 ) ) );
*/
}
@@ -9276,15 +9273,15 @@ void KDChartParams::insertDefaultAxisTitleBox( uint n,
\sa setAxisTitleColor,setAxisTitleFont,setAxisTitleFontUseRelSize, setAxisTitleFontRelSize
\sa axisTitle, axisTitleColor, axisTitleFont, axisTitleFontUseRelSize, axisTitleFontRelSize
*/
-void KDChartParams::setAxisTitle( uint n, const QString& axisTitle )
+void KDChartParams::setAxisTitle( uint n, const TQString& axisTitle )
{
bool bDone = false;
uint boxID;
if( findFirstAxisCustomBoxID( n, boxID ) ){
KDChartCustomBox* box = (KDChartCustomBox*)customBox( boxID );
if( box ){
- QString title = axisTitle;
- const QString stripTitleString( title.simplifyWhiteSpace().upper() );
+ TQString title = axisTitle;
+ const TQString stripTitleString( title.simplifyWhiteSpace().upper() );
if( !stripTitleString.startsWith("<QT>" ) )
title.prepend("<qt><center>");
if( !stripTitleString.endsWith("</QT>" ) )
@@ -9301,8 +9298,8 @@ void KDChartParams::setAxisTitle( uint n, const QString& axisTitle )
if( !bDone ){
insertDefaultAxisTitleBox( n,
true, axisTitle,
- false, QColor(),
- false, QFont(),
+ false, TQColor(),
+ false, TQFont(),
false, false,
false, 0 );
//qDebug("new Axis Title Box inserted");
@@ -9315,7 +9312,7 @@ void KDChartParams::setAxisTitle( uint n, const QString& axisTitle )
\return the axis title text.
\sa setAxisTitle
*/
-QString KDChartParams::axisTitle( uint n ) const
+TQString KDChartParams::axisTitle( uint n ) const
{
uint boxID;
if( findFirstAxisCustomBoxID( n, boxID ) ){
@@ -9323,7 +9320,7 @@ QString KDChartParams::axisTitle( uint n ) const
if( box )
return box->content().text();
}
- return QString();
+ return TQString();
}
/**
@@ -9333,7 +9330,7 @@ QString KDChartParams::axisTitle( uint n ) const
\sa setAxisTitle, setAxisTitleFont,setAxisTitleFontUseRelSize, setAxisTitleFontRelSize
\sa axisTitle, axisTitleColor, axisTitleFont, axisTitleFontUseRelSize, axisTitleFontRelSize
*/
-void KDChartParams::setAxisTitleColor( uint n, QColor axisTitleColor )
+void KDChartParams::setAxisTitleColor( uint n, TQColor axisTitleColor )
{
bool bDone = false;
uint boxID;
@@ -9346,9 +9343,9 @@ void KDChartParams::setAxisTitleColor( uint n, QColor axisTitleColor )
}
if( !bDone )
insertDefaultAxisTitleBox( n,
- false, QString(),
+ false, TQString(),
true, axisTitleColor,
- false, QFont(),
+ false, TQFont(),
false, false,
false, 0 );
emit changed();
@@ -9359,7 +9356,7 @@ void KDChartParams::setAxisTitleColor( uint n, QColor axisTitleColor )
\return the color of the axis title text.
\sa setAxisTitleColor
*/
-QColor KDChartParams::axisTitleColor( uint n ) const
+TQColor KDChartParams::axisTitleColor( uint n ) const
{
uint boxID;
if( findFirstAxisCustomBoxID( n, boxID ) ){
@@ -9367,7 +9364,7 @@ QColor KDChartParams::axisTitleColor( uint n ) const
if( box )
return box->color();
}
- return Qt::darkBlue;
+ return TQt::darkBlue;
}
/**
@@ -9380,7 +9377,7 @@ QColor KDChartParams::axisTitleColor( uint n ) const
\sa axisTitle, axisTitleColor, axisTitleFont, axisTitleFontUseRelSize, axisTitleFontRelSize
*/
void KDChartParams::setAxisTitleFont( uint n,
- QFont axisTitleFont )
+ TQFont axisTitleFont )
{
bool bDone = false;
uint boxID;
@@ -9395,8 +9392,8 @@ void KDChartParams::setAxisTitleFont( uint n,
}
if( !bDone )
insertDefaultAxisTitleBox( n,
- false, QString(),
- false, QColor(),
+ false, TQString(),
+ false, TQColor(),
true, axisTitleFont,
false, false,
false, 0 );
@@ -9413,7 +9410,7 @@ void KDChartParams::setAxisTitleFont( uint n,
*/
void KDChartParams::setAxisTitleFont( uint n,
- QFont axisTitleFont,
+ TQFont axisTitleFont,
bool useFixedFontSize )
{
@@ -9432,8 +9429,8 @@ void KDChartParams::setAxisTitleFont( uint n,
}
if( !bDone )
insertDefaultAxisTitleBox( n,
- false, QString(),
- false, QColor(),
+ false, TQString(),
+ false, TQColor(),
true, axisTitleFont,
false, false,
false, 0 );
@@ -9452,7 +9449,7 @@ void KDChartParams::setAxisTitleFont( uint n,
\return the axis title's font.
\sa setAxisTitleFont
*/
-QFont KDChartParams::axisTitleFont( uint n ) const
+TQFont KDChartParams::axisTitleFont( uint n ) const
{
uint boxID;
if( findFirstAxisCustomBoxID( n, boxID ) ){
@@ -9460,7 +9457,7 @@ QFont KDChartParams::axisTitleFont( uint n ) const
if( box )
return box->content().font();
}
- return QFont( "helvetica", 6, QFont::Normal, false );
+ return TQFont( "helvetica", 6, TQFont::Normal, false );
}
/**
@@ -9492,9 +9489,9 @@ void KDChartParams::setAxisTitleFontUseRelSize( uint n,
}
if( !bDone )
insertDefaultAxisTitleBox( n,
- false, QString(),
- false, QColor(),
- false, QFont(),
+ false, TQString(),
+ false, TQColor(),
+ false, TQFont(),
true, axisTitleFontUseRelSize,
false, 0 );
emit changed();
@@ -9539,9 +9536,9 @@ void KDChartParams::setAxisTitleFontRelSize( uint n,
}
if( !bDone )
insertDefaultAxisTitleBox( n,
- false, QString(),
- false, QColor(),
- false, QFont(),
+ false, TQString(),
+ false, TQColor(),
+ false, TQFont(),
true, true,
true, axisTitleFontRelSize );
emit changed();
diff --git a/libkdchart/KDChartParams.h b/libkdchart/KDChartParams.h
index 0667348..7196ef2 100644
--- a/libkdchart/KDChartParams.h
+++ b/libkdchart/KDChartParams.h
@@ -29,21 +29,21 @@
#ifndef __KDCHARTPARAMS_H__
#define __KDCHARTPARAMS_H__
-#include <qapplication.h>
-#include <qfont.h>
-#include <qcolor.h>
-#include <qpen.h>
-#include <qmap.h>
-#include <qdict.h>
-#include <qintdict.h>
-#include <qobject.h>
-#include <qtextstream.h>
-#include <qsimplerichtext.h>
-#include <qdom.h>
+#include <tqapplication.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqpen.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqintdict.h>
+#include <tqobject.h>
+#include <tqtextstream.h>
+#include <tqsimplerichtext.h>
+#include <tqdom.h>
#include <limits.h>
#include <math.h>
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#define M_PI 3.14159265358979323846
#endif
@@ -54,10 +54,10 @@
#include "KDChartAxisParams.h"
#include "KDChartPropertySet.h"
-#if COMPAT_QT_VERSION >= 0x030000
-#include <qvaluevector.h>
+#if COMPAT_TQT_VERSION >= 0x030000
+#include <tqvaluevector.h>
#else
-#include <qarray.h>
+#include <tqarray.h>
#endif
/** \file KDChartParams.h
@@ -70,7 +70,7 @@
*/
-typedef QIntDict<KDChartPropertySet> KDChartPropertySetList;
+typedef TQIntDict<KDChartPropertySet> KDChartPropertySetList;
#define KDCHART_ALL_AXES UINT_MAX-1
@@ -119,7 +119,7 @@ class KDCHART_EXPORT KDChartAutoColor {
public:
static const KDChartAutoColor* instance();
static void freeInstance();
- const QColor* color() const
+ const TQColor* color() const
{
return &mColor;
}
@@ -127,7 +127,7 @@ private:
KDChartAutoColor();
KDChartAutoColor( KDChartAutoColor const& );
~KDChartAutoColor();
- QColor mColor;
+ TQColor mColor;
static KDChartAutoColor *mInstance;
};
@@ -136,10 +136,11 @@ private:
*/
-class KDCHART_EXPORT KDChartParams : public QObject
+class KDCHART_EXPORT KDChartParams : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS(ChartType)
Q_ENUMS(SourceMode)
Q_ENUMS(BarChartSubType)
@@ -156,7 +157,7 @@ class KDCHART_EXPORT KDChartParams : public QObject
Q_ENUMS(LegendSource)
Q_ENUMS(HdFtPos)
- // Needed for QSA
+ // Needed for TQSA
Q_ENUMS( BrushStyle )
Q_ENUMS( PenStyle )
Q_ENUMS( Orientation )
@@ -222,10 +223,11 @@ public slots: // PENDING(blackie) merge public slots into one section.
public:
-// MOC_SKIP_BEGIN
+// TQMOC_SKIP_BEGIN
class KDCHART_EXPORT KDChartFrameSettings
{
// Q_OBJECT
+ // TQ_OBJECT
public:
KDChartFrameSettings();
KDChartFrameSettings( uint dataRow,
@@ -326,13 +328,13 @@ public:
virtual ~KDChartFrameSettings();
- static void createFrameSettingsNode( QDomDocument& document,
- QDomNode& parent,
- const QString& elementName,
+ static void createFrameSettingsNode( TQDomDocument& document,
+ TQDomNode& tqparent,
+ const TQString& elementName,
const KDChartFrameSettings* settings,
uint areaId );
- static bool readFrameSettingsNode( const QDomElement& element,
+ static bool readFrameSettingsNode( const TQDomElement& element,
KDChartFrameSettings& settings,
uint& areaId );
@@ -359,7 +361,7 @@ public:
}
private:
- // KDChartFrameSettings( const KDChartFrameSettings& other ) :QObject( 0 ) {
+ // KDChartFrameSettings( const KDChartFrameSettings& other ) :TQObject( 0 ) {
KDChartFrameSettings( const KDChartFrameSettings& ) {}
KDChartFrameSettings& operator=( const KDChartFrameSettings& ){return *this;}
@@ -377,7 +379,7 @@ public:
bool _addFrameHeightToLayout;
};
-// MOC_SKIP_END
+// TQMOC_SKIP_END
public slots:
@@ -391,7 +393,7 @@ public slots:
bool addFrameHeightToLayout = true )
{
_areaDict.setAutoDelete( TRUE );
- _areaDict.replace( QString( "%1/-----/-----/-----" ).arg( area, 5 ),
+ _areaDict.tqreplace( TQString( "%1/-----/-----/-----" ).tqarg( area, 5 ),
new KDChartFrameSettings(0,0,0,
frame,
outerGapX,
@@ -415,15 +417,15 @@ public slots:
KDFrame::SimpleFrame simpleFrame = KDFrame::FrameFlat,
int lineWidth = 1,
int midLineWidth = 0,
- QPen pen = QPen(),
- QBrush background = QBrush( Qt::NoBrush ),
- const QPixmap* backPixmap = 0, // no pixmap
+ TQPen pen = TQPen(),
+ TQBrush background = TQBrush( TQt::NoBrush ),
+ const TQPixmap* backPixmap = 0, // no pixmap
KDFrame::BackPixmapMode backPixmapMode = KDFrame::PixStretched,
int shadowWidth = 0,
KDFrame::CornerName sunPos = KDFrame::CornerTopLeft )
{
_areaDict.setAutoDelete( TRUE );
- KDFrame frame( QRect(0,0,0,0),
+ KDFrame frame( TQRect(0,0,0,0),
simpleFrame,
lineWidth,
midLineWidth,
@@ -434,7 +436,7 @@ public slots:
shadowWidth,
sunPos );
- _areaDict.replace( QString( "%1/-----/-----/-----" ).arg( area, 5 ),
+ _areaDict.tqreplace( TQString( "%1/-----/-----/-----" ).tqarg( area, 5 ),
new KDChartFrameSettings( 0,0,0, frame,
outerGapX,
outerGapY,
@@ -459,23 +461,23 @@ public slots:
KDFrame::SimpleFrame simpleFrame = KDFrame::FrameFlat,
int lineWidth = 1,
int midLineWidth = 0,
- QPen pen = QPen(),
+ TQPen pen = TQPen(),
int shadowWidth = 0,
KDFrame::CornerName sunPos = KDFrame::CornerTopLeft )
{
_areaDict.setAutoDelete( TRUE );
- KDFrame frame( QRect(0,0,0,0),
+ KDFrame frame( TQRect(0,0,0,0),
simpleFrame,
lineWidth,
midLineWidth,
pen,
- QBrush( Qt::NoBrush ),
+ TQBrush( TQt::NoBrush ),
0,
KDFrame::PixStretched,
shadowWidth,
sunPos );
- _areaDict.replace(
+ _areaDict.tqreplace(
dataRegionFrameAreaName( dataRow, dataCol, 0 ), //data3rd 5 ),
new KDChartFrameSettings( dataRow,
dataCol,
@@ -510,7 +512,7 @@ public slots:
public:
- typedef QIntDict <KDChartCustomBox > CustomBoxDict;
+ typedef TQIntDict <KDChartCustomBox > CustomBoxDict;
public slots:
uint insertCustomBox( const KDChartCustomBox & box );
@@ -539,8 +541,8 @@ public slots:
}
- static QString chartTypeToString( ChartType type );
- static ChartType stringToChartType( const QString& string );
+ static TQString chartTypeToString( ChartType type );
+ static ChartType stringToChartType( const TQString& string );
void setAdditionalChartType( ChartType chartType );
ChartType additionalChartType() const
@@ -564,8 +566,8 @@ public slots:
uint dataset2 = KDCHART_NO_DATASET,
uint chart = 0 );
- static QString chartSourceModeToString( const SourceMode& mode );
- static SourceMode stringToChartSourceMode( const QString& string );
+ static TQString chartSourceModeToString( const SourceMode& mode );
+ static SourceMode stringToChartSourceMode( const TQString& string );
bool neverUsedSetChartSourceMode() const
@@ -611,12 +613,12 @@ public slots:
}
- void calculateShadowColors( QColor color,
- QColor& shadow1,
- QColor& shadow2 ) const;
+ void calculateShadowColors( TQColor color,
+ TQColor& shadow1,
+ TQColor& shadow2 ) const;
- void setDataColor( uint dataset, QColor color );
- QColor dataColor( uint dataset ) const;
+ void setDataColor( uint dataset, TQColor color );
+ TQColor dataColor( uint dataset ) const;
void setDataDefaultColors();
void setDataRainbowColors();
@@ -636,7 +638,7 @@ public slots:
}
- void setShadowPattern( BrushStyle style ) {
+ void setShadowPattern( Qt::BrushStyle style ) {
_shadowPattern = style;
emit changed();
}
@@ -646,14 +648,14 @@ public slots:
}
- void setOutlineDataColor( QColor color )
+ void setOutlineDataColor( TQColor color )
{
_outlineDataColor = color;
emit changed();
}
- QColor outlineDataColor() const
+ TQColor outlineDataColor() const
{
return _outlineDataColor;
}
@@ -671,13 +673,13 @@ public slots:
}
- void setOutlineDataLineStyle( PenStyle style )
+ void setOutlineDataLineStyle( Qt::PenStyle style )
{
_outlineDataLineStyle = style;
emit changed();
}
- PenStyle outlineDataLineStyle() const
+ Qt::PenStyle outlineDataLineStyle() const
{
return _outlineDataLineStyle;
}
@@ -718,18 +720,18 @@ public slots:
uint chart = KDCHART_ALL_CHARTS,
int divPow10 = 0,
int digitsBehindComma = KDCHART_DATA_VALUE_AUTO_DIGITS,
- QFont* font = 0,
+ TQFont* font = 0,
uint size = UINT_MAX, // <-- makes us use the *default* font params
// by IGNORING settings of
// the following parameters!
- const QColor* color = KDCHART_DATA_VALUE_AUTO_COLOR,
+ const TQColor* color = KDCHART_DATA_VALUE_AUTO_COLOR,
KDChartEnums::PositionFlag negativePosition = KDChartEnums::PosCenter,
- uint negativeAlign = Qt::AlignCenter,
+ uint negativeAlign = TQt::AlignCenter,
int negativeDeltaX = 0,
int negativeDeltaY = 0,
int negativeRotation = 0,
KDChartEnums::PositionFlag positivePosition = KDChartEnums::PosCenter,
- uint positiveAlign = Qt::AlignCenter,
+ uint positiveAlign = TQt::AlignCenter,
int positiveDeltaX = 0,
int positiveDeltaY = 0,
int positiveRotation = 0,
@@ -738,7 +740,7 @@ public slots:
void setDataValuesCalc( int divPow10 = 0,
int digitsBehindComma = KDCHART_DATA_VALUE_AUTO_DIGITS,
uint chart = KDCHART_ALL_CHARTS );
- void setDataValuesFont( QFont* font,
+ void setDataValuesFont( TQFont* font,
uint size = UINT_MAX,
uint chart = KDCHART_ALL_CHARTS );
@@ -751,8 +753,8 @@ public slots:
bool specifyingPositiveValues = true,
uint chart = KDCHART_ALL_CHARTS );
- void setDataValuesColors( const QColor* color = KDCHART_DATA_VALUE_AUTO_COLOR,
- const QBrush& background = Qt::NoBrush,
+ void setDataValuesColors( const TQColor* color = KDCHART_DATA_VALUE_AUTO_COLOR,
+ const TQBrush& background = TQBrush(Qt::NoBrush),
uint chart = KDCHART_ALL_CHARTS );
// Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
@@ -803,7 +805,7 @@ public slots:
}
- QFont dataValuesFont( uint chart ) const
+ TQFont dataValuesFont( uint chart ) const
{
return chart ? _printDataValuesSettings2._dataValuesFont
: _printDataValuesSettings._dataValuesFont;
@@ -824,14 +826,14 @@ public slots:
}
- QColor dataValuesColor( uint chart ) const
+ TQColor dataValuesColor( uint chart ) const
{
return chart ? _printDataValuesSettings2._dataValuesColor
: _printDataValuesSettings._dataValuesColor;
}
- QBrush dataValuesBackground( uint chart ) const
+ TQBrush dataValuesBackground( uint chart ) const
{
return chart ? _printDataValuesSettings2._dataValuesBrush
: _printDataValuesSettings._dataValuesBrush;
@@ -868,14 +870,14 @@ public slots:
// for backward compatibility we may NOT remove these functions:
void setPrintDataValuesColor( uint chart = KDCHART_ALL_CHARTS,
- const QColor* color = KDCHART_DATA_VALUE_AUTO_COLOR );
+ const TQColor* color = KDCHART_DATA_VALUE_AUTO_COLOR );
void setPrintDataValuesFontRelSize( uint chart, uint size );
- static QString markerStyleToString( int style );
- static QString markerStyleToStringTr( int style );
- static int stringToMarkerStyle( const QString& string );
- static int stringToMarkerStyleTr( const QString& string );
+ static TQString markerStyleToString( int style );
+ static TQString markerStyleToStringTr( int style );
+ static int stringToMarkerStyle( const TQString& string );
+ static int stringToMarkerStyleTr( const TQString& string );
// END GENERAL
@@ -901,8 +903,8 @@ public slots:
- static QString barChartSubTypeToString( BarChartSubType type );
- static BarChartSubType stringToBarChartSubType( const QString& string );
+ static TQString barChartSubTypeToString( BarChartSubType type );
+ static BarChartSubType stringToBarChartSubType( const TQString& string );
void setThreeDBars( bool threeDBars )
@@ -930,8 +932,8 @@ public slots:
}
- QColor dataShadow1Color( uint dataset ) const;
- QColor dataShadow2Color( uint dataset ) const;
+ TQColor dataShadow1Color( uint dataset ) const;
+ TQColor dataShadow2Color( uint dataset ) const;
void setThreeDBarAngle( uint angle );
@@ -1070,8 +1072,8 @@ public slots:
}
- static LineChartSubType stringToLineChartSubType( const QString& string );
- static QString lineChartSubTypeToString( LineChartSubType type );
+ static LineChartSubType stringToLineChartSubType( const TQString& string );
+ static TQString lineChartSubTypeToString( LineChartSubType type );
void setLineMarker( bool marker )
@@ -1096,17 +1098,17 @@ public:
LineMarkerFastCross = 7 };
// PENDING(blackie) Add a wrapper for this
- typedef QMap<uint,LineMarkerStyle> LineMarkerStyleMap;
+ typedef TQMap<uint,LineMarkerStyle> LineMarkerStyleMap;
public slots:
void setLineMarkerStyle( uint dataset, LineMarkerStyle style );
void setLineMarkerStyles( LineMarkerStyleMap map );
LineMarkerStyle lineMarkerStyle( uint dataset ) const;
- static QString lineMarkerStyleToString( LineMarkerStyle style );
- static QString lineMarkerStyleToStringTr( LineMarkerStyle style );
- static LineMarkerStyle stringToLineMarkerStyle( const QString& string );
- static LineMarkerStyle stringToLineMarkerStyleTr( const QString& string );
+ static TQString lineMarkerStyleToString( LineMarkerStyle style );
+ static TQString lineMarkerStyleToStringTr( LineMarkerStyle style );
+ static LineMarkerStyle stringToLineMarkerStyle( const TQString& string );
+ static LineMarkerStyle stringToLineMarkerStyleTr( const TQString& string );
LineMarkerStyleMap lineMarkerStyles() const {
return _lineMarkerStyles;
@@ -1119,13 +1121,13 @@ public slots:
}
- void setLineMarkerSize( QSize size )
+ void setLineMarkerSize( TQSize size )
{
_lineMarkerSize = size;
emit changed();
}
- QSize lineMarkerSize() const
+ TQSize lineMarkerSize() const
{
return _lineMarkerSize;
}
@@ -1142,20 +1144,20 @@ public slots:
}
- void setLineColor( QColor color = QColor() )
+ void setLineColor( TQColor color = TQColor() )
{
_lineColor = color;
emit changed();
}
- QColor lineColor() const
+ TQColor lineColor() const
{
return _lineColor;
}
- void setLineStyle( PenStyle style, uint dataset=KDCHART_GLOBAL_LINE_STYLE );
+ void setLineStyle( Qt::PenStyle style, uint dataset=KDCHART_GLOBAL_LINE_STYLE );
- PenStyle lineStyle( uint dataset=KDCHART_GLOBAL_LINE_STYLE ) const;
+ Qt::PenStyle lineStyle( uint dataset=KDCHART_GLOBAL_LINE_STYLE ) const;
void setThreeDLines( bool threeD ) {
@@ -1234,8 +1236,8 @@ public slots:
}
- static QString areaChartSubTypeToString( AreaChartSubType type );
- static AreaChartSubType stringToAreaChartSubType( const QString& string );
+ static TQString areaChartSubTypeToString( AreaChartSubType type );
+ static AreaChartSubType stringToAreaChartSubType( const TQString& string );
public:
enum AreaLocation { AreaAbove, AreaBelow };
@@ -1253,8 +1255,8 @@ public slots:
}
- static QString areaLocationToString( AreaLocation type );
- static AreaLocation stringToAreaLocation( const QString& string );
+ static TQString areaLocationToString( AreaLocation type );
+ static AreaLocation stringToAreaLocation( const TQString& string );
// END LINE/AREA CHART-SPECIFIC
@@ -1275,8 +1277,8 @@ public slots:
}
- static PolarChartSubType stringToPolarChartSubType( const QString& string );
- static QString polarChartSubTypeToString( PolarChartSubType type );
+ static PolarChartSubType stringToPolarChartSubType( const TQString& string );
+ static TQString polarChartSubTypeToString( PolarChartSubType type );
void setPolarMarker( bool marker )
{
@@ -1301,13 +1303,13 @@ public:
public slots:
void setPolarMarkerStyle( uint dataset, PolarMarkerStyle style );
PolarMarkerStyle polarMarkerStyle( uint dataset ) const;
- static QString polarMarkerStyleToString( PolarMarkerStyle style );
- static QString polarMarkerStyleToStringTr( PolarMarkerStyle style );
- static PolarMarkerStyle stringToPolarMarkerStyle( const QString& string );
- static PolarMarkerStyle stringToPolarMarkerStyleTr( const QString& string );
+ static TQString polarMarkerStyleToString( PolarMarkerStyle style );
+ static TQString polarMarkerStyleToStringTr( PolarMarkerStyle style );
+ static PolarMarkerStyle stringToPolarMarkerStyle( const TQString& string );
+ static PolarMarkerStyle stringToPolarMarkerStyleTr( const TQString& string );
public:
- typedef QMap<uint,PolarMarkerStyle> PolarMarkerStyleMap;
+ typedef TQMap<uint,PolarMarkerStyle> PolarMarkerStyleMap;
public slots:
void setPolarMarkerStyles( PolarMarkerStyleMap map );
@@ -1321,13 +1323,13 @@ public slots:
return _maxDatasetPolarMarkerStyle;
}
- void setPolarMarkerSize( QSize size = QSize( -40, -40 ) )
+ void setPolarMarkerSize( TQSize size = TQSize( -40, -40 ) )
{
_polarMarkerSize = size;
emit changed();
}
- QSize polarMarkerSize() const
+ TQSize polarMarkerSize() const
{
return _polarMarkerSize;
}
@@ -1394,19 +1396,19 @@ public slots:
}
- void setExplodeValues( QValueList<int> explodeList ) {
+ void setExplodeValues( TQValueList<int> explodeList ) {
_explodeList = explodeList;
emit changed();
}
- // Unfortunately this is not avaialble from QSA-
- QValueList<int> explodeValues() const {
+ // Unfortunately this is not avaialble from TQSA-
+ TQValueList<int> explodeValues() const {
return _explodeList;
}
public:
- typedef QMap<int,double> ExplodeFactorsMap;
+ typedef TQMap<int,double> ExplodeFactorsMap;
public slots:
void setExplodeFactors( ExplodeFactorsMap factors ) {
@@ -1519,12 +1521,12 @@ public slots:
return _hiLoChartSubType;
}
- static QString hiLoChartSubTypeToString( HiLoChartSubType type );
- static HiLoChartSubType stringToHiLoChartSubType( const QString& string );
+ static TQString hiLoChartSubTypeToString( HiLoChartSubType type );
+ static HiLoChartSubType stringToHiLoChartSubType( const TQString& string );
void setHiLoChartPrintLowValues( bool active,
- QFont* font = 0,
+ TQFont* font = 0,
int size = 14,
- QColor* color = 0 );
+ TQColor* color = 0 );
bool hiLoChartPrintLowValues() const
{
@@ -1532,7 +1534,7 @@ public slots:
}
- QFont hiLoChartLowValuesFont() const
+ TQFont hiLoChartLowValuesFont() const
{
return _hiLoChartLowValuesFont;
}
@@ -1550,15 +1552,15 @@ public slots:
}
- QColor hiLoChartLowValuesColor() const
+ TQColor hiLoChartLowValuesColor() const
{
return _hiLoChartLowValuesColor;
}
void setHiLoChartPrintHighValues( bool active,
- QFont* font = 0,
+ TQFont* font = 0,
int size = 14,
- QColor* color = 0 );
+ TQColor* color = 0 );
bool hiLoChartPrintHighValues() const
@@ -1567,7 +1569,7 @@ public slots:
}
- QFont hiLoChartHighValuesFont() const
+ TQFont hiLoChartHighValuesFont() const
{
return _hiLoChartHighValuesFont;
}
@@ -1585,15 +1587,15 @@ public slots:
}
- QColor hiLoChartHighValuesColor() const
+ TQColor hiLoChartHighValuesColor() const
{
return _hiLoChartHighValuesColor;
}
void setHiLoChartPrintOpenValues( bool active,
- QFont* font = 0,
+ TQFont* font = 0,
uint size = 14,
- QColor* color = 0 );
+ TQColor* color = 0 );
bool hiLoChartPrintOpenValues() const
{
@@ -1601,7 +1603,7 @@ public slots:
}
- QFont hiLoChartOpenValuesFont() const
+ TQFont hiLoChartOpenValuesFont() const
{
return _hiLoChartOpenValuesFont;
}
@@ -1619,15 +1621,15 @@ public slots:
}
- QColor hiLoChartOpenValuesColor() const
+ TQColor hiLoChartOpenValuesColor() const
{
return _hiLoChartOpenValuesColor;
}
void setHiLoChartPrintCloseValues( bool active,
- QFont* font = 0,
+ TQFont* font = 0,
int size = 14,
- QColor* color = 0 );
+ TQColor* color = 0 );
bool hiLoChartPrintCloseValues() const
{
@@ -1635,7 +1637,7 @@ public slots:
}
- QFont hiLoChartCloseValuesFont() const
+ TQFont hiLoChartCloseValuesFont() const
{
return _hiLoChartCloseValuesFont;
}
@@ -1653,16 +1655,16 @@ public slots:
}
- QColor hiLoChartCloseValuesColor() const
+ TQColor hiLoChartCloseValuesColor() const
{
return _hiLoChartCloseValuesColor;
}
void setHiLoChartPrintFirstValues( bool active,
- QFont* font = 0,
+ TQFont* font = 0,
uint size = 14,
- QColor* color = 0 )
+ TQColor* color = 0 )
{
setHiLoChartPrintOpenValues( active, font, size, color );
}
@@ -1673,7 +1675,7 @@ public slots:
}
- QFont hiLoChartFirstValuesFont() const
+ TQFont hiLoChartFirstValuesFont() const
{
return hiLoChartOpenValuesFont();
}
@@ -1689,15 +1691,15 @@ public slots:
return hiLoChartOpenValuesFontRelSize();
}
- QColor hiLoChartFirstValuesColor() const
+ TQColor hiLoChartFirstValuesColor() const
{
return hiLoChartOpenValuesColor();
}
void setHiLoChartPrintLastValues( bool active,
- QFont* font = 0,
+ TQFont* font = 0,
int size = 14,
- QColor* color = 0 )
+ TQColor* color = 0 )
{
setHiLoChartPrintCloseValues( active, font, size, color );
}
@@ -1707,7 +1709,7 @@ public slots:
return hiLoChartPrintCloseValues();
}
- QFont hiLoChartLastValuesFont() const
+ TQFont hiLoChartLastValuesFont() const
{
return hiLoChartCloseValuesFont();
}
@@ -1722,7 +1724,7 @@ public slots:
return hiLoChartCloseValuesFontRelSize();
}
- QColor hiLoChartLastValuesColor() const
+ TQColor hiLoChartLastValuesColor() const
{
return hiLoChartCloseValuesColor();
}
@@ -1764,23 +1766,23 @@ public slots:
return _BWChartSubType;
}
- static QString bWChartSubTypeToString( BWChartSubType type );
- static BWChartSubType stringToBWChartSubType( const QString& string );
- static QString bWChartStatValToString( BWStatVal type );
- static BWStatVal stringToBWChartStatVal( const QString& string );
+ static TQString bWChartSubTypeToString( BWChartSubType type );
+ static BWChartSubType stringToBWChartSubType( const TQString& string );
+ static TQString bWChartStatValToString( BWStatVal type );
+ static BWStatVal stringToBWChartStatVal( const TQString& string );
void setBWChartFences( double upperInner, double lowerInner,
double upperOuter, double lowerOuter );
void bWChartFences( double& upperInner, double& lowerInner,
double& upperOuter, double& lowerOuter ) const;
- void setBWChartBrush( const QBrush& bWChartBrush )
+ void setBWChartBrush( const TQBrush& bWChartBrush )
{
_BWChartBrush = bWChartBrush;
emit changed();
}
- QBrush bWChartBrush() const
+ TQBrush bWChartBrush() const
{
return _BWChartBrush;
}
@@ -1798,10 +1800,10 @@ public slots:
void setBWChartPrintStatistics( BWStatVal statValue,
bool active,
- QFont* font = 0,
+ TQFont* font = 0,
int size = 24,
- QColor* color = 0,
- QBrush* brush = 0 );
+ TQColor* color = 0,
+ TQBrush* brush = 0 );
bool bWChartPrintStatistics( BWStatVal statValue ) const
{
@@ -1809,7 +1811,7 @@ public slots:
}
- QFont bWChartStatisticsFont( BWStatVal statValue ) const
+ TQFont bWChartStatisticsFont( BWStatVal statValue ) const
{
return _BWChartStatistics[ statValue ].font;
}
@@ -1827,12 +1829,12 @@ public slots:
}
- QColor bWChartStatisticsColor( BWStatVal statValue ) const
+ TQColor bWChartStatisticsColor( BWStatVal statValue ) const
{
return _BWChartStatistics[ statValue ].color;
}
- QBrush bWChartStatisticsBrush( BWStatVal statValue ) const
+ TQBrush bWChartStatisticsBrush( BWStatVal statValue ) const
{
return _BWChartStatistics[ statValue ].brush;
}
@@ -1869,13 +1871,13 @@ public slots:
return _legendPosition;
}
- void setLegendOrientation( Orientation orientation )
+ void setLegendOrientation( Qt::Orientation orientation )
{
_legendOrientation = orientation;
emit changed();
}
- Orientation legendOrientation() const
+ Qt::Orientation legendOrientation() const
{
return _legendOrientation;
}
@@ -1893,8 +1895,8 @@ public slots:
}
- static QString legendPositionToString( LegendPosition pos );
- static LegendPosition stringToLegendPosition( const QString& string );
+ static TQString legendPositionToString( LegendPosition pos );
+ static LegendPosition stringToLegendPosition( const TQString& string );
public:
enum LegendSource { LegendManual, LegendFirstColumn, LegendAutomatic };
@@ -1911,45 +1913,45 @@ public slots:
return _legendSource;
}
- static QString legendSourceToString( LegendSource source );
- static LegendSource stringToLegendSource( const QString& string );
+ static TQString legendSourceToString( LegendSource source );
+ static LegendSource stringToLegendSource( const TQString& string );
- void setLegendText( uint dataset, const QString& text )
+ void setLegendText( uint dataset, const TQString& text )
{
_legendText[ dataset ] = text;
emit changed();
}
- QString legendText( uint dataset ) const
+ TQString legendText( uint dataset ) const
{
- if( _legendText.find( dataset ) != _legendText.end() )
+ if( _legendText.tqfind( dataset ) != _legendText.end() )
return _legendText[ dataset ];
else
- return QString::null;
+ return TQString();
}
- void setLegendTextColor( const QColor& color )
+ void setLegendTextColor( const TQColor& color )
{
_legendTextColor = color;
emit changed();
}
- QColor legendTextColor() const
+ TQColor legendTextColor() const
{
return _legendTextColor;
}
- void setLegendFont( const QFont& font, bool useFontSize )
+ void setLegendFont( const TQFont& font, bool useFontSize )
{
_legendFont = font;
_legendFontUseRelSize = ! useFontSize;
emit changed();
}
- QFont legendFont() const
+ TQFont legendFont() const
{
return _legendFont;
}
@@ -1978,41 +1980,41 @@ public slots:
}
- void setLegendTitleText( const QString& text )
+ void setLegendTitleText( const TQString& text )
{
_legendTitleText = text;
emit changed();
}
- QString legendTitleText() const
+ TQString legendTitleText() const
{
return _legendTitleText;
}
- void setLegendTitleTextColor( const QColor& color )
+ void setLegendTitleTextColor( const TQColor& color )
{
_legendTitleTextColor = color;
emit changed();
}
- QColor legendTitleTextColor() const
+ TQColor legendTitleTextColor() const
{
return _legendTitleTextColor;
}
- void setLegendTitleFont( const QFont& font, bool useFontSize )
+ void setLegendTitleFont( const TQFont& font, bool useFontSize )
{
_legendTitleFont = font;
_legendTitleFontUseRelSize = ! useFontSize;
emit changed();
}
- QFont legendTitleFont() const
+ TQFont legendTitleFont() const
{
return _legendTitleFont;
}
@@ -2095,16 +2097,16 @@ public slots:
uint& chart ) const;
public:
-#if COMPAT_QT_VERSION >= 0x030000
- typedef QValueVector<uint> AxesArray;
+#if COMPAT_TQT_VERSION >= 0x030000
+ typedef TQValueVector<uint> AxesArray;
#else
- typedef QArray<uint> AxesArray;
+ typedef TQArray<uint> AxesArray;
#endif
public slots:
bool chartAxes( uint chart, uint& cnt, AxesArray& axes ) const;
- void setAxisArea( const uint n, const QRect& areaRect )
+ void setAxisArea( const uint n, const TQRect& areaRect )
{
if ( n < KDCHART_MAX_AXES ) {
_axisSettings[ n ].params.setAxisTrueAreaRect( areaRect );
@@ -2127,23 +2129,23 @@ public slots:
}
void setAxisLabelsFont( uint n,
- QFont axisLabelsFont,
+ TQFont axisLabelsFont,
int axisLabelsFontSize = 0,
- QColor axisLabelsColor = Qt::black );
+ TQColor axisLabelsColor = TQt::black );
// Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
void setAxisLabelTextParams( uint n,
bool axisSteadyValueCalc = true,
- QVariant axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT,
- QVariant axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT,
+ TQVariant axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT,
+ TQVariant axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT,
double axisValueDelta = KDCHART_AXIS_LABELS_AUTO_DELTA,
int axisDigitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS,
int axisMaxEmptyInnerSpan = 67,
KDChartAxisParams::LabelsFromDataRow takeLabelsFromDataRow
= KDChartAxisParams::LabelsFromDataRowNo,
int labelTextsDataRow = 0,
- QStringList* axisLabelStringList = 0,
- QStringList* axisShortLabelsStringList = 0,
+ TQStringList* axisLabelStringList = 0,
+ TQStringList* axisShortLabelsStringList = 0,
int axisValueLeaveOut = KDCHART_AXIS_LABELS_AUTO_LEAVEOUT,
KDChartAxisParams::ValueScale axisValueDeltaScale = KDChartAxisParams::ValueScaleNumerical )
{
@@ -2165,10 +2167,10 @@ public slots:
void setAxisLabelStringParams( uint n,
- QStringList* axisLabelStringList,
- QStringList* axisShortLabelStringList,
- const QString& valueStart = QString::null,
- const QString& valueEnd = QString::null );
+ TQStringList* axisLabelStringList,
+ TQStringList* axisShortLabelStringList,
+ const TQString& valueStart = TQString(),
+ const TQString& valueEnd = TQString() );
void setAxisParams( uint n,
@@ -2183,34 +2185,34 @@ public slots:
// some convenience functions refering to the first KDChartCustomBox
// that is anchored to the axis n.
bool findFirstAxisCustomBoxID( uint n, uint& boxID ) const;
- void setAxisTitle( uint n, const QString& axisTitle );
-
- QString axisTitle( uint n ) const;
- void setAxisTitleColor( uint n, QColor axisTitleColor );
- QColor axisTitleColor( uint n ) const;
- void setAxisTitleFont( uint n, QFont axisTitleFont );
- void setAxisTitleFont( uint n, QFont axisTitleFont, bool useFixedFontSize );
- QFont axisTitleFont( uint n ) const;
+ void setAxisTitle( uint n, const TQString& axisTitle );
+
+ TQString axisTitle( uint n ) const;
+ void setAxisTitleColor( uint n, TQColor axisTitleColor );
+ TQColor axisTitleColor( uint n ) const;
+ void setAxisTitleFont( uint n, TQFont axisTitleFont );
+ void setAxisTitleFont( uint n, TQFont axisTitleFont, bool useFixedFontSize );
+ TQFont axisTitleFont( uint n ) const;
void setAxisTitleFontUseRelSize( uint n, bool useRelSize );
bool axisTitleFontUseRelSize( uint n ) const;
void setAxisTitleFontRelSize( uint n, int axisTitleFontRelSize );
int axisTitleFontRelSize( uint n ) const;
- QRect axisArea( const uint n ) const
+ TQRect axisArea( const uint n ) const
{
if ( n < KDCHART_MAX_AXES ) {
return _axisSettings[ n ].params.axisTrueAreaRect();
// Do not do emit changed() here!
}else{
- return QRect(QPoint(0,0),QSize(0,0));
+ return TQRect(TQPoint(0,0),TQSize(0,0));
}
}
// END AXES
- QRect dataArea() const { return _dataAreaRect; }
- QRect legendArea() const { return _legendAreaRect; }
+ TQRect dataArea() const { return _dataAreaRect; }
+ TQRect legendArea() const { return _legendAreaRect; }
@@ -2291,15 +2293,15 @@ public:
public slots:
- void setHeaderFooterText( uint pos, const QString& text );
- QString headerFooterText( uint pos ) const;
- const QRect& headerFooterRect( uint pos ) const;
- void setHeaderFooterColor( uint pos, const QColor color );
- QColor headerFooterColor( uint pos ) const;
- void setHeaderFooterFont( uint pos, const QFont& font,
+ void setHeaderFooterText( uint pos, const TQString& text );
+ TQString headerFooterText( uint pos ) const;
+ const TQRect& headerFooterRect( uint pos ) const;
+ void setHeaderFooterColor( uint pos, const TQColor color );
+ TQColor headerFooterColor( uint pos ) const;
+ void setHeaderFooterFont( uint pos, const TQFont& font,
bool fontUseRelSize,
int fontRelSize );
- QFont headerFooterFont( uint pos ) const;
+ TQFont headerFooterFont( uint pos ) const;
bool headerFooterFontUseRelSize( uint pos ) const;
int headerFooterFontRelSize( uint pos ) const;
@@ -2311,76 +2313,76 @@ public slots:
// up to two centered header(s) and up to one centered footer.
- void setHeader1Text( const QString& text )
+ void setHeader1Text( const TQString& text )
{
_hdFtParams[ HdFtPosHeader ]._text = text;
emit changed();
}
- QString header1Text() const
+ TQString header1Text() const
{
return _hdFtParams[ HdFtPosHeader ]._text;
}
- void setHeader1Font( const QFont& font )
+ void setHeader1Font( const TQFont& font )
{
_hdFtParams[ HdFtPosHeader ]._font = font;
emit changed();
}
- QFont header1Font() const
+ TQFont header1Font() const
{
return _hdFtParams[ HdFtPosHeader ]._font;
}
- void setHeader2Text( const QString& text )
+ void setHeader2Text( const TQString& text )
{
_hdFtParams[ HdFtPosHeader2 ]._text = text;
emit changed();
}
- QString header2Text() const
+ TQString header2Text() const
{
return _hdFtParams[ HdFtPosHeader2 ]._text;
}
- void setHeader2Font( const QFont& font )
+ void setHeader2Font( const TQFont& font )
{
_hdFtParams[ HdFtPosHeader2 ]._font = font;
emit changed();
}
- QFont header2Font() const
+ TQFont header2Font() const
{
return _hdFtParams[ HdFtPosHeader2 ]._font;
}
- void setFooterText( const QString& text )
+ void setFooterText( const TQString& text )
{
_hdFtParams[ HdFtPosFooter ]._text = text;
emit changed();
}
- QString footerText() const
+ TQString footerText() const
{
return _hdFtParams[ HdFtPosFooter ]._text;
}
- void setFooterFont( const QFont& font )
+ void setFooterFont( const TQFont& font )
{
_hdFtParams[ HdFtPosFooter ]._font = font;
emit changed();
}
- QFont footerFont() const
+ TQFont footerFont() const
{
return _hdFtParams[ HdFtPosFooter ]._font;
}
@@ -2389,7 +2391,7 @@ public slots:
/**
\internal
*/
- void __internalStoreHdFtRect( int pos, QRect rect )
+ void __internalStoreHdFtRect( int pos, TQRect rect )
{
if ( 0 <= pos && HdFtPosEND >= pos )
_hdFtParams[ pos ].setRect( rect );
@@ -2405,54 +2407,54 @@ public:
virtual ~KDChartParams();
public slots:
- void loadAxesFormXML(int& curAxisSettings, QDomElement& element);
- bool loadXML( const QDomDocument& doc );
+ void loadAxesFormXML(int& curAxisSettings, TQDomElement& element);
+ bool loadXML( const TQDomDocument& doc );
- void saveAxesToXML(QDomDocument& doc, QDomElement& docRoot) const;
- QDomDocument saveXML( bool withPI = true ) const;
+ void saveAxesToXML(TQDomDocument& doc, TQDomElement& docRoot) const;
+ TQDomDocument saveXML( bool withPI = true ) const;
public:
- friend QTextStream& operator<<( QTextStream& s, const KDChartParams& p );
- friend QTextStream& operator>>( QTextStream& s, KDChartParams& p );
+ friend TQTextStream& operator<<( TQTextStream& s, const KDChartParams& p );
+ friend TQTextStream& operator>>( TQTextStream& s, KDChartParams& p );
public slots:
- static void createChartValueNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QVariant& valY,
- const QVariant& valX,
+ static void createChartValueNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQVariant& valY,
+ const TQVariant& valX,
const int& propID );
- static void createColorMapNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QMap< uint, QColor >& map );
- static void createDoubleMapNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QMap< int, double >& map );
- static void createChartFontNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QFont& font, bool useRelFont,
+ static void createColorMapNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQMap< uint, TQColor >& map );
+ static void createDoubleMapNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQMap< int, double >& map );
+ static void createChartFontNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQFont& font, bool useRelFont,
int relFont,
int minFont=-1 );
- static bool readColorMapNode( const QDomElement& element,
- QMap<uint,QColor>* map );
- static bool readDoubleMapNode( const QDomElement& element,
- QMap<int,double>* map );
- static bool readChartFontNode( const QDomElement& element, QFont& font,
+ static bool readColorMapNode( const TQDomElement& element,
+ TQMap<uint,TQColor>* map );
+ static bool readDoubleMapNode( const TQDomElement& element,
+ TQMap<int,double>* map );
+ static bool readChartFontNode( const TQDomElement& element, TQFont& font,
bool& useRelFont, int& relFontSize,
int* minFontSize=0 );
- static bool readChartValueNode( const QDomElement& element,
- QVariant& valY,
- QVariant& valX,
+ static bool readChartValueNode( const TQDomElement& element,
+ TQVariant& valY,
+ TQVariant& valX,
int& propID );
// do *not* call this function manually: it is used by KDChartPainter::setupGeometry()
- void setDataArea( const QRect& areaRect )
+ void setDataArea( const TQRect& areaRect )
{
_dataAreaRect = areaRect;
// Do not do emit changed() here!
}
// do *not* call this function manually: it is used by KDChartPainter::setupGeometry()
- void setLegendArea( const QRect& areaRect )
+ void setLegendArea( const TQRect& areaRect )
{
_legendAreaRect = areaRect;
// Do not do emit changed() here!
@@ -2475,18 +2477,18 @@ protected:
private:
- QString dataRegionFrameAreaName( uint dataRow,
+ TQString dataRegionFrameAreaName( uint dataRow,
uint dataCol,
uint data3rd );
void recomputeShadowColors();
void insertDefaultAxisTitleBox( uint n,
- bool setTitle, const QString& axisTitle,
- bool setColor, const QColor& axisTitleColor,
- bool setFont, const QFont& axisTitleFont,
+ bool setTitle, const TQString& axisTitle,
+ bool setColor, const TQColor& axisTitleColor,
+ bool setFont, const TQFont& axisTitleFont,
bool setFontUseRel, bool useFontSize,
bool setFontRelSize, int axisTitleFontRelSize );
- static QColor _internalPointer_DataValueAutoColor;
+ static TQColor _internalPointer_DataValueAutoColor;
KDChartPropertySet* tempPropSetA;
KDChartPropertySet* tempPropSetB;
@@ -2499,14 +2501,14 @@ private:
ChartType _chartType;
ChartType _additionalChartType;
int _numValues;
- QFont _defaultFont;
+ TQFont _defaultFont;
- typedef QDict < KDChartFrameSettings > AreaDict;
+ typedef TQDict < KDChartFrameSettings > AreaDict;
AreaDict _areaDict;
CustomBoxDict _customBoxDict;
bool _customBoxDictMayContainHoles;
- QRect _noRect;
+ TQRect _noRect;
KDFrame _noFrame;
KDChartFrameSettings _noFrameSettings;
@@ -2543,32 +2545,32 @@ private:
uint _chart;
};
- typedef QMap < uint, ModeAndChart > ModeAndChartMap;
+ typedef TQMap < uint, ModeAndChart > ModeAndChartMap;
ModeAndChartMap _dataSourceModeAndChart;
bool _setChartSourceModeWasUsed;
- QMap < uint, QColor > _dataColors;
+ TQMap < uint, TQColor > _dataColors;
uint _maxDatasetSourceMode;
KDChartPropertySetList _propertySetList;
double _shadowBrightnessFactor;
Qt::BrushStyle _shadowPattern;
bool _threeDShadowColors;
uint _maxDatasetColor;
- QMap < uint, QColor > _dataColorsShadow1;
- QMap < uint, QColor > _dataColorsShadow2;
- QColor _outlineDataColor;
+ TQMap < uint, TQColor > _dataColorsShadow1;
+ TQMap < uint, TQColor > _dataColorsShadow2;
+ TQColor _outlineDataColor;
uint _outlineDataLineWidth;
- PenStyle _outlineDataLineStyle;
+ Qt::PenStyle _outlineDataLineStyle;
struct PrintDataValuesSettings {
bool _printDataValues;
int _divPow10;
int _digitsBehindComma;
- QFont _dataValuesFont;
+ TQFont _dataValuesFont;
bool _dataValuesUseFontRelSize;
int _dataValuesFontRelSize;
- QColor _dataValuesColor;
- QBrush _dataValuesBrush;
+ TQColor _dataValuesColor;
+ TQBrush _dataValuesBrush;
bool _dataValuesAutoColor;
KDChartEnums::PositionFlag _dataValuesAnchorNegativePosition;
uint _dataValuesAnchorNegativeAlign;
@@ -2602,8 +2604,8 @@ private:
int _userWidth;
bool _solidExcessArrows;
// volatile bar chart information, not saved in the stream
- QRect _dataAreaRect;
- QRect _legendAreaRect;
+ TQRect _dataAreaRect;
+ TQRect _legendAreaRect;
int _barsDisplayed;
int _barsLeft;
@@ -2616,11 +2618,11 @@ private:
bool _lineMarker;
LineMarkerStyleMap _lineMarkerStyles;
uint _maxDatasetLineMarkerStyle;
- QSize _lineMarkerSize;
- QColor _lineColor;
+ TQSize _lineMarkerSize;
+ TQColor _lineColor;
int _lineWidth;
- PenStyle _lineStyle;
- typedef QMap<uint, PenStyle> LineStyleMap;
+ Qt::PenStyle _lineStyle;
+ typedef TQMap<uint, Qt::PenStyle> LineStyleMap;
LineStyleMap _datasetLineStyles;
AreaChartSubType _areaChartSubType;
AreaLocation _areaLocation;
@@ -2631,7 +2633,7 @@ private:
bool _polarMarker;
PolarMarkerStyleMap _polarMarkerStyles;
uint _maxDatasetPolarMarkerStyle;
- QSize _polarMarkerSize;
+ TQSize _polarMarkerSize;
int _polarLineWidth;
int _polarZeroDegreePos;
bool _polarRotateCircularLabels;
@@ -2647,7 +2649,7 @@ private:
bool _explode;
double _explodeFactor;
ExplodeFactorsMap _explodeFactors;
- QValueList<int> _explodeList;
+ TQValueList<int> _explodeList;
bool _threeDPies;
int _threeDPieHeight;
int _pieStart;
@@ -2659,25 +2661,25 @@ private:
HiLoChartSubType _hiLoChartSubType;
bool _hiLoChartPrintLowValues;
- QFont _hiLoChartLowValuesFont;
+ TQFont _hiLoChartLowValuesFont;
bool _hiLoChartLowValuesUseFontRelSize;
int _hiLoChartLowValuesFontRelSize;
- QColor _hiLoChartLowValuesColor;
+ TQColor _hiLoChartLowValuesColor;
bool _hiLoChartPrintHighValues;
- QFont _hiLoChartHighValuesFont;
+ TQFont _hiLoChartHighValuesFont;
bool _hiLoChartHighValuesUseFontRelSize;
int _hiLoChartHighValuesFontRelSize;
- QColor _hiLoChartHighValuesColor;
+ TQColor _hiLoChartHighValuesColor;
bool _hiLoChartPrintOpenValues;
- QFont _hiLoChartOpenValuesFont;
+ TQFont _hiLoChartOpenValuesFont;
bool _hiLoChartOpenValuesUseFontRelSize;
int _hiLoChartOpenValuesFontRelSize;
- QColor _hiLoChartOpenValuesColor;
+ TQColor _hiLoChartOpenValuesColor;
bool _hiLoChartPrintCloseValues;
- QFont _hiLoChartCloseValuesFont;
+ TQFont _hiLoChartCloseValuesFont;
bool _hiLoChartCloseValuesUseFontRelSize;
int _hiLoChartCloseValuesFontRelSize;
- QColor _hiLoChartCloseValuesColor;
+ TQColor _hiLoChartCloseValuesColor;
@@ -2689,11 +2691,11 @@ private:
double value;
int y;
bool active;
- QFont font;
+ TQFont font;
bool useRelSize;
int relSize;
- QColor color;
- QBrush brush;
+ TQColor color;
+ TQBrush brush;
};
BWChartStatistics _BWChartStatistics[ BWStatValOffEndValue ];
double _BWChartFenceUpperInner;
@@ -2701,7 +2703,7 @@ private:
double _BWChartFenceUpperOuter;
double _BWChartFenceLowerOuter;
int _BWChartOutValMarkerSize;
- QBrush _BWChartBrush;
+ TQBrush _BWChartBrush;
// LEGENDS
@@ -2710,14 +2712,14 @@ private:
Qt::Orientation _legendOrientation;
bool _legendShowLines;
LegendSource _legendSource;
- QMap < int, QString > _legendText;
- QColor _legendTextColor;
- QFont _legendFont;
+ TQMap < int, TQString > _legendText;
+ TQColor _legendTextColor;
+ TQFont _legendFont;
bool _legendFontUseRelSize;
int _legendFontRelSize;
- QString _legendTitleText;
- QColor _legendTitleTextColor;
- QFont _legendTitleFont;
+ TQString _legendTitleText;
+ TQColor _legendTitleTextColor;
+ TQFont _legendTitleFont;
bool _legendTitleFontUseRelSize;
int _legendTitleFontRelSize;
uint _legendSpacing;
@@ -2748,29 +2750,29 @@ private:
// Must be exported because of the inline methods
struct KDCHART_EXPORT HdFtParams
{
- QString _text;
- QColor _color;
- QFont _font;
+ TQString _text;
+ TQColor _color;
+ TQFont _font;
bool _fontUseRelSize;
int _fontRelSize;
HdFtParams()
{
- _color = QColor( Qt::black );
- _font = QFont( "helvetica", 10, QFont::Normal, false );
+ _color = TQColor( TQt::black );
+ _font = TQFont( "helvetica", 10, TQFont::Normal, false );
_fontUseRelSize = true;
_fontRelSize = 8; // per default quite small
}
- void setRect( QRect rect )
+ void setRect( TQRect rect )
{
_rect = rect;
}
- const QRect& rect() const
+ const TQRect& rect() const
{
return _rect;
}
private:
// temporary data that are NOT to be stored within sessions:
- QRect _rect;
+ TQRect _rect;
};
HdFtParams _hdFtParams[ HdFtPosEND + 1 ];
@@ -2778,10 +2780,10 @@ private:
};
-QTextStream& operator<<( QTextStream& s, const KDChartParams& p );
+TQTextStream& operator<<( TQTextStream& s, const KDChartParams& p );
-QTextStream& operator>>( QTextStream& s, KDChartParams& p );
+TQTextStream& operator>>( TQTextStream& s, KDChartParams& p );
#endif
diff --git a/libkdchart/KDChartParamsWrapper.cpp b/libkdchart/KDChartParamsWrapper.cpp
index 49e5166..00cdb54 100644
--- a/libkdchart/KDChartParamsWrapper.cpp
+++ b/libkdchart/KDChartParamsWrapper.cpp
@@ -1,7 +1,7 @@
#include "KDChartParamsWrapper.h"
#include <KDChartParams.h>
-KDChartParamsWrapper::KDChartParamsWrapper( KDChartParams* data ) :QObject(0), _data(data)
+KDChartParamsWrapper::KDChartParamsWrapper( KDChartParams* data ) :TQObject(0), _data(data)
{
}
@@ -11,59 +11,59 @@ const KDChartAxisParams* KDChartParamsWrapper::axisParams( uint n ) const
return &a;
}
-void KDChartParamsWrapper::setExplodeValues( QVariant explodeList )
+void KDChartParamsWrapper::setExplodeValues( TQVariant explodeList )
{
- if ( !explodeList.type() == QVariant::List )
+ if ( !explodeList.type() == TQVariant::List )
return;
- QValueList<QVariant> list = explodeList.toList();
+ TQValueList<TQVariant> list = explodeList.toList();
- QValueList<int> res;
- for( QValueList<QVariant>::Iterator it = list.begin(); it != list.end(); ++it ) {
+ TQValueList<int> res;
+ for( TQValueList<TQVariant>::Iterator it = list.begin(); it != list.end(); ++it ) {
int x = (*it).toInt();
res.append(x);
}
_data->setExplodeValues( res );
}
-void KDChartParamsWrapper::setExplodeFactors( QVariant factors )
+void KDChartParamsWrapper::setExplodeFactors( TQVariant factors )
{
- if ( !factors.type() == QVariant::List )
+ if ( !factors.type() == TQVariant::List )
return;
- QValueList<QVariant> list = factors.toList();
+ TQValueList<TQVariant> list = factors.toList();
KDChartParams::ExplodeFactorsMap res;
int i = 0;
- for( QValueList<QVariant>::Iterator it = list.begin(); it != list.end(); ++it, ++i ) {
+ for( TQValueList<TQVariant>::Iterator it = list.begin(); it != list.end(); ++it, ++i ) {
res[i] = (*it).toDouble();
}
_data->setExplodeFactors( res );
}
-void KDChartParamsWrapper::setAxisLabelStringParams( uint n, QVariant axisLabelStringList, QVariant axisShortLabelStringList,
- const QString& valueStart, const QString& valueEnd )
+void KDChartParamsWrapper::setAxisLabelStringParams( uint n, TQVariant axisLabelStringList, TQVariant axisShortLabelStringList,
+ const TQString& valueStart, const TQString& valueEnd )
{
- QStringList l1 = axisLabelStringList.toStringList();
- QStringList l2 = axisShortLabelStringList.toStringList();
+ TQStringList l1 = axisLabelStringList.toStringList();
+ TQStringList l2 = axisShortLabelStringList.toStringList();
_data->setAxisLabelStringParams( n, &l1, &l2, valueStart, valueEnd );
}
void KDChartParamsWrapper::setAxisLabelTextParams( uint n,
bool axisSteadyValueCalc,
- QVariant axisValueStart,
- QVariant axisValueEnd,
+ TQVariant axisValueStart,
+ TQVariant axisValueEnd,
double axisValueDelta,
int axisDigitsBehindComma,
int axisMaxEmptyInnerSpan,
int takeLabelsFromDataRow,
int labelTextsDataRow,
- const QVariant& axisLabelStringList,
- const QVariant& axisShortLabelsStringList,
+ const TQVariant& axisLabelStringList,
+ const TQVariant& axisShortLabelsStringList,
int axisValueLeaveOut,
int axisValueDeltaScale ) {
- QStringList l1 = axisLabelStringList.toStringList();
- QStringList l2 = axisShortLabelsStringList.toStringList();
+ TQStringList l1 = axisLabelStringList.toStringList();
+ TQStringList l2 = axisShortLabelsStringList.toStringList();
_data->setAxisLabelTextParams( n, axisSteadyValueCalc, axisValueStart, axisValueEnd, axisValueDelta, axisDigitsBehindComma, axisMaxEmptyInnerSpan,
(KDChartAxisParams::LabelsFromDataRow) takeLabelsFromDataRow, labelTextsDataRow, &l1, &l2,
diff --git a/libkdchart/KDChartParamsWrapper.h b/libkdchart/KDChartParamsWrapper.h
index 827cef1..f691408 100644
--- a/libkdchart/KDChartParamsWrapper.h
+++ b/libkdchart/KDChartParamsWrapper.h
@@ -1,26 +1,27 @@
#ifndef KDCHARTPARAMSWRAPPER_H
#define KDCHARTPARAMSWRAPPER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <KDFrame.h>
#include <KDChartParams.h>
-#include <qvariant.h>
+#include <tqvariant.h>
class KDChartAxisParams;
-class KDChartParamsWrapper :public QObject
+class KDChartParamsWrapper :public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KDChartParamsWrapper( KDChartParams* );
public slots:
const KDChartAxisParams* axisParams( uint n ) const;
- void setExplodeValues( QVariant explodeList );
- void setExplodeFactors( QVariant factors );
+ void setExplodeValues( TQVariant explodeList );
+ void setExplodeFactors( TQVariant factors );
void setAxisLabelStringParams( uint n,
- QVariant axisLabelStringList,
- QVariant axisShortLabelStringList,
- const QString& valueStart = QString::null,
- const QString& valueEnd = QString::null );
+ TQVariant axisLabelStringList,
+ TQVariant axisShortLabelStringList,
+ const TQString& valueStart = TQString(),
+ const TQString& valueEnd = TQString() );
// These methods need to be here, for the enums to work.
void setSimpleFrame( uint area,
@@ -33,9 +34,9 @@ public slots:
int simpleFrame = KDFrame::FrameFlat,
int lineWidth = 1,
int midLineWidth = 0,
- QPen pen = QPen(),
- QBrush background = QBrush( Qt::NoBrush ),
- const QPixmap* backPixmap = 0, // no pixmap
+ TQPen pen = TQPen(),
+ TQBrush background = TQBrush( TQt::NoBrush ),
+ const TQPixmap* backPixmap = 0, // no pixmap
int backPixmapMode = KDFrame::PixStretched,
int shadowWidth = 0,
int sunPos = KDFrame::CornerTopLeft )
@@ -55,7 +56,7 @@ public slots:
int simpleFrame = KDFrame::FrameFlat,
int lineWidth = 1,
int midLineWidth = 0,
- QPen pen = QPen(),
+ TQPen pen = TQPen(),
int shadowWidth = 0,
int sunPos = KDFrame::CornerTopLeft )
{
@@ -80,18 +81,18 @@ public slots:
uint chart = KDCHART_ALL_CHARTS,
int divPow10 = 0,
int digitsBehindComma = KDCHART_DATA_VALUE_AUTO_DIGITS,
- QFont* font = 0,
+ TQFont* font = 0,
uint size = UINT_MAX, // <-- makes us use the *default* font params
// by IGNORING settings of
// the following parameters!
- const QColor* color = KDCHART_DATA_VALUE_AUTO_COLOR,
+ const TQColor* color = KDCHART_DATA_VALUE_AUTO_COLOR,
int negativePosition = KDChartEnums::PosCenter,
- uint negativeAlign = Qt::AlignCenter,
+ uint negativeAlign = TQt::AlignCenter,
int negativeDeltaX = 0,
int negativeDeltaY = 0,
int negativeRotation = 0,
int positivePosition = KDChartEnums::PosCenter,
- uint positiveAlign = Qt::AlignCenter,
+ uint positiveAlign = TQt::AlignCenter,
int positiveDeltaX = 0,
int positiveDeltaY = 0,
int positiveRotation = 0,
@@ -151,15 +152,15 @@ public slots:
void setAxisLabelTextParams( uint n,
bool axisSteadyValueCalc = true,
- QVariant axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT,
- QVariant axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT,
+ TQVariant axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT,
+ TQVariant axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT,
double axisValueDelta = KDCHART_AXIS_LABELS_AUTO_DELTA,
int axisDigitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS,
int axisMaxEmptyInnerSpan = 67,
int takeLabelsFromDataRow = KDChartAxisParams::LabelsFromDataRowNo,
int labelTextsDataRow = 0,
- const QVariant& axisLabelStringList = QStringList(),
- const QVariant& axisShortLabelsStringList = QStringList(),
+ const TQVariant& axisLabelStringList = TQStringList(),
+ const TQVariant& axisShortLabelsStringList = TQStringList(),
int axisValueLeaveOut = KDCHART_AXIS_LABELS_AUTO_LEAVEOUT,
int axisValueDeltaScale = KDChartAxisParams::ValueScaleNumerical );
diff --git a/libkdchart/KDChartParams_frame.cpp b/libkdchart/KDChartParams_frame.cpp
index c873a0a..30aec04 100644
--- a/libkdchart/KDChartParams_frame.cpp
+++ b/libkdchart/KDChartParams_frame.cpp
@@ -119,7 +119,7 @@ KDChartParams::KDChartFrameSettings::~KDChartFrameSettings()
\param element the DOM element to read from
\param settings the frame settings object to read the data into
*/
-bool KDChartParams::KDChartFrameSettings::readFrameSettingsNode( const QDomElement& element,
+bool KDChartParams::KDChartFrameSettings::readFrameSettingsNode( const TQDomElement& element,
KDChartFrameSettings& settings,
uint& areaId )
{
@@ -132,11 +132,11 @@ bool KDChartParams::KDChartFrameSettings::readFrameSettingsNode( const QDomEleme
int tempOuterGapX, tempOuterGapY, tempInnerGapX, tempInnerGapY;
bool tempAddFrameWidthToLayout, tempAddFrameHeightToLayout;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Frame" ) {
ok = ok & KDFrame::readFrameNode( element, tempFrame );
} else if( tagName == "AreaId" ) {
@@ -248,18 +248,18 @@ bool KDChartParams::KDChartFrameSettings::readFrameSettingsNode( const QDomEleme
object for use in a DOM document.
\param document the DOM document to which the node will belong
- \param parent the parent node to which the new node will be appended
+ \param tqparent the tqparent node to which the new node will be appended
\param elementName the name of the new node
\param settings the frame settings to be represented
*/
-void KDChartParams::KDChartFrameSettings::createFrameSettingsNode( QDomDocument& document,
- QDomNode& parent,
- const QString& elementName,
+void KDChartParams::KDChartFrameSettings::createFrameSettingsNode( TQDomDocument& document,
+ TQDomNode& tqparent,
+ const TQString& elementName,
const KDChartParams::KDChartFrameSettings* settings,
uint areaId )
{
- QDomElement frameSettingsElement = document.createElement( elementName );
- parent.appendChild( frameSettingsElement );
+ TQDomElement frameSettingsElement = document.createElement( elementName );
+ tqparent.appendChild( frameSettingsElement );
if( settings->_frame )
KDFrame::createFrameNode( document, frameSettingsElement, "Frame",
*settings->_frame );
diff --git a/libkdchart/KDChartParams_io.cpp b/libkdchart/KDChartParams_io.cpp
index 092229e..0006451 100644
--- a/libkdchart/KDChartParams_io.cpp
+++ b/libkdchart/KDChartParams_io.cpp
@@ -29,10 +29,10 @@
#include "KDChartParams.h"
#include <KDXMLTools.h>
-#include <qintdict.h>
+#include <tqintdict.h>
/**
- \fn QTextStream& operator<<( QTextStream& s, const KDChartParams& p );
+ \fn TQTextStream& operator<<( TQTextStream& s, const KDChartParams& p );
Writes the KDChartParams object p as an XML document to the text stream s.
@@ -40,9 +40,9 @@
\param p the KDChartParams object to write
\return the text stream after the write operation
*/
-QTextStream& operator<<( QTextStream& s, const KDChartParams& p )
+TQTextStream& operator<<( TQTextStream& s, const KDChartParams& p )
{
- QDomDocument document = p.saveXML();
+ TQDomDocument document = p.saveXML();
s << document.toString();
return s;
@@ -52,11 +52,11 @@ QTextStream& operator<<( QTextStream& s, const KDChartParams& p )
Helper method saving the axis parameters to an XML file,
this is called by saveXML() only.
*/
-void KDChartParams::saveAxesToXML(QDomDocument& doc, QDomElement& docRoot) const
+void KDChartParams::saveAxesToXML(TQDomDocument& doc, TQDomElement& docRoot) const
{
// the AxisSettings elements
for( int axis = 0; axis < 13; axis++ ) {
- QDomElement axisSettingsElement =
+ TQDomElement axisSettingsElement =
doc.createElement( "AxisSettings" );
docRoot.appendChild( axisSettingsElement );
axisSettingsElement.setAttribute( "Dataset",
@@ -243,7 +243,7 @@ void KDChartParams::saveAxesToXML(QDomDocument& doc, QDomElement& docRoot) const
_axisSettings[axis].params._trueDelta );
// the ZeroLineStart element
- QDomElement zeroLineStartElement = doc.createElement( "ZeroLineStart" );
+ TQDomElement zeroLineStartElement = doc.createElement( "ZeroLineStart" );
axisSettingsElement.appendChild( zeroLineStartElement );
zeroLineStartElement.setAttribute( "X", _axisSettings[axis].params._axisZeroLineStartX );
zeroLineStartElement.setAttribute( "Y", _axisSettings[axis].params._axisZeroLineStartY );
@@ -340,23 +340,23 @@ void KDChartParams::saveAxesToXML(QDomDocument& doc, QDomElement& docRoot) const
\return the XML document that represents the parameters
\sa loadXML
*/
-QDomDocument KDChartParams::saveXML( bool withPI ) const
+TQDomDocument KDChartParams::saveXML( bool withPI ) const
{
// Create an inital DOM document
- QString docstart = "<ChartParams/>";
+ TQString docstart = "<ChartParams/>";
- QDomDocument doc( "ChartParams" );
+ TQDomDocument doc( "ChartParams" );
doc.setContent( docstart );
if( withPI )
doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement docRoot = doc.documentElement();
+ TQDomElement docRoot = doc.documentElement();
docRoot.setAttribute( "xmlns", "http://www.klaralvdalens-datakonsult.se/kdchart" );
docRoot.setAttribute( "xmlns:xsi", "http://www.w3.org/2000/10/XMLSchema-instance" );
docRoot.setAttribute( "xsi:schemaLocation", "http://www.klaralvdalens-datakonsult.se/kdchart" );
// the ChartType element
- QDomElement chartTypeElement = doc.createElement( "ChartType" );
+ TQDomElement chartTypeElement = doc.createElement( "ChartType" );
docRoot.appendChild( chartTypeElement );
chartTypeElement.setAttribute( "primary",
chartTypeToString( _chartType ) );
@@ -368,29 +368,29 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
KDXML::createIntNode( doc, docRoot, "NumValues", _numValues );
// the ModeAndChartMap element
- QDomElement modeAndChartMapElement =
+ TQDomElement modeAndChartMapElement =
doc.createElement( "ModeAndChartMap" );
docRoot.appendChild( modeAndChartMapElement );
- for( QMap<uint,KDChartParams::ModeAndChart>::ConstIterator it = _dataSourceModeAndChart.begin();
+ for( TQMap<uint,KDChartParams::ModeAndChart>::ConstIterator it = _dataSourceModeAndChart.begin();
it != _dataSourceModeAndChart.end(); ++it ) {
// Dataset element
- QDomElement datasetElement = doc.createElement( "Dataset" );
- QDomText datasetContent =
- doc.createTextNode( QString::number( it.key() ) );
+ TQDomElement datasetElement = doc.createElement( "Dataset" );
+ TQDomText datasetContent =
+ doc.createTextNode( TQString::number( it.key() ) );
datasetElement.appendChild( datasetContent );
modeAndChartMapElement.appendChild( datasetElement );
// ModeAndChart element
- QDomElement modeAndChartElement = doc.createElement( "ModeAndChart" );
+ TQDomElement modeAndChartElement = doc.createElement( "ModeAndChart" );
modeAndChartElement.setAttribute( "Mode", chartSourceModeToString( it.data().mode() ) );
modeAndChartElement.setAttribute( "Chart", it.data().chart() );
modeAndChartMapElement.appendChild( modeAndChartElement );
}
// the PropertySetMap element
- QDomElement propertySetMapElement =
+ TQDomElement propertySetMapElement =
doc.createElement( "PropertySetMap" );
docRoot.appendChild( propertySetMapElement );
- QIntDictIterator<KDChartPropertySet> it2( _propertySetList );
+ TQIntDictIterator<KDChartPropertySet> it2( _propertySetList );
for( ; it2.current(); ++it2 )
propertySetMapElement.appendChild( it2.current()->saveXML( doc ) );
@@ -402,7 +402,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
_maxDatasetSourceMode );
// the ColorSettings element
- QDomElement colorSettingsElement =
+ TQDomElement colorSettingsElement =
doc.createElement( "ColorSettings" );
docRoot.appendChild( colorSettingsElement );
@@ -451,7 +451,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
_outlineDataLineWidth );
// the OutlineDataLineStyle element
- QDomElement outlineDataLineStyleElement =
+ TQDomElement outlineDataLineStyleElement =
doc.createElement( "OutlineDataLineStyle" );
colorSettingsElement.appendChild( outlineDataLineStyleElement );
outlineDataLineStyleElement.setAttribute( "Style",
@@ -460,7 +460,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
// the BarSettings elemenet
- QDomElement barSettingsElement =
+ TQDomElement barSettingsElement =
doc.createElement( "BarSettings" );
docRoot.appendChild( barSettingsElement );
@@ -497,7 +497,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
// the LineSettings element
- QDomElement lineSettingsElement =
+ TQDomElement lineSettingsElement =
doc.createElement( "LineSettings" );
docRoot.appendChild( lineSettingsElement );
@@ -511,9 +511,9 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
"Marker", _lineMarker );
// the MarkerStyles elements
- {for( QMap<uint,KDChartParams::LineMarkerStyle>::ConstIterator it = _lineMarkerStyles.begin();
+ {for( TQMap<uint,KDChartParams::LineMarkerStyle>::ConstIterator it = _lineMarkerStyles.begin();
it != _lineMarkerStyles.end(); ++it ) {
- QDomElement markerStyleElement = doc.createElement( "MarkerStyle" );
+ TQDomElement markerStyleElement = doc.createElement( "MarkerStyle" );
lineSettingsElement.appendChild( markerStyleElement );
markerStyleElement.setAttribute( "Dataset", it.key() );
markerStyleElement.setAttribute( "Style", KDChartParams::lineMarkerStyleToString( it.data() ) );
@@ -533,16 +533,16 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
_lineColor );
// the LineStyle element
- QDomElement lineStyleElement =
+ TQDomElement lineStyleElement =
doc.createElement( "LineStyle" );
lineSettingsElement.appendChild( lineStyleElement );
lineStyleElement.setAttribute( "Style",
KDXML::penStyleToString( _lineStyle ) );
// the DatasetLineStyles elements
- {for( QMap<uint, PenStyle>::ConstIterator it = _datasetLineStyles.begin();
+ {for( TQMap<uint, Qt::PenStyle>::ConstIterator it = _datasetLineStyles.begin();
it != _datasetLineStyles.end(); ++it ) {
- QDomElement lineStyleElement = doc.createElement( "DatasetLineStyle" );
+ TQDomElement lineStyleElement = doc.createElement( "DatasetLineStyle" );
lineSettingsElement.appendChild( lineStyleElement );
lineStyleElement.setAttribute( "Dataset", it.key() );
lineStyleElement.setAttribute( "Style", KDXML::penStyleToString( it.data() ) );
@@ -567,7 +567,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
// the AreaSettings element
- QDomElement areaSettingsElement =
+ TQDomElement areaSettingsElement =
doc.createElement( "AreaSettings" );
docRoot.appendChild( areaSettingsElement );
@@ -583,7 +583,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
// the PieRingSettings element
- QDomElement pieRingSettingsElement =
+ TQDomElement pieRingSettingsElement =
doc.createElement( "PieRingSettings" );
docRoot.appendChild( pieRingSettingsElement );
@@ -601,7 +601,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
_explodeFactors );
// the ExplodeSegment element
- for( QValueList<int>::ConstIterator it = _explodeList.begin();
+ for( TQValueList<int>::ConstIterator it = _explodeList.begin();
it != _explodeList.end(); ++it )
KDXML::createIntNode( doc, pieRingSettingsElement,
"ExplodeSegment", *it );
@@ -628,7 +628,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
}
// the HiLoSettings element
- QDomElement hiLoSettingsElement =
+ TQDomElement hiLoSettingsElement =
doc.createElement( "HiLoSettings" );
docRoot.appendChild( hiLoSettingsElement );
{
@@ -696,7 +696,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
// the BoxAndWhiskerSettings element
- QDomElement bWSettingsElement =
+ TQDomElement bWSettingsElement =
doc.createElement( "BoxAndWhiskerSettings" );
docRoot.appendChild( bWSettingsElement );
{
@@ -724,7 +724,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
// the PrintStatistics elements
for( int i = BWStatValSTART; i <= BWStatValEND; ++i ){
- QDomElement printStatElement =
+ TQDomElement printStatElement =
doc.createElement( "PrintStatistics"+bWChartStatValToString( (BWStatVal)i ) );
KDXML::createBoolNode( doc, printStatElement, "Active",
_BWChartStatistics[ i ].active );
@@ -742,7 +742,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
// the PolarSettings element
- QDomElement polarSettingsElement =
+ TQDomElement polarSettingsElement =
doc.createElement( "PolarSettings" );
docRoot.appendChild( polarSettingsElement );
@@ -756,9 +756,9 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
"Marker", _polarMarker );
// the MarkerStyles elements
- for( QMap<uint,KDChartParams::PolarMarkerStyle>::ConstIterator it = _polarMarkerStyles.begin();
+ for( TQMap<uint,KDChartParams::PolarMarkerStyle>::ConstIterator it = _polarMarkerStyles.begin();
it != _polarMarkerStyles.end(); ++it ) {
- QDomElement markerStyleElement = doc.createElement( "MarkerStyle" );
+ TQDomElement markerStyleElement = doc.createElement( "MarkerStyle" );
polarSettingsElement.appendChild( markerStyleElement );
markerStyleElement.setAttribute( "Dataset", it.key() );
markerStyleElement.setAttribute( "Style", KDChartParams::polarMarkerStyleToString( it.data() ) );
@@ -776,7 +776,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
// the LegendSettings element
- QDomElement legendSettingsElement =
+ TQDomElement legendSettingsElement =
doc.createElement( "LegendSettings" );
docRoot.appendChild( legendSettingsElement );
{
@@ -784,9 +784,9 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
KDXML::createStringNode( doc, legendSettingsElement, "Position",
KDChartParams::legendPositionToString( _legendPosition ) );
- // the Orientation element
+ // the Qt::Orientation element
KDXML::createOrientationNode( doc, legendSettingsElement,
- "Orientation", _legendOrientation );
+ "Qt::Orientation", _legendOrientation );
// the ShowLines element
KDXML::createBoolNode( doc, legendSettingsElement,
@@ -797,9 +797,9 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
KDChartParams::legendSourceToString( _legendSource ) );
// the Text elements
- for( QMap<int,QString>::ConstIterator it = _legendText.begin();
+ for( TQMap<int,TQString>::ConstIterator it = _legendText.begin();
it != _legendText.end(); ++it ) {
- QDomElement legendTextElement = doc.createElement( "LegendText" );
+ TQDomElement legendTextElement = doc.createElement( "LegendText" );
legendSettingsElement.appendChild( legendTextElement );
legendTextElement.setAttribute( "Dataset", it.key() );
legendTextElement.setAttribute( "Text", it.data() );
@@ -838,7 +838,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
// the HeaderFooterSettings elements
for( int hf = 0; hf < 18; hf++ ) {
- QDomElement hfSettingsElement =
+ TQDomElement hfSettingsElement =
doc.createElement( "HeaderFooterSettings" );
docRoot.appendChild( hfSettingsElement );
{
@@ -855,7 +855,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
// the GlobalLeading element
- QDomElement globalLeadingElement =
+ TQDomElement globalLeadingElement =
doc.createElement( "GlobalLeading" );
docRoot.appendChild( legendSettingsElement );
{
@@ -870,7 +870,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
}
// the DataValuesSettings1 element
- QDomElement dataValuesSettings1Element =
+ TQDomElement dataValuesSettings1Element =
doc.createElement( "DataValuesSettings1" );
docRoot.appendChild( dataValuesSettings1Element );
{
@@ -923,14 +923,14 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
KDXML::createStringNode( doc, dataValuesSettings1Element,
"LayoutPolicy",
- KDChartEnums::layoutPolicyToString( _printDataValuesSettings._dataValuesLayoutPolicy ) );
+ KDChartEnums::tqlayoutPolicyToString( _printDataValuesSettings._dataValuesLayoutPolicy ) );
KDXML::createBoolNode( doc, dataValuesSettings1Element, "ShowInfinite",
_printDataValuesSettings._dataValuesShowInfinite );
}
// the DataValuesSettings2 element
- QDomElement dataValuesSettings2Element =
+ TQDomElement dataValuesSettings2Element =
doc.createElement( "DataValuesSettings2" );
docRoot.appendChild( dataValuesSettings2Element );
{
@@ -983,14 +983,14 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
KDXML::createStringNode( doc, dataValuesSettings2Element,
"LayoutPolicy",
- KDChartEnums::layoutPolicyToString( _printDataValuesSettings2._dataValuesLayoutPolicy ) );
+ KDChartEnums::tqlayoutPolicyToString( _printDataValuesSettings2._dataValuesLayoutPolicy ) );
KDXML::createBoolNode( doc, dataValuesSettings2Element, "ShowInfinite",
_printDataValuesSettings2._dataValuesShowInfinite );
}
// global settings for data value settings of _all_ charts
- QDomElement dataValuesGlobalSettingsElement =
+ TQDomElement dataValuesGlobalSettingsElement =
doc.createElement( "DataValuesGlobalSettings" );
docRoot.appendChild( dataValuesGlobalSettingsElement );
{
@@ -1000,11 +1000,11 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
}
// the AreaMap element
- QDomElement areaMapElement =
+ TQDomElement areaMapElement =
doc.createElement( "AreaMap" );
docRoot.appendChild( areaMapElement );
{
- QDictIterator<KDChartFrameSettings> it( _areaDict );
+ TQDictIterator<KDChartFrameSettings> it( _areaDict );
for( ; it.current(); ++it ){
KDChartFrameSettings::createFrameSettingsNode( doc, areaMapElement,
"FrameSettings",
@@ -1014,11 +1014,11 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
}
// the CustomBoxMap element
- QDomElement customBoxMapElement =
+ TQDomElement customBoxMapElement =
doc.createElement( "CustomBoxMap" );
docRoot.appendChild( customBoxMapElement );
{
- QIntDictIterator<KDChartCustomBox> it( _customBoxDict );
+ TQIntDictIterator<KDChartCustomBox> it( _customBoxDict );
for( ; it.current(); ++it ){
KDXML::createIntNode( doc, customBoxMapElement, "Number", it.currentKey() );
KDChartCustomBox::createCustomBoxNode( doc, customBoxMapElement,
@@ -1032,7 +1032,7 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
/**
- \fn QTextStream& operator>>( QTextStream& s, KDChartParams& p );
+ \fn TQTextStream& operator>>( TQTextStream& s, KDChartParams& p );
Reads the an XML document from the text stream s into the
KDChartParams object p
@@ -1041,11 +1041,11 @@ QDomDocument KDChartParams::saveXML( bool withPI ) const
\param p the KDChartParams object to read into
\return the text stream after the read operation
*/
-QTextStream& operator>>( QTextStream& s, KDChartParams& p )
+TQTextStream& operator>>( TQTextStream& s, KDChartParams& p )
{
- QDomDocument doc( "ChartParams" );
- // would be nicer if QDomDocument could read from a QTextStream...
- QString docString = s.read();
+ TQDomDocument doc( "ChartParams" );
+ // would be nicer if TQDomDocument could read from a TQTextStream...
+ TQString docString = s.read();
doc.setContent( docString );
p.loadXML( doc );
@@ -1057,17 +1057,17 @@ QTextStream& operator>>( QTextStream& s, KDChartParams& p )
/**
Helper method called by loadXML() only.
*/
-void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
+void KDChartParams::loadAxesFormXML(int& curAxisSettings, TQDomElement& element)
{
KDChartAxisParams* axisSettings =
&( _axisSettings[ curAxisSettings ].params );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Type" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
axisSettings->_axisType = KDChartAxisParams::stringToAxisType( string );
} else if( tagName == "Visible" ) {
@@ -1079,7 +1079,7 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readBoolNode( element, labelsTouchEdges ) )
axisSettings->_axisLabelsTouchEdges = labelsTouchEdges;
} else if( tagName == "AreaMode" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
axisSettings->_axisAreaMode = KDChartAxisParams::stringToAxisAreaMode( string );
} else if( tagName == "UseAvailableSpaceFrom" ) {
@@ -1103,7 +1103,7 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readIntNode( element, areaMax ) )
axisSettings->_axisAreaMax = areaMax;
} else if( tagName == "CalcMode" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
axisSettings->_axisCalcMode = KDChartAxisParams::stringToAxisCalcMode( string );
} else if( tagName == "TrueAreaSize" ) {
@@ -1111,7 +1111,7 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readIntNode( element, trueAreaSize ) )
axisSettings->_axisTrueAreaSize = trueAreaSize;
} else if( tagName == "TrueAreaRect" ) {
- QRect trueAreaRect;
+ TQRect trueAreaRect;
if( KDXML::readRectNode( element, trueAreaRect ) )
axisSettings->_axisTrueAreaRect = trueAreaRect;
} else if( tagName == "ShowSubDelimiters" ) {
@@ -1131,7 +1131,7 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readIntNode( element, trueLineWidth ) )
axisSettings->_axisTrueLineWidth = trueLineWidth;
} else if( tagName == "LineColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
axisSettings->_axisLineColor = color;
} else if( tagName == "ShowGrid" ) {
@@ -1139,7 +1139,7 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readBoolNode( element, showGrid ) )
axisSettings->_axisShowGrid = showGrid;
} else if( tagName == "GridColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
axisSettings->_axisGridColor = color;
} else if( tagName == "GridLineWidth" ) {
@@ -1150,7 +1150,7 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( element.hasAttribute( "Style" ) )
axisSettings->_axisGridStyle = KDXML::stringToPenStyle( element.attribute( "Style" ) );
} else if( tagName == "GridSubColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
axisSettings->_axisGridSubColor = color;
} else if( tagName == "GridSubLineWidth" ) {
@@ -1161,7 +1161,7 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( element.hasAttribute( "Style" ) )
axisSettings->_axisGridSubStyle = KDXML::stringToPenStyle( element.attribute( "Style" ) );
} else if( tagName == "ZeroLineColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
axisSettings->_axisZeroLineColor = color;
} else if( tagName == "LabelsVisible" ) {
@@ -1191,7 +1191,7 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readIntNode( element, leaveOut ) )
axisSettings->_axisValueLeaveOut = leaveOut;
} else if( tagName == "LabelsColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
axisSettings->_axisLabelsColor = color;
} else if( tagName == "SteadyValueCalc" ) {
@@ -1199,20 +1199,20 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readBoolNode( element, steadyValueCalc ) )
axisSettings->_axisSteadyValueCalc = steadyValueCalc;
} else if( tagName == "ValueStart" ) {
- QVariant valX, valY;
+ TQVariant valX, valY;
int propID;
if( readChartValueNode( element, valY, valX, propID ) &&
- QVariant::Double == valY.type() )
+ TQVariant::Double == valY.type() )
axisSettings->_axisValueStart = valY.toDouble();
} else if( tagName == "ValueStartIsExact" ) {
bool isExactValue;
if( KDXML::readBoolNode( element, isExactValue ) )
axisSettings->_axisValueStartIsExact = isExactValue;
} else if( tagName == "ValueEnd" ) {
- QVariant valX, valY;
+ TQVariant valX, valY;
int propID;
if( readChartValueNode( element, valY, valX, propID ) &&
- QVariant::Double == valY.type() )
+ TQVariant::Double == valY.type() )
axisSettings->_axisValueEnd = valY.toDouble();
} else if( tagName == "ValueDelta" ) {
double valueDelta;
@@ -1259,7 +1259,7 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readIntNode( element, digitsBehindComma ) )
axisSettings->_axisDigitsBehindComma = digitsBehindComma;
} else if( tagName == "LabelsDateTimeFormat" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
axisSettings->_axisLabelsDateTimeFormat = string;
} else if( tagName == "MaxEmptyInnerSpan" ) {
@@ -1267,7 +1267,7 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readIntNode( element, maxEmptyInnerSpan ) )
axisSettings->_axisMaxEmptyInnerSpan = maxEmptyInnerSpan;
} else if( tagName == "LabelsFromDataRow" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
axisSettings->_labelTextsDataRow = KDChartAxisParams::stringToLabelsFromDataRow( string );
} else if( tagName == "TextsDataRow" ) {
@@ -1275,15 +1275,15 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readIntNode( element, textsDataRow ) )
axisSettings->_labelTextsDataRow = textsDataRow;
} else if( tagName == "LabelString" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
axisSettings->_axisLabelStringList << string;
} else if( tagName == "ShortLabelString" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
axisSettings->_axisShortLabelsStringList << string;
} else if( tagName == "LabelText" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
axisSettings->_axisLabelTexts = string;
} else if( tagName == "LabelTextsDirty" ) {
@@ -1291,11 +1291,11 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readBoolNode( element, labelTextsDirty ) )
axisSettings->_axisLabelTextsDirty = labelTextsDirty;
} else if( tagName == "FirstLabelReplacementText" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
axisSettings->_axisFirstLabelText = value;
} else if( tagName == "LastLabelReplacementText" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
axisSettings->_axisLastLabelText = value;
} else if( tagName == "LabelsDivPow10" ) {
@@ -1303,23 +1303,23 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readIntNode( element, divPow10 ) )
axisSettings->_axisLabelsDivPow10 = divPow10;
} else if( tagName == "LabelsDecimalPoint" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
axisSettings->_axisLabelsDecimalPoint = value;
} else if( tagName == "LabelsThousandsPoint" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
axisSettings->_axisLabelsThousandsPoint = value;
} else if( tagName == "LabelsNotation" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
axisSettings->_axisLabelsNotation = KDChartEnums::stringToNumberNotation( string );
} else if( tagName == "LabelsPrefix" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
axisSettings->_axisLabelsPrefix = value;
} else if( tagName == "LabelsPostfix" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
axisSettings->_axisLabelsPostfix = value;
} else if( tagName == "LabelsTotalLen" ) {
@@ -1327,7 +1327,7 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
if( KDXML::readIntNode( element, totalLen ) )
axisSettings->_axisLabelsTotalLen = totalLen;
} else if( tagName == "LabelsPadFill" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) ){
if( value.isEmpty() )
axisSettings->_axisLabelsPadFill = ' ';
@@ -1355,17 +1355,17 @@ void KDChartParams::loadAxesFormXML(int& curAxisSettings, QDomElement& element)
format error occurred
\sa saveXML
*/
-bool KDChartParams::loadXML( const QDomDocument& doc )
+bool KDChartParams::loadXML( const TQDomDocument& doc )
{
int curAxisSettings = 0;
int curHFSettings = 0;
- QDomElement docRoot = doc.documentElement(); // ChartParams element
- QDomNode node = docRoot.firstChild();
+ TQDomElement docRoot = doc.documentElement(); // ChartParams element
+ TQDomNode node = docRoot.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "ChartType" ) {
if( element.hasAttribute( "primary" ) )
_chartType = KDChartParams::stringToChartType( element.attribute( "primary" ) );
@@ -1377,11 +1377,11 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
_numValues = numValues;
} else if( tagName == "ModeAndChartMap" ) {
int dataset = -1;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Dataset" ) {
KDXML::readIntNode( element, dataset );
} else if( tagName == "ModeAndChart" ) {
@@ -1402,10 +1402,10 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
}
} else if( tagName == "PropertySetMap" ) {
// the PropertySetMap element
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
KDChartPropertySet set;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() // was really an element
&& KDChartPropertySet::loadXML( element, set ) ) // parsed OK
setProperties( set.id(), set );
@@ -1420,13 +1420,13 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( KDXML::readIntNode( element, maxDatasetSourceMode ) )
_maxDatasetSourceMode = maxDatasetSourceMode;
} else if( tagName == "ColorSettings" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "DataColors" ) {
- QMap<uint,QColor>* map = &_dataColors;
+ TQMap<uint,TQColor>* map = &_dataColors;
readColorMapNode( element, map );
} else if( tagName == "MaxDatasetColor" ) {
int maxDatasetColor;
@@ -1437,7 +1437,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( KDXML::readDoubleNode( element, shadowBrightnessFactor ) )
_shadowBrightnessFactor = shadowBrightnessFactor;
} else if( tagName == "ShadowPattern" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_shadowPattern = KDXML::stringToBrushStyle( value );
} else if( tagName == "ThreeDShadowColors" ) {
@@ -1445,13 +1445,13 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( KDXML::readBoolNode( element, threeDShadowColors ) )
_threeDShadowColors = threeDShadowColors;
} else if( tagName == "DataColorsShadow1" ) {
- QMap<uint,QColor>* map = &_dataColorsShadow1;
+ TQMap<uint,TQColor>* map = &_dataColorsShadow1;
readColorMapNode( element, map );
} else if( tagName == "DataColorsShadow2" ) {
- QMap<uint,QColor>* map = &_dataColorsShadow2;
+ TQMap<uint,TQColor>* map = &_dataColorsShadow2;
readColorMapNode( element, map );
} else if( tagName == "OutlineDataColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
_outlineDataColor = color;
} else if( tagName == "OutlineDataLineWidth" ) {
@@ -1468,13 +1468,13 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "BarSettings" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "SubType" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_barChartSubType = KDChartParams::stringToBarChartSubType( value );
} else if( tagName == "ThreeDBars" ) {
@@ -1516,13 +1516,13 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "LineSettings" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "SubType" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_lineChartSubType = KDChartParams::stringToLineChartSubType( value );
} else if( tagName == "Marker" ) {
@@ -1563,7 +1563,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( KDXML::readIntNode( element, lineWidth ) )
_lineWidth = lineWidth;
} else if( tagName == "LineColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
_lineColor = color;
} else if( tagName == "LineStyle" ) {
@@ -1572,7 +1572,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
} else if( tagName == "DatasetLineStyle" ) {
bool ok = true;
uint dataset;
- PenStyle style = Qt::SolidLine;
+ Qt::PenStyle style = Qt::SolidLine;
if( element.hasAttribute( "Dataset" ) &&
element.hasAttribute( "Style" ) ) {
dataset = element.attribute( "Dataset" ).toUInt( &ok );
@@ -1605,17 +1605,17 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "AreaSettings" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "SubType" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_areaChartSubType = KDChartParams::stringToAreaChartSubType( value );
} else if( tagName == "Location" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
_areaLocation = KDChartParams::stringToAreaLocation( string );
} else {
@@ -1625,11 +1625,11 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "PieRingSettings" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Explode" ) {
bool explode;
if( KDXML::readBoolNode( element, explode ) )
@@ -1639,7 +1639,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( KDXML::readDoubleNode( element, defaultExplodeFactor ) )
_explodeFactor = defaultExplodeFactor;
} else if( tagName == "ExplodeFactors" ) {
- QMap<int,double>* map = &_explodeFactors;
+ TQMap<int,double>* map = &_explodeFactors;
readDoubleMapNode( element, map );
} else if( tagName == "ExplodeSegment" ) {
int explodeSegment;
@@ -1672,13 +1672,13 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "HiLoSettings" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "SubType" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_hiLoChartSubType = KDChartParams::stringToHiLoChartSubType( value );
} else if( tagName == "PrintLowValues" ) {
@@ -1691,7 +1691,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
_hiLoChartLowValuesUseFontRelSize,
_hiLoChartLowValuesFontRelSize );
} else if( tagName == "LowValuesColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
_hiLoChartLowValuesColor = color;
} else if( tagName == "PrintHighValues" ) {
@@ -1704,7 +1704,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
_hiLoChartHighValuesUseFontRelSize,
_hiLoChartHighValuesFontRelSize );
} else if( tagName == "HighValuesColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
_hiLoChartHighValuesColor = color;
} else if( tagName == "PrintOpenValues" ) {
@@ -1717,7 +1717,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
_hiLoChartOpenValuesUseFontRelSize,
_hiLoChartOpenValuesFontRelSize );
} else if( tagName == "OpenValuesColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
_hiLoChartOpenValuesColor = color;
} else if( tagName == "PrintCloseValues" ) {
@@ -1730,7 +1730,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
_hiLoChartCloseValuesUseFontRelSize,
_hiLoChartCloseValuesFontRelSize );
} else if( tagName == "CloseValuesColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
_hiLoChartCloseValuesColor = color;
} else {
@@ -1742,13 +1742,13 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
} else if( tagName == "BoxAndWhiskerSettings" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "SubType" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_BWChartSubType = KDChartParams::stringToBWChartSubType( value );
} else if( tagName == "FenceUpperInner" ) {
@@ -1768,7 +1768,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( KDXML::readDoubleNode( element, fence ) )
_BWChartFenceUpperOuter = fence;
} else if( tagName == "Brush" ) {
- QBrush brush;
+ TQBrush brush;
if( KDXML::readBrushNode( element, brush ) )
_BWChartBrush = brush;
} else if( tagName == "OutlierSize" ) {
@@ -1777,14 +1777,14 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
_BWChartOutValMarkerSize = size;
} else if( tagName.startsWith("PrintStatistics") ) {
// 012345678901234
- QString statName(tagName.mid( 15 ));
+ TQString statName(tagName.mid( 15 ));
BWStatVal i( stringToBWChartStatVal( statName ) );
if( BWStatValSTART <= i && i <= BWStatValEND ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Active" ) {
bool active;
if( KDXML::readBoolNode( element, active ) )
@@ -1795,11 +1795,11 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
_BWChartStatistics[ i ].useRelSize,
_BWChartStatistics[ i ].relSize );
} else if( tagName == "Color" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
_BWChartStatistics[ i ].color = color;
} else if( tagName == "Brush" ) {
- QBrush brush;
+ TQBrush brush;
if( KDXML::readBrushNode( element, brush ) )
_BWChartStatistics[ i ].brush = brush;
} else {
@@ -1817,13 +1817,13 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "PolarSettings" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "SubType" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_polarChartSubType = KDChartParams::stringToPolarChartSubType( value );
} else if( tagName == "Marker" ) {
@@ -1870,16 +1870,16 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "LegendSettings" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Position" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
_legendPosition = KDChartParams::stringToLegendPosition( string );
- } else if( tagName == "Orientation" ) {
+ } else if( tagName == "Qt::Orientation" ) {
Qt::Orientation value=Qt::Vertical;
if( KDXML::readOrientationNode( element, value ) )
_legendOrientation = value;
@@ -1888,13 +1888,13 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( KDXML::readBoolNode( element, showLines ) )
_legendShowLines = showLines;
} else if( tagName == "Source" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
_legendSource = KDChartParams::stringToLegendSource( string );
} else if( tagName == "LegendText" ) {
bool ok = true;
uint dataset = 0;
- QString text;
+ TQString text;
if( element.hasAttribute( "Dataset" ) &&
element.hasAttribute( "Text" ) ) {
dataset = element.attribute( "Dataset" ).toUInt( &ok );
@@ -1905,7 +1905,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( ok )
_legendText[dataset] = text;
} else if( tagName == "TextColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
_legendTextColor = color;
} else if( tagName == "TextFont" ) {
@@ -1914,11 +1914,11 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
_legendFontUseRelSize,
_legendFontRelSize );
} else if( tagName == "TitleText" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
_legendTitleText = string;
} else if( tagName == "TitleColor" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
_legendTitleTextColor = color;
} else if( tagName == "TitleFont" ) {
@@ -1943,13 +1943,13 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
} else if( tagName == "HeaderFooterSettings" ) {
KDChartParams::HdFtParams* hfSettings =
&( _hdFtParams[ curHFSettings ] );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Text" ) {
- QString string;
+ TQString string;
if( KDXML::readStringNode( element, string ) )
hfSettings->_text = string;
} else if( tagName == "Font" ) {
@@ -1958,7 +1958,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
hfSettings->_fontUseRelSize,
hfSettings->_fontRelSize );
} else if( tagName == "Color" ) {
- QColor color;
+ TQColor color;
if( KDXML::readColorNode( element, color ) )
hfSettings->_color = color;
} else {
@@ -1969,11 +1969,11 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
}
curHFSettings++; // one header/footer setting finished
} else if( tagName == "GlobalLeading" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an elemente
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Left" ) {
int value;
if( KDXML::readIntNode( element, value ) )
@@ -2000,11 +2000,11 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "DataValuesSettings1" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "PrintDataValues" ) {
bool value;
if( KDXML::readBoolNode( element, value ) )
@@ -2030,7 +2030,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
KDXML::readBoolNode( element,
_printDataValuesSettings._dataValuesAutoColor );
} else if( tagName == "AnchorNegativePosition" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_printDataValuesSettings._dataValuesAnchorNegativePosition = KDChartEnums::stringToPositionFlag( value );
} else if( tagName == "AnchorNegativeAlign" ) {
@@ -2050,7 +2050,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( KDXML::readIntNode( element, value ) )
_printDataValuesSettings._dataValuesNegativeRotation = value;
} else if( tagName == "AnchorPositivePosition" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_printDataValuesSettings._dataValuesAnchorPositivePosition = KDChartEnums::stringToPositionFlag( value );
} else if( tagName == "AnchorPositiveAlign" ) {
@@ -2070,7 +2070,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( KDXML::readIntNode( element, value ) )
_printDataValuesSettings._dataValuesPositiveRotation = value;
} else if( tagName == "LayoutPolicy" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_printDataValuesSettings._dataValuesLayoutPolicy = KDChartEnums::stringToLayoutPolicy( value );
} else if( tagName == "ShowInfinite" ) {
@@ -2082,11 +2082,11 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "DataValuesSettings2" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "PrintDataValues" ) {
bool value;
if( KDXML::readBoolNode( element, value ) )
@@ -2112,7 +2112,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
KDXML::readBoolNode( element,
_printDataValuesSettings2._dataValuesAutoColor );
} else if( tagName == "AnchorNegativePosition" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_printDataValuesSettings2._dataValuesAnchorNegativePosition = KDChartEnums::stringToPositionFlag( value );
} else if( tagName == "AnchorNegativeAlign" ) {
@@ -2132,7 +2132,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( KDXML::readIntNode( element, value ) )
_printDataValuesSettings2._dataValuesNegativeRotation = value;
} else if( tagName == "AnchorPositivePosition" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_printDataValuesSettings2._dataValuesAnchorPositivePosition = KDChartEnums::stringToPositionFlag( value );
} else if( tagName == "AnchorPositiveAlign" ) {
@@ -2152,7 +2152,7 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
if( KDXML::readIntNode( element, value ) )
_printDataValuesSettings2._dataValuesPositiveRotation = value;
} else if( tagName == "LayoutPolicy" ) {
- QString value;
+ TQString value;
if( KDXML::readStringNode( element, value ) )
_printDataValuesSettings2._dataValuesLayoutPolicy = KDChartEnums::stringToLayoutPolicy( value );
} else if( tagName == "ShowInfinite" ) {
@@ -2164,11 +2164,11 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "DataValuesGlobalSettings" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "allowOverlappingTexts" ) {
bool value;
if( KDXML::readBoolNode( element, value ) )
@@ -2181,26 +2181,26 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "AreaMap" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "FrameSettings" ) {
KDChartFrameSettings* frameSettings = new KDChartFrameSettings;
uint areaId = KDChartEnums::AreaUNKNOWN;
if( KDChartFrameSettings::readFrameSettingsNode(
element, *frameSettings, areaId ) ) {
- QString str;
+ TQString str;
if(areaId == KDChartEnums::AreaChartDataRegion)
- str = QString( "%1/%2/%3/%4" )
- .arg( areaId, 5 )
- .arg( frameSettings->dataRow(), 5 )
- .arg( frameSettings->dataCol(), 5 )
- .arg( 0, 5 );//frameSettings->data3rd(), 5 );
+ str = TQString( "%1/%2/%3/%4" )
+ .tqarg( areaId, 5 )
+ .tqarg( frameSettings->dataRow(), 5 )
+ .tqarg( frameSettings->dataCol(), 5 )
+ .tqarg( 0, 5 );//frameSettings->data3rd(), 5 );
else
- str = QString( "%1/-----/-----/-----" ).arg( areaId, 5 );
- _areaDict.replace( str, frameSettings );
+ str = TQString( "%1/-----/-----/-----" ).tqarg( areaId, 5 );
+ _areaDict.tqreplace( str, frameSettings );
}
}
else
@@ -2210,12 +2210,12 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
node = node.nextSibling();
}
} else if( tagName == "CustomBoxMap" ) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
int curNumber = -1;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Number" ) {
KDXML::readIntNode( element, curNumber );
} else if( tagName == "CustomBox" ) {
@@ -2243,28 +2243,28 @@ bool KDChartParams::loadXML( const QDomDocument& doc )
/**
- Creates a DOM element node that represents a map of QColor objects
+ Creates a DOM element node that represents a map of TQColor objects
for use in a DOM document.
\param doc the DOM document to which the node will belong
- \param parent the parent node to which the new node will be appended
+ \param tqparent the tqparent node to which the new node will be appended
\param elementName the name of the new node
\param map the map of colors to be represented
*/
-void KDChartParams::createColorMapNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QMap< uint, QColor >& map )
+void KDChartParams::createColorMapNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQMap< uint, TQColor >& map )
{
- QDomElement mapElement =
+ TQDomElement mapElement =
doc.createElement( elementName );
- parent.appendChild( mapElement );
- for( QMap<uint,QColor>::ConstIterator it = map.begin();
+ tqparent.appendChild( mapElement );
+ for( TQMap<uint,TQColor>::ConstIterator it = map.begin();
it != map.end(); ++it ) {
// Dataset element
- QDomElement datasetElement = doc.createElement( "Dataset" );
+ TQDomElement datasetElement = doc.createElement( "Dataset" );
mapElement.appendChild( datasetElement );
- QDomText datasetContent =
- doc.createTextNode( QString::number( it.key() ) );
+ TQDomText datasetContent =
+ doc.createTextNode( TQString::number( it.key() ) );
datasetElement.appendChild( datasetContent );
// Color element
KDXML::createColorNode( doc, mapElement, "Color", it.data() );
@@ -2277,24 +2277,24 @@ void KDChartParams::createColorMapNode( QDomDocument& doc, QDomNode& parent,
for use in a DOM document.
\param doc the DOM document to which the node will belong
- \param parent the parent node to which the new node will be appended
+ \param tqparent the tqparent node to which the new node will be appended
\param elementName the name of the new node
\param map the map of doubles to be represented
*/
-void KDChartParams::createDoubleMapNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QMap< int, double >& map )
+void KDChartParams::createDoubleMapNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQMap< int, double >& map )
{
- QDomElement mapElement =
+ TQDomElement mapElement =
doc.createElement( elementName );
- parent.appendChild( mapElement );
- for( QMap<int,double>::ConstIterator it = map.begin();
+ tqparent.appendChild( mapElement );
+ for( TQMap<int,double>::ConstIterator it = map.begin();
it != map.end(); ++it ) {
// Dataset element
- QDomElement valueElement = doc.createElement( "Value" );
+ TQDomElement valueElement = doc.createElement( "Value" );
mapElement.appendChild( valueElement );
- QDomText valueContent =
- doc.createTextNode( QString::number( it.key() ) );
+ TQDomText valueContent =
+ doc.createTextNode( TQString::number( it.key() ) );
valueElement.appendChild( valueContent );
// Color element
KDXML::createDoubleNode( doc, mapElement, "Factor", it.data() );
@@ -2302,14 +2302,14 @@ void KDChartParams::createDoubleMapNode( QDomDocument& doc, QDomNode& parent,
}
-void dataCoordToElementAttr(const QVariant& val, QDomElement& element, const QString& postfix)
+void dataCoordToElementAttr(const TQVariant& val, TQDomElement& element, const TQString& postfix)
{
- if( QVariant::Double == val.type() )
+ if( TQVariant::Double == val.type() )
element.setAttribute( "DoubleValue"+postfix,
- QString::number( val.toDouble() ) );
- else if( QVariant::String == val.type() )
+ TQString::number( val.toDouble() ) );
+ else if( TQVariant::String == val.type() )
element.setAttribute( "StringValue"+postfix, val.toString() );
- else if( QVariant::DateTime == val.type() )
+ else if( TQVariant::DateTime == val.type() )
element.setAttribute( "DateTimeValue"+postfix,
val.toDateTime().toString( Qt::ISODate ) );
else
@@ -2321,22 +2321,22 @@ void dataCoordToElementAttr(const QVariant& val, QDomElement& element, const QSt
chart value for use in a DOM document.
\param doc the DOM document to which the node will belong
- \param parent the parent node to which the new node will be appended
+ \param tqparent the tqparent node to which the new node will be appended
\param elementName the name of the new node
\param data the chart value to be represented
*/
-void KDChartParams::createChartValueNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QVariant& valY,
- const QVariant& valX,
+void KDChartParams::createChartValueNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQVariant& valY,
+ const TQVariant& valX,
const int& propID )
{
- QDomElement element = doc.createElement( elementName );
- parent.appendChild( element );
+ TQDomElement element = doc.createElement( elementName );
+ tqparent.appendChild( element );
dataCoordToElementAttr( valY, element, "" ); // no postfix for Y value: backwards compat.
dataCoordToElementAttr( valX, element, "X" );
element.setAttribute( "PropertySetID",
- QString::number( propID ) );
+ TQString::number( propID ) );
}
@@ -2346,7 +2346,7 @@ void KDChartParams::createChartValueNode( QDomDocument& doc, QDomNode& parent,
chart for use in a DOM document.
\param doc the DOM document to which the node will belong
- \param parent the parent node to which the new node will be appended
+ \param tqparent the tqparent node to which the new node will be appended
\param elementName the name of the new node
\param font the font to be resented
\param useRelFont the specification whether the font size
@@ -2354,14 +2354,14 @@ void KDChartParams::createChartValueNode( QDomDocument& doc, QDomNode& parent,
\param relFont the relative font size
\param minFont the minimal font size in points, leave this parameter out if not needed
*/
-void KDChartParams::createChartFontNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QFont& font, bool useRelFont,
+void KDChartParams::createChartFontNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQFont& font, bool useRelFont,
int relFont,
int minFont )
{
- QDomElement chartFontElement = doc.createElement( elementName );
- parent.appendChild( chartFontElement );
+ TQDomElement chartFontElement = doc.createElement( elementName );
+ tqparent.appendChild( chartFontElement );
KDXML::createFontNode( doc, chartFontElement, "Font", font );
KDXML::createBoolNode( doc, chartFontElement, "UseRelFontSize",
useRelFont );
@@ -2379,24 +2379,24 @@ void KDChartParams::createChartFontNode( QDomDocument& doc, QDomNode& parent,
for use in a DOM document.
\param doc the DOM document to which the node will belong
- \param parent the parent node to which the new node will be appended
+ \param tqparent the tqparent node to which the new node will be appended
\param elementName the name of the new node
\param map the color map to be represented
*/
-bool KDChartParams::readColorMapNode( const QDomElement& element,
- QMap<uint,QColor>* value )
+bool KDChartParams::readColorMapNode( const TQDomElement& element,
+ TQMap<uint,TQColor>* value )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
int curDataset = -1;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Dataset" ) {
KDXML::readIntNode( element, curDataset );
} else if( tagName == "Color" ) {
Q_ASSERT( curDataset != -1 ); // there was a Dataset tag before
- QColor color;
+ TQColor color;
KDXML::readColorNode( element, color );
value->insert( curDataset, color );
} else {
@@ -2417,15 +2417,15 @@ bool KDChartParams::readColorMapNode( const QDomElement& element,
\param element the DOM element to read from
\param map the frame settings object to read the data into
*/
-bool KDChartParams::readDoubleMapNode( const QDomElement& element,
- QMap<int,double>* value )
+bool KDChartParams::readDoubleMapNode( const TQDomElement& element,
+ TQMap<int,double>* value )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
int curValue = -1;
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Value" ) {
KDXML::readIntNode( element, curValue );
} else if( tagName == "Factor" ) {
@@ -2455,22 +2455,22 @@ bool KDChartParams::readDoubleMapNode( const QDomElement& element,
\param useRelFont whether the font size is relative
\param relFontSize the relative font size
*/
-bool KDChartParams::readChartFontNode( const QDomElement& element,
- QFont& font,
+bool KDChartParams::readChartFontNode( const TQDomElement& element,
+ TQFont& font,
bool& useRelFont,
int& relFontSize,
int* minFontSize )
{
bool ok = true;
- QFont tempFont;
+ TQFont tempFont;
bool tempRelFont;
int tempRelFontSize;
int tempMinFontSize=-1;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Font" ) {
ok = ok & KDXML::readFontNode( element, tempFont );
} else if( tagName == "UseRelFontSize" ) {
@@ -2498,11 +2498,11 @@ bool KDChartParams::readChartFontNode( const QDomElement& element,
}
-bool foundCoordAttribute( const QDomElement& element, const QString& postfix,
- QVariant& val )
+bool foundCoordAttribute( const TQDomElement& element, const TQString& postfix,
+ TQVariant& val )
{
if( element.hasAttribute( "NoValue"+postfix ) )
- val = QVariant();
+ val = TQVariant();
else if( element.hasAttribute( "DoubleValue"+postfix ) )
val = element.attribute( "DoubleValue"+postfix );
else if( element.hasAttribute( "DateTimeValue"+postfix ) )
@@ -2523,15 +2523,15 @@ bool foundCoordAttribute( const QDomElement& element, const QString& postfix,
\param element the DOM element to read from
\param value the chart data object to read the data into
*/
-bool KDChartParams::readChartValueNode( const QDomElement& element,
- QVariant& valY,
- QVariant& valX,
+bool KDChartParams::readChartValueNode( const TQDomElement& element,
+ TQVariant& valY,
+ TQVariant& valX,
int& propID )
{
if( foundCoordAttribute( element, "", valY ) ||
foundCoordAttribute( element, "Y", valY ) ){ // valY must be there
if( !foundCoordAttribute( element, "X", valX ) ){
- valX = QVariant();
+ valX = TQVariant();
}
propID = 0;
if( element.hasAttribute( "PropertySetID" ) ) {
@@ -2553,7 +2553,7 @@ bool KDChartParams::readChartValueNode( const QDomElement& element,
\param type the type enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::chartTypeToString( ChartType type )
+TQString KDChartParams::chartTypeToString( ChartType type )
{
switch( type ) {
case NoType:
@@ -2586,7 +2586,7 @@ QString KDChartParams::chartTypeToString( ChartType type )
\param string the string to convert
\return the chart type enum value
*/
-KDChartParams::ChartType KDChartParams::stringToChartType( const QString& string )
+KDChartParams::ChartType KDChartParams::stringToChartType( const TQString& string )
{
if( string == "NoType" )
return NoType;
@@ -2612,7 +2612,7 @@ KDChartParams::ChartType KDChartParams::stringToChartType( const QString& string
-QString KDChartParams::markerStyleToString( int style )
+TQString KDChartParams::markerStyleToString( int style )
{
switch( style ) {
case LineMarkerSquare:
@@ -2636,7 +2636,7 @@ QString KDChartParams::markerStyleToString( int style )
return "Circle";
}
}
-QString KDChartParams::markerStyleToStringTr( int style )
+TQString KDChartParams::markerStyleToStringTr( int style )
{
switch( style ) {
case LineMarkerSquare:
@@ -2660,7 +2660,7 @@ QString KDChartParams::markerStyleToStringTr( int style )
return tr( "Circle" );
}
}
-int KDChartParams::stringToMarkerStyle( const QString& string )
+int KDChartParams::stringToMarkerStyle( const TQString& string )
{
if( string == "Square" )
return LineMarkerSquare;
@@ -2681,7 +2681,7 @@ int KDChartParams::stringToMarkerStyle( const QString& string )
else // default, should not happen
return LineMarkerCircle;
}
-int KDChartParams::stringToMarkerStyleTr( const QString& string )
+int KDChartParams::stringToMarkerStyleTr( const TQString& string )
{
if( string == tr( "Square" ) )
return LineMarkerSquare;
@@ -2711,7 +2711,7 @@ int KDChartParams::stringToMarkerStyleTr( const QString& string )
\param type the type enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::barChartSubTypeToString( BarChartSubType type ) {
+TQString KDChartParams::barChartSubTypeToString( BarChartSubType type ) {
switch( type ) {
case BarNormal:
return "BarNormal";
@@ -2734,7 +2734,7 @@ QString KDChartParams::barChartSubTypeToString( BarChartSubType type ) {
\param string the string to convert
\return the bar chart subtype enum value
*/
-KDChartParams::BarChartSubType KDChartParams::stringToBarChartSubType( const QString& string ) {
+KDChartParams::BarChartSubType KDChartParams::stringToBarChartSubType( const TQString& string ) {
if( string == "BarNormal" )
return BarNormal;
else if( string == "BarStacked" )
@@ -2755,7 +2755,7 @@ KDChartParams::BarChartSubType KDChartParams::stringToBarChartSubType( const QSt
\param string the string to convert
\return the line chart subtype enum value
*/
-KDChartParams::LineChartSubType KDChartParams::stringToLineChartSubType( const QString& string ) {
+KDChartParams::LineChartSubType KDChartParams::stringToLineChartSubType( const TQString& string ) {
if( string == "LineNormal" )
return LineNormal;
else if( string == "LineStacked" )
@@ -2774,7 +2774,7 @@ KDChartParams::LineChartSubType KDChartParams::stringToLineChartSubType( const Q
\param type the type enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::lineChartSubTypeToString( LineChartSubType type ) {
+TQString KDChartParams::lineChartSubTypeToString( LineChartSubType type ) {
switch( type ) {
case LineNormal:
return "LineNormal";
@@ -2796,7 +2796,7 @@ QString KDChartParams::lineChartSubTypeToString( LineChartSubType type ) {
\param type the type enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::lineMarkerStyleToString( LineMarkerStyle style )
+TQString KDChartParams::lineMarkerStyleToString( LineMarkerStyle style )
{
return markerStyleToString( style );
}
@@ -2809,7 +2809,7 @@ QString KDChartParams::lineMarkerStyleToString( LineMarkerStyle style )
\param type the type enum to convert
\return the localized string representation of the type enum
*/
-QString KDChartParams::lineMarkerStyleToStringTr( LineMarkerStyle style )
+TQString KDChartParams::lineMarkerStyleToStringTr( LineMarkerStyle style )
{
return markerStyleToStringTr( style );
}
@@ -2821,7 +2821,7 @@ QString KDChartParams::lineMarkerStyleToStringTr( LineMarkerStyle style )
\param string the string to convert
\return the line marker style enum value
*/
-KDChartParams::LineMarkerStyle KDChartParams::stringToLineMarkerStyle( const QString& string )
+KDChartParams::LineMarkerStyle KDChartParams::stringToLineMarkerStyle( const TQString& string )
{
return static_cast<KDChartParams::LineMarkerStyle>(stringToMarkerStyle( string ));
}
@@ -2833,7 +2833,7 @@ KDChartParams::LineMarkerStyle KDChartParams::stringToLineMarkerStyle( const QSt
\param string the string to convert
\return the line marker style enum value
*/
-KDChartParams::LineMarkerStyle KDChartParams::stringToLineMarkerStyleTr( const QString& string )
+KDChartParams::LineMarkerStyle KDChartParams::stringToLineMarkerStyleTr( const TQString& string )
{
return static_cast<KDChartParams::LineMarkerStyle>(stringToMarkerStyleTr( string ));
}
@@ -2845,7 +2845,7 @@ KDChartParams::LineMarkerStyle KDChartParams::stringToLineMarkerStyleTr( const Q
\param type the subtype enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::areaChartSubTypeToString( AreaChartSubType type ) {
+TQString KDChartParams::areaChartSubTypeToString( AreaChartSubType type ) {
switch( type ) {
case AreaNormal:
return "AreaNormal";
@@ -2866,7 +2866,7 @@ QString KDChartParams::areaChartSubTypeToString( AreaChartSubType type ) {
\param string the string to convert
\return the area chart subtype enum value
*/
-KDChartParams::AreaChartSubType KDChartParams::stringToAreaChartSubType( const QString& string ) {
+KDChartParams::AreaChartSubType KDChartParams::stringToAreaChartSubType( const TQString& string ) {
if( string == "AreaNormal" )
return AreaNormal;
else if( string == "AreaStacked" )
@@ -2884,7 +2884,7 @@ KDChartParams::AreaChartSubType KDChartParams::stringToAreaChartSubType( const Q
\param type the location enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::areaLocationToString( AreaLocation type ) {
+TQString KDChartParams::areaLocationToString( AreaLocation type ) {
switch( type ) {
case AreaAbove:
return "Above";
@@ -2903,7 +2903,7 @@ QString KDChartParams::areaLocationToString( AreaLocation type ) {
\param string the string to convert
\return the aration location enum value
*/
-KDChartParams::AreaLocation KDChartParams::stringToAreaLocation( const QString& string ) {
+KDChartParams::AreaLocation KDChartParams::stringToAreaLocation( const TQString& string ) {
if( string == "Above" )
return AreaAbove;
else if( string == "Below" )
@@ -2919,7 +2919,7 @@ KDChartParams::AreaLocation KDChartParams::stringToAreaLocation( const QString&
\param string the string to convert
\return the polar chart subtype enum value
*/
-KDChartParams::PolarChartSubType KDChartParams::stringToPolarChartSubType( const QString& string ) {
+KDChartParams::PolarChartSubType KDChartParams::stringToPolarChartSubType( const TQString& string ) {
if( string == "PolarNormal" )
return PolarNormal;
else if( string == "PolarStacked" )
@@ -2937,7 +2937,7 @@ KDChartParams::PolarChartSubType KDChartParams::stringToPolarChartSubType( const
\param type the type enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::polarChartSubTypeToString( PolarChartSubType type ) {
+TQString KDChartParams::polarChartSubTypeToString( PolarChartSubType type ) {
switch( type ) {
case PolarNormal:
return "PolarNormal";
@@ -2959,7 +2959,7 @@ QString KDChartParams::polarChartSubTypeToString( PolarChartSubType type ) {
\param type the type enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::polarMarkerStyleToString( PolarMarkerStyle style )
+TQString KDChartParams::polarMarkerStyleToString( PolarMarkerStyle style )
{
return markerStyleToString( style );
}
@@ -2972,7 +2972,7 @@ QString KDChartParams::polarMarkerStyleToString( PolarMarkerStyle style )
\param type the type enum to convert
\return the localized string representation of the type enum
*/
-QString KDChartParams::polarMarkerStyleToStringTr( PolarMarkerStyle style )
+TQString KDChartParams::polarMarkerStyleToStringTr( PolarMarkerStyle style )
{
return markerStyleToStringTr( style );
}
@@ -2984,7 +2984,7 @@ QString KDChartParams::polarMarkerStyleToStringTr( PolarMarkerStyle style )
\param string the string to convert
\return the polar marker style enum value
*/
-KDChartParams::PolarMarkerStyle KDChartParams::stringToPolarMarkerStyle( const QString& string )
+KDChartParams::PolarMarkerStyle KDChartParams::stringToPolarMarkerStyle( const TQString& string )
{
return static_cast<KDChartParams::PolarMarkerStyle>(stringToMarkerStyle( string ));
}
@@ -2997,7 +2997,7 @@ KDChartParams::PolarMarkerStyle KDChartParams::stringToPolarMarkerStyle( const Q
\param string the string to convert
\return the polar marker style enum value
*/
-KDChartParams::PolarMarkerStyle KDChartParams::stringToPolarMarkerStyleTr( const QString& string )
+KDChartParams::PolarMarkerStyle KDChartParams::stringToPolarMarkerStyleTr( const TQString& string )
{
return static_cast<KDChartParams::PolarMarkerStyle>(stringToMarkerStyle( string ));
}
@@ -3009,7 +3009,7 @@ KDChartParams::PolarMarkerStyle KDChartParams::stringToPolarMarkerStyleTr( const
\param type the subtype enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::hiLoChartSubTypeToString( HiLoChartSubType type ) {
+TQString KDChartParams::hiLoChartSubTypeToString( HiLoChartSubType type ) {
switch( type ) {
case HiLoSimple:
return "HiLoSimple";
@@ -3030,7 +3030,7 @@ QString KDChartParams::hiLoChartSubTypeToString( HiLoChartSubType type ) {
\param string the string to convert
\return the HiLo chart subtype enum value
*/
-KDChartParams::HiLoChartSubType KDChartParams::stringToHiLoChartSubType( const QString& string ) {
+KDChartParams::HiLoChartSubType KDChartParams::stringToHiLoChartSubType( const TQString& string ) {
if( string == "HiLoSimple" )
return HiLoSimple;
else if( string == "HiLoClose" )
@@ -3048,7 +3048,7 @@ KDChartParams::HiLoChartSubType KDChartParams::stringToHiLoChartSubType( const Q
\param string the string to convert
\return the BoxWhisker chart subtype enum value
*/
-KDChartParams::BWChartSubType KDChartParams::stringToBWChartSubType( const QString& string ) {
+KDChartParams::BWChartSubType KDChartParams::stringToBWChartSubType( const TQString& string ) {
if( string == "BWSimple" )
return BWSimple;
else // should not happen
@@ -3061,7 +3061,7 @@ KDChartParams::BWChartSubType KDChartParams::stringToBWChartSubType( const QStri
\param type the BWStatVal enum to convert
\return the string representation of the type BWStatVal
*/
-QString KDChartParams::bWChartStatValToString( BWStatVal type ) {
+TQString KDChartParams::bWChartStatValToString( BWStatVal type ) {
switch( type ) {
case UpperOuterFence:
return "UpperOuterFence";
@@ -3095,7 +3095,7 @@ QString KDChartParams::bWChartStatValToString( BWStatVal type ) {
\param string the string to convert
\return the BWStatVal enum value
*/
-KDChartParams::BWStatVal KDChartParams::stringToBWChartStatVal( const QString& string ) {
+KDChartParams::BWStatVal KDChartParams::stringToBWChartStatVal( const TQString& string ) {
if( string == "UpperOuterFence" )
return UpperOuterFence;
else if( string == "UpperInnerFence" )
@@ -3127,7 +3127,7 @@ KDChartParams::BWStatVal KDChartParams::stringToBWChartStatVal( const QString& s
\param type the legend position enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::legendPositionToString( LegendPosition pos ) {
+TQString KDChartParams::legendPositionToString( LegendPosition pos ) {
switch( pos ) {
case NoLegend:
return "NoLegend";
@@ -3176,7 +3176,7 @@ QString KDChartParams::legendPositionToString( LegendPosition pos ) {
\param string the string to convert
\return the legend position enum value
*/
-KDChartParams::LegendPosition KDChartParams::stringToLegendPosition( const QString& string ) {
+KDChartParams::LegendPosition KDChartParams::stringToLegendPosition( const TQString& string ) {
if( string == "NoLegend" )
return NoLegend;
else if( string == "LegendTop" )
@@ -3221,7 +3221,7 @@ KDChartParams::LegendPosition KDChartParams::stringToLegendPosition( const QStri
\param source the legend source enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::legendSourceToString( LegendSource source ) {
+TQString KDChartParams::legendSourceToString( LegendSource source ) {
switch( source ) {
case LegendManual:
return "Manual";
@@ -3242,7 +3242,7 @@ QString KDChartParams::legendSourceToString( LegendSource source ) {
\param string the string to convert
\return the legend source enum value
*/
-KDChartParams::LegendSource KDChartParams::stringToLegendSource( const QString& string ) {
+KDChartParams::LegendSource KDChartParams::stringToLegendSource( const TQString& string ) {
if( string == "Manual" )
return LegendManual;
else if( string == "FirstColumn" )
@@ -3260,7 +3260,7 @@ KDChartParams::LegendSource KDChartParams::stringToLegendSource( const QString&
\param mode the chart source mode enum value to convert
\return the string
*/
-QString KDChartParams::chartSourceModeToString( const SourceMode& mode )
+TQString KDChartParams::chartSourceModeToString( const SourceMode& mode )
{
switch( mode ){
case UnknownMode:
@@ -3287,7 +3287,7 @@ QString KDChartParams::chartSourceModeToString( const SourceMode& mode )
\param string the string to convert
\return the chart source mode enum value
*/
-KDChartParams::SourceMode KDChartParams::stringToChartSourceMode( const QString& string )
+KDChartParams::SourceMode KDChartParams::stringToChartSourceMode( const TQString& string )
{
if( string.isEmpty() )
return UnknownMode;
@@ -3321,7 +3321,7 @@ KDChartParams::SourceMode KDChartParams::stringToChartSourceMode( const QString&
\param type the subtype enum to convert
\return the string representation of the type enum
*/
-QString KDChartParams::bWChartSubTypeToString( BWChartSubType type ) {
+TQString KDChartParams::bWChartSubTypeToString( BWChartSubType type ) {
switch( type ) {
case BWSimple:
return "BWSimple";
diff --git a/libkdchart/KDChartPiePainter.cpp b/libkdchart/KDChartPiePainter.cpp
index f1715f1..dd00f62 100644
--- a/libkdchart/KDChartPiePainter.cpp
+++ b/libkdchart/KDChartPiePainter.cpp
@@ -30,9 +30,9 @@
#include "KDChartPiePainter.h"
#include "KDChartParams.h"
-#include <qpainter.h>
-#include <qvaluestack.h>
-#include <qmessagebox.h>
+#include <tqpainter.h>
+#include <tqvaluestack.h>
+#include <tqmessagebox.h>
#define DEGTORAD(d) (d)*M_PI/180
@@ -55,7 +55,7 @@
KDChartPainter( params )
{
// This constructor intentionally left blank so far; we cannot setup the
- // geometry yet since we do not know the size of the painter.
+ // tqgeometry yet since we do not know the size of the painter.
}
@@ -72,13 +72,13 @@ KDChartPiePainter::~KDChartPiePainter()
/**
Paints the actual data area.
- \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 KDChartPiePainter::paintData( QPainter* painter,
+void KDChartPiePainter::paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions )
@@ -86,12 +86,12 @@ void KDChartPiePainter::paintData( QPainter* painter,
//bHelp=true;
uint chart = paint2nd ? 1 : 0;
- QRect ourClipRect( _dataRect );
+ TQRect ourClipRect( _dataRect );
ourClipRect.addCoords( -1,-1,1,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 );
@@ -125,7 +125,7 @@ void KDChartPiePainter::paintData( QPainter* painter,
_angleLens.resize( _numValues );
// compute position
- _size = QMIN( _dataRect.width(), _dataRect.height() ); // initial size
+ _size = TQMIN( _dataRect.width(), _dataRect.height() ); // initial size
// if the pies explode, we need to give them additional space =>
// make the basic size smaller
if ( params()->explode() ) {
@@ -139,7 +139,7 @@ void KDChartPiePainter::paintData( QPainter* painter,
int x = ( _dataRect.width() == _size ) ? 0 : ( ( _dataRect.width() - _size ) / 2 );
int y = ( _dataRect.height() == _size ) ? 0 : ( ( _dataRect.height() - _size ) / 2 );
- _position = QRect( x, y, _size, _size );
+ _position = TQRect( x, y, _size, _size );
_position.moveBy( _dataRect.left(), _dataRect.top() );
} else {
// threeD: width is the maximum possible width; height is 1/2 of that
@@ -158,7 +158,7 @@ void KDChartPiePainter::paintData( QPainter* painter,
}
int y = ( _dataRect.height() == height ) ? 0 : ( ( _dataRect.height() - height - sizeFor3DEffect ) / 2 );
- _position = QRect( _dataRect.left() + x, _dataRect.top() + y,
+ _position = TQRect( _dataRect.left() + x, _dataRect.top() + y,
_size, height );
// _position.moveBy( _dataRect.left(), _dataRect.top() );
}
@@ -166,17 +166,17 @@ void KDChartPiePainter::paintData( QPainter* painter,
double sum = data->rowAbsSum( dataset );
if( sum==0 ) //nothing to draw
return;
- double sectorsPerValue = 5760.0 / sum; // 5760 == 16*360, number of sections in Qt circle
+ double sectorsPerValue = 5760.0 / sum; // 5760 == 16*360, number of sections in TQt circle
int currentValue = params()->pieStart() * 16;
bool atLeastOneValue = false; // guard against completely empty tables
- QVariant vValY;
+ TQVariant vValY;
for ( int value = 0; value < _numValues; value++ ) {
// is there anything at all at this value
/* see above for meaning of 16 */
if( data->cellCoord( dataset, value, vValY, 1 ) &&
- QVariant::Double == vValY.type() ){
+ TQVariant::Double == vValY.type() ){
_startAngles[ value ] = currentValue;
const double cellValue = fabs( vValY.toDouble() );
_angleLens[ value ] = ( int ) floor( cellValue * sectorsPerValue + 0.5 );
@@ -205,7 +205,7 @@ void KDChartPiePainter::paintData( QPainter* painter,
int frontmostpie = findPieAt( 270 * 16 );
// and put the backmost pie on the TODO stack to initialize it,
// but only if it is not the frontmostpie
- QValueStack < int > todostack;
+ TQValueStack < int > todostack;
if ( backmostpie != frontmostpie )
todostack.push( backmostpie );
else {
@@ -225,7 +225,7 @@ void KDChartPiePainter::paintData( QPainter* painter,
// The list with pies that have already been drawn
- QValueList < int > donelist;
+ TQValueList < int > donelist;
// Draw pies until the todostack is empty or only the frontmost
// pie is there
@@ -241,7 +241,7 @@ void KDChartPiePainter::paintData( QPainter* painter,
// take one pie from the stack
int currentpie = todostack.pop();
// if this pie was already drawn, ignore it
- if ( donelist.find( currentpie ) != donelist.end() )
+ if ( donelist.tqfind( currentpie ) != donelist.end() )
continue;
// If this pie is the frontmost pie, put it back, but at the
@@ -251,7 +251,7 @@ void KDChartPiePainter::paintData( QPainter* painter,
// been terminated by the loop condition.
if ( currentpie == frontmostpie ) {
Q_ASSERT( !todostack.isEmpty() );
- // QValueStack::exchange() would be nice here...
+ // TQValueStack::exchange() would be nice here...
int secondpie = todostack.pop();
if ( currentpie == secondpie )
// no need to have the second pie twice on the stack,
@@ -278,10 +278,10 @@ void KDChartPiePainter::paintData( QPainter* painter,
// whether these have not been painted already, and put them
// on the stack.
int leftOfCurrent = findLeftPie( currentpie );
- if ( donelist.find( leftOfCurrent ) == donelist.end() )
+ if ( donelist.tqfind( leftOfCurrent ) == donelist.end() )
todostack.push( leftOfCurrent );
int rightOfCurrent = findRightPie( currentpie );
- if ( donelist.find( rightOfCurrent ) == donelist.end() )
+ if ( donelist.tqfind( rightOfCurrent ) == donelist.end() )
todostack.push( rightOfCurrent );
}
@@ -295,14 +295,14 @@ void KDChartPiePainter::paintData( QPainter* painter,
/**
Internal method that draws one of the pies in a pie chart.
- \param painter the QPainter to draw in
+ \param painter the TQPainter to draw in
\param dataset the dataset to draw the pie for
\param pie the pie to draw
\param the chart to draw the pie in
\param regions a pointer to a list of regions that will be filled
with regions representing the data segments, if not null
*/
-void KDChartPiePainter::drawOnePie( QPainter* painter,
+void KDChartPiePainter::drawOnePie( TQPainter* painter,
KDChartTableDataBase* /*data*/,
uint dataset, uint pie, uint chart,
uint threeDPieHeight,
@@ -314,19 +314,19 @@ void KDChartPiePainter::drawOnePie( QPainter* painter,
int startAngle = _startAngles[ ( int ) pie ];
KDChartDataRegion* datReg = 0;
- QRegion* region = 0;
+ TQRegion* region = 0;
bool mustDeleteRegion = false;
if ( regions ){
- region = new QRegion();
+ region = new TQRegion();
mustDeleteRegion = true;
}
- QRect drawPosition = _position;
+ TQRect drawPosition = _position;
if ( params()->explode() ) {
// need to compute a new position for each or some of the pie
- QValueList<int> explodeList = params()->explodeValues();
+ TQValueList<int> explodeList = params()->explodeValues();
if( explodeList.count() == 0 || // nothing on list, explode all
- explodeList.find( pie ) != explodeList.end() ) {
+ explodeList.tqfind( pie ) != explodeList.end() ) {
double explodeAngle = ( startAngle + angleLen / 2 ) / 16;
double explodeAngleRad = DEGTORAD( explodeAngle );
double cosAngle = cos( explodeAngleRad );
@@ -334,8 +334,8 @@ void KDChartPiePainter::drawOnePie( QPainter* painter,
// find the explode factor for this particular pie
double explodeFactor = 0.0;
- QMap<int,double> explodeFactors = params()->explodeFactors();
- if( !explodeFactors.contains( pie ) ) // not on factors list, use default
+ TQMap<int,double> explodeFactors = params()->explodeFactors();
+ if( !explodeFactors.tqcontains( pie ) ) // not on factors list, use default
explodeFactor = params()->explodeFactor();
else // on factors list, use segment-specific value
explodeFactor = explodeFactors[pie];
@@ -361,11 +361,11 @@ void KDChartPiePainter::drawOnePie( QPainter* painter,
// full circle, avoid nasty line in the middle
painter->drawEllipse( drawPosition );
if ( regions ) {
- QPointArray hitregion;
+ TQPointArray hitregion;
hitregion.makeEllipse( drawPosition.x(), drawPosition.y(),
drawPosition.width(),
drawPosition.height() );
- datReg = new KDChartDataRegion( region->unite( QRegion( hitregion ) ),
+ datReg = new KDChartDataRegion( region->unite( TQRegion( hitregion ) ),
dataset,
pie,
chart );
@@ -395,7 +395,7 @@ void KDChartPiePainter::drawOnePie( QPainter* painter,
// draw the top of this piece
// Start with getting the points for the arc.
const int arcPoints = angleLen;
- QPointArray collect(arcPoints+2);
+ TQPointArray collect(arcPoints+2);
int i=0;
for ( ; i<=angleLen; ++i){
collect.setPoint(i, pointOnCircle( drawPosition, startAngle+i ));
@@ -415,7 +415,7 @@ void KDChartPiePainter::drawOnePie( QPainter* painter,
if ( regions ) {
- QPointArray hitregion;
+ TQPointArray hitregion;
hitregion.makeArc( drawPosition.x(), drawPosition.y(),
drawPosition.width(),
drawPosition.height(),
@@ -423,7 +423,7 @@ void KDChartPiePainter::drawOnePie( QPainter* painter,
hitregion.resize( hitregion.size() + 1 );
hitregion.setPoint( hitregion.size() - 1,
drawPosition.center() );
- datReg = new KDChartDataRegion( region->unite( QRegion( hitregion ) ),
+ datReg = new KDChartDataRegion( region->unite( TQRegion( hitregion ) ),
dataset,
pie,
chart );
@@ -442,17 +442,17 @@ void KDChartPiePainter::drawOnePie( QPainter* painter,
= datReg->points[ KDChartEnums::PosBottomLeft ];
datReg->points[ KDChartEnums::PosCenterLeft ]
- = QPoint( ( datReg->points[ KDChartEnums::PosTopLeft ].x()
+ = TQPoint( ( datReg->points[ KDChartEnums::PosTopLeft ].x()
+ datReg->points[ KDChartEnums::PosBottomLeft ].x() ) / 2,
( datReg->points[ KDChartEnums::PosTopLeft ].y()
+ datReg->points[ KDChartEnums::PosBottomLeft ].y() ) / 2 );
datReg->points[ KDChartEnums::PosCenter ]
- = QPoint( ( datReg->points[ KDChartEnums::PosTopCenter ].x()
+ = TQPoint( ( datReg->points[ KDChartEnums::PosTopCenter ].x()
+ datReg->points[ KDChartEnums::PosBottomCenter ].x() ) / 2,
( datReg->points[ KDChartEnums::PosTopCenter ].y()
+ datReg->points[ KDChartEnums::PosBottomCenter ].y() ) / 2 );
datReg->points[ KDChartEnums::PosCenterRight ]
- = QPoint( ( datReg->points[ KDChartEnums::PosTopRight ].x()
+ = TQPoint( ( datReg->points[ KDChartEnums::PosTopRight ].x()
+ datReg->points[ KDChartEnums::PosBottomRight ].x() ) / 2,
( datReg->points[ KDChartEnums::PosTopRight ].y()
+ datReg->points[ KDChartEnums::PosBottomRight ].y() ) / 2 );
@@ -471,7 +471,7 @@ void KDChartPiePainter::drawOnePie( QPainter* painter,
/**
Internal method that draws the shadow creating the 3D effect of a pie
- \param painter the QPainter to draw in
+ \param painter the TQPainter to draw in
\param rect the position to draw at
\param dataset the dataset to draw the pie for
\param pie the pie to draw the shadow for
@@ -480,12 +480,12 @@ void KDChartPiePainter::drawOnePie( QPainter* painter,
\param regions a pointer to a list of regions that will be filled
with regions representing the data segments, if not null
*/
-void KDChartPiePainter::draw3DEffect( QPainter* painter,
- const QRect& drawPosition,
+void KDChartPiePainter::draw3DEffect( TQPainter* painter,
+ const TQRect& drawPosition,
uint dataset, uint pie, uint chart,
uint threeDHeight,
bool /*explode*/,
- QRegion* region )
+ TQRegion* region )
{
// NOTE: We cannot optimize away drawing some of the effects (even
// when not exploding), because some of the pies might be left out
@@ -495,7 +495,7 @@ void KDChartPiePainter::draw3DEffect( QPainter* painter,
// No need to save the brush, will be changed on return from this
// method anyway.
- painter->setBrush( QBrush( params()->dataShadow1Color( pie ),
+ painter->setBrush( TQBrush( params()->dataShadow1Color( pie ),
params()->shadowPattern() ) );
int startAngle = _startAngles[ ( int ) pie ];
@@ -671,23 +671,23 @@ void KDChartPiePainter::draw3DEffect( QPainter* painter,
/**
Internal method that draws a segment with a straight 3D effect
- \param painter the QPainter to draw in
+ \param painter the TQPainter to draw in
\param rect the position to draw at
\param threeDHeight the height of the shadow
\param angle the angle of the segment
\param regions a pointer to a list of regions that will be filled
with regions representing the data segments, if not null
*/
-void KDChartPiePainter::drawStraightEffectSegment( QPainter* painter,
- const QRect& rect,
+void KDChartPiePainter::drawStraightEffectSegment( TQPainter* painter,
+ const TQRect& rect,
uint /*dataset*/, uint /*pie*/, uint /*chart*/,
int threeDHeight,
int angle,
- QRegion* region )
+ TQRegion* region )
{
- QPoint center = rect.center();
- QPointArray points( 4 );
- QPoint circlePoint = pointOnCircle( rect, angle );
+ TQPoint center = rect.center();
+ TQPointArray points( 4 );
+ TQPoint circlePoint = pointOnCircle( rect, angle );
points.setPoint( 0, center );
points.setPoint( 1, circlePoint );
points.setPoint( 2, circlePoint.x(), circlePoint.y() + threeDHeight );
@@ -695,14 +695,14 @@ void KDChartPiePainter::drawStraightEffectSegment( QPainter* painter,
center.y() + threeDHeight );
painter->drawPolygon( points );
if ( region )
- *region += QRegion( points );
+ *region += TQRegion( points );
}
/**
Internal method that draws a segment with an arc 3D effect
- \param painter the QPainter to draw in
+ \param painter the TQPainter to draw in
\param rect the position to draw at
\param threeDHeight the height of the shadow
\param startAngle the starting angle of the segment
@@ -710,19 +710,19 @@ void KDChartPiePainter::drawStraightEffectSegment( QPainter* painter,
\param regions a pointer to a list of regions that will be filled
with regions representing the data segments, if not null
*/
-void KDChartPiePainter::drawArcEffectSegment( QPainter* painter,
- const QRect& rect,
+void KDChartPiePainter::drawArcEffectSegment( TQPainter* painter,
+ const TQRect& rect,
uint /*dataset*/, uint /*pie*/, uint /*chart*/,
int threeDHeight,
int startAngle,
int endAngle,
- QRegion* region )
+ TQRegion* region )
{
// Start with getting the points for the inner arc.
- const int startA = QMIN(startAngle, endAngle);
- const int endA = QMAX(startAngle, endAngle);
+ const int startA = TQMIN(startAngle, endAngle);
+ const int endA = TQMAX(startAngle, endAngle);
const int arcPoints = endA-startA+1;
- QPointArray collect(arcPoints * 2);
+ TQPointArray collect(arcPoints * 2);
for ( int angle=endA; angle>=startA; --angle){
collect.setPoint(endA-angle, pointOnCircle( rect, angle ));
}
@@ -730,13 +730,13 @@ void KDChartPiePainter::drawArcEffectSegment( QPainter* painter,
// Now copy these arcs again into the same array, but in the
// opposite direction and moved down by the 3D height.
for ( int i = arcPoints - 1; i >= 0; --i ) {
- QPoint pointOnFirstArc = collect.point( i );
+ TQPoint pointOnFirstArc = collect.point( i );
pointOnFirstArc.setY( pointOnFirstArc.y() + threeDHeight );
collect.setPoint( arcPoints * 2 - i - 1, pointOnFirstArc );
}
painter->drawPolygon( collect );
if ( region )
- *region += QRegion( collect );
+ *region += TQRegion( collect );
}
@@ -810,9 +810,9 @@ uint KDChartPiePainter::findRightPie( uint pie )
\return the fallback text to use for describing the specified
dataset in the legend
*/
-QString KDChartPiePainter::fallbackLegendText( uint dataset ) const
+TQString KDChartPiePainter::fallbackLegendText( uint dataset ) const
{
- return QObject::tr( "Item " ) + QString::number( dataset + 1 );
+ return TQObject::tr( "Item " ) + TQString::number( dataset + 1 );
}
diff --git a/libkdchart/KDChartPiePainter.h b/libkdchart/KDChartPiePainter.h
index 047aa33..8d86a00 100644
--- a/libkdchart/KDChartPiePainter.h
+++ b/libkdchart/KDChartPiePainter.h
@@ -41,41 +41,41 @@ class KDChartPiePainter : public KDChartPainter
KDChartPiePainter( KDChartParams* params );
virtual ~KDChartPiePainter();
- virtual void paintData( QPainter* painter,
+ virtual void paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions = 0 );
- virtual void drawOnePie( QPainter* painter,
+ virtual void drawOnePie( TQPainter* painter,
KDChartTableDataBase* data,
uint dataset, uint pie, uint chart,
uint threeDPieHeight,
KDChartDataRegionList* regions = 0 );
- virtual void draw3DEffect( QPainter* painter, const QRect& drawPosition,
+ virtual void draw3DEffect( TQPainter* painter, const TQRect& drawPosition,
uint dataset, uint pie, uint chart,
uint threeDPieHeight,
bool explode,
- QRegion* region = 0 );
- void drawStraightEffectSegment( QPainter* painter, const QRect& rect,
+ TQRegion* region = 0 );
+ void drawStraightEffectSegment( TQPainter* painter, const TQRect& rect,
uint dataset, uint pie, uint chart,
int threeDHeight, int angle,
- QRegion* region = 0 );
- void drawArcEffectSegment( QPainter* painter, const QRect& rect,
+ TQRegion* region = 0 );
+ void drawArcEffectSegment( TQPainter* painter, const TQRect& rect,
uint dataset, uint pie, uint chart,
int threeDHeight, int startAngle,
int endAngle,
- QRegion* region = 0 );
+ TQRegion* region = 0 );
- virtual QString fallbackLegendText( uint dataset ) const;
+ virtual TQString fallbackLegendText( uint dataset ) const;
virtual uint numLegendFallbackTexts( KDChartTableDataBase* data ) const;
uint findPieAt( int angle );
uint findLeftPie( uint pie );
uint findRightPie( uint pie );
- QMemArray < int > _startAngles;
- QMemArray < int > _angleLens;
+ TQMemArray < int > _startAngles;
+ TQMemArray < int > _angleLens;
- QRect _position;
+ TQRect _position;
int _size;
int _numValues; // PENDING(kalle) Move to base class
}
diff --git a/libkdchart/KDChartPolarPainter.cpp b/libkdchart/KDChartPolarPainter.cpp
index 41009a1..23430db 100644
--- a/libkdchart/KDChartPolarPainter.cpp
+++ b/libkdchart/KDChartPolarPainter.cpp
@@ -32,7 +32,7 @@
#include "KDChartAxesPainter.h"
#include "KDDrawText.h"
-#include <qpainter.h>
+#include <tqpainter.h>
/**
\class KDChartPolarPainter KDChartPolarPainter.h
@@ -50,7 +50,7 @@ KDChartPolarPainter::KDChartPolarPainter( KDChartParams* params ) :
KDChartPainter( params )
{
// This constructor intentionally left blank so far; we cannot setup the
- // geometry yet since we do not know the size of the painter.
+ // tqgeometry yet since we do not know the size of the painter.
}
@@ -68,20 +68,20 @@ KDChartPolarPainter::~KDChartPolarPainter()
regions is not 0 and the chart is configured to be drawn with
markers.
- \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 KDChartPolarPainter::paintData( QPainter* painter,
+void KDChartPolarPainter::paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions )
{
uint chart = paint2nd ? 1 : 0;
- QRect ourClipRect( _dataRect );
+ TQRect ourClipRect( _dataRect );
ourClipRect.setBottom( ourClipRect.bottom() - 1 ); // protect axes
ourClipRect.setLeft( ourClipRect.left() + 1 );
ourClipRect.setRight( ourClipRect.right() - 1 );
@@ -89,9 +89,9 @@ void KDChartPolarPainter::paintData( QPainter* painter,
// PENDING(khz) adjust the clip rect if neccessary...
//
- 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 );
@@ -116,15 +116,15 @@ void KDChartPolarPainter::paintData( QPainter* painter,
numValues = data->usedCols();
// compute position
- int size = QMIN( _dataRect.width(), _dataRect.height() ); // initial size
+ int size = TQMIN( _dataRect.width(), _dataRect.height() ); // initial size
const double minSizeP1000 = size / 1000.0;
int x = ( _dataRect.width() == size ) ? 0 : ( ( _dataRect.width() - size ) / 2 );
int y = ( _dataRect.height() == size ) ? 0 : ( ( _dataRect.height() - size ) / 2 );
- QRect position( x, y, size, size );
+ TQRect position( x, y, size, size );
- QPoint center( position.width() / 2 + position.x(),
+ TQPoint center( position.width() / 2 + position.x(),
position.height() / 2 + position.y() );
@@ -137,7 +137,7 @@ void KDChartPolarPainter::paintData( QPainter* painter,
maxValue = 100.0;
break;
default:
- maxValue = QMAX( data->maxColSum(), 0.0 );
+ maxValue = TQMAX( data->maxColSum(), 0.0 );
}
double pixelsPerUnit = 0.0;
@@ -145,7 +145,7 @@ void KDChartPolarPainter::paintData( QPainter* painter,
// both directions
pixelsPerUnit = (position.height() / maxValue / 2) * 1000 / 1250;
- QMap < int, double > currentValueSums;
+ TQMap < int, double > currentValueSums;
if ( params()->polarChartSubType() == KDChartParams::PolarStacked
|| params()->polarChartSubType() == KDChartParams::PolarPercent )
// this array is only used for stacked and percent polar
@@ -153,7 +153,7 @@ void KDChartPolarPainter::paintData( QPainter* painter,
// ones
for ( int value = 0; value < numValues; value++ )
currentValueSums[ value ] = 0.0;
- QMap < int, double > totalValueSums;
+ TQMap < int, double > totalValueSums;
/*
@@ -191,7 +191,7 @@ void KDChartPolarPainter::paintData( QPainter* painter,
: -1 * static_cast < int > ( paraCircular.axisGridLineWidth()
* minSizeP1000 ) );
- QFont actFont;
+ TQFont actFont;
int labels = 0;
double currentRadiusPPU = position.height() / 2.0;
@@ -204,16 +204,16 @@ void KDChartPolarPainter::paintData( QPainter* painter,
double pDelimDelta = 0.0;
// calculate label texts
- QStringList* labelTexts = 0;
+ TQStringList* labelTexts = 0;
((KDChartParams*)params())->setAxisArea( KDChartAxisParams::AxisPosCircular,
- QRect( 0,
+ TQRect( 0,
0,
static_cast<int>( radiusPPU ),
static_cast<int>( radiusPPU ) ) );
double delimLen = 20.0 * minSizeP1000; // per mille of area
KDChartAxisParams::AxisPos basicPos;
- QPoint orig, dest;
+ TQPoint orig, dest;
double dDummy;
double nSubDelimFactor = 0.0;
double nTxtHeight = 0.0;
@@ -221,12 +221,12 @@ void KDChartPolarPainter::paintData( QPainter* painter,
double pTextsY = 0.0;
double pTextsW = 0.0;
double pTextsH = 0.0;
- int textAlign = Qt::AlignHCenter | Qt::AlignVCenter;
+ int textAlign = TQt::AlignHCenter | TQt::AlignVCenter;
bool isLogarithmic = false;
bool isDateTime = false;
bool autoDtLabels = false;
- QDateTime dtLow;
- QDateTime dtHigh;
+ TQDateTime dtLow;
+ TQDateTime dtHigh;
KDChartAxisParams::ValueScale dtDeltaScale;
KDChartAxesPainter::calculateLabelTexts(
painter,
@@ -254,19 +254,19 @@ void KDChartPolarPainter::paintData( QPainter* painter,
dtLow,
dtHigh,
dtDeltaScale );
- labelTexts = ( QStringList* ) paraCircular.axisLabelTexts();
+ labelTexts = ( TQStringList* ) paraCircular.axisLabelTexts();
if( paraCircular.axisLabelsVisible() ) {
-//qDebug("\nnTxtHeight: "+QString::number(nTxtHeight));
+//qDebug("\nnTxtHeight: "+TQString::number(nTxtHeight));
// calculate font size
actFont = paraCircular.axisLabelsFont();
if ( paraCircular.axisLabelsFontUseRelSize() ) {
//qDebug("paraCircular.axisLabelsFontUseRelSize() is TRUE");
actFont.setPointSizeFloat( nTxtHeight );
}
- QFontMetrics fm( actFont );
- QString strMax;
+ TQFontMetrics fm( actFont );
+ TQString strMax;
int maxLabelsWidth = 0;
- for ( QStringList::Iterator it = labelTexts->begin();
+ for ( TQStringList::Iterator it = labelTexts->begin();
it != labelTexts->end();
++it ) {
if ( fm.width( *it ) > maxLabelsWidth ) {
@@ -278,7 +278,7 @@ void KDChartPolarPainter::paintData( QPainter* painter,
&& 6.0 < nTxtHeight ) {
nTxtHeight -= 0.5;
actFont.setPointSizeFloat( nTxtHeight );
- fm = QFontMetrics( actFont );
+ fm = TQFontMetrics( actFont );
}
painter->setFont( actFont );
}
@@ -297,14 +297,14 @@ void KDChartPolarPainter::paintData( QPainter* painter,
double currentRadiusPPU2 = currentRadiusPPU * 2;
int circularAxisAngle = ( currentRadiusPPU != 0.0 ) ? ( static_cast < int > (4.0 * radiusPPU / currentRadiusPPU) ) : 0;
if( paraCircular.axisShowGrid() ) {
- painter->setPen( QPen( paraCircular.axisGridColor(),
+ painter->setPen( TQPen( paraCircular.axisGridColor(),
circularGridLineWidth ) );
painter->drawEllipse( static_cast<int>( center.x() - currentRadiusPPU ),
static_cast<int>( center.y() - currentRadiusPPU ),
static_cast<int>( currentRadiusPPU2 ), static_cast<int>( currentRadiusPPU2 ) );
}
if( paraCircular.axisVisible() ) {
- painter->setPen( QPen( paraCircular.axisLineColor(),
+ painter->setPen( TQPen( paraCircular.axisLineColor(),
circularLineWidth ) );
if( params()->polarDelimAtPos( KDChartEnums::PosTopCenter ) )
painter->drawArc( static_cast<int>( center.x() - currentRadiusPPU ),
@@ -360,40 +360,40 @@ void KDChartPolarPainter::paintData( QPainter* painter,
}
if( paraCircular.axisLabelsVisible() ) {
const bool rotate = params()->polarRotateCircularLabels();
- painter->setPen( QPen( paraCircular.axisLabelsColor(),
+ painter->setPen( TQPen( paraCircular.axisLabelsColor(),
circularLineWidth ) );
- const QString& txt = (*labelTexts)[ iLabel ];
+ const TQString& txt = (*labelTexts)[ iLabel ];
if( params()->polarLabelsAtPos( KDChartEnums::PosTopCenter ) )
paintCircularAxisLabel( painter, rotate, 90, center, currentRadiusPPU, txt,
- Qt::AlignBottom | Qt::AlignHCenter, iLabel );
+ TQt::AlignBottom | TQt::AlignHCenter, iLabel );
if( params()->polarLabelsAtPos( KDChartEnums::PosBottomCenter ) )
paintCircularAxisLabel( painter, rotate, 270, center, currentRadiusPPU, txt,
- Qt::AlignTop | Qt::AlignHCenter, iLabel );
+ TQt::AlignTop | TQt::AlignHCenter, iLabel );
if( params()->polarLabelsAtPos( KDChartEnums::PosCenterRight ) )
paintCircularAxisLabel( painter, rotate, 0, center, currentRadiusPPU, txt,
- Qt::AlignVCenter | Qt::AlignRight, iLabel );
+ TQt::AlignVCenter | TQt::AlignRight, iLabel );
if( params()->polarLabelsAtPos( KDChartEnums::PosCenterLeft ) )
paintCircularAxisLabel( painter, rotate, 180, center, currentRadiusPPU, txt,
- Qt::AlignVCenter | Qt::AlignLeft, iLabel );
+ TQt::AlignVCenter | TQt::AlignLeft, iLabel );
if( params()->polarLabelsAtPos( KDChartEnums::PosTopRight ) )
paintCircularAxisLabel( painter, rotate, 45, center, currentRadiusPPU, txt,
- Qt::AlignBottom | Qt::AlignRight, iLabel );
+ TQt::AlignBottom | TQt::AlignRight, iLabel );
if( params()->polarLabelsAtPos( KDChartEnums::PosBottomLeft ) )
paintCircularAxisLabel( painter, rotate, 225, center, currentRadiusPPU, txt,
- Qt::AlignTop | Qt::AlignLeft, iLabel );
+ TQt::AlignTop | TQt::AlignLeft, iLabel );
if( params()->polarLabelsAtPos( KDChartEnums::PosBottomRight ) )
paintCircularAxisLabel( painter, rotate, 315, center, currentRadiusPPU, txt,
- Qt::AlignTop | Qt::AlignRight, iLabel );
+ TQt::AlignTop | TQt::AlignRight, iLabel );
if( params()->polarLabelsAtPos( KDChartEnums::PosTopLeft ) )
paintCircularAxisLabel( painter, rotate, 135, center, currentRadiusPPU, txt,
- Qt::AlignBottom | Qt::AlignLeft, iLabel );
+ TQt::AlignBottom | TQt::AlignLeft, iLabel );
}
}
}
@@ -419,17 +419,17 @@ void KDChartPolarPainter::paintData( QPainter* painter,
|| paraSagittal.axisLabelsVisible() ) {
// calculate label texts
- QStringList* labelTexts = 0;
+ TQStringList* labelTexts = 0;
bool onlyDefaultLabels = true;
if( paraSagittal.axisLabelsVisible() ) {
((KDChartParams*)params())->setAxisArea( KDChartAxisParams::AxisPosSagittal,
- QRect( 0,
+ TQRect( 0,
0,
static_cast < int > ( 2.0 * M_PI * radius ),
static_cast < int > ( 0.5 * radius ) ) );
double delimLen = 20.0 * minSizeP1000; // per mille of area
KDChartAxisParams::AxisPos basicPos;
- QPoint orig, dest;
+ TQPoint orig, dest;
double dDummy;
double nSubDelimFactor = 0.0;
double pDelimDelta = 0.0;
@@ -438,12 +438,12 @@ void KDChartPolarPainter::paintData( QPainter* painter,
double pTextsY = 0.0;
double pTextsW = 0.0;
double pTextsH = 0.0;
- int textAlign = Qt::AlignCenter;
+ int textAlign = TQt::AlignCenter;
bool isLogarithmic = false;
bool isDateTime = false;
bool autoDtLabels = false;
- QDateTime dtLow;
- QDateTime dtHigh;
+ TQDateTime dtLow;
+ TQDateTime dtHigh;
KDChartAxisParams::ValueScale dtDeltaScale;
KDChartAxesPainter::calculateLabelTexts(
painter,
@@ -471,16 +471,16 @@ void KDChartPolarPainter::paintData( QPainter* painter,
dtLow,
dtHigh,
dtDeltaScale );
- labelTexts = ( QStringList* ) paraSagittal.axisLabelTexts();
+ labelTexts = ( TQStringList* ) paraSagittal.axisLabelTexts();
// calculate font size
actFont = paraSagittal.axisLabelsFont();
if ( paraSagittal.axisLabelsFontUseRelSize() ) {
actFont.setPointSizeFloat( nTxtHeight );
}
- QFontMetrics fm( actFont );
- QString strMax;
+ TQFontMetrics fm( actFont );
+ TQString strMax;
int maxLabelsWidth = 0;
- for ( QStringList::Iterator it = labelTexts->begin();
+ for ( TQStringList::Iterator it = labelTexts->begin();
it != labelTexts->end();
++it ) {
if ( fm.width( *it ) > maxLabelsWidth ) {
@@ -493,7 +493,7 @@ void KDChartPolarPainter::paintData( QPainter* painter,
while ( fm.width( strMax ) > pTextsW && 6.0 < nTxtHeight ) {
nTxtHeight -= 0.5;
actFont.setPointSizeFloat( nTxtHeight );
- fm = QFontMetrics( actFont );
+ fm = TQFontMetrics( actFont );
}
painter->setFont( actFont );
}
@@ -507,7 +507,7 @@ void KDChartPolarPainter::paintData( QPainter* painter,
int r1 = static_cast < int > ( radius * 1050 / 1000 );
int r2 = static_cast < int > ( radius * 1100 / 1000 );
int r3 = static_cast < int > ( radius * 1175 / 1000 );
- QPoint pt1, pt2, pt3;
+ TQPoint pt1, pt2, pt3;
uint nLabels = labelTexts->count();
int angleBetweenRays = 360 / nLabels;
for( uint value = 0; value < nLabels; ++value ) {
@@ -515,33 +515,33 @@ void KDChartPolarPainter::paintData( QPainter* painter,
pt2 = center + polarToXY( r2, currentAngle );
pt3 = center + polarToXY( r3, currentAngle );
- //pt3 = painter->worldMatrix().map( pt3 );
+ //pt3 = painter->tqworldMatrix().map( pt3 );
if( paraSagittal.axisShowGrid() ) {
- painter->setPen( QPen( paraSagittal.axisGridColor(),
+ painter->setPen( TQPen( paraSagittal.axisGridColor(),
sagittalGridLineWidth ) );
painter->drawLine( center, pt1 );
}
if( paraSagittal.axisVisible() ) {
- painter->setPen( QPen( paraSagittal.axisLineColor(),
+ painter->setPen( TQPen( paraSagittal.axisLineColor(),
sagittalLineWidth ) );
painter->drawLine( pt1, pt2 );
}
if( paraSagittal.axisLabelsVisible()
&& labelTexts
&& labelTexts->count() > value ) {
- painter->setPen( QPen( paraSagittal.axisLabelsColor(),
+ painter->setPen( TQPen( paraSagittal.axisLabelsColor(),
sagittalLineWidth ) );
- QString label( onlyDefaultLabels
- ? QString::number( currentAngle )
+ TQString label( onlyDefaultLabels
+ ? TQString::number( currentAngle )
: (*labelTexts)[ value ] );
KDDrawText::drawRotatedText( painter,
currentAngle+90,
- painter->worldMatrix().map(pt3),
+ painter->tqworldMatrix().map(pt3),
label,
0,
- Qt::AlignCenter );
+ TQt::AlignCenter );
}
currentAngle += angleBetweenRays;
}
@@ -553,21 +553,21 @@ void KDChartPolarPainter::paintData( QPainter* painter,
? params()->polarLineWidth()
: -1 * static_cast < int > ( params()->polarLineWidth()
* minSizeP1000 );
- painter->setBrush( Qt::NoBrush );
+ painter->setBrush( TQt::NoBrush );
for ( unsigned int dataset = datasetStart; dataset <= datasetEnd; dataset++ ) {
- painter->setPen( QPen( params()->dataColor( dataset ),
+ painter->setPen( TQPen( params()->dataColor( dataset ),
dataLinesWidth ) );
- QPointArray points( numValues );
+ TQPointArray points( numValues );
int totalPoints = 0;
double valueTotal = 0.0; // Will only be used for Percent
int angleBetweenRays = 360 / numValues;
- QVariant vValY;
+ TQVariant vValY;
for ( int value = 0; value < numValues; value++ ) {
if( params()->polarChartSubType() == KDChartParams::PolarPercent )
valueTotal = data->colAbsSum( value );
// the value determines the angle, the dataset only the color
if( data->cellCoord( dataset, value, vValY, 1 ) &&
- QVariant::Double == vValY.type() ){
+ TQVariant::Double == vValY.type() ){
const double cellValue = vValY.toDouble();
double drawValue;
if ( params()->polarChartSubType() == KDChartParams::PolarStacked )
@@ -580,7 +580,7 @@ void KDChartPolarPainter::paintData( QPainter* painter,
// record the point for drawing the polygon later
int drawAngle = value * angleBetweenRays;
- QPoint drawPoint( center + polarToXY( static_cast<int>( drawValue ),
+ TQPoint drawPoint( center + polarToXY( static_cast<int>( drawValue ),
drawAngle ) );
points.setPoint( totalPoints, drawPoint );
totalPoints++;
@@ -600,15 +600,15 @@ void KDChartPolarPainter::paintData( QPainter* painter,
regions,
xsize ? &xsize : 0,
ysize ? &ysize : 0 );
- painter->setPen( QPen( params()->dataColor( dataset ),
+ painter->setPen( TQPen( params()->dataColor( dataset ),
dataLinesWidth ) );
}
if ( regions ) {
bool bMustAppendDatReg = 0 == datReg;
if( bMustAppendDatReg ){
- QRect rect( QPoint( drawPoint.x() - 1,
+ TQRect rect( TQPoint( drawPoint.x() - 1,
drawPoint.y() - 1 ),
- QSize( 3, 3 ) );
+ TQSize( 3, 3 ) );
datReg = new KDChartDataRegion( dataset,
value,
chart,
@@ -659,26 +659,26 @@ void KDChartPolarPainter::paintData( QPainter* painter,
/*
Helper methode being called by KDChartPolarPainter::paintData()
*/
-void KDChartPolarPainter::paintCircularAxisLabel( QPainter* painter,
+void KDChartPolarPainter::paintCircularAxisLabel( TQPainter* painter,
bool rotate,
int txtAngle,
- QPoint center,
+ TQPoint center,
double currentRadiusPPU,
- const QString& txt,
+ const TQString& txt,
int align,
int step )
{
- if( !rotate && (0 != (align & (Qt::AlignLeft | Qt::AlignRight) ) ) )
+ if( !rotate && (0 != (align & (TQt::AlignLeft | TQt::AlignRight) ) ) )
currentRadiusPPU += center.x()*0.01;
KDDrawText::drawRotatedText(
painter,
rotate ? txtAngle - 90 : 0,
- painter->worldMatrix().map(center - polarToXY( static_cast<int>( currentRadiusPPU ), txtAngle )),
+ painter->tqworldMatrix().map(center - polarToXY( static_cast<int>( currentRadiusPPU ), txtAngle )),
txt,
0,
step
- ? (rotate ? Qt::AlignBottom | Qt::AlignHCenter : align)
- : Qt::AlignCenter,
+ ? (rotate ? TQt::AlignBottom | TQt::AlignHCenter : align)
+ : TQt::AlignCenter,
false,0,false,
false );
}
@@ -696,15 +696,15 @@ void KDChartPolarPainter::paintCircularAxisLabel( QPainter* painter,
\param regions a list of regions for data points, a new region for the new
marker will be appended to this list if it is not 0
*//*
-void KDChartPolarPainter::drawMarker( QPainter* painter,
+void KDChartPolarPainter::drawMarker( TQPainter* painter,
KDChartParams::PolarMarkerStyle style,
- const QColor& color,
- const QPoint& p,
+ const TQColor& color,
+ const TQPoint& p,
uint, //dataset,
uint, //value,
uint, //chart,
double minSizeP1000,
- QRegion& region )
+ TQRegion& region )
{
int xsize = params()->polarMarkerSize().width();
if ( 0 > xsize )
@@ -719,18 +719,18 @@ void KDChartPolarPainter::drawMarker( QPainter* painter,
case KDChartParams::PolarMarkerSquare: {
painter->save();
painter->setBrush( color );
- QRect rect( QPoint( p.x() - xsize2, p.y() - ysize2 ), QPoint( p.x() + xsize2, p.y() + ysize2 ) );
+ TQRect rect( TQPoint( p.x() - xsize2, p.y() - ysize2 ), TQPoint( p.x() + xsize2, p.y() + ysize2 ) );
painter->drawRect( rect );
// Don't use rect for drawing after this!
rect.moveBy( _dataRect.x(), _dataRect.y() );
- region = QRegion( rect );
+ region = TQRegion( rect );
painter->restore();
break;
}
case KDChartParams::PolarMarkerDiamond: {
painter->save();
painter->setBrush( color );
- QPointArray points( 4 );
+ TQPointArray points( 4 );
points.setPoint( 0, p.x() - xsize2, p.y() );
points.setPoint( 1, p.x(), p.y() - ysize2 );
points.setPoint( 2, p.x() + xsize2, p.y() );
@@ -738,7 +738,7 @@ void KDChartPolarPainter::drawMarker( QPainter* painter,
painter->drawPolygon( points );
// Don't use points for drawing after this!
points.translate( _dataRect.x(), _dataRect.y() );
- region = QRegion( points );
+ region = TQRegion( points );
painter->restore();
break;
}
@@ -747,14 +747,14 @@ void KDChartPolarPainter::drawMarker( QPainter* painter,
painter->save();
painter->setBrush( color );
painter->drawEllipse( p.x() - xsize2, p.y() - ysize2, xsize, ysize );
- QPointArray points;
+ TQPointArray points;
points.makeEllipse( p.x() - xsize2, p.y() - ysize2, xsize, ysize );
// Don't use points for drawing after this!
points.translate( _dataRect.x(), _dataRect.y() );
if( points.size() > 0 )
- region = QRegion( points );
+ region = TQRegion( points );
else
- region = QRegion();
+ region = TQRegion();
painter->restore();
}
};
@@ -762,10 +762,10 @@ void KDChartPolarPainter::drawMarker( QPainter* painter,
#define DEGTORAD(d) (d)*M_PI/180
-QPoint KDChartPolarPainter::polarToXY( int radius, int angle )
+TQPoint KDChartPolarPainter::polarToXY( int radius, int angle )
{
double anglerad = DEGTORAD( static_cast<double>( angle ) );
- QPoint ret( static_cast<int>( cos( anglerad ) * radius ),
+ TQPoint ret( static_cast<int>( cos( anglerad ) * radius ),
static_cast<int>( sin( anglerad ) * radius ) );
return ret;
}
@@ -784,9 +784,9 @@ QPoint KDChartPolarPainter::polarToXY( int radius, int angle )
\return the fallback text to use for describing the specified
dataset in the legend
*/
-QString KDChartPolarPainter::fallbackLegendText( uint dataset ) const
+TQString KDChartPolarPainter::fallbackLegendText( uint dataset ) const
{
- return QObject::tr( "Series " ) + QString::number( dataset + 1 );
+ return TQObject::tr( "Series " ) + TQString::number( dataset + 1 );
}
diff --git a/libkdchart/KDChartPolarPainter.h b/libkdchart/KDChartPolarPainter.h
index 52a264a..5299d1d 100644
--- a/libkdchart/KDChartPolarPainter.h
+++ b/libkdchart/KDChartPolarPainter.h
@@ -41,36 +41,36 @@ class KDChartPolarPainter : public KDChartPainter
KDChartPolarPainter( KDChartParams* params );
virtual ~KDChartPolarPainter();
- virtual void paintData( QPainter* painter,
+ virtual void paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions = 0 );
-/* void drawMarker( QPainter* painter,
+/* void drawMarker( TQPainter* painter,
KDChartParams::PolarMarkerStyle style,
- const QColor& color, const QPoint& p,
+ const TQColor& color, const TQPoint& p,
uint dataset, uint value, uint chart,
double minSizeP1000,
- QRegion & region );*/
- virtual QString fallbackLegendText( uint dataset ) const;
+ TQRegion & region );*/
+ virtual TQString fallbackLegendText( uint dataset ) const;
virtual uint numLegendFallbackTexts( KDChartTableDataBase* data ) const;
private:
- QPoint polarToXY( int radius, int angle );
- void paintAxisLabels( QPainter* painter,
- QStringList& labelTexts,
+ TQPoint polarToXY( int radius, int angle );
+ void paintAxisLabels( TQPainter* painter,
+ TQStringList& labelTexts,
double radiusDelta,
- const QRect& position,
- const QPoint& center,
+ const TQRect& position,
+ const TQPoint& center,
double radiusPPU,
double& currentRadiusPPU,
const KDChartAxisParams & paraCircular,
double minSizeP1000 );
- void paintCircularAxisLabel( QPainter* painter,
+ void paintCircularAxisLabel( TQPainter* painter,
bool rotate,
int txtAngle,
- QPoint center,
+ TQPoint center,
double currentRadiusPPU,
- const QString& txt,
+ const TQString& txt,
int align,
int step );
};
diff --git a/libkdchart/KDChartPropertySet.cpp b/libkdchart/KDChartPropertySet.cpp
index 6abec75..247a918 100644
--- a/libkdchart/KDChartPropertySet.cpp
+++ b/libkdchart/KDChartPropertySet.cpp
@@ -31,8 +31,8 @@
#include "KDChartParams.h"
#include <KDXMLTools.h>
-#include <qpainter.h>
-#include <qvaluestack.h>
+#include <tqpainter.h>
+#include <tqvaluestack.h>
#include <stdlib.h>
@@ -78,7 +78,7 @@ const KDChartPropertySet* KDChartPropertySet::clone() const
return newSet;
}
-void KDChartPropertySet::quickReset( const QString& name, int idParent )
+void KDChartPropertySet::quickReset( const TQString& name, int idParent )
{
// set the name
mName = name;
@@ -107,7 +107,7 @@ void KDChartPropertySet::quickReset( const QString& name, int idParent )
mIdAreaBrush = idParent;
}
-void KDChartPropertySet::fullReset( const QString& name, int idParent )
+void KDChartPropertySet::fullReset( const TQString& name, int idParent )
{
quickReset( name, idParent );
fillValueMembersWithDummyValues();
@@ -117,32 +117,32 @@ void KDChartPropertySet::fillValueMembersWithDummyValues()
{
// fill with dummy values to avoid problems when saving us into a stream
mLineWidth = 1;
- mLineColor = Qt::black;
+ mLineColor = TQt::black;
mLineStyle = Qt::SolidLine;
mShowMarker = true;
- mMarkerAlign = Qt::AlignCenter;
- mMarkerSize = QSize(6,6);
- mMarkerColor = Qt::black;
+ mMarkerAlign = TQt::AlignCenter;
+ mMarkerSize = TQSize(6,6);
+ mMarkerColor = TQt::black;
mMarkerStyle = 0;
- mExtraLinesAlign = Qt::AlignLeft|Qt::AlignTop;
+ mExtraLinesAlign = TQt::AlignLeft|TQt::AlignTop;
mExtraLinesInFront = false;
mExtraLinesLength = -20;
mExtraLinesWidth = 1;
- mExtraLinesColor = Qt::black;
+ mExtraLinesColor = TQt::black;
mExtraLinesStyle = Qt::SolidLine;
- mExtraMarkersAlign = Qt::AlignLeft|Qt::AlignTop;
- mExtraMarkersSize = QSize(6,6);
- mExtraMarkersColor = Qt::black;
+ mExtraMarkersAlign = TQt::AlignLeft|TQt::AlignTop;
+ mExtraMarkersSize = TQSize(6,6);
+ mExtraMarkersColor = TQt::black;
mExtraMarkersStyle = 0;
mShowBar = true;
- mBarColor = Qt::black;
- mAreaBrush = QBrush( Qt::blue );
+ mBarColor = TQt::black;
+ mAreaBrush = TQBrush( TQt::blue );
}
-QDomElement KDChartPropertySet::saveXML(QDomDocument& doc) const
+TQDomElement KDChartPropertySet::saveXML(TQDomDocument& doc) const
{
- QDomElement propertySetElement = doc.createElement( "PropertySet" );
+ TQDomElement propertySetElement = doc.createElement( "PropertySet" );
propertySetElement.setAttribute( "OwnID", mOwnID );
KDXML::createStringNode( doc, propertySetElement, "Name", mName );
// normal bar properties:
@@ -159,7 +159,7 @@ QDomElement KDChartPropertySet::saveXML(QDomDocument& doc) const
KDXML::createIntNode( doc, propertySetElement, "IDLineColor", mIdLineColor );
KDXML::createColorNode( doc, propertySetElement, "LineColor", mLineColor );
KDXML::createIntNode( doc, propertySetElement, "IDLineStyle", mIdLineStyle );
- QDomElement lineStyleElement = doc.createElement( "LineStyle" );
+ TQDomElement lineStyleElement = doc.createElement( "LineStyle" );
propertySetElement.appendChild( lineStyleElement );
lineStyleElement.setAttribute( "Style", KDXML::penStyleToString( mLineStyle));
// normal marker properties:
@@ -172,7 +172,7 @@ QDomElement KDChartPropertySet::saveXML(QDomDocument& doc) const
KDXML::createIntNode( doc, propertySetElement, "IDMarkerColor", mIdMarkerColor );
KDXML::createColorNode( doc, propertySetElement, "MarkerColor", mMarkerColor );
KDXML::createIntNode( doc, propertySetElement, "IDMarkerStyle", mIdMarkerStyle );
- QDomElement markerStElem = doc.createElement( "MarkerStyle" );
+ TQDomElement markerStElem = doc.createElement( "MarkerStyle" );
propertySetElement.appendChild( markerStElem );
markerStElem.setAttribute("Style",
KDChartParams::lineMarkerStyleToString( (KDChartParams::LineMarkerStyle)mMarkerStyle));
@@ -188,7 +188,7 @@ QDomElement KDChartPropertySet::saveXML(QDomDocument& doc) const
KDXML::createIntNode( doc, propertySetElement, "IDExtraLinesColor", mIdExtraLinesColor );
KDXML::createColorNode( doc, propertySetElement, "ExtraLinesColor", mExtraLinesColor );
KDXML::createIntNode( doc, propertySetElement, "IDExtraLinesStyle", mIdExtraLinesStyle );
- QDomElement specLineStElem = doc.createElement( "ExtraLinesStyle" );
+ TQDomElement specLineStElem = doc.createElement( "ExtraLinesStyle" );
propertySetElement.appendChild( specLineStElem );
specLineStElem.setAttribute( "Style", KDXML::penStyleToString( mExtraLinesStyle));
// extra markers:
@@ -199,20 +199,20 @@ QDomElement KDChartPropertySet::saveXML(QDomDocument& doc) const
KDXML::createIntNode( doc, propertySetElement, "IDExtraMarkersColor", mIdExtraMarkersColor );
KDXML::createColorNode( doc, propertySetElement, "ExtraMarkersColor", mExtraMarkersColor );
KDXML::createIntNode( doc, propertySetElement, "IDExtraMarkersStyle", mIdExtraMarkersStyle );
- QDomElement specMarkerStElem = doc.createElement( "ExtraMarkersStyle" );
+ TQDomElement specMarkerStElem = doc.createElement( "ExtraMarkersStyle" );
propertySetElement.appendChild( specMarkerStElem );
specMarkerStElem.setAttribute("Style",
KDChartParams::lineMarkerStyleToString( (KDChartParams::LineMarkerStyle)mExtraMarkersStyle));
return propertySetElement;
}
-bool KDChartPropertySet::loadXML( const QDomElement& element, KDChartPropertySet& set )
+bool KDChartPropertySet::loadXML( const TQDomElement& element, KDChartPropertySet& set )
{
bool bOwnIDFound = false;
- QString s;
- QColor color;
- QBrush brush;
- QSize size;
+ TQString s;
+ TQColor color;
+ TQBrush brush;
+ TQSize size;
bool bValue;
int i;
// initialize the property set with default values
@@ -222,11 +222,11 @@ bool KDChartPropertySet::loadXML( const QDomElement& element, KDChartPropertySet
i = element.attribute( "OwnID" ).toInt( &bOwnIDFound );
if( bOwnIDFound ){
set.mOwnID = i;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Name" ) {
if( KDXML::readStringNode( element, s ) )
set.mName = s;
@@ -251,7 +251,7 @@ bool KDChartPropertySet::loadXML( const QDomElement& element, KDChartPropertySet
set.mIdAreaBrush = i;
} else if( tagName == "AreaBrush" ) {
if( KDXML::readBrushNode( element, brush ) )
- set.mAreaBrush = color;
+ set.mAreaBrush = TQBrush(color);
} else
// normal line properties:
if( tagName == "IDLineWidth" ) {
diff --git a/libkdchart/KDChartPropertySet.h b/libkdchart/KDChartPropertySet.h
index 306109c..a3e9495 100644
--- a/libkdchart/KDChartPropertySet.h
+++ b/libkdchart/KDChartPropertySet.h
@@ -32,9 +32,9 @@
#include <KDChartEnums.h>
#include <kdchart_export.h>
-#include <qdom.h>
-#include <qcolor.h>
-#include <qbrush.h>
+#include <tqdom.h>
+#include <tqcolor.h>
+#include <tqbrush.h>
/**
\file KDChartPropertySet.h
@@ -63,12 +63,13 @@ instead of the value that is stored locally.
\sa KDCHART_PROPSET_NORMAL_DATA, KDCHART_PROPSET_TRANSPARENT_DATA
\sa KDChartParams::registerProperties
*/
-class KDCHART_EXPORT KDChartPropertySet :public QObject
+class KDCHART_EXPORT KDChartPropertySet :public TQObject
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS( SpecialDataPropertyID )
- // Required by QSA
+ // Required by TQSA
Q_ENUMS( PenStyle )
friend class KDChartParams;
@@ -106,14 +107,14 @@ class KDCHART_EXPORT KDChartPropertySet :public QObject
This constructor may be used to initialize a property set
and let it have all property IDs set to a specific value,
e.g. you might pass KDCHART_PROPSET_NORMAL_DATA
- as ID to make the default property set the parent of all
+ as ID to make the default property set the tqparent of all
values.
\param name (may be empty) a name describing this property set.
- \param idParent the ID of the parent property set. Skip this paramter
- to define a property set without specifying a parent.
+ \param idParent the ID of the tqparent property set. Skip this paramter
+ to define a property set without specifying a tqparent.
*/
- KDChartPropertySet( const QString& name, int idParent=KDChartPropertySet::UndefinedID ) :
+ KDChartPropertySet( const TQString& name, int idParent=KDChartPropertySet::UndefinedID ) :
mOwnID( UndefinedID )
{ fullReset( name, idParent ); }
@@ -151,7 +152,7 @@ class KDCHART_EXPORT KDChartPropertySet :public QObject
\sa clone, fullReset
*/
- void quickReset( const QString& name, int idParent=KDChartPropertySet::UndefinedID );
+ void quickReset( const TQString& name, int idParent=KDChartPropertySet::UndefinedID );
/**
@@ -166,7 +167,7 @@ class KDCHART_EXPORT KDChartPropertySet :public QObject
\sa clone, quickReset
*/
- void fullReset( const QString& name, int idParent=KDChartPropertySet::UndefinedID );
+ void fullReset( const TQString& name, int idParent=KDChartPropertySet::UndefinedID );
/**
@@ -175,7 +176,7 @@ class KDCHART_EXPORT KDChartPropertySet :public QObject
\sa loadXML
*/
- QDomElement saveXML(QDomDocument& doc) const;
+ TQDomElement saveXML(TQDomDocument& doc) const;
/**
@@ -190,7 +191,7 @@ class KDCHART_EXPORT KDChartPropertySet :public QObject
\sa id, saveXLM
*/
- static bool loadXML( const QDomElement& element, KDChartPropertySet& set );
+ static bool loadXML( const TQDomElement& element, KDChartPropertySet& set );
public slots:
/**
@@ -201,7 +202,7 @@ public slots:
/**
Change the descriptive name of this property set.
*/
- void setName( const QString& name )
+ void setName( const TQString& name )
{
mName = name;
}
@@ -209,7 +210,7 @@ public slots:
/**
Returns the name of this property set.
*/
- QString name() const { return mName; }
+ TQString name() const { return mName; }
@@ -311,7 +312,7 @@ public slots:
\sa hasOwnBarColor
*/
- void setBarColor( int idBarColor, const QColor& barColor )
+ void setBarColor( int idBarColor, const TQColor& barColor )
{
mIdBarColor = idBarColor;
mBarColor = barColor;
@@ -348,7 +349,7 @@ public slots:
\sa setBarColor
*/
- bool hasOwnBarColor( int& idBarColor, QColor& barColor )
+ bool hasOwnBarColor( int& idBarColor, TQColor& barColor )
{
idBarColor = mIdBarColor;
if( OwnID == mIdBarColor ){
@@ -449,7 +450,7 @@ public slots:
\sa setLineWidth, setLineStyle, setShowMarker
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
*/
- void setLineColor( int idLineColor, const QColor& lineColor )
+ void setLineColor( int idLineColor, const TQColor& lineColor )
{
mIdLineColor = idLineColor;
mLineColor = lineColor;
@@ -487,7 +488,7 @@ public slots:
\sa setLineWidth, setLineColor, setLineStyle, setShowMarker
\sa hasOwnLineWidth, hasOwnLineStyle, hasOwnShowMarker
*/
- bool hasOwnLineColor( int& idLineColor, QColor& lineColor )
+ bool hasOwnLineColor( int& idLineColor, TQColor& lineColor )
{
idLineColor = mIdLineColor;
if( OwnID == mIdLineColor ){
@@ -520,7 +521,7 @@ public slots:
\sa setLineWidth, setLineColor, setShowMarker
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
*/
- void setLineStyle( int idLineStyle, const PenStyle& lineStyle )
+ void setLineStyle( int idLineStyle, const Qt::PenStyle& lineStyle )
{
mIdLineStyle = idLineStyle;
mLineStyle = lineStyle;
@@ -558,7 +559,7 @@ public slots:
\sa setLineWidth, setLineColor, setLineStyle, setShowMarker
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnShowMarker
*/
- bool hasOwnLineStyle( int& idLineStyle, PenStyle& lineStyle )
+ bool hasOwnLineStyle( int& idLineStyle, Qt::PenStyle& lineStyle )
{
idLineStyle = mIdLineStyle;
if( OwnID == mIdLineStyle ){
@@ -592,7 +593,7 @@ public slots:
\sa hasOwnAreaBrush
*/
- void setAreaBrush( int idAreaBrush, const QBrush& areaBrush )
+ void setAreaBrush( int idAreaBrush, const TQBrush& areaBrush )
{
mIdAreaBrush = idAreaBrush;
mAreaBrush = areaBrush;
@@ -629,7 +630,7 @@ public slots:
\sa setAreaBrush
*/
- bool hasOwnAreaBrush( int& idAreaBrush, QBrush& areaBrush )
+ bool hasOwnAreaBrush( int& idAreaBrush, TQBrush& areaBrush )
{
idAreaBrush = mIdAreaBrush;
if( OwnID == mIdAreaBrush ){
@@ -720,14 +721,14 @@ public slots:
}
/**
- Specify the ID of the property set specifying the alignment of the
+ Specify the ID of the property set specifying the tqalignment of the
Marker to be displayed for this data value
<b>or</b> specifying this flag directly.
\note This function should be used for Line Charts only, otherwise
the settings specified here will be ignored.
- \param idMarkerAlign ID of the property set specifying the alignment
+ \param idMarkerAlign ID of the property set specifying the tqalignment
of the Marker to be shown.
Use special value KDChartPropertySet::UndefinedID
to specify neither another property set's ID
@@ -736,7 +737,7 @@ public slots:
if you do NOT want to inherit another property set's
settings but want to specify the flag by using
the following parameter.
- \param markerAlign The alignment of the marker to be shown.
+ \param markerAlign The tqalignment of the marker to be shown.
This parameter is stored but ignored if the previous parameter
is not set to KDChartPropertySet::OwnID.
@@ -758,12 +759,12 @@ public slots:
}
return false;
}
- void setMarkerSize( int idMarkerSize, const QSize& markerSize )
+ void setMarkerSize( int idMarkerSize, const TQSize& markerSize )
{
mIdMarkerSize = idMarkerSize;
mMarkerSize = markerSize;
}
- bool hasOwnMarkerSize( int& idMarkerSize, QSize& markerSize )
+ bool hasOwnMarkerSize( int& idMarkerSize, TQSize& markerSize )
{
idMarkerSize = mIdMarkerSize;
if( OwnID == idMarkerSize ){
@@ -772,12 +773,12 @@ public slots:
}
return false;
}
- void setMarkerColor( int idMarkerColor, const QColor& markerColor )
+ void setMarkerColor( int idMarkerColor, const TQColor& markerColor )
{
mIdMarkerColor = idMarkerColor;
mMarkerColor = markerColor;
}
- bool hasOwnMarkerColor( int& idMarkerColor, QColor& markerColor )
+ bool hasOwnMarkerColor( int& idMarkerColor, TQColor& markerColor )
{
idMarkerColor = mIdMarkerColor;
if( OwnID == idMarkerColor ){
@@ -862,12 +863,12 @@ public slots:
}
return false;
}
- void setExtraLinesColor( int idExtraLinesColor, const QColor& extraLinesColor )
+ void setExtraLinesColor( int idExtraLinesColor, const TQColor& extraLinesColor )
{
mIdExtraLinesColor = idExtraLinesColor;
mExtraLinesColor = extraLinesColor;
}
- bool hasOwnExtraLinesColor( int& idExtraLinesColor, QColor& extraLinesColor )
+ bool hasOwnExtraLinesColor( int& idExtraLinesColor, TQColor& extraLinesColor )
{
idExtraLinesColor = mIdExtraLinesColor;
if( OwnID == idExtraLinesColor ){
@@ -876,12 +877,12 @@ public slots:
}
return false;
}
- void setExtraLinesStyle( int idExtraLinesStyle, const PenStyle extraLinesStyle )
+ void setExtraLinesStyle( int idExtraLinesStyle, const Qt::PenStyle extraLinesStyle )
{
mIdExtraLinesStyle = idExtraLinesStyle;
mExtraLinesStyle = extraLinesStyle;
}
- bool hasOwnExtraLinesStyle( int& idExtraLinesStyle, PenStyle& extraLinesStyle )
+ bool hasOwnExtraLinesStyle( int& idExtraLinesStyle, Qt::PenStyle& extraLinesStyle )
{
idExtraLinesStyle = mIdExtraLinesStyle;
if( OwnID == idExtraLinesStyle ){
@@ -905,12 +906,12 @@ public slots:
}
return false;
}
- void setExtraMarkersSize( int idExtraMarkersSize, const QSize& extraMarkersSize )
+ void setExtraMarkersSize( int idExtraMarkersSize, const TQSize& extraMarkersSize )
{
mIdExtraMarkersSize = idExtraMarkersSize;
mExtraMarkersSize = extraMarkersSize;
}
- bool hasOwnExtraMarkersSize( int& idExtraMarkersSize, QSize& extraMarkersSize )
+ bool hasOwnExtraMarkersSize( int& idExtraMarkersSize, TQSize& extraMarkersSize )
{
idExtraMarkersSize = mIdExtraMarkersSize;
if( OwnID == idExtraMarkersSize ){
@@ -919,12 +920,12 @@ public slots:
}
return false;
}
- void setExtraMarkersColor( int idExtraMarkersColor, const QColor& extraMarkersColor )
+ void setExtraMarkersColor( int idExtraMarkersColor, const TQColor& extraMarkersColor )
{
mIdExtraMarkersColor = idExtraMarkersColor;
mExtraMarkersColor = extraMarkersColor;
}
- bool hasOwnExtraMarkersColor( int& idExtraMarkersColor, QColor& extraMarkersColor )
+ bool hasOwnExtraMarkersColor( int& idExtraMarkersColor, TQColor& extraMarkersColor )
{
idExtraMarkersColor = mIdExtraMarkersColor;
if( OwnID == idExtraMarkersColor ){
@@ -954,31 +955,31 @@ protected:
int mOwnID;
private:
- KDChartPropertySet( const KDChartPropertySet& ) : QObject(0) {}
+ KDChartPropertySet( const KDChartPropertySet& ) : TQObject(0) {}
- QString mName;
+ TQString mName;
// IDs: values used if ID == OwnID:
int mIdLineWidth; int mLineWidth;
- int mIdLineColor; QColor mLineColor;
+ int mIdLineColor; TQColor mLineColor;
int mIdLineStyle; Qt::PenStyle mLineStyle;
int mIdShowMarker; bool mShowMarker;
- int mIdMarkerSize; QSize mMarkerSize;
- int mIdMarkerColor; QColor mMarkerColor;
+ int mIdMarkerSize; TQSize mMarkerSize;
+ int mIdMarkerColor; TQColor mMarkerColor;
int mIdMarkerStyle; int mMarkerStyle;
int mIdMarkerAlign; uint mMarkerAlign;
int mIdExtraLinesAlign; uint mExtraLinesAlign;
int mIdExtraLinesInFront; bool mExtraLinesInFront;
int mIdExtraLinesLength; int mExtraLinesLength;
int mIdExtraLinesWidth; int mExtraLinesWidth;
- int mIdExtraLinesColor; QColor mExtraLinesColor;
+ int mIdExtraLinesColor; TQColor mExtraLinesColor;
int mIdExtraLinesStyle; Qt::PenStyle mExtraLinesStyle;
int mIdExtraMarkersAlign; uint mExtraMarkersAlign;
- int mIdExtraMarkersSize; QSize mExtraMarkersSize;
- int mIdExtraMarkersColor; QColor mExtraMarkersColor;
+ int mIdExtraMarkersSize; TQSize mExtraMarkersSize;
+ int mIdExtraMarkersColor; TQColor mExtraMarkersColor;
int mIdExtraMarkersStyle; int mExtraMarkersStyle;
int mIdShowBar; bool mShowBar;
- int mIdBarColor; QColor mBarColor;
- int mIdAreaBrush; QBrush mAreaBrush;
+ int mIdBarColor; TQColor mBarColor;
+ int mIdAreaBrush; TQBrush mAreaBrush;
void fillValueMembersWithDummyValues();
};
diff --git a/libkdchart/KDChartRingPainter.cpp b/libkdchart/KDChartRingPainter.cpp
index 2087066..d9016ed 100644
--- a/libkdchart/KDChartRingPainter.cpp
+++ b/libkdchart/KDChartRingPainter.cpp
@@ -29,8 +29,8 @@
#include "KDChartRingPainter.h"
#include "KDChartParams.h"
-#include <qpainter.h>
-#include <qvaluestack.h>
+#include <tqpainter.h>
+#include <tqvaluestack.h>
#include <stdlib.h>
@@ -53,7 +53,7 @@
KDChartPainter( params )
{
// This constructor intentionally left blank so far; we cannot setup the
- // geometry yet since we do not know the size of the painter.
+ // tqgeometry yet since we do not know the size of the painter.
}
@@ -69,24 +69,24 @@ KDChartRingPainter::~KDChartRingPainter()
/**
Paints the actual data area.
- \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 KDChartRingPainter::paintData( QPainter* painter,
+void KDChartRingPainter::paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions )
{
uint chart = paint2nd ? 1 : 0;
- QRect ourClipRect( _dataRect );
+ TQRect ourClipRect( _dataRect );
- 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 );
@@ -135,7 +135,7 @@ void KDChartRingPainter::paintData( QPainter* painter,
_numValues = data->usedCols();
// compute position
- _size = QMIN( _dataRect.width(), _dataRect.height() ); // initial size
+ _size = TQMIN( _dataRect.width(), _dataRect.height() ); // initial size
// if the rings explode, we need to give them additional space =>
// make the basic size smaller
if ( params()->explode() ) {
@@ -146,12 +146,12 @@ void KDChartRingPainter::paintData( QPainter* painter,
int x = ( _dataRect.width() == _size ) ? 0 : ( ( _dataRect.width() - _size ) / 2 );
int y = ( _dataRect.height() == _size ) ? 0 : ( ( _dataRect.height() - _size ) / 2 );
- _position = QRect( x, y, _size, _size );
+ _position = TQRect( x, y, _size, _size );
_position.moveBy( _dataRect.left(), _dataRect.top() );
// We need the row sums anyway later, so we can just as well compute them
// here, because we need them in case of relative ring thicknesses.
- QMemArray<double> rowsums;
+ TQMemArray<double> rowsums;
double totalSum = 0.0;
rowsums.resize( datasetEnd+1 ); // not datasetNum!
for( int d1 = (int)datasetStart; d1 <= (int)datasetEnd; d1++ ) {
@@ -159,7 +159,7 @@ void KDChartRingPainter::paintData( QPainter* painter,
totalSum += rowsums[d1];
}
- QMemArray<int> ringthicknesses;
+ TQMemArray<int> ringthicknesses;
ringthicknesses.resize( datasetEnd+1 ); // not datasetNum!
// constant ring thickness
@@ -183,27 +183,27 @@ void KDChartRingPainter::paintData( QPainter* painter,
// Loop through all the displayable datasets; each dataset is one ring
for( int dataset = (int)datasetStart; dataset <= (int)datasetEnd; dataset++ ) {
- double sectorsPerValue = 5760.0 / rowsums[dataset]; // 5760 == 16*360, number of sections in Qt circle
+ double sectorsPerValue = 5760.0 / rowsums[dataset]; // 5760 == 16*360, number of sections in TQt circle
//int sectorsPerValueI = static_cast<int>( sectorsPerValue );
double currentstartpos = (double)params()->ringStart() * 16.0;
// Loop through all the values; each value is one piece on the ring.
- QVariant vValY;
+ TQVariant vValY;
for( int value = 0; value < _numValues; value++ ) {
// is there anything at all at this value?
double cellValue = 0.0;
if( data->cellCoord( dataset, value, vValY, 1 ) &&
- QVariant::Double == vValY.type() ){
+ TQVariant::Double == vValY.type() ){
cellValue = fabs( vValY.toDouble() );
// Explosion: Only explode if explosion is turned on generally
// and we are on the first ring. Besides, if there is a list
// of explodeable values, the current value must be on this
// list.
- QValueList<int> explodeList = params()->explodeValues();
+ TQValueList<int> explodeList = params()->explodeValues();
bool explode = params()->explode() && // explosion is on at all
( dataset == (int)datasetStart ) && // outermost ring
( ( explodeList.count() == 0 ) || // either nothing on explode list
- ( explodeList.find( value ) != explodeList.end() ) ); // or pie is on it
+ ( explodeList.tqfind( value ) != explodeList.end() ) ); // or pie is on it
drawOneSegment( painter,
currentouterradius,
@@ -220,7 +220,7 @@ void KDChartRingPainter::paintData( QPainter* painter,
-void KDChartRingPainter::drawOneSegment( QPainter* painter,
+void KDChartRingPainter::drawOneSegment( TQPainter* painter,
uint outerRadius,
uint innerRadius,
double startAngle,
@@ -235,14 +235,14 @@ void KDChartRingPainter::drawOneSegment( QPainter* painter,
if( angles == 5760.0 )
startAngle = 0.0;
- painter->setPen( QPen( params()->outlineDataColor(),
+ painter->setPen( TQPen( params()->outlineDataColor(),
params()->outlineDataLineWidth() ) );
painter->setBrush( params()->dataColor( value ) );
uint outerRadius2 = outerRadius * 2;
uint innerRadius2 = innerRadius * 2;
- QRect drawPosition = _position;
+ TQRect drawPosition = _position;
if ( explode ) {
// need to compute a new position for each pie
double explodeAngle = ( startAngle + angles / 2.0 ) / 16.0;
@@ -252,8 +252,8 @@ void KDChartRingPainter::drawOneSegment( QPainter* painter,
// find the explode factor for this particular ring segment
double explodeFactor = 0.0;
- QMap<int,double> explodeFactors = params()->explodeFactors();
- if( !explodeFactors.contains( value ) ) // not on factors list, use default
+ TQMap<int,double> explodeFactors = params()->explodeFactors();
+ if( !explodeFactors.tqcontains( value ) ) // not on factors list, use default
explodeFactor = params()->explodeFactor();
else // on factors list, use segment-specific value
explodeFactor = explodeFactors[value];
@@ -263,23 +263,23 @@ void KDChartRingPainter::drawOneSegment( QPainter* painter,
drawPosition.moveBy( static_cast<int>( explodeX ), static_cast<int>( explodeY ) );
}
- QRect outerRect( drawPosition.x() +
+ TQRect outerRect( drawPosition.x() +
( drawPosition.width() - outerRadius2 ) / 2,
drawPosition.y() +
( drawPosition.height() - outerRadius2 ) / 2,
outerRadius2, outerRadius2 );
- QRect innerRect( drawPosition.x() +
+ TQRect innerRect( drawPosition.x() +
( drawPosition.width() - innerRadius2 ) / 2,
drawPosition.y() +
( drawPosition.height() - innerRadius2 ) / 2,
innerRadius2, innerRadius2 );
// Start with getting the points for the inner arc.
- QPointArray innerArc;
+ TQPointArray innerArc;
makeArc( innerArc, innerRect, startAngle, angles );
// And the points for the outer arc
- QPointArray outerArc;
+ TQPointArray outerArc;
makeArc( outerArc, outerRect, startAngle, angles );
// Now copy the points from the outer arc in the reverse order onto the
@@ -318,17 +318,17 @@ void KDChartRingPainter::drawOneSegment( QPainter* painter,
= pointOnCircle( innerRect, aA );
datReg->points[ KDChartEnums::PosCenterLeft ]
- = QPoint( ( datReg->points[ KDChartEnums::PosTopLeft ].x()
+ = TQPoint( ( datReg->points[ KDChartEnums::PosTopLeft ].x()
+ datReg->points[ KDChartEnums::PosBottomLeft ].x() ) / 2,
( datReg->points[ KDChartEnums::PosTopLeft ].y()
+ datReg->points[ KDChartEnums::PosBottomLeft ].y() ) / 2 );
datReg->points[ KDChartEnums::PosCenter ]
- = QPoint( ( datReg->points[ KDChartEnums::PosTopCenter ].x()
+ = TQPoint( ( datReg->points[ KDChartEnums::PosTopCenter ].x()
+ datReg->points[ KDChartEnums::PosBottomCenter ].x() ) / 2,
( datReg->points[ KDChartEnums::PosTopCenter ].y()
+ datReg->points[ KDChartEnums::PosBottomCenter ].y() ) / 2 );
datReg->points[ KDChartEnums::PosCenterRight ]
- = QPoint( ( datReg->points[ KDChartEnums::PosTopRight ].x()
+ = TQPoint( ( datReg->points[ KDChartEnums::PosTopRight ].x()
+ datReg->points[ KDChartEnums::PosBottomRight ].x() ) / 2,
( datReg->points[ KDChartEnums::PosTopRight ].y()
+ datReg->points[ KDChartEnums::PosBottomRight ].y() ) / 2 );
@@ -379,9 +379,9 @@ void KDChartRingPainter::drawOneSegment( QPainter* painter,
\return the fallback text to use for describing the specified
dataset in the legend
*/
-QString KDChartRingPainter::fallbackLegendText( uint dataset ) const
+TQString KDChartRingPainter::fallbackLegendText( uint dataset ) const
{
- return QObject::tr( "Item " ) + QString::number( dataset + 1 );
+ return TQObject::tr( "Item " ) + TQString::number( dataset + 1 );
}
diff --git a/libkdchart/KDChartRingPainter.h b/libkdchart/KDChartRingPainter.h
index be70f0c..86a0db7 100644
--- a/libkdchart/KDChartRingPainter.h
+++ b/libkdchart/KDChartRingPainter.h
@@ -41,21 +41,21 @@ class KDChartRingPainter : public KDChartPainter
KDChartRingPainter( KDChartParams* params );
virtual ~KDChartRingPainter();
- virtual void paintData( QPainter* painter,
+ virtual void paintData( TQPainter* painter,
KDChartTableDataBase* data,
bool paint2nd,
KDChartDataRegionList* regions = 0 );
- void drawOneSegment( QPainter* painter,
+ void drawOneSegment( TQPainter* painter,
uint outerRadius, uint innerRadius,
double startAngle, double angles,
uint dataset, uint value, uint chart,
bool explode,
KDChartDataRegionList* regions = 0 );
- virtual QString fallbackLegendText( uint dataset ) const;
+ virtual TQString fallbackLegendText( uint dataset ) const;
virtual uint numLegendFallbackTexts( KDChartTableDataBase* data ) const;
- QRect _position;
+ TQRect _position;
int _size;
int _numValues; // PENDING(kalle) Move to base class
}
diff --git a/libkdchart/KDChartSeriesCollection.cpp b/libkdchart/KDChartSeriesCollection.cpp
index 185625e..84bd004 100644
--- a/libkdchart/KDChartSeriesCollection.cpp
+++ b/libkdchart/KDChartSeriesCollection.cpp
@@ -76,7 +76,7 @@ uint KDChartSeriesCollection::usedCols() const
}
// Don't really know how to handle these yet, I have no need yet.
-// It appears to be only used to load QTables.
+// It appears to be only used to load TQTables.
// ASSERT if used.
void KDChartSeriesCollection::setUsedRows( uint )
{
@@ -132,10 +132,10 @@ double KDChartSeriesCollection::maxValue( int coordinate ) const
bool first_max = true;
// find the first max
-#if COMPAT_QT_VERSION >= 0x030000
- QValueVector<KDChartBaseSeries *>::const_iterator i;
+#if COMPAT_TQT_VERSION >= 0x030000
+ TQValueVector<KDChartBaseSeries *>::const_iterator i;
#else
- QArray<KDChartBaseSeries *>::ConstIterator i;
+ TQArray<KDChartBaseSeries *>::ConstIterator i;
#endif
for ( i = (*this).begin(); i != (*this).end(); i ++ )
{
@@ -163,10 +163,10 @@ double KDChartSeriesCollection::minValue( int coordinate ) const
double result = 0; // if no valid min/max, then this is the default
// find the first min
-#if COMPAT_QT_VERSION >= 0x030000
- QValueVector<KDChartBaseSeries *>::const_iterator i;
+#if COMPAT_TQT_VERSION >= 0x030000
+ TQValueVector<KDChartBaseSeries *>::const_iterator i;
#else
- QArray<KDChartBaseSeries *>::ConstIterator i;
+ TQArray<KDChartBaseSeries *>::ConstIterator i;
#endif
for ( i = (*this).begin(); !ok && i != (*this).end(); i ++ )
result = (*i)->minValue(coordinate, ok);
@@ -176,7 +176,7 @@ double KDChartSeriesCollection::minValue( int coordinate ) const
{
double temp = (*i)->minValue(coordinate, ok);
if (ok)
- result = QMIN( result, temp );
+ result = TQMIN( result, temp );
}
return result;
@@ -186,10 +186,10 @@ double KDChartSeriesCollection::minValue( int coordinate ) const
unsigned int KDChartSeriesCollection::indexOf( KDChartBaseSeries *series )
{
unsigned int index = 0;
-#if COMPAT_QT_VERSION >= 0x030000
- QValueVector<KDChartBaseSeries *>::const_iterator i;
+#if COMPAT_TQT_VERSION >= 0x030000
+ TQValueVector<KDChartBaseSeries *>::const_iterator i;
#else
- QArray<KDChartBaseSeries *>::ConstIterator i;
+ TQArray<KDChartBaseSeries *>::ConstIterator i;
#endif
for ( i = (*this).begin(); i != (*this).end(); i ++, index ++ )
if ( *i == series )
@@ -202,7 +202,7 @@ unsigned int KDChartSeriesCollection::indexOf( KDChartBaseSeries *series )
}
-void KDChartSeriesCollection::setLegendText( KDChartBaseSeries *series, QString text )
+void KDChartSeriesCollection::setLegendText( KDChartBaseSeries *series, TQString text )
{
_params->setLegendText( indexOf( series ), text );
}
@@ -219,7 +219,7 @@ void KDChartSeriesCollection::setYaxis( KDChartBaseSeries *series,
-QString KDChartSeriesCollection::legendText( KDChartBaseSeries *series )
+TQString KDChartSeriesCollection::legendText( KDChartBaseSeries *series )
{
return _params->legendText( indexOf(series) );
}
diff --git a/libkdchart/KDChartSeriesCollection.h b/libkdchart/KDChartSeriesCollection.h
index ac0a1c9..8cb2b65 100644
--- a/libkdchart/KDChartSeriesCollection.h
+++ b/libkdchart/KDChartSeriesCollection.h
@@ -30,14 +30,14 @@
#define __KDCHARTSERIESCOLLECTION_H__
// to avoid problems in TableBase - it doesn't include this - bug!
-#include <qtable.h>
+#include <tqtable.h>
#include "KDChartTableBase.h"
#include "KDChartBaseSeries.h"
-#if COMPAT_QT_VERSION >= 0x030000
-#include <qvaluevector.h>
+#if COMPAT_TQT_VERSION >= 0x030000
+#include <tqvaluevector.h>
#else
-#include <qarray.h>
+#include <tqarray.h>
#endif
class KDChartParams;
#include "KDChartAxisParams.h"
@@ -45,10 +45,10 @@ class KDChartParams;
// takes ownership of any series passed to it, and will delete
// them when it is deleted.
class KDCHART_EXPORT KDChartSeriesCollection : public KDChartTableDataBase,
-#if COMPAT_QT_VERSION >= 0x030000
- public QValueVector<KDChartBaseSeries *>
+#if COMPAT_TQT_VERSION >= 0x030000
+ public TQValueVector<KDChartBaseSeries *>
#else
- public QArray<KDChartBaseSeries *>
+ public TQArray<KDChartBaseSeries *>
#endif
{
// Standard KDChartTableDataBase interface
@@ -75,8 +75,8 @@ class KDCHART_EXPORT KDChartSeriesCollection : public KDChartTableDataBase,
// extra functions for our use
- virtual void setLegendText( KDChartBaseSeries *series, QString text );
- virtual QString legendText( KDChartBaseSeries *series );
+ virtual void setLegendText( KDChartBaseSeries *series, TQString text );
+ virtual TQString legendText( KDChartBaseSeries *series );
virtual void setYaxis( KDChartBaseSeries *series,
KDChartAxisParams::AxisPos axis );// PENDING(blackie) possible enum problem
diff --git a/libkdchart/KDChartTable.h b/libkdchart/KDChartTable.h
index 297cb45..63d2277 100644
--- a/libkdchart/KDChartTable.h
+++ b/libkdchart/KDChartTable.h
@@ -33,11 +33,11 @@
#include <KDChartGlobal.h>
#include <KDChartListTable.h>
-#if COMPAT_QT_VERSION >= 0x030000
+#if COMPAT_TQT_VERSION >= 0x030000
#include <KDChartVectorTable.h>
#endif
-#if COMPAT_QT_VERSION >= 0x030000
+#if COMPAT_TQT_VERSION >= 0x030000
typedef KDChartVectorTableData KDChartTableData;
#else
typedef KDChartListTableData KDChartTableData;
diff --git a/libkdchart/KDChartTableBase.cpp b/libkdchart/KDChartTableBase.cpp
index d25e13f..1ebfa9f 100644
--- a/libkdchart/KDChartTableBase.cpp
+++ b/libkdchart/KDChartTableBase.cpp
@@ -28,7 +28,7 @@
**********************************************************************/
#include <math.h>
#include <limits.h>
-#include <qtable.h>
+#include <tqtable.h>
#include <KDChartTableBase.h>
@@ -40,7 +40,7 @@
\note To create your data table you would <em>not</em> use a
\c KDChartTableDataBase but instantiate the class \c KDChartTableData.
The \c KDChartTableData class is an auxiliary class: depending on your
- Qt version it will be mapped onto a \c KDChartVectorTableData or onto
+ TQt version it will be mapped onto a \c KDChartVectorTableData or onto
a \c KDChartListTableData both of which are derived from
\c KDChartTableDataBase and implement all of its functions.
Thus you would create a table of 3 datasets with 25 cells each like this:
@@ -56,7 +56,7 @@
You may adjust or modify your table like this:
\li Entering the data can be done either manually using \c setCell()
- or by passing a QTable to the \c importFromQTable() function.
+ or by passing a TQTable to the \c importFromQTable() function.
\li Performance of KD Chart can be increased by specifying the number
of rows and or the number of columns actually used: \c setUsedRows()
@@ -74,7 +74,7 @@
future absicssa axis value:
\verbatim
- const QDateTime currentTime( QDateTime::currentDateTime() );
+ const TQDateTime currentTime( TQDateTime::tqcurrentDateTime() );
for( int iCell = 0; iCell < usedValues; ++iCell ){
KDChartData& cell = myData.cell( 0, iCell );
// assign special property set ID if X value is in the future
@@ -107,7 +107,7 @@ uint KDChartTableDataBase::usedCols() const {
bool KDChartTableDataBase::cellsHaveSeveralCoordinates(
- QVariant::Type* type2Ref ) const
+ TQVariant::Type* type2Ref ) const
{
return cellsHaveSeveralCoordinates( 0, UINT_MAX, type2Ref );
}
@@ -116,7 +116,7 @@ bool KDChartTableDataBase::cellsHaveSeveralCoordinates(
bool KDChartTableDataBase::cellsHaveSeveralCoordinates(
uint row1,
uint row2,
- QVariant::Type* type2Ref ) const
+ TQVariant::Type* type2Ref ) const
{
// return true if all wanted datasets have at least two coordinates
// stored in all of their cells - BUT only if these coordinates are
@@ -126,17 +126,17 @@ bool KDChartTableDataBase::cellsHaveSeveralCoordinates(
bool severalCoordinates = row1 < usedRows();
if( severalCoordinates ) {
severalCoordinates = false;
- QVariant::Type testType = QVariant::Invalid;
+ TQVariant::Type testType = TQVariant::Invalid;
const uint r2 = (UINT_MAX == row2)
? usedRows()
- : QMIN( row2+1, usedRows() );
- QVariant value1;
- QVariant value2;
+ : TQMIN( row2+1, usedRows() );
+ TQVariant value1;
+ TQVariant value2;
for ( uint row = row1; row < r2; ++row ){
for ( uint col = 0; col < usedCols(); ++col ){
if( cellCoords( row, col, value1, value2 ) ){
- if( QVariant::Invalid != value2.type() ){
- if( (QVariant::Invalid != testType) &&
+ if( TQVariant::Invalid != value2.type() ){
+ if( (TQVariant::Invalid != testType) &&
(value2.type() != testType) ){
severalCoordinates = false;
break;
@@ -146,7 +146,7 @@ bool KDChartTableDataBase::cellsHaveSeveralCoordinates(
*type2Ref = testType;
severalCoordinates = true;
}
- }else if( QVariant::Invalid != value1.type() ){
+ }else if( TQVariant::Invalid != value1.type() ){
severalCoordinates = false;
break;
}
@@ -158,27 +158,27 @@ bool KDChartTableDataBase::cellsHaveSeveralCoordinates(
}
-QVariant::Type KDChartTableDataBase::cellsValueType(
+TQVariant::Type KDChartTableDataBase::cellsValueType(
uint row1,
uint row2,
int coordinate ) const
{
- QVariant::Type res = QVariant::Invalid;
+ TQVariant::Type res = TQVariant::Invalid;
const uint r2 = (UINT_MAX == row2)
? usedRows()
- : QMIN( row2+1, usedRows() );
+ : TQMIN( row2+1, usedRows() );
- QVariant value;
+ TQVariant value;
for ( uint row = row1; row < r2; ++row )
for ( uint col = 0; col < usedCols(); ++col )
if( cellCoord( row, col, value, coordinate ) )
- if( QVariant::Invalid != value.type() )
+ if( TQVariant::Invalid != value.type() )
res = value.type();
return res;
}
-QVariant::Type KDChartTableDataBase::cellsValueType(
+TQVariant::Type KDChartTableDataBase::cellsValueType(
int coordinate ) const
{
return cellsValueType( 0, UINT_MAX, coordinate );
@@ -189,19 +189,19 @@ double KDChartTableDataBase::maxValue( int coordinate ) const
{
double maxValue = 0.0;
bool bStart = true;
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint row = 0; row < usedRows(); row++ ) {
for ( uint col = 0; col < usedCols(); col++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) ){
if ( bStart ) {
maxValue = dVal;
bStart = false;
} else
- maxValue = QMAX( maxValue, dVal );
+ maxValue = TQMAX( maxValue, dVal );
}
}
}
@@ -215,19 +215,19 @@ double KDChartTableDataBase::minValue( int coordinate, bool bOnlyGTZero ) const
{
double minValue = 0.0;
bool bStart = true;
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint row = 0; row < usedRows(); row++ ) {
for ( uint col = 0; col < usedCols(); col++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( !bOnlyGTZero || 0.0 < dVal ){
if ( bStart ) {
minValue = dVal;
bStart = false;
}else{
- minValue = QMIN( minValue, dVal );
+ minValue = TQMIN( minValue, dVal );
}
}
}
@@ -237,22 +237,22 @@ double KDChartTableDataBase::minValue( int coordinate, bool bOnlyGTZero ) const
}
-QDateTime KDChartTableDataBase::maxDtValue( int coordinate ) const
+TQDateTime KDChartTableDataBase::maxDtValue( int coordinate ) const
{
- QDateTime maxValue = QDateTime( QDate(1970,1,1) );
+ TQDateTime maxValue = TQDateTime( TQDate(1970,1,1) );
bool bStart = true;
- QVariant value;
- QDateTime dtVal;
+ TQVariant value;
+ TQDateTime dtVal;
for ( uint row = 0; row < usedRows(); row++ ) {
for ( uint col = 0; col < usedCols(); col++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::DateTime == value.type() ) {
+ TQVariant::DateTime == value.type() ) {
dtVal = value.toDateTime();
if ( bStart ) {
maxValue = dtVal;
bStart = false;
} else
- maxValue = QMAX(maxValue, dtVal);
+ maxValue = TQMAX(maxValue, dtVal);
}
}
}
@@ -261,22 +261,22 @@ QDateTime KDChartTableDataBase::maxDtValue( int coordinate ) const
-QDateTime KDChartTableDataBase::minDtValue( int coordinate ) const
+TQDateTime KDChartTableDataBase::minDtValue( int coordinate ) const
{
- QDateTime minValue = QDateTime( QDate(1970,1,1) );
+ TQDateTime minValue = TQDateTime( TQDate(1970,1,1) );
bool bStart = true;
- QVariant value;
- QDateTime dtVal;
+ TQVariant value;
+ TQDateTime dtVal;
for ( uint row = 0; row < usedRows(); row++ ) {
for ( uint col = 0; col < usedCols(); col++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::DateTime == value.type() ) {
+ TQVariant::DateTime == value.type() ) {
dtVal = value.toDateTime();
if ( bStart ) {
minValue = dtVal;
bStart = false;
} else
- minValue = QMIN(minValue, dtVal);
+ minValue = TQMIN(minValue, dtVal);
}
}
}
@@ -294,7 +294,7 @@ double KDChartTableDataBase::maxColSum( int coordinate ) const
maxValue = colValue;
bStart = false;
} else
- maxValue = QMAX( maxValue, colValue );
+ maxValue = TQMAX( maxValue, colValue );
}
return maxValue;
}
@@ -310,7 +310,7 @@ double KDChartTableDataBase::minColSum( int coordinate ) const
minValue = colValue;
bStart = false;
} else
- minValue = QMIN( minValue, colValue );
+ minValue = TQMIN( minValue, colValue );
}
return minValue;
@@ -330,11 +330,11 @@ double KDChartTableDataBase::maxColSum( uint row, uint row2, int coordinate ) co
z = usedRows() - 1;
for ( uint col = 0; col < usedCols(); col++ ) {
double valueValue = 0.0;
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint row = a; row <= z; row++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) )
valueValue += dVal;
@@ -344,7 +344,7 @@ double KDChartTableDataBase::maxColSum( uint row, uint row2, int coordinate ) co
maxValue = valueValue;
bStart = false;
} else
- maxValue = QMAX( maxValue, valueValue );
+ maxValue = TQMAX( maxValue, valueValue );
}
}
return maxValue;
@@ -364,11 +364,11 @@ double KDChartTableDataBase::minColSum( uint row, uint row2, int coordinate ) co
z = usedRows() - 1;
for ( uint col = 0; col < usedCols(); col++ ) {
double valueValue = 0.0;
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint row = a; row <= z; row++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) )
valueValue += dVal;
@@ -378,7 +378,7 @@ double KDChartTableDataBase::minColSum( uint row, uint row2, int coordinate ) co
minValue = valueValue;
bStart = false;
} else
- minValue = QMIN( minValue, valueValue );
+ minValue = TQMIN( minValue, valueValue );
}
}
return minValue;
@@ -388,11 +388,11 @@ double KDChartTableDataBase::minColSum( uint row, uint row2, int coordinate ) co
double KDChartTableDataBase::colSum( uint col, int coordinate ) const
{
double sum = 0.0;
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint row = 0; row < usedRows(); row++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) )
sum += dVal;
@@ -406,11 +406,11 @@ double KDChartTableDataBase::colSum( uint col, int coordinate ) const
double KDChartTableDataBase::colAbsSum( uint col, int coordinate ) const
{
double sum = 0.0;
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint row = 0; row < usedRows(); row++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) )
sum += fabs( dVal );
@@ -431,7 +431,7 @@ double KDChartTableDataBase::maxRowSum( int coordinate ) const
maxValue = rowValue;
bStart = false;
} else
- maxValue = QMAX( maxValue, rowValue );
+ maxValue = TQMAX( maxValue, rowValue );
}
return maxValue;
}
@@ -447,7 +447,7 @@ double KDChartTableDataBase::minRowSum( int coordinate ) const
minValue = rowValue;
bStart = false;
} else
- minValue = QMIN( minValue, rowValue );
+ minValue = TQMIN( minValue, rowValue );
}
return minValue;
@@ -457,11 +457,11 @@ double KDChartTableDataBase::minRowSum( int coordinate ) const
double KDChartTableDataBase::rowSum( uint row, int coordinate ) const
{
double sum = 0.0;
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint col = 0; col < usedCols(); col++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) )
sum += dVal;
@@ -474,11 +474,11 @@ double KDChartTableDataBase::rowSum( uint row, int coordinate ) const
double KDChartTableDataBase::rowAbsSum( uint row, int coordinate ) const
{
double sum = 0.0;
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint col = 0; col < usedCols(); col++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) )
sum += fabs( dVal );
@@ -492,18 +492,18 @@ double KDChartTableDataBase::maxInColumn( uint col, int coordinate ) const
{
double maxValue = 0.0;
bool bStart = true;
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint row = 0; row < usedRows(); row++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) ){
if ( bStart ) {
maxValue = dVal;
bStart = false;
} else
- maxValue = QMAX( maxValue, dVal );
+ maxValue = TQMAX( maxValue, dVal );
}
}
}
@@ -516,18 +516,18 @@ double KDChartTableDataBase::minInColumn( uint col, int coordinate ) const
{
double minValue = 0.0;
bool bStart = true;
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint row = 0; row < usedRows(); row++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) ){
if ( bStart ) {
minValue = dVal;
bStart = false;
} else
- minValue = QMIN( minValue, dVal );
+ minValue = TQMIN( minValue, dVal );
}
}
}
@@ -540,19 +540,19 @@ double KDChartTableDataBase::maxInRow( uint row, int coordinate ) const
{
double maxValue = DBL_MIN;
bool bStart = true;
- QVariant value;
+ TQVariant value;
double dVal;
if ( UINT_MAX > row ) {
for ( uint col = 0; col < usedCols(); col++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) ){
if ( bStart ) {
maxValue = dVal;
bStart = false;
} else
- maxValue = QMAX( maxValue, dVal );
+ maxValue = TQMAX( maxValue, dVal );
}
}
}
@@ -565,19 +565,19 @@ double KDChartTableDataBase::minInRow( uint row, int coordinate ) const
{
double minValue = DBL_MAX;
bool bStart = true;
- QVariant value;
+ TQVariant value;
double dVal;
if ( UINT_MAX > row ) {
for ( uint col = 0; col < usedCols(); col++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) ){
if ( bStart ) {
minValue = dVal;
bStart = false;
} else
- minValue = QMIN( minValue, dVal );
+ minValue = TQMIN( minValue, dVal );
}
}
}
@@ -600,18 +600,18 @@ double KDChartTableDataBase::maxInRows( uint row, uint row2, int coordinate ) co
z = usedRows() - 1;
// qDebug("KDChartTableDataBase::maxInRows() (2) a: %u z: %u", a, z);
for ( uint row = a; row <= z; ++row ) {
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint col = 0; col < usedCols(); ++col ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) ){
if ( bStart ) {
maxValue = dVal;
bStart = false;
} else
- maxValue = QMAX( maxValue, dVal );
+ maxValue = TQMAX( maxValue, dVal );
}
}
}
@@ -635,11 +635,11 @@ double KDChartTableDataBase::minInRows( uint row, uint row2, int coordinate, boo
z = usedRows() - 1;
//qDebug("KDChartTableDataBase::minInRows() (2) a: %u z: %u", a, z);
for ( uint row = a; row <= z; ++row ) {
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint col = 0; col < usedCols(); ++col ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) ){
if( !bOnlyGTZero || 0.0 < dVal ){
@@ -647,7 +647,7 @@ double KDChartTableDataBase::minInRows( uint row, uint row2, int coordinate, boo
minValue = dVal;
bStart = false;
}else{
- minValue = QMIN( minValue, dVal );
+ minValue = TQMIN( minValue, dVal );
}
}
}
@@ -659,10 +659,10 @@ double KDChartTableDataBase::minInRows( uint row, uint row2, int coordinate, boo
}
-QDateTime KDChartTableDataBase::maxDtInRows( uint row, uint row2,
+TQDateTime KDChartTableDataBase::maxDtInRows( uint row, uint row2,
int coordinate ) const
{
- QDateTime maxValue = QDateTime( QDate(1970,1,1) );
+ TQDateTime maxValue = TQDateTime( TQDate(1970,1,1) );
bool bStart = true;
if ( 0 < usedRows() ) {
uint a = row;
@@ -672,17 +672,17 @@ QDateTime KDChartTableDataBase::maxDtInRows( uint row, uint row2,
if ( usedRows() <= z )
z = usedRows() - 1;
for ( uint row = a; row <= z; ++row ) {
- QVariant value;
- QDateTime dtVal;
+ TQVariant value;
+ TQDateTime dtVal;
for ( uint col = 0; col < usedCols(); ++col ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::DateTime == value.type() ) {
+ TQVariant::DateTime == value.type() ) {
dtVal = value.toDateTime();
if ( bStart ) {
maxValue = dtVal;
bStart = false;
} else
- maxValue = QMAX( maxValue, dtVal );
+ maxValue = TQMAX( maxValue, dtVal );
}
}
}
@@ -691,10 +691,10 @@ QDateTime KDChartTableDataBase::maxDtInRows( uint row, uint row2,
}
-QDateTime KDChartTableDataBase::minDtInRows( uint row, uint row2,
+TQDateTime KDChartTableDataBase::minDtInRows( uint row, uint row2,
int coordinate ) const
{
- QDateTime minValue = QDateTime( QDate(1970,1,1) );
+ TQDateTime minValue = TQDateTime( TQDate(1970,1,1) );
bool bStart = true;
if ( 0 < usedRows() ) {
uint a = row;
@@ -704,17 +704,17 @@ QDateTime KDChartTableDataBase::minDtInRows( uint row, uint row2,
if ( usedRows() <= z )
z = usedRows() - 1;
for ( uint row = a; row <= z; ++row ) {
- QVariant value;
- QDateTime dtVal;
+ TQVariant value;
+ TQDateTime dtVal;
for ( uint col = 0; col < usedCols(); ++col ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::DateTime == value.type() ) {
+ TQVariant::DateTime == value.type() ) {
dtVal = value.toDateTime();
if ( bStart ) {
minValue = dtVal;
bStart = false;
} else
- minValue = QMIN( minValue, dtVal );
+ minValue = TQMIN( minValue, dtVal );
}
}
}
@@ -726,11 +726,11 @@ QDateTime KDChartTableDataBase::minDtInRows( uint row, uint row2,
uint KDChartTableDataBase::lastPositiveCellInColumn( uint col, int coordinate ) const
{
uint ret = UINT_MAX;
- QVariant value;
+ TQVariant value;
double dVal;
for ( uint row = 0; row < usedRows(); row++ ) {
if( cellCoord( row, col, value, coordinate ) &&
- QVariant::Double == value.type() ) {
+ TQVariant::Double == value.type() ) {
dVal = value.toDouble();
if( isNormalDouble( dVal ) && 0 < dVal )
ret = row;
@@ -740,7 +740,7 @@ uint KDChartTableDataBase::lastPositiveCellInColumn( uint col, int coordinate )
}
-void KDChartTableDataBase::importFromQTable( QTable* table )
+void KDChartTableDataBase::importFromQTable( TQTable* table )
{
if( table->numRows() > (int)rows() ||
table->numCols() > (int)cols() )
@@ -749,7 +749,7 @@ void KDChartTableDataBase::importFromQTable( QTable* table )
setUsedCols( table->numCols() );
for( int row = 0; row < table->numRows(); row++ )
for( int col = 0; col < table->numCols(); col++ ) {
- QString cellContents = table->text( row, col );
+ TQString cellContents = table->text( row, col );
if( !cellContents.isEmpty() ) {
// First try to parse a double
bool ok = false;
diff --git a/libkdchart/KDChartTableBase.h b/libkdchart/KDChartTableBase.h
index 5031449..b79e6e7 100644
--- a/libkdchart/KDChartTableBase.h
+++ b/libkdchart/KDChartTableBase.h
@@ -30,11 +30,11 @@
#define __KDCHARTTABLEINTERFACE_H__
-class QTable;
+class TQTable;
-#include <qvariant.h>
-#include <qobject.h>
-#include <qdatetime.h>
+#include <tqvariant.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
#include <kdchart_export.h>
@@ -84,9 +84,10 @@ class QTable;
*/
///KD Chart's build-in table data for an easy way of storing data values.
-class KDCHART_EXPORT KDChartTableDataBase :public QObject
+class KDCHART_EXPORT KDChartTableDataBase :public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
Default constructor.
@@ -94,16 +95,16 @@ public:
Creates an empty table and sets the sorted flag to false.
*/
KDChartTableDataBase() :
- QObject( 0 ),
+ TQObject( 0 ),
_sorted(false),
_useUsedRows(false),
_useUsedCols(false) {}
/**
Default copy constructor.
- Just initializes the QObject part of this class and copies the sorted flag.
+ Just initializes the TQObject part of this class and copies the sorted flag.
*/
- KDChartTableDataBase( const KDChartTableDataBase& other ) :QObject(0)
+ KDChartTableDataBase( const KDChartTableDataBase& other ) :TQObject(0)
{
_sorted = other._sorted;
_useUsedRows = other._useUsedRows;
@@ -150,15 +151,15 @@ public slots:
\param _row the row number of the cell to store the data object into.
\param _col the column number of the cell to store the data object into.
- \param _value1 the first value to be stored, normally the Y value, possible types: int, double, QString
- QString might be used in case you want to use this cell's content for axis label
- \param _value2 the second value to be stored, normally the X value (if any), possible types: int, double, QDateTime
+ \param _value1 the first value to be stored, normally the Y value, possible types: int, double, TQString
+ TQString might be used in case you want to use this cell's content for axis label
+ \param _value2 the second value to be stored, normally the X value (if any), possible types: int, double, TQDateTime
\sa cellCoords, cellContent, setProp
*/
virtual void setCell( uint _row, uint _col,
- const QVariant& _value1,
- const QVariant& _value2=QVariant() ) = 0;
+ const TQVariant& _value1,
+ const TQVariant& _value2=TQVariant() ) = 0;
/**
Specifies the property set ID for a cell.
@@ -191,14 +192,14 @@ public slots:
\sa cellCoords, cellProp, cellContent, cellVal, setCell, setProp
*/
virtual bool cellCoord( uint _row, uint _col,
- QVariant& _value,
+ TQVariant& _value,
int coordinate=1 ) const = 0;
/**
Returns one of the coordinate data value(s) stored in a cell.
This convenience method calls the bool cellCoord() function and returns
- the result if it returned successfully - otherwise it returns an invalid QVariant.
+ the result if it returned successfully - otherwise it returns an invalid TQVariant.
\note If you \em know that a cell is containing valid double data
you may quickly access them like this:
@@ -211,16 +212,16 @@ const double xVal = data.cellVal( r, c, 2 ).toDouble(); \endverbatim
1 is the Y value and 2 is the X value.
\returns cell contens if the row and col are addressing a cell in the
- table, otherwise an invalid QVariant is returned.
+ table, otherwise an invalid TQVariant is returned.
\sa cellCoords, cellProp, cellContent, setCell, setProp
*/
- virtual QVariant cellVal( uint _row, uint _col, int coordinate=1 ) const {
- QVariant value;
+ virtual TQVariant cellVal( uint _row, uint _col, int coordinate=1 ) const {
+ TQVariant value;
if( cellCoord( _row, _col, value, coordinate ) )
return value;
else
- return QVariant();
+ return TQVariant();
}
/**
@@ -267,8 +268,8 @@ const double xVal = data.cellVal( r, c, 2 ).toDouble(); \endverbatim
\sa cellCoords, cellProp, setCell, setProp
*/
virtual bool cellContent( uint _row, uint _col,
- QVariant& _value1,
- QVariant& _value2,
+ TQVariant& _value1,
+ TQVariant& _value2,
int& _prop ) const
{
return cellCoords(_row,_col, _value1,_value2) &&
@@ -281,8 +282,8 @@ const double xVal = data.cellVal( r, c, 2 ).toDouble(); \endverbatim
\sa cellCoord, cellProp, cellContent, setCell, setProp
*/
virtual bool cellCoords( uint _row, uint _col,
- QVariant& _value1,
- QVariant& _value2 ) const
+ TQVariant& _value1,
+ TQVariant& _value2 ) const
{
return cellCoord(_row,_col, _value1, 1) &&
cellCoord(_row,_col, _value2, 2);
@@ -413,34 +414,34 @@ const double xVal = data.cellVal( r, c, 2 ).toDouble(); \endverbatim
}
/**
- Returns true if the given QVariant value represents a normal double value.
+ Returns true if the given TQVariant value represents a normal double value.
- This method tests if \c value has type QVariant::Double: if no, it returns false;
+ This method tests if \c value has type TQVariant::Double: if no, it returns false;
if yes, it sets \c dVal accordingly and calls the virtual method
isNormalDouble( double value ).
- \param value The QVariant value to be tested and converted.
+ \param value The TQVariant value to be tested and converted.
\param dVal Points to the double variable to be filled with the converted value.
\returns TRUE if the value given is neither positive infinite nor negative
infinite, \c value is set to the converted value if the type of \c value
- is QVariant::Double, otherwise it is not modified.
+ is TQVariant::Double, otherwise it is not modified.
*/
- bool isNormalDouble( QVariant value, double& dVal ) const
+ bool isNormalDouble( TQVariant value, double& dVal ) const
{
- if( QVariant::Double != value.type() )
+ if( TQVariant::Double != value.type() )
return false;
dVal = value.toDouble();
return isNormalDouble( dVal );
}
- virtual void importFromQTable( QTable* table );
+ virtual void importFromQTable( TQTable* table );
virtual double maxValue( int coordinate=1 ) const;
virtual double minValue( int coordinate=1, bool bOnlyGTZero=false ) const;
- virtual QDateTime maxDtValue( int coordinate=1 ) const;
- virtual QDateTime minDtValue( int coordinate=1 ) const;
+ virtual TQDateTime maxDtValue( int coordinate=1 ) const;
+ virtual TQDateTime minDtValue( int coordinate=1 ) const;
virtual double maxColSum( int coordinate=1 ) const;
virtual double minColSum( int coordinate=1 ) const;
@@ -458,15 +459,15 @@ const double xVal = data.cellVal( r, c, 2 ).toDouble(); \endverbatim
virtual double minInRow( uint row, int coordinate=1 ) const;
virtual double maxInRows( uint row, uint row2, int coordinate=1 ) const;
virtual double minInRows( uint row, uint row2, int coordinate=1, bool bOnlyGTZero=false ) const;
- virtual QDateTime maxDtInRows( uint row, uint row2, int coordinate=1 ) const;
- virtual QDateTime minDtInRows( uint row, uint row2, int coordinate=1 ) const;
+ virtual TQDateTime maxDtInRows( uint row, uint row2, int coordinate=1 ) const;
+ virtual TQDateTime minDtInRows( uint row, uint row2, int coordinate=1 ) const;
virtual uint lastPositiveCellInColumn( uint col, int coordinate=1 ) const;
- virtual bool cellsHaveSeveralCoordinates(QVariant::Type* type2Ref) const;
+ virtual bool cellsHaveSeveralCoordinates(TQVariant::Type* type2Ref) const;
virtual bool cellsHaveSeveralCoordinates(uint row1=0, uint row2=UINT_MAX,
- QVariant::Type* type2Ref=NULL) const;
- virtual QVariant::Type cellsValueType( uint row1, uint row2=UINT_MAX,
+ TQVariant::Type* type2Ref=NULL) const;
+ virtual TQVariant::Type cellsValueType( uint row1, uint row2=UINT_MAX,
int coordinate=1 ) const;
- virtual QVariant::Type cellsValueType( int coordinate=1 ) const;
+ virtual TQVariant::Type cellsValueType( int coordinate=1 ) const;
private:
bool _sorted;
protected:
diff --git a/libkdchart/KDChartTableDataWrapper.cpp b/libkdchart/KDChartTableDataWrapper.cpp
index 6cae581..1baf487 100644
--- a/libkdchart/KDChartTableDataWrapper.cpp
+++ b/libkdchart/KDChartTableDataWrapper.cpp
@@ -1,6 +1,6 @@
#include "KDChartTableDataWrapper.h"
-KDChartTableDataWrapper::KDChartTableDataWrapper( KDChartTableData* data ) :QObject(0), _data(data)
+KDChartTableDataWrapper::KDChartTableDataWrapper( KDChartTableData* data ) :TQObject(0), _data(data)
{
}
/*
@@ -18,7 +18,7 @@ void KDChartTableDataWrapper::setCell( uint _row, uint _col, double _element )
}
-void KDChartTableDataWrapper::setCell( uint _row, uint _col, QString _element )
+void KDChartTableDataWrapper::setCell( uint _row, uint _col, TQString _element )
{
// Without this, the user has to wrap the element in a KDChartData
// In C++ this is handled bu default constructors.
@@ -27,7 +27,7 @@ void KDChartTableDataWrapper::setCell( uint _row, uint _col, QString _element )
void KDChartTableDataWrapper::setCell( uint _row, uint _col, const KDChartData& _element )
{
- // When overriding setCell above, I also had to override this one. I believe that must be due to a bug in QSA
+ // When overriding setCell above, I also had to override this one. I believe that must be due to a bug in TQSA
_data->setCell( _row, _col, _element );
}
diff --git a/libkdchart/KDChartTableDataWrapper.h b/libkdchart/KDChartTableDataWrapper.h
index 90b557d..3c3a8db 100644
--- a/libkdchart/KDChartTableDataWrapper.h
+++ b/libkdchart/KDChartTableDataWrapper.h
@@ -1,24 +1,25 @@
#ifndef KDCHARTTABLEDATAWRAPPER_H
#define KDCHARTTABLEDATAWRAPPER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <KDChartTable.h>
class KDChartData;
-class KDChartTableDataWrapper :public QObject
+class KDChartTableDataWrapper :public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KDChartTableDataWrapper( KDChartTableData* );
public slots:
/*
- QVariant cell( uint _row, uint _col );
+ TQVariant cell( uint _row, uint _col );
void setCell( uint _row, uint _col,
- const QVariant& _value1,
- const QVariant& _value2=QVariant() );
+ const TQVariant& _value1,
+ const TQVariant& _value2=TQVariant() );
void setCell( uint _row, uint _col, double _element );
- // PENDING(blackie) This one do not work, due to QSA bug regarding function overloading.
- void setCell( uint _row, uint _col, QString _element );
+ // PENDING(blackie) This one do not work, due to TQSA bug regarding function overloading.
+ void setCell( uint _row, uint _col, TQString _element );
*/
private:
KDChartTableData* _data;
diff --git a/libkdchart/KDChartTextPiece.cpp b/libkdchart/KDChartTextPiece.cpp
index 2b451c2..b95165f 100644
--- a/libkdchart/KDChartTextPiece.cpp
+++ b/libkdchart/KDChartTextPiece.cpp
@@ -28,33 +28,33 @@
**********************************************************************/
#include "KDChartTextPiece.h"
-#include <qstylesheet.h>
-#include <qsimplerichtext.h>
-#include <qfontmetrics.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qrect.h>
+#include <tqstylesheet.h>
+#include <tqsimplerichtext.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqrect.h>
KDChartTextPiece::KDChartTextPiece()
- :QObject(0)
+ :TQObject(0)
{
_isRichText = false;
_richText = 0;
- _font = QApplication::font();
+ _font = TQApplication::font();
// These three are needed for both
- _metrics = new QFontMetrics( _font );
+ _metrics = new TQFontMetrics( _font );
_dirtyMetrics = true;
- _text = QString("");
+ _text = TQString("");
}
-KDChartTextPiece::KDChartTextPiece( const QString& text, const QFont& font )
- :QObject(0)
+KDChartTextPiece::KDChartTextPiece( const TQString& text, const TQFont& font )
+ :TQObject(0)
{
- if( QStyleSheet::mightBeRichText( text ) ) {
+ if( TQStyleSheet::mightBeRichText( text ) ) {
_isRichText = true;
- _richText = new QSimpleRichText( text, font );
+ _richText = new TQSimpleRichText( text, font );
_richText->adjustSize();
} else {
_isRichText = false;
@@ -62,25 +62,25 @@ KDChartTextPiece::KDChartTextPiece( const QString& text, const QFont& font )
}
// These three are needed for both
- _metrics = new QFontMetrics( font );
+ _metrics = new TQFontMetrics( font );
_dirtyMetrics = true;
_text = text;
_font = font;
}
-KDChartTextPiece::KDChartTextPiece( QPainter *p, const QString& text, const QFont& font )
- :QObject(0)
+KDChartTextPiece::KDChartTextPiece( TQPainter *p, const TQString& text, const TQFont& font )
+ :TQObject(0)
{
- if( QStyleSheet::mightBeRichText( text ) ) {
+ if( TQStyleSheet::mightBeRichText( text ) ) {
_isRichText = true;
- _richText = new QSimpleRichText( text, font );
- //qDebug( "richtext width %s", QString::number(_richText->width()).latin1());
- //qDebug( "richtext height %s", QString::number(_richText->height()).latin1());
+ _richText = new TQSimpleRichText( text, font );
+ //qDebug( "richtext width %s", TQString::number(_richText->width()).latin1());
+ //qDebug( "richtext height %s", TQString::number(_richText->height()).latin1());
_richText->adjustSize();
- //qDebug( "richtext width %s", QString::number(_richText->width()).latin1());
- //qDebug( "richtext height %s", QString::number(_richText->height()).latin1());
+ //qDebug( "richtext width %s", TQString::number(_richText->width()).latin1());
+ //qDebug( "richtext height %s", TQString::number(_richText->height()).latin1());
} else {
_isRichText = false;
@@ -90,13 +90,13 @@ KDChartTextPiece::KDChartTextPiece( QPainter *p, const QString& text, const QFon
// These three are needed for both
_dirtyMetrics = (p == 0);
if( _dirtyMetrics ) {
- _metrics = new QFontMetrics( font );
+ _metrics = new TQFontMetrics( font );
//qDebug("dirty metrics text: %s", text.latin1());
}
else{
p->save();
p->setFont( font );
- _metrics = new QFontMetrics( p->fontMetrics() );
+ _metrics = new TQFontMetrics( p->fontMetrics() );
//qDebug ( "drawing metrics text: %s", text.latin1() );
//p->drawRect( _metrics->boundingRect( text) );
//p->drawText( _metrics->boundingRect(text).bottomRight(), text);
@@ -115,7 +115,7 @@ void KDChartTextPiece::deepCopy( const KDChartTextPiece* source )
delete _richText;
_isRichText = source->_isRichText;
if( source->_richText ) {
- _richText = new QSimpleRichText( source->_text, source->_font );
+ _richText = new TQSimpleRichText( source->_text, source->_font );
_richText->adjustSize();
}
else
@@ -124,7 +124,7 @@ void KDChartTextPiece::deepCopy( const KDChartTextPiece* source )
// used for both
if( _metrics )
delete _metrics;
- _metrics = new QFontMetrics( *source->_metrics );
+ _metrics = new TQFontMetrics( *source->_metrics );
_dirtyMetrics = source->_dirtyMetrics;
_text = source->_text;
_font = source->_font;
@@ -160,12 +160,12 @@ int KDChartTextPiece::height() const
{
if( _isRichText ) {
- //qDebug ("_richText height %s", QString::number(_richText->height()).latin1());
+ //qDebug ("_richText height %s", TQString::number(_richText->height()).latin1());
return _richText->height();
}
else {
- //qDebug ("_metrics height %s", QString::number(_metrics->height()).latin1());
+ //qDebug ("_metrics height %s", TQString::number(_metrics->height()).latin1());
return _metrics->height();
}
}
@@ -176,16 +176,16 @@ int KDChartTextPiece::fontLeading() const
return _metrics->leading();
}
-QRect KDChartTextPiece::rect( QPainter *p, const QRect& clipRect) const
+TQRect KDChartTextPiece::rect( TQPainter *p, const TQRect& clipRect) const
{
- QRect rect( clipRect );
- QFont font( _font );
+ TQRect rect( clipRect );
+ TQFont font( _font );
if( _isRichText ) {
// Pending Michel make sure the fonts are not too large
if ( _richText->height() > clipRect.height() || _richText->width() > clipRect.width() )
- font.setPixelSize( QMIN( (int)clipRect.width(),(int)clipRect.height() ) );
+ font.setPixelSize( TQMIN( (int)clipRect.width(),(int)clipRect.height() ) );
_richText->setDefaultFont( font );
_richText->setWidth( p, clipRect.width() );
@@ -197,18 +197,18 @@ QRect KDChartTextPiece::rect( QPainter *p, const QRect& clipRect) const
return rect;
}
-void KDChartTextPiece::draw( QPainter *p, int x, int y,
- const QRect& clipRect,
- const QColor& color,
- const QBrush* paper ) const
+void KDChartTextPiece::draw( TQPainter *p, int x, int y,
+ const TQRect& clipRect,
+ const TQColor& color,
+ const TQBrush* paper ) const
{
if( _isRichText ) {
- QColorGroup cg;
+ TQColorGroup cg;
//calculate the text area before drawing
- QRect txtArea = rect( p,clipRect);
- cg.setColor( QColorGroup::Text, color );
+ TQRect txtArea = rect( p,clipRect);
+ cg.setColor( TQColorGroup::Text, color );
_richText->draw( p, txtArea.x(), txtArea.y(),txtArea , cg, paper );
} else {
p->save();
@@ -223,7 +223,7 @@ void KDChartTextPiece::draw( QPainter *p, int x, int y,
delete _metrics;
KDChartTextPiece* meNotConst = const_cast<KDChartTextPiece*>(this);
//KDChartTextPiece* meNotConst(const_cast<KDChartTextPiece*>(this));
- meNotConst->_metrics = new QFontMetrics( p->fontMetrics() );
+ meNotConst->_metrics = new TQFontMetrics( p->fontMetrics() );
meNotConst->_dirtyMetrics = false;
}
@@ -233,14 +233,14 @@ void KDChartTextPiece::draw( QPainter *p, int x, int y,
}
-void KDChartTextPiece::draw( QPainter *p, int x, int y,
- const QRegion& clipRegion,
- const QColor& color,
- const QBrush* paper ) const
+void KDChartTextPiece::draw( TQPainter *p, int x, int y,
+ const TQRegion& clipRegion,
+ const TQColor& color,
+ const TQBrush* paper ) const
{
if( _isRichText ) {
- QColorGroup cg;
- cg.setColor( QColorGroup::Text, color );
+ TQColorGroup cg;
+ cg.setColor( TQColorGroup::Text, color );
_richText->setDefaultFont( _font );
_richText->setWidth( p, clipRegion.boundingRect().width() );
_richText->draw( p, x, y, clipRegion, cg, paper );
@@ -260,7 +260,7 @@ void KDChartTextPiece::draw( QPainter *p, int x, int y,
// KDChartTextPiece* meNotConst( const_cast<KDChartTextPiece*>(this) );
KDChartTextPiece* meNotConst = const_cast<KDChartTextPiece*>(this);
- meNotConst->_metrics = new QFontMetrics( p->fontMetrics() );
+ meNotConst->_metrics = new TQFontMetrics( p->fontMetrics() );
meNotConst->_dirtyMetrics = false;
}
@@ -270,13 +270,13 @@ void KDChartTextPiece::draw( QPainter *p, int x, int y,
}
-QString KDChartTextPiece::text() const
+TQString KDChartTextPiece::text() const
{
return _text;
}
-QFont KDChartTextPiece::font() const
+TQFont KDChartTextPiece::font() const
{
return _font;
}
diff --git a/libkdchart/KDChartTextPiece.h b/libkdchart/KDChartTextPiece.h
index 16d5a1b..adb176b 100644
--- a/libkdchart/KDChartTextPiece.h
+++ b/libkdchart/KDChartTextPiece.h
@@ -29,26 +29,27 @@
#ifndef __KDCHARTTEXTPIECE_H__
#define __KDCHARTTEXTPIECE_H__
-#include <qstring.h>
-#include <qfont.h>
-#include <qregion.h>
-#include <qpalette.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqfont.h>
+#include <tqregion.h>
+#include <tqpalette.h>
+#include <tqobject.h>
#include <kdchart_export.h>
-class QBrush;
-class QPainter;
-class QSimpleRichText;
-class QFontMetrics;
+class TQBrush;
+class TQPainter;
+class TQSimpleRichText;
+class TQFontMetrics;
-class KDCHART_EXPORT KDChartTextPiece :public QObject
+class KDCHART_EXPORT KDChartTextPiece :public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KDChartTextPiece();
- KDChartTextPiece( const QString& text, const QFont& font );
- KDChartTextPiece( QPainter* painter, const QString& text, const QFont& font );
+ KDChartTextPiece( const TQString& text, const TQFont& font );
+ KDChartTextPiece( TQPainter* painter, const TQString& text, const TQFont& font );
virtual ~KDChartTextPiece();
/**
Copy the settings of text piece \c source into this box.
@@ -72,29 +73,29 @@ class KDCHART_EXPORT KDChartTextPiece :public QObject
const KDChartTextPiece* clone() const;
private:
- KDChartTextPiece( const KDChartTextPiece& ) : QObject(0) {}
+ KDChartTextPiece( const KDChartTextPiece& ) : TQObject(0) {}
public slots:
virtual int width() const;
virtual int height() const;
virtual int fontLeading() const;
- virtual QRect rect( QPainter *p, const QRect& clipRect) const;
- virtual void draw( QPainter *p, int x, int y, const QRect& clipRect,
- const QColor& color, const QBrush* paper = 0 ) const;
- virtual void draw( QPainter *p, int x, int y, const QRegion& clipRegion,
- const QColor& color, const QBrush* paper = 0 ) const;
-
- QString text() const;
- QFont font() const;
+ virtual TQRect rect( TQPainter *p, const TQRect& clipRect) const;
+ virtual void draw( TQPainter *p, int x, int y, const TQRect& clipRect,
+ const TQColor& color, const TQBrush* paper = 0 ) const;
+ virtual void draw( TQPainter *p, int x, int y, const TQRegion& clipRegion,
+ const TQColor& color, const TQBrush* paper = 0 ) const;
+
+ TQString text() const;
+ TQFont font() const;
bool isRichText() const;
protected:
bool _isRichText;
- QSimpleRichText* _richText; // used when _isRichText == true
- QString _text; // used when _isRichText == false
- QFont _font; // used when _isRichText == false
- QFontMetrics* _metrics;
+ TQSimpleRichText* _richText; // used when _isRichText == true
+ TQString _text; // used when _isRichText == false
+ TQFont _font; // used when _isRichText == false
+ TQFontMetrics* _metrics;
bool _dirtyMetrics;
};
diff --git a/libkdchart/KDChartUnknownTypeException.h b/libkdchart/KDChartUnknownTypeException.h
index 8f36a76..231a8c7 100644
--- a/libkdchart/KDChartUnknownTypeException.h
+++ b/libkdchart/KDChartUnknownTypeException.h
@@ -31,7 +31,7 @@
#ifdef USE_EXCEPTIONS
-#include <qstring.h>
+#include <tqstring.h>
#include "KDChartGlobal.h"
@@ -42,17 +42,17 @@
class KDCHART_EXPORT KDChartUnknownTypeException
{
public:
- KDChartUnknownTypeException( const QString& type ) :
+ KDChartUnknownTypeException( const TQString& type ) :
_type( type )
{}
- QString type() const
+ TQString type() const
{
return _type;
}
private:
- QString _type;
+ TQString _type;
};
#endif
diff --git a/libkdchart/KDChartVectorSeries.cpp b/libkdchart/KDChartVectorSeries.cpp
index 79b4374..9044be1 100644
--- a/libkdchart/KDChartVectorSeries.cpp
+++ b/libkdchart/KDChartVectorSeries.cpp
@@ -68,7 +68,7 @@ double KDChartVectorSeries::maxValue( int coordinate, bool &ok ) const
double maxValue = 0.0;
bool bStart = true;
-#if COMPAT_QT_VERSION >= 0x030000
+#if COMPAT_TQT_VERSION >= 0x030000
KDChartVectorSeries::const_iterator i;
#else
KDChartVectorSeries::ConstIterator i;
@@ -85,7 +85,7 @@ double KDChartVectorSeries::maxValue( int coordinate, bool &ok ) const
bStart = false;
}
else
- maxValue = QMAX( maxValue, d.doubleValue( coordinate ) );
+ maxValue = TQMAX( maxValue, d.doubleValue( coordinate ) );
}
}
@@ -100,7 +100,7 @@ double KDChartVectorSeries::minValue( int coordinate, bool &ok ) const
double minValue = 0.0;
bool bStart = true;
-#if COMPAT_QT_VERSION >= 0x030000
+#if COMPAT_TQT_VERSION >= 0x030000
KDChartVectorSeries::const_iterator i;
#else
KDChartVectorSeries::ConstIterator i;
@@ -117,7 +117,7 @@ double KDChartVectorSeries::minValue( int coordinate, bool &ok ) const
bStart = false;
}
else
- minValue = QMIN( minValue, d.doubleValue( coordinate ) );
+ minValue = TQMIN( minValue, d.doubleValue( coordinate ) );
}
}
diff --git a/libkdchart/KDChartVectorSeries.h b/libkdchart/KDChartVectorSeries.h
index 6e6f72e..79a302f 100644
--- a/libkdchart/KDChartVectorSeries.h
+++ b/libkdchart/KDChartVectorSeries.h
@@ -35,23 +35,23 @@
// and my DataQuerySeries.
//
// Requirements:
-// - Implement a QValueVector interface
+// - Implement a TQValueVector interface
#include "KDChartBaseSeries.h"
-#if COMPAT_QT_VERSION >= 0x030000
-#include <qvaluevector.h>
+#if COMPAT_TQT_VERSION >= 0x030000
+#include <tqvaluevector.h>
#else
-#include <qarray.h>
+#include <tqarray.h>
#endif
class KDChartSeriesCollection;
class KDCHART_EXPORT KDChartVectorSeries : public KDChartBaseSeries,
-#if COMPAT_QT_VERSION >= 0x030000
- public QValueVector<KDChartData>
+#if COMPAT_TQT_VERSION >= 0x030000
+ public TQValueVector<KDChartData>
#else
- public QArray<KDChartData>
+ public TQArray<KDChartData>
#endif
{
public:
diff --git a/libkdchart/KDChartVectorTable.h b/libkdchart/KDChartVectorTable.h
index b31b081..7ba0b9a 100644
--- a/libkdchart/KDChartVectorTable.h
+++ b/libkdchart/KDChartVectorTable.h
@@ -29,29 +29,29 @@
#ifndef __KDCHARTVECTORTABLE_H__
#define __KDCHARTVECTORTABLE_H__
-#include <qvaluevector.h>
-#include <qshared.h>
-#include <qtable.h>
+#include <tqvaluevector.h>
+#include <tqshared.h>
+#include <tqtable.h>
#include <KDChartDataIntern.h>
#include <KDChartTableBase.h>
-class KDCHART_EXPORT KDChartVectorTablePrivate : public QShared
+class KDCHART_EXPORT KDChartVectorTablePrivate : public TQShared
{
public:
- KDChartVectorTablePrivate() : QShared() {
+ KDChartVectorTablePrivate() : TQShared() {
row_count = 0;
col_count = 0;
}
- KDChartVectorTablePrivate( uint _rows, uint _cols ) : QShared() {
+ KDChartVectorTablePrivate( uint _rows, uint _cols ) : TQShared() {
matrix.resize( _rows * _cols, KDChartData() );
col_count = _cols;
row_count = _rows;
}
KDChartVectorTablePrivate( const KDChartVectorTablePrivate& _t ) :
- QShared(),
+ TQShared(),
matrix( _t.matrix ),
col_count( _t.col_count ),
row_count( _t.row_count ) {}
@@ -60,15 +60,15 @@ public:
void expand( uint _rows, uint _cols ) {
// Save the old table
- QValueVector<KDChartData> save( matrix );
+ TQValueVector<KDChartData> save( matrix );
// Delete old data, then resize
matrix.resize( 0 );
matrix.resize( _rows * _cols, KDChartData() );
// Copy over the old data
- for( uint row = 0; row < QMIN( row_count, _rows ); row++ )
- for( uint col = 0; col < QMIN( col_count, _cols ); col++ )
+ for( uint row = 0; row < TQMIN( row_count, _rows ); row++ )
+ for( uint col = 0; col < TQMIN( col_count, _cols ); col++ )
matrix[ row * _cols + col ].setAll( save[ row * col_count + col ] );
// set the new counts
@@ -104,7 +104,7 @@ public:
matrix[ r * col_count + c ].clearValue();
}
- QValueVector<KDChartData> matrix;
+ TQValueVector<KDChartData> matrix;
uint col_count;
uint row_count;
@@ -114,6 +114,7 @@ public:
class KDCHART_EXPORT KDChartVectorTableData : public KDChartTableDataBase
{
Q_OBJECT
+ TQ_OBJECT
private:
typedef KDChartVectorTablePrivate Priv;
@@ -123,14 +124,14 @@ public:
/**
* Typedefs
*/
- typedef QValueVector<KDChartData>::iterator Iterator;
- typedef QValueVector<KDChartData>::const_iterator ConstIterator;
+ typedef TQValueVector<KDChartData>::iterator Iterator;
+ typedef TQValueVector<KDChartData>::const_iterator ConstIterator;
- typedef QValueVector<int>::iterator RowIterator;
- typedef QValueVector<int>::const_iterator ConstRowIterator;
+ typedef TQValueVector<int>::iterator RowIterator;
+ typedef TQValueVector<int>::const_iterator ConstRowIterator;
- typedef QValueVector<int>::iterator ColIterator;
- typedef QValueVector<int>::const_iterator ConstColIterator;
+ typedef TQValueVector<int>::iterator ColIterator;
+ typedef TQValueVector<int>::const_iterator ConstColIterator;
/**
* API
@@ -220,7 +221,7 @@ public slots:
}
*/
virtual bool cellCoord( uint _row, uint _col,
- QVariant& _value,
+ TQVariant& _value,
int coordinate=1 ) const
{
if( _row >= sh->row_count || _col >= sh->col_count )
@@ -239,8 +240,8 @@ public slots:
}
virtual void setCell( uint _row, uint _col,
- const QVariant& _value1,
- const QVariant& _value2=QVariant() ) {
+ const TQVariant& _value1,
+ const TQVariant& _value2=TQVariant() ) {
detach();
const KDChartData element( _value1, _value2 );
sh->setCell( _row, _col, element );
@@ -267,9 +268,9 @@ public slots:
sh->expand( _rows, _cols );
// adjust the usedRows / usedCols, if they had been set before
if( _useUsedCols )
- setUsedCols( QMIN( _usedCols, _cols ) );
+ setUsedCols( TQMIN( _usedCols, _cols ) );
if( _useUsedRows )
- setUsedRows( QMIN( _usedRows, _rows ) );
+ setUsedRows( TQMIN( _usedRows, _rows ) );
}
void setUsedRows( uint _rows ) {
diff --git a/libkdchart/KDChartWidget.cpp b/libkdchart/KDChartWidget.cpp
index 81164ea..00e4a45 100644
--- a/libkdchart/KDChartWidget.cpp
+++ b/libkdchart/KDChartWidget.cpp
@@ -34,7 +34,7 @@
#include "KDChartWidget.moc"
#endif
-#include <qpainter.h>
+#include <tqpainter.h>
/**
\class KDChartWidget KDChartWidget.h
@@ -49,7 +49,7 @@
\note If for some reason you are NOT using the
KDChartWidget class but calling the painting methods of KDChart directly,
you probably will also use the KDChartDataRegionList class:
- This class is derived from QPtrList, so all of the Qt documentation
+ This class is derived from TQPtrList, so all of the TQt documentation
for this class is valid for KDChartDataRegionList too, e.g. freeing
of the pointers stored can either be done automatically or
manually - so PLEASE take the time to read the reference information for this class!
@@ -65,12 +65,12 @@
and setData before using this chart otherwise only a simple
default bar chart will be shown.
- \param parent the widget parent; passed on to QWidget
- \param name the widget name; passed on to QWidget
+ \param tqparent the widget tqparent; passed on to TQWidget
+ \param name the widget name; passed on to TQWidget
*/
-KDChartWidget::KDChartWidget( QWidget* parent, const char* name ) :
-QWidget( parent, name ),
+KDChartWidget::KDChartWidget( TQWidget* tqparent, const char* name ) :
+TQWidget( tqparent, name ),
_params( 0 ),
_data( 0 ),
_activeData( false ),
@@ -78,7 +78,7 @@ _mousePressedOnRegion( 0 )
{
_dataRegions.setAutoDelete( true );
setDoubleBuffered( true );
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
}
@@ -87,14 +87,14 @@ _mousePressedOnRegion( 0 )
\param params the specification of the chart
\param data the data to be displayed as a chart
- \param parent the widget parent; passed on to QWidget
- \param name the widget name; passed on to QWidget
+ \param tqparent the widget tqparent; passed on to TQWidget
+ \param name the widget name; passed on to TQWidget
*/
KDChartWidget::KDChartWidget( KDChartParams* params,
KDChartTableDataBase* data,
- QWidget* parent, const char* name ) :
-QWidget( parent, name ),
+ TQWidget* tqparent, const char* name ) :
+TQWidget( tqparent, name ),
_params( params ),
_data( data ),
_activeData( false ),
@@ -102,7 +102,7 @@ _mousePressedOnRegion( 0 )
{
_dataRegions.setAutoDelete( true );
setDoubleBuffered( true );
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
}
@@ -116,14 +116,14 @@ KDChartWidget::~KDChartWidget()
KDChartAutoColor::freeInstance();
}
-void KDChartWidget::paintTo( QPainter& painter,
- const QRect* rect )
+void KDChartWidget::paintTo( TQPainter& painter,
+ const TQRect* rect )
{
KDChart::paint( &painter, _params, _data, &_dataRegions, rect );
}
-void KDChartWidget::print( QPainter& painter,
- const QRect* rect )
+void KDChartWidget::print( TQPainter& painter,
+ const TQRect* rect )
{
bool oldOpt=true;
if( _params ){
@@ -138,18 +138,18 @@ void KDChartWidget::print( QPainter& painter,
_params->setOptimizeOutputForScreen( oldOpt );
}
-void KDChartWidget::paintEvent( QPaintEvent* event )
+void KDChartWidget::paintEvent( TQPaintEvent* event )
{
if( _doubleBuffered ) {
// if double-buffering, paint onto the pixmap and copy
// afterwards
_buffer.fill( backgroundColor() );
- QPainter painter( &_buffer );
+ TQPainter painter( &_buffer );
paintTo( painter );
bitBlt( this, event->rect().topLeft(), &_buffer, event->rect() );
} else {
// if not double-buffering, paint directly into the window
- QPainter painter( this );
+ TQPainter painter( this );
paintTo( painter );
}
}
@@ -158,22 +158,22 @@ void KDChartWidget::paintEvent( QPaintEvent* event )
/**
\internal
*/
-void KDChartWidget::mousePressEvent( QMouseEvent* event )
+void KDChartWidget::mousePressEvent( TQMouseEvent* event )
{
if ( !_activeData )
return ;
_mousePressedOnRegion = 0;
KDChartDataRegion* current = 0;
- //QPtrListIterator < KDChartDataRegion > it( _dataRegions );
+ //TQPtrListIterator < KDChartDataRegion > it( _dataRegions );
for( current = _dataRegions.last(); current; current = _dataRegions.prev() ){
//while ( ( current = it.current() ) ) {
- if ( current->contains( event->pos() ) ) {
+ if ( current->tqcontains( event->pos() ) ) {
_mousePressedOnRegion = current;
- if ( event->button() == LeftButton ){
+ if ( event->button() == Qt::LeftButton ){
emit dataLeftPressed( current->row, current->col );
emit dataLeftPressed( event->pos() );
- }else if ( event->button() == MidButton ){
+ }else if ( event->button() == Qt::MidButton ){
emit dataMiddlePressed( current->row, current->col );
emit dataMiddlePressed( event->pos() );
}else{
@@ -189,24 +189,24 @@ void KDChartWidget::mousePressEvent( QMouseEvent* event )
/**
\internal
*/
-void KDChartWidget::mouseReleaseEvent( QMouseEvent* event )
+void KDChartWidget::mouseReleaseEvent( TQMouseEvent* event )
{
if ( !_activeData )
return ;
KDChartDataRegion* current = 0;
- QPtrListIterator < KDChartDataRegion > it( _dataRegions );
+ TQPtrListIterator < KDChartDataRegion > it( _dataRegions );
while ( ( current = it.current() ) ) {
++it;
- if ( current->contains( event->pos() ) ) {
- if ( event->button() == LeftButton ) {
+ if ( current->tqcontains( event->pos() ) ) {
+ if ( event->button() == Qt::LeftButton ) {
emit dataLeftReleased( current->row, current->col );
emit dataLeftReleased( event->pos() );
if ( _mousePressedOnRegion == current ){
emit dataLeftClicked( current->row, current->col );
emit dataLeftClicked( event->pos() );
}
- } else if ( event->button() == MidButton ) {
+ } else if ( event->button() == Qt::MidButton ) {
emit dataMiddleReleased( current->row, current->col );
emit dataMiddleReleased( event->pos() );
if ( _mousePressedOnRegion == current ){
@@ -229,7 +229,7 @@ void KDChartWidget::mouseReleaseEvent( QMouseEvent* event )
/**
\internal
*/
-void KDChartWidget::resizeEvent( QResizeEvent* /*event*/ )
+void KDChartWidget::resizeEvent( TQResizeEvent* /*event*/ )
{
// if we use double-buffering, resize the buffer to the new size,
// otherwise leave it alone
@@ -244,8 +244,8 @@ void KDChartWidget::resizeEvent( QResizeEvent* /*event*/ )
display process, so this is turned off by default.
If active data reporting is turned on when the widget is already
- shown, data will be reported after the next repaint(). Call
- repaint() explicitly if necessary.
+ shown, data will be reported after the next tqrepaint(). Call
+ tqrepaint() explicitly if necessary.
Active data is currently supported for bar, pie, and line charts
(the latter only with markers, as trying to hit the line would be
@@ -281,7 +281,7 @@ bool KDChartWidget::isActiveData() const
needs to be kept around. However, in most cases, it is worth
spending the extra memory. Double-buffering is on by
default. Turning double-buffering on or off does not trigger a
- repaint.
+ tqrepaint.
\param doublebuffered if true, turns double-buffering on, if false,
turns double-buffering off
@@ -401,7 +401,7 @@ KDChartTableDataBase* KDChartWidget::data() const
*/
/**
- \fn void KDChartWidget::dataLeftClicked( const QPoint & pnt )
+ \fn void KDChartWidget::dataLeftClicked( const TQPoint & pnt )
This signal is emitted when a data item was clicked onto with the left mouse button.
@@ -413,7 +413,7 @@ KDChartTableDataBase* KDChartWidget::data() const
\sa dataRightClicked, dataMiddleClicked
*/
/**
- \fn void KDChartWidget::dataRightClicked( const QPoint & pnt )
+ \fn void KDChartWidget::dataRightClicked( const TQPoint & pnt )
This signal is emitted when a data item was clicked onto with the right mouse button.
@@ -425,7 +425,7 @@ KDChartTableDataBase* KDChartWidget::data() const
\sa dataLeftClicked, dataMiddleClicked
*/
/**
- \fn void KDChartWidget::dataMiddleClicked( const QPoint & pnt )
+ \fn void KDChartWidget::dataMiddleClicked( const TQPoint & pnt )
This signal is emitted when a data item was clicked onto with the middle mouse button.
diff --git a/libkdchart/KDChartWidget.h b/libkdchart/KDChartWidget.h
index d117daa..635e0bd 100644
--- a/libkdchart/KDChartWidget.h
+++ b/libkdchart/KDChartWidget.h
@@ -32,9 +32,9 @@
#include <KDChartGlobal.h>
#include <KDChartTable.h>
#include <KDChartDataRegion.h>
-#include <qwidget.h>
-#include <qscrollview.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqscrollview.h>
+#include <tqpixmap.h>
/**
\file KDChartWidget.h
@@ -45,17 +45,18 @@
class KDChartParams;
-class KDCHART_EXPORT KDChartWidget : public QWidget
+class KDCHART_EXPORT KDChartWidget : public TQWidget
{
Q_OBJECT
- Q_PROPERTY( bool activeData READ isActiveData WRITE setActiveData )
- Q_PROPERTY( bool doubleBuffered READ isDoubleBuffered WRITE setDoubleBuffered )
+ TQ_OBJECT
+ TQ_PROPERTY( bool activeData READ isActiveData WRITE setActiveData )
+ TQ_PROPERTY( bool doubleBuffered READ isDoubleBuffered WRITE setDoubleBuffered )
public:
- KDChartWidget( QWidget* parent = 0, const char* name = 0 );
+ KDChartWidget( TQWidget* tqparent = 0, const char* name = 0 );
KDChartWidget( KDChartParams* params,
KDChartTableDataBase* data,
- QWidget* parent = 0, const char* name = 0 );
+ TQWidget* tqparent = 0, const char* name = 0 );
~KDChartWidget();
public slots:
@@ -72,47 +73,47 @@ public slots:
void setParams( KDChartParams* params );
void setData( KDChartTableDataBase* data );
// use this method to paint to low resolution devices
- void paintTo( QPainter& painter,
- const QRect* rect = 0 );
+ void paintTo( TQPainter& painter,
+ const TQRect* rect = 0 );
// use this method to paint to high res devices like printers...
- void print( QPainter& painter,
- const QRect* rect = 0 );
+ void print( TQPainter& painter,
+ const TQRect* rect = 0 );
signals:
void dataLeftClicked( uint row, uint col );
- void dataLeftClicked( const QPoint & pnt );
+ void dataLeftClicked( const TQPoint & pnt );
void dataMiddleClicked( uint row, uint col );
- void dataMiddleClicked( const QPoint & pnt );
+ void dataMiddleClicked( const TQPoint & pnt );
void dataRightClicked( uint row, uint col );
- void dataRightClicked( const QPoint & pnt );
+ void dataRightClicked( const TQPoint & pnt );
void dataLeftPressed( uint row, uint col );
- void dataLeftPressed( const QPoint & pnt );
+ void dataLeftPressed( const TQPoint & pnt );
void dataMiddlePressed( uint row, uint col );
- void dataMiddlePressed( const QPoint & pnt );
+ void dataMiddlePressed( const TQPoint & pnt );
void dataRightPressed( uint row, uint col );
- void dataRightPressed( const QPoint & pnt );
+ void dataRightPressed( const TQPoint & pnt );
void dataLeftReleased( uint row, uint col );
- void dataLeftReleased( const QPoint & pnt );
+ void dataLeftReleased( const TQPoint & pnt );
void dataMiddleReleased( uint row, uint col );
- void dataMiddleReleased( const QPoint & pnt );
+ void dataMiddleReleased( const TQPoint & pnt );
void dataRightReleased( uint row, uint col );
- void dataRightReleased( const QPoint & pnt );
+ void dataRightReleased( const TQPoint & pnt );
void barsDisplayed( int barsDisplayed, int barsLeft );
protected:
- virtual void paintEvent( QPaintEvent* event );
- virtual void mousePressEvent( QMouseEvent* event );
- virtual void mouseReleaseEvent( QMouseEvent* event );
- virtual void resizeEvent( QResizeEvent* event );
+ virtual void paintEvent( TQPaintEvent* event );
+ virtual void mousePressEvent( TQMouseEvent* event );
+ virtual void mouseReleaseEvent( TQMouseEvent* event );
+ virtual void resizeEvent( TQResizeEvent* event );
private:
KDChartParams* _params;
KDChartTableDataBase* _data;
bool _activeData;
bool _doubleBuffered;
- QPixmap _buffer;
+ TQPixmap _buffer;
KDChartDataRegion* _mousePressedOnRegion;
KDChartDataRegionList _dataRegions;
};
diff --git a/libkdchart/KDChartWrapperFactory.cpp b/libkdchart/KDChartWrapperFactory.cpp
index 430ef3a..2ff08f1 100644
--- a/libkdchart/KDChartWrapperFactory.cpp
+++ b/libkdchart/KDChartWrapperFactory.cpp
@@ -1,6 +1,6 @@
#include "KDChartWrapperFactory.h"
#include <KDChartTable.h>
-#include <qfont.h>
+#include <tqfont.h>
#include "wrappers/KDChartParamsWrapper.h"
#include "wrappers/KDChartTableDataWrapper.h"
#include "wrappers/KDChartCustomBoxWrapper.h"
@@ -15,18 +15,18 @@ KDChartWrapperFactory::KDChartWrapperFactory()
registerWrapper( "KDChartAxisParams", "KDChartAxisParamsWrapper" );
}
-QObject* KDChartWrapperFactory::create( const QString& className, void* ptr )
+TQObject* KDChartWrapperFactory::create( const TQString& className, void* ptr )
{
- if ( className == QString::fromLatin1( "KDChartParams" ) )
+ if ( className == TQString::tqfromLatin1( "KDChartParams" ) )
return new KDChartParamsWrapper( static_cast<KDChartParams*>( ptr ) );
- if ( className == QString::fromLatin1( "KDChartVectorTableData" ) )
+ if ( className == TQString::tqfromLatin1( "KDChartVectorTableData" ) )
return new KDChartTableDataWrapper( static_cast<KDChartTableData*>( ptr ) );
- if ( className == QString::fromLatin1( "KDChartCustomBox" ) )
+ if ( className == TQString::tqfromLatin1( "KDChartCustomBox" ) )
return new KDChartCustomBoxWrapper( static_cast<KDChartCustomBox*>( ptr ) );
- if ( className == QString::fromLatin1( "KDChartAxisParams" ) )
+ if ( className == TQString::tqfromLatin1( "KDChartAxisParams" ) )
return new KDChartAxisParamsWrapper( static_cast<KDChartAxisParams*>( ptr ) );
return 0;
diff --git a/libkdchart/KDChartWrapperFactory.h b/libkdchart/KDChartWrapperFactory.h
index aa07277..82d71fc 100644
--- a/libkdchart/KDChartWrapperFactory.h
+++ b/libkdchart/KDChartWrapperFactory.h
@@ -1,12 +1,12 @@
#ifndef KDCHARTWRAPPERFACTORY_H
#define KDCHARTWRAPPERFACTORY_H
-#include <qswrapperfactory.h>
+#include <tqswrapperfactory.h>
-class KDChartWrapperFactory :public QSWrapperFactory
+class KDChartWrapperFactory :public TQSWrapperFactory
{
public:
KDChartWrapperFactory();
- virtual QObject* create ( const QString& className, void* ptr );
+ virtual TQObject* create ( const TQString& className, void* ptr );
};
#endif /* KDCHARTWRAPPERFACTORY_H */
diff --git a/libkdchart/KDDrawText.cpp b/libkdchart/KDDrawText.cpp
index 4b9467f..2ef9308 100644
--- a/libkdchart/KDDrawText.cpp
+++ b/libkdchart/KDDrawText.cpp
@@ -26,9 +26,9 @@
** licensing are not clear to you.
**
**********************************************************************/
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqpixmap.h>
#include <math.h>
#include <limits.h>
@@ -38,14 +38,14 @@
#define M_PI 3.14159265358979323846
#endif
-void KDDrawText::drawRotatedText( QPainter* painter,
+void KDDrawText::drawRotatedText( TQPainter* painter,
float degrees,
- QPoint anchor,
- const QString& text,
- const QFont* font,
+ TQPoint anchor,
+ const TQString& text,
+ const TQFont* font,
int align,
bool showAnchor,
- const QFontMetrics* fontMet,
+ const TQFontMetrics* fontMet,
bool noFirstrotate,
bool noBackrotate,
KDDrawTextRegionAndTrueRect* infos,
@@ -71,13 +71,13 @@ void KDDrawText::drawRotatedText( QPainter* painter,
KDDrawTextRegionAndTrueRect KDDrawText::measureRotatedText(
- QPainter* painter,
+ TQPainter* painter,
float degrees,
- QPoint anchor,
- const QString& text,
- const QFont* font,
+ TQPoint anchor,
+ const TQString& text,
+ const TQFont* font,
int align,
- const QFontMetrics* fontMet,
+ const TQFontMetrics* fontMet,
bool noFirstrotate,
bool noBackrotate,
int addPercentOfHeightToRegion )
@@ -104,17 +104,17 @@ KDDrawTextRegionAndTrueRect KDDrawText::measureRotatedText(
}
-void KDDrawText::drawRotatedTxt( QPainter* painter,
+void KDDrawText::drawRotatedTxt( TQPainter* painter,
bool optimizeOutputForScreen,
float degrees,
- QPoint anchor,
- const QString& text,
- const QFont* font,
+ TQPoint anchor,
+ const TQString& text,
+ const TQFont* font,
int align,
bool showAnchor,
int txtWidth,
int txtHeight,
- const QFontMetrics* fontMet,
+ const TQFontMetrics* fontMet,
bool calculateOnly,
bool doNotCalculate,
bool noFirstrotate,
@@ -124,17 +124,17 @@ void KDDrawText::drawRotatedTxt( QPainter* painter,
{
// showAnchor=true;
- //qDebug("\nanchor: "+ text + " / "+QString::number(anchor.x())
- // +" / "+QString::number(anchor.y()));
+ //qDebug("\nanchor: "+ text + " / "+TQString::number(anchor.x())
+ // +" / "+TQString::number(anchor.y()));
bool useInfos = doNotCalculate && infos;
bool fontChanged = ( 0 != font );
- QFont oldFont;
+ TQFont oldFont;
if( fontChanged ) {
oldFont = painter->font();
painter->setFont( *font );
}
else
- font = &painter->font();
+ font = static_cast<const TQFont*>(&painter->font());
bool mustBackrotate = false;
if( !optimizeOutputForScreen && !noFirstrotate ){
@@ -143,7 +143,7 @@ void KDDrawText::drawRotatedTxt( QPainter* painter,
mustBackrotate = true;
}
- QPoint pos = useInfos ? infos->pos : painter->xFormDev( anchor );
+ TQPoint pos = useInfos ? infos->pos : painter->xFormDev( anchor );
if( useInfos )
{
@@ -156,31 +156,31 @@ void KDDrawText::drawRotatedTxt( QPainter* painter,
// a bug in the AIX 5.2 compiler means using (?:) syntax doesn't work here
// therefor we do it the following way:
- QFontMetrics* pFM=0;
+ TQFontMetrics* pFM=0;
if( ! pFM ) {
- pFM = new QFontMetrics( painter->fontMetrics() );
+ pFM = new TQFontMetrics( painter->fontMetrics() );
} else {
- pFM = const_cast<QFontMetrics*>(fontMet);
+ pFM = const_cast<TQFontMetrics*>(fontMet);
}
- int nLF = text.contains('\n');
+ int nLF = text.tqcontains('\n');
if( INT_MAX == txtWidth ) {
if( nLF ){
int tw;
txtWidth = 0;
int i0 = 0;
- int iLF = text.find('\n');
+ int iLF = text.tqfind('\n');
while( -1 != iLF ){
- const QRect r(pFM->boundingRect( text.mid(i0, iLF-i0) ));
+ const TQRect r(pFM->boundingRect( text.mid(i0, iLF-i0) ));
tw = r.width()+ 2;
newHeight = r.height();
if( tw > txtWidth )
txtWidth = tw;
i0 = iLF+1;
- iLF = text.find('\n', i0);
+ iLF = text.tqfind('\n', i0);
}
if( iLF < (int)text.length() ){
- const QRect r(pFM->boundingRect( text.mid( i0 ) ));
+ const TQRect r(pFM->boundingRect( text.mid( i0 ) ));
tw = r.width()+2;
newHeight = r.height();
if( tw > txtWidth )
@@ -188,7 +188,7 @@ void KDDrawText::drawRotatedTxt( QPainter* painter,
i0 = iLF+1;
}
}else{
- const QRect r(painter->boundingRect( 0,0,1,1, Qt::AlignAuto, text ));
+ const TQRect r(painter->boundingRect( 0,0,1,1, TQt::AlignAuto, text ));
// correct width and height before painting with 2 unit to avoid truncating.
// PENDING Michel - improve
txtWidth = r.width()+2;
@@ -209,8 +209,8 @@ void KDDrawText::drawRotatedTxt( QPainter* painter,
}
if( showAnchor ) {
int d = txtHeight/4;
- QPen savePen = painter->pen();
- painter->setPen( QColor( Qt::darkRed ) );
+ TQPen savePen = painter->pen();
+ painter->setPen( TQColor( TQt::darkRed ) );
painter->drawLine( pos.x(), pos.y()-d,
pos.x(), pos.y()+d );
painter->drawLine( pos.x()-d, pos.y(),
@@ -219,32 +219,32 @@ void KDDrawText::drawRotatedTxt( QPainter* painter,
}
int x = useInfos ? infos->x : pos.x();
int y = useInfos ? infos->y : pos.y();
- //qDebug("1.: (x / y) :" + text + " / "+QString::number(x)
- // +" / "+QString::number(y));
+ //qDebug("1.: (x / y) :" + text + " / "+TQString::number(x)
+ // +" / "+TQString::number(y));
//qDebug("2.: (posx / posy) :" + text );
// qDebug ( "%d", pos.x() ); qDebug ( "%d", pos.y() );
- //qDebug("3.: (infosx / infosy) :" + text + " / "+QString::number(infos->x)
- // +" / "+QString::number(infos->y));
+ //qDebug("3.: (infosx / infosy) :" + text + " / "+TQString::number(infos->x)
+ // +" / "+TQString::number(infos->y));
if( !useInfos && !optimizeOutputForScreen ) {
- switch( align & ( Qt::AlignLeft | Qt::AlignRight | Qt::AlignHCenter ) ) {
- case Qt::AlignLeft:
+ switch( align & ( TQt::AlignLeft | TQt::AlignRight | TQt::AlignHCenter ) ) {
+ case TQt::AlignLeft:
break;
- case Qt::AlignRight:
-//qDebug( QPaintDeviceMetrics::logicalDpiX() );
+ case TQt::AlignRight:
+//qDebug( TQPaintDeviceMetrics::logicalDpiX() );
x -= txtWidth;
break;
- case Qt::AlignHCenter:
+ case TQt::AlignHCenter:
x -= txtWidth - txtWidth/2;
break;
}
- switch( align & ( Qt::AlignTop | Qt::AlignBottom | Qt::AlignVCenter ) ) {
- case Qt::AlignTop:
+ switch( align & ( TQt::AlignTop | TQt::AlignBottom | TQt::AlignVCenter ) ) {
+ case TQt::AlignTop:
break;
- case Qt::AlignBottom:
+ case TQt::AlignBottom:
y -= txtHeight;
break;
- case Qt::AlignVCenter:
+ case TQt::AlignVCenter:
y -= txtHeight/2;
break;
}
@@ -254,52 +254,52 @@ void KDDrawText::drawRotatedTxt( QPainter* painter,
infos->x = x - 4;
infos->y = y - 4;
//PENDING Michel updating info using x , y from pos
- //qDebug("4.: (infosx / infosy) :" + text + " / "+QString::number(infos->x)
- //+" / "+QString::number(infos->y));
- //qDebug("5.: (x / y) :" + text + " / "+QString::number(x)
- // +" / "+QString::number(y));
- //qDebug("6.: (anchorx /anchory) :" + text + " / "+QString::number(x)
- // +" / "+QString::number(y));
- QRect rect( painter->boundingRect( x, y,
+ //qDebug("4.: (infosx / infosy) :" + text + " / "+TQString::number(infos->x)
+ //+" / "+TQString::number(infos->y));
+ //qDebug("5.: (x / y) :" + text + " / "+TQString::number(x)
+ // +" / "+TQString::number(y));
+ //qDebug("6.: (anchorx /anchory) :" + text + " / "+TQString::number(x)
+ // +" / "+TQString::number(y));
+ TQRect rect( painter->boundingRect( x, y,
txtWidth, txtHeight,
- Qt::AlignLeft + Qt::AlignTop,
+ TQt::AlignLeft + TQt::AlignTop,
text ) );
- //painter->fillRect (rect, Qt::blue );
+ //painter->fillRect (rect, TQt::blue );
- QPoint topLeft( painter->xForm( rect.topLeft() ) );
- QPoint topRight( painter->xForm( rect.topRight() ) );
- QPoint bottomRight( painter->xForm( rect.bottomRight() ) );
- QPoint bottomLeft( painter->xForm( rect.bottomLeft() ) );
+ TQPoint topLeft( painter->xForm( rect.topLeft() ) );
+ TQPoint topRight( painter->xForm( rect.topRight() ) );
+ TQPoint bottomRight( painter->xForm( rect.bottomRight() ) );
+ TQPoint bottomLeft( painter->xForm( rect.bottomLeft() ) );
int additor = addPercentOfHeightToRegion * txtHeight / 100;
- QPointArray points;
+ TQPointArray points;
points.setPoints( 4, topLeft.x()-additor, topLeft.y()-additor,
topRight.x()+additor, topRight.y()-additor,
bottomRight.x()+additor, bottomRight.y()+additor,
bottomLeft.x()-additor, bottomLeft.y()+additor );
- infos->region = QRegion( points );
+ infos->region = TQRegion( points );
}
- // When the Qt initialization bug is fixed the following scope
+ // When the TQt initialization bug is fixed the following scope
// will be put into an "if( showAnchor )" entirely.
{
int d = txtHeight/4;
- QPen savePen = painter->pen();
+ TQPen savePen = painter->pen();
if( showAnchor ) {
- painter->setPen( QColor( Qt::blue ) );
+ painter->setPen( TQColor( TQt::blue ) );
painter->drawLine( x, y-d,
x, y+d );
painter->drawLine( x-d, y,
x+d, y );
- painter->setPen( QColor( Qt::darkGreen ) );
+ painter->setPen( TQColor( TQt::darkGreen ) );
painter->drawRect(x,y,txtWidth,txtHeight);
//painter->drawText( x, y-d, text);
/*
}else{
- // Working around a strange Qt bug: Rotated painter must be
+ // Working around a strange TQt bug: Rotated painter must be
// initialized by drawing before text can be painted there.
- painter->setPen( QColor( Qt::white ) );
+ painter->setPen( TQColor( TQt::white ) );
painter->drawLine( 30000,0,30001,0 );
*/
}
@@ -317,27 +317,27 @@ void KDDrawText::drawRotatedTxt( QPainter* painter,
/*
painter->drawText( x, y,
txtWidth, txtHeight,
- Qt::AlignLeft + Qt::AlignTop,
+ TQt::AlignLeft + TQt::AlignTop,
text );
*/
painter->drawText( x, y,
txtWidth, txtHeight,
- Qt::AlignLeft + Qt::AlignTop,
+ TQt::AlignLeft + TQt::AlignTop,
text );
/*
painter->drawText( x, y,
text,
-1,
- Qt::AlignRight + Qt::AlignTop );
+ TQt::AlignRight + TQt::AlignTop );
*/
}else{
// new code (rotating the text ourselves for better quality on screens)
- QPixmap pm( txtWidth+2, txtHeight+2, 1 );
+ TQPixmap pm( txtWidth+2, txtHeight+2, 1 );
// note: When using colored axis labels it will be necessary
// to change this code and use a 256 color pixmap instead
// of a monochrome one. (khz, 2002/08/15)
- pm.fill(Qt::color0);
- QPainter p;
+ pm.fill(TQt::color0);
+ TQPainter p;
p.begin( &pm );
if( showAnchor ){
p.drawRect(0,0, txtWidth,txtHeight);
@@ -347,21 +347,21 @@ void KDDrawText::drawRotatedTxt( QPainter* painter,
p.setFont(painter->font());
p.drawText( 0, 0, txtWidth, txtHeight,
- Qt::AlignLeft + Qt::AlignTop,
+ TQt::AlignLeft + TQt::AlignTop,
text );
/*
p.drawText( 0,0,
text,
-1,
- Qt::AlignLeft + Qt::AlignTop );
+ TQt::AlignLeft + TQt::AlignTop );
*/
- QBitmap mask;
- mask = pm;
- pm.setMask( mask );
- QWMatrix m;
+ TQBitmap tqmask;
+ tqmask = pm;
+ pm.setMask( tqmask );
+ TQWMatrix m;
m.rotate( degrees );
- QPixmap theRotatedPixmap = pm.xForm(m);
+ TQPixmap theRotatedPixmap = pm.xForm(m);
// where are our four corner points now:
double degreesRad = degrees;
@@ -370,20 +370,20 @@ void KDDrawText::drawRotatedTxt( QPainter* painter,
degreesRad *= M_PI / 180.0;
double cosA = cos( degreesRad );
double sinA = sin( degreesRad );
- QPoint pTopLeft( 0,
+ TQPoint pTopLeft( 0,
0 );
- QPoint pBotLeft( static_cast < int > ( 0 * cosA - txtHeight * sinA ),
+ TQPoint pBotLeft( static_cast < int > ( 0 * cosA - txtHeight * sinA ),
static_cast < int > ( txtHeight * cosA + 0 * sinA ) );
- QPoint pTopRight( static_cast < int > ( txtWidth * cosA - 0 * sinA ),
+ TQPoint pTopRight( static_cast < int > ( txtWidth * cosA - 0 * sinA ),
static_cast < int > ( 0 * cosA + txtWidth * sinA ) );
- QPoint pBotRight( static_cast < int > ( txtWidth * cosA - txtHeight * sinA ),
+ TQPoint pBotRight( static_cast < int > ( txtWidth * cosA - txtHeight * sinA ),
static_cast < int > ( txtHeight * cosA + txtWidth * sinA ) );
// make our four corner points relative
// to the bounding rect of the rotated pixmap
{
- QPoint pDeltaTL( QMIN(0, QMIN(pBotLeft.x(), QMIN(pTopRight.x(), pBotRight.x()))),
- QMIN(0, QMIN(pBotLeft.y(), QMIN(pTopRight.y(), pBotRight.y()))) );
+ TQPoint pDeltaTL( TQMIN(0, TQMIN(pBotLeft.x(), TQMIN(pTopRight.x(), pBotRight.x()))),
+ TQMIN(0, TQMIN(pBotLeft.y(), TQMIN(pTopRight.y(), pBotRight.y()))) );
pTopLeft -= pDeltaTL;
pBotLeft -= pDeltaTL;
pTopRight -= pDeltaTL;
@@ -391,82 +391,82 @@ void KDDrawText::drawRotatedTxt( QPainter* painter,
}
/*
- painter->setPen( QColor( Qt::black ) );
+ painter->setPen( TQColor( TQt::black ) );
painter->drawLine( x-13, y, x+13, y );
painter->drawLine( x, y-13, x, y+13 );
- painter->setPen( QColor( Qt::blue ) );
+ painter->setPen( TQColor( TQt::blue ) );
painter->drawLine( x+pTopLeft.x()-3, y+pTopLeft.y(), x+pTopLeft.x()+3, y+pTopLeft.y() );
painter->drawLine( x+pTopLeft.x(), y+pTopLeft.y()-3, x+pTopLeft.x(), y+pTopLeft.y()+3 );
- painter->setPen( QColor( Qt::red ) );
+ painter->setPen( TQColor( TQt::red ) );
painter->drawLine( x+pTopRight.x()-3, y+pTopRight.y(), x+pTopRight.x()+3, y+pTopRight.y() );
painter->drawLine( x+pTopRight.x(), y+pTopRight.y()-3, x+pTopRight.x(), y+pTopRight.y()+3 );
- painter->setPen( QColor( Qt::green ) );
+ painter->setPen( TQColor( TQt::green ) );
painter->drawLine( x+pBotLeft.x()-3, y+pBotLeft.y(), x+pBotLeft.x()+3, y+pBotLeft.y() );
painter->drawLine( x+pBotLeft.x(), y+pBotLeft.y()-3, x+pBotLeft.x(), y+pBotLeft.y()+3 );
- painter->setPen( QColor( Qt::yellow ) );
+ painter->setPen( TQColor( TQt::yellow ) );
painter->drawLine( x+pBotRight.x()-3, y+pBotRight.y(), x+pBotRight.x()+3, y+pBotRight.y() );
painter->drawLine( x+pBotRight.x(), y+pBotRight.y()-3, x+pBotRight.x(), y+pBotRight.y()+3 );
*/
- // The horizontal and vertical alignment together define one of
+ // The horizontal and vertical tqalignment together define one of
// NINE possible points: this point must be moved on the anchor.
- int hAlign = align & ( Qt::AlignLeft | Qt::AlignRight | Qt::AlignHCenter );
- int vAlign = align & ( Qt::AlignTop | Qt::AlignBottom | Qt::AlignVCenter );
+ int hAlign = align & ( TQt::AlignLeft | TQt::AlignRight | TQt::AlignHCenter );
+ int vAlign = align & ( TQt::AlignTop | TQt::AlignBottom | TQt::AlignVCenter );
- QPoint pixPoint;
+ TQPoint pixPoint;
switch( hAlign ) {
- case Qt::AlignLeft:
+ case TQt::AlignLeft:
switch( vAlign ) {
- case Qt::AlignTop:
+ case TQt::AlignTop:
pixPoint = pTopLeft;
break;
- case Qt::AlignBottom:
+ case TQt::AlignBottom:
pixPoint = pBotLeft;
break;
- case Qt::AlignVCenter:
+ case TQt::AlignVCenter:
default:
- pixPoint = QPoint( (pTopLeft.x() + pBotLeft.x()) / 2,
+ pixPoint = TQPoint( (pTopLeft.x() + pBotLeft.x()) / 2,
(pTopLeft.y() + pBotLeft.y()) / 2 );
break;
}
break;
- case Qt::AlignRight:
+ case TQt::AlignRight:
switch( vAlign ) {
- case Qt::AlignTop:
+ case TQt::AlignTop:
pixPoint = pTopRight;
break;
- case Qt::AlignBottom:
+ case TQt::AlignBottom:
pixPoint = pBotRight;
break;
- case Qt::AlignVCenter:
+ case TQt::AlignVCenter:
default:
- pixPoint = QPoint( (pTopRight.x() + pBotRight.x()) / 2,
+ pixPoint = TQPoint( (pTopRight.x() + pBotRight.x()) / 2,
(pTopRight.y() + pBotRight.y()) / 2 );
break;
}
break;
- case Qt::AlignHCenter:
+ case TQt::AlignHCenter:
default:
switch( vAlign ) {
- case Qt::AlignTop:
- pixPoint = QPoint( (pTopLeft.x() + pTopRight.x()) / 2,
+ case TQt::AlignTop:
+ pixPoint = TQPoint( (pTopLeft.x() + pTopRight.x()) / 2,
(pTopLeft.y() + pTopRight.y()) / 2 );
break;
- case Qt::AlignBottom:
- pixPoint = QPoint( (pBotLeft.x() + pBotRight.x()) / 2,
+ case TQt::AlignBottom:
+ pixPoint = TQPoint( (pBotLeft.x() + pBotRight.x()) / 2,
(pBotLeft.y() + pBotRight.y()) / 2 );
break;
- case Qt::AlignVCenter:
+ case TQt::AlignVCenter:
default:
- pixPoint = QPoint( (pTopLeft.x() + pBotRight.x()) / 2,
+ pixPoint = TQPoint( (pTopLeft.x() + pBotRight.x()) / 2,
(pTopLeft.y() + pBotRight.y()) / 2 );
break;
}
break;
}
- //qDebug("2.: (x / y) : "+QString::number(x)
- // +" / "+QString::number(y));
- painter->drawPixmap( QPoint( x - pixPoint.x(),
+ //qDebug("2.: (x / y) : "+TQString::number(x)
+ // +" / "+TQString::number(y));
+ painter->drawPixmap( TQPoint( x - pixPoint.x(),
y - pixPoint.y() ),
theRotatedPixmap );
p.end();
diff --git a/libkdchart/KDDrawText.h b/libkdchart/KDDrawText.h
index 64337e5..5fb9dbf 100644
--- a/libkdchart/KDDrawText.h
+++ b/libkdchart/KDDrawText.h
@@ -29,7 +29,7 @@
#ifndef __KDDRAWTEXT_H__
#define __KDDRAWTEXT_H__
-#include <qpainter.h>
+#include <tqpainter.h>
#ifdef linux
#include <values.h>
#endif
@@ -38,8 +38,8 @@
struct KDDrawTextRegionAndTrueRect
{
- QRegion region;
- QPoint pos;
+ TQRegion region;
+ TQPoint pos;
int x,y,width,height;
};
@@ -47,48 +47,48 @@ struct KDDrawTextRegionAndTrueRect
class KDDrawText
{
public:
- static void drawRotatedText( QPainter* painter,
+ static void drawRotatedText( TQPainter* painter,
float degrees,
- QPoint anchor,
- const QString& text,
- const QFont* font = 0,
- int align = Qt::AlignLeft | Qt::AlignTop,
- // useful for debugging of your layout:
+ TQPoint anchor,
+ const TQString& text,
+ const TQFont* font = 0,
+ int align = TQt::AlignLeft | TQt::AlignTop,
+ // useful for debugging of your tqlayout:
bool showAnchor = false,
- const QFontMetrics* fontMet = 0,
+ const TQFontMetrics* fontMet = 0,
bool noFirstrotate = false,
bool noBackrotate = false,
KDDrawTextRegionAndTrueRect* infos = 0,
bool optimizeOutputForScreen = false );
static KDDrawTextRegionAndTrueRect measureRotatedText(
- QPainter* painter,
+ TQPainter* painter,
float degrees,
- QPoint anchor,
- const QString& text,
- const QFont* font,
+ TQPoint anchor,
+ const TQString& text,
+ const TQFont* font,
int align,
- const QFontMetrics* fontMet,
+ const TQFontMetrics* fontMet,
bool noFirstrotate,
bool noBackrotate,
int addPercentOfHeightToRegion );
private:
- static void drawRotatedTxt( QPainter* painter,
+ static void drawRotatedTxt( TQPainter* painter,
bool optimizeOutputForScreen,
float degrees,
- QPoint anchor,
- const QString& text,
- const QFont* font = 0,
- int align = Qt::AlignLeft | Qt::AlignTop,
- // usefull for debugging of your layout:
+ TQPoint anchor,
+ const TQString& text,
+ const TQFont* font = 0,
+ int align = TQt::AlignLeft | TQt::AlignTop,
+ // usefull for debugging of your tqlayout:
bool showAnchor = false,
// speed-up parameters
// used internally by drawCircleText()
// to avoid duplicate calculation
int txtWidth = INT_MAX,
int txtHeight = INT_MAX,
- const QFontMetrics* fontMet = 0,
+ const TQFontMetrics* fontMet = 0,
// additional speed-up parameters used by KDChart
bool calculateOnly = false,
bool doNotCalculate= false,
diff --git a/libkdchart/KDFrame.cpp b/libkdchart/KDFrame.cpp
index a8a1833..23bdcc3 100644
--- a/libkdchart/KDFrame.cpp
+++ b/libkdchart/KDFrame.cpp
@@ -1,5 +1,5 @@
/* -*- Mode: C++ -*-
- KD Tools - a set of useful widgets for Qt
+ KD Tools - a set of useful widgets for TQt
*/
/****************************************************************************
@@ -27,8 +27,8 @@
**
**********************************************************************/
-#include <qpainter.h>
-#include <qbrush.h>
+#include <tqpainter.h>
+#include <tqbrush.h>
#include <KDFrame.h>
#include <KDFrameProfileSection.h>
@@ -39,7 +39,7 @@
#else
#include <cmath>
#endif
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#define M_PI 3.14159265358979323846
#endif
@@ -58,15 +58,15 @@ KDFrame::KDFrameCorner::~KDFrameCorner()
-void KDFrame::paintBackground( QPainter& painter, const QRect& innerRect ) const
+void KDFrame::paintBackground( TQPainter& painter, const TQRect& innerRect ) const
{
/* first draw the brush (may contain a pixmap)*/
- if( Qt::NoBrush != _background.style() ) {
- QPen oldPen( painter.pen() );
- QPoint oldOrig( painter.brushOrigin() );
- QBrush oldBrush( painter.brush() );
- painter.setPen( Qt::NoPen );
- const QPoint newTopLeft( painter.xForm( innerRect.topLeft() ) );
+ if( TQt::NoBrush != _background.style() ) {
+ TQPen oldPen( painter.pen() );
+ TQPoint oldOrig( painter.brushOrigin() );
+ TQBrush oldBrush( painter.brush() );
+ painter.setPen( TQt::NoPen );
+ const TQPoint newTopLeft( painter.xForm( innerRect.topLeft() ) );
painter.setBrushOrigin( newTopLeft.x(), newTopLeft.y() );
painter.setBrush( _background );
painter.drawRect( innerRect.x(), innerRect.y(),
@@ -77,14 +77,14 @@ void KDFrame::paintBackground( QPainter& painter, const QRect& innerRect ) const
}
/* next draw the backPixmap over the brush */
if( ! _backPixmap.isNull() ) {
- QPoint ol = innerRect.topLeft();
+ TQPoint ol = innerRect.topLeft();
if( PixCentered == _backPixmapMode )
{
ol.setX( innerRect.center().x() - _backPixmap.width() / 2 );
ol.setY( innerRect.center().y() - _backPixmap.height()/ 2 );
bitBlt( painter.device(), ol, &_backPixmap );
} else {
- QWMatrix m;
+ TQWMatrix m;
double zW = (double)innerRect.width() / (double)_backPixmap.width();
double zH = (double)innerRect.height() / (double)_backPixmap.height();
switch ( _backPixmapMode ) {
@@ -92,7 +92,7 @@ void KDFrame::paintBackground( QPainter& painter, const QRect& innerRect ) const
break;
case PixScaled: {
double z;
- z = QMIN( zW, zH );
+ z = TQMIN( zW, zH );
m.scale( z, z );
}
break;
@@ -100,7 +100,7 @@ void KDFrame::paintBackground( QPainter& painter, const QRect& innerRect ) const
m.scale( zW, zH );
break;
}
- QPixmap pm = _backPixmap.xForm( m );
+ TQPixmap pm = _backPixmap.xForm( m );
ol.setX( innerRect.center().x() - pm.width() / 2 );
ol.setY( innerRect.center().y() - pm.height()/ 2 );
bitBlt( painter.device(), ol, &pm );
@@ -109,7 +109,7 @@ void KDFrame::paintBackground( QPainter& painter, const QRect& innerRect ) const
}
-void KDFrame::paintEdges( QPainter& painter, const QRect& innerRect ) const
+void KDFrame::paintEdges( TQPainter& painter, const TQRect& innerRect ) const
{
/*
@@ -122,17 +122,17 @@ void KDFrame::paintEdges( QPainter& painter, const QRect& innerRect ) const
KDFrameProfileSection* section;
for ( section = ((KDFrameProfile)_topProfile).last(); section; section = ((KDFrameProfile)_topProfile).prev() ){
- const QPen oldPen = painter.pen();
- const QBrush oldBrush = painter.brush();
- QPen thePen;
+ const TQPen oldPen = painter.pen();
+ const TQBrush oldBrush = painter.brush();
+ TQPen thePen;
thePen = section->pen();
- int penWidth = QMAX(thePen.width(), 1) * QMAX(section->width(), 1);
+ int penWidth = TQMAX(thePen.width(), 1) * TQMAX(section->width(), 1);
//qDebug("paintEdges: thePen.width() = %i", thePen.width());
//qDebug("paintEdges: section->width() = %i", section->width());
//qDebug("paintEdges: penWidth = %i", penWidth);
thePen.setWidth( penWidth );
painter.setPen( thePen );
- painter.setBrush( Qt::NoBrush );
+ painter.setBrush( TQt::NoBrush );
painter.drawRect( innerRect.x()-penWidth,
innerRect.y()-penWidth,
innerRect.width() +2*penWidth,
@@ -144,7 +144,7 @@ void KDFrame::paintEdges( QPainter& painter, const QRect& innerRect ) const
}
-void KDFrame::paintCorners( QPainter& /*painter*/, const QRect& /*innerRect*/ ) const
+void KDFrame::paintCorners( TQPainter& /*painter*/, const TQRect& /*innerRect*/ ) const
{
// At the moment nothing is done here since the setSimpleFrame() function
// does not allow specifying corners: all predefined frames have normal
@@ -153,12 +153,12 @@ void KDFrame::paintCorners( QPainter& /*painter*/, const QRect& /*innerRect*/ )
}
-void KDFrame::paint( QPainter* painter,
+void KDFrame::paint( TQPainter* painter,
KDFramePaintSteps steps,
- QRect innerRect ) const
+ TQRect innerRect ) const
{
if( painter ) {
- const QRect& rect = innerRect.isValid() ? innerRect : _innerRect;
+ const TQRect& rect = innerRect.isValid() ? innerRect : _innerRect;
switch( steps ) {
case PaintBackground:
paintBackground( *painter, rect );
@@ -199,7 +199,7 @@ void KDFrame::clearProfile( ProfileName name )
void KDFrame::addProfileSection( ProfileName name,
int wid,
- QPen pen,
+ TQPen pen,
KDFrameProfileSection::Direction dir,
KDFrameProfileSection::Curvature curv )
{
@@ -248,9 +248,9 @@ const KDFrameProfile& KDFrame::profile( ProfileName name ) const
void KDFrame::setSimpleFrame( SimpleFrame frame,
int lineWidth,
int midLineWidth,
- QPen pen,
- QBrush background,
- const QPixmap* backPixmap,
+ TQPen pen,
+ TQBrush background,
+ const TQPixmap* backPixmap,
BackPixmapMode backPixmapMode )
{
_profileSections.clear();
@@ -259,7 +259,7 @@ void KDFrame::setSimpleFrame( SimpleFrame frame,
_bottomProfile.clear();
_leftProfile.clear();
_background = background;
- _backPixmap = backPixmap ? *backPixmap : QPixmap();
+ _backPixmap = backPixmap ? *backPixmap : TQPixmap();
_backPixmapMode = backPixmapMode;
if( FrameFlat == frame ) {
//qDebug("_profileSections.count() before = %i", _profileSections.count());
@@ -284,7 +284,7 @@ void KDFrame::setSimpleFrame( SimpleFrame frame,
int line3 = line2;
int gap2 = line2 * 4;
int gap1 = lineWidth - line1 - line2 - line3 - gap2;
- QPen noP( Qt::NoPen );
+ TQPen noP( TQt::NoPen );
KDFrameProfileSection* newsection;
newsection = new KDFrameProfileSection( KDFrameProfileSection::DirPlain,
KDFrameProfileSection::CvtPlain,
@@ -404,12 +404,12 @@ void KDFrame::setSimpleFrame( SimpleFrame frame,
}
-void KDFrame::createFrameNode( QDomDocument& document, QDomNode& parent,
- const QString& elementName,
+void KDFrame::createFrameNode( TQDomDocument& document, TQDomNode& tqparent,
+ const TQString& elementName,
const KDFrame& frame )
{
- QDomElement frameElement = document.createElement( elementName );
- parent.appendChild( frameElement );
+ TQDomElement frameElement = document.createElement( elementName );
+ tqparent.appendChild( frameElement );
KDXML::createIntNode( document, frameElement, "ShadowWidth",
frame._shadowWidth );
KDXML::createStringNode( document, frameElement, "CornerName",
@@ -442,12 +442,12 @@ void KDFrame::createFrameNode( QDomDocument& document, QDomNode& parent,
frame._cornerBR );
}
-void KDFrame::createFrameProfileNode( QDomDocument& document, QDomNode& parent,
- const QString& elementName,
+void KDFrame::createFrameProfileNode( TQDomDocument& document, TQDomNode& tqparent,
+ const TQString& elementName,
KDFrameProfile profile )
{
- QDomElement profileElement = document.createElement( elementName );
- parent.appendChild( profileElement );
+ TQDomElement profileElement = document.createElement( elementName );
+ tqparent.appendChild( profileElement );
for( const KDFrameProfileSection* section = profile.first(); section != 0;
section = profile.next() )
KDFrameProfileSection::createFrameProfileSectionNode( document,
@@ -457,13 +457,13 @@ void KDFrame::createFrameProfileNode( QDomDocument& document, QDomNode& parent,
}
-void KDFrame::KDFrameCorner::createFrameCornerNode( QDomDocument& document,
- QDomNode& parent,
- const QString& elementName,
+void KDFrame::KDFrameCorner::createFrameCornerNode( TQDomDocument& document,
+ TQDomNode& tqparent,
+ const TQString& elementName,
const KDFrameCorner& corner )
{
- QDomElement cornerElement = document.createElement( elementName );
- parent.appendChild( cornerElement );
+ TQDomElement cornerElement = document.createElement( elementName );
+ tqparent.appendChild( cornerElement );
KDXML::createStringNode( document, cornerElement, "Style",
KDFrame::cornerStyleToString( corner._style ) );
KDXML::createIntNode( document, cornerElement, "Width",
@@ -472,27 +472,27 @@ void KDFrame::KDFrameCorner::createFrameCornerNode( QDomDocument& document,
corner._profile );
}
-bool KDFrame::readFrameNode( const QDomElement& element, KDFrame& frame )
+bool KDFrame::readFrameNode( const TQDomElement& element, KDFrame& frame )
{
bool ok = true;
int tempShadowWidth;
CornerName tempCornerName=CornerTopLeft;
- QBrush tempBackground;
- QPixmap tempBackPixmap;
+ TQBrush tempBackground;
+ TQPixmap tempBackPixmap;
BackPixmapMode tempBackPixmapMode=PixStretched;
- QRect tempInnerRect;
+ TQRect tempInnerRect;
KDFrameProfile tempTopProfile, tempRightProfile,
tempBottomProfile, tempLeftProfile;
KDFrameCorner tempCornerTL, tempCornerTR, tempCornerBL, tempCornerBR;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "ShadowWidth" ) {
ok = ok & KDXML::readIntNode( element, tempShadowWidth );
} else if( tagName == "CornerName" ) {
- QString value;
+ TQString value;
ok = ok & KDXML::readStringNode( element, value );
tempCornerName = stringToCornerName( value );
} else if( tagName == "Background" ) {
@@ -500,7 +500,7 @@ bool KDFrame::readFrameNode( const QDomElement& element, KDFrame& frame )
} else if( tagName == "BackPixmap" ) {
ok = ok & KDXML::readPixmapNode( element, tempBackPixmap );
} else if( tagName == "BackPixmapMode" ) {
- QString value;
+ TQString value;
ok = ok & KDXML::readStringNode( element, value );
tempBackPixmapMode = stringToBackPixmapMode( value );
} else if( tagName == "InnerRect" ) {
@@ -553,14 +553,14 @@ bool KDFrame::readFrameNode( const QDomElement& element, KDFrame& frame )
}
-bool KDFrame::readFrameProfileNode( const QDomElement& element,
+bool KDFrame::readFrameProfileNode( const TQDomElement& element,
KDFrameProfile& profile )
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "ProfileSection" ) {
KDFrameProfileSection* section = new KDFrameProfileSection();
KDFrameProfileSection::readFrameProfileSectionNode( element,
@@ -578,20 +578,20 @@ bool KDFrame::readFrameProfileNode( const QDomElement& element,
}
-bool KDFrame::KDFrameCorner::readFrameCornerNode( const QDomElement& element,
+bool KDFrame::KDFrameCorner::readFrameCornerNode( const TQDomElement& element,
KDFrameCorner& corner )
{
bool ok = true;
CornerStyle tempStyle=CornerNormal;
int tempWidth;
KDFrameProfile tempProfile;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Style" ) {
- QString value;
+ TQString value;
ok = ok & KDXML::readStringNode( element, value );
tempStyle = stringToCornerStyle( value );
} else if( tagName == "Width" ) {
diff --git a/libkdchart/KDFrame.h b/libkdchart/KDFrame.h
index bbc4915..be31597 100644
--- a/libkdchart/KDFrame.h
+++ b/libkdchart/KDFrame.h
@@ -29,15 +29,15 @@
#ifndef __KDFRAME_H__
#define __KDFRAME_H__
-#include <qapplication.h>
-#include <qfont.h>
-#include <qcolor.h>
-#include <qpixmap.h>
-#include <qpen.h>
-#include <qmap.h>
-#include <qobject.h>
-#include <qtextstream.h>
-#include <qdom.h>
+#include <tqapplication.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqpixmap.h>
+#include <tqpen.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
#include <KDFrameProfileSection.h>
@@ -84,9 +84,10 @@
To learn how to specify your frame profiles have a look at example code given with setProfile()
\endif
*/
-class KDCHART_EXPORT KDFrame : public QObject
+class KDCHART_EXPORT KDFrame : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS( BackPixmapMode )
Q_ENUMS( SimpleFrame )
Q_ENUMS( ProfileName )
@@ -116,7 +117,7 @@ public slots:
\param type the background pixmap mode to convert
\return the string representation of the background pixmap mode enum
*/
- static QString backPixmapModeToString( BackPixmapMode type ) {
+ static TQString backPixmapModeToString( BackPixmapMode type ) {
switch( type ) {
case PixCentered:
return "Centered";
@@ -136,7 +137,7 @@ public slots:
\param string the string to convert
\return the background pixmap mode enum value
*/
- static BackPixmapMode stringToBackPixmapMode( const QString& string ) {
+ static BackPixmapMode stringToBackPixmapMode( const TQString& string ) {
if( string == "Centered" )
return PixCentered;
else if( string == "Scaled" )
@@ -206,7 +207,7 @@ public slots:
\param midLineWidth only used for frames with 3-line edges: the width
of the middle line.
\param pen the basic pen to be used for this frame's lines
- \param background the brush to be used for the frame's background or QBrush() if the background is not to be filled by a brush
+ \param background the brush to be used for the frame's background or TQBrush() if the background is not to be filled by a brush
\param backPixmap if not zero points to a pixmap to be used for the background
\param backPixmapMode determines how the size pixmap is adjusted to the frame size,
see \c BackPixmapMode for the possible values.
@@ -217,9 +218,9 @@ public slots:
void setSimpleFrame( SimpleFrame frame,
int lineWidth,
int midLineWidth,
- QPen pen,
- QBrush background = QBrush(),
- const QPixmap* backPixmap = 0,
+ TQPen pen,
+ TQBrush background = TQBrush(),
+ const TQPixmap* backPixmap = 0,
BackPixmapMode backPixmapMode = PixStretched );
public:
@@ -266,7 +267,7 @@ public slots:
\note The sections will be drawn in the order in which they were added to the profile
beginning at the outside and ending with the inner section of the frame.
- Adding a gap between two sections can be done by specifying a <b>QPen( Qt::NoPen )</b>.
+ Adding a gap between two sections can be done by specifying a <b>TQPen( TQt::NoPen )</b>.
See setProfile for a short example using this method.
@@ -275,7 +276,7 @@ public slots:
*/
void addProfileSection( ProfileName name,
int wid,
- QPen pen,
+ TQPen pen,
KDFrameProfileSection::Direction dir = KDFrameProfileSection::DirPlain, // PENDING(blackie) possible enum problem
KDFrameProfileSection::Curvature curv = KDFrameProfileSection::CvtPlain );
@@ -293,17 +294,17 @@ public slots:
KDFrame myFrame( 50,20, 250,120 );
// select a very simple rectangular frame with normal corners, black border, white background
- myFrame.setSimpleFrame( KDFrame::FrameFlat, 1, 0, QPen( Qt::Black ), QBrush( Qt::White ) );
+ myFrame.setSimpleFrame( KDFrame::FrameFlat, 1, 0, TQPen( TQt::Black ), TQBrush( TQt::White ) );
// make the top profile look more nice
myFrame.clearProfile( KDFrame::ProfileTop );
- myFrame.addProfileSection( KDFrame::ProfileTop, 2, QPen( Qt::Black ),
+ myFrame.addProfileSection( KDFrame::ProfileTop, 2, TQPen( TQt::Black ),
KDFrameProfileSection::DirPlain,
KDFrameProfileSection::CvtPlain );
- myFrame.addProfileSection( KDFrame::ProfileTop, 5, QPen( Qt::NoPen ),
+ myFrame.addProfileSection( KDFrame::ProfileTop, 5, TQPen( TQt::NoPen ),
KDFrameProfileSection::DirPlain,
KDFrameProfileSection::CvtPlain );
- myFrame.addProfileSection( KDFrame::ProfileTop, 1, QPen( Qt::Black ),
+ myFrame.addProfileSection( KDFrame::ProfileTop, 1, TQPen( TQt::Black ),
KDFrameProfileSection::DirPlain,
KDFrameProfileSection::CvtPlain );
@@ -362,7 +363,7 @@ public slots:
\return the string representation of the corner name enum
\endif
*/
- static QString cornerNameToString( CornerName type ) {
+ static TQString cornerNameToString( CornerName type ) {
switch( type ) {
case CornerTopLeft:
return "TopLeft";
@@ -390,7 +391,7 @@ public slots:
\return the corner name enum value
\endif
*/
- static CornerName stringToCornerName( const QString& string ) {
+ static CornerName stringToCornerName( const TQString& string ) {
if( string == "TopLeft" )
return CornerTopLeft;
else if( string == "TopRight" )
@@ -436,7 +437,7 @@ public slots:
\return the string representation of the corner style enum
\endif
*/
- static QString cornerStyleToString( CornerStyle type ) {
+ static TQString cornerStyleToString( CornerStyle type ) {
switch( type ) {
case CornerNormal:
return "Normal";
@@ -460,7 +461,7 @@ public slots:
\return the corner style enum value
\endif
*/
- static CornerStyle stringToCornerStyle( const QString& string ) {
+ static CornerStyle stringToCornerStyle( const TQString& string ) {
if( string == "Normal" )
return CornerNormal;
else if( string == "Round" )
@@ -474,7 +475,7 @@ public slots:
public:
-// MOC_SKIP_BEGIN
+// TQMOC_SKIP_BEGIN
/**
\ifnot v200
\deprecated Feature scheduled for future release, at present not implemented.
@@ -515,14 +516,14 @@ public:
in a DOM document.
\param document the DOM document to which the node will belong
- \param parent the parent node to which the new node will be appended
+ \param tqparent the tqparent node to which the new node will be appended
\param elementName the name of the new node
\param corner the corner to be represented
\endif
*/
- static void createFrameCornerNode( QDomDocument& document,
- QDomNode& parent,
- const QString& elementName,
+ static void createFrameCornerNode( TQDomDocument& document,
+ TQDomNode& tqparent,
+ const TQString& elementName,
const KDFrameCorner& corner );
/**
@@ -536,7 +537,7 @@ public:
\param corner the frame corner object to read the data into
\endif
*/
- static bool readFrameCornerNode( const QDomElement& element,
+ static bool readFrameCornerNode( const TQDomElement& element,
KDFrameCorner& corner );
protected:
@@ -569,7 +570,7 @@ public:
KDFrameProfile _profile;
};
-// MOC_SKIP_END
+// TQMOC_SKIP_END
public slots:
/**
@@ -718,7 +719,7 @@ public slots:
/**
Specifies the brush to be used to fill the inner area of this frame,
calling this methode without passing in a parameter re-sets the background brush
- to \c QBrush( \cQt::NoBrush \c).
+ to \c TQBrush( \cTQt::NoBrush \c).
\Note To have a 'tiled' background image just use a brush
holding this pixmap - for other ways to show background
@@ -726,7 +727,7 @@ public slots:
\sa setBackPixmap, background
*/
- void setBackground( QBrush background = QBrush( Qt::NoBrush ) )
+ void setBackground( TQBrush background = TQBrush( TQt::NoBrush ) )
{
_background = background;
}
@@ -740,16 +741,16 @@ public slots:
\sa setBackground, background
*/
- void setBackPixmap( const QPixmap* backPixmap = 0,
+ void setBackPixmap( const TQPixmap* backPixmap = 0,
BackPixmapMode backPixmapMode = PixStretched )
{
- _backPixmap = backPixmap ? *backPixmap : QPixmap();
+ _backPixmap = backPixmap ? *backPixmap : TQPixmap();
_backPixmapMode = backPixmapMode;
}
/**
Returns the brush that is used to fill the inner area of this frame,
- or a QBrush( \cNoBrush \c) if no background is to be drawn.
+ or a TQBrush( \cNoBrush \c) if no background is to be drawn.
\param backPixmap receives the pixmap used for drawing the background or
a null pixmap, test this by calling backPixmap.isNull()
@@ -759,7 +760,7 @@ public slots:
\sa setBackground, setBackPixmap
*/
- const QBrush& background( const QPixmap*& backPixmap,
+ const TQBrush& background( const TQPixmap*& backPixmap,
BackPixmapMode& backPixmapMode ) const
{
backPixmap = &_backPixmap;
@@ -778,7 +779,7 @@ public slots:
\sa innerRect, setCorners, setSimpleFrame, setProfile
*/
- void setInnerRect( QRect innerRect )
+ void setInnerRect( TQRect innerRect )
{
_innerRect = innerRect;
}
@@ -793,7 +794,7 @@ public slots:
\sa setInnerRect, setProfile
*/
- QRect innerRect() const
+ TQRect innerRect() const
{
return _innerRect;
}
@@ -806,7 +807,7 @@ public slots:
call this methode since it is called internally by paint() if you
start it with \c PaintBackground (or with \c PaintAll, resp.) for the \c steps parameter.
*/
- virtual void paintBackground( QPainter& painter, const QRect& innerRect ) const;
+ virtual void paintBackground( TQPainter& painter, const TQRect& innerRect ) const;
/**
Paint methode drawing the edges (if any) of the frame.
@@ -814,7 +815,7 @@ public slots:
call this methode since it is called internally by paint() if you
start it with \c PaintEdges (or with \c PaintAll, \c PaintBorder, resp.) for the \c steps parameter.
*/
- virtual void paintEdges( QPainter& painter, const QRect& innerRect ) const;
+ virtual void paintEdges( TQPainter& painter, const TQRect& innerRect ) const;
/**
Paint methode drawing the corners (if any) of the frame.
@@ -822,7 +823,7 @@ public slots:
call this methode since it is called internally by paint() if you
start it with \c PaintCorners (or with \c PaintAll, \c PaintBorder, resp.) for the \c steps parameter.
*/
- virtual void paintCorners( QPainter& painter, const QRect& innerRect ) const;
+ virtual void paintCorners( TQPainter& painter, const TQRect& innerRect ) const;
public:
@@ -856,7 +857,7 @@ public slots:
immediately followed by <b>paint( painter, PaintEdges );</b> then do all your
inside work and finally draw <b>paint( painter, PaintCorners );</b>.
- \param painter The QPainter to be used for drawing.
+ \param painter The TQPainter to be used for drawing.
\param steps The part of the frame to be drawn, use KDFrame::PaintAll to draw the entire frame and the background,
use KDFrame::PaintBackground to draw only the background, use KDFrame::PaintEdges to draw just the edges,
use KDFrame::PaintCorners to draw only the corners.
@@ -867,9 +868,9 @@ public slots:
its paint() methode several time - giving it the appropriate innerRect for each frame. This would result in
less memory usage since you could use that single KDFrame object as kind of a shared ressource.
*/
- virtual void paint( QPainter* painter,
+ virtual void paint( TQPainter* painter,
KDFramePaintSteps steps = PaintAll,
- QRect innerRect = QRect(0,0,0,0) ) const;
+ TQRect innerRect = TQRect(0,0,0,0) ) const;
/**
@@ -877,12 +878,12 @@ public slots:
*/
void clearAll()
{
- _background = QBrush();
- _backPixmap = QPixmap();
+ _background = TQBrush();
+ _backPixmap = TQPixmap();
_backPixmapMode = PixStretched;
_shadowWidth = 0;
_sunPos = CornerTopLeft;
- _innerRect = QRect( 0,0, 0,0 );
+ _innerRect = TQRect( 0,0, 0,0 );
_topProfile.clear();
_rightProfile.clear();
_bottomProfile.clear();
@@ -898,7 +899,7 @@ public:
/**
Default Constructor. Defines default values.
- The constructor does *not* have a \c parent parameter since drawing
+ The constructor does *not* have a \c tqparent parameter since drawing
of the frame is not done transparently but by (one or more) explicit
calls of the frames paint() methode. See explanation given there
to learn about the why and how of this...
@@ -913,13 +914,13 @@ public:
\sa rect, setInnerRect, setProfile
*/
- KDFrame( QRect innerRect = QRect(0,0,0,0),
+ KDFrame( TQRect innerRect = TQRect(0,0,0,0),
SimpleFrame frame = FrameFlat,
int lineWidth = 1,
int midLineWidth = 0,
- QPen pen = QPen(), // solid black line with 0 width
- QBrush background = QBrush(), // no brush
- const QPixmap* backPixmap = 0, // no pixmap
+ TQPen pen = TQPen(), // solid black line with 0 width
+ TQBrush background = TQBrush(), // no brush
+ const TQPixmap* backPixmap = 0, // no pixmap
BackPixmapMode backPixmapMode = PixStretched,
int shadowWidth = 0,
CornerName sunPos = CornerTopLeft )
@@ -941,7 +942,7 @@ public:
/*
Constructor. Set up a frame by copying settings of another frame.
- The constructor does *not* have a \c parent parameter since drawing
+ The constructor does *not* have a \c tqparent parameter since drawing
of the frame is not done transparently but by (one or more) explicit
calls of the frames paint() methode. See explanation given there
to learn about the why and how of this...
@@ -953,7 +954,7 @@ public:
\sa rect, setInnerRect, setProfile
- KDFrame( QRect innerRect,
+ KDFrame( TQRect innerRect,
const KDFrame& R,
CornerName sunPos = CornerUNKNOWN )
{
@@ -967,7 +968,7 @@ public:
}
*/
private:
- KDFrame( const KDFrame& ) : QObject(0) {}
+ KDFrame( const KDFrame& ) : TQObject(0) {}
KDFrame& operator=( const KDFrame& ){return *this;}
@@ -1002,20 +1003,20 @@ public:
R.setProfileSectionsAutoDelete( false );
}
- friend QTextStream& operator<<( QTextStream& s, const KDFrame& p );
- friend QTextStream& operator>>( QTextStream& s, KDFrame& p );
+ friend TQTextStream& operator<<( TQTextStream& s, const KDFrame& p );
+ friend TQTextStream& operator>>( TQTextStream& s, KDFrame& p );
/**
Creates a DOM element node that represents a frame for use
in a DOM document.
\param document the DOM document to which the node will belong
- \param parent the parent node to which the new node will be appended
+ \param tqparent the tqparent node to which the new node will be appended
\param elementName the name of the new node
\param frame the frame to be represented
*/
- static void createFrameNode( QDomDocument& document, QDomNode& parent,
- const QString& elementName,
+ static void createFrameNode( TQDomDocument& document, TQDomNode& tqparent,
+ const TQString& elementName,
const KDFrame& frame );
/**
@@ -1023,13 +1024,13 @@ public:
in a DOM document.
\param document the DOM document to which the node will belong
- \param parent the parent node to which the new node will be appended
+ \param tqparent the tqparent node to which the new node will be appended
\param elementName the name of the new node
\param profile the profile to be represented
*/
- static void createFrameProfileNode( QDomDocument& document,
- QDomNode& parent,
- const QString& elementName,
+ static void createFrameProfileNode( TQDomDocument& document,
+ TQDomNode& tqparent,
+ const TQString& elementName,
KDFrameProfile profile );
/**
@@ -1039,7 +1040,7 @@ public:
\param element the DOM element to read from
\param frame the frame object to read the data into
*/
- static bool readFrameNode( const QDomElement& element,
+ static bool readFrameNode( const TQDomElement& element,
KDFrame& frame );
/**
@@ -1049,7 +1050,7 @@ public:
\param element the DOM element to read from
\param profile the frame profile object to read the data into
*/
- static bool readFrameProfileNode( const QDomElement& element,
+ static bool readFrameProfileNode( const TQDomElement& element,
KDFrameProfile& profile );
signals:
@@ -1077,12 +1078,12 @@ private:
/**
Stores the brush to be used to fill the inner area.
*/
- QBrush _background;
+ TQBrush _background;
/**
Stores the pixmap to be painted into the inner area.
*/
- QPixmap _backPixmap;
+ TQPixmap _backPixmap;
/**
Stores the way how to display the pixmap that is
@@ -1093,7 +1094,7 @@ private:
/**
Stores the position and size of the frame.
*/
- QRect _innerRect;
+ TQRect _innerRect;
/**
Stores all currently used profile settings for a controlled deletion.
@@ -1150,7 +1151,7 @@ private:
\param p the KDFrame object to write
\return the text stream after the write operation
*/
-QTextStream& operator<<( QTextStream& s, const KDFrame& p );
+TQTextStream& operator<<( TQTextStream& s, const KDFrame& p );
/**
@@ -1161,7 +1162,7 @@ QTextStream& operator<<( QTextStream& s, const KDFrame& p );
\param p the KDFrame object to read into
\return the text stream after the read operation
*/
-QTextStream& operator>>( QTextStream& s, KDFrame& p );
+TQTextStream& operator>>( TQTextStream& s, KDFrame& p );
#endif
diff --git a/libkdchart/KDFrameProfileSection.cpp b/libkdchart/KDFrameProfileSection.cpp
index bfd64ff..924e864 100644
--- a/libkdchart/KDFrameProfileSection.cpp
+++ b/libkdchart/KDFrameProfileSection.cpp
@@ -35,14 +35,14 @@ KDFrameProfileSection::~KDFrameProfileSection()
}
-void KDFrameProfileSection::createFrameProfileSectionNode( QDomDocument& document,
- QDomNode& parent,
- const QString& elementName,
+void KDFrameProfileSection::createFrameProfileSectionNode( TQDomDocument& document,
+ TQDomNode& tqparent,
+ const TQString& elementName,
const KDFrameProfileSection* section )
{
- QDomElement sectionElement = document.createElement( elementName );
- parent.appendChild( sectionElement );
+ TQDomElement sectionElement = document.createElement( elementName );
+ tqparent.appendChild( sectionElement );
KDXML::createStringNode( document, sectionElement, "Direction",
KDFrameProfileSection::directionToString( section->_direction ) );
KDXML::createStringNode( document, sectionElement, "Curvature",
@@ -52,25 +52,25 @@ void KDFrameProfileSection::createFrameProfileSectionNode( QDomDocument& documen
}
-bool KDFrameProfileSection::readFrameProfileSectionNode( const QDomElement& element,
+bool KDFrameProfileSection::readFrameProfileSectionNode( const TQDomElement& element,
KDFrameProfileSection* section )
{
bool ok = true;
Direction tempDirection = DirPlain;
Curvature tempCurvature = CvtPlain;
int tempWidth;
- QPen tempPen;
- QDomNode node = element.firstChild();
+ TQPen tempPen;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Direction" ) {
- QString value;
+ TQString value;
ok = ok & KDXML::readStringNode( element, value );
tempDirection = stringToDirection( value );
} else if( tagName == "Curvature" ) {
- QString value;
+ TQString value;
ok = ok & KDXML::readStringNode( element, value );
tempCurvature = stringToCurvature( value );
} else if( tagName == "Width" ) {
diff --git a/libkdchart/KDFrameProfileSection.h b/libkdchart/KDFrameProfileSection.h
index f1b4ac8..8ca011e 100644
--- a/libkdchart/KDFrameProfileSection.h
+++ b/libkdchart/KDFrameProfileSection.h
@@ -29,9 +29,9 @@
#ifndef __KDFRAMEPROFILESECTION__
#define __KDFRAMEPROFILESECTION__
-#include <qregion.h>
-#include <qpen.h>
-#include <qdom.h>
+#include <tqregion.h>
+#include <tqpen.h>
+#include <tqdom.h>
#include "KDChartGlobal.h"
@@ -51,7 +51,7 @@ public:
\Note Since a frame border may consist of several parts you must specify the
direction mode for each of these parts. This is quite different from the
- QFrame::Shadow / QFrame::Shape schema where you would select a predefined
+ TQFrame::Shadow / TQFrame::Shape schema where you would select a predefined
profile. KDFrame lets you specify both the number of sections used
to compose frame border's profile and the look of each individual
section by calling \c addProfileSection() multiple times.
@@ -70,7 +70,7 @@ public:
\param dir the direction enum to convert
\return the string representation of the direction enum
*/
- static QString directionToString( Direction dir ) {
+ static TQString directionToString( Direction dir ) {
switch( dir ) {
case DirPlain:
return "Plain";
@@ -90,7 +90,7 @@ public:
\param string the string to convert
\return the direction enum value
*/
- static Direction stringToDirection( const QString& string ) {
+ static Direction stringToDirection( const TQString& string ) {
if( string == "Plain" )
return DirPlain;
else if( string == "Raising" )
@@ -104,7 +104,7 @@ public:
/**
- Profile Curvature Mode: specifying the shape of a frame profile section.
+ Profile Curvature Mode: specifying the tqshape of a frame profile section.
(curvature setting will be ignored for \c DirPlain profiles)
\li \c CvtFlat looking like a evenly sloping surface.
@@ -119,7 +119,7 @@ public:
\param curv the curvature enum to convert
\return the string representation of the curvature enum
*/
- static QString curvatureToString( Curvature curv ) {
+ static TQString curvatureToString( Curvature curv ) {
switch( curv ) {
case CvtPlain:
return "Plain";
@@ -139,7 +139,7 @@ public:
\param string the string to convert
\return the curvature enum value
*/
- static Curvature stringToCurvature( const QString& string ) {
+ static Curvature stringToCurvature( const TQString& string ) {
if( string == "Plain" )
return CvtPlain;
else if( string == "Convex" )
@@ -160,7 +160,7 @@ public:
KDFrameProfileSection( Direction direction,
Curvature curvature,
int width,
- QPen pen )
+ TQPen pen )
: _direction( direction ),
_curvature( curvature ),
_width( width ),
@@ -176,7 +176,7 @@ public:
_direction = DirPlain;
_curvature = CvtPlain;
_width = 1;
- _pen = QPen( Qt::SolidLine );
+ _pen = TQPen( TQt::SolidLine );
}
/**
@@ -189,13 +189,13 @@ public:
section for use in a DOM document.
\param document the DOM document to which the node will belong
- \param parent the parent node to which the new node will be appended
+ \param tqparent the tqparent node to which the new node will be appended
\param elementName the name of the new node
\param section the section to be represented
*/
- static void createFrameProfileSectionNode( QDomDocument& document,
- QDomNode& parent,
- const QString& elementName,
+ static void createFrameProfileSectionNode( TQDomDocument& document,
+ TQDomNode& tqparent,
+ const TQString& elementName,
const KDFrameProfileSection* section );
/**
@@ -207,19 +207,19 @@ public:
\param section a pointer to the frame profile section object to
read the data into
*/
- static bool readFrameProfileSectionNode( const QDomElement& element,
+ static bool readFrameProfileSectionNode( const TQDomElement& element,
KDFrameProfileSection* section );
Direction direction() const { return _direction; }
Curvature curvature() const { return _curvature; }
int width() const { return _width; }
- QPen pen() const { return _pen; }
+ TQPen pen() const { return _pen; }
private:
Direction _direction;
Curvature _curvature;
int _width;
- QPen _pen;
+ TQPen _pen;
};
/**
@@ -227,6 +227,6 @@ private:
\sa setProfile, profile
*/
-typedef QPtrList < KDFrameProfileSection > KDFrameProfile;
+typedef TQPtrList < KDFrameProfileSection > KDFrameProfile;
#endif
diff --git a/libkdchart/KDXMLTools.cpp b/libkdchart/KDXMLTools.cpp
index a78c163..bff4c72 100644
--- a/libkdchart/KDXMLTools.cpp
+++ b/libkdchart/KDXMLTools.cpp
@@ -27,118 +27,118 @@
**
**********************************************************************/
#include "KDXMLTools.h"
-#include <qbuffer.h>
-#include <qimage.h>
+#include <tqbuffer.h>
+#include <tqimage.h>
#include <zlib.h>
namespace KDXML {
- void createBoolNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, bool value )
+ void createBoolNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, bool value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
- parent.appendChild( newElement );
- QDomText elementContent =
+ tqparent.appendChild( newElement );
+ TQDomText elementContent =
doc.createTextNode( value ? "true" : "false" );
newElement.appendChild( elementContent );
}
- void createOrientationNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, Qt::Orientation value )
+ void createOrientationNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, Qt::Orientation value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
- parent.appendChild( newElement );
- QDomText elementContent =
+ tqparent.appendChild( newElement );
+ TQDomText elementContent =
doc.createTextNode( (Qt::Vertical == value) ? "vertical" : "horizontal" );
newElement.appendChild( elementContent );
}
- void createSizeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QSize& value )
+ void createSizeNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQSize& value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
- parent.appendChild( newElement );
+ tqparent.appendChild( newElement );
newElement.setAttribute( "Width", value.width() );
newElement.setAttribute( "Height", value.height() );
}
- void createIntNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, int value )
+ void createIntNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, int value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
- parent.appendChild( newElement );
- QDomText elementContent =
- doc.createTextNode( QString::number( value ) );
+ tqparent.appendChild( newElement );
+ TQDomText elementContent =
+ doc.createTextNode( TQString::number( value ) );
newElement.appendChild( elementContent );
}
- void createDoubleNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, double value )
+ void createDoubleNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, double value )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
- parent.appendChild( newElement );
- QDomText elementContent =
- doc.createTextNode( QString::number( value ) );
+ tqparent.appendChild( newElement );
+ TQDomText elementContent =
+ doc.createTextNode( TQString::number( value ) );
newElement.appendChild( elementContent );
}
- void createStringNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QString& text )
+ void createStringNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQString& text )
{
- QDomElement newElement =
+ TQDomElement newElement =
doc.createElement( elementName );
- parent.appendChild( newElement );
- QDomText elementContent =
+ tqparent.appendChild( newElement );
+ TQDomText elementContent =
doc.createTextNode( text );
newElement.appendChild( elementContent );
}
- void createColorNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QColor& color )
+ void createColorNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQColor& color )
{
- QDomElement colorElement = doc.createElement( elementName );
- parent.appendChild( colorElement );
+ TQDomElement colorElement = doc.createElement( elementName );
+ tqparent.appendChild( colorElement );
colorElement.setAttribute( "Red",
- QString::number( color.red() ) );
+ TQString::number( color.red() ) );
colorElement.setAttribute( "Green",
- QString::number( color.green() ) );
+ TQString::number( color.green() ) );
colorElement.setAttribute( "Blue",
- QString::number( color.blue() ) );
+ TQString::number( color.blue() ) );
}
- void createBrushNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QBrush& brush )
+ void createBrushNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQBrush& brush )
{
- QDomElement brushElement = doc.createElement( elementName );
- parent.appendChild( brushElement );
+ TQDomElement brushElement = doc.createElement( elementName );
+ tqparent.appendChild( brushElement );
createColorNode( doc, brushElement, "Color", brush.color() );
createStringNode( doc, brushElement, "Style",
KDXML::brushStyleToString( brush.style() ) );
- if( brush.style() == Qt::CustomPattern && brush.pixmap() )
+ if( brush.style() == TQt::CustomPattern && brush.pixmap() )
createPixmapNode( doc, brushElement, "Pixmap", *brush.pixmap() );
}
- void createPixmapNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPixmap& pixmap )
+ void createPixmapNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQPixmap& pixmap )
{
- QDomElement pixmapElement = doc.createElement( elementName );
- parent.appendChild( pixmapElement );
+ TQDomElement pixmapElement = doc.createElement( elementName );
+ tqparent.appendChild( pixmapElement );
createStringNode( doc, pixmapElement, "Format", "XPM.GZ" );
if( pixmap.isNull() ){
@@ -147,19 +147,19 @@ namespace KDXML {
}else{
// Convert the pixmap to an image, save that image to an in-memory
// XPM representation and compress this representation. This
- // conforms to the file format Qt Designer uses.
- QByteArray ba;
- QBuffer buffer( ba );
+ // conforms to the file format TQt Designer uses.
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
- QImageIO imgio( &buffer, "XPM" );
- QImage image = pixmap.convertToImage();
+ TQImageIO imgio( &buffer, "XPM" );
+ TQImage image = pixmap.convertToImage();
imgio.setImage( image );
imgio.write();
buffer.close();
ulong len = ba.size() * 2;
- QByteArray bazip( len );
+ TQByteArray bazip( len );
::compress( (uchar*) bazip.data(), &len, (uchar*) ba.data(), ba.size() );
- QString dataString;
+ TQString dataString;
static const char hexchars[] = "0123456789abcdef";
for ( int i = 0; i < (int)len; ++i ) {
uchar c = (uchar) bazip[i];
@@ -172,126 +172,126 @@ namespace KDXML {
}
- void createRectNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QRect& rect )
+ void createRectNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQRect& rect )
{
- QDomElement rectElement = doc.createElement( elementName );
- parent.appendChild( rectElement );
- QDomElement xElement = doc.createElement( "X" );
+ TQDomElement rectElement = doc.createElement( elementName );
+ tqparent.appendChild( rectElement );
+ TQDomElement xElement = doc.createElement( "X" );
rectElement.appendChild( xElement );
- QDomText xContent = doc.createTextNode( QString::number( rect.x() ) );
+ TQDomText xContent = doc.createTextNode( TQString::number( rect.x() ) );
xElement.appendChild( xContent );
- QDomElement yElement = doc.createElement( "Y" );
+ TQDomElement yElement = doc.createElement( "Y" );
rectElement.appendChild( yElement );
- QDomText yContent = doc.createTextNode( QString::number( rect.y() ) );
+ TQDomText yContent = doc.createTextNode( TQString::number( rect.y() ) );
yElement.appendChild( yContent );
- QDomElement widthElement = doc.createElement( "Width" );
+ TQDomElement widthElement = doc.createElement( "Width" );
rectElement.appendChild( widthElement );
- QDomText widthContent = doc.createTextNode( QString::number( rect.width() ) );
+ TQDomText widthContent = doc.createTextNode( TQString::number( rect.width() ) );
widthElement.appendChild( widthContent );
- QDomElement heightElement = doc.createElement( "Height" );
+ TQDomElement heightElement = doc.createElement( "Height" );
rectElement.appendChild( heightElement );
- QDomText heightContent = doc.createTextNode( QString::number( rect.height() ) );
+ TQDomText heightContent = doc.createTextNode( TQString::number( rect.height() ) );
heightElement.appendChild( heightContent );
}
- void createStringListNodes( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QStringList* list )
+ void createStringListNodes( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQStringList* list )
{
if( !list )
return;
- for( QStringList::ConstIterator it = list->begin();
+ for( TQStringList::ConstIterator it = list->begin();
it != list->end(); ++it ) {
- QDomElement element = doc.createElement( elementName );
- parent.appendChild( element );
- QDomText elementContent = doc.createTextNode( *it );
+ TQDomElement element = doc.createElement( elementName );
+ tqparent.appendChild( element );
+ TQDomText elementContent = doc.createTextNode( *it );
element.appendChild( elementContent );
}
}
- void createFontNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QFont& font )
+ void createFontNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQFont& font )
{
- QDomElement fontElement = doc.createElement( elementName );
- parent.appendChild( fontElement );
+ TQDomElement fontElement = doc.createElement( elementName );
+ tqparent.appendChild( fontElement );
createStringNode( doc, fontElement, "Family", font.family() );
createIntNode( doc, fontElement, "PointSize", font.pointSize() );
createIntNode( doc, fontElement, "Weight", font.weight() );
createBoolNode( doc, fontElement, "Italic", font.italic() );
-#if COMPAT_QT_VERSION < 0x030000
- // Qt 3 handles the charset internally.
+#if COMPAT_TQT_VERSION < 0x030000
+ // TQt 3 handles the charset internally.
createIntNode( doc, fontElement, "CharSet", font.charSet() );
#endif
}
- void createPenNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPen& pen )
+ void createPenNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQPen& pen )
{
- QDomElement penElement = doc.createElement( elementName );
- parent.appendChild( penElement );
+ TQDomElement penElement = doc.createElement( elementName );
+ tqparent.appendChild( penElement );
createIntNode( doc, penElement, "Width", pen.width() );
createColorNode( doc, penElement, "Color", pen.color() );
createStringNode( doc, penElement, "Style", penStyleToString( pen.style() ) );
}
- void createDateTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QDateTime& datetime )
+ void createDateTimeNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQDateTime& datetime )
{
- QDomElement dateTimeElement = doc.createElement( elementName );
- parent.appendChild( dateTimeElement );
+ TQDomElement dateTimeElement = doc.createElement( elementName );
+ tqparent.appendChild( dateTimeElement );
createDateNode( doc, dateTimeElement, "Date", datetime.date() );
createTimeNode( doc, dateTimeElement, "Time", datetime.time() );
}
- void createDateNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QDate& date )
+ void createDateNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQDate& date )
{
- QDomElement dateElement = doc.createElement( elementName );
- parent.appendChild( dateElement );
- dateElement.setAttribute( "Year", QString::number( date.year() ) );
- dateElement.setAttribute( "Month", QString::number( date.month() ) );
- dateElement.setAttribute( "Day", QString::number( date.day() ) );
+ TQDomElement dateElement = doc.createElement( elementName );
+ tqparent.appendChild( dateElement );
+ dateElement.setAttribute( "Year", TQString::number( date.year() ) );
+ dateElement.setAttribute( "Month", TQString::number( date.month() ) );
+ dateElement.setAttribute( "Day", TQString::number( date.day() ) );
}
- void createTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QTime& time )
+ void createTimeNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQTime& time )
{
- QDomElement timeElement = doc.createElement( elementName );
- parent.appendChild( timeElement );
+ TQDomElement timeElement = doc.createElement( elementName );
+ tqparent.appendChild( timeElement );
timeElement.setAttribute( "Hour",
- QString::number( time.hour() ) );
+ TQString::number( time.hour() ) );
timeElement.setAttribute( "Minute",
- QString::number( time.minute() ) );
+ TQString::number( time.minute() ) );
timeElement.setAttribute( "Second",
- QString::number( time.second() ) );
+ TQString::number( time.second() ) );
timeElement.setAttribute( "Millisecond",
- QString::number( time.msec() ) );
+ TQString::number( time.msec() ) );
}
- QString penStyleToString( Qt::PenStyle style )
+ TQString penStyleToString( Qt::PenStyle style )
{
switch( style ) {
- case Qt::NoPen:
+ case TQt::NoPen:
return "NoPen";
- case Qt::SolidLine:
+ case TQt::SolidLine:
return "SolidLine";
- case Qt::DashLine:
+ case TQt::DashLine:
return "DashLine";
- case Qt::DotLine:
+ case TQt::DotLine:
return "DotLine";
- case Qt::DashDotLine:
+ case TQt::DashDotLine:
return "DashDotLine";
- case Qt::DashDotDotLine:
+ case TQt::DashDotDotLine:
return "DashDotDotLine";
default: // should not happen
return "SolidLine";
@@ -300,7 +300,7 @@ namespace KDXML {
- QString brushStyleToString( Qt::BrushStyle style )
+ TQString brushStyleToString( Qt::BrushStyle style )
{
// PENDING(kalle) Support custom patterns
switch( style ) {
@@ -340,14 +340,14 @@ namespace KDXML {
}
- bool readStringNode( const QDomElement& element, QString& value )
+ bool readStringNode( const TQDomElement& element, TQString& value )
{
value = element.text();
return true;
}
- bool readIntNode( const QDomElement& element, int& value )
+ bool readIntNode( const TQDomElement& element, int& value )
{
bool ok = false;
int temp = element.text().toInt( &ok );
@@ -357,7 +357,7 @@ namespace KDXML {
}
- bool readDoubleNode( const QDomElement& element, double& value )
+ bool readDoubleNode( const TQDomElement& element, double& value )
{
bool ok = false;
double temp = element.text().toDouble( &ok );
@@ -367,7 +367,7 @@ namespace KDXML {
}
- bool readBoolNode( const QDomElement& element, bool& value )
+ bool readBoolNode( const TQDomElement& element, bool& value )
{
if( element.text() == "true" ) {
value = true;
@@ -380,7 +380,7 @@ namespace KDXML {
}
- bool readOrientationNode( const QDomElement& element, Qt::Orientation& value )
+ bool readOrientationNode( const TQDomElement& element, Qt::Orientation& value )
{
if( element.text() == "vertical" ) {
value = Qt::Vertical;
@@ -393,7 +393,7 @@ namespace KDXML {
}
- bool readSizeNode( const QDomElement& element, QSize& value )
+ bool readSizeNode( const TQDomElement& element, TQSize& value )
{
bool ok = false;
int width, height;
@@ -411,7 +411,7 @@ namespace KDXML {
}
- bool readColorNode( const QDomElement& element, QColor& value )
+ bool readColorNode( const TQDomElement& element, TQColor& value )
{
bool ok = true;
int red=0, green=0, blue=0;
@@ -438,21 +438,21 @@ namespace KDXML {
}
- bool readBrushNode( const QDomElement& element, QBrush& brush )
+ bool readBrushNode( const TQDomElement& element, TQBrush& brush )
{
bool ok = true;
- QColor tempColor;
+ TQColor tempColor;
Qt::BrushStyle tempStyle=Qt::SolidPattern;
- QPixmap tempPixmap;
- QDomNode node = element.firstChild();
+ TQPixmap tempPixmap;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Color" ) {
ok = ok & readColorNode( element, tempColor );
} else if( tagName == "Style" ) {
- QString value;
+ TQString value;
ok = ok & readStringNode( element, value );
tempStyle = stringToBrushStyle( value );
} else if( tagName == "Pixmap" ) {
@@ -475,18 +475,18 @@ namespace KDXML {
}
- bool readPixmapNode( const QDomElement& element, QPixmap& pixmap )
+ bool readPixmapNode( const TQDomElement& element, TQPixmap& pixmap )
{
bool ok = true;
unsigned long tempLength;
- QString tempData;
- QDomNode node = element.firstChild();
+ TQString tempData;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Format" ) {
- QString formatName;
+ TQString formatName;
ok = ok & readStringNode( element, formatName );
#ifndef NDEBUG
if( formatName != "XPM.GZ" )
@@ -507,7 +507,7 @@ namespace KDXML {
if( ok ) {
if( 0 < tempLength ) {
- // Decode the image file format in the same way Qt Designer does.
+ // Decode the image file format in the same way TQt Designer does.
char *ba = new char[ tempData.length() / 2 ];
for ( int i = 0; i < (int)tempData.length() / 2; ++i ) {
char h = tempData[ 2 * i ].latin1();
@@ -527,10 +527,10 @@ namespace KDXML {
if( tempLength < tempData.length() * 5 )
tempLength = tempData.length() * 5;
- QByteArray baunzip( tempLength );
+ TQByteArray baunzip( tempLength );
::uncompress( (uchar*) baunzip.data(), &tempLength,
(uchar*) ba, tempData.length()/2 );
- QImage image;
+ TQImage image;
image.loadFromData( (const uchar*)baunzip.data(), tempLength, "XPM" );
if( image.isNull() )
@@ -545,23 +545,23 @@ namespace KDXML {
}
- bool readPenNode( const QDomElement& element, QPen& pen )
+ bool readPenNode( const TQDomElement& element, TQPen& pen )
{
bool ok = true;
int tempWidth;
- QColor tempColor;
+ TQColor tempColor;
Qt::PenStyle tempStyle=Qt::SolidLine;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Width" ) {
ok = ok & readIntNode( element, tempWidth );
} else if( tagName == "Color" ) {
ok = ok & readColorNode( element, tempColor );
} else if( tagName == "Style" ) {
- QString value;
+ TQString value;
ok = ok & readStringNode( element, value );
tempStyle = stringToPenStyle( value );
} else {
@@ -580,18 +580,18 @@ namespace KDXML {
return ok;
}
- bool readFontNode( const QDomElement& element, QFont& font )
+ bool readFontNode( const TQDomElement& element, TQFont& font )
{
bool ok = true;
- QString family;
+ TQString family;
int pointSize, weight;
bool italic;
int charSet;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Family" ) {
ok = ok & readStringNode( element, family );
} else if( tagName == "PointSize" ) {
@@ -614,24 +614,24 @@ namespace KDXML {
font.setPointSize( pointSize );
font.setWeight( weight );
font.setItalic( italic );
-#if COMPAT_QT_VERSION < 0x030000
- // Qt 3 handles charsets internally.
- font.setCharSet( (QFont::CharSet)charSet );
+#if COMPAT_TQT_VERSION < 0x030000
+ // TQt 3 handles charsets internally.
+ font.setCharSet( (TQFont::CharSet)charSet );
#endif
}
return ok;
}
- bool readRectNode( const QDomElement& element, QRect& value )
+ bool readRectNode( const TQDomElement& element, TQRect& value )
{
bool ok = true;
int width, height, x, y;
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Width" ) {
ok = ok & readIntNode( element, width );
} else if( tagName == "Height" ) {
@@ -659,16 +659,16 @@ namespace KDXML {
- bool readDateTimeNode( const QDomElement& element, QDateTime& datetime )
+ bool readDateTimeNode( const TQDomElement& element, TQDateTime& datetime )
{
bool ok = true;
- QDate tempDate;
- QTime tempTime;
- QDomNode node = element.firstChild();
+ TQDate tempDate;
+ TQTime tempTime;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( !element.isNull() ) { // was really an element
- QString tagName = element.tagName();
+ TQString tagName = element.tagName();
if( tagName == "Date" ) {
ok = ok & readDateNode( element, tempDate );
} else if( tagName == "Time" ) {
@@ -689,7 +689,7 @@ namespace KDXML {
}
- bool readDateNode( const QDomElement& element, QDate& value )
+ bool readDateNode( const TQDomElement& element, TQDate& value )
{
bool ok = true;
int year=0, month=0, day=0;
@@ -717,7 +717,7 @@ namespace KDXML {
- bool readTimeNode( const QDomElement& element, QTime& value )
+ bool readTimeNode( const TQDomElement& element, TQTime& value )
{
bool ok = true;
int hour=0, minute=0, second=0, msec=0;
@@ -750,7 +750,7 @@ namespace KDXML {
- Qt::PenStyle stringToPenStyle( const QString& style )
+ Qt::PenStyle stringToPenStyle( const TQString& style )
{
if( style == "NoPen" )
return Qt::NoPen;
@@ -769,7 +769,7 @@ namespace KDXML {
}
- Qt::BrushStyle stringToBrushStyle( const QString& style )
+ Qt::BrushStyle stringToBrushStyle( const TQString& style )
{
// PENDING(kalle) Support custom patterns
if( style == "NoBrush" )
diff --git a/libkdchart/KDXMLTools.h b/libkdchart/KDXMLTools.h
index 7798c20..c633fba 100644
--- a/libkdchart/KDXMLTools.h
+++ b/libkdchart/KDXMLTools.h
@@ -32,73 +32,73 @@
// *must* include this one as first one:
#include <KDChartGlobal.h>
-#include <qpen.h>
-#include <qdom.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qbrush.h>
-#include <qsize.h>
-#include <qrect.h>
-#include <qfont.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqpen.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqbrush.h>
+#include <tqsize.h>
+#include <tqrect.h>
+#include <tqfont.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
namespace KDXML {
- QString penStyleToString( Qt::PenStyle style );
- Qt::PenStyle stringToPenStyle( const QString& style );
- QString brushStyleToString( Qt::BrushStyle style );
- Qt::BrushStyle stringToBrushStyle( const QString& style );
+ TQString penStyleToString( Qt::PenStyle style );
+ Qt::PenStyle stringToPenStyle( const TQString& style );
+ TQString brushStyleToString( Qt::BrushStyle style );
+ Qt::BrushStyle stringToBrushStyle( const TQString& style );
- void createBoolNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, bool value );
- void createOrientationNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, Qt::Orientation value );
- void createSizeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QSize& value );
- void createIntNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, int value );
- void createDoubleNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, double value );
- void createStringNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QString& text );
- void createColorNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QColor& color );
- void createBrushNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QBrush& brush );
- void createPixmapNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPixmap& pixmap );
- void createRectNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QRect& rect );
- void createStringListNodes( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QStringList* thelist ); // PCH: This is required to avoid MSVC compiler warnings and errors.
- void createFontNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QFont& font );
+ void createBoolNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, bool value );
+ void createOrientationNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, Qt::Orientation value );
+ void createSizeNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQSize& value );
+ void createIntNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, int value );
+ void createDoubleNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, double value );
+ void createStringNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQString& text );
+ void createColorNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQColor& color );
+ void createBrushNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQBrush& brush );
+ void createPixmapNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQPixmap& pixmap );
+ void createRectNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQRect& rect );
+ void createStringListNodes( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQStringList* thelist ); // PCH: This is required to avoid MSVC compiler warnings and errors.
+ void createFontNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQFont& font );
- void createPenNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QPen& pen );
- void createDateTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName,
- const QDateTime& datetime );
- void createDateNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QDate& date );
- void createTimeNode( QDomDocument& doc, QDomNode& parent,
- const QString& elementName, const QTime& time );
- bool readIntNode( const QDomElement& element, int& value );
- bool readStringNode( const QDomElement& element, QString& value );
- bool readDoubleNode( const QDomElement& element, double& value );
- bool readBoolNode( const QDomElement& element, bool& value );
- bool readOrientationNode( const QDomElement& element, Qt::Orientation& value );
- bool readSizeNode( const QDomElement& element, QSize& value );
- bool readColorNode( const QDomElement& element, QColor& value );
- bool readBrushNode( const QDomElement& element, QBrush& brush );
- bool readPixmapNode( const QDomElement& element, QPixmap& pixmap );
- bool readRectNode( const QDomElement& element, QRect& value );
- bool readFontNode( const QDomElement& element, QFont& font );
- bool readPenNode( const QDomElement& element, QPen& pen );
- bool readDateTimeNode( const QDomElement& element, QDateTime& datetime );
- bool readDateNode( const QDomElement& element, QDate& date );
- bool readTimeNode( const QDomElement& element, QTime& time );
+ void createPenNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQPen& pen );
+ void createDateTimeNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName,
+ const TQDateTime& datetime );
+ void createDateNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQDate& date );
+ void createTimeNode( TQDomDocument& doc, TQDomNode& tqparent,
+ const TQString& elementName, const TQTime& time );
+ bool readIntNode( const TQDomElement& element, int& value );
+ bool readStringNode( const TQDomElement& element, TQString& value );
+ bool readDoubleNode( const TQDomElement& element, double& value );
+ bool readBoolNode( const TQDomElement& element, bool& value );
+ bool readOrientationNode( const TQDomElement& element, Qt::Orientation& value );
+ bool readSizeNode( const TQDomElement& element, TQSize& value );
+ bool readColorNode( const TQDomElement& element, TQColor& value );
+ bool readBrushNode( const TQDomElement& element, TQBrush& brush );
+ bool readPixmapNode( const TQDomElement& element, TQPixmap& pixmap );
+ bool readRectNode( const TQDomElement& element, TQRect& value );
+ bool readFontNode( const TQDomElement& element, TQFont& font );
+ bool readPenNode( const TQDomElement& element, TQPen& pen );
+ bool readDateTimeNode( const TQDomElement& element, TQDateTime& datetime );
+ bool readDateNode( const TQDomElement& element, TQDate& date );
+ bool readTimeNode( const TQDomElement& element, TQTime& time );
}
#endif
diff --git a/libkdchart/kdchart_export.h b/libkdchart/kdchart_export.h
index 16d8b21..afa340f 100644
--- a/libkdchart/kdchart_export.h
+++ b/libkdchart/kdchart_export.h
@@ -1,7 +1,7 @@
#ifndef KDCHART_EXPORT_H
#define KDCHART_EXPORT_H
-#include <qglobal.h>
+#include <tqglobal.h>
#if 0
#include <koffice_export.h>