42 #ifndef QABSTRACTITEMVIEW_H
43 #define QABSTRACTITEMVIEW_H
56 #ifndef QT_NO_ITEMVIEWS
61 class QAbstractItemViewPrivate;
68 Q_PROPERTY(
bool autoScroll READ hasAutoScroll WRITE setAutoScroll)
69 Q_PROPERTY(
int autoScrollMargin READ autoScrollMargin WRITE setAutoScrollMargin)
70 Q_PROPERTY(EditTriggers editTriggers READ editTriggers WRITE setEditTriggers)
71 Q_PROPERTY(
bool tabKeyNavigation READ tabKeyNavigation WRITE setTabKeyNavigation)
72 #ifndef QT_NO_DRAGANDDROP
73 Q_PROPERTY(
bool showDropIndicator READ showDropIndicator WRITE setDropIndicatorShown)
74 Q_PROPERTY(
bool dragEnabled READ dragEnabled WRITE setDragEnabled)
75 Q_PROPERTY(
bool dragDropOverwriteMode READ dragDropOverwriteMode WRITE setDragDropOverwriteMode)
76 Q_PROPERTY(DragDropMode dragDropMode READ dragDropMode WRITE setDragDropMode)
79 Q_PROPERTY(
bool alternatingRowColors READ alternatingRowColors WRITE setAlternatingRowColors)
119 Q_DECLARE_FLAGS(EditTriggers, EditTrigger)
147 void setEditTriggers(EditTriggers triggers);
148 EditTriggers editTriggers()
const;
150 void setVerticalScrollMode(ScrollMode
mode);
151 ScrollMode verticalScrollMode()
const;
153 void setHorizontalScrollMode(ScrollMode
mode);
154 ScrollMode horizontalScrollMode()
const;
156 void setAutoScroll(
bool enable);
157 bool hasAutoScroll()
const;
159 void setAutoScrollMargin(
int margin);
160 int autoScrollMargin()
const;
162 void setTabKeyNavigation(
bool enable);
163 bool tabKeyNavigation()
const;
165 #ifndef QT_NO_DRAGANDDROP
166 void setDropIndicatorShown(
bool enable);
167 bool showDropIndicator()
const;
169 void setDragEnabled(
bool enable);
170 bool dragEnabled()
const;
172 void setDragDropOverwriteMode(
bool overwrite);
173 bool dragDropOverwriteMode()
const;
183 void setDragDropMode(DragDropMode behavior);
184 DragDropMode dragDropMode()
const;
190 void setAlternatingRowColors(
bool enable);
191 bool alternatingRowColors()
const;
194 QSize iconSize()
const;
199 virtual void keyboardSearch(
const QString &search);
202 virtual void scrollTo(
const QModelIndex &
index, ScrollHint hint = EnsureVisible) = 0;
206 virtual int sizeHintForRow(
int row)
const;
207 virtual int sizeHintForColumn(
int column)
const;
225 #ifdef Q_NO_USING_KEYWORD
232 virtual void reset();
234 virtual void doItemsLayout();
235 virtual void selectAll();
237 void clearSelection();
240 void scrollToBottom();
249 virtual void updateEditorData();
250 virtual void updateEditorGeometries();
251 virtual void updateGeometries();
252 virtual void verticalScrollbarAction(
int action);
253 virtual void horizontalScrollbarAction(
int action);
254 virtual void verticalScrollbarValueChanged(
int value);
255 virtual void horizontalScrollbarValueChanged(
int value);
257 virtual void commitData(
QWidget *editor);
258 virtual void editorDestroyed(
QObject *editor);
267 void viewportEntered();
272 void setHorizontalStepsPerItem(
int steps);
273 int horizontalStepsPerItem()
const;
274 void setVerticalStepsPerItem(
int steps);
275 int verticalStepsPerItem()
const;
279 MoveNext, MovePrevious };
280 virtual QModelIndex moveCursor(CursorAction cursorAction,
281 Qt::KeyboardModifiers modifiers) = 0;
283 virtual int horizontalOffset()
const = 0;
284 virtual int verticalOffset()
const = 0;
288 virtual void setSelection(
const QRect &rect, QItemSelectionModel::SelectionFlags command) = 0;
294 virtual QItemSelectionModel::SelectionFlags selectionCommand(
const QModelIndex &
index,
295 const QEvent *event = 0)
const;
297 #ifndef QT_NO_DRAGANDDROP
298 virtual void startDrag(Qt::DropActions supportedActions);
314 void setState(
State state);
316 void scheduleDelayedItemsLayout();
317 void executeDelayedItemsLayout();
319 void setDirtyRegion(
const QRegion ®ion);
320 void scrollDirtyRegion(
int dx,
int dy);
321 QPoint dirtyRegionOffset()
const;
323 void startAutoScroll();
324 void stopAutoScroll();
334 #ifndef QT_NO_DRAGANDDROP
347 #ifndef QT_NO_DRAGANDDROP
349 DropIndicatorPosition dropIndicatorPosition()
const;
356 Q_PRIVATE_SLOT(d_func(),
void _q_columnsRemoved(const QModelIndex&,
int,
int))
357 Q_PRIVATE_SLOT(d_func(),
void _q_columnsInserted(const QModelIndex&,
int,
int))
358 Q_PRIVATE_SLOT(d_func(),
void _q_rowsInserted(const QModelIndex&,
int,
int))
359 Q_PRIVATE_SLOT(d_func(),
void _q_rowsRemoved(const QModelIndex&,
int,
int))
364 friend class QTreeViewPrivate;
365 friend class QAccessibleItemRow;
366 friend class QListModeViewBase;
367 friend class QListViewPrivate;
372 #endif // QT_NO_ITEMVIEWS
378 #endif // QABSTRACTITEMVIEW_H
State
The state the media producing object is in at the moment.
#define Q_PRIVATE_SLOT(d, signature)
virtual void timerEvent(QTimerEvent *)
GLenum GLenum GLvoid * row
#define QT_BEGIN_NAMESPACE
GLsizei const GLfloat * value
GLenum GLenum GLvoid GLvoid * column