kchart

KDChartSeriesCollection.h
1/*
2 KDChart - a multi-platform charting engine
3 */
4
5/****************************************************************************
6 ** Copyright (C) 2001-2003 Klarälvdalens Datakonsult AB. All rights reserved.
7 **
8 ** This file is part of the KDChart library.
9 **
10 ** This file may be distributed and/or modified under the terms of the
11 ** GNU General Public License version 2 as published by the Free Software
12 ** Foundation and appearing in the file LICENSE.GPL included in the
13 ** packaging of this file.
14 **
15 ** Licensees holding valid commercial KDChart licenses may use this file in
16 ** accordance with the KDChart Commercial License Agreement provided with
17 ** the Software.
18 **
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 **
22 ** See http://www.klaralvdalens-datakonsult.se/?page=products for
23 ** information about KDChart Commercial License Agreements.
24 **
25 ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
26 ** licensing are not clear to you.
27 **
28 **********************************************************************/
29#ifndef __KDCHARTSERIESCOLLECTION_H__
30#define __KDCHARTSERIESCOLLECTION_H__
31
32// to avoid problems in TableBase - it doesn't include this - bug!
33#include <tqtable.h>
34
35#include "KDChartTableBase.h"
36#include "KDChartBaseSeries.h"
37#include <tqvaluevector.h>
38class KDChartParams;
39#include "KDChartAxisParams.h"
40
41// takes ownership of any series passed to it, and will delete
42// them when it is deleted.
43class KDCHART_EXPORT KDChartSeriesCollection : public KDChartTableDataBase,
44 public TQValueVector<KDChartBaseSeries *>
45{
46 // Standard KDChartTableDataBase interface
47 public:
48 KDChartSeriesCollection( KDChartParams *params );
49 virtual ~KDChartSeriesCollection();
50
51 virtual uint rows() const;
52 virtual uint cols() const;
53 virtual void setUsedRows( uint _rows );
54 virtual uint usedRows() const;
55 virtual void setUsedCols( uint _cols );
56 virtual uint usedCols() const;
57 virtual void setCell( uint _row, uint _col,
58 const KDChartData& _element );
59 virtual const KDChartData& cell( uint _row, uint _col ) const;
60 virtual void expand( uint _rows, uint _cols );
61
62
63 // Methods we need KHZ to modify in HIS code so we can use our code
64 // needs to become virtual!
65 virtual double minValue( int coordinate=1 ) const;
66 virtual double maxValue( int coordinate=1 ) const;
67
68
69 // extra functions for our use
70 virtual void setLegendText( KDChartBaseSeries *series, TQString text );
71 virtual TQString legendText( KDChartBaseSeries *series );
72
73 virtual void setYaxis( KDChartBaseSeries *series,
74 KDChartAxisParams::AxisPos axis );// PENDING(blackie) possible enum problem
75 virtual KDChartAxisParams::AxisPos yAxis( KDChartBaseSeries *series );// PENDING(blackie) possible enum problem
76
77 virtual unsigned int indexOf( KDChartBaseSeries *series );
78
79 protected:
80 KDChartData _blank;
81 KDChartParams *_params;
82};
83
84
85#endif
Provide access to the chart axis parameters.
Provides a table class holding all data values that are to be used in a chart.
Bundles the display parameters of a chart.
KD Chart's build-in table data for an easy way of storing data values.
virtual uint usedCols() const
Returns the number of cols in the table that actually contain data.
virtual void setUsedCols(uint _cols)
Sets the number of cols in the table that actually contain data.
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 uint rows() const =0
Returns the number of rows in the table.
virtual uint usedRows() const
Returns the number of rows in the table that actually contain data.
virtual void setUsedRows(uint _rows)
Sets the number of rows in the table that actually contain data.
virtual void setCell(uint _row, uint _col, const TQVariant &_value1, const TQVariant &_value2=TQVariant())=0
Stores data in a cell.