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

« back to all changes in this revision

Viewing changes to doc/html/qheaderview.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/qheaderview.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QHeaderView 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">QHeaderView Class Reference</h1>
 
21
<p>The QHeaderView class provides a header row or header column for item views. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QHeaderView&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qabstractitemview.html">QAbstractItemView</a>.</p>
 
24
<ul>
 
25
<li><a href="qheaderview-members.html">List of all members, including inherited members</a></li>
 
26
</ul>
 
27
<a name="public-types"></a>
 
28
<h3>Public Types</h3>
 
29
<ul>
 
30
<li><div class="fn"/>enum <b><a href="qheaderview.html#ResizeMode-enum">ResizeMode</a></b> { Interactive, Stretch, Custom }</li>
 
31
</ul>
 
32
<a name="properties"></a>
 
33
<h3>Properties</h3>
 
34
<ul>
 
35
<li><div class="fn"/><b><a href="qheaderview.html#highlightSections-prop">highlightSections</a></b> : bool</li>
 
36
<li><div class="fn"/><b><a href="qheaderview.html#showSortIndicator-prop">showSortIndicator</a></b> : bool</li>
 
37
<li><div class="fn"/><b><a href="qheaderview.html#stretchLastSection-prop">stretchLastSection</a></b> : bool</li>
 
38
</ul>
 
39
<ul>
 
40
<li><div class="fn"/>10 properties inherited from <a href="qabstractitemview.html#properties">QAbstractItemView</a></li>
 
41
<li><div class="fn"/>2 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li>
 
42
<li><div class="fn"/>6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
 
43
<li><div class="fn"/>52 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
44
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
45
</ul>
 
46
<a name="public-functions"></a>
 
47
<h3>Public Functions</h3>
 
48
<ul>
 
49
<li><div class="fn"/><b><a href="qheaderview.html#QHeaderView">QHeaderView</a></b> ( Qt::Orientation <i>orientation</i>, QWidget * <i>parent</i> = 0 )</li>
 
50
<li><div class="fn"/>virtual <b><a href="qheaderview.html#dtor.QHeaderView">~QHeaderView</a></b> ()</li>
 
51
<li><div class="fn"/>int <b><a href="qheaderview.html#count">count</a></b> () const</li>
 
52
<li><div class="fn"/>void <b><a href="qheaderview.html#hideSection">hideSection</a></b> ( int <i>logicalIndex</i> )</li>
 
53
<li><div class="fn"/>bool <b><a href="qheaderview.html#highlightSections-prop">highlightSections</a></b> () const</li>
 
54
<li><div class="fn"/>bool <b><a href="qheaderview.html#isClickable">isClickable</a></b> () const</li>
 
55
<li><div class="fn"/>bool <b><a href="qheaderview.html#isMovable">isMovable</a></b> () const</li>
 
56
<li><div class="fn"/>bool <b><a href="qheaderview.html#isSectionHidden">isSectionHidden</a></b> ( int <i>logicalIndex</i> ) const</li>
 
57
<li><div class="fn"/>bool <b><a href="qheaderview.html#showSortIndicator-prop">isSortIndicatorShown</a></b> () const</li>
 
58
<li><div class="fn"/>int <b><a href="qheaderview.html#length">length</a></b> () const</li>
 
59
<li><div class="fn"/>int <b><a href="qheaderview.html#logicalIndex">logicalIndex</a></b> ( int <i>visualIndex</i> ) const</li>
 
60
<li><div class="fn"/>int <b><a href="qheaderview.html#logicalIndexAt">logicalIndexAt</a></b> ( int <i>position</i> ) const</li>
 
61
<li><div class="fn"/>int <b><a href="qheaderview.html#logicalIndexAt-2">logicalIndexAt</a></b> ( int <i>x</i>, int <i>y</i> ) const</li>
 
62
<li><div class="fn"/>int <b><a href="qheaderview.html#logicalIndexAt-3">logicalIndexAt</a></b> ( const QPoint &amp; <i>pos</i> ) const</li>
 
63
<li><div class="fn"/>void <b><a href="qheaderview.html#moveSection">moveSection</a></b> ( int <i>from</i>, int <i>to</i> )</li>
 
64
<li><div class="fn"/>int <b><a href="qheaderview.html#offset">offset</a></b> () const</li>
 
65
<li><div class="fn"/>Qt::Orientation <b><a href="qheaderview.html#orientation">orientation</a></b> () const</li>
 
66
<li><div class="fn"/>ResizeMode <b><a href="qheaderview.html#resizeMode">resizeMode</a></b> ( int <i>logicalIndex</i> ) const</li>
 
