summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/graphinfo.h
Side-by-side diff
Diffstat (limited to 'noncore/apps/checkbook/graphinfo.h') (more/less context) (show 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
@@ -34,47 +34,53 @@
class DataPointInfo
{
public:
DataPointInfo()
: l( 0x0 ), v( 0.0 ) {}
DataPointInfo( const QString &label, float value )
: l( label ), v( value ) {}
const QString &label() { return l; }
float value() { return v; }
+ void addToValue( float value ) { v += value; }
+
private:
QString l;
float v;
};
typedef QList<DataPointInfo> DataPointList;
class GraphInfo
{
public:
enum GraphType { BarChart, LineChart, PieChart };
GraphInfo( GraphType = BarChart, DataPointList * = 0x0,
const QString & = 0x0, const QString & = 0x0, const QString & = 0x0 );
+ ~GraphInfo();
GraphInfo::GraphType graphType();
void setGraphType( GraphType );
DataPointList *dataPoints();
void setDataPoints( DataPointList * );
+ DataPointInfo *firstDataPoint();
+ DataPointInfo *nextDataPoint();
+ int numberDataPoints();
float maxValue();
- float minValue();
+ float totalValue();
void setGraphTitle( const QString & );
void setXAxisTitle( const QString & );
void setYAxisTitle( const QString & );
private:
GraphType t;
DataPointList *d;
QString gt;
QString xt;
QString yt;
};