Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSDataTable_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSDataTable_p.h
00003  -------------------
00004  begin                : 18/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 AQSDATATABLE_P_H_
00020 #define AQSDATATABLE_P_H_
00021 
00022 #include "AQSTable_p.h"
00023 #include "AQSIconSet_p.h"
00024 #include <qdatatable.h>
00025 
00026 class AQSDataTable : public AQSTable
00027 {
00028   Q_OBJECT
00029 
00030   AQ_DECLARE_AQS_OBJECT(DataTable, Table);
00031 
00032   //@AQ_BEGIN_DEF_PUB_SLOTS@
00033 public slots:
00034   virtual void addColumn(const QString &, const QString &, int, QIconSet *);
00035   virtual void addColumn(const QString &, const QString &, int, AQSIconSet *);
00036   virtual void removeColumn(uint);
00037   virtual void setColumn(uint, const QString &, const QString &, int, QIconSet *);
00038   virtual void setColumn(uint, const QString &, const QString &, int, AQSIconSet *);
00039   bool autoDelete() const;
00040   virtual void setSqlCursor(QSqlCursor* = 0, bool = FALSE, bool = FALSE);
00041   QSqlCursor *sqlCursor() const;
00042   virtual void setNullText(const QString &);
00043   virtual void setTrueText(const QString &);
00044   virtual void setFalseText(const QString &);
00045   virtual void setDateFormat(const DateFormat);
00046   virtual void setConfirmEdits(bool);
00047   virtual void setConfirmInsert(bool);
00048   virtual void setConfirmUpdate(bool);
00049   virtual void setConfirmDelete(bool);
00050   virtual void setConfirmCancels(bool);
00051   virtual void setAutoDelete(bool);
00052   virtual void setAutoEdit(bool);
00053   virtual void setFilter(const QString &);
00054   virtual void setSort(const QStringList &);
00055   virtual void setSort(const QSqlIndex &);
00056   void refresh(uint);
00057   virtual void sortColumn(int, bool = TRUE, bool = FALSE);
00058   virtual QString text(int, int) const;
00059   QVariant value(int, int) const;
00060   QSqlRecord *currentRecord() const;
00061   virtual int numCols() const;
00062   virtual int numRows() const;
00063 
00064 protected:
00065   static void *construct(const QSArgumentList &args) {
00066     QMap<int, QStringList> candidates;
00067     candidates[0].append(QString::null);
00068     candidates[1].append(QString::fromLatin1("QWidget*"));
00069     candidates[2].append(QString::fromLatin1("QWidget*,QString"));
00070     candidates[1].append(QString::fromLatin1("QSqlCursor*"));
00071     candidates[2].append(QString::fromLatin1("QSqlCursor*,bool"));
00072     candidates[3].append(QString::fromLatin1("QSqlCursor*,bool,QWidget*"));
00073     candidates[4].append(QString::fromLatin1("QSqlCursor*,bool,QWidget*,QString"));
00074     QString sgt(castArgsSignature(args, candidates));
00075     if (sgt.isEmpty())
00076       return new QDataTable;
00077     if (sgt == QString::fromLatin1("QWidget*"))
00078       return new QDataTable(argValue<QWidget *>(args[0]));
00079     if (sgt == QString::fromLatin1("QWidget*,QString"))
00080       return new QDataTable(argValue<QWidget *>(args[0]),
00081                             *(argValue<QString *>(args[1])));
00082     if (sgt == QString::fromLatin1("QSqlCursor*"))
00083       return new QDataTable(argValue<QSqlCursor *>(args[0]));
00084     if (sgt == QString::fromLatin1("QSqlCursor*,bool"))
00085       return new QDataTable(argValue<QSqlCursor *>(args[0]),
00086                             args[1].variant().toBool());
00087     if (sgt == QString::fromLatin1("QSqlCursor*,bool,QWidget*"))
00088       return new QDataTable(argValue<QSqlCursor *>(args[0]),
00089                             args[1].variant().toBool(),
00090                             argValue<QWidget *>(args[2]));
00091     if (sgt == QString::fromLatin1("QSqlCursor*,bool,QWidget*,QString"))
00092       return new QDataTable(argValue<QSqlCursor *>(args[0]),
00093                             args[1].variant().toBool(),
00094                             argValue<QWidget *>(args[2]),
00095                             *(argValue<QString *>(args[3])));
00096     return 0;
00097   }
00098 
00099 public:
00100   static QMap<int, QStringList> candidateConstructors() {
00101     QMap<int, QStringList> candidates;
00102     candidates[0].append(QString::null);
00103     candidates[1].append(QString::fromLatin1("QWidget*"));
00104     candidates[2].append(QString::fromLatin1("QWidget*,QString"));
00105     candidates[1].append(QString::fromLatin1("QSqlCursor*"));
00106     candidates[2].append(QString::fromLatin1("QSqlCursor*,bool"));
00107     candidates[3].append(QString::fromLatin1("QSqlCursor*,bool,QWidget*"));
00108     candidates[4].append(QString::fromLatin1("QSqlCursor*,bool,QWidget*,QString"));
00109     return candidates;
00110   }
00111   //@AQ_END_DEF_PUB_SLOTS@
00112 };
00113 
00114 //@AQ_BEGIN_IMP_PUB_SLOTS@
00115 inline void AQSDataTable::addColumn(const QString &arg0,  const QString &arg1,  int arg2,  QIconSet *arg3)
00116 {
00117   AQ_CALL_VOID(addColumn(arg0, arg1, arg2, *arg3));
00118 }
00119 inline void AQSDataTable::addColumn(const QString &arg0,  const QString &arg1,  int arg2, AQSIconSet *arg3)
00120 {
00121   AQ_CALL_VOID(addColumn(arg0, arg1, arg2, *arg3));
00122 }
00123 inline void AQSDataTable::removeColumn(uint arg0)
00124 {
00125   AQ_CALL_VOID(removeColumn(arg0));
00126 }
00127 inline void AQSDataTable::setColumn(uint arg0,  const QString &arg1,  const QString &arg2,  int arg3,  QIconSet *arg4)
00128 {
00129   AQ_CALL_VOID(setColumn(arg0, arg1, arg2, arg3, *arg4));
00130 }
00131 inline void AQSDataTable::setColumn(uint arg0,  const QString &arg1,  const QString &arg2,  int arg3, AQSIconSet *arg4)
00132 {
00133   AQ_CALL_VOID(setColumn(arg0, arg1, arg2, arg3, *arg4));
00134 }
00135 inline bool AQSDataTable::autoDelete() const
00136 {
00137   AQ_CALL_RET_V(autoDelete(), bool);
00138 }
00139 inline void AQSDataTable::setSqlCursor(QSqlCursor *arg0,  bool arg1,  bool arg2)
00140 {
00141   AQ_CALL_VOID(setSqlCursor(arg0, arg1, arg2));
00142 }
00143 inline QSqlCursor *AQSDataTable::sqlCursor() const
00144 {
00145   AQ_CALL_RET(sqlCursor());
00146 }
00147 inline void AQSDataTable::setNullText(const QString &arg0)
00148 {
00149   AQ_CALL_VOID(setNullText(arg0));
00150 }
00151 inline void AQSDataTable::setTrueText(const QString &arg0)
00152 {
00153   AQ_CALL_VOID(setTrueText(arg0));
00154 }
00155 inline void AQSDataTable::setFalseText(const QString &arg0)
00156 {
00157   AQ_CALL_VOID(setFalseText(arg0));
00158 }
00159 inline void AQSDataTable::setDateFormat(const DateFormat arg0)
00160 {
00161   AQ_CALL_VOID(setDateFormat(arg0));
00162 }
00163 inline void AQSDataTable::setConfirmEdits(bool arg0)
00164 {
00165   AQ_CALL_VOID(setConfirmEdits(arg0));
00166 }
00167 inline void AQSDataTable::setConfirmInsert(bool arg0)
00168 {
00169   AQ_CALL_VOID(setConfirmInsert(arg0));
00170 }
00171 inline void AQSDataTable::setConfirmUpdate(bool arg0)
00172 {
00173   AQ_CALL_VOID(setConfirmUpdate(arg0));
00174 }
00175 inline void AQSDataTable::setConfirmDelete(bool arg0)
00176 {
00177   AQ_CALL_VOID(setConfirmDelete(arg0));
00178 }
00179 inline void AQSDataTable::setConfirmCancels(bool arg0)
00180 {
00181   AQ_CALL_VOID(setConfirmCancels(arg0));
00182 }
00183 inline void AQSDataTable::setAutoDelete(bool arg0)
00184 {
00185   AQ_CALL_VOID(setAutoDelete(arg0));
00186 }
00187 inline void AQSDataTable::setAutoEdit(bool arg0)
00188 {
00189   AQ_CALL_VOID(setAutoEdit(arg0));
00190 }
00191 inline void AQSDataTable::setFilter(const QString &arg0)
00192 {
00193   AQ_CALL_VOID(setFilter(arg0));
00194 }
00195 inline void AQSDataTable::setSort(const QStringList &arg0)
00196 {
00197   AQ_CALL_VOID(setSort(arg0));
00198 }
00199 inline void AQSDataTable::setSort(const QSqlIndex &arg0)
00200 {
00201   AQ_CALL_VOID(setSort(arg0));
00202 }
00203 inline void AQSDataTable::refresh(uint arg0)
00204 {
00205   AQ_CALL_VOID(refresh(static_cast<QDataTable::Refresh>(arg0)));
00206 }
00207 inline void AQSDataTable::sortColumn(int arg0,  bool arg1,  bool arg2)
00208 {
00209   AQ_CALL_VOID(sortColumn(arg0, arg1, arg2));
00210 }
00211 inline QString AQSDataTable::text(int arg0,  int arg1) const
00212 {
00213   AQ_CALL_RET_V(text(arg0, arg1), QString);
00214 }
00215 inline QVariant AQSDataTable::value(int arg0,  int arg1) const
00216 {
00217   AQ_CALL_RET_V(value(arg0, arg1), QVariant);
00218 }
00219 inline QSqlRecord *AQSDataTable::currentRecord() const
00220 {
00221   AQ_CALL_RET(currentRecord());
00222 }
00223 inline int AQSDataTable::numCols() const
00224 {
00225   AQ_CALL_RET_V(numCols(), int);
00226 }
00227 inline int AQSDataTable::numRows() const
00228 {
00229   AQ_CALL_RET_V(numRows(), int);
00230 }
00231 //@AQ_END_IMP_PUB_SLOTS@
00232 
00233 #endif /* AQSDATATABLE_P_H_ */
00234 // @AQSWIDGET@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'