Eneboo - Documentación para desarrolladores
src/kugar/mreportobject.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002              mreportobject.h  -  Kugar report object baseclass
00003              -------------------
00004    begin     : Wed Aug 11 1999
00005    copyright : (C) 1999 by Mutiny Bay Software
00006    email     : info@mutinybaysoftware.com
00007 ***************************************************************************/
00008 
00009 #ifndef MREPORTOBJECT_H
00010 #define MREPORTOBJECT_H
00011 
00012 #include <qobject.h>
00013 #include <qpainter.h>
00014 #include <qpaintdevice.h>
00015 #include <qcolor.h>
00016 #include <qdom.h>
00017 #include <qfile.h>
00018 #include <FLStylePainter.h>
00019 
00025 class MReportObject: public QObject
00026 {
00027 
00028 public:
00029 
00033   enum BorderStyle {
00034     NoPen = 0,
00035     SolidLine,
00036     DashLine,
00037     DotLine,
00038     DashDotLine,
00039     DashDotDotLine
00040   };
00041 
00045   MReportObject();
00046 
00050   MReportObject(const MReportObject &mReportObject);
00051 
00055   MReportObject operator=(const MReportObject &mReportObject);
00056 
00060   virtual ~ MReportObject();
00061 
00062 protected:
00063 
00067   int xpos;
00068 
00072   int ypos;
00073 
00077   int width;
00078 
00082   int height;
00083 
00087   QColor backgroundColor;
00088 
00092   bool transparent;
00093 
00097   bool drawAtBottom;
00098 
00102   QColor foregroundColor;
00103 
00107   QColor borderColor;
00108 
00112   int borderWidth;
00113 
00117   int borderStyle;
00118 
00122   int sectionIndex;
00123 
00127   int objectId;
00128 
00129 public:
00130 
00134   virtual int draw(FLStylePainter *p);
00135 
00139   void setGeometry(int x, int y, int w, int h);
00140 
00144   void move(int x, int y);
00145 
00149   int getX() const;
00150 
00154   int getY() const;
00155 
00159   int getWidth() const;
00160 
00164   int getHeight() const;
00165 
00169   int getSectionIndex() const;
00170 
00174   bool getDrawAtBottom() const;
00175 
00179   int getObjectId() const;
00180 
00184   void setBackgroundColor(int r, int g, int b);
00185 
00189   void setForegroundColor(int r, int g, int b);
00190 
00194   void setBorderColor(int r, int g, int b);
00195 
00199   void setBorderWidth(int width);
00200 
00204   void setBorderStyle(int style);
00205 
00209   void setTransparent(bool t);
00210 
00214   void setDrawAtBottom(bool b);
00215 
00219   void setSectionIndex(int idx);
00220 
00224   void setObjectId(int id);
00225 
00226 protected:
00227 
00231   void drawBase(FLStylePainter *p);
00232 
00233 private:
00234 
00240   void copy(const MReportObject *mReportObject);
00241 };
00242 
00244 inline int MReportObject::getX() const
00245 {
00246   return xpos;
00247 }
00248 
00250 inline int MReportObject::getY() const
00251 {
00252   return ypos;
00253 }
00254 
00256 inline int MReportObject::getHeight() const
00257 {
00258   return height;
00259 }
00260 
00262 inline int MReportObject::getWidth() const
00263 {
00264   return width;
00265 }
00266 
00268 inline bool MReportObject::getDrawAtBottom() const
00269 {
00270   return drawAtBottom;
00271 }
00272 
00274 inline int MReportObject::getSectionIndex() const
00275 {
00276   return sectionIndex;
00277 }
00278 
00280 inline int MReportObject::getObjectId() const
00281 {
00282   return objectId;
00283 }
00284 
00286 inline void MReportObject::setBorderWidth(int width)
00287 {
00288   borderWidth = width;
00289 }
00290 
00292 inline void MReportObject::setBorderStyle(int style)
00293 {
00294   borderStyle = style;
00295 }
00296 
00298 inline void MReportObject::setTransparent(bool t)
00299 {
00300   transparent = t;
00301 }
00302 
00304 inline void MReportObject::setDrawAtBottom(bool b)
00305 {
00306   drawAtBottom = b;
00307 }
00308 
00310 inline void MReportObject::setSectionIndex(int idx)
00311 {
00312   sectionIndex = idx;
00313 }
00314 
00316 inline void MReportObject::setObjectId(int id)
00317 {
00318   objectId = id;
00319 }
00320 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'