Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSIconSet_p.h 00003 ------------------- 00004 begin : 11/04/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 AQSICONSET_P_H_ 00020 #define AQSICONSET_P_H_ 00021 00022 #include "AQSPixmap_p.h" 00023 #include <qiconset.h> 00024 00025 // @AQ_PTR_INDIRECTION@ 00026 00027 class AQSIconSet : public AQSVoidPtr 00028 { 00029 Q_OBJECT 00030 00031 Q_PROPERTY(QIconSet toVariant READ toVariant); 00032 00033 AQ_DECLARE_AQS_VOID(IconSet, VoidPtr); 00034 00035 public: 00036 QIconSet toVariant() const { 00037 if (!o_) 00038 return QIconSet(); 00039 return *o_; 00040 } 00041 00042 protected: 00043 void specializedInternalFinish() { 00044 if (!wrap_) 00045 delete o_; 00046 } 00047 00048 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00049 public slots: 00050 void reset(QPixmap *, uint); 00051 void reset(AQSPixmap *, uint); 00052 virtual void setPixmap(QPixmap *, uint, uint = QIconSet::Normal, uint = QIconSet::Off); 00053 virtual void setPixmap(AQSPixmap *, uint, uint = QIconSet::Normal, uint = QIconSet::Off); 00054 virtual void setPixmap(const QString &, uint, uint = QIconSet::Normal, uint = QIconSet::Off); 00055 QPixmap *pixmap(uint, uint, uint = QIconSet::Off) const; 00056 QPixmap *pixmap() const; 00057 bool isGenerated(uint, uint, uint = QIconSet::Off) const; 00058 void clearGenerated(); 00059 bool isNull() const; 00060 void detach(); 00061 00062 protected: 00063 static void *construct(const QSArgumentList &args) { 00064 QMap<int, QStringList> candidates; 00065 candidates[0].append(QString::null); 00066 candidates[1].append(QString::fromLatin1("QPixmap*")); 00067 candidates[2].append(QString::fromLatin1("QPixmap*,QIconSet::Size")); 00068 candidates[2].append(QString::fromLatin1("QPixmap*,QPixmap*")); 00069 candidates[1].append(QString::fromLatin1("QIconSet*")); 00070 QString sgt(castArgsSignature(args, candidates)); 00071 if (sgt.isEmpty()) 00072 return new QIconSet; 00073 if (sgt == QString::fromLatin1("QPixmap*")) 00074 return new QIconSet(*argValue<QPixmap *>(args[0])); 00075 if (sgt == QString::fromLatin1("QPixmap*,QIconSet::Size")) 00076 return new QIconSet(*argValue<QPixmap *>(args[0]), 00077 static_cast<QIconSet::Size>(args[1].variant().toUInt())); 00078 if (sgt == QString::fromLatin1("QPixmap*,QPixmap*")) 00079 return new QIconSet(*argValue<QPixmap *>(args[0]), 00080 *argValue<QPixmap *>(args[1])); 00081 if (sgt == QString::fromLatin1("QIconSet*")) 00082 return new QIconSet(*argValue<QIconSet *>(args[0])); 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[1].append(QString::fromLatin1("QPixmap*")); 00091 candidates[2].append(QString::fromLatin1("QPixmap*,QIconSet::Size")); 00092 candidates[2].append(QString::fromLatin1("QPixmap*,QPixmap*")); 00093 candidates[1].append(QString::fromLatin1("QIconSet*")); 00094 return candidates; 00095 } 00096 //@AQ_END_DEF_PUB_SLOTS@ 00097 }; 00098 00099 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00100 inline void AQSIconSet::reset(QPixmap *arg0, uint arg1) 00101 { 00102 AQ_CALL_VOID(reset(*arg0, static_cast<QIconSet::Size>(arg1))); 00103 } 00104 inline void AQSIconSet::reset(AQSPixmap *arg0, uint arg1) 00105 { 00106 AQ_CALL_VOID(reset(*arg0, static_cast<QIconSet::Size>(arg1))); 00107 } 00108 inline void AQSIconSet::setPixmap(QPixmap *arg0, uint arg1, uint arg2, uint arg3) 00109 { 00110 AQ_CALL_VOID(setPixmap(*arg0, static_cast<QIconSet::Size>(arg1), static_cast<QIconSet::Mode>(arg2), static_cast<QIconSet::State>(arg3))); 00111 } 00112 inline void AQSIconSet::setPixmap(AQSPixmap *arg0, uint arg1, uint arg2, uint arg3) 00113 { 00114 AQ_CALL_VOID(setPixmap(*arg0, static_cast<QIconSet::Size>(arg1), static_cast<QIconSet::Mode>(arg2), static_cast<QIconSet::State>(arg3))); 00115 } 00116 inline void AQSIconSet::setPixmap(const QString &arg0, uint arg1, uint arg2, uint arg3) 00117 { 00118 AQ_CALL_VOID(setPixmap(arg0, static_cast<QIconSet::Size>(arg1), static_cast<QIconSet::Mode>(arg2), static_cast<QIconSet::State>(arg3))); 00119 } 00120 inline QPixmap *AQSIconSet::pixmap(uint arg0, uint arg1, uint arg2) const 00121 { 00122 AQ_CALL_RET_PTR(pixmap(static_cast<QIconSet::Size>(arg0), static_cast<QIconSet::Mode>(arg1), static_cast<QIconSet::State>(arg2)), QPixmap); 00123 } 00124 inline QPixmap *AQSIconSet::pixmap() const 00125 { 00126 AQ_CALL_RET_PTR(pixmap(), QPixmap); 00127 } 00128 inline bool AQSIconSet::isGenerated(uint arg0, uint arg1, uint arg2) const 00129 { 00130 AQ_CALL_RET_V(isGenerated(static_cast<QIconSet::Size>(arg0), static_cast<QIconSet::Mode>(arg1), static_cast<QIconSet::State>(arg2)), bool); 00131 } 00132 inline void AQSIconSet::clearGenerated() 00133 { 00134 AQ_CALL_VOID(clearGenerated()); 00135 } 00136 inline bool AQSIconSet::isNull() const 00137 { 00138 AQ_CALL_RET_V(isNull(), bool); 00139 } 00140 inline void AQSIconSet::detach() 00141 { 00142 AQ_CALL_VOID(detach()); 00143 } 00144 //@AQ_END_IMP_PUB_SLOTS@ 00145 00146 #endif /* AQSICONSET_P_H_ */ 00147 // @AQSVOIDPTR@