Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSPointArray_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSPointArray_p.h
00003  -------------------
00004  begin                : 18/02/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 AQSPOINTARRAY_P_H_
00020 #define AQSPOINTARRAY_P_H_
00021 
00022 #include "AQSAbstractMemArray_p.h"
00023 #include <qpointarray.h>
00024 
00025 // @AQ_PTR_INDIRECTION@
00026 
00027 class AQSPointArray : public AQSAbstractMemArray
00028 {
00029   Q_OBJECT
00030 
00031   Q_PROPERTY(QPointArray toVariant READ toVariant);
00032 
00033   AQ_DECLARE_AQS_VOID(PointArray, AbstractMemArray);
00034 
00035 public:
00036   QPointArray toVariant() const {
00037     if (!o_)
00038       return QPointArray();
00039     return *o_;
00040   }
00041 
00042   virtual void setter(uint index, const QVariant &v) {
00043     if (!o_)
00044       return;
00045     (*o_)[index] = v.toPoint();
00046   }
00047   virtual QVariant getter(uint index) const {
00048     if (!o_)
00049       return 0;
00050     return (*o_)[index];
00051   }
00052 
00053 protected:
00054   void specializedInternalFinish() {
00055     if (!wrap_)
00056       delete o_;
00057   }
00058 
00059   //@AQ_BEGIN_DEF_PUB_SLOTS@
00060 public slots:
00061   QVariant at(uint) const;
00062   uint nrefs() const;
00063   uint size() const;
00064   uint count() const;
00065   bool isEmpty() const;
00066   bool isNull() const;
00067   bool resize(uint);
00068   bool truncate(uint);
00069   bool fill(const QPoint &, int = -1);
00070   int find(const QPoint &, uint = 0) const;
00071   int contains(const QPoint &) const;
00072   void sort();
00073   int bsearch(const QPoint &) const;
00074   void translate(int, int);
00075   QRect boundingRect() const;
00076   void point(uint, int *, int *) const;
00077   QPoint point(uint) const;
00078   void setPoint(uint, int, int);
00079   void setPoint(uint, const QPoint &);
00080   bool putPoints(int, int, QPointArray *, int = 0);
00081   bool putPoints(int, int, AQSPointArray *, int = 0);
00082   void makeArc(int, int, int, int, int, int);
00083   void makeEllipse(int, int, int, int);
00084   QPointArray *cubicBezier() const;
00085   virtual void detach();
00086   QPointArray *copy() const;
00087 
00088 protected:
00089   static void *construct(const QSArgumentList &args) {
00090     QMap<int, QStringList> candidates;
00091     candidates[0].append(QString::null);
00092     candidates[1].append(QString::fromLatin1("int"));
00093     candidates[1].append(QString::fromLatin1("QPointArray*"));
00094     candidates[1].append(QString::fromLatin1("QRect"));
00095     candidates[2].append(QString::fromLatin1("QRect,bool"));
00096     QString sgt(castArgsSignature(args, candidates));
00097     if (sgt.isEmpty())
00098       return new QPointArray;
00099     if (sgt == QString::fromLatin1("int"))
00100       return new QPointArray(args[0].variant().toInt());
00101     if (sgt == QString::fromLatin1("QPointArray*"))
00102       return new QPointArray(*argValue<QPointArray *>(args[0]));
00103     if (sgt == QString::fromLatin1("QRect"))
00104       return new QPointArray(*(argValue<QRect *>(args[0])));
00105     if (sgt == QString::fromLatin1("QRect,bool"))
00106       return new QPointArray(*(argValue<QRect *>(args[0])),
00107                              args[1].variant().toBool());
00108     return 0;
00109   }
00110 
00111 public:
00112   static QMap<int, QStringList> candidateConstructors() {
00113     QMap<int, QStringList> candidates;
00114     candidates[0].append(QString::null);
00115     candidates[1].append(QString::fromLatin1("int"));
00116     candidates[1].append(QString::fromLatin1("QPointArray*"));
00117     candidates[1].append(QString::fromLatin1("QRect"));
00118     candidates[2].append(QString::fromLatin1("QRect,bool"));
00119     return candidates;
00120   }
00121   //@AQ_END_DEF_PUB_SLOTS@
00122 };
00123 
00124 //@AQ_BEGIN_IMP_PUB_SLOTS@
00125 inline QVariant AQSPointArray::at(uint arg0) const
00126 {
00127   AQ_CALL_RET_V(at(arg0), QVariant);
00128 }
00129 inline uint AQSPointArray::nrefs() const
00130 {
00131   AQ_CALL_RET_V(nrefs(), uint);
00132 }
00133 inline uint AQSPointArray::size() const
00134 {
00135   AQ_CALL_RET_V(size(), uint);
00136 }
00137 inline uint AQSPointArray::count() const
00138 {
00139   AQ_CALL_RET_V(count(), uint);
00140 }
00141 inline bool AQSPointArray::isEmpty() const
00142 {
00143   AQ_CALL_RET_V(isEmpty(), bool);
00144 }
00145 inline bool AQSPointArray::isNull() const
00146 {
00147   AQ_CALL_RET_V(isNull(), bool);
00148 }
00149 inline bool AQSPointArray::resize(uint arg0)
00150 {
00151   AQ_CALL_RET_V(resize(arg0), bool);
00152 }
00153 inline bool AQSPointArray::truncate(uint arg0)
00154 {
00155   AQ_CALL_RET_V(truncate(arg0), bool);
00156 }
00157 inline bool AQSPointArray::fill(const QPoint &arg0,  int arg1)
00158 {
00159   AQ_CALL_RET_V(fill(arg0, arg1), bool);
00160 }
00161 inline int AQSPointArray::find(const QPoint &arg0,  uint arg1) const
00162 {
00163   AQ_CALL_RET_V(find(arg0, arg1), int);
00164 }
00165 inline int AQSPointArray::contains(const QPoint &arg0) const
00166 {
00167   AQ_CALL_RET_V(contains(arg0), int);
00168 }
00169 inline void AQSPointArray::sort()
00170 {
00171   AQ_CALL_VOID(sort());
00172 }
00173 inline int AQSPointArray::bsearch(const QPoint &arg0) const
00174 {
00175   AQ_CALL_RET_V(bsearch(arg0), int);
00176 }
00177 inline void AQSPointArray::translate(int arg0,  int arg1)
00178 {
00179   AQ_CALL_VOID(translate(arg0, arg1));
00180 }
00181 inline QRect AQSPointArray::boundingRect() const
00182 {
00183   AQ_CALL_RET_V(boundingRect(), QRect);
00184 }
00185 inline void AQSPointArray::point(uint arg0,  int *arg1,  int *arg2) const
00186 {
00187   AQ_CALL_VOID(point(arg0, arg1, arg2));
00188 }
00189 inline QPoint AQSPointArray::point(uint arg0) const
00190 {
00191   AQ_CALL_RET_V(point(arg0), QPoint);
00192 }
00193 inline void AQSPointArray::setPoint(uint arg0,  int arg1,  int arg2)
00194 {
00195   AQ_CALL_VOID(setPoint(arg0, arg1, arg2));
00196 }
00197 inline void AQSPointArray::setPoint(uint arg0,  const QPoint &arg1)
00198 {
00199   AQ_CALL_VOID(setPoint(arg0, arg1));
00200 }
00201 inline bool AQSPointArray::putPoints(int arg0,  int arg1,  QPointArray *arg2,  int arg3)
00202 {
00203   AQ_CALL_RET_V(putPoints(arg0, arg1, *arg2, arg3), bool);
00204 }
00205 inline bool AQSPointArray::putPoints(int arg0,  int arg1, AQSPointArray *arg2,  int arg3)
00206 {
00207   AQ_CALL_RET_V(putPoints(arg0, arg1, *arg2, arg3), bool);
00208 }
00209 inline void AQSPointArray::makeArc(int arg0,  int arg1,  int arg2,  int arg3,  int arg4,  int arg5)
00210 {
00211   AQ_CALL_VOID(makeArc(arg0, arg1, arg2, arg3, arg4, arg5));
00212 }
00213 inline void AQSPointArray::makeEllipse(int arg0,  int arg1,  int arg2,  int arg3)
00214 {
00215   AQ_CALL_VOID(makeEllipse(arg0, arg1, arg2, arg3));
00216 }
00217 inline QPointArray *AQSPointArray::cubicBezier() const
00218 {
00219   AQ_CALL_RET_PTR(cubicBezier(), QPointArray);
00220 }
00221 inline void AQSPointArray::detach()
00222 {
00223   AQ_CALL_VOID(detach());
00224 }
00225 inline QPointArray *AQSPointArray::copy() const
00226 {
00227   AQ_CALL_RET_PTR(copy(), QPointArray);
00228 }
00229 //@AQ_END_IMP_PUB_SLOTS@
00230 
00231 #endif /* AQSPOINTARRAY_P_H_ */
00232 // @AQSVOIDPTR@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'