45 #include <QtGui/qlistview.h> 46 #include <QtCore/qvariant.h> 47 #include <QtCore/qvector.h> 48 #include <QtGui/qitemselectionmodel.h> 56 #ifndef QT_NO_LISTWIDGET 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; }
182 #ifndef QT_NO_TOOLTIP 187 #ifndef QT_NO_WHATSTHIS 195 #ifndef QT_NO_DATASTREAM 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 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 The QVariant class acts like a union for the most common Qt data types.
The QColor class provides colors based on RGB, HSV or CMYK values.
void openPersistentEditor(const QModelIndex &index)
Opens a persistent editor on the item at the given index.
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
static void clear(QVariant::Private *d)
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
#define Q_PRIVATE_SLOT(d, signature)
void itemChanged(QListWidgetItem *item)
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Reimplemented Function
The QString class provides a Unicode character string.
The QVector class is a template class that provides a dynamic array.
bool operator<(int priority, const QPair< QRunnable *, int > &p)
bool event(QEvent *e)
Reimplemented Function
virtual void setModel(QAbstractItemModel *model)
Sets the model for the view to present.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QStringList mimeTypes() const
Returns a list of MIME types that can be used to describe a list of model indexes.
static bool setData(const QByteArray &data, STGMEDIUM *pmedium)
QList< QListWidgetItem * > items
The QStringList class provides a list of strings.
static const char * data(const QByteArray &arr)
Qt::DropActions supportedDropActions() const
Returns the drop actions supported by this model.
The QMimeData class provides a container for data that records information about its MIME type...
The QAbstractItemModel class provides the abstract interface for item model classes.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
The QDropEvent class provides an event which is sent when a drag and drop action is completed...
The QListView class provides a list or icon view onto a model.
The QFont class specifies a font used for drawing text.
QObject * parent() const
Returns a pointer to the parent object.
The QPoint class defines a point in the plane using integer precision.
The QModelIndex class is used to locate data in a data model.
The QRect class defines a rectangle in the plane using integer precision.
T qvariant_cast(const QVariant &)
State state() const
Returns the item view's state.
QMimeData * mimeData(const QModelIndexList &indexes) const
Returns an object that contains serialized items of data corresponding to the list of indexes specifi...
The QSize class defines the size of a two-dimensional object using integer point precision.
#define Q_DECLARE_PRIVATE(Class)
The QDataStream class provides serialization of binary data to a QIODevice.
void closePersistentEditor(const QModelIndex &index)
Closes the persistent editor for the item at the given index.
Qt::ItemFlags flags(const QModelIndex &index) const
Returns the item flags for the given index.
The QEvent class is the base class of all event classes.
void dropEvent(QDropEvent *e)
Reimplemented Function
The QList class is a template class that provides lists.
The QIcon class provides scalable icons in different modes and states.