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

« back to all changes in this revision

Viewing changes to doc/html/q3listview.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/qt3support/itemviews/q3listview.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: Q3ListView 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">Q3ListView Class Reference</h1>
 
21
<p>The Q3ListView class implements a list/tree view. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;Q3ListView&gt;</pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See the <a href="porting4.html">Porting Guide</a> for more information.</p>
 
23
<p>Part of the <a href="qt3support.html">Qt3Support</a> module.</p>
 
24
<p>Inherits <a href="q3scrollview.html">Q3ScrollView</a>.</p>
 
25
<ul>
 
26
<li><a href="q3listview-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"/>typedef <b><a href="q3listview.html#ComparisonFlags-typedef">ComparisonFlags</a></b></li>
 
32
<li><div class="fn"/>enum <b><a href="q3listview.html#RenameAction-enum">RenameAction</a></b> { Accept, Reject }</li>
 
33
<li><div class="fn"/>enum <b><a href="q3listview.html#ResizeMode-enum">ResizeMode</a></b> { NoColumn, AllColumns, LastColumn }</li>
 
34
<li><div class="fn"/>enum <b><a href="q3listview.html#SelectionMode-enum">SelectionMode</a></b> { Single, Multi, Extended, NoSelection }</li>
 
35
<li><div class="fn"/>enum <b><a href="q3listview.html#StringComparisonMode-enum">StringComparisonMode</a></b> { CaseSensitive, ExactMatch, BeginsWith, EndsWith, Contains }</li>
 
36
<li><div class="fn"/>enum <b><a href="q3listview.html#WidthMode-enum">WidthMode</a></b> { Manual, Maximum }</li>
 
37
</ul>
 
38
<a name="properties"></a>
 
39
<h3>Properties</h3>
 
40
<table width="100%" border="0" cellpadding="0" cellspacing="0">
 
41
<tr><td width="45%" valign="top"><ul>
 
42
<li><div class="fn"/><b><a href="q3listview.html#allColumnsShowFocus-prop">allColumnsShowFocus</a></b> : bool</li>
 
43
<li><div class="fn"/><b><a href="q3listview.html#childCount-prop">childCount</a></b> : const int</li>
 
44
<li><div class="fn"/><b><a href="q3listview.html#columns-prop">columns</a></b> : const int</li>
 
45
<li><div class="fn"/><b><a href="q3listview.html#defaultRenameAction-prop">defaultRenameAction</a></b> : RenameAction</li>
 
46
<li><div class="fn"/><b><a href="q3listview.html#itemMargin-prop">itemMargin</a></b> : int</li>
 
47
<li><div class="fn"/><b><a href="q3listview.html#multiSelection-prop">multiSelection</a></b> : bool</li>
 
48
</ul></td><td valign="top"><ul>
 
49
<li><div class="fn"/><b><a href="q3listview.html#resizeMode-prop">resizeMode</a></b> : ResizeMode</li>
 
50
<li><div class="fn"/><b><a href="q3listview.html#rootIsDecorated-prop">rootIsDecorated</a></b> : bool</li>
 
51
<li><div class="fn"/><b><a href="q3listview.html#selectionMode-prop">selectionMode</a></b> : SelectionMode</li>
 
52
<li><div class="fn"/><b><a href="q3listview.html#showSortIndicator-prop">showSortIndicator</a></b> : bool</li>
 
53
<li><div class="fn"/><b><a href="q3listview.html#showToolTips-prop">showToolTips</a></b> : bool</li>
 
54
<li><div class="fn"/><b><a href="q3listview.html#treeStepSize-prop">treeStepSize</a></b> : int</li>
 
55
</ul>
 
56
</td></tr>
 
57
</table>
 
58
<ul>
 
59
<li><div class="fn"/>10 properties inherited from <a href="q3scrollview.html#properties">Q3ScrollView</a></li>
 
60
<li><div class="fn"/>2 properties inherited from <a href="q3frame.html#properties">Q3Frame</a></li>
 
61
<li><div class="fn"/>6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
 
62
<li><div class="fn"/>52 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
63
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
64
</ul>
 
65
<a name="public-functions"></a>
 
66
<h3>Public Functions</h3>
 
67
<ul>
 
68
<li><div class="fn"/><b><a href="q3listview.html#Q3ListView">Q3ListView</a></b> ( QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0, Qt::WFlags <i>f</i> = 0 )</li>
 
69
<li><div class="fn"/><b><a href="q3listview.html#dtor.Q3ListView">~Q3ListView</a></b> ()</li>
 
70
<li><div class="fn"/>virtual int <b><a href="q3listview.html#addColumn">addColumn</a></b> ( const QString &amp; <i>label</i>, int <i>width</i> = -1 )</li>
 
71
<li><div class="fn"/>virtual int <b><a href="q3listview.html#addColumn-2">addColumn</a></b> ( const QIcon &amp; <i>icon</i>, const QString &amp; <i>label</i>, int <i>width</i> = -1 )</li>
 
72
<li><div class="fn"/>bool <b><a href="q3listview.html#allColumnsShowFocus-prop">allColumnsShowFocus</a></b> () const</li>
 
73
<li><div class="fn"/>int <b><a href="q3listview.html#childCount-prop">childCount</a></b> () const</li>
 
74
<li><div class="fn"/>virtual void <b><a href="q3listview.html#clearSelection">clearSelection</a></b> ()</li>
 
75
<li><div class="fn"/>int <b><a href="q3listview.html#columnAlignment">columnAlignment</a></b> ( int <i>column</i> ) const</li>
 
76
<li><div class="fn"/>QString <b><a href="q3listview.html#columnText">columnText</a></b> ( int <i>c</i> ) const</li>
 
77
<li><div class="fn"/>int <b><a href="q3listview.html#columnWidth">columnWidth</a></b> ( int <i>c</i> ) const</li>
 
78
<li><div class="fn"/>WidthMode <b><a href="q3listview.html#columnWidthMode">columnWidthMode</a></b> ( int <i>c</i> ) const</li>
 
79
<li><div class="fn"/>int <b><a href="q3listview.html#columns-prop">columns</a></b> () const</li>
 
80
<li><div class="fn"/>Q3ListViewItem * <b><a href="q3listview.html#currentItem">currentItem</a></b> () const</li>
 
81
<li><div class="fn"/>RenameAction <b><a href="q3listview.html#defaultRenameAction-prop">defaultRenameAction</a></b> () const</li>
 
82
<li><div class="fn"/>void <b><a href="q3listview.html#ensureItemVisible">ensureItemVisible</a></b> ( const Q3ListViewItem * <i>i</i> )</li>
 
83
<li><div class="fn"/>virtual bool <b><a href="q3listview.html#eventFilter">eventFilter</a></b> ( QObject * <i>o</i>, QEvent * <i>e</i> )</li>
 
84
<li><div class="fn"/>Q3ListViewItem * <b><a href="q3listview.html#findItem">findItem</a></b> ( const QString &amp; <i>text</i>, int <i>column</i>, ComparisonFlags <i>compare</i> = ExactMatch | Qt::CaseSensitive ) const</li>
 
85
<li><div class="fn"/>Q3ListViewItem * <b><a href="q3listview.html#firstChild">firstChild</a></b> () const</li>
 
86
<li><div class="fn"/>Q3Header * <b><a href="q3listview.html#header">header</a></b> () const</li>
 
87
<li><div class="fn"/>void <b><a href="q3listview.html#hideColumn">hideColumn</a></b> ( int <i>column</i> )</li>
 
88
<li><div class="fn"/>virtual void <b><a href="q3listview.html#insertItem">insertItem</a></b> ( Q3ListViewItem * <i>i</i> )</li>
 
89
<li><div class="fn"/>bool <b><a href="q3listview.html#multiSelection-prop">isMultiSelection</a></b> () const</li>
 
90
<li><div class="fn"/>bool <b><a href="q3listview.html#isOpen">isOpen</a></b> ( const Q3ListViewItem * <i>item</i> ) const</li>
 
91
<li><div class="fn"/>bool <b><a href="q3listview.html#isRenaming">isRenaming</a></b> () const</li>
 
92
<li><div class="fn"/>bool <b><a href="q3listview.html#isSelected">isSelected</a></b> ( const Q3ListViewItem * <i>i</i> ) const</li>
 
93
<li><div class="fn"/>Q3ListViewItem * <b><a href="q3listview.html#itemAt">itemAt</a></b> ( const QPoint &amp; <i>viewPos</i> ) const</li>
 
94
<li><div class="fn"/>int <b><a href="q3listview.html#itemMargin-prop">itemMargin</a></b> () const</li>
 
95
<li><div class="fn"/>int <b><a href="q3listview.html#itemPos">itemPos</a></b> ( const Q3ListViewItem * <i>item</i> )</li>
 
96
<li><div class="fn"/>QRect <b><a href="q3listview.html#itemRect">itemRect</a></b> ( const Q3ListViewItem * <i>item</i> ) const</li>
 
97
<li><div class="fn"/>Q3ListViewItem * <b><a href="q3listview.html#lastItem">lastItem</a></b> () const</li>
 
98
<li><div class="fn"/>virtual void <b><a href="q3listview.html#removeColumn">removeColumn</a></b> ( int <i>index</i> )</li>
 
99
<li><div class="fn"/>virtual void <b><a href="q3listview.html#removeItem">removeItem</a></b> ( Q3ListViewItem * <i>item</i> )</li>
 
100
<li><div class="fn"/>void <b><a href="q3listview.html#repaintItem">repaintItem</a></b> ( const Q3ListViewItem * <i>item</i> ) const</li>
 
101
<li><div class="fn"/>ResizeMode <b><a href="q3listview.html#resizeMode-prop">resizeMode</a></b> () const</li>
 
102
<li><div class="fn"/>bool <b><a href="q3listview.html#rootIsDecorated-prop">rootIsDecorated</a></b> () const</li>
 
103
<li><div class="fn"/>Q3ListViewItem * <b><a href="q3listview.html#selectedItem">selectedItem</a></b> () const</li>
 
104
<li><div class="fn"/>SelectionMode <b><a href="q3listview.html#selectionMode-prop">selectionMode</a></b> () const</li>
 
105
<li><div class="fn"/>virtual void <b><a href="q3listview.html#allColumnsShowFocus-prop">setAllColumnsShowFocus</a></b> ( bool )</li>
 
106
<li><div class="fn"/>virtual void <b><a href="q3listview.html#setColumnAlignment">setColumnAlignment</a></b> ( int <i>column</i>, int <i>align</i> )</li>
 
107
<li><div class="fn"/>virtual void <b><a href="q3listview.html#setColumnText">setColumnText</a></b> ( int <i>column</i>, const QString &amp; <i>label</i> )</li>
 
108
<li><div class="fn"/>virtual void <b><a href="q3listview.html#setColumnText-2">setColumnText</a></b> ( int <i>column</i>, const QIcon &amp; <i>icon</i>, const QString &amp; <i>label</i> )</li>
 
109
<li><div class="fn"/>virtual void <b><a href="q3listview.html#setColumnWidth">setColumnWidth</a></b> ( int <i>column</i>, int <i>w</i> )</li>
 
