29#ifndef __KDCHARTDATAINTERN_H__
30#define __KDCHARTDATAINTERN_H__
34#include <tqdatetime.h>
35#include "KDChartGlobal.h"
53 _valueType( TQVariant::Invalid ),
54 _valueType2( TQVariant::Invalid ),
61 _valueType( TQVariant::Double ), dValue( value ),
62 _valueType2( TQVariant::Invalid ),
67 _valueType( TQVariant::String ), sValue( value ),
68 _valueType2( TQVariant::Invalid ),
83 _valueType( TQVariant::Double ), dValue( yValue ),
84 _valueType2( TQVariant::DateTime ), dtValue2( xValue ),
90 const TQVariant& _value2 )
92 switch( _value1.type() ){
95 case TQVariant::Double:
96 _valueType = TQVariant::Double;
97 dValue = _value1.toDouble();
99 case TQVariant::DateTime:
100 _valueType = TQVariant::DateTime;
101 dtValue = _value1.toDateTime();
103 case TQVariant::String:
104 _valueType = TQVariant::String;
105 sValue = _value1.toString();
108 _valueType = TQVariant::Invalid;
110 switch( _value2.type() ){
112 case TQVariant::UInt:
113 case TQVariant::Double:
114 _valueType2 = TQVariant::Double;
115 dValue2 = _value2.toDouble();
117 case TQVariant::DateTime:
118 _valueType2 = TQVariant::DateTime;
119 dtValue2 = _value2.toDateTime();
122 _valueType2 = TQVariant::Invalid;
135 _valueType( TQVariant::Double ), dValue( yValue ),
136 _valueType2( TQVariant::Double ), dValue2( xValue ),
203 case TQVariant::String:
206 case TQVariant::Double:
209 case TQVariant::DateTime:
222 case TQVariant::Double:
225 case TQVariant::DateTime:
264 _valueType = R._valueType;
265 _valueType2 = R._valueType2;
267 case TQVariant::String:
270 case TQVariant::Double:
273 case TQVariant::DateTime:
282 case TQVariant::Double:
285 case TQVariant::DateTime:
286 dtValue2 = R.dtValue2;
305 ? (_valueType != TQVariant::Invalid)
306 : ((_valueType2 == TQVariant::Double) || (_valueType2 == TQVariant::DateTime));
312 ? (_valueType == TQVariant::String)
318 ? (_valueType == TQVariant::Double)
319 : (_valueType2 == TQVariant::Double);
324 ? (_valueType == TQVariant::DateTime)
325 : (_valueType2 == TQVariant::DateTime);
331 _valueType = TQVariant::Invalid;
332 _valueType2 = TQVariant::Invalid;
336 TQVariant value(
int valNo=1 )
const
339 switch ( valueType( 1 ) ) {
340 case TQVariant::String:
342 case TQVariant::Double:
344 case TQVariant::DateTime:
349 else if( 2 == valNo )
350 switch ( valueType( 2 ) ) {
351 case TQVariant::Double:
353 case TQVariant::DateTime:
367 if ((1 == valNo) &&
isString( valNo ))
375 ? ((1 == valNo) ? dValue : dValue2)
381 ? ((1 == valNo) ? dtValue : dtValue2)
399 _propSetID = propSetID;
417 TQVariant::Type _valueType;
424 TQVariant::Type _valueType2;
Encapsulates one data cell in a chart.
TQString stringValue(int valNo=1) const
Returns the string value represented by this object, or TQString() if this object does not represent ...
bool operator==(const KDChartData &it) const
Compare operator.
bool isDateTime(int valNo=1) const
Returns true if the object represents a TQDateTime value and false otherwise.
KDChartData(double yValue, double xValue)
Constructor.
KDChartData()
Constructor.
void clearValue()
Resets both of the data types of this cell to KDChartData::NoValue and sets the property set ID to KD...
void setPropertySet(int propSetID=0)
Assign a property set to a data cell.
double doubleValue(int valNo=1) const
Returns the double value represented by this object, or DBL_MIN if this object does not represent a d...
int propertySet() const
Return the ID of the property set that is assigned to this data cell.
bool isString(int valNo=1) const
Returns true if the object represents a TQString value and false otherwise.
TQVariant::Type valueType(int valNo=1) const
Returns the type of the respective value.
bool isDouble(int valNo=1) const
Returns true if the object represents a double value and false otherwise.
bool hasValue(int valNo=1) const
Returns true if the object represents a value (double or TQString) and false otherwise.
KDChartData(double value)
Constructor.
void setData(const KDChartData &R)
Method setData.
bool operator!=(const KDChartData &it) const
Compare operator.
bool isEqual(const KDChartData &a, const KDChartData &b) const
Compare method.
KDChartData(const TQString &value)
Constructor.
KDChartData(double yValue, TQDateTime xValue)
Constructor.
void setAll(const KDChartData &R)
Method setAll.
TQDateTime dateTimeValue(int valNo=1) const
Returns the TQDateTime value represented by this object, or TQDateTime() if this object does not repr...