1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/qt3support/itemviews/q3table.cpp -->
7
<title>Qt 4.0: Q3TableSelection 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>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
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"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <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">Q3TableSelection Class Reference</h1>
21
<p>The Q3TableSelection class provides access to a selected area in a <a href="q3table.html">Q3Table</a>. <a href="#details">More...</a></p>
22
<pre>#include <Q3TableSelection></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See the <a href="porting4.html">Porting Guide</a> for more information.</p>
23
<p>Part of the <a href="qt3support.html">Qt3Support</a> module.</p>
25
<li><a href="q3tableselection-members.html">List of all members, including inherited members</a></li>
27
<a name="public-functions"></a>
28
<h3>Public Functions</h3>
30
<li><div class="fn"/><b><a href="q3tableselection.html#Q3TableSelection">Q3TableSelection</a></b> ()</li>
31
<li><div class="fn"/><b><a href="q3tableselection.html#Q3TableSelection-2">Q3TableSelection</a></b> ( int <i>start_row</i>, int <i>start_col</i>, int <i>end_row</i>, int <i>end_col</i> )</li>
32
<li><div class="fn"/>int <b><a href="q3tableselection.html#anchorCol">anchorCol</a></b> () const</li>
33
<li><div class="fn"/>int <b><a href="q3tableselection.html#anchorRow">anchorRow</a></b> () const</li>
34
<li><div class="fn"/>int <b><a href="q3tableselection.html#bottomRow">bottomRow</a></b> () const</li>
35
<li><div class="fn"/>void <b><a href="q3tableselection.html#expandTo">expandTo</a></b> ( int <i>row</i>, int <i>col</i> )</li>
36
<li><div class="fn"/>void <b><a href="q3tableselection.html#init">init</a></b> ( int <i>row</i>, int <i>col</i> )</li>
37
<li><div class="fn"/>bool <b><a href="q3tableselection.html#isActive">isActive</a></b> () const</li>
38
<li><div class="fn"/>bool <b><a href="q3tableselection.html#isEmpty">isEmpty</a></b> () const</li>
39
<li><div class="fn"/>int <b><a href="q3tableselection.html#leftCol">leftCol</a></b> () const</li>
40
<li><div class="fn"/>int <b><a href="q3tableselection.html#numCols">numCols</a></b> () const</li>
41
<li><div class="fn"/>int <b><a href="q3tableselection.html#numRows">numRows</a></b> () const</li>
42
<li><div class="fn"/>int <b><a href="q3tableselection.html#rightCol">rightCol</a></b> () const</li>
43
<li><div class="fn"/>int <b><a href="q3tableselection.html#topRow">topRow</a></b> () const</li>
44
<li><div class="fn"/>bool <b><a href="q3tableselection.html#operator-not-eq">operator!=</a></b> ( const Q3TableSelection & <i>s</i> ) const</li>
45
<li><div class="fn"/>bool <b><a href="q3tableselection.html#operator-eq-eq">operator==</a></b> ( const Q3TableSelection & <i>s</i> ) const</li>
47
<a name="details"></a>
49
<h2>Detailed Description</h2>
50
<p>The Q3TableSelection class provides access to a selected area in a <a href="q3table.html">Q3Table</a>.</p>
51
<p>The selection is a rectangular set of cells in a <a href="q3table.html">Q3Table</a>. One of the rectangle's cells is called the anchor cell; this is the cell that was selected first. The <a href="q3tableselection.html#init">init</a>() function sets the anchor and the selection rectangle to exactly this cell; the <a href="q3tableselection.html#expandTo">expandTo</a>() function expands the selection rectangle to include additional cells.</p>
52
<p>There are various access functions to find out about the area: <a href="q3tableselection.html#anchorRow">anchorRow</a>() and <a href="q3tableselection.html#anchorCol">anchorCol</a>() return the anchor's position; <a href="q3tableselection.html#leftCol">leftCol</a>(), <a href="q3tableselection.html#rightCol">rightCol</a>(), <a href="q3tableselection.html#topRow">topRow</a>() and <a href="q3tableselection.html#bottomRow">bottomRow</a>() return the rectangle's four edges. All four are part of the selection.</p>
53
<p>A newly created Q3TableSelection is inactive -- <a href="q3tableselection.html#isActive">isActive</a>() returns false. You must use <a href="q3tableselection.html#init">init</a>() and <a href="q3tableselection.html#expandTo">expandTo</a>() to activate it.</p>
54
<p><a href="q3table.html#selectCells">Q3Table::selectCells</a>() <a href="q3table.html#selectRow">Q3Table::selectRow</a>() <a href="q3table.html#selectColumn">Q3Table::selectColumn</a>()</p>
55
<p>See also <a href="q3table.html">Q3Table</a>, <a href="q3table.html#addSelection">Q3Table::addSelection</a>(), and <a href="q3table.html#selection">Q3Table::selection</a>().</p>
57
<h2>Member Function Documentation</h2>
58
<h3 class="fn"><a name="Q3TableSelection"></a>Q3TableSelection::Q3TableSelection ()</h3>
59
<p>Creates an inactive selection. Use <a href="q3tableselection.html#init">init</a>() and <a href="q3tableselection.html#expandTo">expandTo</a>() to activate it.</p>
60
<h3 class="fn"><a name="Q3TableSelection-2"></a>Q3TableSelection::Q3TableSelection ( int <i>start_row</i>, int <i>start_col</i>, int <i>end_row</i>, int <i>end_col</i> )</h3>
61
<p>Creates an active selection, starting at <i>start_row</i> and <i>start_col</i>, ending at <i>end_row</i> and <i>end_col</i>.</p>
62
<h3 class="fn"><a name="anchorCol"></a>int Q3TableSelection::anchorCol () const</h3>
63
<p>Returns the anchor column of the selection.</p>
64
<p>See also <a href="q3tableselection.html#anchorRow">anchorRow</a>() and <a href="q3tableselection.html#expandTo">expandTo</a>().</p>
65
<h3 class="fn"><a name="anchorRow"></a>int Q3TableSelection::anchorRow () const</h3>
66
<p>Returns the anchor row of the selection.</p>
67
<p>See also <a href="q3tableselection.html#anchorCol">anchorCol</a>() and <a href="q3tableselection.html#expandTo">expandTo</a>().</p>
68
<h3 class="fn"><a name="bottomRow"></a>int Q3TableSelection::bottomRow () const</h3>
69
<p>Returns the bottom row of the selection.</p>
70
<p>See also <a href="q3tableselection.html#topRow">topRow</a>(), <a href="q3tableselection.html#leftCol">leftCol</a>(), and <a href="q3tableselection.html#rightCol">rightCol</a>().</p>
71
<h3 class="fn"><a name="expandTo"></a>void Q3TableSelection::expandTo ( int <i>row</i>, int <i>col</i> )</h3>
72
<p>Expands the selection to include cell <i>row</i>, <i>col</i>. The new selection rectangle is the bounding rectangle of <i>row</i>, <i>col</i> and the previous selection rectangle. After calling this function the selection is active.</p>
73
<p>If you haven't called <a href="q3tableselection.html#init">init</a>(), this function does nothing.</p>
74
<p>See also <a href="q3tableselection.html#init">init</a>() and <a href="q3tableselection.html#isActive">isActive</a>().</p>
75
<h3 class="fn"><a name="init"></a>void Q3TableSelection::init ( int <i>row</i>, int <i>col</i> )</h3>
76
<p>Sets the selection anchor to cell <i>row</i>, <i>col</i> and the selection to only contain this cell. The selection is not active until <a href="q3tableselection.html#expandTo">expandTo</a>() is called.</p>
77
<p>To extend the selection to include additional cells, call <a href="q3tableselection.html#expandTo">expandTo</a>().</p>
78
<p>See also <a href="q3tableselection.html#isActive">isActive</a>().</p>
79
<h3 class="fn"><a name="isActive"></a>bool Q3TableSelection::isActive () const</h3>
80
<p>Returns whether the selection is active or not. A selection is active after <a href="q3tableselection.html#init">init</a>() <i>and</i> <a href="q3tableselection.html#expandTo">expandTo</a>() have been called.</p>
81
<h3 class="fn"><a name="isEmpty"></a>bool Q3TableSelection::isEmpty () const</h3>
82
<p>Returns whether the selection is empty or not.</p>
83
<p>See also <a href="q3tableselection.html#numRows">numRows</a>() and <a href="q3tableselection.html#numCols">numCols</a>().</p>
84
<h3 class="fn"><a name="leftCol"></a>int Q3TableSelection::leftCol () const</h3>
85
<p>Returns the left column of the selection.</p>
86
<p>See also <a href="q3tableselection.html#topRow">topRow</a>(), <a href="q3tableselection.html#bottomRow">bottomRow</a>(), and <a href="q3tableselection.html#rightCol">rightCol</a>().</p>
87
<h3 class="fn"><a name="numCols"></a>int Q3TableSelection::numCols () const</h3>
88
<p>Returns the number of columns in the selection.</p>
89
<p>See also <a href="q3tableselection.html#numRows">numRows</a>().</p>
90
<h3 class="fn"><a name="numRows"></a>int Q3TableSelection::numRows () const</h3>
91
<p>Returns the number of rows in the selection.</p>
92
<p>See also <a href="q3tableselection.html#numCols">numCols</a>().</p>
93
<h3 class="fn"><a name="rightCol"></a>int Q3TableSelection::rightCol () const</h3>
94
<p>Returns the right column of the selection.</p>
95
<p>See also <a href="q3tableselection.html#topRow">topRow</a>(), <a href="q3tableselection.html#bottomRow">bottomRow</a>(), and <a href="q3tableselection.html#leftCol">leftCol</a>().</p>
96
<h3 class="fn"><a name="topRow"></a>int Q3TableSelection::topRow () const</h3>
97
<p>Returns the top row of the selection.</p>
98
<p>See also <a href="q3tableselection.html#bottomRow">bottomRow</a>(), <a href="q3tableselection.html#leftCol">leftCol</a>(), and <a href="q3tableselection.html#rightCol">rightCol</a>().</p>
99
<h3 class="fn"><a name="operator-not-eq"></a>bool Q3TableSelection::operator!= ( const Q3TableSelection & <i>s</i> ) const</h3>
100
<p>Returns true if <i>s</i> does not include the same cells as the selection; otherwise returns false.</p>
101
<h3 class="fn"><a name="operator-eq-eq"></a>bool Q3TableSelection::operator== ( const Q3TableSelection & <i>s</i> ) const</h3>
102
<p>Returns true if <i>s</i> includes the same cells as the selection; otherwise returns false.</p>
103
<p /><address><hr /><div align="center">
104
<table width="100%" cellspacing="0" border="0"><tr class="address">
105
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
106
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
107
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
108
</tr></table></div></address></body>