Drop Qt2 obsolete classes

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/7/head
Michele Calgaro 2 years ago
parent d09e55dfbb
commit a3a44b5dae
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -36,12 +36,7 @@
#include "KDChartTextPiece.h" #include "KDChartTextPiece.h"
#include <tqpainter.h> #include <tqpainter.h>
#if COMPAT_TQT_VERSION >= 0x030000
#include <tqmemarray.h> #include <tqmemarray.h>
#else
#include <tqarray.h>
#define TQMemArray TQArray
#endif
#include <stdlib.h> #include <stdlib.h>

@ -77,41 +77,7 @@
#endif #endif
#endif #endif
#if COMPAT_TQT_VERSION < 0x030000
#if !defined(Q_ASSERT)
#if defined(TQT_CHECK_STATE)
#if defined(TQT_FATAL_ASSERT)
#define Q_ASSERT(x) ((x) ? (void)0 : tqFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
#else
#define Q_ASSERT(x) ((x) ? (void)0 : tqWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
#endif
#else
#define Q_ASSERT(x)
#endif
#endif
#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 // TQT_NO_COMPAT
#define TQMemArray TQArray
#include <tqarray.h>
#else
#include <tqmemarray.h> #include <tqmemarray.h>
#endif
// end of #if COMPAT_TQT_VERSION < 0x030000
#include <tqptrlist.h> #include <tqptrlist.h>
#include <tqptrvector.h> #include <tqptrvector.h>