67
<li><div class="fn"/>void <b><a href="qheaderview.html#resizeSection">resizeSection</a></b> ( int <i>logicalIndex</i>, int <i>size</i> )</li>
 
68
<li><div class="fn"/>int <b><a href="qheaderview.html#sectionPosition">sectionPosition</a></b> ( int <i>logicalIndex</i> ) const</li>
 
69
<li><div class="fn"/>int <b><a href="qheaderview.html#sectionSize">sectionSize</a></b> ( int <i>logicalIndex</i> ) const</li>
 
70
<li><div class="fn"/>int <b><a href="qheaderview.html#sectionSizeHint">sectionSizeHint</a></b> ( int <i>logicalIndex</i> ) const</li>
 
71
<li><div class="fn"/>int <b><a href="qheaderview.html#sectionViewportPosition">sectionViewportPosition</a></b> ( int <i>logicalIndex</i> ) const</li>
 
72
<li><div class="fn"/>bool <b><a href="qheaderview.html#sectionsMoved">sectionsMoved</a></b> () const</li>
 
73
<li><div class="fn"/>void <b><a href="qheaderview.html#setClickable">setClickable</a></b> ( bool <i>clickable</i> )</li>
 
74
<li><div class="fn"/>void <b><a href="qheaderview.html#highlightSections-prop">setHighlightSections</a></b> ( bool <i>highlight</i> )</li>
 
75
<li><div class="fn"/>void <b><a href="qheaderview.html#setMovable">setMovable</a></b> ( bool <i>movable</i> )</li>
 
76
<li><div class="fn"/>void <b><a href="qheaderview.html#setResizeMode">setResizeMode</a></b> ( ResizeMode <i>mode</i> )</li>
 
77
<li><div class="fn"/>void <b><a href="qheaderview.html#setResizeMode-2">setResizeMode</a></b> ( int <i>logicalIndex</i>, ResizeMode <i>mode</i> )</li>
 
78
<li><div class="fn"/>void <b><a href="qheaderview.html#setSectionHidden">setSectionHidden</a></b> ( int <i>logicalIndex</i>, bool <i>hide</i> )</li>
 
79
<li><div class="fn"/>void <b><a href="qheaderview.html#setSortIndicator">setSortIndicator</a></b> ( int <i>logicalIndex</i>, Qt::SortOrder <i>order</i> )</li>
 
80
<li><div class="fn"/>void <b><a href="qheaderview.html#showSortIndicator-prop">setSortIndicatorShown</a></b> ( bool <i>show</i> )</li>
 
81
<li><div class="fn"/>void <b><a href="qheaderview.html#stretchLastSection-prop">setStretchLastSection</a></b> ( bool <i>stretch</i> )</li>
 
82
<li><div class="fn"/>void <b><a href="qheaderview.html#showSection">showSection</a></b> ( int <i>logicalIndex</i> )</li>
 
83
<li><div class="fn"/>virtual QSize <b><a href="qheaderview.html#sizeHint">sizeHint</a></b> () const</li>
 
84
<li><div class="fn"/>Qt::SortOrder <b><a href="qheaderview.html#sortIndicatorOrder">sortIndicatorOrder</a></b> () const</li>
 
85
<li><div class="fn"/>int <b><a href="qheaderview.html#sortIndicatorSection">sortIndicatorSection</a></b> () const</li>
 
86
<li><div class="fn"/>bool <b><a href="qheaderview.html#stretchLastSection-prop">stretchLastSection</a></b> () const</li>
 
87
<li><div class="fn"/>int <b><a href="qheaderview.html#visualIndex">visualIndex</a></b> ( int <i>logicalIndex</i> ) const</li>
 
88
<li><div class="fn"/>int <b><a href="qheaderview.html#visualIndexAt">visualIndexAt</a></b> ( int <i>position</i> ) const</li>
 
89
</ul>
 
90
<ul>
 
91
<li><div class="fn"/>37 public functions inherited from <a href="qabstractitemview.html#public-functions">QAbstractItemView</a></li>
 
92
<li><div class="fn"/>8 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li>
 
93
<li><div class="fn"/>13 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
 
94
<li><div class="fn"/>183 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
95
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
96
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
97
</ul>
 
98
<a name="public-slots"></a>
 
99
<h3>Public Slots</h3>
 
100
<ul>
 
101
<li><div class="fn"/>void <b><a href="qheaderview.html#headerDataChanged">headerDataChanged</a></b> ( Qt::Orientation <i>orientation</i>, int <i>logicalFirst</i>, int <i>logicalLast</i> )</li>
 
