Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSFontMetrics_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSFontMetrics_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  trminos  de  la  Licencia  Pblica General de GNU   en  su
00016  versin 2, publicada  por  la  Free  Software Foundation.
00017  ***************************************************************************/
00018 
00019 #ifndef AQSFONTMETRICS_P_H_
00020 #define AQSFONTMETRICS_P_H_
00021 
00022 #include "AQSVoidPtr_p.h"
00023 #include <qfontmetrics.h>
00024 
00025 // @AQ_PTR_INDIRECTION@
00026 
00027 class AQSFontMetrics : public AQSVoidPtr
00028 {
00029   Q_OBJECT
00030 
00031   AQ_DECLARE_AQS_VOID(FontMetrics, 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   int ascent() const;
00042   int descent() const;
00043   int height() const;
00044   int leading() const;
00045   int lineSpacing() const;
00046   int minLeftBearing() const;
00047   int minRightBearing() const;
00048   int maxWidth() const;
00049   bool inFont(QChar) const;
00050   int leftBearing(QChar) const;
00051   int rightBearing(QChar) const;
00052   int width(const QString &, int = -1) const;
00053   int width(QChar) const;
00054   int charWidth(const QString &, int) const;
00055   QRect boundingRect(const QString &, int = -1) const;
00056   QRect boundingRect(QChar) const;
00057   QRect boundingRect(int, int, int, int, int, const QString &, int = -1, int = 0, int* = 0, QTextParag ** = 0) const;
00058   QSize size(int, const QString &, int = -1, int = 0, int* = 0, QTextParag ** = 0) const;
00059   int underlinePos() const;
00060   int overlinePos() const;
00061   int strikeOutPos() const;
00062   int lineWidth() const;
00063 
00064 protected:
00065   static void *construct(const QSArgumentList &args) {
00066     QMap<int, QStringList> candidates;
00067     candidates[1].append(QString::fromLatin1("QFont"));
00068     candidates[2].append(QString::fromLatin1("QFont,QFont::Script"));
00069     candidates[1].append(QString::fromLatin1("QFontMetrics*"));
00070     QString sgt(castArgsSignature(args, candidates));
00071     if (sgt == QString::fromLatin1("QFont"))
00072       return new QFontMetrics(*(argValue<QFont *>(args[0])));
00073     if (sgt == QString::fromLatin1("QFont,QFont::Script"))
00074       return new QFontMetrics(*(argValue<QFont *>(args[0])),
00075                               static_cast<QFont::Script>(args[1].variant().toUInt()));
00076     if (sgt == QString::fromLatin1("QFontMetrics*"))
00077       return new QFontMetrics(*argValue<QFontMetrics *>(args[0]));
00078     return 0;
00079   }
00080 
00081 public:
00082   static QMap<int, QStringList> candidateConstructors() {
00083     QMap<int, QStringList> candidates;
00084     candidates[1].append(QString::fromLatin1("QFont"));
00085     candidates[2].append(QString::fromLatin1("QFont,QFont::Script"));
00086     candidates[1].append(QString::fromLatin1("QFontMetrics*"));
00087     return candidates;
00088   }
00089   //@AQ_END_DEF_PUB_SLOTS@
00090 };
00091 
00092 //@AQ_BEGIN_IMP_PUB_SLOTS@
00093 inline int AQSFontMetrics::ascent() const
00094 {
00095   AQ_CALL_RET_V(ascent(), int);
00096 }
00097 inline int AQSFontMetrics::descent() const
00098 {
00099   AQ_CALL_RET_V(descent(), int);
00100 }
00101 inline int AQSFontMetrics::height() const
00102 {
00103   AQ_CALL_RET_V(height(), int);
00104 }
00105 inline int AQSFontMetrics::leading() const
00106 {
00107   AQ_CALL_RET_V(leading(), int);
00108 }
00109 inline int AQSFontMetrics::lineSpacing() const
00110 {
00111   AQ_CALL_RET_V(lineSpacing(), int);
00112 }
00113 inline int AQSFontMetrics::minLeftBearing() const
00114 {
00115   AQ_CALL_RET_V(minLeftBearing(), int);
00116 }
00117 inline int AQSFontMetrics::minRightBearing() const
00118 {
00119   AQ_CALL_RET_V(minRightBearing(), int);
00120 }
00121 inline int AQSFontMetrics::maxWidth() const
00122 {
00123   AQ_CALL_RET_V(maxWidth(), int);
00124 }
00125 inline bool AQSFontMetrics::inFont(QChar arg0) const
00126 {
00127   AQ_CALL_RET_V(inFont(arg0), bool);
00128 }
00129 inline int AQSFontMetrics::leftBearing(QChar arg0) const
00130 {
00131   AQ_CALL_RET_V(leftBearing(arg0), int);
00132 }
00133 inline int AQSFontMetrics::rightBearing(QChar arg0) const
00134 {
00135   AQ_CALL_RET_V(rightBearing(arg0), int);
00136 }
00137 inline int AQSFontMetrics::width(const QString &arg0,  int arg1) const
00138 {
00139   AQ_CALL_RET_V(width(arg0, arg1), int);
00140 }
00141 inline int AQSFontMetrics::width(QChar arg0) const
00142 {
00143   AQ_CALL_RET_V(width(arg0), int);
00144 }
00145 inline int AQSFontMetrics::charWidth(const QString &arg0,  int arg1) const
00146 {
00147   AQ_CALL_RET_V(charWidth(arg0, arg1), int);
00148 }
00149 inline QRect AQSFontMetrics::boundingRect(const QString &arg0,  int arg1) const
00150 {
00151   AQ_CALL_RET_V(boundingRect(arg0, arg1), QRect);
00152 }
00153 inline QRect AQSFontMetrics::boundingRect(QChar arg0) const
00154 {
00155   AQ_CALL_RET_V(boundingRect(arg0), QRect);
00156 }
00157 inline QRect AQSFontMetrics::boundingRect(int arg0,  int arg1,  int arg2,  int arg3,  int arg4,  const QString &arg5,  int arg6,  int arg7,  int *arg8,  QTextParag **arg9) const
00158 {
00159   AQ_CALL_RET_V(boundingRect(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9), QRect);
00160 }
00161 inline QSize AQSFontMetrics::size(int arg0,  const QString &arg1,  int arg2,  int arg3,  int *arg4,  QTextParag **arg5) const
00162 {
00163   AQ_CALL_RET_V(size(arg0, arg1, arg2, arg3, arg4, arg5), QSize);
00164 }
00165 inline int AQSFontMetrics::underlinePos() const
00166 {
00167   AQ_CALL_RET_V(underlinePos(), int);
00168 }
00169 inline int AQSFontMetrics::overlinePos() const
00170 {
00171   AQ_CALL_RET_V(overlinePos(), int);
00172 }
00173 inline int AQSFontMetrics::strikeOutPos() const
00174 {
00175   AQ_CALL_RET_V(strikeOutPos(), int);
00176 }
00177 inline int AQSFontMetrics::lineWidth() const
00178 {
00179   AQ_CALL_RET_V(lineWidth(), int);
00180 }
00181 //@AQ_END_IMP_PUB_SLOTS@
00182 
00183 #endif /* AQSFONTMETRICS_P_H_ */
00184 // @AQSVOIDPTR@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'