56 #ifndef QT_NO_LISTWIDGET
60 class QWidgetItemData;
61 class QListWidgetItemPrivate;
65 friend class QListModel;
80 inline void setSelected(
bool select);
81 inline bool isSelected()
const;
86 inline Qt::ItemFlags
flags()
const {
return itemFlags; }
87 void setFlags(Qt::ItemFlags flags);
91 inline void setText(
const QString &text);
95 inline void setIcon(
const QIcon &icon);
101 #ifndef QT_NO_TOOLTIP
107 #ifndef QT_NO_WHATSTHIS
157 #ifndef QT_NO_DATASTREAM
163 inline int type()
const {
return rtti; }
169 QListWidgetItemPrivate *d;
170 Qt::ItemFlags itemFlags;
182 #ifndef QT_NO_TOOLTIP
187 #ifndef QT_NO_WHATSTHIS
195 #ifndef QT_NO_DATASTREAM
200 class QListWidgetPrivate;
206 Q_PROPERTY(
int currentRow READ currentRow WRITE setCurrentRow NOTIFY currentRowChanged USER true)
207 Q_PROPERTY(
bool sortingEnabled READ isSortingEnabled WRITE setSortingEnabled)
210 friend class QListModel;
215 QListWidgetItem *item(
int row) const;
216 int row(const QListWidgetItem *item) const;
217 void insertItem(
int row, QListWidgetItem *item);
218 void insertItem(
int row, const
QString &label);
219 void insertItems(
int row, const
QStringList &labels);
228 void setCurrentItem(
QListWidgetItem *item, QItemSelectionModel::SelectionFlags command);
230 int currentRow()
const;
231 void setCurrentRow(
int row);
232 void setCurrentRow(
int row, QItemSelectionModel::SelectionFlags command);
239 void setSortingEnabled(
bool enable);
240 bool isSortingEnabled()
const;
272 void currentTextChanged(
const QString ¤tText);
273 void currentRowChanged(
int currentRow);
275 void itemSelectionChanged();
281 #ifndef QT_NO_DRAGANDDROP
283 virtual Qt::DropActions supportedDropActions()
const;
309 { setItemWidget(aItem, 0); }
312 { insertItem(
count(), aitem); }
315 {
return itemAt(
QPoint(ax, ay)); }
318 {
if (view) view->setItemSelected(
this, aselect); }
321 {
return (view ? view->isItemSelected(
this) :
false); }
324 {
if (view) view->setItemHidden(
this, ahide); }
327 {
return (view ? view->isItemHidden(
this) :
false); }
329 #endif // QT_NO_LISTWIDGET
335 #endif // QLISTWIDGET_H
GLuint GLuint GLsizei GLenum type
void closePersistentEditor(const QModelIndex &index)
virtual void setModel(QAbstractItemModel *model)
#define Q_PRIVATE_SLOT(d, signature)
GLXDrawable GLXDrawable read
GLenum GLenum GLvoid * row
#define QT_BEGIN_NAMESPACE
GLsizei GLsizei GLenum GLenum const GLvoid * data
GLuint GLuint GLsizei count
GLsizei const GLfloat * value
void openPersistentEditor(const QModelIndex &index)
T qvariant_cast(const QVariant &)
bool operator<(const QByteArray &a1, const QByteArray &a2)
void dropEvent(QDropEvent *e)