110
<li><div class="fn"/>virtual void <b><a href="q3listview.html#setColumnWidthMode">setColumnWidthMode</a></b> ( int <i>c</i>, WidthMode <i>mode</i> )</li>
 
111
<li><div class="fn"/>virtual void <b><a href="q3listview.html#setCurrentItem">setCurrentItem</a></b> ( Q3ListViewItem * <i>i</i> )</li>
 
112
<li><div class="fn"/>virtual void <b><a href="q3listview.html#defaultRenameAction-prop">setDefaultRenameAction</a></b> ( RenameAction <i>a</i> )</li>
 
113
<li><div class="fn"/>virtual void <b><a href="q3listview.html#itemMargin-prop">setItemMargin</a></b> ( int )</li>
 
114
<li><div class="fn"/>virtual void <b><a href="q3listview.html#multiSelection-prop">setMultiSelection</a></b> ( bool <i>enable</i> )</li>
 
115
<li><div class="fn"/>virtual void <b><a href="q3listview.html#setOpen">setOpen</a></b> ( Q3ListViewItem * <i>item</i>, bool <i>open</i> )</li>
 
116
<li><div class="fn"/>virtual void <b><a href="q3listview.html#resizeMode-prop">setResizeMode</a></b> ( ResizeMode <i>m</i> )</li>
 
117
<li><div class="fn"/>virtual void <b><a href="q3listview.html#rootIsDecorated-prop">setRootIsDecorated</a></b> ( bool )</li>
 
118
<li><div class="fn"/>virtual void <b><a href="q3listview.html#setSelected">setSelected</a></b> ( Q3ListViewItem * <i>item</i>, bool <i>selected</i> )</li>
 
119
<li><div class="fn"/>void <b><a href="q3listview.html#setSelectionAnchor">setSelectionAnchor</a></b> ( Q3ListViewItem * <i>item</i> )</li>
 
120
<li><div class="fn"/>void <b><a href="q3listview.html#selectionMode-prop">setSelectionMode</a></b> ( SelectionMode <i>mode</i> )</li>
 
121
<li><div class="fn"/>virtual void <b><a href="q3listview.html#showSortIndicator-prop">setShowSortIndicator</a></b> ( bool <i>show</i> )</li>
 
122
<li><div class="fn"/>virtual void <b><a href="q3listview.html#showToolTips-prop">setShowToolTips</a></b> ( bool <i>b</i> )</li>
 
123
<li><div class="fn"/>void <b><a href="q3listview.html#setSortColumn">setSortColumn</a></b> ( int <i>column</i> )</li>
 
124
<li><div class="fn"/>void <b><a href="q3listview.html#setSortOrder">setSortOrder</a></b> ( Qt::SortOrder <i>order</i> )</li>
 
125
<li><div class="fn"/>virtual void <b><a href="q3listview.html#setSorting">setSorting</a></b> ( int <i>column</i>, bool <i>ascending</i> = true )</li>
 
126
<li><div class="fn"/>virtual void <b><a href="q3listview.html#treeStepSize-prop">setTreeStepSize</a></b> ( int )</li>
 
127
<li><div class="fn"/>bool <b><a href="q3listview.html#showSortIndicator-prop">showSortIndicator</a></b> () const</li>
 
128
<li><div class="fn"/>bool <b><a href="q3listview.html#showToolTips-prop">showToolTips</a></b> () const</li>
 
129
<li><div class="fn"/>virtual void <b><a href="q3listview.html#sort">sort</a></b> ()</li>
 
130
<li><div class="fn"/>int <b><a href="q3listview.html#sortColumn">sortColumn</a></b> () const</li>
 
131
<li><div class="fn"/>Qt::SortOrder <b><a href="q3listview.html#sortOrder">sortOrder</a></b> () const</li>
 
132
<li><div class="fn"/>virtual void <b><a href="q3listview.html#takeItem">takeItem</a></b> ( Q3ListViewItem * <i>i</i> )</li>
 
133
<li><div class="fn"/>int <b><a href="q3listview.html#treeStepSize-prop">treeStepSize</a></b> () const</li>
 
134
</ul>
 
135
<ul>
 
136
<li><div class="fn"/>46 public functions inherited from <a href="q3scrollview.html#public-functions">Q3ScrollView</a></li>
 
137
<li><div class="fn"/>4 public functions inherited from <a href="q3frame.html#public-functions">Q3Frame</a></li>
 
138
<li><div class="fn"/>13 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
 
139
<li><div class="fn"/>183 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
140
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
141
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
142
</ul>
 
143
<a name="public-slots"></a>
 
144
<h3>Public Slots</h3>
 
145
<ul>
 
146
<li><div class="fn"/>void <b><a href="q3listview.html#adjustColumn">adjustColumn</a></b> ( int <i>col</i> )</li>
 
147
<li><div class="fn"/>virtual void <b><a href="q3listview.html#clear">clear</a></b> ()</li>
 
148
<li><div class="fn"/>virtual void <b><a href="q3listview.html#invertSelection">invertSelection</a></b> ()</li>
 
149
<li><div class="fn"/>virtual void <b><a href="q3listview.html#selectAll">selectAll</a></b> ( bool <i>select</i> )</li>
 
150
<li><div class="fn"/>void <b><a href="q3listview.html#triggerUpdate">triggerUpdate</a></b> ()</li>
 
151
</ul>
 
152
<ul>
 
153
<li><div class="fn"/>8 public slots inherited from <a href="q3scrollview.html#public-slots">Q3ScrollView</a></li>
 
154
<li><div class="fn"/>17 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
 
155
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
156
</ul>
 
157
<a name="signals"></a>
 
158
<h3>Signals</h3>
 
159
<ul>
 
160
<li><div class="fn"/>void <b><a href="q3listview.html#clicked">clicked</a></b> ( Q3ListViewItem * <i>item</i> )</li>
 
161
<li><div class="fn"/>void <b><a href="q3listview.html#clicked-2">clicked</a></b> ( Q3ListViewItem * <i>item</i>, const QPoint &amp; <i>pnt</i>, int <i>c</i> )</li>
 
162
<li><div class="fn"/>void <b><a href="q3listview.html#collapsed">collapsed</a></b> ( Q3ListViewItem * <i>item</i> )</li>
 
163
<li><div class="fn"/>void <b><a href="q3listview.html#contextMenuRequested">contextMenuRequested</a></b> ( Q3ListViewItem * <i>item</i>, const QPoint &amp; <i>pos</i>, int <i>col</i> )</li>
 
164
<li><div class="fn"/>void <b><a href="q3listview.html#currentChanged">currentChanged</a></b> ( Q3ListViewItem * <i>item</i> )</li>
 
165
<li><div class="fn"/>void <b><a href="q3listview.html#doubleClicked">doubleClicked</a></b> ( Q3ListViewItem * <i>item</i> )</li>
 
166
<li><div class="fn"/>void <b><a href="q3listview.html#doubleClicked-2">doubleClicked</a></b> ( Q3ListViewItem * <i>item</i>, const QPoint &amp; <i>point</i>, int <i>column</i> )</li>
 
167
<li><div class="fn"/>void <b><a href="q3listview.html#dropped">dropped</a></b> ( QDropEvent * <i>e</i> )</li>
 
168
<li><div class="fn"/>void <b><a href="q3listview.html#expanded">expanded</a></b> ( Q3ListViewItem * <i>item</i> )</li>
 
169
<li><div class="fn"/>void <b><a href="q3listview.html#itemRenamed">itemRenamed</a></b> ( Q3ListViewItem * <i>item</i>, int <i>col</i>, const QString &amp; <i>text</i> )</li>
 
170
<li><div class="fn"/>void <b><a href="q3listview.html#itemRenamed-2">itemRenamed</a></b> ( Q3ListViewItem * <i>item</i>, int <i>col</i> )</li>
 
171
<li><div class="fn"/>void <b><a href="q3listview.html#mouseButtonClicked">mouseButtonClicked</a></b> ( int <i>button</i>, Q3ListViewItem * <i>item</i>, const QPoint &amp; <i>pos</i>, int <i>c</i> )</li>
 
172
<li><div class="fn"/>void <b><a href="q3listview.html#mouseButtonPressed">mouseButtonPressed</a></b> ( int <i>button</i>, Q3ListViewItem * <i>item</i>, const QPoint &amp; <i>pos</i>, int <i>c</i> )</li>
 
173
<li><div class="fn"/>void <b><a href="q3listview.html#onItem">onItem</a></b> ( Q3ListViewItem * <i>i</i> )</li>
 
174
<li><div class="fn"/>void <b><a href="q3listview.html#onViewport">onViewport</a></b> ()</li>
 
175
<li><div class="fn"/>void <b><a href="q3listview.html#pressed">pressed</a></b> ( Q3ListViewItem * <i>item</i> )</li>
 
176
<li><div class="fn"/>void <b><a href="q3listview.html#pressed-2">pressed</a></b> ( Q3ListViewItem * <i>item</i>, const QPoint &amp; <i>pnt</i>, int <i>c</i> )</li>
 
177
<li><div class="fn"/>void <b><a href="q3listview.html#returnPressed">returnPressed</a></b> ( Q3ListViewItem * <i>item</i> )</li>
 
178
<li><div class="fn"/>void <b><a href="q3listview.html#rightButtonClicked">rightButtonClicked</a></b> ( Q3ListViewItem * <i>item</i>, const QPoint &amp; <i>point</i>, int <i>column</i> )</li>
 
179
<li><div class="fn"/>void <b><a href="q3listview.html#rightButtonPressed">rightButtonPressed</a></b> ( Q3ListViewItem * <i>item</i>, const QPoint &amp; <i>point</i>, int <i>column</i> )</li>
 
180
<li><div class="fn"/>void <b><a href="q3listview.html#selectionChanged">selectionChanged</a></b> ()</li>
 
181
<li><div class="fn"/>void <b><a href="q3listview.html#selectionChanged-2">selectionChanged</a></b> ( Q3ListViewItem * <i>item</i> )</li>
 
182
<li><div class="fn"/>void <b><a href="q3listview.html#spacePressed">spacePressed</a></b> ( Q3ListViewItem * <i>item</i> )</li>
 
183
</ul>
 
184
<ul>
 
185
<li><div class="fn"/>5 signals inherited from <a href="q3scrollview.html#signals">Q3ScrollView</a></li>
 
186
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
 
187
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
188
</ul>
 
189
<a name="protected-functions"></a>
 
190
<h3>Protected Functions</h3>
 
191
<ul>
 
192
<li><div class="fn"/>virtual void <b><a href="q3listview.html#contentsMouseDoubleClickEvent">contentsMouseDoubleClickEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
193
<li><div class="fn"/>virtual void <b><a href="q3listview.html#contentsMouseMoveEvent">contentsMouseMoveEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
194
<li><div class="fn"/>virtual void <b><a href="q3listview.html#contentsMousePressEvent">contentsMousePressEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
195
<li><div class="fn"/>virtual void <b><a href="q3listview.html#contentsMouseReleaseEvent">contentsMouseReleaseEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
196
<li><div class="fn"/>virtual Q3DragObject * <b><a href="q3listview.html#dragObject">dragObject</a></b> ()</li>
 
