Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSWMatrix_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSWMatrix_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 AQSWMATRIX_P_H_
00020 #define AQSWMATRIX_P_H_
00021 
00022 #include "AQSRegion_p.h"
00023 #include <qwmatrix.h>
00024 
00025 // @AQ_PTR_INDIRECTION@
00026 
00027 class AQSWMatrix : public AQSVoidPtr
00028 {
00029   Q_OBJECT
00030 
00031   AQ_DECLARE_AQS_VOID(WMatrix, VoidPtr);
00032 
00033 protected:
00034   void specializedInternalFinish() {
00035     if (!wrap_)
00036       delete o_;
00037   }
00038 
00039   //@AQ_BEGIN_DEF_PUB_SLOTS@
00040 public slots:
00041   void setMatrix(double, double, double, double, double, double);
00042   double m11() const;
00043   double m12() const;
00044   double m21() const;
00045   double m22() const;
00046   double dx() const;
00047   double dy() const;
00048   void map(int, int, int *, int *) const;
00049   void map(double, double, double *, double *) const;
00050   QRect mapRect(const QRect &) const;
00051   QPoint map(const QPoint &) const;
00052   QPointArray *map(QPointArray *) const;
00053   QPointArray *map(AQSPointArray *) const;
00054   QRegion *map(QRegion *) const;
00055   QRegion *map(AQSRegion *) const;
00056   QRegion *mapToRegion(const QRect &) const;
00057   QPointArray *mapToPolygon(const QRect &) const;
00058   void reset();
00059   bool isIdentity() const;
00060   QWMatrix *translate(double, double);
00061   QWMatrix *scale(double, double);
00062   QWMatrix *shear(double, double);
00063   QWMatrix *rotate(double);
00064   bool isInvertible() const;
00065   double det() const;
00066   QWMatrix *invert(bool* = 0) const;
00067 
00068 protected:
00069   static void *construct(const QSArgumentList &args) {
00070     QMap<int, QStringList> candidates;
00071     candidates[0].append(QString::null);
00072     candidates[6].append(QString::fromLatin1("double,double,double,double,double,double"));
00073     QString sgt(castArgsSignature(args, candidates));
00074     if (sgt.isEmpty())
00075       return new QWMatrix;
00076     if (sgt == QString::fromLatin1("double,double,double,double,double,double"))
00077       return new QWMatrix(args[0].variant().toDouble(),
00078                           args[1].variant().toDouble(),
00079                           args[2].variant().toDouble(),
00080                           args[3].variant().toDouble(),
00081                           args[4].variant().toDouble(),
00082                           args[5].variant().toDouble());
00083     return 0;
00084   }
00085 
00086 public:
00087   static QMap<int, QStringList> candidateConstructors() {
00088     QMap<int, QStringList> candidates;
00089     candidates[0].append(QString::null);
00090     candidates[6].append(QString::fromLatin1("double,double,double,double,double,double"));
00091     return candidates;
00092   }
00093   //@AQ_END_DEF_PUB_SLOTS@
00094 };
00095 
00096 //@AQ_BEGIN_IMP_PUB_SLOTS@
00097 inline void AQSWMatrix::setMatrix(double arg0,  double arg1,  double arg2,  double arg3,  double arg4,  double arg5)
00098 {
00099   AQ_CALL_VOID(setMatrix(arg0, arg1, arg2, arg3, arg4, arg5));
00100 }
00101 inline double AQSWMatrix::m11() const
00102 {
00103   AQ_CALL_RET_V(m11(), double);
00104 }
00105 inline double AQSWMatrix::m12() const
00106 {
00107   AQ_CALL_RET_V(m12(), double);
00108 }
00109 inline double AQSWMatrix::m21() const
00110 {
00111   AQ_CALL_RET_V(m21(), double);
00112 }
00113 inline double AQSWMatrix::m22() const
00114 {
00115   AQ_CALL_RET_V(m22(), double);
00116 }
00117 inline double AQSWMatrix::dx() const
00118 {
00119   AQ_CALL_RET_V(dx(), double);
00120 }
00121 inline double AQSWMatrix::dy() const
00122 {
00123   AQ_CALL_RET_V(dy(), double);
00124 }
00125 inline void AQSWMatrix::map(int arg0,  int arg1,  int *arg2,  int *arg3) const
00126 {
00127   AQ_CALL_VOID(map(arg0, arg1, arg2, arg3));
00128 }
00129 inline void AQSWMatrix::map(double arg0,  double arg1,  double *arg2,  double *arg3) const
00130 {
00131   AQ_CALL_VOID(map(arg0, arg1, arg2, arg3));
00132 }
00133 inline QRect AQSWMatrix::mapRect(const QRect &arg0) const
00134 {
00135   AQ_CALL_RET_V(mapRect(arg0), QRect);
00136 }
00137 inline QPoint AQSWMatrix::map(const QPoint &arg0) const
00138 {
00139   AQ_CALL_RET_V(map(arg0), QPoint);
00140 }
00141 inline QPointArray *AQSWMatrix::map(QPointArray *arg0) const
00142 {
00143   AQ_CALL_RET_PTR(map(*arg0), QPointArray);
00144 }
00145 inline QPointArray *AQSWMatrix::map(AQSPointArray *arg0) const
00146 {
00147   AQ_CALL_RET_PTR(map(*arg0), QPointArray);
00148 }
00149 inline QRegion *AQSWMatrix::map(QRegion *arg0) const
00150 {
00151   AQ_CALL_RET_PTR(map(*arg0), QRegion);
00152 }
00153 inline QRegion *AQSWMatrix::map(AQSRegion *arg0) const
00154 {
00155   AQ_CALL_RET_PTR(map(*arg0), QRegion);
00156 }
00157 inline QRegion *AQSWMatrix::mapToRegion(const QRect &arg0) const
00158 {
00159   AQ_CALL_RET_PTR(mapToRegion(arg0), QRegion);
00160 }
00161 inline QPointArray *AQSWMatrix::mapToPolygon(const QRect &arg0) const
00162 {
00163   AQ_CALL_RET_PTR(mapToPolygon(arg0), QPointArray);
00164 }
00165 inline void AQSWMatrix::reset()
00166 {
00167   AQ_CALL_VOID(reset());
00168 }
00169 inline bool AQSWMatrix::isIdentity() const
00170 {
00171   AQ_CALL_RET_V(isIdentity(), bool);
00172 }
00173 inline QWMatrix *AQSWMatrix::translate(double arg0,  double arg1)
00174 {
00175   AQ_CALL_RET_PTR(translate(arg0, arg1), QWMatrix);
00176 }
00177 inline QWMatrix *AQSWMatrix::scale(double arg0,  double arg1)
00178 {
00179   AQ_CALL_RET_PTR(scale(arg0, arg1), QWMatrix);
00180 }
00181 inline QWMatrix *AQSWMatrix::shear(double arg0,  double arg1)
00182 {
00183   AQ_CALL_RET_PTR(shear(arg0, arg1), QWMatrix);
00184 }
00185 inline QWMatrix *AQSWMatrix::rotate(double arg0)
00186 {
00187   AQ_CALL_RET_PTR(rotate(arg0), QWMatrix);
00188 }
00189 inline bool AQSWMatrix::isInvertible() const
00190 {
00191   AQ_CALL_RET_V(isInvertible(), bool);
00192 }
00193 inline double AQSWMatrix::det() const
00194 {
00195   AQ_CALL_RET_V(det(), double);
00196 }
00197 inline QWMatrix *AQSWMatrix::invert(bool *arg0) const
00198 {
00199   AQ_CALL_RET_PTR(invert(arg0), QWMatrix);
00200 }
00201 //@AQ_END_IMP_PUB_SLOTS@
00202 
00203 #endif /* AQSWMATRIX_P_H_ */
00204 // @AQSVOIDPTR@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'