Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSWidget_p.h 00003 ------------------- 00004 begin : 29/01/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 AQSWIDGET_P_H_ 00020 #define AQSWIDGET_P_H_ 00021 00022 #include "AQSObject_p.h" 00023 #include <qwidget.h> 00024 00025 class AQSWidget : public AQSObject 00026 { 00027 Q_OBJECT 00028 00029 AQ_DECLARE_AQS_OBJECT(Widget, Object); 00030 00031 public slots: 00032 QPaintDevice *paintDevice() const { 00033 return static_cast<QPaintDevice *>(o_); 00034 } 00035 00036 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00037 public slots: 00038 QWidget *parentWidget(bool = FALSE) const; 00039 uint testWFlags(WFlags) const; 00040 QWidget *childAt(int, int, bool = FALSE) const; 00041 QWidget *childAt(const QPoint &, bool = FALSE) const; 00042 QFontMetrics *fontMetrics() const; 00043 void setFixedSize(const QSize &); 00044 void setFixedSize(int, int); 00045 void setFixedWidth(int); 00046 void setFixedHeight(int); 00047 QLayout *layout() const; 00048 void setSizePolicy(uint, uint, bool = FALSE); 00049 00050 protected: 00051 static void *construct(const QSArgumentList &args) { 00052 QMap<int, QStringList> candidates; 00053 candidates[0].append(QString::null); 00054 candidates[1].append(QString::fromLatin1("QWidget*")); 00055 candidates[2].append(QString::fromLatin1("QWidget*,QString")); 00056 candidates[3].append(QString::fromLatin1("QWidget*,QString,WFlags")); 00057 QString sgt(castArgsSignature(args, candidates)); 00058 if (sgt.isEmpty()) 00059 return new QWidget; 00060 if (sgt == QString::fromLatin1("QWidget*")) 00061 return new QWidget(argValue<QWidget *>(args[0])); 00062 if (sgt == QString::fromLatin1("QWidget*,QString")) 00063 return new QWidget(argValue<QWidget *>(args[0]), 00064 *(argValue<QString *>(args[1]))); 00065 if (sgt == QString::fromLatin1("QWidget*,QString,WFlags")) 00066 return new QWidget(argValue<QWidget *>(args[0]), 00067 *(argValue<QString *>(args[1])), 00068 static_cast<WFlags>(args[2].variant().toUInt())); 00069 return 0; 00070 } 00071 00072 public: 00073 static QMap<int, QStringList> candidateConstructors() { 00074 QMap<int, QStringList> candidates; 00075 candidates[0].append(QString::null); 00076 candidates[1].append(QString::fromLatin1("QWidget*")); 00077 candidates[2].append(QString::fromLatin1("QWidget*,QString")); 00078 candidates[3].append(QString::fromLatin1("QWidget*,QString,WFlags")); 00079 return candidates; 00080 } 00081 //@AQ_END_DEF_PUB_SLOTS@ 00082 }; 00083 00084 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00085 inline QWidget *AQSWidget::parentWidget(bool arg0) const 00086 { 00087 AQ_CALL_RET(parentWidget(arg0)); 00088 } 00089 inline uint AQSWidget::testWFlags(WFlags arg0) const 00090 { 00091 AQ_CALL_RET_V(testWFlags(arg0), uint); 00092 } 00093 inline QWidget *AQSWidget::childAt(int arg0, int arg1, bool arg2) const 00094 { 00095 AQ_CALL_RET(childAt(arg0, arg1, arg2)); 00096 } 00097 inline QWidget *AQSWidget::childAt(const QPoint &arg0, bool arg1) const 00098 { 00099 AQ_CALL_RET(childAt(arg0, arg1)); 00100 } 00101 inline QFontMetrics *AQSWidget::fontMetrics() const 00102 { 00103 AQ_CALL_RET_PTR(fontMetrics(), QFontMetrics); 00104 } 00105 inline void AQSWidget::setFixedSize(const QSize &arg0) 00106 { 00107 AQ_CALL_VOID(setFixedSize(arg0)); 00108 } 00109 inline void AQSWidget::setFixedSize(int arg0, int arg1) 00110 { 00111 AQ_CALL_VOID(setFixedSize(arg0, arg1)); 00112 } 00113 inline void AQSWidget::setFixedWidth(int arg0) 00114 { 00115 AQ_CALL_VOID(setFixedWidth(arg0)); 00116 } 00117 inline void AQSWidget::setFixedHeight(int arg0) 00118 { 00119 AQ_CALL_VOID(setFixedHeight(arg0)); 00120 } 00121 inline QLayout *AQSWidget::layout() const 00122 { 00123 AQ_CALL_RET(layout()); 00124 } 00125 inline void AQSWidget::setSizePolicy(uint arg0, uint arg1, bool arg2) 00126 { 00127 AQ_CALL_VOID(setSizePolicy(static_cast<QSizePolicy::SizeType>(arg0), static_cast<QSizePolicy::SizeType>(arg1), arg2)); 00128 } 00129 //@AQ_END_IMP_PUB_SLOTS@ 00130 00131 #endif /* AQSWIDGET_P_H_ */ 00132 // @AQSWIDGET@