[190] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/widgets/qheader.cpp:135 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>QHeader Class</title>
|
---|
| 7 | <style type="text/css"><!--
|
---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
---|
| 11 | body { background: #ffffff; color: black; }
|
---|
| 12 | --></style>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 |
|
---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
| 17 | <tr bgcolor="#E5E5E5">
|
---|
| 18 | <td valign=center>
|
---|
| 19 | <a href="index.html">
|
---|
| 20 | <font color="#004faf">Home</font></a>
|
---|
| 21 | | <a href="classes.html">
|
---|
| 22 | <font color="#004faf">All Classes</font></a>
|
---|
| 23 | | <a href="mainclasses.html">
|
---|
| 24 | <font color="#004faf">Main Classes</font></a>
|
---|
| 25 | | <a href="annotated.html">
|
---|
| 26 | <font color="#004faf">Annotated</font></a>
|
---|
| 27 | | <a href="groups.html">
|
---|
| 28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
| 29 | | <a href="functions.html">
|
---|
| 30 | <font color="#004faf">Functions</font></a>
|
---|
| 31 | </td>
|
---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QHeader Class Reference</h1>
|
---|
| 33 |
|
---|
| 34 | <p>The QHeader class provides a header row or column, e.g. for
|
---|
| 35 | tables and listviews.
|
---|
| 36 | <a href="#details">More...</a>
|
---|
| 37 | <p><tt>#include <<a href="qheader-h.html">qheader.h</a>></tt>
|
---|
| 38 | <p>Inherits <a href="qwidget.html">QWidget</a>.
|
---|
| 39 | <p><a href="qheader-members.html">List of all member functions.</a>
|
---|
| 40 | <h2>Public Members</h2>
|
---|
| 41 | <ul>
|
---|
| 42 | <li class=fn><a href="#QHeader"><b>QHeader</b></a> ( QWidget * parent = 0, const char * name = 0 )</li>
|
---|
| 43 | <li class=fn><a href="#QHeader-2"><b>QHeader</b></a> ( int n, QWidget * parent = 0, const char * name = 0 )</li>
|
---|
| 44 | <li class=fn><a href="#~QHeader"><b>~QHeader</b></a> ()</li>
|
---|
| 45 | <li class=fn>int <a href="#addLabel"><b>addLabel</b></a> ( const QString & s, int size = -1 )</li>
|
---|
| 46 | <li class=fn>int <a href="#addLabel-2"><b>addLabel</b></a> ( const QIconSet & iconset, const QString & s, int size = -1 )</li>
|
---|
| 47 | <li class=fn>void <a href="#removeLabel"><b>removeLabel</b></a> ( int section )</li>
|
---|
| 48 | <li class=fn>virtual void <a href="#setLabel"><b>setLabel</b></a> ( int section, const QString & s, int size = -1 )</li>
|
---|
| 49 | <li class=fn>virtual void <a href="#setLabel-2"><b>setLabel</b></a> ( int section, const QIconSet & iconset, const QString & s, int size = -1 )</li>
|
---|
| 50 | <li class=fn>QString <a href="#label"><b>label</b></a> ( int section ) const</li>
|
---|
| 51 | <li class=fn>QIconSet * <a href="#iconSet"><b>iconSet</b></a> ( int section ) const</li>
|
---|
| 52 | <li class=fn>virtual void <a href="#setOrientation"><b>setOrientation</b></a> ( Orientation )</li>
|
---|
| 53 | <li class=fn>Orientation <a href="#orientation"><b>orientation</b></a> () const</li>
|
---|
| 54 | <li class=fn>virtual void <a href="#setTracking"><b>setTracking</b></a> ( bool enable )</li>
|
---|
| 55 | <li class=fn>bool <a href="#tracking"><b>tracking</b></a> () const</li>
|
---|
| 56 | <li class=fn>virtual void <a href="#setClickEnabled"><b>setClickEnabled</b></a> ( bool enable, int section = -1 )</li>
|
---|
| 57 | <li class=fn>virtual void <a href="#setResizeEnabled"><b>setResizeEnabled</b></a> ( bool enable, int section = -1 )</li>
|
---|
| 58 | <li class=fn>virtual void <a href="#setMovingEnabled"><b>setMovingEnabled</b></a> ( bool )</li>
|
---|
| 59 | <li class=fn>virtual void <a href="#setStretchEnabled"><b>setStretchEnabled</b></a> ( bool b, int section )</li>
|
---|
| 60 | <li class=fn>void <a href="#setStretchEnabled-2"><b>setStretchEnabled</b></a> ( bool b )</li>
|
---|
| 61 | <li class=fn>bool <a href="#isClickEnabled"><b>isClickEnabled</b></a> ( int section = -1 ) const</li>
|
---|
| 62 | <li class=fn>bool <a href="#isResizeEnabled"><b>isResizeEnabled</b></a> ( int section = -1 ) const</li>
|
---|
| 63 | <li class=fn>bool <a href="#isMovingEnabled"><b>isMovingEnabled</b></a> () const</li>
|
---|
| 64 | <li class=fn>bool <a href="#isStretchEnabled"><b>isStretchEnabled</b></a> () const</li>
|
---|
| 65 | <li class=fn>bool <a href="#isStretchEnabled-2"><b>isStretchEnabled</b></a> ( int section ) const</li>
|
---|
| 66 | <li class=fn>void <a href="#resizeSection"><b>resizeSection</b></a> ( int section, int s )</li>
|
---|
| 67 | <li class=fn>int <a href="#sectionSize"><b>sectionSize</b></a> ( int section ) const</li>
|
---|
| 68 | <li class=fn>int <a href="#sectionPos"><b>sectionPos</b></a> ( int section ) const</li>
|
---|
| 69 | <li class=fn>int <a href="#sectionAt"><b>sectionAt</b></a> ( int pos ) const</li>
|
---|
| 70 | <li class=fn>int <a href="#count"><b>count</b></a> () const</li>
|
---|
| 71 | <li class=fn>int <a href="#headerWidth"><b>headerWidth</b></a> () const</li>
|
---|
| 72 | <li class=fn>QRect <a href="#sectionRect"><b>sectionRect</b></a> ( int section ) const</li>
|
---|
| 73 | <li class=fn>virtual void setCellSize ( int section, int s ) <em>(obsolete)</em></li>
|
---|
| 74 | <li class=fn>int cellSize ( int i ) const <em>(obsolete)</em></li>
|
---|
| 75 | <li class=fn>int cellPos ( int i ) const <em>(obsolete)</em></li>
|
---|
| 76 | <li class=fn>int cellAt ( int pos ) const <em>(obsolete)</em></li>
|
---|
| 77 | <li class=fn>int <a href="#offset"><b>offset</b></a> () const</li>
|
---|
| 78 | <li class=fn>int <a href="#mapToSection"><b>mapToSection</b></a> ( int index ) const</li>
|
---|
| 79 | <li class=fn>int <a href="#mapToIndex"><b>mapToIndex</b></a> ( int section ) const</li>
|
---|
| 80 | <li class=fn>int mapToLogical ( int a ) const <em>(obsolete)</em></li>
|
---|
| 81 | <li class=fn>int mapToActual ( int l ) const <em>(obsolete)</em></li>
|
---|
| 82 | <li class=fn>void <a href="#moveSection"><b>moveSection</b></a> ( int section, int toIndex )</li>
|
---|
| 83 | <li class=fn>virtual void moveCell ( int fromIdx, int toIdx ) <em>(obsolete)</em></li>
|
---|
| 84 | <li class=fn>void setSortIndicator ( int section, bool ascending = TRUE ) <em>(obsolete)</em></li>
|
---|
| 85 | <li class=fn>void <a href="#setSortIndicator"><b>setSortIndicator</b></a> ( int section, SortOrder order )</li>
|
---|
| 86 | <li class=fn>int <a href="#sortIndicatorSection"><b>sortIndicatorSection</b></a> () const</li>
|
---|
| 87 | <li class=fn>SortOrder <a href="#sortIndicatorOrder"><b>sortIndicatorOrder</b></a> () const</li>
|
---|
| 88 | <li class=fn>void <a href="#adjustHeaderSize"><b>adjustHeaderSize</b></a> ()</li>
|
---|
| 89 | </ul>
|
---|
| 90 | <h2>Public Slots</h2>
|
---|
| 91 | <ul>
|
---|
| 92 | <li class=fn>virtual void <a href="#setOffset"><b>setOffset</b></a> ( int pos )</li>
|
---|
| 93 | </ul>
|
---|
| 94 | <h2>Signals</h2>
|
---|
| 95 | <ul>
|
---|
| 96 | <li class=fn>void <a href="#clicked"><b>clicked</b></a> ( int section )</li>
|
---|
| 97 | <li class=fn>void <a href="#pressed"><b>pressed</b></a> ( int section )</li>
|
---|
| 98 | <li class=fn>void <a href="#released"><b>released</b></a> ( int section )</li>
|
---|
| 99 | <li class=fn>void <a href="#sizeChange"><b>sizeChange</b></a> ( int section, int oldSize, int newSize )</li>
|
---|
| 100 | <li class=fn>void <a href="#indexChange"><b>indexChange</b></a> ( int section, int fromIndex, int toIndex )</li>
|
---|
| 101 | <li class=fn>void sectionClicked ( int index ) <em>(obsolete)</em></li>
|
---|
| 102 | <li class=fn>void moved ( int fromIndex, int toIndex ) <em>(obsolete)</em></li>
|
---|
| 103 | <li class=fn>void <a href="#sectionHandleDoubleClicked"><b>sectionHandleDoubleClicked</b></a> ( int section )</li>
|
---|
| 104 | </ul>
|
---|
| 105 | <h2>Properties</h2>
|
---|
| 106 | <ul>
|
---|
| 107 | <li class=fn>int <a href="#count-prop"><b>count</b></a> - the number of sections in the header <em>(read only)</em></li>
|
---|
| 108 | <li class=fn>bool <a href="#moving-prop"><b>moving</b></a> - whether the header sections can be moved</li>
|
---|
| 109 | <li class=fn>int <a href="#offset-prop"><b>offset</b></a> - the header's left-most (or top-most) visible pixel</li>
|
---|
| 110 | <li class=fn>Orientation <a href="#orientation-prop"><b>orientation</b></a> - the header's orientation</li>
|
---|
| 111 | <li class=fn>bool <a href="#stretching-prop"><b>stretching</b></a> - whether the header sections always take up the full width (or height) of the header</li>
|
---|
| 112 | <li class=fn>bool <a href="#tracking-prop"><b>tracking</b></a> - whether the sizeChange() signal is emitted continuously</li>
|
---|
| 113 | </ul>
|
---|
| 114 | <h2>Protected Members</h2>
|
---|
| 115 | <ul>
|
---|
| 116 | <li class=fn>QRect <a href="#sRect"><b>sRect</b></a> ( int index )</li>
|
---|
| 117 | <li class=fn>virtual void <a href="#paintSection"><b>paintSection</b></a> ( QPainter * p, int index, const QRect & fr )</li>
|
---|
| 118 | <li class=fn>virtual void <a href="#paintSectionLabel"><b>paintSectionLabel</b></a> ( QPainter * p, int index, const QRect & fr )</li>
|
---|
| 119 | </ul>
|
---|
| 120 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
| 121 |
|
---|
| 122 |
|
---|
| 123 | The QHeader class provides a header row or column, e.g. for
|
---|
| 124 | tables and listviews.
|
---|
| 125 | <p>
|
---|
| 126 | <p> This class provides a header, e.g. a vertical header to display
|
---|
| 127 | row labels, or a horizontal header to display column labels. It is
|
---|
| 128 | used by <a href="qtable.html">QTable</a> and <a href="qlistview.html">QListView</a> for example.
|
---|
| 129 | <p> A header is composed of one or more <em>sections</em>, each of which can
|
---|
| 130 | display a text label and an <a href="qiconset.html">iconset</a>. A sort
|
---|
| 131 | indicator (an arrow) can also be displayed using
|
---|
| 132 | <a href="#setSortIndicator">setSortIndicator</a>().
|
---|
| 133 | <p> Sections are added with <a href="#addLabel">addLabel</a>() and removed with <a href="#removeLabel">removeLabel</a>().
|
---|
| 134 | The label and iconset are set in addLabel() and can be changed
|
---|
| 135 | later with <a href="#setLabel">setLabel</a>(). Use <a href="#count">count</a>() to retrieve the number of
|
---|
| 136 | sections in the header.
|
---|
| 137 | <p> The orientation of the header is set with <a href="#setOrientation">setOrientation</a>(). If
|
---|
| 138 | <a href="#setStretchEnabled">setStretchEnabled</a>() is TRUE, the sections will expand to take up
|
---|
| 139 | the full width (height for vertical headers) of the header. The
|
---|
| 140 | user can resize the sections manually if <a href="#setResizeEnabled">setResizeEnabled</a>() is
|
---|
| 141 | TRUE. Call <a href="#adjustHeaderSize">adjustHeaderSize</a>() to have the sections resize to
|
---|
| 142 | occupy the full width (or height).
|
---|
| 143 | <p> A section can be moved with <a href="#moveSection">moveSection</a>(). If <a href="#setMovingEnabled">setMovingEnabled</a>()
|
---|
| 144 | is TRUE (the default)the user may drag a section from one position
|
---|
| 145 | to another. If a section is moved, the index positions at which
|
---|
| 146 | sections were added (with <a href="#addLabel">addLabel</a>()), may not be the same after the
|
---|
| 147 | move. You don't have to worry about this in practice because the
|
---|
| 148 | QHeader API works in terms of section numbers, so it doesn't matter
|
---|
| 149 | where a particular section has been moved to.
|
---|
| 150 | <p> If you want the current index position of a section call
|
---|
| 151 | <a href="#mapToIndex">mapToIndex</a>() giving it the section number. (This is the number
|
---|
| 152 | returned by the addLabel() call which created the section.) If you
|
---|
| 153 | want to get the section number of a section at a particular index
|
---|
| 154 | position call <a href="#mapToSection">mapToSection</a>() giving it the index number.
|
---|
| 155 | <p> Here's an example to clarify mapToSection() and mapToIndex():
|
---|
| 156 | <p> <center><table cellpadding="4" cellspacing="2" border="0">
|
---|
| 157 | <tr bgcolor="#a2c511"> <th valign="top" colspan="4" rowspan="1"> Index positions
|
---|
| 158 | <tr bgcolor="#f0f0f0"> <td valign="top">0 <td valign="top">1 <td valign="top">2 <td valign="top">3
|
---|
| 159 | <tr bgcolor="#a2c511"> <th valign="top" colspan="4" rowspan="1"> Original section ordering
|
---|
| 160 | <tr bgcolor="#d0d0d0"> <td valign="top">Sect 0 <td valign="top">Sect 1 <td valign="top">Sect 2 <td valign="top">Sect 3
|
---|
| 161 | <tr bgcolor="#a2c511"> <th valign="top" colspan="4" rowspan="1"> Ordering after the user moves a section
|
---|
| 162 | <tr bgcolor="#f0f0f0"> <td valign="top">Sect 0 <td valign="top">Sect 2 <td valign="top">Sect 3 <td valign="top">Sect 1
|
---|
| 163 | </table></center>
|
---|
| 164 | <p> <center><table cellpadding="4" cellspacing="2" border="0">
|
---|
| 165 | <tr bgcolor="#a2c511"> <th valign="top"><em>k</em> <th valign="top">mapToSection(<em>k</em>) <th valign="top">mapToIndex(<em>k</em>)
|
---|
| 166 | <tr bgcolor="#d0d0d0"> <td valign="top">0 <td valign="top">0 <td valign="top">0
|
---|
| 167 | <tr bgcolor="#f0f0f0"> <td valign="top">1 <td valign="top">2 <td valign="top">3
|
---|
| 168 | <tr bgcolor="#d0d0d0"> <td valign="top">2 <td valign="top">3 <td valign="top">1
|
---|
| 169 | <tr bgcolor="#f0f0f0"> <td valign="top">3 <td valign="top">1 <td valign="top">2
|
---|
| 170 | </table></center>
|
---|
| 171 | <p> In the example above, if we wanted to find out which section is at
|
---|
| 172 | index position 3 we'd call <a href="#mapToSection">mapToSection</a>(3) and get a section
|
---|
| 173 | number of 1 since section 1 was moved. Similarly, if we wanted to
|
---|
| 174 | know which index position section 2 occupied we'd call
|
---|
| 175 | <a href="#mapToIndex">mapToIndex</a>(2) and get an index of 1.
|
---|
| 176 | <p> QHeader provides the <a href="#clicked">clicked</a>(), <a href="#pressed">pressed</a>() and <a href="#released">released</a>() signals.
|
---|
| 177 | If the user changes the size of a section, the <a href="#sizeChange">sizeChange</a>() signal
|
---|
| 178 | is emitted. If you want to have a sizeChange() signal emitted
|
---|
| 179 | continuously whilst the user is resizing (rather than just after
|
---|
| 180 | the resizing is finished), use <a href="#setTracking">setTracking</a>(). If the user moves a
|
---|
| 181 | section the <a href="#indexChange">indexChange</a>() signal is emitted.
|
---|
| 182 | <p> <img src=qheader-m.png> <img src=qheader-w.png>
|
---|
| 183 | <p> <p>See also <a href="qlistview.html">QListView</a>, <a href="qtable.html">QTable</a>, and <a href="advanced.html">Advanced Widgets</a>.
|
---|
| 184 |
|
---|
| 185 | <hr><h2>Member Function Documentation</h2>
|
---|
| 186 | <h3 class=fn><a name="QHeader"></a>QHeader::QHeader ( <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0 )
|
---|
| 187 | </h3>
|
---|
| 188 | Constructs a horizontal header called <em>name</em>, with parent <em>parent</em>.
|
---|
| 189 |
|
---|
| 190 | <h3 class=fn><a name="QHeader-2"></a>QHeader::QHeader ( int n, <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0 )
|
---|
| 191 | </h3>
|
---|
| 192 | Constructs a horizontal header called <em>name</em>, with <em>n</em> sections
|
---|
| 193 | and parent <em>parent</em>.
|
---|
| 194 |
|
---|
| 195 | <h3 class=fn><a name="~QHeader"></a>QHeader::~QHeader ()
|
---|
| 196 | </h3>
|
---|
| 197 | Destroys the header and all its sections.
|
---|
| 198 |
|
---|
| 199 | <h3 class=fn>int <a name="addLabel"></a>QHeader::addLabel ( const <a href="qstring.html">QString</a> & s, int size = -1 )
|
---|
| 200 | </h3>
|
---|
| 201 | Adds a new section with label text <em>s</em>. Returns the index
|
---|
| 202 | position where the section was added (at the right for horizontal
|
---|
| 203 | headers, at the bottom for vertical headers). The section's width
|
---|
| 204 | is set to <em>size</em>. If <em>size</em> < 0, an appropriate size for the
|
---|
| 205 | text <em>s</em> is chosen.
|
---|
| 206 |
|
---|
| 207 | <h3 class=fn>int <a name="addLabel-2"></a>QHeader::addLabel ( const <a href="qiconset.html">QIconSet</a> & iconset, const <a href="qstring.html">QString</a> & s, int size = -1 )
|
---|
| 208 | </h3>
|
---|
| 209 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
| 210 | <p> Adds a new section with iconset <em>iconset</em> and label text <em>s</em>.
|
---|
| 211 | Returns the index position where the section was added (at the
|
---|
| 212 | right for horizontal headers, at the bottom for vertical headers).
|
---|
| 213 | The section's width is set to <em>size</em>, unless size is negative in
|
---|
| 214 | which case the size is calculated taking account of the size of
|
---|
| 215 | the text.
|
---|
| 216 |
|
---|
| 217 | <h3 class=fn>void <a name="adjustHeaderSize"></a>QHeader::adjustHeaderSize ()
|
---|
| 218 | </h3>
|
---|
| 219 |
|
---|
| 220 | <p> Adjusts the size of the sections to fit the size of the header as
|
---|
| 221 | completely as possible. Only sections for which <a href="#isStretchEnabled">isStretchEnabled</a>()
|
---|
| 222 | is TRUE will be resized.
|
---|
| 223 |
|
---|
| 224 | <h3 class=fn>int <a name="cellAt"></a>QHeader::cellAt ( int pos ) const
|
---|
| 225 | </h3>
|
---|
| 226 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 227 | <p> Use <a href="#sectionAt">sectionAt</a>() instead.
|
---|
| 228 | <p> Returns the index at which the section is displayed, which contains
|
---|
| 229 | <em>pos</em> in widget coordinates, or -1 if <em>pos</em> is outside the header
|
---|
| 230 | sections.
|
---|
| 231 |
|
---|
| 232 | <h3 class=fn>int <a name="cellPos"></a>QHeader::cellPos ( int i ) const
|
---|
| 233 | </h3>
|
---|
| 234 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 235 | <p> Use <a href="#sectionPos">sectionPos</a>() instead.
|
---|
| 236 | <p> Returns the position in pixels of the section that is displayed at the
|
---|
| 237 | index <em>i</em>. The position is measured from the start of the header.
|
---|
| 238 |
|
---|
| 239 | <h3 class=fn>int <a name="cellSize"></a>QHeader::cellSize ( int i ) const
|
---|
| 240 | </h3>
|
---|
| 241 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 242 | <p> Use <a href="#sectionSize">sectionSize</a>() instead.
|
---|
| 243 | <p> Returns the size in pixels of the section that is displayed at
|
---|
| 244 | the index <em>i</em>.
|
---|
| 245 |
|
---|
| 246 | <h3 class=fn>void <a name="clicked"></a>QHeader::clicked ( int section )<tt> [signal]</tt>
|
---|
| 247 | </h3>
|
---|
| 248 |
|
---|
| 249 | <p> If <a href="#isClickEnabled">isClickEnabled</a>() is TRUE, this signal is emitted when the user
|
---|
| 250 | clicks section <em>section</em>.
|
---|
| 251 | <p> <p>See also <a href="#pressed">pressed</a>() and <a href="#released">released</a>().
|
---|
| 252 |
|
---|
| 253 | <h3 class=fn>int <a name="count"></a>QHeader::count () const
|
---|
| 254 | </h3><p>Returns the number of sections in the header.
|
---|
| 255 | See the <a href="qheader.html#count-prop">"count"</a> property for details.
|
---|
| 256 | <h3 class=fn>int <a name="headerWidth"></a>QHeader::headerWidth () const
|
---|
| 257 | </h3>
|
---|
| 258 | Returns the total width of all the header columns.
|
---|
| 259 |
|
---|
| 260 | <h3 class=fn><a href="qiconset.html">QIconSet</a> * <a name="iconSet"></a>QHeader::iconSet ( int section ) const
|
---|
| 261 | </h3>
|
---|
| 262 | Returns the icon set for section <em>section</em>. If the section does
|
---|
| 263 | not exist, 0 is returned.
|
---|
| 264 |
|
---|
| 265 | <h3 class=fn>void <a name="indexChange"></a>QHeader::indexChange ( int section, int fromIndex, int toIndex )<tt> [signal]</tt>
|
---|
| 266 | </h3>
|
---|
| 267 |
|
---|
| 268 | <p> This signal is emitted when the user moves section <em>section</em> from
|
---|
| 269 | index position <em>fromIndex</em>, to index position <em>toIndex</em>.
|
---|
| 270 |
|
---|
| 271 | <h3 class=fn>bool <a name="isClickEnabled"></a>QHeader::isClickEnabled ( int section = -1 ) const
|
---|
| 272 | </h3>
|
---|
| 273 | Returns TRUE if section <em>section</em> is clickable; otherwise returns
|
---|
| 274 | FALSE.
|
---|
| 275 | <p> If <em>section</em> is out of range (negative or larger than <a href="#count">count</a>() -
|
---|
| 276 | 1): returns TRUE if all sections are clickable; otherwise returns
|
---|
| 277 | FALSE.
|
---|
| 278 | <p> <p>See also <a href="#setClickEnabled">setClickEnabled</a>().
|
---|
| 279 |
|
---|
| 280 | <h3 class=fn>bool <a name="isMovingEnabled"></a>QHeader::isMovingEnabled () const
|
---|
| 281 | </h3><p>Returns TRUE if the header sections can be moved; otherwise returns FALSE.
|
---|
| 282 | See the <a href="qheader.html#moving-prop">"moving"</a> property for details.
|
---|
| 283 | <h3 class=fn>bool <a name="isResizeEnabled"></a>QHeader::isResizeEnabled ( int section = -1 ) const
|
---|
| 284 | </h3>
|
---|
| 285 | Returns TRUE if section <em>section</em> is resizeable; otherwise
|
---|
| 286 | returns FALSE.
|
---|
| 287 | <p> If <em>section</em> is -1 then this function applies to all sections,
|
---|
| 288 | i.e. returns TRUE if all sections are resizeable; otherwise
|
---|
| 289 | returns FALSE.
|
---|
| 290 | <p> <p>See also <a href="#setResizeEnabled">setResizeEnabled</a>().
|
---|
| 291 |
|
---|
| 292 | <h3 class=fn>bool <a name="isStretchEnabled"></a>QHeader::isStretchEnabled () const
|
---|
| 293 | </h3><p>Returns TRUE if the header sections always take up the full width (or height) of the header; otherwise returns FALSE.
|
---|
| 294 | See the <a href="qheader.html#stretching-prop">"stretching"</a> property for details.
|
---|
| 295 | <h3 class=fn>bool <a name="isStretchEnabled-2"></a>QHeader::isStretchEnabled ( int section ) const
|
---|
| 296 | </h3>
|
---|
| 297 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
| 298 | <p> Returns TRUE if section <em>section</em> will resize to take up the full
|
---|
| 299 | width (or height) of the header; otherwise returns FALSE. If at
|
---|
| 300 | least one section has stretch enabled the sections will always
|
---|
| 301 | take up the full width of the header.
|
---|
| 302 | <p> <p>See also <a href="#setStretchEnabled">setStretchEnabled</a>().
|
---|
| 303 |
|
---|
| 304 | <h3 class=fn><a href="qstring.html">QString</a> <a name="label"></a>QHeader::label ( int section ) const
|
---|
| 305 | </h3>
|
---|
| 306 | Returns the text for section <em>section</em>. If the section does not
|
---|
| 307 | exist, a <a href="qstring.html#QString-null">QString::null</a> is returned.
|
---|
| 308 |
|
---|
| 309 | <p>Example: <a href="helpsystem-example.html#x2674">helpsystem/tooltip.cpp</a>.
|
---|
| 310 | <h3 class=fn>int <a name="mapToActual"></a>QHeader::mapToActual ( int l ) const
|
---|
| 311 | </h3>
|
---|
| 312 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 313 | <p> Use <a href="#mapToIndex">mapToIndex</a>() instead.
|
---|
| 314 | <p> Translates from logical index <em>l</em> to actual index (index at which the section <em>l</em> is displayed) .
|
---|
| 315 | Returns -1 if <em>l</em> is outside the legal range.
|
---|
| 316 | <p> <p>See also <a href="#mapToLogical">mapToLogical</a>().
|
---|
| 317 |
|
---|
| 318 | <h3 class=fn>int <a name="mapToIndex"></a>QHeader::mapToIndex ( int section ) const
|
---|
| 319 | </h3>
|
---|
| 320 | Returns the index position corresponding to the specified <em>section</em> number.
|
---|
| 321 | <p> <b>Warning:</b> If <a href="qtable.html">QTable</a> is used to move header sections as a result of user
|
---|
| 322 | interaction, the mapping exposed by this function will not reflect the
|
---|
| 323 | order of the headers in the table; i.e., QTable does not call <a href="#moveSection">moveSection</a>()
|
---|
| 324 | to move sections but handles move operations internally.
|
---|
| 325 | <p> <p>See also <a href="#mapToSection">mapToSection</a>().
|
---|
| 326 |
|
---|
| 327 | <h3 class=fn>int <a name="mapToLogical"></a>QHeader::mapToLogical ( int a ) const
|
---|
| 328 | </h3>
|
---|
| 329 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 330 | <p> Use <a href="#mapToSection">mapToSection</a>() instead.
|
---|
| 331 | <p> Translates from actual index <em>a</em> (index at which the section is displayed) to
|
---|
| 332 | logical index of the section. Returns -1 if <em>a</em> is outside the legal range.
|
---|
| 333 | <p> <p>See also <a href="#mapToActual">mapToActual</a>().
|
---|
| 334 |
|
---|
| 335 | <h3 class=fn>int <a name="mapToSection"></a>QHeader::mapToSection ( int index ) const
|
---|
| 336 | </h3>
|
---|
| 337 | Returns the number of the section that corresponds to the specified <em>index</em>.
|
---|
| 338 | <p> <b>Warning:</b> If <a href="qtable.html">QTable</a> is used to move header sections as a result of user
|
---|
| 339 | interaction, the mapping exposed by this function will not reflect the
|
---|
| 340 | order of the headers in the table; i.e., QTable does not call <a href="#moveSection">moveSection</a>()
|
---|
| 341 | to move sections but handles move operations internally.
|
---|
| 342 | <p> <p>See also <a href="#mapToIndex">mapToIndex</a>().
|
---|
| 343 |
|
---|
| 344 | <h3 class=fn>void <a name="moveCell"></a>QHeader::moveCell ( int fromIdx, int toIdx )<tt> [virtual]</tt>
|
---|
| 345 | </h3>
|
---|
| 346 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 347 | <p> Use <a href="#moveSection">moveSection</a>() instead.
|
---|
| 348 | <p> Moves the section that is currently displayed at index <em>fromIdx</em>
|
---|
| 349 | to index <em>toIdx</em>.
|
---|
| 350 |
|
---|
| 351 | <h3 class=fn>void <a name="moveSection"></a>QHeader::moveSection ( int section, int toIndex )
|
---|
| 352 | </h3>
|
---|
| 353 | Moves section <em>section</em> to index position <em>toIndex</em>.
|
---|
| 354 |
|
---|
| 355 | <h3 class=fn>void <a name="moved"></a>QHeader::moved ( int fromIndex, int toIndex )<tt> [signal]</tt>
|
---|
| 356 | </h3>
|
---|
| 357 |
|
---|
| 358 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 359 | <p> Use <a href="#indexChange">indexChange</a>() instead.
|
---|
| 360 | <p> This signal is emitted when the user has moved the section which
|
---|
| 361 | is displayed at the index <em>fromIndex</em> to the index <em>toIndex</em>.
|
---|
| 362 |
|
---|
| 363 | <h3 class=fn>int <a name="offset"></a>QHeader::offset () const
|
---|
| 364 | </h3><p>Returns the header's left-most (or top-most) visible pixel.
|
---|
| 365 | See the <a href="qheader.html#offset-prop">"offset"</a> property for details.
|
---|
| 366 | <h3 class=fn><a href="qt.html#Orientation-enum">Orientation</a> <a name="orientation"></a>QHeader::orientation () const
|
---|
| 367 | </h3><p>Returns the header's orientation.
|
---|
| 368 | See the <a href="qheader.html#orientation-prop">"orientation"</a> property for details.
|
---|
| 369 | <h3 class=fn>void <a name="paintSection"></a>QHeader::paintSection ( <a href="qpainter.html">QPainter</a> * p, int index, const <a href="qrect.html">QRect</a> & fr )<tt> [virtual protected]</tt>
|
---|
| 370 | </h3>
|
---|
| 371 | Paints the section at position <em>index</em>, inside rectangle <em>fr</em>
|
---|
| 372 | (which uses widget coordinates) using painter <em>p</em>.
|
---|
| 373 | <p> Calls <a href="#paintSectionLabel">paintSectionLabel</a>().
|
---|
| 374 |
|
---|
| 375 | <h3 class=fn>void <a name="paintSectionLabel"></a>QHeader::paintSectionLabel ( <a href="qpainter.html">QPainter</a> * p, int index, const <a href="qrect.html">QRect</a> & fr )<tt> [virtual protected]</tt>
|
---|
| 376 | </h3>
|
---|
| 377 | Paints the label of the section at position <em>index</em>, inside
|
---|
| 378 | rectangle <em>fr</em> (which uses widget coordinates) using painter <em>p</em>.
|
---|
| 379 | <p> Called by <a href="#paintSection">paintSection</a>()
|
---|
| 380 |
|
---|
| 381 | <h3 class=fn>void <a name="pressed"></a>QHeader::pressed ( int section )<tt> [signal]</tt>
|
---|
| 382 | </h3>
|
---|
| 383 |
|
---|
| 384 | <p> This signal is emitted when the user presses section <em>section</em>
|
---|
| 385 | down.
|
---|
| 386 | <p> <p>See also <a href="#released">released</a>().
|
---|
| 387 |
|
---|
| 388 | <h3 class=fn>void <a name="released"></a>QHeader::released ( int section )<tt> [signal]</tt>
|
---|
| 389 | </h3>
|
---|
| 390 |
|
---|
| 391 | <p> This signal is emitted when section <em>section</em> is released.
|
---|
| 392 | <p> <p>See also <a href="#pressed">pressed</a>().
|
---|
| 393 |
|
---|
| 394 | <h3 class=fn>void <a name="removeLabel"></a>QHeader::removeLabel ( int section )
|
---|
| 395 | </h3>
|
---|
| 396 | Removes section <em>section</em>. If the section does not exist, nothing
|
---|
| 397 | happens.
|
---|
| 398 |
|
---|
| 399 | <h3 class=fn>void <a name="resizeSection"></a>QHeader::resizeSection ( int section, int s )
|
---|
| 400 | </h3>
|
---|
| 401 | Resizes section <em>section</em> to <em>s</em> pixels wide (or high).
|
---|
| 402 |
|
---|
| 403 | <h3 class=fn><a href="qrect.html">QRect</a> <a name="sRect"></a>QHeader::sRect ( int index )<tt> [protected]</tt>
|
---|
| 404 | </h3>
|
---|
| 405 | Returns the rectangle covered by the section at index <em>index</em>.
|
---|
| 406 |
|
---|
| 407 | <h3 class=fn>int <a name="sectionAt"></a>QHeader::sectionAt ( int pos ) const
|
---|
| 408 | </h3>
|
---|
| 409 | Returns the index of the section which contains the position <em>pos</em> given in pixels from the left (or top).
|
---|
| 410 | <p> <p>See also <a href="#offset-prop">offset</a>.
|
---|
| 411 |
|
---|
| 412 | <p>Example: <a href="helpsystem-example.html#x2677">helpsystem/tooltip.cpp</a>.
|
---|
| 413 | <h3 class=fn>void <a name="sectionClicked"></a>QHeader::sectionClicked ( int index )<tt> [signal]</tt>
|
---|
| 414 | </h3>
|
---|
| 415 |
|
---|
| 416 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 417 | <p> Use <a href="#clicked">clicked</a>() instead.
|
---|
| 418 | <p> This signal is emitted when a part of the header is clicked. <em>index</em> is the index at which the section is displayed.
|
---|
| 419 | <p> In a list view this signal would typically be connected to a slot
|
---|
| 420 | that sorts the specified column (or row).
|
---|
| 421 |
|
---|
| 422 | <h3 class=fn>void <a name="sectionHandleDoubleClicked"></a>QHeader::sectionHandleDoubleClicked ( int section )<tt> [signal]</tt>
|
---|
| 423 | </h3>
|
---|
| 424 |
|
---|
| 425 | <p> This signal is emitted when the user doubleclicks on the edge
|
---|
| 426 | (handle) of section <em>section</em>.
|
---|
| 427 |
|
---|
| 428 | <h3 class=fn>int <a name="sectionPos"></a>QHeader::sectionPos ( int section ) const
|
---|
| 429 | </h3>
|
---|
| 430 | Returns the position (in pixels) at which the <em>section</em> starts.
|
---|
| 431 | <p> <p>See also <a href="#offset-prop">offset</a>.
|
---|
| 432 |
|
---|
| 433 | <h3 class=fn><a href="qrect.html">QRect</a> <a name="sectionRect"></a>QHeader::sectionRect ( int section ) const
|
---|
| 434 | </h3>
|
---|
| 435 | Returns the rectangle covered by section <em>section</em>.
|
---|
| 436 |
|
---|
| 437 | <p>Example: <a href="helpsystem-example.html#x2678">helpsystem/tooltip.cpp</a>.
|
---|
| 438 | <h3 class=fn>int <a name="sectionSize"></a>QHeader::sectionSize ( int section ) const
|
---|
| 439 | </h3>
|
---|
| 440 | Returns the width (or height) of the <em>section</em> in pixels.
|
---|
| 441 |
|
---|
| 442 | <h3 class=fn>void <a name="setCellSize"></a>QHeader::setCellSize ( int section, int s )<tt> [virtual]</tt>
|
---|
| 443 | </h3>
|
---|
| 444 | <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 445 | <p> Use <a href="#resizeSection">resizeSection</a>() instead.
|
---|
| 446 | <p> Sets the size of the section <em>section</em> to <em>s</em> pixels.
|
---|
| 447 | <p> <b>Warning:</b> does not repaint or send out signals
|
---|
| 448 |
|
---|
| 449 | <h3 class=fn>void <a name="setClickEnabled"></a>QHeader::setClickEnabled ( bool enable, int section = -1 )<tt> [virtual]</tt>
|
---|
| 450 | </h3>
|
---|
| 451 | If <em>enable</em> is TRUE, any clicks on section <em>section</em> will result
|
---|
| 452 | in <a href="#clicked">clicked</a>() signals being emitted; otherwise the section will
|
---|
| 453 | ignore clicks.
|
---|
| 454 | <p> If <em>section</em> is -1 (the default) then the <em>enable</em> value is set
|
---|
| 455 | for all existing sections and will be applied to any new sections
|
---|
| 456 | that are added.
|
---|
| 457 | <p> <p>See also <a href="#moving-prop">moving</a> and <a href="#setResizeEnabled">setResizeEnabled</a>().
|
---|
| 458 |
|
---|
| 459 | <h3 class=fn>void <a name="setLabel"></a>QHeader::setLabel ( int section, const <a href="qstring.html">QString</a> & s, int size = -1 )<tt> [virtual]</tt>
|
---|
| 460 | </h3>
|
---|
| 461 | Sets the text of section <em>section</em> to <em>s</em>. The section's width
|
---|
| 462 | is set to <em>size</em> if <em>size</em> >= 0; otherwise it is left
|
---|
| 463 | unchanged. Any icon set that has been set for this section remains
|
---|
| 464 | unchanged.
|
---|
| 465 | <p> If the section does not exist, nothing happens.
|
---|
| 466 |
|
---|
| 467 | <p>Examples: <a href="tutorial2-08.html#x2605">chart/setdataform.cpp</a> and <a href="small-table-example-example.html#x2798">table/small-table-demo/main.cpp</a>.
|
---|
| 468 | <h3 class=fn>void <a name="setLabel-2"></a>QHeader::setLabel ( int section, const <a href="qiconset.html">QIconSet</a> & iconset, const <a href="qstring.html">QString</a> & s, int size = -1 )<tt> [virtual]</tt>
|
---|
| 469 | </h3>
|
---|
| 470 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
| 471 | <p> Sets the icon for section <em>section</em> to <em>iconset</em> and the text to
|
---|
| 472 | <em>s</em>. The section's width is set to <em>size</em> if <em>size</em> >= 0;
|
---|
| 473 | otherwise it is left unchanged.
|
---|
| 474 | <p> If the section does not exist, nothing happens.
|
---|
| 475 |
|
---|
| 476 | <h3 class=fn>void <a name="setMovingEnabled"></a>QHeader::setMovingEnabled ( bool )<tt> [virtual]</tt>
|
---|
| 477 | </h3><p>Sets whether the header sections can be moved.
|
---|
| 478 | See the <a href="qheader.html#moving-prop">"moving"</a> property for details.
|
---|
| 479 | <h3 class=fn>void <a name="setOffset"></a>QHeader::setOffset ( int pos )<tt> [virtual slot]</tt>
|
---|
| 480 | </h3><p>Sets the header's left-most (or top-most) visible pixel to <em>pos</em>.
|
---|
| 481 | See the <a href="qheader.html#offset-prop">"offset"</a> property for details.
|
---|
| 482 | <h3 class=fn>void <a name="setOrientation"></a>QHeader::setOrientation ( <a href="qt.html#Orientation-enum">Orientation</a> )<tt> [virtual]</tt>
|
---|
| 483 | </h3><p>Sets the header's orientation.
|
---|
| 484 | See the <a href="qheader.html#orientation-prop">"orientation"</a> property for details.
|
---|
| 485 | <h3 class=fn>void <a name="setResizeEnabled"></a>QHeader::setResizeEnabled ( bool enable, int section = -1 )<tt> [virtual]</tt>
|
---|
| 486 | </h3>
|
---|
| 487 | If <em>enable</em> is TRUE the user may resize section <em>section</em>;
|
---|
| 488 | otherwise the section may not be manually resized.
|
---|
| 489 | <p> If <em>section</em> is negative (the default) then the <em>enable</em> value
|
---|
| 490 | is set for all existing sections and will be applied to any new
|
---|
| 491 | sections that are added.
|
---|
| 492 | Example:
|
---|
| 493 | <pre>
|
---|
| 494 | // Allow resizing of all current and future sections
|
---|
| 495 | header->setResizeEnabled(TRUE);
|
---|
| 496 | // Disable resizing of section 3, (the fourth section added)
|
---|
| 497 | header->setResizeEnabled(FALSE, 3);
|
---|
| 498 | </pre>
|
---|
| 499 |
|
---|
| 500 | <p> If the user resizes a section, a <a href="#sizeChange">sizeChange</a>() signal is emitted.
|
---|
| 501 | <p> <p>See also <a href="#moving-prop">moving</a>, <a href="#setClickEnabled">setClickEnabled</a>(), and <a href="#tracking-prop">tracking</a>.
|
---|
| 502 |
|
---|
| 503 | <h3 class=fn>void <a name="setSortIndicator"></a>QHeader::setSortIndicator ( int section, <a href="qt.html#SortOrder-enum">SortOrder</a> order )
|
---|
| 504 | </h3>
|
---|
| 505 |
|
---|
| 506 | <p> Sets a sort indicator onto the specified <em>section</em>. The indicator's
|
---|
| 507 | <em>order</em> is either Ascending or Descending.
|
---|
| 508 | <p> Only one section can show a sort indicator at any one time. If you
|
---|
| 509 | don't want any section to show a sort indicator pass a <em>section</em>
|
---|
| 510 | number of -1.
|
---|
| 511 | <p> <p>See also <a href="#sortIndicatorSection">sortIndicatorSection</a>() and <a href="#sortIndicatorOrder">sortIndicatorOrder</a>().
|
---|
| 512 |
|
---|
| 513 | <h3 class=fn>void <a name="setSortIndicator-2"></a>QHeader::setSortIndicator ( int section, bool ascending = TRUE )
|
---|
| 514 | </h3> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
| 515 | <p> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 516 | <p> Use the other overload instead.
|
---|
| 517 |
|
---|
| 518 | <h3 class=fn>void <a name="setStretchEnabled"></a>QHeader::setStretchEnabled ( bool b, int section )<tt> [virtual]</tt>
|
---|
| 519 | </h3>
|
---|
| 520 | If <em>b</em> is TRUE, section <em>section</em> will be resized when the
|
---|
| 521 | header is resized, so that the sections take up the full width (or
|
---|
| 522 | height for vertical headers) of the header; otherwise section <em>section</em> will be set to be unstretchable and will not resize when
|
---|
| 523 | the header is resized.
|
---|
| 524 | <p> If <em>section</em> is -1, and if <em>b</em> is TRUE, then all sections will
|
---|
| 525 | be resized equally when the header is resized so that they take up
|
---|
| 526 | the full width (or height for vertical headers) of the header;
|
---|
| 527 | otherwise all the sections will be set to be unstretchable and
|
---|
| 528 | will not resize when the header is resized.
|
---|
| 529 | <p> <p>See also <a href="#adjustHeaderSize">adjustHeaderSize</a>().
|
---|
| 530 |
|
---|
| 531 | <h3 class=fn>void <a name="setStretchEnabled-2"></a>QHeader::setStretchEnabled ( bool b )
|
---|
| 532 | </h3><p>Sets whether the header sections always take up the full width (or height) of the header to <em>b</em>.
|
---|
| 533 | See the <a href="qheader.html#stretching-prop">"stretching"</a> property for details.
|
---|
| 534 | <h3 class=fn>void <a name="setTracking"></a>QHeader::setTracking ( bool enable )<tt> [virtual]</tt>
|
---|
| 535 | </h3><p>Sets whether the <a href="#sizeChange">sizeChange</a>() signal is emitted continuously to <em>enable</em>.
|
---|
| 536 | See the <a href="qheader.html#tracking-prop">"tracking"</a> property for details.
|
---|
| 537 | <h3 class=fn>void <a name="sizeChange"></a>QHeader::sizeChange ( int section, int oldSize, int newSize )<tt> [signal]</tt>
|
---|
| 538 | </h3>
|
---|
| 539 |
|
---|
| 540 | <p> This signal is emitted when the user has changed the size of a <em>section</em> from <em>oldSize</em> to <em>newSize</em>. This signal is typically
|
---|
| 541 | connected to a slot that repaints the table or list that contains
|
---|
| 542 | the header.
|
---|
| 543 |
|
---|
| 544 | <h3 class=fn><a href="qt.html#SortOrder-enum">SortOrder</a> <a name="sortIndicatorOrder"></a>QHeader::sortIndicatorOrder () const
|
---|
| 545 | </h3>
|
---|
| 546 | Returns the implied sort order of the QHeaders sort indicator.
|
---|
| 547 | <p> <p>See also <a href="#setSortIndicator">setSortIndicator</a>() and <a href="#sortIndicatorSection">sortIndicatorSection</a>().
|
---|
| 548 |
|
---|
| 549 | <h3 class=fn>int <a name="sortIndicatorSection"></a>QHeader::sortIndicatorSection () const
|
---|
| 550 | </h3>
|
---|
| 551 | Returns the section showing the sort indicator or -1 if there is no sort indicator.
|
---|
| 552 | <p> <p>See also <a href="#setSortIndicator">setSortIndicator</a>() and <a href="#sortIndicatorOrder">sortIndicatorOrder</a>().
|
---|
| 553 |
|
---|
| 554 | <h3 class=fn>bool <a name="tracking"></a>QHeader::tracking () const
|
---|
| 555 | </h3><p>Returns TRUE if the <a href="#sizeChange">sizeChange</a>() signal is emitted continuously; otherwise returns FALSE.
|
---|
| 556 | See the <a href="qheader.html#tracking-prop">"tracking"</a> property for details.
|
---|
| 557 | <hr><h2>Property Documentation</h2>
|
---|
| 558 | <h3 class=fn>int <a name="count-prop"></a>count</h3>
|
---|
| 559 | <p>This property holds the number of sections in the header.
|
---|
| 560 | <p>
|
---|
| 561 | <p>Get this property's value with <a href="#count">count</a>().
|
---|
| 562 | <h3 class=fn>bool <a name="moving-prop"></a>moving</h3>
|
---|
| 563 | <p>This property holds whether the header sections can be moved.
|
---|
| 564 | <p>If this property is TRUE (the default) the user can move sections.
|
---|
| 565 | If the user moves a section the <a href="#indexChange">indexChange</a>() signal is emitted.
|
---|
| 566 | <p> <p>See also <a href="#setClickEnabled">setClickEnabled</a>() and <a href="#setResizeEnabled">setResizeEnabled</a>().
|
---|
| 567 |
|
---|
| 568 | <p>Set this property's value with <a href="#setMovingEnabled">setMovingEnabled</a>() and get this property's value with <a href="#isMovingEnabled">isMovingEnabled</a>().
|
---|
| 569 | <h3 class=fn>int <a name="offset-prop"></a>offset</h3>
|
---|
| 570 | <p>This property holds the header's left-most (or top-most) visible pixel.
|
---|
| 571 | <p>Setting this property will scroll the header so that <em>offset</em>
|
---|
| 572 | becomes the left-most (or top-most for vertical headers) visible
|
---|
| 573 | pixel.
|
---|
| 574 |
|
---|
| 575 | <p>Set this property's value with <a href="#setOffset">setOffset</a>() and get this property's value with <a href="#offset">offset</a>().
|
---|
| 576 | <h3 class=fn><a href="qt.html#Orientation-enum">Orientation</a> <a name="orientation-prop"></a>orientation</h3>
|
---|
| 577 | <p>This property holds the header's orientation.
|
---|
| 578 | <p>The orientation is either <a href="qt.html#Orientation-enum">Vertical</a> or <a href="qt.html#Orientation-enum">Horizontal</a> (the
|
---|
| 579 | default).
|
---|
| 580 | <p> Call <a href="#setOrientation">setOrientation</a>() before adding labels if you don't provide a
|
---|
| 581 | size parameter otherwise the sizes will be incorrect.
|
---|
| 582 |
|
---|
| 583 | <p>Set this property's value with <a href="#setOrientation">setOrientation</a>() and get this property's value with <a href="#orientation">orientation</a>().
|
---|
| 584 | <h3 class=fn>bool <a name="stretching-prop"></a>stretching</h3>
|
---|
| 585 | <p>This property holds whether the header sections always take up the full width (or height) of the header.
|
---|
| 586 | <p>
|
---|
| 587 | <p>Set this property's value with <a href="#setStretchEnabled">setStretchEnabled</a>() and get this property's value with <a href="#isStretchEnabled">isStretchEnabled</a>().
|
---|
| 588 | <h3 class=fn>bool <a name="tracking-prop"></a>tracking</h3>
|
---|
| 589 | <p>This property holds whether the <a href="#sizeChange">sizeChange</a>() signal is emitted continuously.
|
---|
| 590 | <p>If tracking is on, the sizeChange() signal is emitted continuously
|
---|
| 591 | while the mouse is moved (i.e. when the header is resized),
|
---|
| 592 | otherwise it is only emitted when the mouse button is released at
|
---|
| 593 | the end of resizing.
|
---|
| 594 | <p> Tracking defaults to FALSE.
|
---|
| 595 |
|
---|
| 596 | <p>Set this property's value with <a href="#setTracking">setTracking</a>() and get this property's value with <a href="#tracking">tracking</a>().
|
---|
| 597 | <!-- eof -->
|
---|
| 598 | <hr><p>
|
---|
| 599 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
| 600 | Copyright © 1995-2007
|
---|
| 601 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
| 602 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 603 | <td>Copyright © 2007
|
---|
| 604 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 605 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 606 | </table></div></address></body>
|
---|
| 607 | </html>
|
---|