102
<li><div class="fn"/>void <b><a href="qheaderview.html#setOffset">setOffset</a></b> ( int <i>offset</i> )</li>
 
103
</ul>
 
104
<ul>
 
105
<li><div class="fn"/>6 public slots inherited from <a href="qabstractitemview.html#public-slots">QAbstractItemView</a></li>
 
106
<li><div class="fn"/>17 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
 
107
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
108
</ul>
 
109
<a name="signals"></a>
 
110
<h3>Signals</h3>
 
111
<ul>
 
112
<li><div class="fn"/>void <b><a href="qheaderview.html#sectionAutoResize">sectionAutoResize</a></b> ( int <i>logicalIndex</i>, ResizeMode <i>mode</i> )</li>
 
113
<li><div class="fn"/>void <b><a href="qheaderview.html#sectionClicked">sectionClicked</a></b> ( int <i>logicalIndex</i> )</li>
 
114
<li><div class="fn"/>void <b><a href="qheaderview.html#sectionCountChanged">sectionCountChanged</a></b> ( int <i>oldCount</i>, int <i>newCount</i> )</li>
 
115
<li><div class="fn"/>void <b><a href="qheaderview.html#sectionDoubleClicked">sectionDoubleClicked</a></b> ( int <i>logicalIndex</i> )</li>
 
116
<li><div class="fn"/>void <b><a href="qheaderview.html#sectionHandleDoubleClicked">sectionHandleDoubleClicked</a></b> ( int <i>logicalIndex</i> )</li>
 
117
<li><div class="fn"/>void <b><a href="qheaderview.html#sectionMoved">sectionMoved</a></b> ( int <i>logicalIndex</i>, int <i>oldVisualIndex</i>, int <i>newVisualIndex</i> )</li>
 
118
<li><div class="fn"/>void <b><a href="qheaderview.html#sectionPressed">sectionPressed</a></b> ( int <i>logicalIndex</i> )</li>
 
119
<li><div class="fn"/>void <b><a href="qheaderview.html#sectionResized">sectionResized</a></b> ( int <i>logicalIndex</i>, int <i>oldSize</i>, int <i>newSize</i> )</li>
 
120
</ul>
 
121
<ul>
 
122
<li><div class="fn"/>6 signals inherited from <a href="qabstractitemview.html#signals">QAbstractItemView</a></li>
 
123
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
 
124
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
125
</ul>
 
126
<a name="protected-functions"></a>
 
127
<h3>Protected Functions</h3>
 
128
<ul>
 
129
<li><div class="fn"/>virtual int <b><a href="qheaderview.html#horizontalOffset">horizontalOffset</a></b> () const</li>
 
130
<li><div class="fn"/>virtual void <b><a href="qheaderview.html#paintSection">paintSection</a></b> ( QPainter * <i>painter</i>, const QRect &amp; <i>rect</i>, int <i>logicalIndex</i> ) const</li>
 
131
<li><div class="fn"/>virtual QSize <b><a href="qheaderview.html#sectionSizeFromContents">sectionSizeFromContents</a></b> ( int <i>logicalIndex</i> ) const</li>
 
132
<li><div class="fn"/>virtual int <b><a href="qheaderview.html#verticalOffset">verticalOffset</a></b> () const</li>
 
133
</ul>
 
134
<ul>
 
135
<li><div class="fn"/>35 protected functions inherited from <a href="qabstractitemview.html#protected-functions">QAbstractItemView</a></li>
 
136
<li><div class="fn"/>17 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li>
 
137
<li><div class="fn"/>39 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
138
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
139
</ul>
 
140
<a name="protected-slots"></a>
 
141
<h3>Protected Slots</h3>
 
142
<ul>
 
143
<li><div class="fn"/>void <b><a href="qheaderview.html#sectionsAboutToBeRemoved">sectionsAboutToBeRemoved</a></b> ( const QModelIndex &amp; <i>parent</i>, int <i>logicalFirst</i>, int <i>logicalLast</i> )</li>
 
144
<li><div class="fn"/>void <b><a href="qheaderview.html#sectionsInserted">sectionsInserted</a></b> ( const QModelIndex &amp; <i>parent</i>, int <i>logicalFirst</i>, int <i>logicalLast</i> )</li>
 
145
</ul>
 
146
<ul>
 
147
<li><div class="fn"/>8 protected slots inherited from <a href="qabstractitemview.html#protected-slots">QAbstractItemView</a></li>
 
148
</ul>
 
149
<h3>Additional Inherited Members</h3>
 
150
<ul>
 
