Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSBoxLayout_p.h 00003 ------------------- 00004 begin : 07/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 AQSBOXLAYOUT_P_H_ 00020 #define AQSBOXLAYOUT_P_H_ 00021 00022 #include "AQSLayout_p.h" 00023 #include <qlayout.h> 00024 00025 class AQSBoxLayout : public AQSLayout 00026 { 00027 Q_OBJECT 00028 00029 AQ_DECLARE_AQS_OBJECT(BoxLayout, Layout); 00030 00031 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00032 public slots: 00033 void addItem(QLayoutItem *); 00034 uint direction() const; 00035 void setDirection(uint); 00036 void addSpacing(int); 00037 void addStretch(int = 0); 00038 void addWidget(QWidget *, int = 0, int = 0); 00039 void addLayout(QLayout *, int = 0); 00040 void addStrut(int); 00041 void insertSpacing(int, int); 00042 void insertStretch(int, int = 0); 00043 void insertWidget(int, QWidget *, int = 0, int = 0); 00044 void insertLayout(int, QLayout *, int = 0); 00045 bool setStretchFactor(QWidget *, int); 00046 bool setStretchFactor(QLayout *, int); 00047 QSize sizeHint() const; 00048 QSize minimumSize() const; 00049 QSize maximumSize() const; 00050 bool hasHeightForWidth() const; 00051 int heightForWidth(int) const; 00052 uint expanding() const; 00053 void invalidate(); 00054 bool activate(); 00055 void setGeometry(const QRect &); 00056 int findWidget(QWidget *); 00057 00058 protected: 00059 static void *construct(const QSArgumentList &args) { 00060 QMap<int, QStringList> candidates; 00061 candidates[2].append(QString::fromLatin1("QWidget*,QBoxLayout::Direction")); 00062 candidates[3].append(QString::fromLatin1("QWidget*,QBoxLayout::Direction,int")); 00063 candidates[4].append(QString::fromLatin1("QWidget*,QBoxLayout::Direction,int,int")); 00064 candidates[5].append(QString::fromLatin1("QWidget*,QBoxLayout::Direction,int,int,QString")); 00065 candidates[2].append(QString::fromLatin1("QLayout*,QBoxLayout::Direction")); 00066 candidates[3].append(QString::fromLatin1("QLayout*,QBoxLayout::Direction,int")); 00067 candidates[4].append(QString::fromLatin1("QLayout*,QBoxLayout::Direction,int,QString")); 00068 candidates[1].append(QString::fromLatin1("QBoxLayout::Direction")); 00069 candidates[2].append(QString::fromLatin1("QBoxLayout::Direction,int")); 00070 candidates[3].append(QString::fromLatin1("QBoxLayout::Direction,int,QString")); 00071 QString sgt(castArgsSignature(args, candidates)); 00072 if (sgt == QString::fromLatin1("QWidget*,QBoxLayout::Direction")) 00073 return new QBoxLayout(argValue<QWidget *>(args[0]), 00074 static_cast<QBoxLayout::Direction>(args[1].variant().toUInt())); 00075 if (sgt == QString::fromLatin1("QWidget*,QBoxLayout::Direction,int")) 00076 return new QBoxLayout(argValue<QWidget *>(args[0]), 00077 static_cast<QBoxLayout::Direction>(args[1].variant().toUInt()), 00078 args[2].variant().toInt()); 00079 if (sgt == QString::fromLatin1("QWidget*,QBoxLayout::Direction,int,int")) 00080 return new QBoxLayout(argValue<QWidget *>(args[0]), 00081 static_cast<QBoxLayout::Direction>(args[1].variant().toUInt()), 00082 args[2].variant().toInt(), 00083 args[3].variant().toInt()); 00084 if (sgt == QString::fromLatin1("QWidget*,QBoxLayout::Direction,int,int,QString")) 00085 return new QBoxLayout(argValue<QWidget *>(args[0]), 00086 static_cast<QBoxLayout::Direction>(args[1].variant().toUInt()), 00087 args[2].variant().toInt(), 00088 args[3].variant().toInt(), 00089 *(argValue<QString *>(args[4]))); 00090 if (sgt == QString::fromLatin1("QLayout*,QBoxLayout::Direction")) 00091 return new QBoxLayout(argValue<QLayout *>(args[0]), 00092 static_cast<QBoxLayout::Direction>(args[1].variant().toUInt())); 00093 if (sgt == QString::fromLatin1("QLayout*,QBoxLayout::Direction,int")) 00094 return new QBoxLayout(argValue<QLayout *>(args[0]), 00095 static_cast<QBoxLayout::Direction>(args[1].variant().toUInt()), 00096 args[2].variant().toInt()); 00097 if (sgt == QString::fromLatin1("QLayout*,QBoxLayout::Direction,int,QString")) 00098 return new QBoxLayout(argValue<QLayout *>(args[0]), 00099 static_cast<QBoxLayout::Direction>(args[1].variant().toUInt()), 00100 args[2].variant().toInt(), 00101 *(argValue<QString *>(args[3]))); 00102 if (sgt == QString::fromLatin1("QBoxLayout::Direction")) 00103 return new QBoxLayout(static_cast<QBoxLayout::Direction>(args[0].variant().toUInt())); 00104 if (sgt == QString::fromLatin1("QBoxLayout::Direction,int")) 00105 return new QBoxLayout(static_cast<QBoxLayout::Direction>(args[0].variant().toUInt()), 00106 args[1].variant().toInt()); 00107 if (sgt == QString::fromLatin1("QBoxLayout::Direction,int,QString")) 00108 return new QBoxLayout(static_cast<QBoxLayout::Direction>(args[0].variant().toUInt()), 00109 args[1].variant().toInt(), 00110 *(argValue<QString *>(args[2]))); 00111 return 0; 00112 } 00113 00114 public: 00115 static QMap<int, QStringList> candidateConstructors() { 00116 QMap<int, QStringList> candidates; 00117 candidates[2].append(QString::fromLatin1("QWidget*,QBoxLayout::Direction")); 00118 candidates[3].append(QString::fromLatin1("QWidget*,QBoxLayout::Direction,int")); 00119 candidates[4].append(QString::fromLatin1("QWidget*,QBoxLayout::Direction,int,int")); 00120 candidates[5].append(QString::fromLatin1("QWidget*,QBoxLayout::Direction,int,int,QString")); 00121 candidates[2].append(QString::fromLatin1("QLayout*,QBoxLayout::Direction")); 00122 candidates[3].append(QString::fromLatin1("QLayout*,QBoxLayout::Direction,int")); 00123 candidates[4].append(QString::fromLatin1("QLayout*,QBoxLayout::Direction,int,QString")); 00124 candidates[1].append(QString::fromLatin1("QBoxLayout::Direction")); 00125 candidates[2].append(QString::fromLatin1("QBoxLayout::Direction,int")); 00126 candidates[3].append(QString::fromLatin1("QBoxLayout::Direction,int,QString")); 00127 return candidates; 00128 } 00129 //@AQ_END_DEF_PUB_SLOTS@ 00130 }; 00131 00132 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00133 inline void AQSBoxLayout::addItem(QLayoutItem *arg0) 00134 { 00135 AQ_CALL_VOID(addItem(arg0)); 00136 } 00137 inline uint AQSBoxLayout::direction() const 00138 { 00139 AQ_CALL_RET_V(direction(), uint); 00140 } 00141 inline void AQSBoxLayout::setDirection(uint arg0) 00142 { 00143 AQ_CALL_VOID(setDirection(static_cast<QBoxLayout::Direction>(arg0))); 00144 } 00145 inline void AQSBoxLayout::addSpacing(int arg0) 00146 { 00147 AQ_CALL_VOID(addSpacing(arg0)); 00148 } 00149 inline void AQSBoxLayout::addStretch(int arg0) 00150 { 00151 AQ_CALL_VOID(addStretch(arg0)); 00152 } 00153 inline void AQSBoxLayout::addWidget(QWidget *arg0, int arg1, int arg2) 00154 { 00155 AQ_CALL_VOID(addWidget(arg0, arg1, arg2)); 00156 } 00157 inline void AQSBoxLayout::addLayout(QLayout *arg0, int arg1) 00158 { 00159 AQ_CALL_VOID(addLayout(arg0, arg1)); 00160 } 00161 inline void AQSBoxLayout::addStrut(int arg0) 00162 { 00163 AQ_CALL_VOID(addStrut(arg0)); 00164 } 00165 inline void AQSBoxLayout::insertSpacing(int arg0, int arg1) 00166 { 00167 AQ_CALL_VOID(insertSpacing(arg0, arg1)); 00168 } 00169 inline void AQSBoxLayout::insertStretch(int arg0, int arg1) 00170 { 00171 AQ_CALL_VOID(insertStretch(arg0, arg1)); 00172 } 00173 inline void AQSBoxLayout::insertWidget(int arg0, QWidget *arg1, int arg2, int arg3) 00174 { 00175 AQ_CALL_VOID(insertWidget(arg0, arg1, arg2, arg3)); 00176 } 00177 inline void AQSBoxLayout::insertLayout(int arg0, QLayout *arg1, int arg2) 00178 { 00179 AQ_CALL_VOID(insertLayout(arg0, arg1, arg2)); 00180 } 00181 inline bool AQSBoxLayout::setStretchFactor(QWidget *arg0, int arg1) 00182 { 00183 AQ_CALL_RET_V(setStretchFactor(arg0, arg1), bool); 00184 } 00185 inline bool AQSBoxLayout::setStretchFactor(QLayout *arg0, int arg1) 00186 { 00187 AQ_CALL_RET_V(setStretchFactor(arg0, arg1), bool); 00188 } 00189 inline QSize AQSBoxLayout::sizeHint() const 00190 { 00191 AQ_CALL_RET_V(sizeHint(), QSize); 00192 } 00193 inline QSize AQSBoxLayout::minimumSize() const 00194 { 00195 AQ_CALL_RET_V(minimumSize(), QSize); 00196 } 00197 inline QSize AQSBoxLayout::maximumSize() const 00198 { 00199 AQ_CALL_RET_V(maximumSize(), QSize); 00200 } 00201 inline bool AQSBoxLayout::hasHeightForWidth() const 00202 { 00203 AQ_CALL_RET_V(hasHeightForWidth(), bool); 00204 } 00205 inline int AQSBoxLayout::heightForWidth(int arg0) const 00206 { 00207 AQ_CALL_RET_V(heightForWidth(arg0), int); 00208 } 00209 inline uint AQSBoxLayout::expanding() const 00210 { 00211 AQ_CALL_RET_V(expanding(), uint); 00212 } 00213 inline void AQSBoxLayout::invalidate() 00214 { 00215 AQ_CALL_VOID(invalidate()); 00216 } 00217 inline bool AQSBoxLayout::activate() 00218 { 00219 AQ_CALL_RET_V(activate(), bool); 00220 } 00221 inline void AQSBoxLayout::setGeometry(const QRect &arg0) 00222 { 00223 AQ_CALL_VOID(setGeometry(arg0)); 00224 } 00225 inline int AQSBoxLayout::findWidget(QWidget *arg0) 00226 { 00227 AQ_CALL_RET_V(findWidget(arg0), int); 00228 } 00229 //@AQ_END_IMP_PUB_SLOTS@ 00230 00231 #endif /* AQSBOXLAYOUT_P_H_ */ 00232 // @AQSOBJECT@