summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/graphinfo.cpp
Unidiff
Diffstat (limited to 'noncore/apps/checkbook/graphinfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/graphinfo.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/noncore/apps/checkbook/graphinfo.cpp b/noncore/apps/checkbook/graphinfo.cpp
index fec6896..5b72c80 100644
--- a/noncore/apps/checkbook/graphinfo.cpp
+++ b/noncore/apps/checkbook/graphinfo.cpp
@@ -88,24 +88,37 @@ float GraphInfo::maxValue()
88{ 88{
89 float max = 0.0; 89 float max = 0.0;
90 for ( DataPointInfo *data = d->first(); data; data = d->next() ) 90 for ( DataPointInfo *data = d->first(); data; data = d->next() )
91 { 91 {
92 if ( data->value() > max ) 92 if ( data->value() > max )
93 { 93 {
94 max = data->value(); 94 max = data->value();
95 } 95 }
96 } 96 }
97 return max; 97 return max;
98} 98}
99 99
100float GraphInfo::minValue()
101{
102 float min = 0.0;
103 for ( DataPointInfo *data = d->first(); data; data = d->next() )
104 {
105 if ( data->value() < min )
106 {
107 min = data->value();
108 }
109 }
110 return min;
111}
112
100float GraphInfo::totalValue() 113float GraphInfo::totalValue()
101{ 114{
102 float sum = 0.0; 115 float sum = 0.0;
103 for ( DataPointInfo *data = d->first(); data; data = d->next() ) 116 for ( DataPointInfo *data = d->first(); data; data = d->next() )
104 { 117 {
105 sum += data->value(); 118 sum += data->value();
106 } 119 }
107 return sum; 120 return sum;
108} 121}
109 122
110void GraphInfo::setGraphTitle( const QString &title ) 123void GraphInfo::setGraphTitle( const QString &title )
111{ 124{