Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

renderitems.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           renderitems.h  -  description
00003                              -------------------
00004     begin                : Thu Aug 1 2002
00005     copyright            : (C) 2002 by Ryan Rusaw
00006     email                : rrusaw@sasktel.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 #ifndef RENDERITEMS_H
00018 #define RENDERITEMS_H
00019 
00020 #include <qcanvas.h>
00021 #include <qobject.h>
00022 #include <qimage.h>
00023 #include <qpixmap.h>
00024 #include <qimage.h>
00025 #include <qlist.h>
00026 #include <math.h>
00027 #include <qdict.h>
00028 #include <qxml.h>
00029 #include <qpe/resource.h>
00030 #include <qpe/fontdatabase.h>
00031 #include "pcontent.h"
00032 #include "canvasshapes.h"
00033 #include "pbrowser.h"
00034 #include "putils.h"
00035 
00036 class CanvasRoundedRectangle;
00037 class CanvasCutEllipse;
00038 
00039 
00045 class RenderItems : public QObject
00046 {
00047     
00048 public:
00057     RenderItems(QObject* parent, QCanvas* canvas, pXmlNode *contentroot, pXmlNode*styleroot, QList<pImage> *i);
00061     ~RenderItems(){};
00066     void render(pXmlNode* node);
00074     QImage *makeGradientImage(pXmlNode* gradnode, int steps, QSize *size = NULL);
00083     QImage *makeHatchImage(pXmlNode* hatchnode, QColor *color, int tpcy = 0xFF, QSize *size = NULL);
00095     void showImage(int x, int y, int w, int h, QImage *image, int alphamode=0, int alphas=0xFF, int alphae=0xFF);
00100     void setFactor(float f){ factor = f; };
00104     void clearLayers(){ layer = 0; };
00109     void setReplace(bool b){ replaceitems = b; };
00114     void setRect(QRect *r) { rect = r; };
00115 
00116     enum AlphaMode { NoAlphaMode, FlatAlphaMode };
00117 
00118 protected:
00123     QCanvas *canvas() { return thiscanvas; };
00128     QString findStylePropertyInStyleRecursive(pXmlNode *node,const QString &val);
00136     QString findStyleProperty(pXmlNode *node, const QString &val);
00145     QString findStylePropertyWithParentDelimiter(pXmlNode *node,const QString &val,const QString &delimiter);    
00149     QCanvas *thiscanvas; 
00153     pXmlNode * style;    
00157     pXmlNode * content;
00161     QList<pImage> images;
00165     float factor;
00169     int layer;
00173     bool replaceitems;
00177     int lbcount;
00181     bool listinc;
00185     int lastbottom;
00189     int textlvl;
00193     QList<QCanvasText> currline;
00197     QList<QCanvasText> currtxt;
00201     pXmlNode *indentnode;
00205     QRect *rect;
00206 
00207 
00208 };
00209 
00210 #endif

Generated on Sun Feb 2 21:28:28 2003 for PoqetPresenter by doxygen1.2.18