151
<li><div class="fn"/>2 static public members inherited from <a href="qframe.html#static-public-members">QFrame</a></li>
 
152
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
 
153
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
154
</ul>
 
155
<a name="details"></a>
 
156
<hr />
 
157
<h2>Detailed Description</h2>
 
158
<p>The QHeaderView class provides a header row or header column for item views.</p>
 
159
<p>A QHeaderView displays the headers used in item views such as the <a href="qtableview.html">QTableView</a> and <a href="qtreeview.html">QTreeView</a> classes. It takes the place of the <tt>QHeader</tt> class previously used for the same purpose, but uses the Qt's model/view architecture for consistency with the item view classes.</p>
 
160
<p>The QHeaderView 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>
 
161
<p>Each header has an <a href="qheaderview.html#orientation">orientation</a>() and a number of sections, given by the <a href="qheaderview.html#count">count</a>() function. Sections can be moved and resized using <a href="qheaderview.html#moveSection">moveSection</a>() and <a href="qheaderview.html#resizeSection">resizeSection</a>(); they can be hidden and shown with <a href="qheaderview.html#hideSection">hideSection</a>() and <a href="qheaderview.html#showSection">showSection</a>().</p>
 
162
<p>Each section of a header is described by a section ID, specified by its section(), and can be located at a particular <a href="qheaderview.html#visualIndex">visualIndex</a>() in the header. A section can have a sort indicator set with <a href="qheaderview.html#setSortIndicator">setSortIndicator</a>(); this indicates whether the items in the associated item view will be sorted in the order given by the section.</p>
 
163
<p>A header can be fixed in place, or made movable with <a href="qheaderview.html#setMovable">setMovable</a>(). It can be made clickable with <a href="qheaderview.html#setClickable">setClickable</a>(), and has resizing behavior in accordance with <a href="qheaderview.html#setResizeMode">setResizeMode</a>().</p>
 
164
<p>A header emits <a href="qheaderview.html#sectionMoved">sectionMoved</a>() if the user moves a section, <a href="qheaderview.html#sectionResized">sectionResized</a>() if the user resizes a section, and <a href="qheaderview.html#sectionClicked">sectionClicked</a>() and <a href="qheaderview.html#sectionHandleDoubleClicked">sectionHandleDoubleClicked</a>() in response to mouse clicks. A header also emits <a href="qheaderview.html#sectionCountChanged">sectionCountChanged</a>() and <a href="qheaderview.html#sectionAutoResize">sectionAutoResize</a>().</p>
 
165
<p>You can identify a section using the section() and sectionAt() functions, or by its index position, using the <a href="qheaderview.html#visualIndex">visualIndex</a>() and <a href="qheaderview.html#visualIndexAt">visualIndexAt</a>() functions. Note that the visual index can change if a section is moved.</p>
 
166
<p>For a horizontal header the section is equivalent to a column in the model, and for a vertical header the section is equivalent to a row in the model.</p>
 
167
<p>See also <a href="model-view-programming.html">Model/View Programming</a>, <a href="qlistview.html">QListView</a>, <a href="qtableview.html">QTableView</a>, and <a href="qtreeview.html">QTreeView</a>.</p>
 
168
<hr />
 
169
<h2>Member Type Documentation</h2>
 
170
<h3 class="fn"><a name="ResizeMode-enum"></a>enum QHeaderView::ResizeMode</h3>
 
171
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
172
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
173
<tr><td valign="top"><tt>QHeaderView::Interactive</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">Don't automatically change the size (let the user do it manually).</td></tr>
 
174
<tr><td valign="top"><tt>QHeaderView::Stretch</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">Fill all the available visible space.</td></tr>
 
175
<tr><td valign="top"><tt>QHeaderView::Custom</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Don't automatically change the size here, leave it to some other object.</td></tr>
 
176
</table>
 
177
<hr />
 
178
<h2>Property Documentation</h2>
 
179
<h3 class="fn"><a name="highlightSections-prop"></a>highlightSections : bool</h3>
 
180
<p>This property holds whether the sections containing selected items are highlighted.</p>
 
181
<p>Access functions:</p>
 
182
<ul>
 
183
<li><div class="fn"/><b>bool highlightSections () const</b></li>
 
184
<li><div class="fn"/><b>void setHighlightSections ( bool <i>highlight</i> )</b></li>
 
185
</ul>
 
186
<h3 class="fn"><a name="showSortIndicator-prop"></a>showSortIndicator : bool</h3>
 
187
<p>This property holds whether the sort indicator is shown.</p>
 
188
<p>Access functions:</p>
 
