Eneboo - Documentación para desarrolladores
src/flbase/aqsobjects/AQSListBox_p.h
Ir a la documentación de este archivo.
00001 /***************************************************************************
00002  AQSListBox_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 AQSLISTBOX_P_H_
00020 #define AQSLISTBOX_P_H_
00021 
00022 #include "AQSScrollView_p.h"
00023 #include "AQSListBoxItem_p.h"
00024 #include <qlistbox.h>
00025 
00026 class AQSListBox : public AQSScrollView
00027 {
00028   Q_OBJECT
00029 
00030   AQ_DECLARE_AQS_OBJECT(ListBox, ScrollView);
00031 
00032   //@AQ_BEGIN_DEF_PUB_SLOTS@
00033 public slots:
00034   void insertStringList(const QStringList &, int = -1);
00035   void insertItem(const QListBoxItem *, int = -1);
00036   void insertItem(AQSListBoxItem *, int = -1);
00037   void insertItem(const QListBoxItem *, const QListBoxItem *);
00038   void insertItem(const QListBoxItem *, AQSListBoxItem *);
00039   void insertItem(AQSListBoxItem *, const QListBoxItem *);
00040   void insertItem(AQSListBoxItem *, AQSListBoxItem *);
00041   void insertItem(const QString &, int = -1);
00042   void insertItem(QPixmap *, int = -1);
00043   void insertItem(AQSPixmap *, int = -1);
00044   void insertItem(QPixmap *, const QString &, int = -1);
00045   void insertItem(AQSPixmap *, const QString &, int = -1);
00046   void removeItem(int);
00047   QString text(int) const;
00048   const QPixmap *pixmap(int) const;
00049   void changeItem(const QListBoxItem *, int);
00050   void changeItem(AQSListBoxItem *, int);
00051   void changeItem(const QString &, int);
00052   void changeItem(QPixmap *, int);
00053   void changeItem(AQSPixmap *, int);
00054   void changeItem(QPixmap *, const QString &, int);
00055   void changeItem(AQSPixmap *, const QString &, int);
00056   void setSelected(int, bool);
00057   bool isSelected(int) const;
00058   bool isSelected(const QListBoxItem *) const;
00059   bool isSelected(AQSListBoxItem *) const;
00060   QListBoxItem *selectedItem() const;
00061   QListBoxItem *item(int) const;
00062   int index(const QListBoxItem *) const;
00063   int index(AQSListBoxItem *) const;
00064   QListBoxItem *findItem(const QString &, uint = BeginsWith) const;
00065   void triggerUpdate(bool);
00066   bool itemVisible(int);
00067   bool itemVisible(const QListBoxItem *);
00068   bool itemVisible(AQSListBoxItem *);
00069   int itemHeight(int = 0) const;
00070   QListBoxItem *itemAt(const QPoint &) const;
00071   QRect itemRect(QListBoxItem *) const;
00072   QRect itemRect(AQSListBoxItem *) const;
00073   QListBoxItem *firstItem() const;
00074   void sort(bool = TRUE);
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[3].append(QString::fromLatin1("QWidget*,QString,WFlags"));
00083     QString sgt(castArgsSignature(args, candidates));
00084     if (sgt.isEmpty())
00085       return new QListBox;
00086     if (sgt == QString::fromLatin1("QWidget*"))
00087       return new QListBox(argValue<QWidget *>(args[0]));
00088     if (sgt == QString::fromLatin1("QWidget*,QString"))
00089       return new QListBox(argValue<QWidget *>(args[0]),
00090                           *(argValue<QString *>(args[1])));
00091     if (sgt == QString::fromLatin1("QWidget*,QString,WFlags"))
00092       return new QListBox(argValue<QWidget *>(args[0]),
00093                           *(argValue<QString *>(args[1])),
00094                           static_cast<WFlags>(args[2].variant().toUInt()));
00095     return 0;
00096   }
00097 
00098 public:
00099   static QMap<int, QStringList> candidateConstructors() {
00100     QMap<int, QStringList> candidates;
00101     candidates[0].append(QString::null);
00102     candidates[1].append(QString::fromLatin1("QWidget*"));
00103     candidates[2].append(QString::fromLatin1("QWidget*,QString"));
00104     candidates[3].append(QString::fromLatin1("QWidget*,QString,WFlags"));
00105     return candidates;
00106   }
00107   //@AQ_END_DEF_PUB_SLOTS@
00108 };
00109 
00110 //@AQ_BEGIN_IMP_PUB_SLOTS@
00111 inline void AQSListBox::insertStringList(const QStringList &arg0,  int arg1)
00112 {
00113   AQ_CALL_VOID(insertStringList(arg0, arg1));
00114 }
00115 inline void AQSListBox::insertItem(const QListBoxItem *arg0,  int arg1)
00116 {
00117   AQ_CALL_VOID(insertItem(arg0, arg1));
00118 }
00119 inline void AQSListBox::insertItem(AQSListBoxItem *arg0,  int arg1)
00120 {
00121   AQ_CALL_VOID(insertItem(*arg0, arg1));
00122 }
00123 inline void AQSListBox::insertItem(const QListBoxItem *arg0,  const QListBoxItem *arg1)
00124 {
00125   AQ_CALL_VOID(insertItem(arg0, arg1));
00126 }
00127 inline void AQSListBox::insertItem(const QListBoxItem *arg0, AQSListBoxItem *arg1)
00128 {
00129   AQ_CALL_VOID(insertItem(arg0, *arg1));
00130 }
00131 inline void AQSListBox::insertItem(AQSListBoxItem *arg0,  const QListBoxItem *arg1)
00132 {
00133   AQ_CALL_VOID(insertItem(*arg0, arg1));
00134 }
00135 inline void AQSListBox::insertItem(AQSListBoxItem *arg0, AQSListBoxItem *arg1)
00136 {
00137   AQ_CALL_VOID(insertItem(*arg0, *arg1));
00138 }
00139 inline void AQSListBox::insertItem(const QString &arg0,  int arg1)
00140 {
00141   AQ_CALL_VOID(insertItem(arg0, arg1));
00142 }
00143 inline void AQSListBox::insertItem(QPixmap *arg0,  int arg1)
00144 {
00145   AQ_CALL_VOID(insertItem(*arg0, arg1));
00146 }
00147 inline void AQSListBox::insertItem(AQSPixmap *arg0,  int arg1)
00148 {
00149   AQ_CALL_VOID(insertItem(*arg0, arg1));
00150 }
00151 inline void AQSListBox::insertItem(QPixmap *arg0,  const QString &arg1,  int arg2)
00152 {
00153   AQ_CALL_VOID(insertItem(*arg0, arg1, arg2));
00154 }
00155 inline void AQSListBox::insertItem(AQSPixmap *arg0,  const QString &arg1,  int arg2)
00156 {
00157   AQ_CALL_VOID(insertItem(*arg0, arg1, arg2));
00158 }
00159 inline void AQSListBox::removeItem(int arg0)
00160 {
00161   AQ_CALL_VOID(removeItem(arg0));
00162 }
00163 inline QString AQSListBox::text(int arg0) const
00164 {
00165   AQ_CALL_RET_V(text(arg0), QString);
00166 }
00167 inline const QPixmap *AQSListBox::pixmap(int arg0) const
00168 {
00169   AQ_CALL_RET(pixmap(arg0));
00170 }
00171 inline void AQSListBox::changeItem(const QListBoxItem *arg0,  int arg1)
00172 {
00173   AQ_CALL_VOID(changeItem(arg0, arg1));
00174 }
00175 inline void AQSListBox::changeItem(AQSListBoxItem *arg0,  int arg1)
00176 {
00177   AQ_CALL_VOID(changeItem(*arg0, arg1));
00178 }
00179 inline void AQSListBox::changeItem(const QString &arg0,  int arg1)
00180 {
00181   AQ_CALL_VOID(changeItem(arg0, arg1));
00182 }
00183 inline void AQSListBox::changeItem(QPixmap *arg0,  int arg1)
00184 {
00185   AQ_CALL_VOID(changeItem(*arg0, arg1));
00186 }
00187 inline void AQSListBox::changeItem(AQSPixmap *arg0,  int arg1)
00188 {
00189   AQ_CALL_VOID(changeItem(*arg0, arg1));
00190 }
00191 inline void AQSListBox::changeItem(QPixmap *arg0,  const QString &arg1,  int arg2)
00192 {
00193   AQ_CALL_VOID(changeItem(*arg0, arg1, arg2));
00194 }
00195 inline void AQSListBox::changeItem(AQSPixmap *arg0,  const QString &arg1,  int arg2)
00196 {
00197   AQ_CALL_VOID(changeItem(*arg0, arg1, arg2));
00198 }
00199 inline void AQSListBox::setSelected(int arg0,  bool arg1)
00200 {
00201   AQ_CALL_VOID(setSelected(arg0, arg1));
00202 }
00203 inline bool AQSListBox::isSelected(int arg0) const
00204 {
00205   AQ_CALL_RET_V(isSelected(arg0), bool);
00206 }
00207 inline bool AQSListBox::isSelected(const QListBoxItem *arg0) const
00208 {
00209   AQ_CALL_RET_V(isSelected(arg0), bool);
00210 }
00211 inline bool AQSListBox::isSelected(AQSListBoxItem *arg0) const
00212 {
00213   AQ_CALL_RET_V(isSelected(*arg0), bool);
00214 }
00215 inline QListBoxItem *AQSListBox::selectedItem() const
00216 {
00217   AQ_CALL_RET(selectedItem());
00218 }
00219 inline QListBoxItem *AQSListBox::item(int arg0) const
00220 {
00221   AQ_CALL_RET(item(arg0));
00222 }
00223 inline int AQSListBox::index(const QListBoxItem *arg0) const
00224 {
00225   AQ_CALL_RET_V(index(arg0), int);
00226 }
00227 inline int AQSListBox::index(AQSListBoxItem *arg0) const
00228 {
00229   AQ_CALL_RET_V(index(*arg0), int);
00230 }
00231 inline QListBoxItem *AQSListBox::findItem(const QString &arg0,  uint arg1) const
00232 {
00233   AQ_CALL_RET(findItem(arg0, arg1));
00234 }
00235 inline void AQSListBox::triggerUpdate(bool arg0)
00236 {
00237   AQ_CALL_VOID(triggerUpdate(arg0));
00238 }
00239 inline bool AQSListBox::itemVisible(int arg0)
00240 {
00241   AQ_CALL_RET_V(itemVisible(arg0), bool);
00242 }
00243 inline bool AQSListBox::itemVisible(const QListBoxItem *arg0)
00244 {
00245   AQ_CALL_RET_V(itemVisible(arg0), bool);
00246 }
00247 inline bool AQSListBox::itemVisible(AQSListBoxItem *arg0)
00248 {
00249   AQ_CALL_RET_V(itemVisible(*arg0), bool);
00250 }
00251 inline int AQSListBox::itemHeight(int arg0) const
00252 {
00253   AQ_CALL_RET_V(itemHeight(arg0), int);
00254 }
00255 inline QListBoxItem *AQSListBox::itemAt(const QPoint &arg0) const
00256 {
00257   AQ_CALL_RET(itemAt(arg0));
00258 }
00259 inline QRect AQSListBox::itemRect(QListBoxItem *arg0) const
00260 {
00261   AQ_CALL_RET_V(itemRect(arg0), QRect);
00262 }
00263 inline QRect AQSListBox::itemRect(AQSListBoxItem *arg0) const
00264 {
00265   AQ_CALL_RET_V(itemRect(*arg0), QRect);
00266 }
00267 inline QListBoxItem *AQSListBox::firstItem() const
00268 {
00269   AQ_CALL_RET(firstItem());
00270 }
00271 inline void AQSListBox::sort(bool arg0)
00272 {
00273   AQ_CALL_VOID(sort(arg0));
00274 }
00275 //@AQ_END_IMP_PUB_SLOTS@
00276 
00277 #endif /* AQSLISTBOX_P_H_ */
00278 // @AQSWIDGET@
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'