You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tqt3/doc/html/qtableselection.html

189 lines
9.1 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/table/qtable.cpp:194 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>TQTableSelection Class</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
<a href="index.html">
<font color="#004faf">Home</font></a>
| <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
| <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
| <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
| <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
| <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>TQTableSelection Class Reference<br><small>[<a href="table.html">table module</a>]</small></h1>
<p>The TQTableSelection class provides access to a selected area in a
TQTable.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qtable-h.html">ntqtable.h</a>&gt;</tt>
<p><a href="qtableselection-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn><a href="#TQTableSelection"><b>TQTableSelection</b></a> ()</li>
<li class=fn><a href="#TQTableSelection-2"><b>TQTableSelection</b></a> ( int&nbsp;start_row, int&nbsp;start_col, int&nbsp;end_row, int&nbsp;end_col )</li>
<li class=fn>void <a href="#init"><b>init</b></a> ( int&nbsp;row, int&nbsp;col )</li>
<li class=fn>void <a href="#expandTo"><b>expandTo</b></a> ( int&nbsp;row, int&nbsp;col )</li>
<li class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const&nbsp;TQTableSelection&nbsp;&amp;&nbsp;s ) const</li>
<li class=fn>bool <a href="#operator!-eq"><b>operator!=</b></a> ( const&nbsp;TQTableSelection&nbsp;&amp;&nbsp;s ) const</li>
<li class=fn>int <a href="#topRow"><b>topRow</b></a> () const</li>
<li class=fn>int <a href="#bottomRow"><b>bottomRow</b></a> () const</li>
<li class=fn>int <a href="#leftCol"><b>leftCol</b></a> () const</li>
<li class=fn>int <a href="#rightCol"><b>rightCol</b></a> () const</li>
<li class=fn>int <a href="#anchorRow"><b>anchorRow</b></a> () const</li>
<li class=fn>int <a href="#anchorCol"><b>anchorCol</b></a> () const</li>
<li class=fn>int <a href="#numRows"><b>numRows</b></a> () const</li>
<li class=fn>int <a href="#numCols"><b>numCols</b></a> () const</li>
<li class=fn>bool <a href="#isActive"><b>isActive</b></a> () const</li>
<li class=fn>bool <a href="#isEmpty"><b>isEmpty</b></a> () const</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
The TQTableSelection class provides access to a selected area in a
<a href="ntqtable.html">TQTable</a>.
<p>
<p> The selection is a rectangular set of cells in a TQTable. One of
the rectangle's cells is called the anchor cell; this is the cell
that was selected first. The <a href="#init">init</a>() function sets the anchor and
the selection rectangle to exactly this cell; the <a href="#expandTo">expandTo</a>()
function expands the selection rectangle to include additional
cells.
<p> There are various access functions to find out about the area:
<a href="#anchorRow">anchorRow</a>() and <a href="#anchorCol">anchorCol</a>() return the anchor's position;
<a href="#leftCol">leftCol</a>(), <a href="#rightCol">rightCol</a>(), <a href="#topRow">topRow</a>() and <a href="#bottomRow">bottomRow</a>() return the
rectangle's four edges. All four are part of the selection.
<p> A newly created TQTableSelection is inactive -- <a href="#isActive">isActive</a>() returns
FALSE. You must use init() and expandTo() to activate it.
<p> <p>See also <a href="ntqtable.html">TQTable</a>, <a href="ntqtable.html#addSelection">TQTable::addSelection</a>(), <a href="ntqtable.html#selection">TQTable::selection</a>(), <a href="ntqtable.html#selectCells">TQTable::selectCells</a>(), <a href="ntqtable.html#selectRow">TQTable::selectRow</a>(), <a href="ntqtable.html#selectColumn">TQTable::selectColumn</a>(), and <a href="advanced.html">Advanced Widgets</a>.
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="TQTableSelection"></a>TQTableSelection::TQTableSelection ()
</h3>
Creates an inactive selection. Use <a href="#init">init</a>() and <a href="#expandTo">expandTo</a>() to
activate it.
<h3 class=fn><a name="TQTableSelection-2"></a>TQTableSelection::TQTableSelection ( int&nbsp;start_row, int&nbsp;start_col, int&nbsp;end_row, int&nbsp;end_col )
</h3>
Creates 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>.
<h3 class=fn>int <a name="anchorCol"></a>TQTableSelection::anchorCol () const
</h3>
<p> Returns the anchor column of the selection.
<p> <p>See also <a href="#anchorRow">anchorRow</a>() and <a href="#expandTo">expandTo</a>().
<h3 class=fn>int <a name="anchorRow"></a>TQTableSelection::anchorRow () const
</h3>
<p> Returns the anchor row of the selection.
<p> <p>See also <a href="#anchorCol">anchorCol</a>() and <a href="#expandTo">expandTo</a>().
<h3 class=fn>int <a name="bottomRow"></a>TQTableSelection::bottomRow () const
</h3>
<p> Returns the bottom row of the selection.
<p> <p>See also <a href="#topRow">topRow</a>(), <a href="#leftCol">leftCol</a>(), and <a href="#rightCol">rightCol</a>().
<h3 class=fn>void <a name="expandTo"></a>TQTableSelection::expandTo ( int&nbsp;row, int&nbsp;col )
</h3>
Expands the selection to include cell <em>row</em>, <em>col</em>. The new
selection rectangle is the bounding rectangle of <em>row</em>, <em>col</em>
and the previous selection rectangle. After calling this function
the selection is active.
<p> If you haven't called <a href="#init">init</a>(), this function does nothing.
<p> <p>See also <a href="#init">init</a>() and <a href="#isActive">isActive</a>().
<h3 class=fn>void <a name="init"></a>TQTableSelection::init ( int&nbsp;row, int&nbsp;col )
</h3>
Sets the selection anchor to cell <em>row</em>, <em>col</em> and the selection
to only contain this cell. The selection is not active until
<a href="#expandTo">expandTo</a>() is called.
<p> To extend the selection to include additional cells, call
expandTo().
<p> <p>See also <a href="#isActive">isActive</a>().
<h3 class=fn>bool <a name="isActive"></a>TQTableSelection::isActive () const
</h3>
<p> Returns whether the selection is active or not. A selection is
active after <a href="#init">init</a>() <em>and</em> <a href="#expandTo">expandTo</a>() have been called.
<h3 class=fn>bool <a name="isEmpty"></a>TQTableSelection::isEmpty () const
</h3>
<p> Returns whether the selection is empty or not.
<p> <p>See also <a href="#numRows">numRows</a>() and <a href="#numCols">numCols</a>().
<h3 class=fn>int <a name="leftCol"></a>TQTableSelection::leftCol () const
</h3>
<p> Returns the left column of the selection.
<p> <p>See also <a href="#topRow">topRow</a>(), <a href="#bottomRow">bottomRow</a>(), and <a href="#rightCol">rightCol</a>().
<h3 class=fn>int <a name="numCols"></a>TQTableSelection::numCols () const
</h3>
Returns the number of columns in the selection.
<p> <p>See also <a href="#numRows">numRows</a>().
<h3 class=fn>int <a name="numRows"></a>TQTableSelection::numRows () const
</h3>
<p> Returns the number of rows in the selection.
<p> <p>See also <a href="#numCols">numCols</a>().
<h3 class=fn>bool <a name="operator!-eq"></a>TQTableSelection::operator!= ( const&nbsp;<a href="qtableselection.html">TQTableSelection</a>&nbsp;&amp;&nbsp;s ) const
</h3>
<p> Returns TRUE if <em>s</em> does not include the same cells as the
selection; otherwise returns FALSE.
<h3 class=fn>bool <a name="operator-eq-eq"></a>TQTableSelection::operator== ( const&nbsp;<a href="qtableselection.html">TQTableSelection</a>&nbsp;&amp;&nbsp;s ) const
</h3>
Returns TRUE if <em>s</em> includes the same cells as the selection;
otherwise returns FALSE.
<h3 class=fn>int <a name="rightCol"></a>TQTableSelection::rightCol () const
</h3>
<p> Returns the right column of the selection.
<p> <p>See also <a href="#topRow">topRow</a>(), <a href="#bottomRow">bottomRow</a>(), and <a href="#leftCol">leftCol</a>().
<h3 class=fn>int <a name="topRow"></a>TQTableSelection::topRow () const
</h3>
<p> Returns the top row of the selection.
<p> <p>See also <a href="#bottomRow">bottomRow</a>(), <a href="#leftCol">leftCol</a>(), and <a href="#rightCol">rightCol</a>().
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">TQt toolkit</a>.
Copyright &copy; 1995-2007
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>TQt 3.3.8</div>
</table></div></address></body>
</html>