summaryrefslogtreecommitdiffstats
path: root/libkdchart/KDChartDataIntern.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
commitfecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch)
tree6b8614802f0d01b353bc9ba78aff2090846c198e /libkdchart/KDChartDataIntern.h
parentdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff)
downloadkmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.tar.gz
kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.zip
TQt4 port kmymoney
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdchart/KDChartDataIntern.h')
-rw-r--r--libkdchart/KDChartDataIntern.h160
1 files changed, 80 insertions, 80 deletions
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