189
<ul>
 
190
<li><div class="fn"/><b>bool isSortIndicatorShown () const</b></li>
 
191
<li><div class="fn"/><b>void setSortIndicatorShown ( bool <i>show</i> )</b></li>
 
192
</ul>
 
193
<h3 class="fn"><a name="stretchLastSection-prop"></a>stretchLastSection : bool</h3>
 
194
<p>This property holds whether the last section in the header takes up all the available space.</p>
 
195
<p>Access functions:</p>
 
196
<ul>
 
197
<li><div class="fn"/><b>bool stretchLastSection () const</b></li>
 
198
<li><div class="fn"/><b>void setStretchLastSection ( bool <i>stretch</i> )</b></li>
 
199
</ul>
 
200
<hr />
 
201
<h2>Member Function Documentation</h2>
 
202
<h3 class="fn"><a name="QHeaderView"></a>QHeaderView::QHeaderView ( <a href="qt.html#Orientation-enum">Qt::Orientation</a> <i>orientation</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
 
203
<p>Creates a new generic header with the given <i>orientation</i> and <i>parent</i>.</p>
 
204
<h3 class="fn"><a name="dtor.QHeaderView"></a>QHeaderView::~QHeaderView ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
205
<p>Destroys the header.</p>
 
206
<h3 class="fn"><a name="count"></a>int QHeaderView::count () const</h3>
 
207
<p>Returns the number of sections in the header.</p>
 
208
<h3 class="fn"><a name="headerDataChanged"></a>void QHeaderView::headerDataChanged ( <a href="qt.html#Orientation-enum">Qt::Orientation</a> <i>orientation</i>, int <i>logicalFirst</i>, int <i>logicalLast</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
209
<p>Updates the changed header sections with the given <i>orientation</i>, from <i>logicalFirst</i> to <i>logicalLast</i> inclusive.</p>
 
210
<h3 class="fn"><a name="hideSection"></a>void QHeaderView::hideSection ( int <i>logicalIndex</i> )</h3>
 
211
<p>Hides the section specified by <i>logicalIndex</i>.</p>
 
212
<p>See also <a href="qheaderview.html#showSection">showSection</a>().</p>
 
213
<h3 class="fn"><a name="horizontalOffset"></a>int QHeaderView::horizontalOffset () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
214
<p>Returns the horizontal offset of the header. This is 0 for vertical headers.</p>
 
215
<p>Reimplemented from <a href="qabstractitemview.html#horizontalOffset">QAbstractItemView</a>.</p>
 
216
<p>See also <a href="qheaderview.html#offset">offset</a>().</p>
 
217
<h3 class="fn"><a name="isClickable"></a>bool QHeaderView::isClickable () const</h3>
 
218
<p>Returns true if the header is clickable; otherwise returns false. A clickable header could be set up to allow the user to change the representation of the data in the view related to the header.</p>
 
219
<p>See also <a href="qheaderview.html#setClickable">setClickable</a>().</p>
 
220
<h3 class="fn"><a name="isMovable"></a>bool QHeaderView::isMovable () const</h3>
 
221
<p>Returns true if the header can be moved by the user; otherwise returns false.</p>
 
222
<p>See also <a href="qheaderview.html#setMovable">setMovable</a>().</p>
 
223
<h3 class="fn"><a name="isSectionHidden"></a>bool QHeaderView::isSectionHidden ( int <i>logicalIndex</i> ) const</h3>
 
224
<p>Returns true if the section specified by <i>logicalIndex</i> is explicitly hidden from the user; otherwise returns false.</p>
 
225
<h3 class="fn"><a name="length"></a>int QHeaderView::length () const</h3>
 
226
<p>Returns the length along the orientation of the header.</p>
 
227
<p>See also <a href="qheaderview.html#sizeHint">sizeHint</a>().</p>
 
228
<h3 class="fn"><a name="logicalIndex"></a>int QHeaderView::logicalIndex ( int <i>visualIndex</i> ) const</h3>
 
229
<p>Returns the logicalIndex for the section at the given <i>visualIndex</i> position, or -1 otherwise.</p>
 
230
<p>See also <a href="qheaderview.html#visualIndex">visualIndex</a>() and <a href="qheaderview.html#sectionPosition">sectionPosition</a>().</p>
 
231
<h3 class="fn"><a name="logicalIndexAt"></a>int QHeaderView::logicalIndexAt ( int <i>position</i> ) const</h3>
 
232
<p>Returns the section that covers the given <i>position</i> in the viewport.</p>
 
233
<h3 class="fn"><a name="logicalIndexAt-2"></a>int QHeaderView::logicalIndexAt ( int <i>x</i>, int <i>y</i> ) const</h3>
 
234
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
235
<p>Returns the logical index of the section at the given coordinate. If the header is horizontal <i>x</i> will be used, otherwise <i>y</i> will be used to find the logical index.</p>
 
236
<h3 class="fn"><a name="logicalIndexAt-3"></a>int QHeaderView::logicalIndexAt ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
 
237
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
238
<p>Returns the logical index of the section at the position given in <i>pos</i>. If the header is horizontal the x-coordinate will be used to find the logical index; otherwise the y-coordinate will be used.</p>
 
239
<h3 class="fn"><a name="moveSection"></a>void QHeaderView::moveSection ( int <i>from</i>, int <i>to</i> )</h3>
 
240
<p>Moves the section at visual index <i>from</i> to occupy visual index <i>to</i>.</p>
 
241
<h3 class="fn"><a name="offset"></a>int QHeaderView::offset () const</h3>
 
242
<p>Returns the offset of the header: this is the header's left-most (or top-most for vertical headers) visible pixel.</p>
 
243
<p>See also <a href="qheaderview.html#setOffset">setOffset</a>().</p>
 
244
<h3 class="fn"><a name="orientation"></a><a href="qt.html#Orientation-enum">Qt::Orientation</a> QHeaderView::orientation () const</h3>
 
245
<p>Returns the orientation of the header.</p>
 
246
<p>See also <a href="qt.html#Orientation-enum">Qt::Orientation</a>.</p>
 
247
<h3 class="fn"><a name="paintSection"></a>void QHeaderView::paintSection ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qrect.html">QRect</a> &amp; <i>rect</i>, int <i>logicalIndex</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
248
<p>Paints the section specified by the given <i>logicalIndex</i>, using the given <i>painter</i> and <i>rect</i>.</p>
 
249
<p>You normally would not need to use this function.</p>
 
250
<h3 class="fn"><a name="resizeMode"></a><a href="qheaderview.html#ResizeMode-enum">ResizeMode</a> QHeaderView::resizeMode ( int <i>logicalIndex</i> ) const</h3>
 
251
<p>Returns the resize mode that applies to the section specified by the given <i>logicalIndex</i>.</p>
 
252
<h3 class="fn"><a name="resizeSection"></a>void QHeaderView::resizeSection ( int <i>logicalIndex</i>, int <i>size</i> )</h3>
 
253
<p>Resizes the given <i>logicalIndex</i> to the given <i>size</i>.</p>
 
254
<h3 class="fn"><a name="sectionAutoResize"></a>void QHeaderView::sectionAutoResize ( int <i>logicalIndex</i>, <a href="qheaderview.html#ResizeMode-enum">ResizeMode</a> <i>mode</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
255
<p>This signal is emitted when a section is automatically resized. The section's logical index is specified by <i>logicalIndex</i>, and the resize mode by <i>mode</i>.</p>
 
256
<h3 class="fn"><a name="sectionClicked"></a>void QHeaderView::sectionClicked ( int <i>logicalIndex</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
257
<p>This signal is emitted when a section is clicked. The section's logical index is specified by <i>logicalIndex</i>.</p>
 
258
<h3 class="fn"><a name="sectionCountChanged"></a>void QHeaderView::sectionCountChanged ( int <i>oldCount</i>, int <i>newCount</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
259
<p>This signal is emitted when the number of sections changes; i.e. when sections are added or deleted. The original count is specified by <i>oldCount</i>, and the new count by <i>newCount</i>.</p>
 
260
<h3 class="fn"><a name="sectionDoubleClicked"></a>void QHeaderView::sectionDoubleClicked ( int <i>logicalIndex</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
261
<p>This signal is emitted when a section is double-clicked. The section's logical index is specified by <i>logicalIndex</i>.</p>
 
262
<h3 class="fn"><a name="sectionHandleDoubleClicked"></a>void QHeaderView::sectionHandleDoubleClicked ( int <i>logicalIndex</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
263
<p>This signal is emitted when a section is double-clicked. The section's logical index is specified by <i>logicalIndex</i>.</p>
 
264
<h3 class="fn"><a name="sectionMoved"></a>void QHeaderView::sectionMoved ( int <i>logicalIndex</i>, int <i>oldVisualIndex</i>, int <i>newVisualIndex</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
265
<p>This signal is emitted when a section is moved. The section's logical index is specified by <i>logicalIndex</i>, the old index by <i>oldVisualIndex</i>, and the new index position by <i>newVisualIndex</i>.</p>
 
266
<h3 class="fn"><a name="sectionPosition"></a>int QHeaderView::sectionPosition ( int <i>logicalIndex</i> ) const</h3>
 
267
<p>Returns the section position of the given <i>logicalIndex</i>.</p>
 
268
<p>See also <a href="qheaderview.html#sectionViewportPosition">sectionViewportPosition</a>().</p>
 
269
<h3 class="fn"><a name="sectionPressed"></a>void QHeaderView::sectionPressed ( int <i>logicalIndex</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
270
<p>This signal is emitted when a section is pressed. The section's logical index is specified by <i>logicalIndex</i>.</p>
 
271
<h3 class="fn"><a name="sectionResized"></a>void QHeaderView::sectionResized ( int <i>logicalIndex</i>, int <i>oldSize</i>, int <i>newSize</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
272
<p>This signal is emitted when a section is resized. The section's logical number is specified by <i>logicalIndex</i>, the old size by <i>oldSize</i>, and the new size by <i>newSize</i>.</p>
 
273
<h3 class="fn"><a name="sectionSize"></a>int QHeaderView::sectionSize ( int <i>logicalIndex</i> ) const</h3>
 
274
<p>Returns the width (or height for vertical headers) of the given <i>logicalIndex</i>.</p>
 
275
<h3 class="fn"><a name="sectionSizeFromContents"></a><a href="qsize.html">QSize</a> QHeaderView::sectionSizeFromContents ( int <i>logicalIndex</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
276
<p>Returns the size of the contents of the section specified by the give <i>logicalIndex</i>.</p>
 
277
<h3 class="fn"><a name="sectionSizeHint"></a>int QHeaderView::sectionSizeHint ( int <i>logicalIndex</i> ) const</h3>
 
278
<p>Returns a suitable size hint for the section specified by <i>logicalIndex</i>.</p>
 
279
<p>See also <a href="qheaderview.html#sizeHint">sizeHint</a>().</p>
 
280
<h3 class="fn"><a name="sectionViewportPosition"></a>int QHeaderView::sectionViewportPosition ( int <i>logicalIndex</i> ) const</h3>
 
281
<p>Returns the section viewport position of the given <i>logicalIndex</i>.</p>
 
282
<p>See also <a href="qheaderview.html#sectionPosition">sectionPosition</a>().</p>
 
283
<h3 class="fn"><a name="sectionsAboutToBeRemoved"></a>void QHeaderView::sectionsAboutToBeRemoved ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i>, int <i>logicalFirst</i>, int <i>logicalLast</i> )&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
 
284
<p>This slot is called when sections are removed from the <i>parent</i>, <i>logicalFirst</i> and <i>logicalLast</i> signify where the sections are removed from. (<i>logicalFirst</i> and <i>logicalLast</i> will be the same if just one section is removed.)</p>
 
285
<h3 class="fn"><a name="sectionsInserted"></a>void QHeaderView::sectionsInserted ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i>, int <i>logicalFirst</i>, int <i>logicalLast</i> )&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
 
286
<p>This slot is called when sections are inserted into the <i>parent</i>, <i>logicalFirst</i> and <i>logicalLast</i> indexes signify where the new sections are inserted.</p>
 
287
<p><i>logicalFirst</i> and <i>logicalLast</i> will be the same if just one section is inserted.</p>
 
288
<h3 class="fn"><a name="sectionsMoved"></a>bool QHeaderView::sectionsMoved () const</h3>
 
289
<p>Returns true if sections in the header has been moved; otherwise returns false;</p>
 
290
<h3 class="fn"><a name="setClickable"></a>void QHeaderView::setClickable ( bool <i>clickable</i> )</h3>
 
291
<p>If <i>clickable</i> is true, the header will respond to single clicks.</p>
 
292
<p>See also <a href="qheaderview.html#isClickable">isClickable</a>().</p>
 
293
<h3 class="fn"><a name="setMovable"></a>void QHeaderView::setMovable ( bool <i>movable</i> )</h3>
 
294
<p>If <i>movable</i> is true, the header may be moved by the user; otherwise it is fixed in place.</p>
 
295
<p>See also <a href="qheaderview.html#isMovable">isMovable</a>().</p>
 
296
<h3 class="fn"><a name="setOffset"></a>void QHeaderView::setOffset ( int <i>offset</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
297
<p>Sets the header's offset to <i>offset</i>.</p>
 
298
<p>See also <a href="qheaderview.html#offset">offset</a>().</p>
 
299
<h3 class="fn"><a name="setResizeMode"></a>void QHeaderView::setResizeMode ( <a href="qheaderview.html#ResizeMode-enum">ResizeMode</a> <i>mode</i> )</h3>
 
300
<p>Sets the constraints on how the header can be resized to those described by the given <i>mode</i>.</p>
 
301
<h3 class="fn"><a name="setResizeMode-2"></a>void QHeaderView::setResizeMode ( int <i>logicalIndex</i>, <a href="qheaderview.html#ResizeMode-enum">ResizeMode</a> <i>mode</i> )</h3>
 
302
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
303
<p>Sets the constraints on how the section specified by <i>logicalIndex</i> in the header can be resized to those described by the given <i>mode</i>.</p>
 
304
<h3 class="fn"><a name="setSectionHidden"></a>void QHeaderView::setSectionHidden ( int <i>logicalIndex</i>, bool <i>hide</i> )</h3>
 
305
<p>If <i>hide</i> is true the section specified by <i>logicalIndex</i> is hidden, otherwise the section is shown.</p>
 
306
<h3 class="fn"><a name="setSortIndicator"></a>void QHeaderView::setSortIndicator ( int <i>logicalIndex</i>, <a href="qt.html#SortOrder-enum">Qt::SortOrder</a> <i>order</i> )</h3>
 
307
<p>Sets the sort indicator for the section specified by the given <i>logicalIndex</i> in the direction specified by <i>order</i>, and removes the sort indicator from any other section that was showing it.</p>
 
308
<p>See also <a href="qheaderview.html#sortIndicatorSection">sortIndicatorSection</a>() and <a href="qheaderview.html#sortIndicatorOrder">sortIndicatorOrder</a>().</p>
 
309
<h3 class="fn"><a name="showSection"></a>void QHeaderView::showSection ( int <i>logicalIndex</i> )</h3>
 
310
<p>Shows the section specified by <i>logicalIndex</i>.</p>
 
311
<p>See also <a href="qheaderview.html#hideSection">hideSection</a>().</p>
 
312
<h3 class="fn"><a name="sizeHint"></a><a href="qsize.html">QSize</a> QHeaderView::sizeHint () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
313
<p>Returns a suitable size hint for this header.</p>
 
314
<p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget</a>.</p>
 
315
<p>See also <a href="qheaderview.html#sectionSizeHint">sectionSizeHint</a>().</p>
 
316
<h3 class="fn"><a name="sortIndicatorOrder"></a><a href="qt.html#SortOrder-enum">Qt::SortOrder</a> QHeaderView::sortIndicatorOrder () const</h3>
 
317
<p>Returns the order for the sort indicator. If no section has a sort indicator the return value of this function is undefined.</p>
 
318
<p>See also <a href="qheaderview.html#setSortIndicator">setSortIndicator</a>() and <a href="qheaderview.html#sortIndicatorSection">sortIndicatorSection</a>().</p>
 
319
<h3 class="fn"><a name="sortIndicatorSection"></a>int QHeaderView::sortIndicatorSection () const</h3>
 
320
<p>Returns the logical index of the section that has a sort indicator. By default this is section 0.</p>
 
321
<p>See also <a href="qheaderview.html#setSortIndicator">setSortIndicator</a>(), <a href="qheaderview.html#sortIndicatorOrder">sortIndicatorOrder</a>(), and <a href="qheaderview.html#showSortIndicator-prop">setSortIndicatorShown</a>().</p>
 
322
<h3 class="fn"><a name="verticalOffset"></a>int QHeaderView::verticalOffset () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
323
<p>Returns the vertical offset of the header. This is 0 for horizontal headers.</p>
 
324
<p>Reimplemented from <a href="qabstractitemview.html#verticalOffset">QAbstractItemView</a>.</p>
 
325
<p>See also <a href="qheaderview.html#offset">offset</a>().</p>
 
326
<h3 class="fn"><a name="visualIndex"></a>int QHeaderView::visualIndex ( int <i>logicalIndex</i> ) const</h3>
 
327
<p>Returns the visual index position of the section specified by the given <i>logicalIndex</i>, or -1 otherwise.</p>
 
328
<p>See also <a href="qheaderview.html#logicalIndex">logicalIndex</a>().</p>
 
329
<h3 class="fn"><a name="visualIndexAt"></a>int QHeaderView::visualIndexAt ( int <i>position</i> ) const</h3>
 
330
<p>Returns the visual index of the section that covers the given <i>position</i> in the viewport.</p>
 
331
<p /><address><hr /><div align="center">
 
332
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
333
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
334
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
335
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
336
</tr></table></div></address></body>
 
337
</html>