197
<li><div class="fn"/>virtual void <b><a href="q3listview.html#drawContentsOffset">drawContentsOffset</a></b> ( QPainter * <i>p</i>, int <i>ox</i>, int <i>oy</i>, int <i>cx</i>, int <i>cy</i>, int <i>cw</i>, int <i>ch</i> )</li>
 
198
<li><div class="fn"/>virtual void <b><a href="q3listview.html#paintEmptyArea">paintEmptyArea</a></b> ( QPainter * <i>p</i>, const QRect &amp; <i>rect</i> )</li>
 
199
<li><div class="fn"/>virtual void <b><a href="q3listview.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>e</i> )</li>
 
200
<li><div class="fn"/>virtual void <b><a href="q3listview.html#startDrag">startDrag</a></b> ()</li>
 
201
</ul>
 
202
<ul>
 
203
<li><div class="fn"/>17 protected functions inherited from <a href="q3scrollview.html#protected-functions">Q3ScrollView</a></li>
 
204
<li><div class="fn"/>5 protected functions inherited from <a href="q3frame.html#protected-functions">Q3Frame</a></li>
 
205
<li><div class="fn"/>39 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
206
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
207
</ul>
 
208
<a name="protected-slots"></a>
 
209
<h3>Protected Slots</h3>
 
210
<ul>
 
211
<li><div class="fn"/>void <b><a href="q3listview.html#doAutoScroll">doAutoScroll</a></b> ()</li>
 
212
<li><div class="fn"/>void <b><a href="q3listview.html#updateContents">updateContents</a></b> ()</li>
 
213
</ul>
 
214
<h3>Additional Inherited Members</h3>
 
215
<ul>
 
216
<li><div class="fn"/>2 static public members inherited from <a href="qframe.html#static-public-members">QFrame</a></li>
 
217
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
 
218
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
219
</ul>
 
220
<a name="details"></a>
 
221
<hr />
 
222
<h2>Detailed Description</h2>
 
223
<p>The Q3ListView class implements a list/tree view.</p>
 
224
<p>It can display and control a hierarchy of multi-column items, and provides the ability to add new items at any time. The user may select one or many items (depending on the <tt>SelectionMode</tt>) and sort the list in increasing or decreasing order by any column.</p>
 
225
<p>The simplest pattern of use is to create a Q3ListView, add some column headers using <a href="q3listview.html#addColumn">addColumn</a>() and create one or more <a href="q3listviewitem.html">Q3ListViewItem</a> or <a href="q3checklistitem.html">Q3CheckListItem</a> objects with the Q3ListView as parent.</p>
 
226
<p>Further nodes can be added to the list view object (the root of the tree) or as child nodes to Q3ListViewItems.</p>
 
227
<p>The main setup functions are:</p>
 
228
<table align="center" cellpadding="2" cellspacing="1" border="0">
 
229
<tr valign="top" bgcolor="#a2c511"><th>Function</th><th>Action</th></tr>
 
230
<tr valign="top" bgcolor="#f0f0f0"><td><a href="q3listview.html#addColumn">addColumn</a>()</td><td>Adds a column with a text label and perhaps width. Columns are counted from the left starting with column 0.</td></tr>
 
231
<tr valign="top" bgcolor="#e0e0e0"><td><a href="q3listview.html#setColumnWidthMode">setColumnWidthMode</a>()</td><td>Sets the column to be resized automatically or not.</td></tr>
 
232
<tr valign="top" bgcolor="#f0f0f0"><td><a href="q3listview.html#allColumnsShowFocus-prop">setAllColumnsShowFocus</a>()</td><td>Sets whether items should show keyboard focus using all columns or just column 0. The default is to show focus just using column 0.</td></tr>
 
233
<tr valign="top" bgcolor="#e0e0e0"><td><a href="q3listview.html#rootIsDecorated-prop">setRootIsDecorated</a>()</td><td>Sets whether root items can be opened and closed by the user and have open/close decoration to their left. The default is false.</td></tr>
 
234
<tr valign="top" bgcolor="#f0f0f0"><td><a href="q3listview.html#treeStepSize-prop">setTreeStepSize</a>()</td><td>Sets how many pixels an item's children are indented relative to their parent. The default is 20. This is mostly a matter of taste.</td></tr>
 
235
<tr valign="top" bgcolor="#e0e0e0"><td><a href="q3listview.html#setSorting">setSorting</a>()</td><td>Sets whether the items should be sorted, whether it should be in ascending or descending order, and by what column they should be sorted. By default the list view is sorted by the first column; to switch this off call setSorting(-1).</td></tr>
 
236
</table>
 
237
<p>There are several functions for mapping between items and coordinates. <a href="q3listview.html#itemAt">itemAt</a>() returns the item at a position on-screen, <a href="q3listview.html#itemRect">itemRect</a>() returns the rectangle an item occupies on the screen, and <a href="q3listview.html#itemPos">itemPos</a>() returns the position of any item (whether it is on-screen or not). <a href="q3listview.html#firstChild">firstChild</a>() returns the list view's first item (not necessarily visible on-screen).</p>
 
238
<p>You can iterate over visible items using <a href="q3listviewitem.html#itemBelow">Q3ListViewItem::itemBelow</a>(); over a list view's top-level items using <a href="q3listviewitem.html#firstChild">Q3ListViewItem::firstChild</a>() and <a href="q3listviewitem.html#nextSibling">Q3ListViewItem::nextSibling</a>(); or every item using a <a href="q3listviewitemiterator.html">Q3ListViewItemIterator</a>. See the <a href="q3listviewitem.html">Q3ListViewItem</a> documentation for examples of traversal.</p>
 
239
<p>An item can be moved amongst its siblings using <a href="q3listviewitem.html#moveItem">Q3ListViewItem::moveItem</a>(). To move an item in the hierarchy use <a href="q3listview.html#takeItem">takeItem</a>() and <a href="q3listview.html#insertItem">insertItem</a>(). Item's (and all their child items) are deleted with <tt>delete</tt>; to delete all the list view's items use <a href="q3listview.html#clear">clear</a>().</p>
 
240
<p>There are a variety of selection modes described in the <a href="q3listview.html#SelectionMode-enum">Q3ListView::SelectionMode</a> documentation. The default is <tt>Single</tt> selection, which you can change using <a href="q3listview.html#selectionMode-prop">setSelectionMode</a>().</p>
 
241
<p>Because Q3ListView offers multiple selection it must display keyboard focus and selection state separately. Therefore there are functions both to set the selection state of an item (<a href="q3listview.html#setSelected">setSelected</a>()) and to set which item displays keyboard focus (<a href="q3listview.html#setCurrentItem">setCurrentItem</a>()).</p>
 
242
<p>Q3ListView emits two groups of signals; one group signals changes in selection/focus state and one indicates selection. The first group consists of <a href="q3listview.html#selectionChanged">selectionChanged</a>() (applicable to all list views), selectionChanged(<a href="q3listviewitem.html">Q3ListViewItem</a>*) (applicable only to a <tt>Single</tt> selection list view), and currentChanged(<a href="q3listviewitem.html">Q3ListViewItem</a>*). The second group consists of doubleClicked(<a href="q3listviewitem.html">Q3ListViewItem</a>*), returnPressed(<a href="q3listviewitem.html">Q3ListViewItem</a>*), rightButtonClicked(<a href="q3listviewitem.html">Q3ListViewItem</a>*, const <a href="qpoint.html">QPoint</a>&amp;, int), etc.</p>
 
243
<p>Note that changing the state of the list view in a slot connected to a list view signal may cause unexpected side effects. If you need to change the list view's state in response to a signal, use a <a href="qtimer.html#singleShot">single shot timer</a> with a time out of 0, and connect this timer to a slot that modifies the list view's state.</p>
 
244
<p>In Motif style, Q3ListView deviates fairly strongly from the look and feel of the Motif hierarchical tree view. This is done mostly to provide a usable keyboard interface and to make the list view look better with a white background.</p>
 
245
<p>If <a href="q3listview.html#selectionMode-prop">selectionMode</a>() is <tt>Single</tt> (the default) the user can select one item at a time, e.g. by clicking an item with the mouse, see <a href="q3listview.html#SelectionMode-enum">Q3ListView::SelectionMode</a> for details.</p>
 
246
<p>The list view can be navigated either using the mouse or the keyboard. Clicking a <b>-</b> icon closes an item (hides its children) and clicking a <b>+</b> icon opens an item (shows its children). The keyboard controls are these:</p>
 
247
<table align="center" cellpadding="2" cellspacing="1" border="0">
 
248
<tr valign="top" bgcolor="#a2c511"><th>Keypress</th><th>Action</th></tr>
 
249
<tr valign="top" bgcolor="#f0f0f0"><td>Home</td><td>Make the first item current and visible.</td></tr>
 
250
<tr valign="top" bgcolor="#e0e0e0"><td>End</td><td>Make the last item current and visible.</td></tr>
 
251
<tr valign="top" bgcolor="#f0f0f0"><td>Page Up</td><td>Make the item above the top visible item current and visible.</td></tr>
 
252
<tr valign="top" bgcolor="#e0e0e0"><td>Page Down</td><td>Make the item below the bottom visible item current and visible.</td></tr>
 
253
<tr valign="top" bgcolor="#f0f0f0"><td>Up Arrow</td><td>Make the item above the current item current and visible.</td></tr>
 
254
<tr valign="top" bgcolor="#e0e0e0"><td>Down Arrow</td><td>Make the item below the current item current and visible.</td></tr>
 
255
<tr valign="top" bgcolor="#f0f0f0"><td>Left Arrow</td><td>If the current item is closed (<b>+</b> icon) or has no children, make its parent item current and visible. If the current item is open (<b>-</b> icon) close it, i.e. hide its children. Exception: if the current item is the first item and is closed and the horizontal scrollbar is offset to the right the list view will be scrolled left.</td></tr>
 
256
<tr valign="top" bgcolor="#e0e0e0"><td>Right Arrow</td><td>If the current item is closed (<b>+</b> icon) and has children, the item is opened. If the current item is opened (<b>-</b> icon) and has children the item's first child is made current and visible. If the current item has no children the list view is scrolled right.</td></tr>
 
257
</table>
 
258
<p>If the user starts typing letters with the focus in the list view an incremental search will occur. For example if the user types 'd' the current item will change to the first item that begins with the letter 'd'; if they then type 'a', the current item will change to the first item that begins with 'da', and so on. If no item begins with the letters they type the current item doesn't change.</p>
 
259
<p>Note that the list view's size hint is calculated taking into account the height <i>and</i> width to produce a nice aspect ratio. This may mean that you need to reimplement <a href="q3listview.html#sizeHint">sizeHint</a>() in some cases.</p>
 
260
<p><b>Warning:</b> The list view assumes ownership of all list view items and will delete them when it does not need them any more.</p>
 
261
<p>See also <a href="q3listviewitem.html">Q3ListViewItem</a> and <a href="q3checklistitem.html">Q3CheckListItem</a>.</p>
 
262
<hr />
 
