Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSSqlError_p.h 00003 ------------------- 00004 begin : 20/11/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 AQSSQLERROR_P_H_ 00020 #define AQSSQLERROR_P_H_ 00021 00022 #include "AQSVoidPtr_p.h" 00023 #include <qsqlerror.h> 00024 00025 // @AQ_PTR_INDIRECTION@ 00026 00027 class AQSSqlError : public AQSVoidPtr 00028 { 00029 Q_OBJECT 00030 00031 AQ_DECLARE_AQS_VOID(SqlError, 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 QString driverText() const; 00042 virtual void setDriverText(const QString &); 00043 QString databaseText() const; 00044 virtual void setDatabaseText(const QString &); 00045 int type() const; 00046 virtual void setType(int); 00047 int number() const; 00048 virtual void setNumber(int); 00049 QString text() const; 00050 00051 protected: 00052 static void *construct(const QSArgumentList &args) { 00053 QMap<int, QStringList> candidates; 00054 candidates[0].append(QString::null); 00055 candidates[1].append(QString::fromLatin1("QString")); 00056 candidates[2].append(QString::fromLatin1("QString,QString")); 00057 candidates[3].append(QString::fromLatin1("QString,QString,int")); 00058 candidates[4].append(QString::fromLatin1("QString,QString,int,int")); 00059 candidates[1].append(QString::fromLatin1("QSqlError*")); 00060 QString sgt(castArgsSignature(args, candidates)); 00061 if (sgt.isEmpty()) 00062 return new QSqlError; 00063 if (sgt == QString::fromLatin1("QString")) 00064 return new QSqlError(*(argValue<QString *>(args[0]))); 00065 if (sgt == QString::fromLatin1("QString,QString")) 00066 return new QSqlError(*(argValue<QString *>(args[0])), 00067 *(argValue<QString *>(args[1]))); 00068 if (sgt == QString::fromLatin1("QString,QString,int")) 00069 return new QSqlError(*(argValue<QString *>(args[0])), 00070 *(argValue<QString *>(args[1])), 00071 args[2].variant().toInt()); 00072 if (sgt == QString::fromLatin1("QString,QString,int,int")) 00073 return new QSqlError(*(argValue<QString *>(args[0])), 00074 *(argValue<QString *>(args[1])), 00075 args[2].variant().toInt(), 00076 args[3].variant().toInt()); 00077 if (sgt == QString::fromLatin1("QSqlError*")) 00078 return new QSqlError(*argValue<QSqlError *>(args[0])); 00079 return 0; 00080 } 00081 00082 public: 00083 static QMap<int, QStringList> candidateConstructors() { 00084 QMap<int, QStringList> candidates; 00085 candidates[0].append(QString::null); 00086 candidates[1].append(QString::fromLatin1("QString")); 00087 candidates[2].append(QString::fromLatin1("QString,QString")); 00088 candidates[3].append(QString::fromLatin1("QString,QString,int")); 00089 candidates[4].append(QString::fromLatin1("QString,QString,int,int")); 00090 candidates[1].append(QString::fromLatin1("QSqlError*")); 00091 return candidates; 00092 } 00093 //@AQ_END_DEF_PUB_SLOTS@ 00094 }; 00095 00096 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00097 inline QString AQSSqlError::driverText() const 00098 { 00099 AQ_CALL_RET_V(driverText(), QString); 00100 } 00101 inline void AQSSqlError::setDriverText(const QString &arg0) 00102 { 00103 AQ_CALL_VOID(setDriverText(arg0)); 00104 } 00105 inline QString AQSSqlError::databaseText() const 00106 { 00107 AQ_CALL_RET_V(databaseText(), QString); 00108 } 00109 inline void AQSSqlError::setDatabaseText(const QString &arg0) 00110 { 00111 AQ_CALL_VOID(setDatabaseText(arg0)); 00112 } 00113 inline int AQSSqlError::type() const 00114 { 00115 AQ_CALL_RET_V(type(), int); 00116 } 00117 inline void AQSSqlError::setType(int arg0) 00118 { 00119 AQ_CALL_VOID(setType(arg0)); 00120 } 00121 inline int AQSSqlError::number() const 00122 { 00123 AQ_CALL_RET_V(number(), int); 00124 } 00125 inline void AQSSqlError::setNumber(int arg0) 00126 { 00127 AQ_CALL_VOID(setNumber(arg0)); 00128 } 00129 inline QString AQSSqlError::text() const 00130 { 00131 AQ_CALL_RET_V(text(), QString); 00132 } 00133 //@AQ_END_IMP_PUB_SLOTS@ 00134 00135 #endif /* AQSSQLERROR_P_H_ */ 00136 // @AQSVOIDPTR@