Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

graph.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the OPIE Project
00003                =.
00004              .=l.            Copyright (c)  2002 Dan Williams <drw@handhelds.org>
00005            .>+-=
00006  _;:,     .>    :=|.         This file is free software; you can
00007 .> <`_,   >  .   <=          redistribute it and/or modify it under
00008 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00009 .="- .-=="i,     .._         License as published by the Free Software
00010  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00011      ._= =}       :          or (at your option) any later version.
00012     .%`+i>       _;_.
00013     .i_,=:_.      -<s.       This file is distributed in the hope that
00014      +  .  -:.       =       it will be useful, but WITHOUT ANY WARRANTY;
00015     : ..    .:,     . . .    without even the implied warranty of
00016     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00017   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU General
00018 ..}^=.=       =       ;      Public License for more details.
00019 ++=   -.     .`     .:
00020  :     =  ...= . :.=-        You should have received a copy of the GNU
00021  -.   .:....=;==+<;          General Public License along with this file;
00022   -_. . .   )=.  =           see the file COPYING. If not, write to the
00023     --        :-=`           Free Software Foundation, Inc.,
00024                              59 Temple Place - Suite 330,
00025                              Boston, MA 02111-1307, USA.
00026 
00027 */
00028 
00029 #ifndef GRAPH_H
00030 #define GRAPH_H
00031 
00032 #include <qpixmap.h>
00033 #include <qwidget.h>
00034 
00035 class GraphInfo;
00036 class QPainter;
00037 
00038 class Graph : public QWidget
00039 {
00040         Q_OBJECT
00041 
00042         public:
00043                 Graph( QWidget * = 0x0, GraphInfo * = 0x0, const QString & = 0x0, int = 0 );
00044 
00045                 void setGraphInfo( GraphInfo * );
00046 
00047                 void drawGraph( bool = FALSE );
00048 
00049         protected:
00050                 void paintEvent( QPaintEvent * );
00051                 void resizeEvent( QResizeEvent * );
00052 
00053         private:
00054                 GraphInfo *data;
00055 
00056                 QPixmap graph;
00057 
00058                 void initGraph();
00059                 void drawBarChart( int, int, float, float );
00060                 void drawPieChart( int, int, float );
00061 };
00062 
00063 #endif

Generated on Sat Nov 5 16:16:44 2005 for OPIE by  doxygen 1.4.2