263
<h2>Member Type Documentation</h2>
 
264
<h3 class="fn"><a name="ComparisonFlags-typedef"></a>typedef Q3ListView::ComparisonFlags</h3>
 
265
<p>This typedef is used in <a href="q3listview.html">Q3ListView</a>'s API for values that are OR'd combinations of <a href="q3listview.html#StringComparisonMode-enum">StringComparisonMode</a> values.</p>
 
266
<p>See also <a href="q3listview.html#StringComparisonMode-enum">StringComparisonMode</a>.</p>
 
267
<h3 class="fn"><a name="RenameAction-enum"></a>enum Q3ListView::RenameAction</h3>
 
268
<p>This enum describes whether a rename operation is accepted if the rename editor loses focus without the user pressing Enter.</p>
 
269
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
270
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
271
<tr><td valign="top"><tt>Q3ListView::Accept</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Rename if Enter is pressed or focus is lost.</td></tr>
 
272
<tr><td valign="top"><tt>Q3ListView::Reject</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Discard the rename operation if focus is lost (and Enter has not been pressed).</td></tr>
 
273
</table>
 
274
<h3 class="fn"><a name="ResizeMode-enum"></a>enum Q3ListView::ResizeMode</h3>
 
275
<p>This enum describes how the list view's header adjusts to resize events which affect the width of the list view.</p>
 
276
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
277
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
278
<tr><td valign="top"><tt>Q3ListView::NoColumn</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The columns do not get resized in resize events.</td></tr>
 
279
<tr><td valign="top"><tt>Q3ListView::AllColumns</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">All columns are resized equally to fit the width of the list view.</td></tr>
 
280
<tr><td valign="top"><tt>Q3ListView::LastColumn</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The last column is resized to fit the width of the list view.</td></tr>
 
281
</table>
 
282
<h3 class="fn"><a name="SelectionMode-enum"></a>enum Q3ListView::SelectionMode</h3>
 
283
<p>This enumerated type is used by <a href="q3listview.html">Q3ListView</a> to indicate how it reacts to selection by the user.</p>
 
284
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
285
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
286
<tr><td valign="top"><tt>Q3ListView::Single</tt></td><td align="center" valign="top"><tt>0</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>
 
287
<tr><td valign="top"><tt>Q3ListView::Multi</tt></td><td align="center" valign="top"><tt>1</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>
 
288
<tr><td valign="top"><tt>Q3ListView::Extended</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 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. And if the user presses the Shift key while clicking on an item, all items between the current item and the clicked item get selected or unselected, depending on the state of the clicked item. Also, multiple items can be selected by dragging the mouse over them.</td></tr>
 
289
<tr><td valign="top"><tt>Q3ListView::NoSelection</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">Items cannot be selected.</td></tr>
 
290
</table>
 
291
<p>In other words, <tt>Single</tt> is a real single-selection list view, <tt>Multi</tt> a real multi-selection list view, <tt>Extended</tt> is a list view where 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 look but not touch.</p>
 
292
<h3 class="fn"><a name="StringComparisonMode-enum"></a>enum Q3ListView::StringComparisonMode</h3>
 
293
<p>This enum type is used to set the string comparison mode when searching for an item. We'll refer to the string being searched as the 'target' string.</p>
 
294
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
295
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
296
<tr><td valign="top"><tt>Q3ListView::CaseSensitive</tt></td><td align="center" valign="top"><tt>0x00001</tt></td><td valign="top">The strings must match case sensitively.</td></tr>
 
297
<tr><td valign="top"><tt>Q3ListView::ExactMatch</tt></td><td align="center" valign="top"><tt>0x00010</tt></td><td valign="top">The target and search strings must match exactly.</td></tr>
 
298
<tr><td valign="top"><tt>Q3ListView::BeginsWith</tt></td><td align="center" valign="top"><tt>0x00002</tt></td><td valign="top">The target string begins with the search string.</td></tr>
 
299
<tr><td valign="top"><tt>Q3ListView::EndsWith</tt></td><td align="center" valign="top"><tt>0x00004</tt></td><td valign="top">The target string ends with the search string.</td></tr>
 
300
<tr><td valign="top"><tt>Q3ListView::Contains</tt></td><td align="center" valign="top"><tt>0x00008</tt></td><td valign="top">The target string contains the search string.</td></tr>
 
301
</table>
 
302
<p>If you OR these flags together (excluding <tt>CaseSensitive</tt>), the search criteria be applied in the following order: <tt>ExactMatch</tt>, <tt>BeginsWith</tt>, <tt>EndsWith</tt>, <tt>Contains</tt>.</p>
 
303
<p>Matching is case-insensitive unless <tt>CaseSensitive</tt> is set. <tt>CaseSensitive</tt> can be OR-ed with any combination of the other flags.</p>
 
304
<p>See also <a href="q3listview.html#ComparisonFlags-typedef">ComparisonFlags</a>.</p>
 
305
<h3 class="fn"><a name="WidthMode-enum"></a>enum Q3ListView::WidthMode</h3>
 
306
<p>This enum type describes how the width of a column in the view changes.</p>
 
307
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
308
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
309
<tr><td valign="top"><tt>Q3ListView::Manual</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">the column width does not change automatically.</td></tr>
 
310
<tr><td valign="top"><tt>Q3ListView::Maximum</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">the column is automatically sized according to the widths of all items in the column. (Note: The column never shrinks in this case.) This means that the column is always resized to the width of the item with the largest width in the column.</td></tr>
 
311
</table>
 
312
<p>See also <a href="q3listview.html#setColumnWidth">setColumnWidth</a>(), <a href="q3listview.html#setColumnWidthMode">setColumnWidthMode</a>(), and <a href="q3listview.html#columnWidth">columnWidth</a>().</p>
 
313
<hr />
 
314
<h2>Property Documentation</h2>
 
315
<h3 class="fn"><a name="allColumnsShowFocus-prop"></a>allColumnsShowFocus : bool</h3>
 
316
<p>This property holds whether items should show keyboard focus using all columns.</p>
 
317
<p>If this property is true all columns will show focus and selection states, otherwise only column 0 will show focus.</p>
 
318
<p>The default is false.</p>
 
319
<p>Setting this to true if it's not necessary may cause noticeable flicker.</p>
 
320
<p>Access functions:</p>
 
321
<ul>
 
322
<li><div class="fn"/><b>bool allColumnsShowFocus () const</b></li>
 
323
<li><div class="fn"/><b>virtual void setAllColumnsShowFocus ( bool )</b></li>
 
324
</ul>
 
325
<h3 class="fn"><a name="childCount-prop"></a>childCount : const int</h3>
 
326
<p>This property holds the number of parentless (top-level) Q3ListViewItem objects in this Q3ListView.</p>
 
327
<p>Holds the current number of parentless (top-level) <a href="q3listviewitem.html">Q3ListViewItem</a> objects in this <a href="q3listview.html">Q3ListView</a>.</p>
 
328
<p>Access functions:</p>
 
329
<ul>
 
330
<li><div class="fn"/><b>int childCount () const</b></li>
 
331
</ul>
 
332
<p>See also <a href="q3listviewitem.html#childCount">Q3ListViewItem::childCount</a>().</p>
 
333
<h3 class="fn"><a name="columns-prop"></a>columns : const int</h3>
 
334
<p>This property holds the number of columns in this list view.</p>
 
335
<p>Access functions:</p>
 
336
<ul>
 
337
<li><div class="fn"/><b>int columns () const</b></li>
 
338
</ul>
 
339
<p>See also <a href="q3listview.html#addColumn">addColumn</a>() and <a href="q3listview.html#removeColumn">removeColumn</a>().</p>
 
340
<h3 class="fn"><a name="defaultRenameAction-prop"></a>defaultRenameAction : <a href="q3listview.html#RenameAction-enum">RenameAction</a></h3>
 
341
<p>This property holds what action to perform when the editor loses focus during renaming.</p>
 
342
<p>If this property is <tt>Accept</tt>, and the user renames an item and the editor loses focus (without the user pressing Enter), the item will still be renamed. If the property's value is <tt>Reject</tt>, the item will not be renamed unless the user presses Enter. The default is <tt>Reject</tt>.</p>
 
343
<p>Access functions:</p>
 
344
<ul>
 
345
<li><div class="fn"/><b>RenameAction defaultRenameAction () const</b></li>
 
346
<li><div class="fn"/><b>virtual void setDefaultRenameAction ( RenameAction <i>a</i> )</b></li>
 
347
</ul>
 
348
<h3 class="fn"><a name="itemMargin-prop"></a>itemMargin : int</h3>
 
349
<p>This property holds the advisory item margin that list items may use.</p>
 
350
<p>The item margin defaults to one pixel and is the margin between the item's edges and the area where it draws its contents. <a href="q3listviewitem.html#paintFocus">Q3ListViewItem::paintFocus</a>() draws in the margin.</p>
 
351
<p>Access functions:</p>
 
352
<ul>
 
353
<li><div class="fn"/><b>int itemMargin () const</b></li>
 
354
<li><div class="fn"/><b>virtual void setItemMargin ( int )</b></li>
 
355
</ul>
 
356
<p>See also <a href="q3listviewitem.html#paintCell">Q3ListViewItem::paintCell</a>().</p>
 
357
<h3 class="fn"><a name="multiSelection-prop"></a>multiSelection : bool</h3>
 
358
<p>This property holds whether the list view is in multi-selection or extended-selection mode.</p>
 
359
<p>If you enable multi-selection, <tt>Multi</tt>, mode, it is possible to specify whether or not this mode should be extended. <tt>Extended</tt> means that the user can select multiple items only when pressing the Shift or Ctrl key at the same time.</p>
 
360
<p>The default selection mode is <tt>Single</tt>.</p>
 
361
<p>Access functions:</p>
 
362
<ul>
 
363
<li><div class="fn"/><b>bool isMultiSelection () const</b></li>
 
364
<li><div class="fn"/><b>virtual void setMultiSelection ( bool <i>enable</i> )</b></li>
 
365
</ul>
 
366
<p>See also <a href="q3listview.html#selectionMode-prop">selectionMode</a>().</p>
 
367
<h3 class="fn"><a name="resizeMode-prop"></a>resizeMode : <a href="q3listview.html#ResizeMode-enum">ResizeMode</a></h3>
 
368
<p>This property holds whether all, none or the only the last column should be resized.</p>
 
369
<p>Specifies whether all, none or only the last column should be resized to fit the full width of the list view. The values for this property can be one of: <tt>NoColumn</tt> (the default), <tt>AllColumns</tt> or <tt>LastColumn</tt>.</p>
 
370
<p><b>Warning:</b> Setting the resize mode should be done after all necessary columns have been added to the list view, otherwise the behavior is undefined.</p>
 
371
<p>Access functions:</p>
 
372
<ul>
 
373
<li><div class="fn"/><b>ResizeMode resizeMode () const</b></li>
 
374
<li><div class="fn"/><b>virtual void setResizeMode ( ResizeMode <i>m</i> )</b></li>
 
375
</ul>
 
376
<p>See also <a href="q3header.html">Q3Header</a> and <a href="q3listview.html#header">header</a>().</p>
 
