kchart

KDChartData Class Reference

Public Member Functions

 KDChartData ()
 
 KDChartData (double value)
 
 KDChartData (const TQString &value)
 
 KDChartData (double yValue, TQDateTime xValue)
 
 KDChartData (const TQVariant &_value1, const TQVariant &_value2)
 
 KDChartData (double yValue, double xValue)
 
bool operator== (const KDChartData &it) const
 
bool operator!= (const KDChartData &it) const
 
bool isEqual (const KDChartData &a, const KDChartData &b) const
 
void setAll (const KDChartData &R)
 
void setData (const KDChartData &R)
 
TQVariant::Type valueType (int valNo=1) const
 
bool hasValue (int valNo=1) const
 
bool isString (int valNo=1) const
 
bool isDouble (int valNo=1) const
 
bool isDateTime (int valNo=1) const
 
void clearValue ()
 
TQVariant value (int valNo=1) const
 
TQString stringValue (int valNo=1) const
 
double doubleValue (int valNo=1) const
 
TQDateTime dateTimeValue (int valNo=1) const
 
void setPropertySet (int propSetID=0)
 
int propertySet () const
 

Detailed Description

Encapsulates one data cell in a chart.

Data cells either hold one value for the ordinate axis or they hold two values: one for the ordinate axis and 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 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 (the Y or ordinate value) or a 2 for the second value (the X or abscissa value).

Definition at line 47 of file KDChartDataIntern.h.

Constructor & Destructor Documentation

◆ KDChartData() [1/6]

KDChartData::KDChartData ( )
inline

Constructor.

Creates a KDChartData object that represents no value.

Definition at line 52 of file KDChartDataIntern.h.

◆ KDChartData() [2/6]

KDChartData::KDChartData ( double  value)
inline

Constructor.

Assigns a double value to this object.

Parameters
valuethe double value which this object should represent.

Definition at line 60 of file KDChartDataIntern.h.

◆ KDChartData() [3/6]

KDChartData::KDChartData ( const TQString &  value)
inline

Constructor.

Assigns a string value to this object.

This data type may be used to store axis labels or legend texts in extra data cells.

Parameters
valuethe string value which this object should represent

Definition at line 66 of file KDChartDataIntern.h.

◆ KDChartData() [4/6]

KDChartData::KDChartData ( double  yValue,
TQDateTime  xValue 
)
inline

Constructor.

Assigns a double value and a TQDateTime value to this object.

Parameters
yValuethe double value which this object should represent.
xValuethe position on the abscissa axis which this object should be assigned to.

Definition at line 82 of file KDChartDataIntern.h.

◆ KDChartData() [5/6]

KDChartData::KDChartData ( const TQVariant &  _value1,
const TQVariant &  _value2 
)
inline

Definition at line 89 of file KDChartDataIntern.h.

◆ KDChartData() [6/6]

KDChartData::KDChartData ( double  yValue,
double  xValue 
)
inline

Constructor.

Assigns two double values to this object.

Parameters
yValuethe double value which this object should represent.
xValuethe position on the abscissa axis which this object should be assigned to.

Definition at line 134 of file KDChartDataIntern.h.

Member Function Documentation

◆ clearValue()

void KDChartData::clearValue ( )
inline

Resets both of the data types of this cell to KDChartData::NoValue and sets the property set ID to KDCHART_PROPSET_NORMAL_DATA.

Definition at line 329 of file KDChartDataIntern.h.

◆ dateTimeValue()

TQDateTime KDChartData::dateTimeValue ( int  valNo = 1) const
inline

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.

Returns
the TQDateTime value represented by this object, or TQDateTime() if this object does not represent a TQDateTime value

Definition at line 378 of file KDChartDataIntern.h.

◆ doubleValue()

double KDChartData::doubleValue ( int  valNo = 1) const
inline

Returns the double value represented by this object, or DBL_MIN if this object does not represent a double value.

You may use isDouble() or isNormalDouble() to check if it is appropriate to call this function.

Returns
the double value represented by this object, or DBL_MIN if this object does not represent a double value

