Diffstat (limited to 'noncore/apps/checkbook/graph.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/graph.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/noncore/apps/checkbook/graph.cpp b/noncore/apps/checkbook/graph.cpp index 8ae835c..acdb846 100644 --- a/noncore/apps/checkbook/graph.cpp +++ b/noncore/apps/checkbook/graph.cpp @@ -78,29 +78,24 @@ void Graph::initGraph() return; } // Any common stuff here (titles, ???) switch ( data->graphType() ) { case GraphInfo::BarChart : { drawBarChart( width(), height(), data->maxValue() ); } break; - case GraphInfo::LineChart : - { - //drawLineChart( p, s, min, max ); - } - break; case GraphInfo::PieChart : { drawPieChart( width(), height(), data->totalValue() ); } }; } void Graph::drawBarChart( int width, int height, float max ) { QPainter p( &graph ); // Try to set the font size smaller for text @@ -123,28 +118,24 @@ void Graph::drawBarChart( int width, int height, float max ) int bw = ( width - width / 4 - x ) / ( n - i ); int bh = int( ( height - height / 4 - 1 ) * dp->value() / max ); p.drawRect( width / 8 + x, height - height / 8 - 1 - bh, bw, bh ); fw = fm.width( dp->label() ); p.drawText( width / 8 + x - fw / 2 + bw / 2, height - height / 8, fw, fh + height / 8, AlignTop | AlignHCenter, dp->label() ); // WordBreak | AlignTop | AlignHCenter, dp->label() ); i++; x += bw; } } -void Graph::drawLineChart( int width, int height, float max ) -{ -} - void Graph::drawPieChart( int width, int height, float sum ) { QPainter p( &graph ); // Try to set the font size smaller for text QFont f = font(); f.setPointSize( 8 ); p.setFont( f ); int n = data->numberDataPoints(); int apos = -90 * 16; |