summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/graphinfo.h
Unidiff
Diffstat (limited to 'noncore/apps/checkbook/graphinfo.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/graphinfo.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/apps/checkbook/graphinfo.h b/noncore/apps/checkbook/graphinfo.h
index 4ad1dc9..620da74 100644
--- a/noncore/apps/checkbook/graphinfo.h
+++ b/noncore/apps/checkbook/graphinfo.h
@@ -39,12 +39,14 @@ class DataPointInfo
39 : l( 0x0 ), v( 0.0 ) {} 39 : l( 0x0 ), v( 0.0 ) {}
40 DataPointInfo( const QString &label, float value ) 40 DataPointInfo( const QString &label, float value )
41 : l( label ), v( value ) {} 41 : l( label ), v( value ) {}
42 42
43 const QString &label() { return l; } 43 const QString &label() { return l; }
44 float value() { return v; } 44 float value() { return v; }
45
46 void addToValue( float value ) { v += value; }
45 47
46 private: 48 private:
47 QString l; 49 QString l;
48 float v; 50 float v;
49}; 51};
50 52
@@ -54,21 +56,25 @@ class GraphInfo
54{ 56{
55 public: 57 public:
56 enum GraphType { BarChart, LineChart, PieChart }; 58 enum GraphType { BarChart, LineChart, PieChart };
57 59
58 GraphInfo( GraphType = BarChart, DataPointList * = 0x0, 60 GraphInfo( GraphType = BarChart, DataPointList * = 0x0,
59 const QString & = 0x0, const QString & = 0x0, const QString & = 0x0 ); 61 const QString & = 0x0, const QString & = 0x0, const QString & = 0x0 );
62 ~GraphInfo();
60 63
61 GraphInfo::GraphType graphType(); 64 GraphInfo::GraphType graphType();
62 void setGraphType( GraphType ); 65 void setGraphType( GraphType );
63 66
64 DataPointList *dataPoints(); 67 DataPointList *dataPoints();
65 void setDataPoints( DataPointList * ); 68 void setDataPoints( DataPointList * );
69 DataPointInfo *firstDataPoint();
70 DataPointInfo *nextDataPoint();
71 int numberDataPoints();
66 72
67 float maxValue(); 73 float maxValue();
68 float minValue(); 74 float totalValue();
69 75
70 void setGraphTitle( const QString & ); 76 void setGraphTitle( const QString & );
71 void setXAxisTitle( const QString & ); 77 void setXAxisTitle( const QString & );
72 void setYAxisTitle( const QString & ); 78 void setYAxisTitle( const QString & );
73 79
74 private: 80 private: