~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qabstractitemview.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/itemviews/qabstractitemview.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QAbstractItemView Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QAbstractItemView Class Reference</h1>
 
21
<p>The QAbstractItemView class provides the basic functionality for item view classes. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QAbstractItemView&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qabstractscrollarea.html">QAbstractScrollArea</a>.</p>
 
24
<p>Inherited by <a href="qheaderview.html">QHeaderView</a>, <a href="qlistview.html">QListView</a>, <a href="qtableview.html">QTableView</a>, and <a href="qtreeview.html">QTreeView</a>.</p>
 
25
<ul>
 
26
<li><a href="qabstractitemview-members.html">List of all members, including inherited members</a></li>
 
27
</ul>
 
28
<a name="public-types"></a>
 
29
<h3>Public Types</h3>
 
30
<ul>
 
31
<li><div class="fn"/>enum <b><a href="qabstractitemview.html#EditTrigger-enum">EditTrigger</a></b> { NoEditTriggers, CurrentChanged, DoubleClicked, SelectedClicked, ..., AllEditTriggers }</li>
 
32
<li><div class="fn"/>flags <b><a href="qabstractitemview.html#EditTrigger-enum">EditTriggers</a></b></li>
 
33
<li><div class="fn"/>enum <b><a href="qabstractitemview.html#ScrollHint-enum">ScrollHint</a></b> { EnsureVisible, PositionAtTop, PositionAtBottom }</li>
 
34
<li><div class="fn"/>enum <b><a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a></b> { SelectItems, SelectRows, SelectColumns }</li>
 
35
<li><div class="fn"/>enum <b><a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a></b> { SingleSelection, MultiSelection, ExtendedSelection, NoSelection }</li>
 
36
</ul>
 
37
<a name="properties"></a>
 
38
<h3>Properties</h3>
 
39
<table width="100%" border="0" cellpadding="0" cellspacing="0">
 
40
<tr><td width="45%" valign="top"><ul>
 
41
<li><div class="fn"/><b><a href="qabstractitemview.html#alternatingRowColors-prop">alternatingRowColors</a></b> : bool</li>
 
42
<li><div class="fn"/><b><a href="qabstractitemview.html#autoScroll-prop">autoScroll</a></b> : bool</li>
 
43
<li><div class="fn"/><b><a href="qabstractitemview.html#dragEnabled-prop">dragEnabled</a></b> : bool</li>
 
44
<li><div class="fn"/><b><a href="qabstractitemview.html#editTriggers-prop">editTriggers</a></b> : EditTriggers</li>
 
45
<li><div class="fn"/><b><a href="qabstractitemview.html#iconSize-prop">iconSize</a></b> : QSize</li>
 
46
</ul></td><td valign="top"><ul>
 
47
<li><div class="fn"/><b><a href="qabstractitemview.html#selectionBehavior-prop">selectionBehavior</a></b> : SelectionBehavior</li>
 
48
<li><div class="fn"/><b><a href="qabstractitemview.html#selectionMode-prop">selectionMode</a></b> : SelectionMode</li>
 
49
<li><div class="fn"/><b><a href="qabstractitemview.html#showDropIndicator-prop">showDropIndicator</a></b> : bool</li>
 
50
<li><div class="fn"/><b><a href="qabstractitemview.html#tabKeyNavigation-prop">tabKeyNavigation</a></b> : bool</li>
 
51
<li><div class="fn"/><b><a href="qabstractitemview.html#textElideMode-prop">textElideMode</a></b> : Qt::TextElideMode</li>
 
52
</ul>
 
53
</td></tr>
 
54
</table>
 
55
<ul>
 
56
<li><div class="fn"/>2 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li>
 
57
<li><div class="fn"/>6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
 
58
<li><div class="fn"/>52 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
59
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
60
</ul>
 
61
<a name="public-functions"></a>
 
62
<h3>Public Functions</h3>
 
63
<ul>
 
64
<li><div class="fn"/><b><a href="qabstractitemview.html#QAbstractItemView">QAbstractItemView</a></b> ( QWidget * <i>parent</i> = 0 )</li>
 
65
<li><div class="fn"/><b><a href="qabstractitemview.html#dtor.QAbstractItemView">~QAbstractItemView</a></b> ()</li>
 
66
<li><div class="fn"/>bool <b><a href="qabstractitemview.html#alternatingRowColors-prop">alternatingRowColors</a></b> () const</li>
 
67
<li><div class="fn"/>void <b><a href="qabstractitemview.html#closePersistentEditor">closePersistentEditor</a></b> ( const QModelIndex &amp; <i>index</i> )</li>
 
68
<li><div class="fn"/>QModelIndex <b><a href="qabstractitemview.html#currentIndex">currentIndex</a></b> () const</li>
 
69
<li><div class="fn"/>bool <b><a href="qabstractitemview.html#dragEnabled-prop">dragEnabled</a></b> () const</li>
 
70
<li><div class="fn"/>EditTriggers <b><a href="qabstractitemview.html#editTriggers-prop">editTriggers</a></b> () const</li>
 
71
<li><div class="fn"/>bool <b><a href="qabstractitemview.html#autoScroll-prop">hasAutoScroll</a></b> () const</li>
 
72
<li><div class="fn"/>QSize <b><a href="qabstractitemview.html#iconSize-prop">iconSize</a></b> () const</li>
 
73
<li><div class="fn"/>virtual QModelIndex <b><a href="qabstractitemview.html#indexAt">indexAt</a></b> ( const QPoint &amp; <i>p</i> ) const = 0</li>
 
74
<li><div class="fn"/>QAbstractItemDelegate * <b><a href="qabstractitemview.html#itemDelegate">itemDelegate</a></b> () const</li>
 
75
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#keyboardSearch">keyboardSearch</a></b> ( const QString &amp; <i>search</i> )</li>
 
76
<li><div class="fn"/>QAbstractItemModel * <b><a href="qabstractitemview.html#model">model</a></b> () const</li>
 
77
<li><div class="fn"/>void <b><a href="qabstractitemview.html#openPersistentEditor">openPersistentEditor</a></b> ( const QModelIndex &amp; <i>index</i> )</li>
 
78
<li><div class="fn"/>QModelIndex <b><a href="qabstractitemview.html#rootIndex">rootIndex</a></b> () const</li>
 
79
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#scrollTo">scrollTo</a></b> ( const QModelIndex &amp; <i>index</i>, ScrollHint <i>hint</i> = EnsureVisible ) = 0</li>
 
80
<li><div class="fn"/>QAbstractItemView::SelectionBehavior <b><a href="qabstractitemview.html#selectionBehavior-prop">selectionBehavior</a></b> () const</li>
 
81
<li><div class="fn"/>QAbstractItemView::SelectionMode <b><a href="qabstractitemview.html#selectionMode-prop">selectionMode</a></b> () const</li>
 
82
<li><div class="fn"/>QItemSelectionModel * <b><a href="qabstractitemview.html#selectionModel">selectionModel</a></b> () const</li>
 
83
<li><div class="fn"/>void <b><a href="qabstractitemview.html#alternatingRowColors-prop">setAlternatingRowColors</a></b> ( bool <i>enable</i> )</li>
 
84
<li><div class="fn"/>void <b><a href="qabstractitemview.html#autoScroll-prop">setAutoScroll</a></b> ( bool <i>enable</i> )</li>
 
85
<li><div class="fn"/>void <b><a href="qabstractitemview.html#dragEnabled-prop">setDragEnabled</a></b> ( bool <i>enable</i> )</li>
 
86
<li><div class="fn"/>void <b><a href="qabstractitemview.html#showDropIndicator-prop">setDropIndicatorShown</a></b> ( bool <i>enable</i> )</li>
 
87
<li><div class="fn"/>void <b><a href="qabstractitemview.html#editTriggers-prop">setEditTriggers</a></b> ( EditTriggers <i>triggers</i> )</li>
 
88
<li><div class="fn"/>void <b><a href="qabstractitemview.html#iconSize-prop">setIconSize</a></b> ( const QSize &amp; <i>size</i> )</li>
 
89
<li><div class="fn"/>void <b><a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a></b> ( QAbstractItemDelegate * <i>delegate</i> )</li>
 
90
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#setModel">setModel</a></b> ( QAbstractItemModel * <i>model</i> )</li>
 
91
<li><div class="fn"/>void <b><a href="qabstractitemview.html#selectionBehavior-prop">setSelectionBehavior</a></b> ( QAbstractItemView::SelectionBehavior <i>behavior</i> )</li>
 
92
<li><div class="fn"/>void <b><a href="qabstractitemview.html#selectionMode-prop">setSelectionMode</a></b> ( QAbstractItemView::SelectionMode <i>mode</i> )</li>
 
93
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a></b> ( QItemSelectionModel * <i>selectionModel</i> )</li>
 
94
<li><div class="fn"/>void <b><a href="qabstractitemview.html#tabKeyNavigation-prop">setTabKeyNavigation</a></b> ( bool <i>enable</i> )</li>
 
95
<li><div class="fn"/>void <b><a href="qabstractitemview.html#textElideMode-prop">setTextElideMode</a></b> ( Qt::TextElideMode <i>mode</i> )</li>
 
96
<li><div class="fn"/>bool <b><a href="qabstractitemview.html#showDropIndicator-prop">showDropIndicator</a></b> () const</li>
 
97
<li><div class="fn"/>virtual int <b><a href="qabstractitemview.html#sizeHintForColumn">sizeHintForColumn</a></b> ( int <i>column</i> ) const</li>
 
98
<li><div class="fn"/>QSize <b><a href="qabstractitemview.html#sizeHintForIndex">sizeHintForIndex</a></b> ( const QModelIndex &amp; <i>index</i> ) const</li>
 
99
<li><div class="fn"/>virtual int <b><a href="qabstractitemview.html#sizeHintForRow">sizeHintForRow</a></b> ( int <i>row</i> ) const</li>
 
100
<li><div class="fn"/>bool <b><a href="qabstractitemview.html#tabKeyNavigation-prop">tabKeyNavigation</a></b> () const</li>
 
101
<li><div class="fn"/>Qt::TextElideMode <b><a href="qabstractitemview.html#textElideMode-prop">textElideMode</a></b> () const</li>
 
102
<li><div class="fn"/>virtual QRect <b><a href="qabstractitemview.html#visualRect">visualRect</a></b> ( const QModelIndex &amp; <i>index</i> ) const = 0</li>
 
103
</ul>
 
104
<ul>
 
105
<li><div class="fn"/>8 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li>
 
106
<li><div class="fn"/>13 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
 
107
<li><div class="fn"/>183 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
108
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
109
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
110
</ul>
 
111
<a name="public-slots"></a>
 
112
<h3>Public Slots</h3>
 
113
<ul>
 
114
<li><div class="fn"/>void <b><a href="qabstractitemview.html#clearSelection">clearSelection</a></b> ()</li>
 
115
<li><div class="fn"/>void <b><a href="qabstractitemview.html#edit">edit</a></b> ( const QModelIndex &amp; <i>index</i> )</li>
 
116
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#reset">reset</a></b> ()</li>
 
117
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#selectAll">selectAll</a></b> ()</li>
 
118
<li><div class="fn"/>void <b><a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a></b> ( const QModelIndex &amp; <i>index</i> )</li>
 
119
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#setRootIndex">setRootIndex</a></b> ( const QModelIndex &amp; <i>index</i> )</li>
 
120
</ul>
 
121
<ul>
 
122
<li><div class="fn"/>17 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
 
123
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
124
</ul>
 
125
<a name="signals"></a>
 
126
<h3>Signals</h3>
 
127
<ul>
 
128
<li><div class="fn"/>void <b><a href="qabstractitemview.html#activated">activated</a></b> ( const QModelIndex &amp; <i>index</i> )</li>
 
129
<li><div class="fn"/>void <b><a href="qabstractitemview.html#clicked">clicked</a></b> ( const QModelIndex &amp; <i>index</i> )</li>
 
130
<li><div class="fn"/>void <b><a href="qabstractitemview.html#doubleClicked">doubleClicked</a></b> ( const QModelIndex &amp; <i>index</i> )</li>
 
131
<li><div class="fn"/>void <b><a href="qabstractitemview.html#entered">entered</a></b> ( const QModelIndex &amp; <i>index</i> )</li>
 
132
<li><div class="fn"/>void <b><a href="qabstractitemview.html#pressed">pressed</a></b> ( const QModelIndex &amp; <i>index</i> )</li>
 
133
<li><div class="fn"/>void <b><a href="qabstractitemview.html#viewportEntered">viewportEntered</a></b> ()</li>
 
134
</ul>
 
135
<ul>
 
136
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
 
137
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
138
</ul>
 
139
<a name="protected-types"></a>
 
140
<h3>Protected Types</h3>
 
141
<ul>
 
142
<li><div class="fn"/>enum <b><a href="qabstractitemview.html#CursorAction-enum">CursorAction</a></b> { MoveUp, MoveDown, MoveLeft, MoveRight, ..., MovePrevious }</li>
 
143
<li><div class="fn"/>enum <b><a href="qabstractitemview.html#State-enum">State</a></b> { NoState, DraggingState, DragSelectingState, EditingState, ExpandingState, CollapsingState }</li>
 
144
</ul>
 
145
<a name="protected-functions"></a>
 
146
<h3>Protected Functions</h3>
 
147
<ul>
 
148
<li><div class="fn"/>QPoint <b><a href="qabstractitemview.html#dirtyRegionOffset">dirtyRegionOffset</a></b> () const</li>
 
149
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#dragEnterEvent">dragEnterEvent</a></b> ( QDragEnterEvent * <i>e</i> )</li>
 
150
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#dragLeaveEvent">dragLeaveEvent</a></b> ( QDragLeaveEvent * <i>event</i> )</li>
 
151
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#dragMoveEvent">dragMoveEvent</a></b> ( QDragMoveEvent * <i>e</i> )</li>
 
152
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#dropEvent">dropEvent</a></b> ( QDropEvent * <i>e</i> )</li>
 
153
<li><div class="fn"/>virtual bool <b><a href="qabstractitemview.html#edit-2">edit</a></b> ( const QModelIndex &amp; <i>index</i>, EditTrigger <i>trigger</i>, QEvent * <i>event</i> )</li>
 
154
<li><div class="fn"/>void <b><a href="qabstractitemview.html#executeDelayedItemsLayout">executeDelayedItemsLayout</a></b> ()</li>
 
155
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>e</i> )</li>
 
156
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#focusOutEvent">focusOutEvent</a></b> ( QFocusEvent * <i>e</i> )</li>
 
157
<li><div class="fn"/>virtual int <b><a href="qabstractitemview.html#horizontalOffset">horizontalOffset</a></b> () const = 0</li>
 
158
<li><div class="fn"/>int <b><a href="qabstractitemview.html#horizontalStepsPerItem">horizontalStepsPerItem</a></b> () const</li>
 
159
<li><div class="fn"/>virtual bool <b><a href="qabstractitemview.html#isIndexHidden">isIndexHidden</a></b> ( const QModelIndex &amp; <i>index</i> ) const = 0</li>
 
160
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>e</i> )</li>
 
161
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
162
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#mouseMoveEvent">mouseMoveEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
163
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#mousePressEvent">mousePressEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
164
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
165
<li><div class="fn"/>virtual QModelIndex <b><a href="qabstractitemview.html#moveCursor">moveCursor</a></b> ( CursorAction <i>cursorAction</i>, Qt::KeyboardModifiers <i>modifiers</i> ) = 0</li>
 
166
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>e</i> )</li>
 
167
<li><div class="fn"/>void <b><a href="qabstractitemview.html#scheduleDelayedItemsLayout">scheduleDelayedItemsLayout</a></b> ()</li>
 
168
<li><div class="fn"/>void <b><a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a></b> ( int <i>dx</i>, int <i>dy</i> )</li>
 
169
<li><div class="fn"/>virtual QModelIndexList <b><a href="qabstractitemview.html#selectedIndexes">selectedIndexes</a></b> () const</li>
 
170
<li><div class="fn"/>virtual QItemSelectionModel::SelectionFlags <b><a href="qabstractitemview.html#selectionCommand">selectionCommand</a></b> ( const QModelIndex &amp; <i>index</i>, const QEvent * <i>event</i> = 0 ) const</li>
 
171
<li><div class="fn"/>void <b><a href="qabstractitemview.html#setHorizontalStepsPerItem">setHorizontalStepsPerItem</a></b> ( int <i>steps</i> )</li>
 
172
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#setSelection">setSelection</a></b> ( const QRect &amp; <i>rect</i>, QItemSelectionModel::SelectionFlags <i>flags</i> ) = 0</li>
 
173
<li><div class="fn"/>void <b><a href="qabstractitemview.html#setState">setState</a></b> ( State <i>state</i> )</li>
 
174
<li><div class="fn"/>void <b><a href="qabstractitemview.html#setVerticalStepsPerItem">setVerticalStepsPerItem</a></b> ( int <i>steps</i> )</li>
 
175
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#startDrag">startDrag</a></b> ( Qt::DropActions <i>supportedActions</i> )</li>
 
176
<li><div class="fn"/>State <b><a href="qabstractitemview.html#state">state</a></b> () const</li>
 
177
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#timerEvent">timerEvent</a></b> ( QTimerEvent * <i>e</i> )</li>
 
178
<li><div class="fn"/>virtual int <b><a href="qabstractitemview.html#verticalOffset">verticalOffset</a></b> () const = 0</li>
 
179
<li><div class="fn"/>int <b><a href="qabstractitemview.html#verticalStepsPerItem">verticalStepsPerItem</a></b> () const</li>
 
180
<li><div class="fn"/>virtual QStyleOptionViewItem <b><a href="qabstractitemview.html#viewOptions">viewOptions</a></b> () const</li>
 
181
<li><div class="fn"/>virtual bool <b><a href="qabstractitemview.html#viewportEvent">viewportEvent</a></b> ( QEvent * <i>event</i> )</li>
 
182
<li><div class="fn"/>virtual QRegion <b><a href="qabstractitemview.html#visualRegionForSelection">visualRegionForSelection</a></b> ( const QItemSelection &amp; <i>selection</i> ) const = 0</li>
 
183
</ul>
 
184
<ul>
 
185
<li><div class="fn"/>17 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li>
 
186
<li><div class="fn"/>39 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
187
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
188
</ul>
 
189
<a name="protected-slots"></a>
 
190
<h3>Protected Slots</h3>
 
191
<ul>
 
192
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#closeEditor">closeEditor</a></b> ( QWidget * <i>editor</i>, QAbstractItemDelegate::EndEditHint <i>hint</i> )</li>
 
193
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#commitData">commitData</a></b> ( QWidget * <i>editor</i> )</li>
 
194
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#currentChanged">currentChanged</a></b> ( const QModelIndex &amp; <i>current</i>, const QModelIndex &amp; <i>previous</i> )</li>
 
195
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#dataChanged">dataChanged</a></b> ( const QModelIndex &amp; <i>topLeft</i>, const QModelIndex &amp; <i>bottomRight</i> )</li>
 
196
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#editorDestroyed">editorDestroyed</a></b> ( QObject * <i>editor</i> )</li>
 
197
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#rowsAboutToBeRemoved">rowsAboutToBeRemoved</a></b> ( const QModelIndex &amp; <i>parent</i>, int <i>start</i>, int <i>end</i> )</li>
 
198
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#rowsInserted">rowsInserted</a></b> ( const QModelIndex &amp; <i>parent</i>, int <i>start</i>, int <i>end</i> )</li>
 
199
<li><div class="fn"/>virtual void <b><a href="qabstractitemview.html#selectionChanged">selectionChanged</a></b> ( const QItemSelection &amp; <i>selected</i>, const QItemSelection &amp; <i>deselected</i> )</li>
 
200
</ul>
 
201
<h3>Additional Inherited Members</h3>
 
202
<ul>
 
203
<li><div class="fn"/>2 static public members inherited from <a href="qframe.html#static-public-members">QFrame</a></li>
 
204
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
 
205
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
206
</ul>
 
207
<a name="details"></a>
 
208
<hr />
 
209
<h2>Detailed Description</h2>
 
210
<p>The QAbstractItemView class provides the basic functionality for item view classes.</p>
 
211
<p>QAbstractItemView class is the base class for every standard view that uses a <a href="qabstractitemmodel.html">QAbstractItemModel</a>. QAbstractItemView is an abstract class and cannot itself be instantiated. It provides a standard interface for interoperating with models through the signals and slots mechanism, enabling subclasses to be kept up-to-date with changes to their models. This class provides standard support for keyboard and mouse navigation, viewport scrolling, item editing, and selections.</p>
 
212
<p>The QAbstractItemView class is one of the <a href="model-view.html">Model/View Classes</a> and is part of Qt's <a href="model-view-programming.html">model/view framework</a>.</p>
 
213
<p>The view classes that inherit QAbstractItemView only need to implement their own view-specific functionality, such as drawing items, returning the geometry of items, finding items, etc.</p>
 
214
<p>QAbstractItemView provides common slots such as <a href="qabstractitemview.html#edit">edit</a>() and <a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a>(). Many protected slots are also provided, including <a href="qabstractitemview.html#dataChanged">dataChanged</a>(), <a href="qabstractitemview.html#rowsInserted">rowsInserted</a>(), <a href="qabstractitemview.html#rowsAboutToBeRemoved">rowsAboutToBeRemoved</a>(), columnsInserted(), columnsRemoved(), <a href="qabstractitemview.html#selectionChanged">selectionChanged</a>(), and <a href="qabstractitemview.html#currentChanged">currentChanged</a>().</p>
 
215
<p>The root item is returned by <a href="qabstractitemview.html#rootIndex">rootIndex</a>(), and the current item by <a href="qabstractitemview.html#currentIndex">currentIndex</a>(). To make sure that an item is visible use <a href="qabstractitemview.html#scrollTo">scrollTo</a>().</p>
 
216
<p>Some of QAbstractItemView's functions are concerned with scrolling, for example setHorizontalFactor() and setVerticalFactor(). Several other functions are concerned with selection control; for example <a href="qabstractitemview.html#selectionMode-prop">setSelectionMode</a>(), and <a href="qabstractitemview.html#selectionBehavior-prop">setSelectionBehavior</a>(). This class provides a default selection model to work with (<a href="qabstractitemview.html#selectionModel">selectionModel</a>()), but this can be replaced by using <a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>() with an instance of <a href="qitemselectionmodel.html">QItemSelectionModel</a>.</p>
 
217
<p>For complete control over the display and editing of items you can specify a delegate with <a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>().</p>
 
218
<p>QAbstractItemView provides a lot of protected functions. Some are concerned with editing, for example, <a href="qabstractitemview.html#edit">edit</a>(), and <a href="qabstractitemview.html#commitData">commitData</a>(), whilst others are keyboard and mouse event handlers.</p>
 
219
<p>See also <a href="model-view-programming.html">Model/View Programming</a> and <a href="qabstractitemmodel.html">QAbstractItemModel</a>.</p>
 
220
<hr />
 
221
<h2>Member Type Documentation</h2>
 
222
<h3 class="fn"><a name="CursorAction-enum"></a>enum QAbstractItemView::CursorAction</h3>
 
223
<p>This enum describes the different ways to navigate between items,</p>
 
224
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
225
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
226
<tr><td valign="top"><tt>QAbstractItemView::MoveUp</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Move to the item above the current item.</td></tr>
 
227
<tr><td valign="top"><tt>QAbstractItemView::MoveDown</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Move to the item below the current item.</td></tr>
 
228
<tr><td valign="top"><tt>QAbstractItemView::MoveLeft</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Move to the item left of the current item.</td></tr>
 
229
<tr><td valign="top"><tt>QAbstractItemView::MoveRight</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">Move to the item right of the current item.</td></tr>
 
230
<tr><td valign="top"><tt>QAbstractItemView::MoveHome</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">Move to the top-left corner item.</td></tr>
 
231
<tr><td valign="top"><tt>QAbstractItemView::MoveEnd</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">Move to the bottom-right corner item.</td></tr>
 
232
<tr><td valign="top"><tt>QAbstractItemView::MovePageUp</tt></td><td align="center" valign="top"><tt>6</tt></td><td valign="top">Move one page up above the current item.</td></tr>
 
233
<tr><td valign="top"><tt>QAbstractItemView::MovePageDown</tt></td><td align="center" valign="top"><tt>7</tt></td><td valign="top">Move one page down below the current item.</td></tr>
 
234
<tr><td valign="top"><tt>QAbstractItemView::MoveNext</tt></td><td align="center" valign="top"><tt>8</tt></td><td valign="top">Move to the item after the current item.</td></tr>
 
235
<tr><td valign="top"><tt>QAbstractItemView::MovePrevious</tt></td><td align="center" valign="top"><tt>9</tt></td><td valign="top">Move to the item before the current item.</td></tr>
 
236
</table>
 
237
<p>See also <a href="qabstractitemview.html#moveCursor">moveCursor</a>().</p>
 
238
<h3 class="flags"><a name="EditTrigger-enum"></a>enum QAbstractItemView::EditTrigger<br />flags QAbstractItemView::EditTriggers</h3>
 
239
<p>This enum describes actions which will initiate item editing.</p>
 
240
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
241
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
242
<tr><td valign="top"><tt>QAbstractItemView::NoEditTriggers</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">No editing possible.</td></tr>
 
243
<tr><td valign="top"><tt>QAbstractItemView::CurrentChanged</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Editing start whenever current item changes.</td></tr>
 
244
<tr><td valign="top"><tt>QAbstractItemView::DoubleClicked</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Editing starts when an item is double clicked.</td></tr>
 
245
<tr><td valign="top"><tt>QAbstractItemView::SelectedClicked</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">Editing starts when clicking on an already selected item.</td></tr>
 
246
<tr><td valign="top"><tt>QAbstractItemView::EditKeyPressed</tt></td><td align="center" valign="top"><tt>8</tt></td><td valign="top">Editing starts when an edit key has been pressed over an item.</td></tr>
 
247
<tr><td valign="top"><tt>QAbstractItemView::AnyKeyPressed</tt></td><td align="center" valign="top"><tt>16</tt></td><td valign="top">Editing starts when any key is pressed over an item.</td></tr>
 
248
<tr><td valign="top"><tt>QAbstractItemView::AllEditTriggers</tt></td><td align="center" valign="top"><tt>31</tt></td><td valign="top">Editing starts for all above actions.</td></tr>
 
249
</table>
 
250
<p>The EditTriggers type is a typedef for <a href="qflags.html">QFlags</a>&lt;EditTrigger&gt;. It stores an OR combination of EditTrigger values.</p>
 
251
<h3 class="fn"><a name="ScrollHint-enum"></a>enum QAbstractItemView::ScrollHint</h3>
 
252
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
253
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
254
<tr><td valign="top"><tt>QAbstractItemView::EnsureVisible</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Scroll to ensure that the item is visible.</td></tr>
 
255
<tr><td valign="top"><tt>QAbstractItemView::PositionAtTop</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Scroll to position the item at the top of the viewport.</td></tr>
 
256
<tr><td valign="top"><tt>QAbstractItemView::PositionAtBottom</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Scroll to position the item at the bottom of the viewport.</td></tr>
 
257
</table>
 
258
<h3 class="fn"><a name="SelectionBehavior-enum"></a>enum QAbstractItemView::SelectionBehavior</h3>
 
259
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
260
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
261
<tr><td valign="top"><tt>QAbstractItemView::SelectItems</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Selecting single items.</td></tr>
 
262
<tr><td valign="top"><tt>QAbstractItemView::SelectRows</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Selecting only rows.</td></tr>
 
263
<tr><td valign="top"><tt>QAbstractItemView::SelectColumns</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Selecting only columns.</td></tr>
 
264
</table>
 
265
<h3 class="fn"><a name="SelectionMode-enum"></a>enum QAbstractItemView::SelectionMode</h3>
 
266
<p>This enum indicates how the view responds to user selections:</p>
 
267
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
268
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
269
<tr><td valign="top"><tt>QAbstractItemView::SingleSelection</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">When the user selects an item, any already-selected item becomes unselected, and the user cannot unselect the selected item.</td></tr>
 
270
<tr><td valign="top"><tt>QAbstractItemView::MultiSelection</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">When the user selects an item in the usual way, the selection status of that item is toggled and the other items are left alone.</td></tr>
 
271
<tr><td valign="top"><tt>QAbstractItemView::ExtendedSelection</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item. Multiple items can be selected by dragging the mouse over them.</td></tr>
 
272
<tr><td valign="top"><tt>QAbstractItemView::NoSelection</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Items cannot be selected.</td></tr>
 
273
</table>
 
274
<p>In other words, <tt>SingleSelection</tt> is a real single-selection list view, <tt>MultiSelection</tt> a real multi-selection list view, <tt>ExtendedSelection</tt> is a list view in which users can select multiple items, but usually want to select either just one or a range of contiguous items, and <tt>NoSelection</tt> is a list view where the user can navigate without selecting items.</p>
 
275
<h3 class="fn"><a name="State-enum"></a>enum QAbstractItemView::State</h3>
 
276
<p>Describes the different states the view can be in. This is usually only interesting when reimplementing your own view.</p>
 
277
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
278
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
279
<tr><td valign="top"><tt>QAbstractItemView::NoState</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The is the default state.</td></tr>
 
280
<tr><td valign="top"><tt>QAbstractItemView::DraggingState</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The user is dragging items.</td></tr>
 
281
<tr><td valign="top"><tt>QAbstractItemView::DragSelectingState</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The user is selecting items.</td></tr>
 
282
<tr><td valign="top"><tt>QAbstractItemView::EditingState</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">The user is editing an item in a widget editor.</td></tr>
 
283
<tr><td valign="top"><tt>QAbstractItemView::ExpandingState</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">The user is opening a branch of items.</td></tr>
 
284
<tr><td valign="top"><tt>QAbstractItemView::CollapsingState</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">The user is closing a branch of items.</td></tr>
 
285
</table>
 
286
<hr />
 
287
<h2>Property Documentation</h2>
 
288
<h3 class="fn"><a name="alternatingRowColors-prop"></a>alternatingRowColors : bool</h3>
 
289
<p>This property holds whether to draw the background using alternating colors.</p>
 
290
<p>If this property is true, the item background will be drawn using alternating colors, otherwise the background will be drawn using the <a href="qpalette.html#ColorRole-enum">QPalette::Base</a> color.</p>
 
291
<p>Access functions:</p>
 
292
<ul>
 
293
<li><div class="fn"/><b>bool alternatingRowColors () const</b></li>
 
294
<li><div class="fn"/><b>void setAlternatingRowColors ( bool <i>enable</i> )</b></li>
 
295
</ul>
 
296
<h3 class="fn"><a name="autoScroll-prop"></a>autoScroll : bool</h3>
 
297
<p>This property holds whether autoscrolling in drag move events is enabled.</p>
 
298
<p>If this property is set to true (the default), the <a href="qabstractitemview.html">QAbstractItemView</a> automatically scrolls the contents of the view if the user drags within 16 pixels of the viewport edge. This only works if the viewport accepts drops. Autoscroll is switched off by setting this property to false.</p>
 
299
<p>Access functions:</p>
 
300
<ul>
 
301
<li><div class="fn"/><b>bool hasAutoScroll () const</b></li>
 
302
<li><div class="fn"/><b>void setAutoScroll ( bool <i>enable</i> )</b></li>
 
303
</ul>
 
304
<h3 class="fn"><a name="dragEnabled-prop"></a>dragEnabled : bool</h3>
 
305
<p>This property holds whether the view supports dragging of its own items.</p>
 
306
<p>Access functions:</p>
 
307
<ul>
 
308
<li><div class="fn"/><b>bool dragEnabled () const</b></li>
 
309
<li><div class="fn"/><b>void setDragEnabled ( bool <i>enable</i> )</b></li>
 
310
</ul>
 
311
<h3 class="fn"><a name="editTriggers-prop"></a>editTriggers : <a href="qabstractitemview.html#EditTrigger-enum">EditTriggers</a></h3>
 
312
<p>This property holds which actions will initiate item editing.</p>
 
313
<p>This property is a selection of flags defined by <a href="qabstractitemview.html#EditTrigger-enum">EditTrigger</a>, combined using the OR operator. The view will only initiate the editing of an item if the action performed is set in this property.</p>
 
314
<p>Access functions:</p>
 
315
<ul>
 
316
<li><div class="fn"/><b>EditTriggers editTriggers () const</b></li>
 
317
<li><div class="fn"/><b>void setEditTriggers ( EditTriggers <i>triggers</i> )</b></li>
 
318
</ul>
 
319
<h3 class="fn"><a name="iconSize-prop"></a>iconSize : <a href="qsize.html">QSize</a></h3>
 
320
<p>This property holds the size of items.</p>
 
321
<p>Setting this property when the view is visible will cause the items to be laid out again.</p>
 
322
<p>Access functions:</p>
 
323
<ul>
 
324
<li><div class="fn"/><b>QSize iconSize () const</b></li>
 
325
<li><div class="fn"/><b>void setIconSize ( const QSize &amp; <i>size</i> )</b></li>
 
326
</ul>
 
327
<h3 class="fn"><a name="selectionBehavior-prop"></a>selectionBehavior : <a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a></h3>
 
328
<p>This property holds which selection behavior the view uses.</p>
 
329
<p>This property holds whether selections are done in terms of single items, rows or columns.</p>
 
330
<p>Access functions:</p>
 
331
<ul>
 
332
<li><div class="fn"/><b>QAbstractItemView::SelectionBehavior selectionBehavior () const</b></li>
 
333
<li><div class="fn"/><b>void setSelectionBehavior ( QAbstractItemView::SelectionBehavior <i>behavior</i> )</b></li>
 
334
</ul>
 
335
<p>See also <a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a> and <a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a>.</p>
 
336
<h3 class="fn"><a name="selectionMode-prop"></a>selectionMode : <a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a></h3>
 
337
<p>This property holds which selection mode the view operates in.</p>
 
338
<p>This property controls whether the user can select one or many items and, in many-item selections, whether the selection must be a continuous range of items.</p>
 
339
<p>Access functions:</p>
 
340
<ul>
 
341
<li><div class="fn"/><b>QAbstractItemView::SelectionMode selectionMode () const</b></li>
 
342
<li><div class="fn"/><b>void setSelectionMode ( QAbstractItemView::SelectionMode <i>mode</i> )</b></li>
 
343
</ul>
 
344
<p>See also <a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a> and <a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a>.</p>
 
345
<h3 class="fn"><a name="showDropIndicator-prop"></a>showDropIndicator : bool</h3>
 
346
<p>This property holds whether the drop indicator is shown when dragging items and dropping.</p>
 
347
<p>Access functions:</p>
 
348
<ul>
 
349
<li><div class="fn"/><b>bool showDropIndicator () const</b></li>
 
350
<li><div class="fn"/><b>void setDropIndicatorShown ( bool <i>enable</i> )</b></li>
 
351
</ul>
 
352
<h3 class="fn"><a name="tabKeyNavigation-prop"></a>tabKeyNavigation : bool</h3>
 
353
<p>This property holds whether item navigation with tab and backtab is enabled.</p>
 
354
<p>Access functions:</p>
 
355
<ul>
 
356
<li><div class="fn"/><b>bool tabKeyNavigation () const</b></li>
 
357
<li><div class="fn"/><b>void setTabKeyNavigation ( bool <i>enable</i> )</b></li>
 
358
</ul>
 
359
<h3 class="fn"><a name="textElideMode-prop"></a>textElideMode : <a href="qt.html#TextElideMode-enum">Qt::TextElideMode</a></h3>
 
360
<p>This property holds the the position of the "..." in elided text.</p>
 
361
<p>Access functions:</p>
 
362
<ul>
 
363
<li><div class="fn"/><b>Qt::TextElideMode textElideMode () const</b></li>
 
364
<li><div class="fn"/><b>void setTextElideMode ( Qt::TextElideMode <i>mode</i> )</b></li>
 
365
</ul>
 
366
<hr />
 
367
<h2>Member Function Documentation</h2>
 
368
<h3 class="fn"><a name="QAbstractItemView"></a>QAbstractItemView::QAbstractItemView ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
 
369
<p>Constructs an abstract item view with the given <i>parent</i>.</p>
 
370
<h3 class="fn"><a name="dtor.QAbstractItemView"></a>QAbstractItemView::~QAbstractItemView ()</h3>
 
371
<p>Destroys the view.</p>
 
372
<h3 class="fn"><a name="activated"></a>void QAbstractItemView::activated ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
373
<p>This signal is emitted when the item specified by <i>index</i> is activated by the user (e.g., by single- or double-clicking the item, depending on the platform).</p>
 
374
<p>See also <a href="qabstractitemview.html#clicked">clicked</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), <a href="qabstractitemview.html#entered">entered</a>(), and <a href="qabstractitemview.html#pressed">pressed</a>().</p>
 
375
<h3 class="fn"><a name="clearSelection"></a>void QAbstractItemView::clearSelection ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
376
<p>Clears all selected items.</p>
 
377
<h3 class="fn"><a name="clicked"></a>void QAbstractItemView::clicked ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
378
<p>This signal is emitted when a mouse button is clicked. The item the mouse was clicked on is specified by <i>index</i> (which may be invalid if the mouse was not clicked on an item).</p>
 
379
<p>See also <a href="qabstractitemview.html#activated">activated</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), <a href="qabstractitemview.html#entered">entered</a>(), and <a href="qabstractitemview.html#pressed">pressed</a>().</p>
 
380
<h3 class="fn"><a name="closeEditor"></a>void QAbstractItemView::closeEditor ( <a href="qwidget.html">QWidget</a> * <i>editor</i>, <a href="qabstractitemdelegate.html#EndEditHint-enum">QAbstractItemDelegate::EndEditHint</a> <i>hint</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
 
381
<p>Closes the given <i>editor</i>, and releases it. The <i>hint</i> is used to specify how the view should respond to the end of the editing operation. For example, the hint may indicate that the next item in the view should be opened for editing.</p>
 
382
<p>See also <a href="qabstractitemview.html#edit">edit</a>().</p>
 
383
<h3 class="fn"><a name="closePersistentEditor"></a>void QAbstractItemView::closePersistentEditor ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )</h3>
 
384
<p>Closes the persistent editor for the item at the given <i>index</i>.</p>
 
385
<h3 class="fn"><a name="commitData"></a>void QAbstractItemView::commitData ( <a href="qwidget.html">QWidget</a> * <i>editor</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
 
386
<p>Commit the data in the <i>editor</i> to the model.</p>
 
387
<p>See also <a href="qabstractitemview.html#closeEditor">closeEditor</a>().</p>
 
388
<h3 class="fn"><a name="currentChanged"></a>void QAbstractItemView::currentChanged ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>current</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>previous</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
 
389
<p>This slot is called when a new item becomes the current item. The previous current item is specified by the <i>previous</i> index, and the new item by the <i>current</i> index.</p>
 
390
<p>If you want to know about changes to items see the <a href="qabstractitemview.html#dataChanged">dataChanged</a>() signal.</p>
 
391
<h3 class="fn"><a name="currentIndex"></a><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView::currentIndex () const</h3>
 
392
<p>Returns the model index of the current item.</p>
 
393
<p>See also <a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a>().</p>
 
394
<h3 class="fn"><a name="dataChanged"></a>void QAbstractItemView::dataChanged ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>topLeft</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>bottomRight</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
 
395
<p>This slot is called when items are changed in the model. The changed items are those from <i>topLeft</i> to <i>bottomRight</i> inclusive. If just one item is changed <i>topLeft</i> == <i>bottomRight</i>.</p>
 
396
<h3 class="fn"><a name="dirtyRegionOffset"></a><a href="qpoint.html">QPoint</a> QAbstractItemView::dirtyRegionOffset () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
397
<p>Returns the offset of the dirty regions in the view.</p>
 
398
<p>If you use <a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a>() and implementa <a href="qabstractscrollarea.html#paintEvent">paintEvent</a>() in a subclass of <a href="qabstractitemview.html">QAbstractItemView</a>, you should translate the area given by the paint event with the offset returned from this function.</p>
 
399
<p>See also <a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a>().</p>
 
400
<h3 class="fn"><a name="doubleClicked"></a>void QAbstractItemView::doubleClicked ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
401
<p>This signal is emitted when a mouse button is double-clicked. The item the mouse was double-clicked on is specified by <i>index</i> (which may be invalid if the mouse was not double-clicked on an item).</p>
 
402
<h3 class="fn"><a name="dragEnterEvent"></a>void QAbstractItemView::dragEnterEvent ( <a href="qdragenterevent.html">QDragEnterEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
403
<p>This function is called when drag enter event <i>e</i> occurs. If the drag is over a valid dropping place (e.g. over an item that accepts drops), the event is accepted.</p>
 
404
<p>Reimplemented from <a href="qwidget.html#dragEnterEvent">QWidget</a>.</p>
 
405
<p>See also <a href="qabstractitemview.html#dropEvent">dropEvent</a>() and <a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
 
406
<h3 class="fn"><a name="dragLeaveEvent"></a>void QAbstractItemView::dragLeaveEvent ( <a href="qdragleaveevent.html">QDragLeaveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
407
<p>This function is called when the item being dragged leaves the view. The <i>event</i> describes the state of the drag and drop operation.</p>
 
408
<p>Reimplemented from <a href="qwidget.html#dragLeaveEvent">QWidget</a>.</p>
 
409
<h3 class="fn"><a name="dragMoveEvent"></a>void QAbstractItemView::dragMoveEvent ( <a href="qdragmoveevent.html">QDragMoveEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
410
<p>This function is called when drag move event <i>e</i> occurs. It can cause the view to scroll, for example if the user drags a selection to view's right or bottom edge.</p>
 
411
<p>Reimplemented from <a href="qwidget.html#dragMoveEvent">QWidget</a>.</p>
 
412
<p>See also <a href="qabstractitemview.html#dropEvent">dropEvent</a>() and <a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
 
413
<h3 class="fn"><a name="dropEvent"></a>void QAbstractItemView::dropEvent ( <a href="qdropevent.html">QDropEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
414
<p>This function is called when drop event <i>e</i> occurs. If there's a valid item under the mouse pointer when the drop occurs, the drop is accepted.</p>
 
415
<p>Reimplemented from <a href="qwidget.html#dropEvent">QWidget</a>.</p>
 
416
<p>See also <a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
 
417
<h3 class="fn"><a name="edit"></a>void QAbstractItemView::edit ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
418
<p>Starts editing the item item at <i>index</i> if it is editable.</p>
 
419
<h3 class="fn"><a name="edit-2"></a>bool QAbstractItemView::edit ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i>, <a href="qabstractitemview.html#EditTrigger-enum">EditTrigger</a> <i>trigger</i>, <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
420
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
421
<p>Starts editing the item at <i>index</i>, creating an editor if necessary, and returns true if the view's <a href="qabstractitemview.html#State-enum">State</a> is now <tt>EditingState</tt>; otherwise returns false.</p>
 
422
<p>The action that caused the editing process is described by <i>trigger</i>, and the associated event is specified by <i>event</i>.</p>
 
423
<p>See also <a href="qabstractitemview.html#closeEditor">closeEditor</a>().</p>
 
424
<h3 class="fn"><a name="editorDestroyed"></a>void QAbstractItemView::editorDestroyed ( <a href="qobject.html">QObject</a> * <i>editor</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
 
425
<p>Remove the editor <i>editor</i> from the map.</p>
 
426
<h3 class="fn"><a name="entered"></a>void QAbstractItemView::entered ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
427
<p>This signal is emitted when the mouse cursor enters the item specified by <i>index</i>.</p>
 
428
<p>See also <a href="qabstractitemview.html#viewportEntered">viewportEntered</a>(), <a href="qabstractitemview.html#activated">activated</a>(), <a href="qabstractitemview.html#clicked">clicked</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), and <a href="qabstractitemview.html#pressed">pressed</a>().</p>
 
429
<h3 class="fn"><a name="executeDelayedItemsLayout"></a>void QAbstractItemView::executeDelayedItemsLayout ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
430
<p>Executes the scheduled layouts without waiting for the event processing to begin.</p>
 
431
<p>See also <a href="qabstractitemview.html#scheduleDelayedItemsLayout">scheduleDelayedItemsLayout</a>().</p>
 
432
<h3 class="fn"><a name="focusInEvent"></a>void QAbstractItemView::focusInEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
433
<p>This function is called when focus event <i>e</i> occurs and is a focus in event.</p>
 
434
<p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget</a>.</p>
 
435
<h3 class="fn"><a name="focusOutEvent"></a>void QAbstractItemView::focusOutEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
436
<p>This function is called when focus event <i>e</i> occurs and is a focus out event.</p>
 
437
<p>Reimplemented from <a href="qwidget.html#focusOutEvent">QWidget</a>.</p>
 
438
<h3 class="fn"><a name="horizontalOffset"></a>int QAbstractItemView::horizontalOffset () const&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
 
439
<p>Returns the horizontal offset of the view.</p>
 
440
<p>In the base class this is a pure virtual function.</p>
 
441
<h3 class="fn"><a name="horizontalStepsPerItem"></a>int QAbstractItemView::horizontalStepsPerItem () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
442
<p>Returns the horizontal scrollbar's steps per item.</p>
 
443
<p>See also <a href="qabstractitemview.html#setHorizontalStepsPerItem">setHorizontalStepsPerItem</a>() and <a href="qabstractitemview.html#verticalStepsPerItem">verticalStepsPerItem</a>().</p>
 
444
<h3 class="fn"><a name="indexAt"></a><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView::indexAt ( const <a href="qpoint.html">QPoint</a> &amp; <i>p</i> ) const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
 
445
<p>Returns the model index of the item at point <i>p</i>.</p>
 
446
<p>In the base class this is a pure virtual function.</p>
 
447
<h3 class="fn"><a name="isIndexHidden"></a>bool QAbstractItemView::isIndexHidden ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
 
448
<p>Returns true if the item refered to by the given <i>index</i> is hidden, otherwise returns false.</p>
 
449
<p>In the base class this is a pure virtual function.</p>
 
450
<h3 class="fn"><a name="itemDelegate"></a><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> * QAbstractItemView::itemDelegate () const</h3>
 
451
<p>Returns the item delegate used by this view and model. This is either one set with <a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>(), or the default one.</p>
 
452
<p>See also <a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>().</p>
 
453
<h3 class="fn"><a name="keyPressEvent"></a>void QAbstractItemView::keyPressEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
454
<p>This function is called when a key event <i>e</i> occurs. It handles basic cursor movement, e.g. Up, Down, Left, Right, Home, PageUp, and PageDown, and emits the returnPressed(), spacePressed(), and deletePressed() signals is the associated key is pressed. This function is where editing is initiated by key press, e.g. if F2 is pressed.</p>
 
455
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget</a>.</p>
 
456
<p>See also <a href="qabstractitemview.html#edit">edit</a>().</p>
 
457
<h3 class="fn"><a name="keyboardSearch"></a>void QAbstractItemView::keyboardSearch ( const <a href="qstring.html">QString</a> &amp; <i>search</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
458
<p>Moves to and selects the item best matching the string <i>search</i>. If no item is found nothing happens.</p>
 
459
<h3 class="fn"><a name="model"></a><a href="qabstractitemmodel.html">QAbstractItemModel</a> * QAbstractItemView::model () const</h3>
 
460
<p>Returns the model that this view is presenting.</p>
 
461
<h3 class="fn"><a name="mouseDoubleClickEvent"></a>void QAbstractItemView::mouseDoubleClickEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
462
<p>This function is called when a mouse double-click event <i>e</i> occurs. If the double-click is on a valid item it emits the <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>() signal and calls <a href="qabstractitemview.html#edit">edit</a>() on the item.</p>
 
463
<p>Reimplemented from <a href="qwidget.html#mouseDoubleClickEvent">QWidget</a>.</p>
 
464
<h3 class="fn"><a name="mouseMoveEvent"></a>void QAbstractItemView::mouseMoveEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
465
<p>This function is called when a mouse move event <i>e</i> occurs. If a selection is in progress and new items are moved over the selection is extended; if a drag is in progress it is continued.</p>
 
466
<p>Reimplemented from <a href="qwidget.html#mouseMoveEvent">QWidget</a>.</p>
 
467
<h3 class="fn"><a name="mousePressEvent"></a>void QAbstractItemView::mousePressEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
468
<p>This function is called when a mouse event <i>e</i> occurs. If a valid item is pressed on it is made into the current item. This function emits the <a href="qabstractitemview.html#pressed">pressed</a>() signal.</p>
 
469
<p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget</a>.</p>
 
470
<h3 class="fn"><a name="mouseReleaseEvent"></a>void QAbstractItemView::mouseReleaseEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
471
<p>This function is called when a mouse release event <i>e</i> occurs. It will emit the <a href="qabstractitemview.html#clicked">clicked</a>() signal if an item was being pressed.</p>
 
472
<p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget</a>.</p>
 
473
<h3 class="fn"><a name="moveCursor"></a><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView::moveCursor ( <a href="qabstractitemview.html#CursorAction-enum">CursorAction</a> <i>cursorAction</i>, <a href="qt.html#KeyboardModifier-enum">Qt::KeyboardModifiers</a> <i>modifiers</i> )&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
 
474
<p>Moves the cursor in the view according to the given <i>cursorAction</i> and keyboard modifiers specified by <i>modifiers</i>.</p>
 
475
<h3 class="fn"><a name="openPersistentEditor"></a>void QAbstractItemView::openPersistentEditor ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )</h3>
 
476
<p>Opens a persistent editor on the item at the given <i>index</i>. If no editor exists, the delegate will create a new editor.</p>
 
477
<h3 class="fn"><a name="pressed"></a>void QAbstractItemView::pressed ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
478
<p>This signal is emitted when a mouse button is pressed. The item the mouse was pressed on is specified by <i>index</i> (which may be invalid if the mouse was not pressed on an item).</p>
 
479
<p>See also <a href="qabstractitemview.html#activated">activated</a>(), <a href="qabstractitemview.html#clicked">clicked</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), and <a href="qabstractitemview.html#entered">entered</a>().</p>
 
480
<h3 class="fn"><a name="reset"></a>void QAbstractItemView::reset ()&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
 
481
<p>Reset the internal state of the view.</p>
 
482
<h3 class="fn"><a name="resizeEvent"></a>void QAbstractItemView::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
483
<p>This function is called when a resize event <i>e</i> occurs.</p>
 
484
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget</a>.</p>
 
485
<h3 class="fn"><a name="rootIndex"></a><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView::rootIndex () const</h3>
 
486
<p>Returns the model index of the model's root item. The root item is the parent item to the views toplevel items. The root can be invalid.</p>
 
487
<p>See also <a href="qabstractitemview.html#setRootIndex">setRootIndex</a>().</p>
 
488
<h3 class="fn"><a name="rowsAboutToBeRemoved"></a>void QAbstractItemView::rowsAboutToBeRemoved ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i>, int <i>start</i>, int <i>end</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
 
489
<p>This slot is called when rows are about to be removed. The deleted rows are those under the given <i>parent</i> from <i>start</i> to <i>end</i> inclusive. The base class implementation does nothing.</p>
 
490
<p>See also <a href="qabstractitemview.html#rowsInserted">rowsInserted</a>().</p>
 
491
<h3 class="fn"><a name="rowsInserted"></a>void QAbstractItemView::rowsInserted ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i>, int <i>start</i>, int <i>end</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
 
492
<p>This slot is called when rows are inserted. The new rows are those under the given <i>parent</i> from <i>start</i> to <i>end</i> inclusive. The base class implementation calls fetchMore() on the model to check for more data.</p>
 
493
<p>See also <a href="qabstractitemview.html#rowsAboutToBeRemoved">rowsAboutToBeRemoved</a>().</p>
 
494
<h3 class="fn"><a name="scheduleDelayedItemsLayout"></a>void QAbstractItemView::scheduleDelayedItemsLayout ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
495
<p>Schedules a layout of the items in the view to be executed when the event processing starts.</p>
 
496
<p>Even if scheduleDelayedItemsLayout() is called multiple times before events are processed, the view will only do the layout once.</p>
 
497
<p>See also <a href="qabstractitemview.html#executeDelayedItemsLayout">executeDelayedItemsLayout</a>().</p>
 
498
<h3 class="fn"><a name="scrollDirtyRegion"></a>void QAbstractItemView::scrollDirtyRegion ( int <i>dx</i>, int <i>dy</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
499
<p>Prepares the view for scrolling by (<i>dx,a</i> dy) pixels by moving the dirty regions in the opposite direction. You only need to call this function if you are implementing a scrolling viewport in your view subclass.</p>
 
500
<p>If you implement <a href="qabstractscrollarea.html#scrollContentsBy">scrollContentsBy</a>() in a subclass of <a href="qabstractitemview.html">QAbstractItemView</a>, call this function before you call <a href="qwidget.html#scroll">QWidget::scroll</a>() on the viewport. Alternatively, just call <a href="qwidget.html#update">update</a>().</p>
 
501
<p>See also <a href="qabstractscrollarea.html#scrollContentsBy">scrollContentsBy</a>() and <a href="qabstractitemview.html#dirtyRegionOffset">dirtyRegionOffset</a>().</p>
 
502
<h3 class="fn"><a name="scrollTo"></a>void QAbstractItemView::scrollTo ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i>, <a href="qabstractitemview.html#ScrollHint-enum">ScrollHint</a> <i>hint</i> = EnsureVisible )&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
 
503
<p>Scrolls the view if necessary to ensure that the item at <i>index</i> is visible. The view will try to position the item according to the given <i>hint</i>.</p>
 
504
<p>In the base class this is a pure virtual function.</p>
 
505
<h3 class="fn"><a name="selectAll"></a>void QAbstractItemView::selectAll ()&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
 
506
<p>Selects all non-hidden items.</p>
 
507
<h3 class="fn"><a name="selectedIndexes"></a>QModelIndexList QAbstractItemView::selectedIndexes () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
508
<p>This convenience function returns a list of all selected and non-hidden item indexes in the view. The list contains no duplicates, and is not sorted.</p>
 
509
<p>The default implementation does nothing.</p>
 
510
<h3 class="fn"><a name="selectionChanged"></a>void QAbstractItemView::selectionChanged ( const <a href="qitemselection.html">QItemSelection</a> &amp; <i>selected</i>, const <a href="qitemselection.html">QItemSelection</a> &amp; <i>deselected</i> )&nbsp;&nbsp;<tt> [virtual protected slot]</tt></h3>
 
511
<p>This slot is called when the selection is changed. The previous selection (which may be empty), is specified by <i>deselected</i>, and the new selection by <i>selected</i>.</p>
 
512
<h3 class="fn"><a name="selectionCommand"></a><a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a> QAbstractItemView::selectionCommand ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i>, const <a href="qevent.html">QEvent</a> * <i>event</i> = 0 ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
513
<p>Returns the SelectionFlags to be used when updating a selection with to include the <i>index</i> specified. The <i>event</i> is a user input event, such as a mouse or keyboard event.</p>
 
514
<p>Reimplement this function to define your own selection behavior.</p>
 
515
<h3 class="fn"><a name="selectionModel"></a><a href="qitemselectionmodel.html">QItemSelectionModel</a> * QAbstractItemView::selectionModel () const</h3>
 
516
<p>Returns the current selection.</p>
 
517
<p>See also <a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>() and <a href="qabstractitemview.html#clearSelection">clearSelection</a>().</p>
 
518
<h3 class="fn"><a name="setCurrentIndex"></a>void QAbstractItemView::setCurrentIndex ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
519
<p>Sets the current item to be the itm at <i>index</i>.</p>
 
520
<p>See also <a href="qabstractitemview.html#currentIndex">currentIndex</a>().</p>
 
521
<h3 class="fn"><a name="setHorizontalStepsPerItem"></a>void QAbstractItemView::setHorizontalStepsPerItem ( int <i>steps</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
522
<p>Sets the horizontal scrollbar's steps per item to <i>steps</i>.</p>
 
523
<p>This is the number of steps used by the horizontal scrollbar to represent the width of an item.</p>
 
524
<p>See also <a href="qabstractitemview.html#horizontalStepsPerItem">horizontalStepsPerItem</a>() and <a href="qabstractitemview.html#setVerticalStepsPerItem">setVerticalStepsPerItem</a>().</p>
 
525
<h3 class="fn"><a name="setItemDelegate"></a>void QAbstractItemView::setItemDelegate ( <a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> * <i>delegate</i> )</h3>
 
526
<p>Sets the item delegate for this view and its model to <i>delegate</i>. This is useful if you want complete control over the editing and display of items.</p>
 
527
<p>See also <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>().</p>
 
528
<h3 class="fn"><a name="setModel"></a>void QAbstractItemView::setModel ( <a href="qabstractitemmodel.html">QAbstractItemModel</a> * <i>model</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
529
<p>Sets the <i>model</i> for the view to present.</p>
 
530
<h3 class="fn"><a name="setRootIndex"></a>void QAbstractItemView::setRootIndex ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
 
531
<p>Sets the root item to the item at <i>index</i>.</p>
 
532
<p>See also <a href="qabstractitemview.html#rootIndex">rootIndex</a>().</p>
 
533
<h3 class="fn"><a name="setSelection"></a>void QAbstractItemView::setSelection ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i>, <a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a> <i>flags</i> )&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
 
534
<p>Applies the selection <i>flags</i> to the items in or touched by the rectangle, <i>rect</i>.</p>
 
535
<p>See also <a href="qabstractitemview.html#selectionCommand">selectionCommand</a>().</p>
 
536
<h3 class="fn"><a name="setSelectionModel"></a>void QAbstractItemView::setSelectionModel ( <a href="qitemselectionmodel.html">QItemSelectionModel</a> * <i>selectionModel</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
537
<p>Sets the current selection to the given <i>selectionModel</i>.</p>
 
538
<p>See also <a href="qabstractitemview.html#selectionModel">selectionModel</a>() and <a href="qabstractitemview.html#clearSelection">clearSelection</a>().</p>
 
539
<h3 class="fn"><a name="setState"></a>void QAbstractItemView::setState ( <a href="qabstractitemview.html#State-enum">State</a> <i>state</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
540
<p>Sets the item view's state to the given <i>state</i></p>
 
541
<p>See also <a href="qabstractitemview.html#state">state</a>().</p>
 
542
<h3 class="fn"><a name="setVerticalStepsPerItem"></a>void QAbstractItemView::setVerticalStepsPerItem ( int <i>steps</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
543
<p>Sets the vertical scrollbar's steps per item to <i>steps</i>.</p>
 
544
<p>This is the number of steps used by the vertical scrollbar to represent the height of an item.</p>
 
545
<p>See also <a href="qabstractitemview.html#verticalStepsPerItem">verticalStepsPerItem</a>() and <a href="qabstractitemview.html#setHorizontalStepsPerItem">setHorizontalStepsPerItem</a>().</p>
 
546
<h3 class="fn"><a name="sizeHintForColumn"></a>int QAbstractItemView::sizeHintForColumn ( int <i>column</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
547
<p>Returns the width size hint for the specified <i>column</i> or -1 if there is no model.</p>
 
548
<h3 class="fn"><a name="sizeHintForIndex"></a><a href="qsize.html">QSize</a> QAbstractItemView::sizeHintForIndex ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const</h3>
 
549
<p>Returns the size hint for the item with the specified <i>index</i> or an invalid size for invalid indexes.</p>
 
550
<h3 class="fn"><a name="sizeHintForRow"></a>int QAbstractItemView::sizeHintForRow ( int <i>row</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
551
<p>Returns the height size hint for the specified <i>row</i> or -1 if there is no model.</p>
 
552
<h3 class="fn"><a name="startDrag"></a>void QAbstractItemView::startDrag ( <a href="qt.html#DropAction-enum">Qt::DropActions</a> <i>supportedActions</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
553
<p>Starts a drag by calling drag-&gt;start() using the given <i>supportedActions</i>.</p>
 
554
<h3 class="fn"><a name="state"></a><a href="qabstractitemview.html#State-enum">State</a> QAbstractItemView::state () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
555
<p>Returns the item view's state.</p>
 
556
<p>See also <a href="qabstractitemview.html#setState">setState</a>().</p>
 
557
<h3 class="fn"><a name="timerEvent"></a>void QAbstractItemView::timerEvent ( <a href="qtimerevent.html">QTimerEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
558
<p>This function is called when a timer event <i>e</i> occurs.</p>
 
559
<p>Reimplemented from <a href="qobject.html#timerEvent">QObject</a>.</p>
 
560
<h3 class="fn"><a name="verticalOffset"></a>int QAbstractItemView::verticalOffset () const&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
 
561
<p>Returns the vertical offset of the view.</p>
 
562
<p>In the base class this is a pure virtual function.</p>
 
563
<h3 class="fn"><a name="verticalStepsPerItem"></a>int QAbstractItemView::verticalStepsPerItem () const&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
564
<p>Returns the vertical scrollbar's steps per item.</p>
 
565
<p>See also <a href="qabstractitemview.html#setVerticalStepsPerItem">setVerticalStepsPerItem</a>() and <a href="qabstractitemview.html#horizontalStepsPerItem">horizontalStepsPerItem</a>().</p>
 
566
<h3 class="fn"><a name="viewOptions"></a><a href="qstyleoptionviewitem.html">QStyleOptionViewItem</a> QAbstractItemView::viewOptions () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
567
<p>Returns <a href="qstyleoptionviewitem.html">QStyleOptionViewItem</a> structure populated with the view's palette, font, state, alignments etc.</p>
 
568
<h3 class="fn"><a name="viewportEntered"></a>void QAbstractItemView::viewportEntered ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
569
<p>This signal is emitted when the mouse cursor enters the viewport.</p>
 
570
<p>See also <a href="qabstractitemview.html#entered">entered</a>().</p>
 
571
<h3 class="fn"><a name="viewportEvent"></a>bool QAbstractItemView::viewportEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
572
<p>This function is used to handle tool tips, status tips, and What's This? mode, if the given <i>event</i> is a <a href="qevent.html#Type-enum">QEvent::ToolTip</a>, a <a href="qevent.html#Type-enum">QEvent::WhatsThis</a>, or a <a href="qevent.html#Type-enum">QEvent::StatusTip</a>. It passes all other events on to its base class viewportEvent() handler.</p>
 
573
<p>Reimplemented from <a href="qabstractscrollarea.html#viewportEvent">QAbstractScrollArea</a>.</p>
 
574
<h3 class="fn"><a name="visualRect"></a><a href="qrect.html">QRect</a> QAbstractItemView::visualRect ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
 
575
<p>Returns the rectangle on the viewport occupied by the item at <i>index</i>.</p>
 
576
<p>In the base class this is a pure virtual function.</p>
 
577
<h3 class="fn"><a name="visualRegionForSelection"></a><a href="qregion.html">QRegion</a> QAbstractItemView::visualRegionForSelection ( const <a href="qitemselection.html">QItemSelection</a> &amp; <i>selection</i> ) const&nbsp;&nbsp;<tt> [pure virtual protected]</tt></h3>
 
578
<p>Returns the region from the viewport of the items in the given <i>selection</i>.</p>
 
579
<p /><address><hr /><div align="center">
 
580
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
581
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
582
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
583
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
584
</tr></table></div></address></body>
 
585
</html>