Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 5604

qt-doc-4.8.5-10.fc18.noarch.rpm

<?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" />
<!-- qitemselectionmodel.cpp -->
  <title>Qt 4.8: QItemSelectionModel 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 &amp; 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>&nbsp;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 &amp; 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="qtgui.html">QtGui</a></li>
<li>QItemSelectionModel</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-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QItemSelectionModel Class Reference</h1>
<!-- $$$QItemSelectionModel-brief -->
<p>The QItemSelectionModel class keeps track of a view's selected items. <a href="#details">More...</a></p>
<!-- @@@QItemSelectionModel -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QItemSelectionModel&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<ul>
<li><a href="qitemselectionmodel-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#SelectionFlag-enum">SelectionFlag</a></b> { NoUpdate, Clear, Select, Deselect, ..., ClearAndSelect }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#SelectionFlag-enum">SelectionFlags</a></b></td></tr>
</table>
<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="qitemselectionmodel.html#QItemSelectionModel">QItemSelectionModel</a></b> ( QAbstractItemModel * <i>model</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#QItemSelectionModel-2">QItemSelectionModel</a></b> ( QAbstractItemModel * <i>model</i>, QObject * <i>parent</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#dtor.QItemSelectionModel">~QItemSelectionModel</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#columnIntersectsSelection">columnIntersectsSelection</a></b> ( int <i>column</i>, const QModelIndex &amp; <i>parent</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#currentIndex">currentIndex</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#hasSelection">hasSelection</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#isColumnSelected">isColumnSelected</a></b> ( int <i>column</i>, const QModelIndex &amp; <i>parent</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#isRowSelected">isRowSelected</a></b> ( int <i>row</i>, const QModelIndex &amp; <i>parent</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#isSelected">isSelected</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QAbstractItemModel * </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#model">model</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#rowIntersectsSelection">rowIntersectsSelection</a></b> ( int <i>row</i>, const QModelIndex &amp; <i>parent</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndexList </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#selectedColumns">selectedColumns</a></b> ( int <i>row</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndexList </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#selectedIndexes">selectedIndexes</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndexList </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#selectedRows">selectedRows</a></b> ( int <i>column</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QItemSelection </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#selection">selection</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#clearSelection">clearSelection</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#reset">reset</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#select">select</a></b> ( const QModelIndex &amp; <i>index</i>, QItemSelectionModel::SelectionFlags <i>command</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#select-2">select</a></b> ( const QItemSelection &amp; <i>selection</i>, QItemSelectionModel::SelectionFlags <i>command</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#setCurrentIndex">setCurrentIndex</a></b> ( const QModelIndex &amp; <i>index</i>, QItemSelectionModel::SelectionFlags <i>command</i> )</td></tr>
</table>
<ul>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#currentChanged">currentChanged</a></b> ( const QModelIndex &amp; <i>current</i>, const QModelIndex &amp; <i>previous</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#currentColumnChanged">currentColumnChanged</a></b> ( const QModelIndex &amp; <i>current</i>, const QModelIndex &amp; <i>previous</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#currentRowChanged">currentRowChanged</a></b> ( const QModelIndex &amp; <i>current</i>, const QModelIndex &amp; <i>previous</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#selectionChanged">selectionChanged</a></b> ( const QItemSelection &amp; <i>selected</i>, const QItemSelection &amp; <i>deselected</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#emitSelectionChanged">emitSelectionChanged</a></b> ( const QItemSelection &amp; <i>newSelection</i>, const QItemSelection &amp; <i>oldSelection</i> )</td></tr>
</table>
<ul>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QItemSelectionModel-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QItemSelectionModel class keeps track of a view's selected items.</p>
<p>A QItemSelectionModel keeps track of the selected items in a view, or in several views onto the same model. It also keeps track of the currently selected item in a view.</p>
<p>The QItemSelectionModel class is one of the <a href="model-view.html">Model/View Classes</a> and is part of Qt's <a href="model-view-programming.html">model/view framework</a>.</p>
<p>The selected items are stored using ranges. Whenever you want to modify the selected items use <a href="qitemselectionmodel.html#select">select</a>() and provide either a <a href="qitemselection.html">QItemSelection</a>, or a <a href="qmodelindex.html">QModelIndex</a> and a <a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlag</a>.</p>
<p>The QItemSelectionModel takes a two layer approach to selection management, dealing with both selected items that have been committed and items that are part of the current selection. The current selected items are part of the current interactive selection (for example with rubber-band selection or keyboard-shift selections).</p>
<p>To update the currently selected items, use the bitwise OR of <a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::Current</a> and any of the other <a href="qitemselectionmodel.html#SelectionFlag-enum">SelectionFlags</a>. If you omit the <a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::Current</a> command, a new current selection will be created, and the previous one added to the whole selection. All functions operate on both layers; for example, selectedItems() will return items from both layers.</p>
</div>
<p><b>See also </b><a href="model-view-programming.html">Model/View Programming</a>, <a href="qabstractitemmodel.html">QAbstractItemModel</a>, and <a href="itemviews-chart.html">Chart Example</a>.</p>
<!-- @@@QItemSelectionModel -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$SelectionFlag$$$NoUpdate$$$Clear$$$Select$$$Deselect$$$Toggle$$$Current$$$Rows$$$Columns$$$SelectCurrent$$$ToggleCurrent$$$ClearAndSelect -->
<h3 class="flags"><a name="SelectionFlag-enum"></a>enum QItemSelectionModel::<span class="name">SelectionFlag</span><br/>flags QItemSelectionModel::<span class="name">SelectionFlags</span></h3>
<p>This enum describes the way the selection model will be updated.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QItemSelectionModel::NoUpdate</tt></td><td class="topAlign"><tt>0x0000</tt></td><td class="topAlign">No selection will be made.</td></tr>
<tr><td class="topAlign"><tt>QItemSelectionModel::Clear</tt></td><td class="topAlign"><tt>0x0001</tt></td><td class="topAlign">The complete selection will be cleared.</td></tr>
<tr><td class="topAlign"><tt>QItemSelectionModel::Select</tt></td><td class="topAlign"><tt>0x0002</tt></td><td class="topAlign">All specified indexes will be selected.</td></tr>
<tr><td class="topAlign"><tt>QItemSelectionModel::Deselect</tt></td><td class="topAlign"><tt>0x0004</tt></td><td class="topAlign">All specified indexes will be deselected.</td></tr>
<tr><td class="topAlign"><tt>QItemSelectionModel::Toggle</tt></td><td class="topAlign"><tt>0x0008</tt></td><td class="topAlign">All specified indexes will be selected or deselected depending on their current state.</td></tr>
<tr><td class="topAlign"><tt>QItemSelectionModel::Current</tt></td><td class="topAlign"><tt>0x0010</tt></td><td class="topAlign">The current selection will be updated.</td></tr>
<tr><td class="topAlign"><tt>QItemSelectionModel::Rows</tt></td><td class="topAlign"><tt>0x0020</tt></td><td class="topAlign">All indexes will be expanded to span rows.</td></tr>
<tr><td class="topAlign"><tt>QItemSelectionModel::Columns</tt></td><td class="topAlign"><tt>0x0040</tt></td><td class="topAlign">All indexes will be expanded to span columns.</td></tr>
<tr><td class="topAlign"><tt>QItemSelectionModel::SelectCurrent</tt></td><td class="topAlign"><tt>Select | Current</tt></td><td class="topAlign">A combination of Select and Current, provided for convenience.</td></tr>
<tr><td class="topAlign"><tt>QItemSelectionModel::ToggleCurrent</tt></td><td class="topAlign"><tt>Toggle | Current</tt></td><td class="topAlign">A combination of Toggle and Current, provided for convenience.</td></tr>
<tr><td class="topAlign"><tt>QItemSelectionModel::ClearAndSelect</tt></td><td class="topAlign"><tt>Clear | Select</tt></td><td class="topAlign">A combination of Clear and Select, provided for convenience.</td></tr>
</table>
<p>The SelectionFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;SelectionFlag&gt;. It stores an OR combination of SelectionFlag values.</p>
<!-- @@@SelectionFlag -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QItemSelectionModel[overload1]$$$QItemSelectionModelQAbstractItemModel* -->
<h3 class="fn"><a name="QItemSelectionModel"></a>QItemSelectionModel::<span class="name">QItemSelectionModel</span> ( <span class="type"><a href="qabstractitemmodel.html">QAbstractItemModel</a></span> * <i>model</i> )</h3>
<p>Constructs a selection model that operates on the specified item <i>model</i>.</p>
<!-- @@@QItemSelectionModel -->
<!-- $$$QItemSelectionModel$$$QItemSelectionModelQAbstractItemModel*QObject* -->
<h3 class="fn"><a name="QItemSelectionModel-2"></a>QItemSelectionModel::<span class="name">QItemSelectionModel</span> ( <span class="type"><a href="qabstractitemmodel.html">QAbstractItemModel</a></span> * <i>model</i>, <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> )</h3>
<p>Constructs a selection model that operates on the specified item <i>model</i> with <i>parent</i>.</p>
<!-- @@@QItemSelectionModel -->
<!-- $$$~QItemSelectionModel[overload1]$$$~QItemSelectionModel -->
<h3 class="fn"><a name="dtor.QItemSelectionModel"></a>QItemSelectionModel::<span class="name">~QItemSelectionModel</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the selection model.</p>
<!-- @@@~QItemSelectionModel -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> QItemSelectionModel::<span class="name">clear</span> ()<tt> [virtual slot]</tt></h3>
<p>Clears the selection model. Emits <a href="qitemselectionmodel.html#selectionChanged">selectionChanged</a>() and <a href="qitemselectionmodel.html#currentChanged">currentChanged</a>().</p>
<!-- @@@clear -->
<!-- $$$clearSelection[overload1]$$$clearSelection -->
<h3 class="fn"><a name="clearSelection"></a><span class="type">void</span> QItemSelectionModel::<span class="name">clearSelection</span> ()<tt> [slot]</tt></h3>
<p>Clears the selection in the selection model. Emits <a href="qitemselectionmodel.html#selectionChanged">selectionChanged</a>().</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@clearSelection -->
<!-- $$$columnIntersectsSelection[overload1]$$$columnIntersectsSelectionintconstQModelIndex& -->
<h3 class="fn"><a name="columnIntersectsSelection"></a><span class="type">bool</span> QItemSelectionModel::<span class="name">columnIntersectsSelection</span> ( <span class="type">int</span> <i>column</i>, const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>parent</i> ) const</h3>
<p>Returns true if there are any items selected in the <i>column</i> with the given <i>parent</i>.</p>
<!-- @@@columnIntersectsSelection -->
<!-- $$$currentChanged[overload1]$$$currentChangedconstQModelIndex&constQModelIndex& -->
<h3 class="fn"><a name="currentChanged"></a><span class="type">void</span> QItemSelectionModel::<span class="name">currentChanged</span> ( const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>current</i>, const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>previous</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the current item changes. The <i>previous</i> model item index is replaced by the <i>current</i> index as the selection's current item.</p>
<p>Note that this signal will not be emitted when the item model is reset.</p>
<p><b>See also </b><a href="qitemselectionmodel.html#currentIndex">currentIndex</a>(), <a href="qitemselectionmodel.html#setCurrentIndex">setCurrentIndex</a>(), and <a href="qitemselectionmodel.html#selectionChanged">selectionChanged</a>().</p>
<!-- @@@currentChanged -->
<!-- $$$currentColumnChanged[overload1]$$$currentColumnChangedconstQModelIndex&constQModelIndex& -->
<h3 class="fn"><a name="currentColumnChanged"></a><span class="type">void</span> QItemSelectionModel::<span class="name">currentColumnChanged</span> ( const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>current</i>, const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>previous</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted if the <i>current</i> item changes and its column is different to the column of the <i>previous</i> current item.</p>
<p>Note that this signal will not be emitted when the item model is reset.</p>
<p><b>See also </b><a href="qitemselectionmodel.html#currentChanged">currentChanged</a>(), <a href="qitemselectionmodel.html#currentRowChanged">currentRowChanged</a>(), <a href="qitemselectionmodel.html#currentIndex">currentIndex</a>(), and <a href="qitemselectionmodel.html#setCurrentIndex">setCurrentIndex</a>().</p>
<!-- @@@currentColumnChanged -->
<!-- $$$currentIndex[overload1]$$$currentIndex -->
<h3 class="fn"><a name="currentIndex"></a><span class="type"><a href="qmodelindex.html">QModelIndex</a></span> QItemSelectionModel::<span class="name">currentIndex</span> () const</h3>
<p>Returns the model item index for the current item, or an invalid index if there is no current item.</p>
<p><b>See also </b><a href="qitemselectionmodel.html#setCurrentIndex">setCurrentIndex</a>().</p>
<!-- @@@currentIndex -->
<!-- $$$currentRowChanged[overload1]$$$currentRowChangedconstQModelIndex&constQModelIndex& -->
<h3 class="fn"><a name="currentRowChanged"></a><span class="type">void</span> QItemSelectionModel::<span class="name">currentRowChanged</span> ( const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>current</i>, const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>previous</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted if the <i>current</i> item changes and its row is different to the row of the <i>previous</i> current item.</p>
<p>Note that this signal will not be emitted when the item model is reset.</p>
<p><b>See also </b><a href="qitemselectionmodel.html#currentChanged">currentChanged</a>(), <a href="qitemselectionmodel.html#currentColumnChanged">currentColumnChanged</a>(), <a href="qitemselectionmodel.html#currentIndex">currentIndex</a>(), and <a href="qitemselectionmodel.html#setCurrentIndex">setCurrentIndex</a>().</p>
<!-- @@@currentRowChanged -->
<!-- $$$emitSelectionChanged[overload1]$$$emitSelectionChangedconstQItemSelection&constQItemSelection& -->
<h3 class="fn"><a name="emitSelectionChanged"></a><span class="type">void</span> QItemSelectionModel::<span class="name">emitSelectionChanged</span> ( const <span class="type"><a href="qitemselection.html">QItemSelection</a></span> &amp; <i>newSelection</i>, const <span class="type"><a href="qitemselection.html">QItemSelection</a></span> &amp; <i>oldSelection</i> )<tt> [protected]</tt></h3>
<p>Compares the two selections <i>newSelection</i> and <i>oldSelection</i> and emits <a href="qitemselectionmodel.html#selectionChanged">selectionChanged</a>() with the deselected and selected items.</p>
<!-- @@@emitSelectionChanged -->
<!-- $$$hasSelection[overload1]$$$hasSelection -->
<h3 class="fn"><a name="hasSelection"></a><span class="type">bool</span> QItemSelectionModel::<span class="name">hasSelection</span> () const</h3>
<p>Returns true if the selection model contains any selection ranges; otherwise returns false.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@hasSelection -->
<!-- $$$isColumnSelected[overload1]$$$isColumnSelectedintconstQModelIndex& -->
<h3 class="fn"><a name="isColumnSelected"></a><span class="type">bool</span> QItemSelectionModel::<span class="name">isColumnSelected</span> ( <span class="type">int</span> <i>column</i>, const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>parent</i> ) const</h3>
<p>Returns true if all items are selected in the <i>column</i> with the given <i>parent</i>.</p>
<p>Note that this function is usually faster than calling <a href="qitemselectionmodel.html#isSelected">isSelected</a>() on all items in the same column and that unselectable items are ignored.</p>
<!-- @@@isColumnSelected -->
<!-- $$$isRowSelected[overload1]$$$isRowSelectedintconstQModelIndex& -->
<h3 class="fn"><a name="isRowSelected"></a><span class="type">bool</span> QItemSelectionModel::<span class="name">isRowSelected</span> ( <span class="type">int</span> <i>row</i>, const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>parent</i> ) const</h3>
<p>Returns true if all items are selected in the <i>row</i> with the given <i>parent</i>.</p>
<p>Note that this function is usually faster than calling <a href="qitemselectionmodel.html#isSelected">isSelected</a>() on all items in the same row and that unselectable items are ignored.</p>
<!-- @@@isRowSelected -->
<!-- $$$isSelected[overload1]$$$isSelectedconstQModelIndex& -->
<h3 class="fn"><a name="isSelected"></a><span class="type">bool</span> QItemSelectionModel::<span class="name">isSelected</span> ( const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>index</i> ) const</h3>
<p>Returns true if the given model item <i>index</i> is selected.</p>
<!-- @@@isSelected -->
<!-- $$$model[overload1]$$$model -->
<h3 class="fn"><a name="model"></a>const <span class="type"><a href="qabstractitemmodel.html">QAbstractItemModel</a></span> * QItemSelectionModel::<span class="name">model</span> () const</h3>
<p>Returns the item model operated on by the selection model.</p>
<!-- @@@model -->
<!-- $$$reset[overload1]$$$reset -->
<h3 class="fn"><a name="reset"></a><span class="type">void</span> QItemSelectionModel::<span class="name">reset</span> ()<tt> [virtual slot]</tt></h3>
<p>Clears the selection model. Does not emit any signals.</p>
<!-- @@@reset -->
<!-- $$$rowIntersectsSelection[overload1]$$$rowIntersectsSelectionintconstQModelIndex& -->
<h3 class="fn"><a name="rowIntersectsSelection"></a><span class="type">bool</span> QItemSelectionModel::<span class="name">rowIntersectsSelection</span> ( <span class="type">int</span> <i>row</i>, const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>parent</i> ) const</h3>
<p>Returns true if there are any items selected in the <i>row</i> with the given <i>parent</i>.</p>
<!-- @@@rowIntersectsSelection -->
<!-- $$$select[overload1]$$$selectconstQModelIndex&QItemSelectionModel::SelectionFlags -->
<h3 class="fn"><a name="select"></a><span class="type">void</span> QItemSelectionModel::<span class="name">select</span> ( const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>index</i>, <span class="type"><a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a></span> <i>command</i> )<tt> [virtual slot]</tt></h3>
<p>Selects the model item <i>index</i> using the specified <i>command</i>, and emits <a href="qitemselectionmodel.html#selectionChanged">selectionChanged</a>().</p>
<p><b>See also </b><a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a>.</p>
<!-- @@@select -->
<!-- $$$select$$$selectconstQItemSelection&QItemSelectionModel::SelectionFlags -->
<h3 class="fn"><a name="select-2"></a><span class="type">void</span> QItemSelectionModel::<span class="name">select</span> ( const <span class="type"><a href="qitemselection.html">QItemSelection</a></span> &amp; <i>selection</i>, <span class="type"><a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a></span> <i>command</i> )<tt> [virtual slot]</tt></h3>
<p>Selects the item <i>selection</i> using the specified <i>command</i>, and emits <a href="qitemselectionmodel.html#selectionChanged">selectionChanged</a>().</p>
<p><b>See also </b><a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlag</a>.</p>
<!-- @@@select -->
<!-- $$$selectedColumns[overload1]$$$selectedColumnsint -->
<h3 class="fn"><a name="selectedColumns"></a><span class="type"><a href="qmodelindex.html#QModelIndexList-typedef">QModelIndexList</a></span> QItemSelectionModel::<span class="name">selectedColumns</span> ( <span class="type">int</span> <i>row</i> = 0 ) const</h3>
<p>Returns the indexes in the given <i>row</i> for columns where all rows are selected.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qitemselectionmodel.html#selectedIndexes">selectedIndexes</a>() and <a href="qitemselectionmodel.html#selectedRows">selectedRows</a>().</p>
<!-- @@@selectedColumns -->
<!-- $$$selectedIndexes[overload1]$$$selectedIndexes -->
<h3 class="fn"><a name="selectedIndexes"></a><span class="type"><a href="qmodelindex.html#QModelIndexList-typedef">QModelIndexList</a></span> QItemSelectionModel::<span class="name">selectedIndexes</span> () const</h3>
<p>Returns a list of all selected model item indexes. The list contains no duplicates, and is not sorted.</p>
<!-- @@@selectedIndexes -->
<!-- $$$selectedRows[overload1]$$$selectedRowsint -->
<h3 class="fn"><a name="selectedRows"></a><span class="type"><a href="qmodelindex.html#QModelIndexList-typedef">QModelIndexList</a></span> QItemSelectionModel::<span class="name">selectedRows</span> ( <span class="type">int</span> <i>column</i> = 0 ) const</h3>
<p>Returns the indexes in the given <i>column</i> for the rows where all columns are selected.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qitemselectionmodel.html#selectedIndexes">selectedIndexes</a>() and <a href="qitemselectionmodel.html#selectedColumns">selectedColumns</a>().</p>
<!-- @@@selectedRows -->
<!-- $$$selection[overload1]$$$selection -->
<h3 class="fn"><a name="selection"></a>const <span class="type"><a href="qitemselection.html">QItemSelection</a></span> QItemSelectionModel::<span class="name">selection</span> () const</h3>
<p>Returns the selection ranges stored in the selection model.</p>
<!-- @@@selection -->
<!-- $$$selectionChanged[overload1]$$$selectionChangedconstQItemSelection&constQItemSelection& -->
<h3 class="fn"><a name="selectionChanged"></a><span class="type">void</span> QItemSelectionModel::<span class="name">selectionChanged</span> ( const <span class="type"><a href="qitemselection.html">QItemSelection</a></span> &amp; <i>selected</i>, const <span class="type"><a href="qitemselection.html">QItemSelection</a></span> &amp; <i>deselected</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the selection changes. The change in the selection is represented as an item selection of <i>deselected</i> items and an item selection of <i>selected</i> items.</p>
<p>Note the that the current index changes independently from the selection. Also note that this signal will not be emitted when the item model is reset.</p>
<p><b>See also </b><a href="qitemselectionmodel.html#select">select</a>() and <a href="qitemselectionmodel.html#currentChanged">currentChanged</a>().</p>
<!-- @@@selectionChanged -->
<!-- $$$setCurrentIndex[overload1]$$$setCurrentIndexconstQModelIndex&QItemSelectionModel::SelectionFlags -->
<h3 class="fn"><a name="setCurrentIndex"></a><span class="type">void</span> QItemSelectionModel::<span class="name">setCurrentIndex</span> ( const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>index</i>, <span class="type"><a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a></span> <i>command</i> )<tt> [slot]</tt></h3>
<p>Sets the model item <i>index</i> to be the current item, and emits <a href="qitemselectionmodel.html#currentChanged">currentChanged</a>(). The current item is used for keyboard navigation and focus indication; it is independent of any selected items, although a selected item can also be the current item.</p>
<p>Depending on the specified <i>command</i>, the <i>index</i> can also become part of the current selection.</p>
<p><b>See also </b><a href="qitemselectionmodel.html#currentIndex">currentIndex</a>() and <a href="qitemselectionmodel.html#select">select</a>().</p>
<!-- @@@setCurrentIndex -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</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>