Go to the documentation of this file.
29#ifndef __KDCHARTTABLEINTERFACE_H__
30#define __KDCHARTTABLEINTERFACE_H__
37#include <tqdatetime.h>
39#include <kdchart_export.h>
41#if defined( SUN7 ) || defined (_SGIAPI)
59#define KDCHART_POS_INFINITE DBL_MAX
70#define KDCHART_NEG_INFINITE -DBL_MAX
101 _useUsedCols(false) {}
109 _sorted = other._sorted;
110 _useUsedRows = other._useUsedRows;
111 _useUsedCols = other._useUsedCols;
112 _usedRows = other._usedRows;
113 _usedCols = other._usedCols;
161 const TQVariant& _value1,
162 const TQVariant& _value2=TQVariant() ) = 0;
176 int _propSet=0 ) = 0;
196 int coordinate=1 ) const = 0;
219 virtual TQVariant cellVal( uint _row, uint _col, int coordinate=1 ) const {
221 if( cellCoord( _row, _col, value, coordinate ) )
240 int& _prop ) const = 0;
256 virtual void expand( uint _rows, uint _cols ) = 0;
275 return cellCoords(_row,_col, _value1,_value2) &&
276 cellProp(_row,_col, _prop);
286 TQVariant& _value2 ) const
288 return cellCoord(_row,_col, _value1, 1) &&
289 cellCoord(_row,_col, _value2, 2);
303 virtual void setUsedRows( uint _rows );
311 virtual uint usedRows() const;
323 virtual void setUsedCols( uint _cols );
331 virtual uint usedCols() const;
359 virtual void setSorted( bool sorted);
365 virtual bool sorted() const;
413 return !isPosInfinite( value ) && !isNegInfinite( value );
432 if( TQVariant::Double != value.type() )
434 dVal = value.toDouble();
435 return isNormalDouble( dVal );
438 virtual void importFromQTable( TQTable* table );
440 virtual double maxValue( int coordinate=1 ) const;
441 virtual double minValue( int coordinate=1, bool bOnlyGTZero= false ) const;
443 virtual TQDateTime maxDtValue( int coordinate=1 ) const;
444 virtual TQDateTime minDtValue( int coordinate=1 ) const;
446 virtual double maxColSum( int coordinate=1 ) const;
447 virtual double minColSum( int coordinate=1 ) const;
448 virtual double maxColSum( uint row, uint row2, int coordinate=1 ) const;
449 virtual double minColSum( uint row, uint row2, int coordinate=1 ) const;
450 virtual double colSum( uint col, int coordinate=1 ) const;
451 virtual double colAbsSum( uint col, int coordinate=1 ) const;
452 virtual double maxRowSum( int coordinate=1 ) const;
453 virtual double minRowSum( int coordinate=1 ) const;
454 virtual double rowSum( uint row, int coordinate=1 ) const;
455 virtual double rowAbsSum( uint row, int coordinate=1 ) const;
456 virtual double maxInColumn( uint col, int coordinate=1 ) const;
457 virtual double minInColumn( uint col, int coordinate=1 ) const;
458 virtual double maxInRow( uint row, int coordinate=1 ) const;
459 virtual double minInRow( uint row, int coordinate=1 ) const;
460 virtual double maxInRows( uint row, uint row2, int coordinate=1 ) const;
461 virtual double minInRows( uint row, uint row2, int coordinate=1, bool bOnlyGTZero= false ) const;
462 virtual TQDateTime maxDtInRows( uint row, uint row2, int coordinate=1 ) const;
463 virtual TQDateTime minDtInRows( uint row, uint row2, int coordinate=1 ) const;
464 virtual uint lastPositiveCellInColumn( uint col, int coordinate=1 ) const;
465 virtual bool cellsHaveSeveralCoordinates(TQVariant::Type* type2Ref) const;
466 virtual bool cellsHaveSeveralCoordinates(uint row1=0, uint row2=UINT_MAX,
467 TQVariant::Type* type2Ref=NULL) const;
468 virtual TQVariant::Type cellsValueType( uint row1, uint row2=UINT_MAX,
469 int coordinate=1 ) const;
470 virtual TQVariant::Type cellsValueType( int coordinate=1 ) const;
474 bool _useUsedRows, _useUsedCols;
476 uint _usedRows, _usedCols;
#define KDCHART_NEG_INFINITE Use special value KDCHART_NEG_INFINITE to indicate negative infinite values.
#define KDCHART_POS_INFINITE Use special value KDCHART_POS_INFINITE to indicate positive infinite values.
KD Chart's build-in table data for an easy way of storing data values.
virtual bool cellContent(uint _row, uint _col, TQVariant &_value1, TQVariant &_value2, int &_prop) const
KDChartTableDataBase(const KDChartTableDataBase &other) Default copy constructor.
virtual bool cellCoord(uint _row, uint _col, TQVariant &_value, int coordinate=1) const =0 Returns one of the coordinate data value(s) stored in a cell.
virtual uint colsScrolledBy() const Returns the number of cols the table has been scrolled by.
virtual TQVariant cellVal(uint _row, uint _col, int coordinate=1) const
virtual bool isNormalDouble(double value) const Returns true if the given value represents a normal double value.
bool isNormalDouble(TQVariant value, double &dVal) const Returns true if the given TQVariant value represents a normal double value.
virtual bool isNegInfinite(double value) const Returns true if the given value represents a negative infinite value.
virtual void expand(uint _rows, uint _cols)=0 Increases the number of rows (and/or columns, resp.) stored in this table.
virtual uint cols() const =0 Returns the number of cols in the table.
virtual ~KDChartTableDataBase() Default destructor.
virtual bool cellProp(uint _row, uint _col, int &_prop) const =0 Returns the property set ID stored in a cell.
KDChartTableDataBase() Default constructor.
virtual void setProp(uint _row, uint _col, int _propSet=0)=0 Specifies the property set ID for a cell.
virtual uint rows() const =0 Returns the number of rows in the table.
virtual bool cellCoords(uint _row, uint _col, TQVariant &_value1, TQVariant &_value2) const
virtual bool isPosInfinite(double value) const Returns true if the given value represents a positive infinite value.
virtual void setCell(uint _row, uint _col, const TQVariant &_value1, const TQVariant &_value2=TQVariant())=0 Stores data in a cell.
|