/************************* * * * * * * * * * * * * *************************** Copyright (c) 1999-2005 Ryan Bobko ryan@ostrich-emulators.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ************************* * * * * * * * * * * * * ***************************/ #include "doublebargraph.h" #include "qhacctable.h" #include "qhacc.h" #include // plugin factory calls extern "C" { QHaccPlugin * create(){ return new DoubleBarGraph; } void destroy( DoubleBarGraph * p ){ delete p; } } DoubleBarGraph::DoubleBarGraph(){ setIvsE( true ); setLine( false ); } DoubleBarGraph::~DoubleBarGraph(){} void DoubleBarGraph::paintRow( QPainter * p, const TableRow& last, const TableRow& row, int wstart, int wspot, const QColor& color, bool drawTots, const QString& head ) const { paintRow( p, last, row, wstart, wspot, color, drawTots, head, INCREASES ); paintRow( p, last, row, wstart, wspot, color, drawTots, head, DECREASES ); } void DoubleBarGraph::paintRow( QPainter * p, const TableRow&, const TableRow& row, int wstart, int wspot, const QColor& color, bool drawTots, const QString& head, uint col ) const { //cout<<"PAINTROW\t"<toString()<<"\t"; //if( last ) cout<toString(); //else cout<<"no last row"; //cout<setPen( QPen( color ) ); //cout<<" point is ("<fillRect( rect, QBrush( mcolor ) ); p->setPen( QPen( "black" ) ); p->drawRect( rect ); if( !head.isNull() ) drawTitle( p, head, sstart, tstart, hpos ); if( drawTots ) drawSum( p, sum, sstart, hpos, send, p->fontMetrics().height() ); } const DoubleBarInfo DoubleBarGraph::pinfo; const PluginInfo& DoubleBarGraph::info() const { return pinfo; }