377
<h3 class="fn"><a name="rootIsDecorated-prop"></a>rootIsDecorated : bool</h3>
 
378
<p>This property holds whether the list view shows open/close signs on root items.</p>
 
379
<p>Open/close signs are small <b>+</b> or <b>-</b> symbols in windows style, or arrows in Motif style. The default is false.</p>
 
380
<p>Access functions:</p>
 
381
<ul>
 
382
<li><div class="fn"/><b>bool rootIsDecorated () const</b></li>
 
383
<li><div class="fn"/><b>virtual void setRootIsDecorated ( bool )</b></li>
 
384
</ul>
 
385
<h3 class="fn"><a name="selectionMode-prop"></a>selectionMode : <a href="q3listview.html#SelectionMode-enum">SelectionMode</a></h3>
 
386
<p>This property holds the list view's selection mode.</p>
 
387
<p>The mode can be <tt>Single</tt> (the default), <tt>Extended</tt>, <tt>Multi</tt> or <tt>NoSelection</tt>.</p>
 
388
<p>Access functions:</p>
 
389
<ul>
 
390
<li><div class="fn"/><b>SelectionMode selectionMode () const</b></li>
 
391
<li><div class="fn"/><b>void setSelectionMode ( SelectionMode <i>mode</i> )</b></li>
 
392
</ul>
 
393
<p>See also <a href="q3listview.html#multiSelection-prop">multiSelection</a>.</p>
 
394
<h3 class="fn"><a name="showSortIndicator-prop"></a>showSortIndicator : bool</h3>
 
395
<p>This property holds whether the list view header should display a sort indicator.</p>
 
396
<p>If this property is true, an arrow is drawn in the header of the list view to indicate the sort order of the list view contents. The arrow will be drawn in the correct column and will point up or down, depending on the current sort direction. The default is false (don't show an indicator).</p>
 
397
<p>Access functions:</p>
 
398
<ul>
 
399
<li><div class="fn"/><b>bool showSortIndicator () const</b></li>
 
400
<li><div class="fn"/><b>virtual void setShowSortIndicator ( bool <i>show</i> )</b></li>
 
401
</ul>
 
402
<p>See also <a href="q3header.html#setSortIndicator">Q3Header::setSortIndicator</a>().</p>
 
403
<h3 class="fn"><a name="showToolTips-prop"></a>showToolTips : bool</h3>
 
404
<p>This property holds whether this list view should show tooltips for truncated column texts.</p>
 
405
<p>The default is true.</p>
 
406
<p>Access functions:</p>
 
407
<ul>
 
408
<li><div class="fn"/><b>bool showToolTips () const</b></li>
 
409
<li><div class="fn"/><b>virtual void setShowToolTips ( bool <i>b</i> )</b></li>
 
410
</ul>
 
411
<h3 class="fn"><a name="treeStepSize-prop"></a>treeStepSize : int</h3>
 
412
<p>This property holds the number of pixels a child is offset from its parent.</p>
 
413
<p>The default is 20 pixels.</p>
 
414
<p>Of course, this property is only meaningful for hierarchical list views.</p>
 
415
<p>Access functions:</p>
 
416
<ul>
 
417
<li><div class="fn"/><b>int treeStepSize () const</b></li>
 
418
<li><div class="fn"/><b>virtual void setTreeStepSize ( int )</b></li>
 
419
</ul>
 
420
<hr />
 
421
<h2>Member Function Documentation</h2>
 
422
<h3 class="fn"><a name="Q3ListView"></a>Q3ListView::Q3ListView ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0, const char * <i>name</i> = 0, <a href="qt.html#WFlags-typedef">Qt::WFlags</a> <i>f</i> = 0 )</h3>
 
423
<p>Constructs a new empty list view called <i>name</i> with parent <i>parent</i> and widget attributes <i>f</i>.</p>
 
424
<p>This constructor sets the <tt>WA_StaticContent</tt> and the <tt>Qt::WA_NoBackground</tt> attributes to boost performance when drawing Q3ListViewItems. This may be unsuitable for custom <a href="q3listviewitem.html">Q3ListViewItem</a> classes, in which case <tt>Qt::WA_StaticContents</tt> and <tt>Qt::WA_NoBackground</tt> should be cleared on the <a href="q3scrollview.html#viewport">viewport</a>() after construction.</p>
 
425
<p>See also <a href="qwidget.html#setAttribute">QWidget::setAttribute</a>().</p>
 
426
<h3 class="fn"><a name="dtor.Q3ListView"></a>Q3ListView::~Q3ListView ()</h3>
 
427
<p>Destroys the list view, deleting all its items, and frees up all allocated resources.</p>
 
428
<h3 class="fn"><a name="addColumn"></a>int Q3ListView::addColumn ( const <a href="qstring.html">QString</a> &amp; <i>label</i>, int <i>width</i> = -1 )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
429
<p>Adds a <i>width</i> pixels wide column with the column header <i>label</i> to the list view, and returns the index of the new column.</p>
 
430
<p>All columns apart from the first one are inserted to the right of the existing ones.</p>
 
431
<p>If <i>width</i> is negative, the new column's <a href="q3listview.html#WidthMode-enum">WidthMode</a> is set to <tt>Maximum</tt> instead of <tt>Manual</tt>.</p>
 
432
<p>See also <a href="q3listview.html#setColumnText">setColumnText</a>(), <a href="q3listview.html#setColumnWidth">setColumnWidth</a>(), and <a href="q3listview.html#setColumnWidthMode">setColumnWidthMode</a>().</p>
 
433
<h3 class="fn"><a name="addColumn-2"></a>int Q3ListView::addColumn ( const <a href="qicon.html">QIcon</a> &amp; <i>icon</i>, const <a href="qstring.html">QString</a> &amp; <i>label</i>, int <i>width</i> = -1 )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
434
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
435
<p>Adds a <i>width</i> pixels wide new column with the header <i>label</i> and the <i>icon</i> to the list view, and returns the index of the column.</p>
 
436
<p>If <i>width</i> is negative, the new column's <a href="q3listview.html#WidthMode-enum">WidthMode</a> is set to <tt>Maximum</tt>, and to <tt>Manual</tt> otherwise.</p>
 
437
<p>See also <a href="q3listview.html#setColumnText">setColumnText</a>(), <a href="q3listview.html#setColumnWidth">setColumnWidth</a>(), and <a href="q3listview.html#setColumnWidthMode">setColumnWidthMode</a>().</p>
 
438
<h3 class="fn"><a name="adjustColumn"></a>void Q3ListView::adjustColumn ( int <i>col</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
439
<p>Adjusts the column <i>col</i> to its preferred width</p>
 
440
<h3 class="fn"><a name="clear"></a>void Q3ListView::clear ()&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
 
441
<p>Removes and deletes all the items in this list view and triggers an update.</p>
 
442
<p>See also <a href="q3listview.html#triggerUpdate">triggerUpdate</a>().</p>
 
443
<h3 class="fn"><a name="clearSelection"></a>void Q3ListView::clearSelection ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
444
<p>Sets all the items to be not selected, updates the list view as necessary, and emits the <a href="q3listview.html#selectionChanged">selectionChanged</a>() signals. Note that for <tt>Multi</tt> selection list views this function needs to iterate over <i>all</i> items.</p>
 
445
<p>See also <a href="q3listview.html#setSelected">setSelected</a>() and <a href="q3listview.html#multiSelection-prop">setMultiSelection</a>().</p>
 
446
<h3 class="fn"><a name="clicked"></a>void Q3ListView::clicked ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
447
<p>This signal is emitted whenever the user clicks (mouse pressed <i>and</i> mouse released) in the list view. <i>item</i> is the clicked list view item, or 0 if the user didn't click on an item.</p>
 
448
<p><b>Warning:</b> Do not delete any <a href="q3listviewitem.html">Q3ListViewItem</a> objects in slots connected to this signal.</p>
 
449
<h3 class="fn"><a name="clicked-2"></a>void Q3ListView::clicked ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pnt</i>, int <i>c</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
450
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
451
<p>This signal is emitted whenever the user clicks (mouse pressed <i>and</i> mouse released) in the list view. <i>item</i> is the clicked list view item, or 0 if the user didn't click on an item. <i>pnt</i> is the position where the user has clicked in global coordinates. If <i>item</i> is not 0, <i>c</i> is the list view column into which the user pressed; if <i>item</i> is 0 <i>c</i>'s value is undefined.</p>
 
452
<p><b>Warning:</b> Do not delete any <a href="q3listviewitem.html">Q3ListViewItem</a> objects in slots connected to this signal.</p>
 
453
<h3 class="fn"><a name="collapsed"></a>void Q3ListView::collapsed ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
454
<p>This signal is emitted when the <i>item</i> has been collapsed, i.e. when the children of <i>item</i> are hidden.</p>
 
455
<p>See also <a href="q3listview.html#setOpen">setOpen</a>() and <a href="q3listview.html#expanded">expanded</a>().</p>
 
456
<h3 class="fn"><a name="columnAlignment"></a>int Q3ListView::columnAlignment ( int <i>column</i> ) const</h3>
 
457
<p>Returns the alignment of column <i>column</i>. The default is <tt>Qt::AlignAuto</tt>.</p>
 
458
<p>See also <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a>.</p>
 
459
<h3 class="fn"><a name="columnText"></a><a href="qstring.html">QString</a> Q3ListView::columnText ( int <i>c</i> ) const</h3>
 
460
<p>Returns the text of column <i>c</i>.</p>
 
461
<p>See also <a href="q3listview.html#setColumnText">setColumnText</a>().</p>
 
462
<h3 class="fn"><a name="columnWidth"></a>int Q3ListView::columnWidth ( int <i>c</i> ) const</h3>
 
463
<p>Returns the width of column <i>c</i>.</p>
 
464
<p>See also <a href="q3listview.html#setColumnWidth">setColumnWidth</a>().</p>
 
465
<h3 class="fn"><a name="columnWidthMode"></a><a href="q3listview.html#WidthMode-enum">WidthMode</a> Q3ListView::columnWidthMode ( int <i>c</i> ) const</h3>
 
466
<p>Returns the <tt>WidthMode</tt> for column <i>c</i>.</p>
 
467
<p>See also <a href="q3listview.html#setColumnWidthMode">setColumnWidthMode</a>().</p>
 
468
<h3 class="fn"><a name="contentsMouseDoubleClickEvent"></a>void Q3ListView::contentsMouseDoubleClickEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
469
<p>Processes the mouse double-click event <i>e</i> on behalf of the viewed widget.</p>
 
470
<p>Reimplemented from <a href="q3scrollview.html#contentsMouseDoubleClickEvent">Q3ScrollView</a>.</p>
 
471
<h3 class="fn"><a name="contentsMouseMoveEvent"></a>void Q3ListView::contentsMouseMoveEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
472
<p>Processes the mouse move event <i>e</i> on behalf of the viewed widget.</p>
 
473
<p>Reimplemented from <a href="q3scrollview.html#contentsMouseMoveEvent">Q3ScrollView</a>.</p>
 
474
<h3 class="fn"><a name="contentsMousePressEvent"></a>void Q3ListView::contentsMousePressEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
475
<p>Processes the mouse press event <i>e</i> on behalf of the viewed widget.</p>
 
476
<p>Reimplemented from <a href="q3scrollview.html#contentsMousePressEvent">Q3ScrollView</a>.</p>
 
477
<h3 class="fn"><a name="contentsMouseReleaseEvent"></a>void Q3ListView::contentsMouseReleaseEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
478
<p>Processes the mouse release event <i>e</i> on behalf of the viewed widget.</p>
 
479
<p>Reimplemented from <a href="q3scrollview.html#contentsMouseReleaseEvent">Q3ScrollView</a>.</p>
 
480
<h3 class="fn"><a name="contextMenuRequested"></a>void Q3ListView::contextMenuRequested ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i>, int <i>col</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
481
<p>This signal is emitted when the user invokes a context menu with the right mouse button or with special system keys. If the keyboard was used <i>item</i> is the current item; if the mouse was used, <i>item</i> is the item under the mouse pointer or 0 if there is no item under the mouse pointer. If no item is clicked, the column index emitted is -1.</p>
 
482
<p><i>pos</i> is the position for the context menu in the global coordinate system.</p>
 
483
<p><i>col</i> is the column on which the user pressed, or -1 if the signal was triggered by a key event.</p>
 
484
<h3 class="fn"><a name="currentChanged"></a>void Q3ListView::currentChanged ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
485
<p>This signal is emitted whenever the current item has changed (normally after the screen update). The current item is the item responsible for indicating keyboard focus.</p>
 
486
<p>The argument is the newly current <i>item</i>, or 0 if the change made no item current. This can happen, for example, if all the items in the list view are deleted.</p>
 
487
<p><b>Warning:</b> Do not delete any <a href="q3listviewitem.html">Q3ListViewItem</a> objects in slots connected to this signal.</p>
 
488
<p>See also <a href="q3listview.html#setCurrentItem">setCurrentItem</a>() and <a href="q3listview.html#currentItem">currentItem</a>().</p>
 
489
<h3 class="fn"><a name="currentItem"></a><a href="q3listviewitem.html">Q3ListViewItem</a> * Q3ListView::currentItem () const</h3>
 
490
<p>Returns the current item, or 0 if there isn't one.</p>
 
491
<p>See also <a href="q3listview.html#setCurrentItem">setCurrentItem</a>().</p>
 
492
<h3 class="fn"><a name="doAutoScroll"></a>void Q3ListView::doAutoScroll ()&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
 
493
<p>This slot handles auto-scrolling when the mouse button is pressed and the mouse is outside the widget.</p>
 
494
<h3 class="fn"><a name="doubleClicked"></a>void Q3ListView::doubleClicked ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
495
<p>This signal is emitted whenever an item is double-clicked. It's emitted on the second button press, not the second button release. <i>item</i> is the list view item on which the user did the double-click.</p>
 
496
<h3 class="fn"><a name="doubleClicked-2"></a>void Q3ListView::doubleClicked ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>point</i>, int <i>column</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
497
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
498
<p>This signal is emitted when a double-click occurs. It's emitted on the second button press, not the second button release. The <i>item</i> is the <a href="q3listviewitem.html">Q3ListViewItem</a> the button was double-clicked on (which could be 0 if it wasn't double-clicked on an item). The <i>point</i> where the double-click occurred is given in global coordinates. If an item was double-clicked on, <i>column</i> is the column within the item that was double-clicked; otherwise <i>column</i> is -1.</p>
 
