<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- q3table.cpp --> <title>Qt 4.8: Q3TableSelection Class Reference</title> <link rel="stylesheet" type="text/css" href="style/style.css" /> <script src="scripts/jquery.js" type="text/javascript"></script> <script src="scripts/functions.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="style/superfish.css" /> <link rel="stylesheet" type="text/css" href="style/narrow.css" /> <!--[if IE]> <meta name="MSSmartTagsPreventParsing" content="true"> <meta http-equiv="imagetoolbar" content="no"> <![endif]--> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie6.css"> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie7.css"> <![endif]--> <!--[if IE 8]> <link rel="stylesheet" type="text/css" href="style/style_ie8.css"> <![endif]--> <script src="scripts/superfish.js" type="text/javascript"></script> <script src="scripts/narrow.js" type="text/javascript"></script> </head> <body class="" onload="CheckEmptyAndLoadList();"> <div class="header" id="qtdocheader"> <div class="content"> <div id="nav-logo"> <a href="index.html">Home</a></div> <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a> <div id="narrowsearch"></div> <div id="nav-topright"> <ul> <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li> <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li> <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/"> DOC</a></li> <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li> </ul> </div> <div id="shortCut"> <ul> <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li> <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS </a></li> </ul> </div> <ul class="sf-menu" id="narrowmenu"> <li><a href="#">API Lookup</a> <ul> <li><a href="classes.html">Class index</a></li> <li><a href="functions.html">Function index</a></li> <li><a href="modules.html">Modules</a></li> <li><a href="namespaces.html">Namespaces</a></li> <li><a href="qtglobal.html">Global Declarations</a></li> <li><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </li> <li><a href="#">Qt Topics</a> <ul> <li><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li><a href="supported-platforms.html">Supported Platforms</a></li> <li><a href="technology-apis.html">Qt and Key Technologies</a></li> <li><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </li> <li><a href="#">Examples</a> <ul> <li><a href="all-examples.html">Examples</a></li> <li><a href="tutorials.html">Tutorials</a></li> <li><a href="demos.html">Demos</a></li> <li><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </li> </ul> </div> </div> <div class="wrapper"> <div class="hd"> <span></span> </div> <div class="bd group"> <div class="sidebar"> <div class="searchlabel"> Search index:</div> <div class="search" id="sidebarsearch"> <form id="qtdocsearch" action="" onsubmit="return false;"> <fieldset> <input type="text" name="searchstring" id="pageType" value="" /> <div id="resultdialog"> <a href="#" id="resultclose">Close</a> <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span> results:</p> <ul id="resultlist" class="all"> </ul> </div> </fieldset> </form> </div> <div class="box first bottombar" id="lookup"> <h2 title="API Lookup"><span></span> API Lookup</h2> <div id="list001" class="list"> <ul id="ul001" > <li class="defaultLink"><a href="classes.html">Class index</a></li> <li class="defaultLink"><a href="functions.html">Function index</a></li> <li class="defaultLink"><a href="modules.html">Modules</a></li> <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li> <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li> <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </div> </div> <div class="box bottombar" id="topics"> <h2 title="Qt Topics"><span></span> Qt Topics</h2> <div id="list002" class="list"> <ul id="ul002" > <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li class="defaultLink"><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li> <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </div> </div> <div class="box" id="examples"> <h2 title="Examples"><span></span> Examples</h2> <div id="list003" class="list"> <ul id="ul003"> <li class="defaultLink"><a href="all-examples.html">Examples</a></li> <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li> <li class="defaultLink"><a href="demos.html">Demos</a></li> <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </div> </div> </div> <div class="wrap"> <div class="toolbar"> <div class="breadcrumb toolblock"> <ul> <li class="first"><a href="index.html">Home</a></li> <!-- Breadcrumbs go here --> <li><a href="modules.html">Modules</a></li> <li><a href="qt3support.html">Qt3Support</a></li> <li>Q3TableSelection</li> </ul> </div> <div class="toolbuttons toolblock"> <ul> <li id="smallA" class="t_button">A</li> <li id="medA" class="t_button active">A</li> <li id="bigA" class="t_button">A</li> <li id="print" class="t_button"><a href="javascript:this.print();"> <span>Print</span></a></li> </ul> </div> </div> <div class="content mainContent"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <h1 class="title">Q3TableSelection Class Reference</h1> <!-- $$$Q3TableSelection-brief --> <p>The Q3TableSelection class provides access to a selected area in a <a href="q3table.html">Q3Table</a>. <a href="#details">More...</a></p> <!-- @@@Q3TableSelection --> <pre class="cpp"> <span class="preprocessor">#include <Q3TableSelection></span></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 <a href="porting4.html">Porting to Qt 4</a> for more information.</p> <ul> <li><a href="q3tableselection-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h2>Public Functions</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#Q3TableSelection">Q3TableSelection</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><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> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#anchorCol">anchorCol</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#anchorRow">anchorRow</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#bottomRow">bottomRow</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#expandTo">expandTo</a></b> ( int <i>row</i>, int <i>col</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#init">init</a></b> ( int <i>row</i>, int <i>col</i> )</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#isActive">isActive</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#isEmpty">isEmpty</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#leftCol">leftCol</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#numCols">numCols</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#numRows">numRows</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#rightCol">rightCol</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#topRow">topRow</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#operator-not-eq">operator!=</a></b> ( const Q3TableSelection & <i>s</i> ) const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3tableselection.html#operator-eq-eq">operator==</a></b> ( const Q3TableSelection & <i>s</i> ) const</td></tr> </table> <a name="details"></a> <!-- $$$Q3TableSelection-description --> <div class="descr"> <h2>Detailed Description</h2> <p>The Q3TableSelection class provides access to a selected area in a <a href="q3table.html">Q3Table</a>.</p> <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> <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> <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> <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> </div> <p><b>See also </b><a href="q3table.html">Q3Table</a>, <a href="q3table.html#addSelection">Q3Table::addSelection</a>(), and <a href="q3table.html#selection">Q3Table::selection</a>().</p> <!-- @@@Q3TableSelection --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$Q3TableSelection[overload1]$$$Q3TableSelection --> <h3 class="fn"><a name="Q3TableSelection"></a>Q3TableSelection::<span class="name">Q3TableSelection</span> ()</h3> <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> <!-- @@@Q3TableSelection --> <!-- $$$Q3TableSelection$$$Q3TableSelectionintintintint --> <h3 class="fn"><a name="Q3TableSelection-2"></a>Q3TableSelection::<span class="name">Q3TableSelection</span> ( <span class="type">int</span> <i>start_row</i>, <span class="type">int</span> <i>start_col</i>, <span class="type">int</span> <i>end_row</i>, <span class="type">int</span> <i>end_col</i> )</h3> <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> <!-- @@@Q3TableSelection --> <!-- $$$anchorCol[overload1]$$$anchorCol --> <h3 class="fn"><a name="anchorCol"></a><span class="type">int</span> Q3TableSelection::<span class="name">anchorCol</span> () const</h3> <p>Returns the anchor column of the selection.</p> <p><b>See also </b><a href="q3tableselection.html#anchorRow">anchorRow</a>() and <a href="q3tableselection.html#expandTo">expandTo</a>().</p> <!-- @@@anchorCol --> <!-- $$$anchorRow[overload1]$$$anchorRow --> <h3 class="fn"><a name="anchorRow"></a><span class="type">int</span> Q3TableSelection::<span class="name">anchorRow</span> () const</h3> <p>Returns the anchor row of the selection.</p> <p><b>See also </b><a href="q3tableselection.html#anchorCol">anchorCol</a>() and <a href="q3tableselection.html#expandTo">expandTo</a>().</p> <!-- @@@anchorRow --> <!-- $$$bottomRow[overload1]$$$bottomRow --> <h3 class="fn"><a name="bottomRow"></a><span class="type">int</span> Q3TableSelection::<span class="name">bottomRow</span> () const</h3> <p>Returns the bottom row of the selection.</p> <p><b>See also </b><a href="q3tableselection.html#topRow">topRow</a>(), <a href="q3tableselection.html#leftCol">leftCol</a>(), and <a href="q3tableselection.html#rightCol">rightCol</a>().</p> <!-- @@@bottomRow --> <!-- $$$expandTo[overload1]$$$expandTointint --> <h3 class="fn"><a name="expandTo"></a><span class="type">void</span> Q3TableSelection::<span class="name">expandTo</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i> )</h3> <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> <p>If you haven't called <a href="q3tableselection.html#init">init</a>(), this function does nothing.</p> <p><b>See also </b><a href="q3tableselection.html#init">init</a>() and <a href="q3tableselection.html#isActive">isActive</a>().</p> <!-- @@@expandTo --> <!-- $$$init[overload1]$$$initintint --> <h3 class="fn"><a name="init"></a><span class="type">void</span> Q3TableSelection::<span class="name">init</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i> )</h3> <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> <p>To extend the selection to include additional cells, call <a href="q3tableselection.html#expandTo">expandTo</a>().</p> <p><b>See also </b><a href="q3tableselection.html#isActive">isActive</a>().</p> <!-- @@@init --> <!-- $$$isActive[overload1]$$$isActive --> <h3 class="fn"><a name="isActive"></a><span class="type">bool</span> Q3TableSelection::<span class="name">isActive</span> () const</h3> <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> <!-- @@@isActive --> <!-- $$$isEmpty[overload1]$$$isEmpty --> <h3 class="fn"><a name="isEmpty"></a><span class="type">bool</span> Q3TableSelection::<span class="name">isEmpty</span> () const</h3> <p>Returns whether the selection is empty or not.</p> <p><b>See also </b><a href="q3tableselection.html#numRows">numRows</a>() and <a href="q3tableselection.html#numCols">numCols</a>().</p> <!-- @@@isEmpty --> <!-- $$$leftCol[overload1]$$$leftCol --> <h3 class="fn"><a name="leftCol"></a><span class="type">int</span> Q3TableSelection::<span class="name">leftCol</span> () const</h3> <p>Returns the left column of the selection.</p> <p><b>See also </b><a href="q3tableselection.html#topRow">topRow</a>(), <a href="q3tableselection.html#bottomRow">bottomRow</a>(), and <a href="q3tableselection.html#rightCol">rightCol</a>().</p> <!-- @@@leftCol --> <!-- $$$numCols[overload1]$$$numCols --> <h3 class="fn"><a name="numCols"></a><span class="type">int</span> Q3TableSelection::<span class="name">numCols</span> () const</h3> <p>Returns the number of columns in the selection.</p> <p><b>See also </b><a href="q3tableselection.html#numRows">numRows</a>().</p> <!-- @@@numCols --> <!-- $$$numRows[overload1]$$$numRows --> <h3 class="fn"><a name="numRows"></a><span class="type">int</span> Q3TableSelection::<span class="name">numRows</span> () const</h3> <p>Returns the number of rows in the selection.</p> <p><b>See also </b><a href="q3tableselection.html#numCols">numCols</a>().</p> <!-- @@@numRows --> <!-- $$$rightCol[overload1]$$$rightCol --> <h3 class="fn"><a name="rightCol"></a><span class="type">int</span> Q3TableSelection::<span class="name">rightCol</span> () const</h3> <p>Returns the right column of the selection.</p> <p><b>See also </b><a href="q3tableselection.html#topRow">topRow</a>(), <a href="q3tableselection.html#bottomRow">bottomRow</a>(), and <a href="q3tableselection.html#leftCol">leftCol</a>().</p> <!-- @@@rightCol --> <!-- $$$topRow[overload1]$$$topRow --> <h3 class="fn"><a name="topRow"></a><span class="type">int</span> Q3TableSelection::<span class="name">topRow</span> () const</h3> <p>Returns the top row of the selection.</p> <p><b>See also </b><a href="q3tableselection.html#bottomRow">bottomRow</a>(), <a href="q3tableselection.html#leftCol">leftCol</a>(), and <a href="q3tableselection.html#rightCol">rightCol</a>().</p> <!-- @@@topRow --> <!-- $$$operator!=[overload1]$$$operator!=constQ3TableSelection& --> <h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> Q3TableSelection::<span class="name">operator!=</span> ( const <span class="type">Q3TableSelection</span> & <i>s</i> ) const</h3> <p>Returns true if <i>s</i> does not include the same cells as the selection; otherwise returns false.</p> <!-- @@@operator!= --> <!-- $$$operator==[overload1]$$$operator==constQ3TableSelection& --> <h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> Q3TableSelection::<span class="name">operator==</span> ( const <span class="type">Q3TableSelection</span> & <i>s</i> ) const</h3> <p>Returns true if <i>s</i> includes the same cells as the selection; otherwise returns false.</p> <!-- @@@operator== --> </div> </div> </div> </div> <div class="ft"> <span></span> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.</p> <br /> <p> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.</p> <p> Documentation sources may be obtained from <a href="http://www.qt-project.org"> www.qt-project.org</a>.</p> <br /> <p> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. <a title="Privacy Policy" href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p> </div> <script src="scripts/functions.js" type="text/javascript"></script> </body> </html>