45 #include <QtGui/qabstractitemview.h> 53 #ifndef QT_NO_LISTVIEW 70 bool uniformItemSizes;
73 bool selectionRectVisible;
88 void setFlow(
Flow flow);
91 void setWrapping(
bool enable);
92 bool isWrapping()
const;
100 void setSpacing(
int space);
103 void setBatchSize(
int batchSize);
104 int batchSize()
const;
106 void setGridSize(
const QSize &size);
107 QSize gridSize()
const;
112 void clearPropertyFlags();
114 bool isRowHidden(
int row)
const;
115 void setRowHidden(
int row,
bool hide);
117 void setModelColumn(
int column);
118 int modelColumn()
const;
120 void setUniformItemSizes(
bool enable);
121 bool uniformItemSizes()
const;
123 void setWordWrap(
bool on);
124 bool wordWrap()
const;
126 void setSelectionRectVisible(
bool show);
127 bool isSelectionRectVisible()
const;
147 void resizeContents(
int width,
int height);
148 QSize contentsSize()
const;
159 #ifndef QT_NO_DRAGANDDROP 163 void startDrag(Qt::DropActions supportedActions);
166 void internalDrag(Qt::DropActions supportedActions);
167 #endif // QT_NO_DRAGANDDROP 178 void setSelection(
const QRect &rect, QItemSelectionModel::SelectionFlags command);
197 #endif // QT_NO_LISTVIEW 203 #endif // QLISTVIEW_H virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
This slot is called when rows are about to be removed.
#define QT_END_NAMESPACE
This macro expands to.
virtual QStyleOptionViewItem viewOptions() const
Returns a QStyleOptionViewItem structure populated with the view's palette, font, state...
void mouseMoveEvent(QMouseEvent *event)
This function is called with the given event when a mouse move event is sent to the widget...
virtual bool isIndexHidden(const QModelIndex &index) const =0
Returns true if the item referred to by the given index is hidden in the view, otherwise returns fals...
virtual QRect visualRect(const QModelIndex &index) const =0
Returns the rectangle on the viewport occupied by the item at index.
virtual void setRootIndex(const QModelIndex &index)
Sets the root item to the item at the given index.
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
void timerEvent(QTimerEvent *event)
This function is called with the given event when a timer event is sent to the widget.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
virtual void doItemsLayout()
This function is intended to lay out the items in the view.
The QDragMoveEvent class provides an event which is sent while a drag and drop action is in progress...
virtual QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers)=0
Returns a QModelIndex object pointing to the next object in the view, based on the given cursorAction...
void dragMoveEvent(QDragMoveEvent *event)
This function is called continuously with the given event during a drag and drop operation over the w...
void dropEvent(QDropEvent *event)
This function is called with the given event when a drop event occurs over the widget.
virtual int verticalOffset() const =0
Returns the vertical offset of the view.
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual void scrollTo(const QModelIndex &index, ScrollHint hint=EnsureVisible)=0
Scrolls the view if necessary to ensure that the item at index is visible.
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
This slot is called when a new item becomes the current item.
The QResizeEvent class contains event parameters for resize events.
virtual void reset()
Reset the internal state of the view.
The QDragLeaveEvent class provides an event that is sent to a widget when a drag and drop action leav...
The QRegion class specifies a clip region for a painter.
virtual int horizontalOffset() const =0
Returns the horizontal offset of the view.
The QMouseEvent class contains parameters that describe a mouse event.
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
This slot is called when the selection is changed.
The QAbstractItemView class provides the basic functionality for item view classes.
The QItemSelection class manages information about selected items in a model.
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.
virtual void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command)=0
Applies the selection flags to the items in or touched by the rectangle, rect.
The QTimerEvent class contains parameters that describe a timer event.
The Flow item arranges its children side by side, wrapping as necessary.
void resizeEvent(QResizeEvent *event)
This function is called with the given event when a resize event is sent to the widget.
virtual QModelIndexList selectedIndexes() const
This convenience function returns a list of all selected and non-hidden item indexes in the view...
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.
void mouseReleaseEvent(QMouseEvent *event)
This function is called with the given event when a mouse button is released, after a mouse press eve...
virtual void rowsInserted(const QModelIndex &parent, int start, int end)
This slot is called when rows are inserted.
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
This slot is called when items are changed in the model.
virtual QRegion visualRegionForSelection(const QItemSelection &selection) const =0
Returns the region from the viewport of the items in the given selection.
virtual void updateGeometries()
Updates the geometry of the child widgets of the view.
The QSize class defines the size of a two-dimensional object using integer point precision.
#define Q_DECLARE_PRIVATE(Class)
CursorAction
This enum describes the different ways to navigate between items,.
The QStyleOptionViewItem class is used to describe the parameters used to draw an item in a view widg...
The QPaintEvent class contains event parameters for paint events.
static const KeyPair *const end
void dragLeaveEvent(QDragLeaveEvent *event)
This function is called when the item being dragged leaves the view.
bool event(QEvent *event)
Reimplemented Function
The QEvent class is the base class of all event classes.
virtual void startDrag(Qt::DropActions supportedActions)
Starts a drag by calling drag->exec() using the given supportedActions.
virtual QModelIndex indexAt(const QPoint &point) const =0
Returns the model index of the item at the viewport coordinates point.