499
<p><b>Warning:</b> Do not delete any <a href="q3listviewitem.html">Q3ListViewItem</a> objects in slots connected to this signal.</p>
 
500
<h3 class="fn"><a name="dragObject"></a><a href="q3dragobject.html">Q3DragObject</a> * Q3ListView::dragObject ()&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
501
<p>If the user presses the mouse on an item and starts moving the mouse, and the item allow dragging (see <a href="q3listviewitem.html#setDragEnabled">Q3ListViewItem::setDragEnabled</a>()), this function is called to get a drag object and a drag is started unless dragObject() returns 0.</p>
 
502
<p>By default this function returns 0. You should reimplement it and create a <a href="q3dragobject.html">Q3DragObject</a> depending on the selected items.</p>
 
503
<h3 class="fn"><a name="drawContentsOffset"></a>void Q3ListView::drawContentsOffset ( <a href="qpainter.html">QPainter</a> * <i>p</i>, int <i>ox</i>, int <i>oy</i>, int <i>cx</i>, int <i>cy</i>, int <i>cw</i>, int <i>ch</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
504
<p>Calls <a href="q3listviewitem.html#paintCell">Q3ListViewItem::paintCell</a>() and <a href="q3listviewitem.html#paintBranches">Q3ListViewItem::paintBranches</a>() as necessary for all list view items that require repainting in the <i>cw</i> pixels wide and <i>ch</i> pixels high bounding rectangle starting at position <i>cx</i>, <i>cy</i> with offset <i>ox</i>, <i>oy</i>. Uses the painter <i>p</i>.</p>
 
505
<p>Reimplemented from <a href="q3scrollview.html#drawContentsOffset">Q3ScrollView</a>.</p>
 
506
<h3 class="fn"><a name="dropped"></a>void Q3ListView::dropped ( <a href="qdropevent.html">QDropEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
507
<p>This signal is emitted, when a drop event occurred on the viewport (not onto an item).</p>
 
508
<p><i>e</i> provides all the information about the drop.</p>
 
509
<h3 class="fn"><a name="ensureItemVisible"></a>void Q3ListView::ensureItemVisible ( const <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>i</i> )</h3>
 
510
<p>Ensures that item <i>i</i> is visible, scrolling the list view vertically if necessary and opening (expanding) any parent items if this is required to show the item.</p>
 
511
<p>See also <a href="q3listview.html#itemRect">itemRect</a>() and <a href="q3scrollview.html#ensureVisible">Q3ScrollView::ensureVisible</a>().</p>
 
512
<h3 class="fn"><a name="eventFilter"></a>bool Q3ListView::eventFilter ( <a href="qobject.html">QObject</a> * <i>o</i>, <a href="qevent.html">QEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
513
<p>Redirects the event <i>e</i> relating to object <i>o</i>, for the viewport to <a href="q3scrollview.html#mousePressEvent">mousePressEvent</a>(), <a href="q3listview.html#keyPressEvent">keyPressEvent</a>() and friends.</p>
 
514
<p>Reimplemented from <a href="qobject.html#eventFilter">QObject</a>.</p>
 
515
<h3 class="fn"><a name="expanded"></a>void Q3ListView::expanded ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
516
<p>This signal is emitted when <i>item</i> has been expanded, i.e. when the children of <i>item</i> are shown.</p>
 
517
<p>See also <a href="q3listview.html#setOpen">setOpen</a>() and <a href="q3listview.html#collapsed">collapsed</a>().</p>
 
518
<h3 class="fn"><a name="findItem"></a><a href="q3listviewitem.html">Q3ListViewItem</a> * Q3ListView::findItem ( const <a href="qstring.html">QString</a> &amp; <i>text</i>, int <i>column</i>, <a href="q3listview.html#ComparisonFlags-typedef">ComparisonFlags</a> <i>compare</i> = ExactMatch | Qt::CaseSensitive ) const</h3>
 
519
<p>Finds the first list view item in column <i>column</i>, that matches <i>text</i> and returns the item, or returns 0 of no such item could be found. Pass OR-ed together <a href="q3listview.html#ComparisonFlags-typedef">ComparisonFlags</a> values in the <i>compare</i> flag, to control how the matching is performed. The default comparison mode is case-sensitive, exact match.</p>
 
520
<h3 class="fn"><a name="firstChild"></a><a href="q3listviewitem.html">Q3ListViewItem</a> * Q3ListView::firstChild () const</h3>
 
521
<p>Returns the first item in this <a href="q3listview.html">Q3ListView</a>. Returns 0 if there is no first item.</p>
 
522
<p>A list view's items can be traversed using firstChild() and nextSibling() or using a <a href="q3listviewitemiterator.html">Q3ListViewItemIterator</a>.</p>
 
523
<p>See also <a href="q3listview.html#itemAt">itemAt</a>(), <a href="q3listviewitem.html#itemBelow">Q3ListViewItem::itemBelow</a>(), and <a href="q3listviewitem.html#itemAbove">Q3ListViewItem::itemAbove</a>().</p>
 
524
<h3 class="fn"><a name="header"></a><a href="q3header.html">Q3Header</a> * Q3ListView::header () const</h3>
 
525
<p>Returns the <a href="q3header.html">Q3Header</a> object that manages this list view's columns. Please don't modify the header behind the list view's back.</p>
 
526
<p>You may safely call <a href="q3header.html#setClickEnabled">Q3Header::setClickEnabled</a>(), <a href="q3header.html#setResizeEnabled">Q3Header::setResizeEnabled</a>(), <a href="q3header.html#moving-prop">Q3Header::setMovingEnabled</a>(), <a href="qwidget.html#hide">Q3Header::hide</a>() and all the const <a href="q3header.html">Q3Header</a> functions.</p>
 
527
<h3 class="fn"><a name="hideColumn"></a>void Q3ListView::hideColumn ( int <i>column</i> )</h3>
 
528
<p>Hides the column specified at <i>column</i>. This is a convenience function that calls setColumnWidth(column, 0).</p>
 
529
<p>See also <a href="q3listview.html#setColumnWidth">setColumnWidth</a>().</p>
 
530
<h3 class="fn"><a name="insertItem"></a>void Q3ListView::insertItem ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>i</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
531
<p>Inserts item <i>i</i> into the list view as a top-level item. You do not need to call this unless you've called takeItem(<i>i</i>) or Q3ListViewItem::takeItem(<i>i</i>) and need to reinsert <i>i</i> elsewhere.</p>
 
532
<p>See also <a href="q3listviewitem.html#takeItem">Q3ListViewItem::takeItem</a>() and <a href="q3listview.html#takeItem">takeItem</a>().</p>
 
533
<h3 class="fn"><a name="invertSelection"></a>void Q3ListView::invertSelection ()&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
 
534
<p>Inverts the selection. Only works in <tt>Multi</tt> and <tt>Extended</tt> selection modes.</p>
 
535
<h3 class="fn"><a name="isOpen"></a>bool Q3ListView::isOpen ( const <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> ) const</h3>
 
536
<p>Identical to <i>item</i>-&gt;isOpen(). Provided for completeness.</p>
 
537
<p>See also <a href="q3listview.html#setOpen">setOpen</a>().</p>
 
538
<h3 class="fn"><a name="isRenaming"></a>bool Q3ListView::isRenaming () const</h3>
 
539
<p>Returns true if an item is being renamed; otherwise returns false.</p>
 
540
<h3 class="fn"><a name="isSelected"></a>bool Q3ListView::isSelected ( const <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>i</i> ) const</h3>
 
541
<p>Returns true if the list view item <i>i</i> is selected; otherwise returns false.</p>
 
542
<p>See also <a href="q3listviewitem.html#isSelected">Q3ListViewItem::isSelected</a>().</p>
 
543
<h3 class="fn"><a name="itemAt"></a><a href="q3listviewitem.html">Q3ListViewItem</a> * Q3ListView::itemAt ( const <a href="qpoint.html">QPoint</a> &amp; <i>viewPos</i> ) const</h3>
 
544
<p>Returns the list view item at <i>viewPos</i>. Note that <i>viewPos</i> is in the <a href="q3scrollview.html#viewport">viewport</a>()'s coordinate system, not in the list view's own, much larger, coordinate system.</p>
 
545
<p>itemAt() returns 0 if there is no such item.</p>
 
546
<p>Note that you also get the pointer to the item if <i>viewPos</i> points to the root decoration (see <a href="q3listview.html#rootIsDecorated-prop">setRootIsDecorated</a>()) of the item. To check whether or not <i>viewPos</i> is on the root decoration of the item, you can do something like this:</p>
 
547
<pre>&nbsp;   Q3ListViewItem *i = itemAt(p);
 
548
    if (i) {
 
549
        if (p.x() &gt; header()-&gt;sectionPos(header()-&gt;mapToIndex(0)) +
 
550
                treeStepSize() * (i-&gt;depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin() ||
 
551
                p.x() &lt; header()-&gt;sectionPos(header()-&gt;mapToIndex(0))) {
 
552
            ; // p is not on root decoration
 
553
        else
 
554
            ; // p is on the root decoration
 
555
    }</pre>
 
556
<p>This might be interesting if you use this function to find out where the user clicked and if you want to start a drag (which you do not want to do if the user clicked onto the root decoration of an item).</p>
 
557
<p>See also <a href="q3listview.html#itemPos">itemPos</a>(), <a href="q3listview.html#itemRect">itemRect</a>(), and <a href="q3scrollview.html#viewportToContents">viewportToContents</a>().</p>
 
558
<h3 class="fn"><a name="itemPos"></a>int Q3ListView::itemPos ( const <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )</h3>
 
559
<p>Returns the y-coordinate of <i>item</i> in the list view's coordinate system. This function is normally much slower than <a href="q3listview.html#itemAt">itemAt</a>() but it works for all items, whereas <a href="q3listview.html#itemAt">itemAt</a>() normally works only for items on the screen.</p>
 
560
<p>This is a thin wrapper around <a href="q3listviewitem.html#itemPos">Q3ListViewItem::itemPos</a>().</p>
 
561
<p>See also <a href="q3listview.html#itemAt">itemAt</a>() and <a href="q3listview.html#itemRect">itemRect</a>().</p>
 
562
<h3 class="fn"><a name="itemRect"></a><a href="qrect.html">QRect</a> Q3ListView::itemRect ( const <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> ) const</h3>
 
563
<p>Returns the rectangle on the screen that item <i>item</i> occupies in <a href="q3scrollview.html#viewport">viewport</a>()'s coordinates, or an invalid rectangle if <i>item</i> is 0 or is not currently visible.</p>
 
564
<p>The rectangle returned does not include any children of the rectangle (i.e. it uses <a href="q3listviewitem.html#height">Q3ListViewItem::height</a>(), rather than <a href="q3listviewitem.html#totalHeight">Q3ListViewItem::totalHeight</a>()). If you want the rectangle to include children you can use something like this:</p>
 
565
<pre>&nbsp;   QRect r(listView-&gt;itemRect(item));
 
566
    r.setHeight(qMin(item-&gt;totalHeight(),
 
567
                     listView-&gt;viewport-&gt;height() - r.y()))</pre>
 
568
<p>Note the way it avoids too-high rectangles. totalHeight() can be much larger than the window system's coordinate system allows.</p>
 
569
<p>itemRect() is comparatively slow. It's best to call it only for items that are probably on-screen.</p>
 
570
<h3 class="fn"><a name="itemRenamed"></a>void Q3ListView::itemRenamed ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, int <i>col</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
571
<p>This signal is emitted when <i>item</i> has been renamed to <i>text</i>, e.g. by in in-place renaming, in column <i>col</i>.</p>
 
572
<p>See also <a href="q3listviewitem.html#setRenameEnabled">Q3ListViewItem::setRenameEnabled</a>().</p>
 
573
<h3 class="fn"><a name="itemRenamed-2"></a>void Q3ListView::itemRenamed ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, int <i>col</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
574
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
575
<p>This signal is emitted when <i>item</i> has been renamed, e.g. by in-place renaming, in column <i>col</i>.</p>
 
576
<p>See also <a href="q3listviewitem.html#setRenameEnabled">Q3ListViewItem::setRenameEnabled</a>().</p>
 
577
<h3 class="fn"><a name="lastItem"></a><a href="q3listviewitem.html">Q3ListViewItem</a> * Q3ListView::lastItem () const</h3>
 
578
<p>Returns the last item in the list view tree. Returns 0 if there are no items in the <a href="q3listview.html">Q3ListView</a>.</p>
 
579
<p>This function is slow because it traverses the entire tree to find the last item.</p>
 
580
<h3 class="fn"><a name="mouseButtonClicked"></a>void Q3ListView::mouseButtonClicked ( int <i>button</i>, <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i>, int <i>c</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
581
<p>This signal is emitted whenever the user clicks (mouse pressed <i>and</i> mouse released) in the list view at position <i>pos</i>. <i>button</i> is the mouse button that the user pressed, <i>item</i> is the clicked list view item or 0 if the user didn't click on an item. If <i>item</i> is not 0, <i>c</i> is the list view column into which the user pressed; if <i>item</i> is 0 <i>c</i>'s value is undefined.</p>
 
582
<p><b>Warning:</b> Do not delete any <a href="q3listviewitem.html">Q3ListViewItem</a> objects in slots connected to this signal.</p>
 
583
<h3 class="fn"><a name="mouseButtonPressed"></a>void Q3ListView::mouseButtonPressed ( int <i>button</i>, <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i>, int <i>c</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
584
<p>This signal is emitted whenever the user pressed the mouse button in the list view at position <i>pos</i>. <i>button</i> is the mouse button which the user pressed, <i>item</i> is the pressed list view item or 0 if the user didn't press on an item. If <i>item</i> is not 0, <i>c</i> is the list view column into which the user pressed; if <i>item</i> is 0 <i>c</i>'s value is undefined.</p>
 
585
<p><b>Warning:</b> Do not delete any <a href="q3listviewitem.html">Q3ListViewItem</a> objects in slots connected to this signal.</p>
 
586
<h3 class="fn"><a name="onItem"></a>void Q3ListView::onItem ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>i</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
587
<p>This signal is emitted when the user moves the mouse cursor onto item <i>i</i>, similar to the <a href="qwidget.html#enterEvent">QWidget::enterEvent</a>() function.</p>
 
588
<h3 class="fn"><a name="onViewport"></a>void Q3ListView::onViewport ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
589
<p>This signal is emitted when the user moves the mouse cursor from an item to an empty part of the list view.</p>
 
590
<h3 class="fn"><a name="paintEmptyArea"></a>void Q3ListView::paintEmptyArea ( <a href="qpainter.html">QPainter</a> * <i>p</i>, const <a href="qrect.html">QRect</a> &amp; <i>rect</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
591
<p>Paints <i>rect</i> so that it looks like empty background using painter <i>p</i>. <i>rect</i> is in widget coordinates, ready to be fed to <i>p</i>.</p>
 
592
<p>The default function fills <i>rect</i> with the <a href="q3scrollview.html#viewport">viewport</a>()-&gt;backgroundBrush().</p>
 
593
<h3 class="fn"><a name="pressed"></a>void Q3ListView::pressed ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
594
<p>This signal is emitted whenever the user presses the mouse button in a list view. <i>item</i> is the list view item on which the user pressed the mouse button, or 0 if the user didn't press the mouse on an item.</p>
 
595
<p><b>Warning:</b> Do not delete any <a href="q3listviewitem.html">Q3ListViewItem</a> objects in slots connected to this signal.</p>
 
596
<h3 class="fn"><a name="pressed-2"></a>void Q3ListView::pressed ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pnt</i>, int <i>c</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
597
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
598
<p>This signal is emitted whenever the user presses the mouse button in a list view. <i>item</i> is the list view item on which the user pressed the mouse button, or 0 if the user didn't press the mouse on an item. <i>pnt</i> is the position of the mouse cursor in global coordinates, and <i>c</i> is the column where the mouse cursor was when the user pressed the mouse button.</p>
 
599
<p><b>Warning:</b> Do not delete any <a href="q3listviewitem.html">Q3ListViewItem</a> objects in slots connected to this signal.</p>
 
600
<h3 class="fn"><a name="removeColumn"></a>void Q3ListView::removeColumn ( int <i>index</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
601
<p>Removes the column at position <i>index</i>.</p>
 
602
<h3 class="fn"><a name="removeItem"></a>void Q3ListView::removeItem ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
603
<p>Removes the given <i>item</i>. Use <a href="q3listview.html#takeItem">takeItem</a>() instead.</p>
 
604
<h3 class="fn"><a name="repaintItem"></a>void Q3ListView::repaintItem ( const <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> ) const</h3>
 
605
<p>Repaints <i>item</i> on the screen if <i>item</i> is currently visible. Takes care to avoid multiple repaints.</p>
 
606
<h3 class="fn"><a name="resizeEvent"></a>void Q3ListView::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
607
<p>Ensures that the header is correctly sized and positioned when the resize event <i>e</i> occurs.</p>
 
608
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget</a>.</p>
 
609
<h3 class="fn"><a name="returnPressed"></a>void Q3ListView::returnPressed ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
610
<p>This signal is emitted when Enter or Return is pressed. The <i>item</i> parameter is the <a href="q3listview.html#currentItem">currentItem</a>().</p>
 
611
<h3 class="fn"><a name="rightButtonClicked"></a>void Q3ListView::rightButtonClicked ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>point</i>, int <i>column</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
612
<p>This signal is emitted when the right button is clicked. The <i>item</i> is the <a href="q3listviewitem.html">Q3ListViewItem</a> the button was clicked on (which could be 0 if it wasn't clicked on an item). The <i>point</i> where the click occurred is given in global coordinates. If an item was clicked on, <i>column</i> is the column within the item that was clicked; otherwise <i>column</i> is -1.</p>
 
613
<h3 class="fn"><a name="rightButtonPressed"></a>void Q3ListView::rightButtonPressed ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>point</i>, int <i>column</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
614
<p>This signal is emitted when the right button is pressed. The <i>item</i> is the <a href="q3listviewitem.html">Q3ListViewItem</a> the button was pressed on (which could be 0 if it wasn't pressed on an item). The <i>point</i> where the press occurred is given in global coordinates. If an item was pressed on, <i>column</i> is the column within the item that was pressed; otherwise <i>column</i> is -1.</p>
 
615
<h3 class="fn"><a name="selectAll"></a>void Q3ListView::selectAll ( bool <i>select</i> )&nbsp;&nbsp;<tt> [virtual slot]</tt></h3>
 
616
<p>If <i>select</i> is true, all the items get selected; otherwise all the items get unselected. This only works in the selection modes <tt>Multi</tt> and <tt>Extended</tt>. In <tt>Single</tt> and <tt>NoSelection</tt> mode the selection of the current item is just set to <i>select</i>.</p>
 
617
<h3 class="fn"><a name="selectedItem"></a><a href="q3listviewitem.html">Q3ListViewItem</a> * Q3ListView::selectedItem () const</h3>
 
618
<p>Returns the selected item if the list view is in <tt>Single</tt> selection mode and an item is selected.</p>
 
619
<p>If no items are selected or the list view is not in <tt>Single</tt> selection mode this function returns 0.</p>
 
620
<p>See also <a href="q3listview.html#setSelected">setSelected</a>() and <a href="q3listview.html#multiSelection-prop">setMultiSelection</a>().</p>
 
621
<h3 class="fn"><a name="selectionChanged"></a>void Q3ListView::selectionChanged ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
622
<p>This signal is emitted whenever the set of selected items has changed (normally before the screen update). It is available both in <tt>Single</tt> selection and <tt>Multi</tt> selection mode but is most useful in <tt>Multi</tt> selection mode.</p>
 
623
<p><b>Warning:</b> Do not delete any <a href="q3listviewitem.html">Q3ListViewItem</a> objects in slots connected to this signal.</p>
 
624
<p>See also <a href="q3listview.html#setSelected">setSelected</a>() and <a href="q3listviewitem.html#setSelected">Q3ListViewItem::setSelected</a>().</p>
 
625
<h3 class="fn"><a name="selectionChanged-2"></a>void Q3ListView::selectionChanged ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
626
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
627
<p>This signal is emitted whenever the selected item has changed in <tt>Single</tt> selection mode (normally after the screen update). The argument is the newly selected <i>item</i>.</p>
 
628
<p>In <tt>Multi</tt> selection mode, use the no argument overload of this signal.</p>
 
629
<p><b>Warning:</b> Do not delete any <a href="q3listviewitem.html">Q3ListViewItem</a> objects in slots connected to this signal.</p>
 
630
<p>See also <a href="q3listview.html#setSelected">setSelected</a>(), <a href="q3listviewitem.html#setSelected">Q3ListViewItem::setSelected</a>(), and <a href="q3listview.html#currentChanged">currentChanged</a>().</p>
 
631
<h3 class="fn"><a name="setColumnAlignment"></a>void Q3ListView::setColumnAlignment ( int <i>column</i>, int <i>align</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
632
<p>Sets column <i>column</i>'s alignment to <i>align</i>. The alignment is ultimately passed to <a href="q3listviewitem.html#paintCell">Q3ListViewItem::paintCell</a>() for each item in the list view. For horizontally aligned text with <a href="qt.html#AlignmentFlag-enum">Qt::AlignLeft</a> or <a href="qt.html#AlignmentFlag-enum">Qt::AlignHCenter</a> the ellipsis (...) will be to the right, for <a href="qt.html#AlignmentFlag-enum">Qt::AlignRight</a> the ellipsis will be to the left.</p>
 
633
<p>See also <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a>.</p>
 
634
<h3 class="fn"><a name="setColumnText"></a>void Q3ListView::setColumnText ( int <i>column</i>, const <a href="qstring.html">QString</a> &amp; <i>label</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
635
<p>Sets the heading of column <i>column</i> to <i>label</i>.</p>
 
636
<p>See also <a href="q3listview.html#columnText">columnText</a>().</p>
 
637
<h3 class="fn"><a name="setColumnText-2"></a>void Q3ListView::setColumnText ( int <i>column</i>, const <a href="qicon.html">QIcon</a> &amp; <i>icon</i>, const <a href="qstring.html">QString</a> &amp; <i>label</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
638
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
639
<p>Sets the heading of column <i>column</i> to <i>icon</i> and <i>label</i>.</p>
 
640
<p>See also <a href="q3listview.html#columnText">columnText</a>().</p>
 
641
<h3 class="fn"><a name="setColumnWidth"></a>void Q3ListView::setColumnWidth ( int <i>column</i>, int <i>w</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
642
<p>Sets the width of column <i>column</i> to <i>w</i> pixels. Note that if the column has a <tt>WidthMode</tt> other than <tt>Manual</tt>, this width setting may be subsequently overridden.</p>
 
643
<p>See also <a href="q3listview.html#columnWidth">columnWidth</a>().</p>
 
644
<h3 class="fn"><a name="setColumnWidthMode"></a>void Q3ListView::setColumnWidthMode ( int <i>c</i>, <a href="q3listview.html#WidthMode-enum">WidthMode</a> <i>mode</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
645
<p>Sets column <i>c</i>'s width mode to <i>mode</i>. The default depends on the original width argument to <a href="q3listview.html#addColumn">addColumn</a>().</p>
 
646
<p>See also <a href="q3listviewitem.html#width">Q3ListViewItem::width</a>().</p>
 
647
<h3 class="fn"><a name="setCurrentItem"></a>void Q3ListView::setCurrentItem ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>i</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
648
<p>Sets item <i>i</i> to be the current item and repaints appropriately (i.e. highlights the item). The current item is used for keyboard navigation and focus indication; it is independent of any selected items, although a selected item can also be the current item.</p>
 
649
<p>See also <a href="q3listview.html#currentItem">currentItem</a>() and <a href="q3listview.html#setSelected">setSelected</a>().</p>
 
650
<h3 class="fn"><a name="setOpen"></a>void Q3ListView::setOpen ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, bool <i>open</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
651
<p>Sets <i>item</i> to be open if <i>open</i> is true and <i>item</i> is expandable, and to be closed if <i>open</i> is false. Repaints accordingly.</p>
 
652
<p>See also <a href="q3listviewitem.html#setOpen">Q3ListViewItem::setOpen</a>() and <a href="q3listviewitem.html#setExpandable">Q3ListViewItem::setExpandable</a>().</p>
 
653
<h3 class="fn"><a name="setSelected"></a>void Q3ListView::setSelected ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i>, bool <i>selected</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
654
<p>If <i>selected</i> is true the <i>item</i> is selected; otherwise it is unselected.</p>
 
655
<p>If the list view is in <tt>Single</tt> selection mode and <i>selected</i> is true, the currently selected item is unselected and <i>item</i> is made current. Unlike <a href="q3listviewitem.html#setSelected">Q3ListViewItem::setSelected</a>(), this function updates the list view as necessary and emits the <a href="q3listview.html#selectionChanged">selectionChanged</a>() signals.</p>
 
656
<p><a href="q3listview.html#setCurrentItem">setCurrentItem</a>(), <a href="q3listview.html#setSelectionAnchor">setSelectionAnchor</a>()</p>
 
657
<p>See also <a href="q3listview.html#isSelected">isSelected</a>(), <a href="q3listview.html#multiSelection-prop">setMultiSelection</a>(), and <a href="q3listview.html#multiSelection-prop">isMultiSelection</a>().</p>
 
658
<h3 class="fn"><a name="setSelectionAnchor"></a>void Q3ListView::setSelectionAnchor ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )</h3>
 
659
<p>Sets the selection anchor to <i>item</i>, if <i>item</i> is selectable.</p>
 
660
<p>The selection anchor is the item that remains selected when Shift-selecting with either mouse or keyboard in <tt>Extended</tt> selection mode.</p>
 
661
<p>See also <a href="q3listview.html#setSelected">setSelected</a>().</p>
 
662
<h3 class="fn"><a name="setSortColumn"></a>void Q3ListView::setSortColumn ( int <i>column</i> )</h3>
 
663
<p>Sets the sorting column for the list view.</p>
 
664
<p>If <i>column</i> is -1, sorting is disabled and the user cannot sort columns by clicking on the column headers. If <i>column</i> is larger than the number of columns the user must click on a column header to sort the list view.</p>
 
665
<p>See also <a href="q3listview.html#setSorting">setSorting</a>().</p>
 
666
<h3 class="fn"><a name="setSortOrder"></a>void Q3ListView::setSortOrder ( <a href="qt.html#SortOrder-enum">Qt::SortOrder</a> <i>order</i> )</h3>
 
667
<p>Sets the sort order for the items in the list view to <i>order</i>.</p>
 
668
<p>See also <a href="q3listview.html#setSorting">setSorting</a>().</p>
 
669
<h3 class="fn"><a name="setSorting"></a>void Q3ListView::setSorting ( int <i>column</i>, bool <i>ascending</i> = true )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
670
<p>Sets the list view to be sorted by column <i>column</i> in ascending order if <i>ascending</i> is true or descending order if it is false.</p>
 
671
<p>If <i>column</i> is -1, sorting is disabled and the user cannot sort columns by clicking on the column headers. If <i>column</i> is larger than the number of columns the user must click on a column header to sort the list view.</p>
 
672
<h3 class="fn"><a name="sort"></a>void Q3ListView::sort ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
673
<p>Sorts the list view using the last sorting configuration (sort column and ascending/descending).</p>
 
674
<h3 class="fn"><a name="sortColumn"></a>int Q3ListView::sortColumn () const</h3>
 
675
<p>Returns the column by which the list view is sorted, or -1 if sorting is disabled.</p>
 
676
<p>See also <a href="q3listview.html#sortOrder">sortOrder</a>().</p>
 
677
<h3 class="fn"><a name="sortOrder"></a><a href="qt.html#SortOrder-enum">Qt::SortOrder</a> Q3ListView::sortOrder () const</h3>
 
678
<p>Returns the sorting order of the list view items.</p>
 
679
<p>See also <a href="q3listview.html#sortColumn">sortColumn</a>().</p>
 
680
<h3 class="fn"><a name="spacePressed"></a>void Q3ListView::spacePressed ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
681
<p>This signal is emitted when Space is pressed. The <i>item</i> parameter is the <a href="q3listview.html#currentItem">currentItem</a>().</p>
 
682
<h3 class="fn"><a name="startDrag"></a>void Q3ListView::startDrag ()&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
683
<p>Starts a drag.</p>
 
684
<h3 class="fn"><a name="takeItem"></a>void Q3ListView::takeItem ( <a href="q3listviewitem.html">Q3ListViewItem</a> * <i>i</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
685
<p>Removes item <i>i</i> from the list view; <i>i</i> must be a top-level item. The warnings regarding <a href="q3listviewitem.html#takeItem">Q3ListViewItem::takeItem</a>() apply to this function, too.</p>
 
686
<p>See also <a href="q3listview.html#insertItem">insertItem</a>().</p>
 
687
<h3 class="fn"><a name="triggerUpdate"></a>void Q3ListView::triggerUpdate ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
688
<p>Triggers a size, geometry and content update during the next iteration of the event loop. Ensures that there'll be just one update to avoid flicker.</p>
 
689
<h3 class="fn"><a name="updateContents"></a>void Q3ListView::updateContents ()&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
 
690
<p>Updates the sizes of the viewport, header, scroll bars and so on.</p>
 
691
<p><b>Warning:</b> Don't call this directly; call <a href="q3listview.html#triggerUpdate">triggerUpdate</a>() instead.</p>
 
692
<p /><address><hr /><div align="center">
 
693
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
694
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
695
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
696
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
697
</tr></table></div></address></body>
 
698
</html>