Definition at line 372 of file KDChartDataIntern.h.

◆ hasValue()

bool KDChartData::hasValue ( int  valNo = 1) const
inline

Returns true if the object represents a value (double or TQString) and false otherwise.

Returns
true if the object represents a value

Definition at line 302 of file KDChartDataIntern.h.

◆ isDateTime()

bool KDChartData::isDateTime ( int  valNo = 1) const
inline

Returns true if the object represents a TQDateTime value and false otherwise.

Returns
true if the object represents a TQDateTime value

Definition at line 321 of file KDChartDataIntern.h.

◆ isDouble()

bool KDChartData::isDouble ( int  valNo = 1) const
inline

Returns true if the object represents a double value and false otherwise.

Returns
true if the object represents a double value

Definition at line 315 of file KDChartDataIntern.h.

◆ isEqual()

bool KDChartData::isEqual ( const KDChartData &  a,
const KDChartData &  b 
) const
inline

Compare method.

Note
The property set ID is not taken into account while comparing. Two KDChartData are considered equal if their data values are equal - the property set ID is ignored.

Definition at line 195 of file KDChartDataIntern.h.

◆ isString()

bool KDChartData::isString ( int  valNo = 1) const
inline

Returns true if the object represents a TQString value and false otherwise.

Returns
true if the object represents a TQString value

Definition at line 309 of file KDChartDataIntern.h.

◆ operator!=()

bool KDChartData::operator!= ( const KDChartData &  it) const
inline

Compare operator.

See also
isEqual

Definition at line 183 of file KDChartDataIntern.h.

◆ operator==()

bool KDChartData::operator== ( const KDChartData &  it) const
inline

Compare operator.

See also
isEqual

Definition at line 173 of file KDChartDataIntern.h.

◆ propertySet()

int KDChartData::propertySet ( ) const
inline

Return the ID of the property set that is assigned to this data cell.

Use KDChartParams::properties( int ID ) for accessing the respective property set information.

See also
setPropertySet
KDCHART_PROPSET_NORMAL_DATA, KDCHART_PROPSET_TRANSPARENT_DATA

Definition at line 409 of file KDChartDataIntern.h.

◆ setAll()

void KDChartData::setAll ( const KDChartData &  R)
inline

Method setAll.

Note
The property set ID is also changed by the setAll method.
See also
setData

Definition at line 246 of file KDChartDataIntern.h.

◆ setData()

void KDChartData::setData ( const KDChartData &  R)
inline

Method setData.

Note
The property set ID is not changed by the setData method. If you want to set it please call KDChartData::setPropertySet() explicitely.
See also
setAll

Definition at line 261 of file KDChartDataIntern.h.

◆ setPropertySet()

void KDChartData::setPropertySet ( int  propSetID = 0)
inline

Assign a property set to a data cell.

Parameters
propSetIDThe ID of the property set to be assigned to this data cell. This ID can either be one of the built-in IDs documented at KDChartPropertySet::BuiltinDataPropertySetIDs or a special ID that was given back by a KDChartParams::registerProperties function call.
See also
propertySet
KDCHART_PROPSET_NORMAL_DATA, KDCHART_PROPSET_TRANSPARENT_DATA

Definition at line 397 of file KDChartDataIntern.h.

◆ stringValue()

TQString KDChartData::stringValue ( int  valNo = 1) const
inline

Returns the string value represented by this object, 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.

Note
String values may be used to store axis labels or legend texts in extra data cells.
Returns
the string value represented by this object, or TQString() if this object does not represent a string value

Definition at line 363 of file KDChartDataIntern.h.

◆ value()

TQVariant KDChartData::value ( int  valNo = 1) const
inline

Definition at line 336 of file KDChartDataIntern.h.

◆ valueType()

KDChartData::ValueType KDChartData::valueType ( int  valNo = 1) const
inline

Returns the type of the respective value.

Parameters
valNospecifies the value number: 1 means the Y value, 2 means the X value
Returns
the type of the respective value

Definition at line 296 of file KDChartDataIntern.h.


The documentation for this class was generated from the following files: