Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSCanvas_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSCanvas_p.h
00003  -------------------
00004  begin                : 06/10/2011
00005  copyright            : (C) 2003-2011 by InfoSiAL S.L.
00006  email                : mail@infosial.com
00007  ***************************************************************************/
00008 /***************************************************************************
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; version 2 of the License.               *
00012  ***************************************************************************/
00013 /***************************************************************************
00014  Este  programa es software libre. Puede redistribuirlo y/o modificarlo
00015  bajo  los  términos  de  la  Licencia  Pública General de GNU   en  su
00016  versión 2, publicada  por  la  Free  Software Foundation.
00017  ***************************************************************************/
00018 
00019 #ifndef AQSCANVAS_P_H_
00020 #define AQSCANVAS_P_H_
00021 
00022 #include "AQSObject_p.h"
00023 #include "AQSPainter_p.h"
00024 #include "AQSCanvasItem_p.h"
00025 #include <qcanvas.h>
00026 
00027 class AQSCanvas : public AQSObject
00028 {
00029   Q_OBJECT
00030 
00031   AQ_DECLARE_AQS_OBJECT(Canvas, Object);
00032 
00033   //@AQ_BEGIN_DEF_PUB_SLOTS@
00034 public slots:
00035   virtual void setTiles(QPixmap *, int, int, int, int);
00036   virtual void setTiles(AQSPixmap *, int, int, int, int);
00037   virtual void setBackgroundPixmap(QPixmap *);
00038   virtual void setBackgroundPixmap(AQSPixmap *);
00039   QPixmap *backgroundPixmap() const;
00040   virtual void setBackgroundColor(QColor *);
00041   virtual void setBackgroundColor(AQSColor *);
00042   QColor *backgroundColor() const;
00043   virtual void setTile(int, int, int);
00044   int tile(int, int) const;
00045   int tilesHorizontally() const;
00046   int tilesVertically() const;
00047   int tileWidth() const;
00048   int tileHeight() const;
00049   virtual void resize(int, int);
00050   int width() const;
00051   int height() const;
00052   QSize size() const;
00053   QRect rect() const;
00054   bool onCanvas(int, int) const;
00055   bool onCanvas(const QPoint &) const;
00056   bool validChunk(int, int) const;
00057   bool validChunk(const QPoint &) const;
00058   int chunkSize() const;
00059   virtual void retune(int, int = 100);
00060   virtual void setAllChanged();
00061   virtual void setChanged(const QRect &);
00062   virtual void setUnchanged(const QRect &);
00063   QCanvasItemList *allItems();
00064   QCanvasItemList *collisions(const QPoint &) const;
00065   QCanvasItemList *collisions(const QRect &) const;
00066   QCanvasItemList *collisions(QPointArray *, QCanvasItem *, bool) const;
00067   QCanvasItemList *collisions(QPointArray *, AQSCanvasItem *, bool) const;
00068   QCanvasItemList *collisions(AQSPointArray *, QCanvasItem *, bool) const;
00069   QCanvasItemList *collisions(AQSPointArray *, AQSCanvasItem *, bool) const;
00070   void drawArea(const QRect &, QPainter *, bool = FALSE);
00071   void drawArea(const QRect &, AQSPainter *, bool = FALSE);
00072   virtual void setAdvancePeriod(int);
00073   virtual void setUpdatePeriod(int);
00074   virtual void setDoubleBuffering(bool);
00075 
00076 protected:
00077   static void *construct(const QSArgumentList &args) {
00078     QMap<int, QStringList> candidates;
00079     candidates[0].append(QString::null);
00080     candidates[1].append(QString::fromLatin1("QObject*"));
00081     candidates[2].append(QString::fromLatin1("QObject*,QString"));
00082     candidates[2].append(QString::fromLatin1("int,int"));
00083     candidates[5].append(QString::fromLatin1("QPixmap*,int,int,int,int"));
00084     QString sgt(castArgsSignature(args, candidates));
00085     if (sgt.isEmpty())
00086       return new QCanvas;
00087     if (sgt == QString::fromLatin1("QObject*"))
00088       return new QCanvas(argValue<QObject *>(args[0]));
00089     if (sgt == QString::fromLatin1("QObject*,QString"))
00090       return new QCanvas(argValue<QObject *>(args[0]),
00091                          *(argValue<QString *>(args[1])));
00092     if (sgt == QString::fromLatin1("int,int"))
00093       return new QCanvas(args[0].variant().toInt(),
00094                          args[1].variant().toInt());
00095     if (sgt == QString::fromLatin1("QPixmap*,int,int,int,int"))
00096       return new QCanvas(*argValue<QPixmap *>(args[0]),
00097                          args[1].variant().toInt(),
00098                          args[2].variant().toInt(),
00099                          args[3].variant().toInt(),
00100                          args[4].variant().toInt());
00101     return 0;
00102   }
00103 
00104 public:
00105   static QMap<int, QStringList> candidateConstructors() {
00106     QMap<int, QStringList> candidates;
00107     candidates[0].append(QString::null);
00108     candidates[1].append(QString::fromLatin1("QObject*"));
00109     candidates[2].append(QString::fromLatin1("QObject*,QString"));
00110     candidates[2].append(QString::fromLatin1("int,int"));
00111     candidates[5].append(QString::fromLatin1("QPixmap*,int,int,int,int"));
00112     return candidates;
00113   }
00114   //@AQ_END_DEF_PUB_SLOTS@
00115 };
00116 
00117 //@AQ_BEGIN_IMP_PUB_SLOTS@
00118 inline void AQSCanvas::setTiles(QPixmap *arg0,  int arg1,  int arg2,  int arg3,  int arg4)
00119 {
00120   AQ_CALL_VOID(setTiles(*arg0, arg1, arg2, arg3, arg4));
00121 }
00122 inline void AQSCanvas::setTiles(AQSPixmap *arg0,  int arg1,  int arg2,  int arg3,  int arg4)
00123 {
00124   AQ_CALL_VOID(setTiles(*arg0, arg1, arg2, arg3, arg4));
00125 }
00126 inline void AQSCanvas::setBackgroundPixmap(QPixmap *arg0)
00127 {
00128   AQ_CALL_VOID(setBackgroundPixmap(*arg0));
00129 }
00130 inline void AQSCanvas::setBackgroundPixmap(AQSPixmap *arg0)
00131 {
00132   AQ_CALL_VOID(setBackgroundPixmap(*arg0));
00133 }
00134 inline QPixmap *AQSCanvas::backgroundPixmap() const
00135 {
00136   AQ_CALL_RET_PTR(backgroundPixmap(), QPixmap);
00137 }
00138 inline void AQSCanvas::setBackgroundColor(QColor *arg0)
00139 {
00140   AQ_CALL_VOID(setBackgroundColor(*arg0));
00141 }
00142 inline void AQSCanvas::setBackgroundColor(AQSColor *arg0)
00143 {
00144   AQ_CALL_VOID(setBackgroundColor(*arg0));
00145 }
00146 inline QColor *AQSCanvas::backgroundColor() const
00147 {
00148   AQ_CALL_RET_PTR(backgroundColor(), QColor);
00149 }
00150 inline void AQSCanvas::setTile(int arg0,  int arg1,  int arg2)
00151 {
00152   AQ_CALL_VOID(setTile(arg0, arg1, arg2));
00153 }
00154 inline int AQSCanvas::tile(int arg0,  int arg1) const
00155 {
00156   AQ_CALL_RET_V(tile(arg0, arg1), int);
00157 }
00158 inline int AQSCanvas::tilesHorizontally() const
00159 {
00160   AQ_CALL_RET_V(tilesHorizontally(), int);
00161 }
00162 inline int AQSCanvas::tilesVertically() const
00163 {
00164   AQ_CALL_RET_V(tilesVertically(), int);
00165 }
00166 inline int AQSCanvas::tileWidth() const
00167 {
00168   AQ_CALL_RET_V(tileWidth(), int);
00169 }
00170 inline int AQSCanvas::tileHeight() const
00171 {
00172   AQ_CALL_RET_V(tileHeight(), int);
00173 }
00174 inline void AQSCanvas::resize(int arg0,  int arg1)
00175 {
00176   AQ_CALL_VOID(resize(arg0, arg1));
00177 }
00178 inline int AQSCanvas::width() const
00179 {
00180   AQ_CALL_RET_V(width(), int);
00181 }
00182 inline int AQSCanvas::height() const
00183 {
00184   AQ_CALL_RET_V(height(), int);
00185 }
00186 inline QSize AQSCanvas::size() const
00187 {
00188   AQ_CALL_RET_V(size(), QSize);
00189 }
00190 inline QRect AQSCanvas::rect() const
00191 {
00192   AQ_CALL_RET_V(rect(), QRect);
00193 }
00194 inline bool AQSCanvas::onCanvas(int arg0,  int arg1) const
00195 {
00196   AQ_CALL_RET_V(onCanvas(arg0, arg1), bool);
00197 }
00198 inline bool AQSCanvas::onCanvas(const QPoint &arg0) const
00199 {
00200   AQ_CALL_RET_V(onCanvas(arg0), bool);
00201 }
00202 inline bool AQSCanvas::validChunk(int arg0,  int arg1) const
00203 {
00204   AQ_CALL_RET_V(validChunk(arg0, arg1), bool);
00205 }
00206 inline bool AQSCanvas::validChunk(const QPoint &arg0) const
00207 {
00208   AQ_CALL_RET_V(validChunk(arg0), bool);
00209 }
00210 inline int AQSCanvas::chunkSize() const
00211 {
00212   AQ_CALL_RET_V(chunkSize(), int);
00213 }
00214 inline void AQSCanvas::retune(int arg0,  int arg1)
00215 {
00216   AQ_CALL_VOID(retune(arg0, arg1));
00217 }
00218 inline void AQSCanvas::setAllChanged()
00219 {
00220   AQ_CALL_VOID(setAllChanged());
00221 }
00222 inline void AQSCanvas::setChanged(const QRect &arg0)
00223 {
00224   AQ_CALL_VOID(setChanged(arg0));
00225 }
00226 inline void AQSCanvas::setUnchanged(const QRect &arg0)
00227 {
00228   AQ_CALL_VOID(setUnchanged(arg0));
00229 }
00230 inline QCanvasItemList *AQSCanvas::allItems()
00231 {
00232   AQ_CALL_RET_PTR(allItems(), QCanvasItemList);
00233 }
00234 inline QCanvasItemList *AQSCanvas::collisions(const QPoint &arg0) const
00235 {
00236   AQ_CALL_RET_PTR(collisions(arg0), QCanvasItemList);
00237 }
00238 inline QCanvasItemList *AQSCanvas::collisions(const QRect &arg0) const
00239 {
00240   AQ_CALL_RET_PTR(collisions(arg0), QCanvasItemList);
00241 }
00242 inline QCanvasItemList *AQSCanvas::collisions(QPointArray *arg0,  QCanvasItem *arg1,  bool arg2) const
00243 {
00244   AQ_CALL_RET_PTR(collisions(*arg0, arg1, arg2), QCanvasItemList);
00245 }
00246 inline QCanvasItemList *AQSCanvas::collisions(QPointArray *arg0, AQSCanvasItem *arg1,  bool arg2) const
00247 {
00248   AQ_CALL_RET_PTR(collisions(*arg0, *arg1, arg2), QCanvasItemList);
00249 }
00250 inline QCanvasItemList *AQSCanvas::collisions(AQSPointArray *arg0,  QCanvasItem *arg1,  bool arg2) const
00251 {
00252   AQ_CALL_RET_PTR(collisions(*arg0, arg1, arg2), QCanvasItemList);
00253 }
00254 inline QCanvasItemList *AQSCanvas::collisions(AQSPointArray *arg0, AQSCanvasItem *arg1,  bool arg2) const
00255 {
00256   AQ_CALL_RET_PTR(collisions(*arg0, *arg1, arg2), QCanvasItemList);
00257 }
00258 inline void AQSCanvas::drawArea(const QRect &arg0, QPainter *arg1,  bool arg2)
00259 {
00260   AQ_CALL_VOID(drawArea(arg0, arg1, arg2));
00261 }
00262 inline void AQSCanvas::drawArea(const QRect &arg0, AQSPainter *arg1,  bool arg2)
00263 {
00264   AQ_CALL_VOID(drawArea(arg0, *arg1, arg2));
00265 }
00266 inline void AQSCanvas::setAdvancePeriod(int arg0)
00267 {
00268   AQ_CALL_VOID(setAdvancePeriod(arg0));
00269 }
00270 inline void AQSCanvas::setUpdatePeriod(int arg0)
00271 {
00272   AQ_CALL_VOID(setUpdatePeriod(arg0));
00273 }
00274 inline void AQSCanvas::setDoubleBuffering(bool arg0)
00275 {
00276   AQ_CALL_VOID(setDoubleBuffering(arg0));
00277 }
00278 //@AQ_END_IMP_PUB_SLOTS@
00279 
00280 #endif /* AQSCANVAS_P_H_ */
00281 // @AQSOBJECT@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'