@ -36,12 +36,7 @@
#include <KDChartPropertySet.h> #include <KDChartPropertySet.h>
#include <tqpainter.h> #include <tqpainter.h>
#if COMPAT_TQT_VERSION >= 0x030000
#include <tqvaluevector.h> #include <tqvaluevector.h>
#else
#include <tqarray.h>
#endif
#include <stdlib.h> #include <stdlib.h>
@ -291,11 +286,7 @@ void KDChartLinesPainter::specificPaintData( TQPainter* painter,
( dataset >= static_cast < int > ( datasetStart ) && dataset >= 0 ); ( dataset >= static_cast < int > ( datasetStart ) && dataset >= 0 );
--dataset ) --dataset )
++arrayNumDatasets; ++arrayNumDatasets;
#if COMPAT_TQT_VERSION >= 0x030000
TQValueVector<MyPoint> allPoints( TQValueVector<MyPoint> allPoints(
#else
TQArray<MyPoint> allPoints(
#endif
arrayNumDatasets * arrayNumValues ); arrayNumDatasets * arrayNumValues );
KDChartPropertySet curPropSet; KDChartPropertySet curPropSet;

@ -40,6 +40,7 @@
#include <tqtextstream.h> #include <tqtextstream.h>
#include <tqsimplerichtext.h> #include <tqsimplerichtext.h>
#include <tqdom.h> #include <tqdom.h>
#include <tqvaluevector.h>
#include <limits.h> #include <limits.h>
#include <math.h> #include <math.h>
@ -54,12 +55,6 @@
#include "KDChartAxisParams.h" #include "KDChartAxisParams.h"
#include "KDChartPropertySet.h" #include "KDChartPropertySet.h"
#if COMPAT_TQT_VERSION >= 0x030000
#include <tqvaluevector.h>
#else
#include <tqarray.h>
#endif
/** \file KDChartParams.h /** \file KDChartParams.h
\brief Header for all common chart parameters. \brief Header for all common chart parameters.
@ -2097,11 +2092,7 @@ public slots:
uint& chart ) const; uint& chart ) const;
public: public:
#if COMPAT_TQT_VERSION >= 0x030000
typedef TQValueVector<uint> AxesArray; typedef TQValueVector<uint> AxesArray;
#else
typedef TQArray<uint> AxesArray;
#endif
public slots: public slots:
bool chartAxes( uint chart, uint& cnt, AxesArray& axes ) const; bool chartAxes( uint chart, uint& cnt, AxesArray& axes ) const;

@ -135,11 +135,7 @@ double KDChartSeriesCollection::maxValue( int coordinate ) const
bool first_max = true; bool first_max = true;
// find the first max // find the first max
#if COMPAT_TQT_VERSION >= 0x030000
TQValueVector<KDChartBaseSeries *>::const_iterator i; TQValueVector<KDChartBaseSeries *>::const_iterator i;
#else
TQArray<KDChartBaseSeries *>::ConstIterator i;
#endif
for ( i = (*this).begin(); i != (*this).end(); i ++ ) for ( i = (*this).begin(); i != (*this).end(); i ++ )
{ {
double temp = (*i)->maxValue(coordinate, ok); double temp = (*i)->maxValue(coordinate, ok);
@ -166,11 +162,7 @@ double KDChartSeriesCollection::minValue( int coordinate ) const
double result = 0; // if no valid min/max, then this is the default double result = 0; // if no valid min/max, then this is the default
// find the first min // find the first min
#if COMPAT_TQT_VERSION >= 0x030000
TQValueVector<KDChartBaseSeries *>::const_iterator i; TQValueVector<KDChartBaseSeries *>::const_iterator i;
#else
TQArray<KDChartBaseSeries *>::ConstIterator i;
#endif
for ( i = (*this).begin(); !ok && i != (*this).end(); i ++ ) for ( i = (*this).begin(); !ok && i != (*this).end(); i ++ )
result = (*i)->minValue(coordinate, ok); result = (*i)->minValue(coordinate, ok);
@ -189,11 +181,7 @@ double KDChartSeriesCollection::minValue( int coordinate ) const
unsigned int KDChartSeriesCollection::indexOf( KDChartBaseSeries *series ) unsigned int KDChartSeriesCollection::indexOf( KDChartBaseSeries *series )
{ {
unsigned int index = 0; unsigned int index = 0;
#if COMPAT_TQT_VERSION >= 0x030000
TQValueVector<KDChartBaseSeries *>::const_iterator i; TQValueVector<KDChartBaseSeries *>::const_iterator i;
#else
TQArray<KDChartBaseSeries *>::ConstIterator i;
#endif
for ( i = (*this).begin(); i != (*this).end(); i ++, index ++ ) for ( i = (*this).begin(); i != (*this).end(); i ++, index ++ )
if ( *i == series ) if ( *i == series )
break; break;

@ -31,25 +31,17 @@
// to avoid problems in TableBase - it doesn't include this - bug! // to avoid problems in TableBase - it doesn't include this - bug!
#include <tqtable.h> #include <tqtable.h>
#include <tqvaluevector.h>
#include "KDChartTableBase.h" #include "KDChartTableBase.h"
#include "KDChartBaseSeries.h" #include "KDChartBaseSeries.h"
#if COMPAT_TQT_VERSION >= 0x030000
#include <tqvaluevector.h>
#else
#include <tqarray.h>
#endif
class KDChartParams; class KDChartParams;
#include "KDChartAxisParams.h" #include "KDChartAxisParams.h"
// takes ownership of any series passed to it, and will delete // takes ownership of any series passed to it, and will delete
// them when it is deleted. // them when it is deleted.
class KDCHART_EXPORT KDChartSeriesCollection : public KDChartTableDataBase, class KDCHART_EXPORT KDChartSeriesCollection : public KDChartTableDataBase,
#if COMPAT_TQT_VERSION >= 0x030000
public TQValueVector<KDChartBaseSeries *> public TQValueVector<KDChartBaseSeries *>
#else
public TQArray<KDChartBaseSeries *>
#endif
{ {
// Standard KDChartTableDataBase interface // Standard KDChartTableDataBase interface
public: public:

@ -38,21 +38,13 @@
// - Implement a TQValueVector interface // - Implement a TQValueVector interface
#include "KDChartBaseSeries.h" #include "KDChartBaseSeries.h"
#if COMPAT_TQT_VERSION >= 0x030000
#include <tqvaluevector.h> #include <tqvaluevector.h>
#else
#include <tqarray.h>
#endif
class KDChartSeriesCollection; class KDChartSeriesCollection;
class KDCHART_EXPORT KDChartVectorSeries : public KDChartBaseSeries, class KDCHART_EXPORT KDChartVectorSeries : public KDChartBaseSeries,
#if COMPAT_TQT_VERSION >= 0x030000
public TQValueVector<KDChartData> public TQValueVector<KDChartData>
#else
public TQArray<KDChartData>
#endif
{ {
public: public:
virtual ~KDChartVectorSeries(); virtual ~KDChartVectorSeries();

Loading…
Cancel
Save