source: trunk/doc/html/qtableselection.html

Last change on this file was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 9.2 KB
Line 
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/table/qtable.cpp:194 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QTableSelection Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { 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&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;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&nbsp;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>QTableSelection Class Reference<br><small>[<a href="table.html">table module</a>]</small></h1>
33
34<p>The QTableSelection class provides access to a selected area in a
35QTable.
36<a href="#details">More...</a>
37<p><tt>#include &lt;<a href="qtable-h.html">qtable.h</a>&gt;</tt>
38<p><a href="qtableselection-members.html">List of all member functions.</a>
39<h2>Public Members</h2>
40<ul>
41<li class=fn><a href="#QTableSelection"><b>QTableSelection</b></a> ()</li>
42<li class=fn><a href="#QTableSelection-2"><b>QTableSelection</b></a> ( int&nbsp;start_row, int&nbsp;start_col, int&nbsp;end_row, int&nbsp;end_col )</li>
43<li class=fn>void <a href="#init"><b>init</b></a> ( int&nbsp;row, int&nbsp;col )</li>
44<li class=fn>void <a href="#expandTo"><b>expandTo</b></a> ( int&nbsp;row, int&nbsp;col )</li>
45<li class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const&nbsp;QTableSelection&nbsp;&amp;&nbsp;s ) const</li>
46<li class=fn>bool <a href="#operator!-eq"><b>operator!=</b></a> ( const&nbsp;QTableSelection&nbsp;&amp;&nbsp;s ) const</li>
47<li class=fn>int <a href="#topRow"><b>topRow</b></a> () const</li>
48<li class=fn>int <a href="#bottomRow"><b>bottomRow</b></a> () const</li>
49<li class=fn>int <a href="#leftCol"><b>leftCol</b></a> () const</li>
50<li class=fn>int <a href="#rightCol"><b>rightCol</b></a> () const</li>
51<li class=fn>int <a href="#anchorRow"><b>anchorRow</b></a> () const</li>
52<li class=fn>int <a href="#anchorCol"><b>anchorCol</b></a> () const</li>
53<li class=fn>int <a href="#numRows"><b>numRows</b></a> () const</li>
54<li class=fn>int <a href="#numCols"><b>numCols</b></a> () const</li>
55<li class=fn>bool <a href="#isActive"><b>isActive</b></a> () const</li>
56<li class=fn>bool <a href="#isEmpty"><b>isEmpty</b></a> () const</li>
57</ul>
58<hr><a name="details"></a><h2>Detailed Description</h2>
59
60
61The QTableSelection class provides access to a selected area in a
62<a href="qtable.html">QTable</a>.
63
64<p>
65
66<p> The selection is a rectangular set of cells in a QTable. One of
67the rectangle's cells is called the anchor cell; this is the cell
68that was selected first. The <a href="#init">init</a>() function sets the anchor and
69the selection rectangle to exactly this cell; the <a href="#expandTo">expandTo</a>()
70function expands the selection rectangle to include additional
71cells.
72<p> There are various access functions to find out about the area:
73<a href="#anchorRow">anchorRow</a>() and <a href="#anchorCol">anchorCol</a>() return the anchor's position;
74<a href="#leftCol">leftCol</a>(), <a href="#rightCol">rightCol</a>(), <a href="#topRow">topRow</a>() and <a href="#bottomRow">bottomRow</a>() return the
75rectangle's four edges. All four are part of the selection.
76<p> A newly created QTableSelection is inactive -- <a href="#isActive">isActive</a>() returns
77FALSE. You must use init() and expandTo() to activate it.
78<p> <p>See also <a href="qtable.html">QTable</a>, <a href="qtable.html#addSelection">QTable::addSelection</a>(), <a href="qtable.html#selection">QTable::selection</a>(), <a href="qtable.html#selectCells">QTable::selectCells</a>(), <a href="qtable.html#selectRow">QTable::selectRow</a>(), <a href="qtable.html#selectColumn">QTable::selectColumn</a>(), and <a href="advanced.html">Advanced Widgets</a>.
79
80<hr><h2>Member Function Documentation</h2>
81<h3 class=fn><a name="QTableSelection"></a>QTableSelection::QTableSelection ()
82</h3>
83Creates an inactive selection. Use <a href="#init">init</a>() and <a href="#expandTo">expandTo</a>() to
84activate it.
85
86<h3 class=fn><a name="QTableSelection-2"></a>QTableSelection::QTableSelection ( int&nbsp;start_row, int&nbsp;start_col, int&nbsp;end_row, int&nbsp;end_col )
87</h3>
88Creates an active selection, starting at <em>start_row</em> and <em>start_col</em>, ending at <em>end_row</em> and <em>end_col</em>.
89
90<h3 class=fn>int <a name="anchorCol"></a>QTableSelection::anchorCol () const
91</h3>
92
93<p> Returns the anchor column of the selection.
94<p> <p>See also <a href="#anchorRow">anchorRow</a>() and <a href="#expandTo">expandTo</a>().
95
96<h3 class=fn>int <a name="anchorRow"></a>QTableSelection::anchorRow () const
97</h3>
98
99<p> Returns the anchor row of the selection.
100<p> <p>See also <a href="#anchorCol">anchorCol</a>() and <a href="#expandTo">expandTo</a>().
101
102<h3 class=fn>int <a name="bottomRow"></a>QTableSelection::bottomRow () const
103</h3>
104
105<p> Returns the bottom row of the selection.
106<p> <p>See also <a href="#topRow">topRow</a>(), <a href="#leftCol">leftCol</a>(), and <a href="#rightCol">rightCol</a>().
107
108<h3 class=fn>void <a name="expandTo"></a>QTableSelection::expandTo ( int&nbsp;row, int&nbsp;col )
109</h3>
110Expands the selection to include cell <em>row</em>, <em>col</em>. The new
111selection rectangle is the bounding rectangle of <em>row</em>, <em>col</em>
112and the previous selection rectangle. After calling this function
113the selection is active.
114<p> If you haven't called <a href="#init">init</a>(), this function does nothing.
115<p> <p>See also <a href="#init">init</a>() and <a href="#isActive">isActive</a>().
116
117<h3 class=fn>void <a name="init"></a>QTableSelection::init ( int&nbsp;row, int&nbsp;col )
118</h3>
119Sets the selection anchor to cell <em>row</em>, <em>col</em> and the selection
120to only contain this cell. The selection is not active until
121<a href="#expandTo">expandTo</a>() is called.
122<p> To extend the selection to include additional cells, call
123expandTo().
124<p> <p>See also <a href="#isActive">isActive</a>().
125
126<h3 class=fn>bool <a name="isActive"></a>QTableSelection::isActive () const
127</h3>
128
129<p> Returns whether the selection is active or not. A selection is
130active after <a href="#init">init</a>() <em>and</em> <a href="#expandTo">expandTo</a>() have been called.
131
132<h3 class=fn>bool <a name="isEmpty"></a>QTableSelection::isEmpty () const
133</h3>
134
135<p> Returns whether the selection is empty or not.
136<p> <p>See also <a href="#numRows">numRows</a>() and <a href="#numCols">numCols</a>().
137
138<h3 class=fn>int <a name="leftCol"></a>QTableSelection::leftCol () const
139</h3>
140
141<p> Returns the left column of the selection.
142<p> <p>See also <a href="#topRow">topRow</a>(), <a href="#bottomRow">bottomRow</a>(), and <a href="#rightCol">rightCol</a>().
143
144<h3 class=fn>int <a name="numCols"></a>QTableSelection::numCols () const
145</h3>
146Returns the number of columns in the selection.
147<p> <p>See also <a href="#numRows">numRows</a>().
148
149<h3 class=fn>int <a name="numRows"></a>QTableSelection::numRows () const
150</h3>
151
152<p> Returns the number of rows in the selection.
153<p> <p>See also <a href="#numCols">numCols</a>().
154
155<h3 class=fn>bool <a name="operator!-eq"></a>QTableSelection::operator!= ( const&nbsp;<a href="qtableselection.html">QTableSelection</a>&nbsp;&amp;&nbsp;s ) const
156</h3>
157
158<p> Returns TRUE if <em>s</em> does not include the same cells as the
159selection; otherwise returns FALSE.
160
161<h3 class=fn>bool <a name="operator-eq-eq"></a>QTableSelection::operator== ( const&nbsp;<a href="qtableselection.html">QTableSelection</a>&nbsp;&amp;&nbsp;s ) const
162</h3>
163Returns TRUE if <em>s</em> includes the same cells as the selection;
164otherwise returns FALSE.
165
166<h3 class=fn>int <a name="rightCol"></a>QTableSelection::rightCol () const
167</h3>
168
169<p> Returns the right column of the selection.
170<p> <p>See also <a href="#topRow">topRow</a>(), <a href="#bottomRow">bottomRow</a>(), and <a href="#leftCol">leftCol</a>().
171
172<h3 class=fn>int <a name="topRow"></a>QTableSelection::topRow () const
173</h3>
174
175<p> Returns the top row of the selection.
176<p> <p>See also <a href="#bottomRow">bottomRow</a>(), <a href="#leftCol">leftCol</a>(), and <a href="#rightCol">rightCol</a>().
177
178<!-- eof -->
179<hr><p>
180This file is part of the <a href="index.html">Qt toolkit</a>.
181Copyright &copy; 1995-2007
182<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
183<table width=100% cellspacing=0 border=0><tr>
184<td>Copyright &copy; 2007
185<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
186<td align=right><div align=right>Qt 3.3.8</div>
187</table></div></address></body>
188</html>
Note: See TracBrowser for help on using the repository browser.