Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSAction_p.h 00003 ------------------- 00004 begin : 05/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 AQSACTION_P_H_ 00020 #define AQSACTION_P_H_ 00021 00022 #include "AQSObject_p.h" 00023 #include "AQSIconSet_p.h" 00024 #include <qaction.h> 00025 00026 class AQSAction : public AQSObject 00027 { 00028 Q_OBJECT 00029 00030 AQ_DECLARE_AQS_OBJECT(Action, Object); 00031 00032 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00033 public slots: 00034 virtual void setIconSet(QIconSet *); 00035 virtual void setIconSet(AQSIconSet *); 00036 QIconSet *iconSet() const ; 00037 virtual void setText(const QString &); 00038 virtual void setMenuText(const QString &); 00039 virtual void setToolTip(const QString &); 00040 virtual void setStatusTip(const QString &); 00041 virtual void setWhatsThis(const QString &); 00042 virtual void setAccel(const QKeySequence &); 00043 virtual void setToggleAction(bool); 00044 bool isToggleAction() const; 00045 bool isOn() const; 00046 bool isEnabled() const; 00047 bool isVisible() const; 00048 virtual bool addTo(QWidget *); 00049 virtual bool removeFrom(QWidget *); 00050 00051 protected: 00052 static void *construct(const QSArgumentList &args) { 00053 QMap<int, QStringList> candidates; 00054 candidates[1].append(QString::fromLatin1("QObject*")); 00055 candidates[2].append(QString::fromLatin1("QObject*,QString")); 00056 candidates[3].append(QString::fromLatin1("QString,QKeySequence,QObject*")); 00057 candidates[4].append(QString::fromLatin1("QString,QKeySequence,QObject*,QString")); 00058 candidates[4].append(QString::fromLatin1("QIconSet*,QString,QKeySequence,QObject*")); 00059 candidates[5].append(QString::fromLatin1("QIconSet*,QString,QKeySequence,QObject*,QString")); 00060 QString sgt(castArgsSignature(args, candidates)); 00061 if (sgt == QString::fromLatin1("QObject*")) 00062 return new QAction(argValue<QObject *>(args[0])); 00063 if (sgt == QString::fromLatin1("QObject*,QString")) 00064 return new QAction(argValue<QObject *>(args[0]), 00065 *(argValue<QString *>(args[1]))); 00066 if (sgt == QString::fromLatin1("QString,QKeySequence,QObject*")) 00067 return new QAction(*(argValue<QString *>(args[0])), 00068 *(argValue<QKeySequence *>(args[1])), 00069 argValue<QObject *>(args[2])); 00070 if (sgt == QString::fromLatin1("QString,QKeySequence,QObject*,QString")) 00071 return new QAction(*(argValue<QString *>(args[0])), 00072 *(argValue<QKeySequence *>(args[1])), 00073 argValue<QObject *>(args[2]), 00074 *(argValue<QString *>(args[3]))); 00075 if (sgt == QString::fromLatin1("QIconSet*,QString,QKeySequence,QObject*")) 00076 return new QAction(*argValue<QIconSet *>(args[0]), 00077 *(argValue<QString *>(args[1])), 00078 *(argValue<QKeySequence *>(args[2])), 00079 argValue<QObject *>(args[3])); 00080 if (sgt == QString::fromLatin1("QIconSet*,QString,QKeySequence,QObject*,QString")) 00081 return new QAction(*argValue<QIconSet *>(args[0]), 00082 *(argValue<QString *>(args[1])), 00083 *(argValue<QKeySequence *>(args[2])), 00084 argValue<QObject *>(args[3]), 00085 *(argValue<QString *>(args[4]))); 00086 return 0; 00087 } 00088 00089 public: 00090 static QMap<int, QStringList> candidateConstructors() { 00091 QMap<int, QStringList> candidates; 00092 candidates[1].append(QString::fromLatin1("QObject*")); 00093 candidates[2].append(QString::fromLatin1("QObject*,QString")); 00094 candidates[3].append(QString::fromLatin1("QString,QKeySequence,QObject*")); 00095 candidates[4].append(QString::fromLatin1("QString,QKeySequence,QObject*,QString")); 00096 candidates[4].append(QString::fromLatin1("QIconSet*,QString,QKeySequence,QObject*")); 00097 candidates[5].append(QString::fromLatin1("QIconSet*,QString,QKeySequence,QObject*,QString")); 00098 return candidates; 00099 } 00100 //@AQ_END_DEF_PUB_SLOTS@ 00101 }; 00102 00103 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00104 inline void AQSAction::setIconSet(QIconSet *arg0) 00105 { 00106 AQ_CALL_VOID(setIconSet(*arg0)); 00107 } 00108 inline void AQSAction::setIconSet(AQSIconSet *arg0) 00109 { 00110 AQ_CALL_VOID(setIconSet(*arg0)); 00111 } 00112 inline QIconSet *AQSAction::iconSet() const 00113 { 00114 AQ_CALL_RET_PTR(iconSet(), QIconSet); 00115 } 00116 inline void AQSAction::setText(const QString &arg0) 00117 { 00118 AQ_CALL_VOID(setText(arg0)); 00119 } 00120 inline void AQSAction::setMenuText(const QString &arg0) 00121 { 00122 AQ_CALL_VOID(setMenuText(arg0)); 00123 } 00124 inline void AQSAction::setToolTip(const QString &arg0) 00125 { 00126 AQ_CALL_VOID(setToolTip(arg0)); 00127 } 00128 inline void AQSAction::setStatusTip(const QString &arg0) 00129 { 00130 AQ_CALL_VOID(setStatusTip(arg0)); 00131 } 00132 inline void AQSAction::setWhatsThis(const QString &arg0) 00133 { 00134 AQ_CALL_VOID(setWhatsThis(arg0)); 00135 } 00136 inline void AQSAction::setAccel(const QKeySequence &arg0) 00137 { 00138 AQ_CALL_VOID(setAccel(arg0)); 00139 } 00140 inline void AQSAction::setToggleAction(bool arg0) 00141 { 00142 AQ_CALL_VOID(setToggleAction(arg0)); 00143 } 00144 inline bool AQSAction::isToggleAction() const 00145 { 00146 AQ_CALL_RET_V(isToggleAction(), bool); 00147 } 00148 inline bool AQSAction::isOn() const 00149 { 00150 AQ_CALL_RET_V(isOn(), bool); 00151 } 00152 inline bool AQSAction::isEnabled() const 00153 { 00154 AQ_CALL_RET_V(isEnabled(), bool); 00155 } 00156 inline bool AQSAction::isVisible() const 00157 { 00158 AQ_CALL_RET_V(isVisible(), bool); 00159 } 00160 inline bool AQSAction::addTo(QWidget *arg0) 00161 { 00162 AQ_CALL_RET_V(addTo(arg0), bool); 00163 } 00164 inline bool AQSAction::removeFrom(QWidget *arg0) 00165 { 00166 AQ_CALL_RET_V(removeFrom(arg0), bool); 00167 } 00168 //@AQ_END_IMP_PUB_SLOTS@ 00169 00170 #endif /* AQSACTION_P_H_ */ 00171 // @AQSOBJECT@