/************************* * * * * * * * * * * * * *************************** 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 "singlebargraph.h" #include "qhacctable.h" #include "qhacc.h" #include // plugin factory calls extern "C" { QHaccPlugin * create(){ return new SingleBarGraph; } void destroy( SingleBarGraph * p ){ delete p; } } SingleBarGraph::SingleBarGraph(){ setIvsE( false ); setLine( false ); } SingleBarGraph::~SingleBarGraph(){} void SingleBarGraph::paintRow( QPainter * p, const TableRow&, const TableRow& row, int wstart, int wspot, const QColor& color, bool drawTots, const QString& head ) 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( col ) ); 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 SingleBarInfo SingleBarGraph::pinfo; const PluginInfo& SingleBarGraph::info() const { return pinfo; }