Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSTable_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSTable_p.h
00003  -------------------
00004  begin                : 30/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  trminos  de  la  Licencia  Pblica General de GNU   en  su
00016  versin 2, publicada  por  la  Free  Software Foundation.
00017  ***************************************************************************/
00018 
00019 #ifndef AQSTABLE_P_H_
00020 #define AQSTABLE_P_H_
00021 
00022 #include "AQSScrollView_p.h"
00023 #include "AQSTableItem_p.h"
00024 #include "AQSPixmap_p.h"
00025 #include <qtable.h>
00026 
00027 class AQSTable : public AQSScrollView
00028 {
00029   Q_OBJECT
00030 
00031   AQ_DECLARE_AQS_OBJECT(Table, ScrollView);
00032 
00033   //@AQ_BEGIN_DEF_PUB_SLOTS@
00034 public slots:
00035   QHeader *horizontalHeader() const;
00036   QHeader *verticalHeader() const;
00037   void setItem(int, int, QTableItem *);
00038   void setItem(int, int, AQSTableItem *);
00039   void setText(int, int, const QString &);
00040   void setPixmap(int, int, QPixmap *);
00041   void setPixmap(int, int, AQSPixmap *);
00042   QTableItem *item(int, int) const;
00043   QString text(int, int) const;
00044   QPixmap *pixmap(int, int) const;
00045   void clearCell(int, int);
00046   QRect cellGeometry(int, int) const;
00047   int columnWidth(int) const;
00048   int rowHeight(int) const;
00049   int columnPos(int) const;
00050   int rowPos(int) const;
00051   int columnAt(int) const;
00052   int rowAt(int) const;
00053   void updateCell(int, int);
00054   int currentRow() const;
00055   int currentColumn() const;
00056   void ensureCellVisible(int, int);
00057   bool isSelected(int, int) const;
00058   bool isRowSelected(int, bool = FALSE) const;
00059   bool isColumnSelected(int, bool = FALSE) const;
00060   void removeSelection(int);
00061   int currentSelection() const;
00062   void selectCells(int, int, int, int);
00063   void selectRow(int);
00064   void selectColumn(int);
00065   virtual void takeItem(QTableItem *);
00066   virtual void takeItem(AQSTableItem *);
00067   virtual void setCellWidget(int, int, QWidget *);
00068   QWidget *cellWidget(int, int) const;
00069   void clearCellWidget(int, int);
00070   QRect cellRect(int, int) const;
00071   bool isRowReadOnly(int) const;
00072   bool isColumnReadOnly(int) const;
00073   void repaintSelections();
00074   void updateHeaderStates();
00075 
00076 protected:
00077   static void *construct(const QSArgumentList &args) {
00078     QMap<int, QStringList> candidates;
00079     candidates[0].append(QString::null);
00080     candidates[1].append(QString::fromLatin1("QWidget*"));
00081     candidates[2].append(QString::fromLatin1("QWidget*,QString"));
00082     candidates[2].append(QString::fromLatin1("int,int"));
00083     candidates[3].append(QString::fromLatin1("int,int,QWidget*"));
00084     candidates[4].append(QString::fromLatin1("int,int,QWidget*,QString"));
00085     QString sgt(castArgsSignature(args, candidates));
00086     if (sgt.isEmpty())
00087       return new QTable;
00088     if (sgt == QString::fromLatin1("QWidget*"))
00089       return new QTable(argValue<QWidget *>(args[0]));
00090     if (sgt == QString::fromLatin1("QWidget*,QString"))
00091       return new QTable(argValue<QWidget *>(args[0]),
00092                         *(argValue<QString *>(args[1])));
00093     if (sgt == QString::fromLatin1("int,int"))
00094       return new QTable(args[0].variant().toInt(),
00095                         args[1].variant().toInt());
00096     if (sgt == QString::fromLatin1("int,int,QWidget*"))
00097       return new QTable(args[0].variant().toInt(),
00098                         args[1].variant().toInt(),
00099                         argValue<QWidget *>(args[2]));
00100     if (sgt == QString::fromLatin1("int,int,QWidget*,QString"))
00101       return new QTable(args[0].variant().toInt(),
00102                         args[1].variant().toInt(),
00103                         argValue<QWidget *>(args[2]),
00104                         *(argValue<QString *>(args[3])));
00105     return 0;
00106   }
00107 
00108 public:
00109   static QMap<int, QStringList> candidateConstructors() {
00110     QMap<int, QStringList> candidates;
00111     candidates[0].append(QString::null);
00112     candidates[1].append(QString::fromLatin1("QWidget*"));
00113     candidates[2].append(QString::fromLatin1("QWidget*,QString"));
00114     candidates[2].append(QString::fromLatin1("int,int"));
00115     candidates[3].append(QString::fromLatin1("int,int,QWidget*"));
00116     candidates[4].append(QString::fromLatin1("int,int,QWidget*,QString"));
00117     return candidates;
00118   }
00119   //@AQ_END_DEF_PUB_SLOTS@
00120 };
00121 
00122 //@AQ_BEGIN_IMP_PUB_SLOTS@
00123 inline QHeader *AQSTable::horizontalHeader() const
00124 {
00125   AQ_CALL_RET(horizontalHeader());
00126 }
00127 inline QHeader *AQSTable::verticalHeader() const
00128 {
00129   AQ_CALL_RET(verticalHeader());
00130 }
00131 inline void AQSTable::setItem(int arg0,  int arg1,  QTableItem *arg2)
00132 {
00133   AQ_CALL_VOID(setItem(arg0, arg1, arg2));
00134 }
00135 inline void AQSTable::setItem(int arg0,  int arg1, AQSTableItem *arg2)
00136 {
00137   AQ_CALL_VOID(setItem(arg0, arg1, *arg2));
00138 }
00139 inline void AQSTable::setText(int arg0,  int arg1,  const QString &arg2)
00140 {
00141   AQ_CALL_VOID(setText(arg0, arg1, arg2));
00142 }
00143 inline void AQSTable::setPixmap(int arg0,  int arg1,  QPixmap *arg2)
00144 {
00145   AQ_CALL_VOID(setPixmap(arg0, arg1, *arg2));
00146 }
00147 inline void AQSTable::setPixmap(int arg0,  int arg1, AQSPixmap *arg2)
00148 {
00149   AQ_CALL_VOID(setPixmap(arg0, arg1, *arg2));
00150 }
00151 inline QTableItem *AQSTable::item(int arg0,  int arg1) const
00152 {
00153   AQ_CALL_RET(item(arg0, arg1));
00154 }
00155 inline QString AQSTable::text(int arg0,  int arg1) const
00156 {
00157   AQ_CALL_RET_V(text(arg0, arg1), QString);
00158 }
00159 inline QPixmap *AQSTable::pixmap(int arg0,  int arg1) const
00160 {
00161   AQ_CALL_RET_PTR(pixmap(arg0, arg1), QPixmap);
00162 }
00163 inline void AQSTable::clearCell(int arg0,  int arg1)
00164 {
00165   AQ_CALL_VOID(clearCell(arg0, arg1));
00166 }
00167 inline QRect AQSTable::cellGeometry(int arg0,  int arg1) const
00168 {
00169   AQ_CALL_RET_V(cellGeometry(arg0, arg1), QRect);
00170 }
00171 inline int AQSTable::columnWidth(int arg0) const
00172 {
00173   AQ_CALL_RET_V(columnWidth(arg0), int);
00174 }
00175 inline int AQSTable::rowHeight(int arg0) const
00176 {
00177   AQ_CALL_RET_V(rowHeight(arg0), int);
00178 }
00179 inline int AQSTable::columnPos(int arg0) const
00180 {
00181   AQ_CALL_RET_V(columnPos(arg0), int);
00182 }
00183 inline int AQSTable::rowPos(int arg0) const
00184 {
00185   AQ_CALL_RET_V(rowPos(arg0), int);
00186 }
00187 inline int AQSTable::columnAt(int arg0) const
00188 {
00189   AQ_CALL_RET_V(columnAt(arg0), int);
00190 }
00191 inline int AQSTable::rowAt(int arg0) const
00192 {
00193   AQ_CALL_RET_V(rowAt(arg0), int);
00194 }
00195 inline void AQSTable::updateCell(int arg0,  int arg1)
00196 {
00197   AQ_CALL_VOID(updateCell(arg0, arg1));
00198 }
00199 inline int AQSTable::currentRow() const
00200 {
00201   AQ_CALL_RET_V(currentRow(), int);
00202 }
00203 inline int AQSTable::currentColumn() const
00204 {
00205   AQ_CALL_RET_V(currentColumn(), int);
00206 }
00207 inline void AQSTable::ensureCellVisible(int arg0,  int arg1)
00208 {
00209   AQ_CALL_VOID(ensureCellVisible(arg0, arg1));
00210 }
00211 inline bool AQSTable::isSelected(int arg0,  int arg1) const
00212 {
00213   AQ_CALL_RET_V(isSelected(arg0, arg1), bool);
00214 }
00215 inline bool AQSTable::isRowSelected(int arg0,  bool arg1) const
00216 {
00217   AQ_CALL_RET_V(isRowSelected(arg0, arg1), bool);
00218 }
00219 inline bool AQSTable::isColumnSelected(int arg0,  bool arg1) const
00220 {
00221   AQ_CALL_RET_V(isColumnSelected(arg0, arg1), bool);
00222 }
00223 inline void AQSTable::removeSelection(int arg0)
00224 {
00225   AQ_CALL_VOID(removeSelection(arg0));
00226 }
00227 inline int AQSTable::currentSelection() const
00228 {
00229   AQ_CALL_RET_V(currentSelection(), int);
00230 }
00231 inline void AQSTable::selectCells(int arg0,  int arg1,  int arg2,  int arg3)
00232 {
00233   AQ_CALL_VOID(selectCells(arg0, arg1, arg2, arg3));
00234 }
00235 inline void AQSTable::selectRow(int arg0)
00236 {
00237   AQ_CALL_VOID(selectRow(arg0));
00238 }
00239 inline void AQSTable::selectColumn(int arg0)
00240 {
00241   AQ_CALL_VOID(selectColumn(arg0));
00242 }
00243 inline void AQSTable::takeItem(QTableItem *arg0)
00244 {
00245   AQ_CALL_VOID(takeItem(arg0));
00246 }
00247 inline void AQSTable::takeItem(AQSTableItem *arg0)
00248 {
00249   AQ_CALL_VOID(takeItem(*arg0));
00250 }
00251 inline void AQSTable::setCellWidget(int arg0,  int arg1,  QWidget *arg2)
00252 {
00253   AQ_CALL_VOID(setCellWidget(arg0, arg1, arg2));
00254 }
00255 inline QWidget *AQSTable::cellWidget(int arg0,  int arg1) const
00256 {
00257   AQ_CALL_RET(cellWidget(arg0, arg1));
00258 }
00259 inline void AQSTable::clearCellWidget(int arg0,  int arg1)
00260 {
00261   AQ_CALL_VOID(clearCellWidget(arg0, arg1));
00262 }
00263 inline QRect AQSTable::cellRect(int arg0,  int arg1) const
00264 {
00265   AQ_CALL_RET_V(cellRect(arg0, arg1), QRect);
00266 }
00267 inline bool AQSTable::isRowReadOnly(int arg0) const
00268 {
00269   AQ_CALL_RET_V(isRowReadOnly(arg0), bool);
00270 }
00271 inline bool AQSTable::isColumnReadOnly(int arg0) const
00272 {
00273   AQ_CALL_RET_V(isColumnReadOnly(arg0), bool);
00274 }
00275 inline void AQSTable::repaintSelections()
00276 {
00277   AQ_CALL_VOID(repaintSelections());
00278 }
00279 inline void AQSTable::updateHeaderStates()
00280 {
00281   AQ_CALL_VOID(updateHeaderStates());
00282 }
00283 //@AQ_END_IMP_PUB_SLOTS@
00284 
00285 #endif /* AQSTABLE_P_H_ */
00286 // @AQSWIDGET@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'