Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSListView_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSListView_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  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 AQSLISTVIEW_P_H_
00020 #define AQSLISTVIEW_P_H_
00021 
00022 #include "AQSScrollView_p.h"
00023 #include "AQSListViewItem_p.h"
00024 #include "AQSIconSet_p.h"
00025 #include <qlistview.h>
00026 
00027 class AQSListView : public AQSScrollView
00028 {
00029   Q_OBJECT
00030 
00031   AQ_DECLARE_AQS_OBJECT(ListView, ScrollView);
00032 
00033   //@AQ_BEGIN_DEF_PUB_SLOTS@
00034 public slots:
00035   QHeader *header() const;
00036   int addColumn(const QString &, int = -1);
00037   int addColumn(QIconSet *, const QString &, int = -1);
00038   int addColumn(AQSIconSet *, const QString &, int = -1);
00039   void removeColumn(int);
00040   void setColumnText(int, const QString &);
00041   void setColumnText(int, QIconSet *, const QString &);
00042   void setColumnText(int, AQSIconSet *, const QString &);
00043   QString columnText(int) const;
00044   void setColumnWidth(int, int);
00045   int columnWidth(int) const;
00046   void setColumnWidthMode(int, uint);
00047   uint columnWidthMode(int) const;
00048   void setColumnAlignment(int, int);
00049   int columnAlignment(int) const;
00050   QListViewItem *itemAt(const QPoint &) const;
00051   QRect itemRect(const QListViewItem *) const;
00052   QRect itemRect(AQSListViewItem *) const;
00053   int itemPos(const QListViewItem *);
00054   int itemPos(AQSListViewItem *);
00055   void ensureItemVisible(const QListViewItem *);
00056   void ensureItemVisible(AQSListViewItem *);
00057   void repaintItem(const QListViewItem *) const;
00058   void repaintItem(AQSListViewItem *) const;
00059   void clearSelection();
00060   void setSelected(QListViewItem *, bool);
00061   void setSelected(AQSListViewItem *, bool);
00062   void setSelectionAnchor(QListViewItem *);
00063   void setSelectionAnchor(AQSListViewItem *);
00064   bool isSelected(const QListViewItem *) const;
00065   bool isSelected(AQSListViewItem *) const;
00066   QListViewItem *selectedItem() const;
00067   void setOpen(QListViewItem *, bool);
00068   void setOpen(AQSListViewItem *, bool);
00069   bool isOpen(const QListViewItem *) const;
00070   bool isOpen(AQSListViewItem *) const;
00071   void setCurrentItem(QListViewItem *);
00072   void setCurrentItem(AQSListViewItem *);
00073   QListViewItem *currentItem() const;
00074   QListViewItem *firstChild() const;
00075   QListViewItem *lastItem() const;
00076   void setSorting(int, bool = TRUE);
00077   int sortColumn() const;
00078   void setSortColumn(int);
00079   uint sortOrder() const;
00080   void setSortOrder(uint);
00081   void sort();
00082   bool isRenaming() const;
00083   void hideColumn(int);
00084 
00085 protected:
00086   static void *construct(const QSArgumentList &args) {
00087     QMap<int, QStringList> candidates;
00088     candidates[0].append(QString::null);
00089     candidates[1].append(QString::fromLatin1("QWidget*"));
00090     candidates[2].append(QString::fromLatin1("QWidget*,QString"));
00091     candidates[3].append(QString::fromLatin1("QWidget*,QString,WFlags"));
00092     QString sgt(castArgsSignature(args, candidates));
00093     if (sgt.isEmpty())
00094       return new QListView;
00095     if (sgt == QString::fromLatin1("QWidget*"))
00096       return new QListView(argValue<QWidget *>(args[0]));
00097     if (sgt == QString::fromLatin1("QWidget*,QString"))
00098       return new QListView(argValue<QWidget *>(args[0]),
00099                            *(argValue<QString *>(args[1])));
00100     if (sgt == QString::fromLatin1("QWidget*,QString,WFlags"))
00101       return new QListView(argValue<QWidget *>(args[0]),
00102                            *(argValue<QString *>(args[1])),
00103                            static_cast<WFlags>(args[2].variant().toUInt()));
00104     return 0;
00105   }
00106 
00107 public:
00108   static QMap<int, QStringList> candidateConstructors() {
00109     QMap<int, QStringList> candidates;
00110     candidates[0].append(QString::null);
00111     candidates[1].append(QString::fromLatin1("QWidget*"));
00112     candidates[2].append(QString::fromLatin1("QWidget*,QString"));
00113     candidates[3].append(QString::fromLatin1("QWidget*,QString,WFlags"));
00114     return candidates;
00115   }
00116   //@AQ_END_DEF_PUB_SLOTS@
00117 };
00118 
00119 //@AQ_BEGIN_IMP_PUB_SLOTS@
00120 inline QHeader *AQSListView::header() const
00121 {
00122   AQ_CALL_RET(header());
00123 }
00124 inline int AQSListView::addColumn(const QString &arg0,  int arg1)
00125 {
00126   AQ_CALL_RET_V(addColumn(arg0, arg1), int);
00127 }
00128 inline int AQSListView::addColumn(QIconSet *arg0,  const QString &arg1,  int arg2)
00129 {
00130   AQ_CALL_RET_V(addColumn(*arg0, arg1, arg2), int);
00131 }
00132 inline int AQSListView::addColumn(AQSIconSet *arg0,  const QString &arg1,  int arg2)
00133 {
00134   AQ_CALL_RET_V(addColumn(*arg0, arg1, arg2), int);
00135 }
00136 inline void AQSListView::removeColumn(int arg0)
00137 {
00138   AQ_CALL_VOID(removeColumn(arg0));
00139 }
00140 inline void AQSListView::setColumnText(int arg0,  const QString &arg1)
00141 {
00142   AQ_CALL_VOID(setColumnText(arg0, arg1));
00143 }
00144 inline void AQSListView::setColumnText(int arg0,  QIconSet *arg1,  const QString &arg2)
00145 {
00146   AQ_CALL_VOID(setColumnText(arg0, *arg1, arg2));
00147 }
00148 inline void AQSListView::setColumnText(int arg0, AQSIconSet *arg1,  const QString &arg2)
00149 {
00150   AQ_CALL_VOID(setColumnText(arg0, *arg1, arg2));
00151 }
00152 inline QString AQSListView::columnText(int arg0) const
00153 {
00154   AQ_CALL_RET_V(columnText(arg0), QString);
00155 }
00156 inline void AQSListView::setColumnWidth(int arg0,  int arg1)
00157 {
00158   AQ_CALL_VOID(setColumnWidth(arg0, arg1));
00159 }
00160 inline int AQSListView::columnWidth(int arg0) const
00161 {
00162   AQ_CALL_RET_V(columnWidth(arg0), int);
00163 }
00164 inline void AQSListView::setColumnWidthMode(int arg0,  uint arg1)
00165 {
00166   AQ_CALL_VOID(setColumnWidthMode(arg0, static_cast<QListView::WidthMode>(arg1)));
00167 }
00168 inline uint AQSListView::columnWidthMode(int arg0) const
00169 {
00170   AQ_CALL_RET_V(columnWidthMode(arg0), uint);
00171 }
00172 inline void AQSListView::setColumnAlignment(int arg0,  int arg1)
00173 {
00174   AQ_CALL_VOID(setColumnAlignment(arg0, arg1));
00175 }
00176 inline int AQSListView::columnAlignment(int arg0) const
00177 {
00178   AQ_CALL_RET_V(columnAlignment(arg0), int);
00179 }
00180 inline QListViewItem *AQSListView::itemAt(const QPoint &arg0) const
00181 {
00182   AQ_CALL_RET(itemAt(arg0));
00183 }
00184 inline QRect AQSListView::itemRect(const QListViewItem *arg0) const
00185 {
00186   AQ_CALL_RET_V(itemRect(arg0), QRect);
00187 }
00188 inline QRect AQSListView::itemRect(AQSListViewItem *arg0) const
00189 {
00190   AQ_CALL_RET_V(itemRect(*arg0), QRect);
00191 }
00192 inline int AQSListView::itemPos(const QListViewItem *arg0)
00193 {
00194   AQ_CALL_RET_V(itemPos(arg0), int);
00195 }
00196 inline int AQSListView::itemPos(AQSListViewItem *arg0)
00197 {
00198   AQ_CALL_RET_V(itemPos(*arg0), int);
00199 }
00200 inline void AQSListView::ensureItemVisible(const QListViewItem *arg0)
00201 {
00202   AQ_CALL_VOID(ensureItemVisible(arg0));
00203 }
00204 inline void AQSListView::ensureItemVisible(AQSListViewItem *arg0)
00205 {
00206   AQ_CALL_VOID(ensureItemVisible(*arg0));
00207 }
00208 inline void AQSListView::repaintItem(const QListViewItem *arg0) const
00209 {
00210   AQ_CALL_VOID(repaintItem(arg0));
00211 }
00212 inline void AQSListView::repaintItem(AQSListViewItem *arg0) const
00213 {
00214   AQ_CALL_VOID(repaintItem(*arg0));
00215 }
00216 inline void AQSListView::clearSelection()
00217 {
00218   AQ_CALL_VOID(clearSelection());
00219 }
00220 inline void AQSListView::setSelected(QListViewItem *arg0,  bool arg1)
00221 {
00222   AQ_CALL_VOID(setSelected(arg0, arg1));
00223 }
00224 inline void AQSListView::setSelected(AQSListViewItem *arg0,  bool arg1)
00225 {
00226   AQ_CALL_VOID(setSelected(*arg0, arg1));
00227 }
00228 inline void AQSListView::setSelectionAnchor(QListViewItem *arg0)
00229 {
00230   AQ_CALL_VOID(setSelectionAnchor(arg0));
00231 }
00232 inline void AQSListView::setSelectionAnchor(AQSListViewItem *arg0)
00233 {
00234   AQ_CALL_VOID(setSelectionAnchor(*arg0));
00235 }
00236 inline bool AQSListView::isSelected(const QListViewItem *arg0) const
00237 {
00238   AQ_CALL_RET_V(isSelected(arg0), bool);
00239 }
00240 inline bool AQSListView::isSelected(AQSListViewItem *arg0) const
00241 {
00242   AQ_CALL_RET_V(isSelected(*arg0), bool);
00243 }
00244 inline QListViewItem *AQSListView::selectedItem() const
00245 {
00246   AQ_CALL_RET(selectedItem());
00247 }
00248 inline void AQSListView::setOpen(QListViewItem *arg0,  bool arg1)
00249 {
00250   AQ_CALL_VOID(setOpen(arg0, arg1));
00251 }
00252 inline void AQSListView::setOpen(AQSListViewItem *arg0,  bool arg1)
00253 {
00254   AQ_CALL_VOID(setOpen(*arg0, arg1));
00255 }
00256 inline bool AQSListView::isOpen(const QListViewItem *arg0) const
00257 {
00258   AQ_CALL_RET_V(isOpen(arg0), bool);
00259 }
00260 inline bool AQSListView::isOpen(AQSListViewItem *arg0) const
00261 {
00262   AQ_CALL_RET_V(isOpen(*arg0), bool);
00263 }
00264 inline void AQSListView::setCurrentItem(QListViewItem *arg0)
00265 {
00266   AQ_CALL_VOID(setCurrentItem(arg0));
00267 }
00268 inline void AQSListView::setCurrentItem(AQSListViewItem *arg0)
00269 {
00270   AQ_CALL_VOID(setCurrentItem(*arg0));
00271 }
00272 inline QListViewItem *AQSListView::currentItem() const
00273 {
00274   AQ_CALL_RET(currentItem());
00275 }
00276 inline QListViewItem *AQSListView::firstChild() const
00277 {
00278   AQ_CALL_RET(firstChild());
00279 }
00280 inline QListViewItem *AQSListView::lastItem() const
00281 {
00282   AQ_CALL_RET(lastItem());
00283 }
00284 inline void AQSListView::setSorting(int arg0,  bool arg1)
00285 {
00286   AQ_CALL_VOID(setSorting(arg0, arg1));
00287 }
00288 inline int AQSListView::sortColumn() const
00289 {
00290   AQ_CALL_RET_V(sortColumn(), int);
00291 }
00292 inline void AQSListView::setSortColumn(int arg0)
00293 {
00294   AQ_CALL_VOID(setSortColumn(arg0));
00295 }
00296 inline uint AQSListView::sortOrder() const
00297 {
00298   AQ_CALL_RET_V(sortOrder(), uint);
00299 }
00300 inline void AQSListView::setSortOrder(uint arg0)
00301 {
00302   AQ_CALL_VOID(setSortOrder(static_cast<Qt::SortOrder>(arg0)));
00303 }
00304 inline void AQSListView::sort()
00305 {
00306   AQ_CALL_VOID(sort());
00307 }
00308 inline bool AQSListView::isRenaming() const
00309 {
00310   AQ_CALL_RET_V(isRenaming(), bool);
00311 }
00312 inline void AQSListView::hideColumn(int arg0)
00313 {
00314   AQ_CALL_VOID(hideColumn(arg0));
00315 }
00316 //@AQ_END_IMP_PUB_SLOTS@
00317 
00318 #endif /* AQSLISTVIEW_P_H_ */
00319 // @AQSWIDGET@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'