Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 427

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qitemselectionmodel.cpp -->
  <title>QItemSelectionModel Class | Qt Core 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtcore-index.html">Qt Core</a></td><td ><a href="qtcore-module.html">C++ Classes</a></td><td >QItemSelectionModel</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<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="#properties">Properties</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>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QItemSelectionModel Class</h1>
<!-- $$$QItemSelectionModel-brief -->
<p>The <a href="qitemselectionmodel.html">QItemSelectionModel</a> class keeps track of a view's selected items. <a href="#details">More...</a></p>
<!-- @@@QItemSelectionModel -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QItemSelectionModel&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += core</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qobject.html">QObject</a></td></tr></table></div><ul>
<li><a href="qitemselectionmodel-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><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></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qitemselectionmodel.html#selectedIndexes-prop">selectedIndexes</a></b> : const QModelIndexList</li>
</ul>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><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> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#QItemSelectionModel-1">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"> QAbstractItemModel *</td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#model-1">model</a></b>()</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>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#setModel">setModel</a></b>(QAbstractItemModel *<i>model</i>)</td></tr>
</table></div>
<ul>
<li class="fn">32 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><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"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qitemselectionmodel.html#clearCurrentIndex">clearCurrentIndex</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-1">select</a></b>(const QItemSelection &amp;<i>selection</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#setCurrentIndex">setCurrentIndex</a></b>(const QModelIndex &amp;<i>index</i>, QItemSelectionModel::SelectionFlags <i>command</i>)</td></tr>
</table></div>
<ul>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><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#modelChanged">modelChanged</a></b>(QAbstractItemModel *<i>model</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></div>
<ul>
<li class="fn">2 signals inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><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></div>
<ul>
<li class="fn">9 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">11 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 id="details">Detailed Description</h2>
<p>The <a href="qitemselectionmodel.html">QItemSelectionModel</a> class keeps track of a view's selected items.</p>
<p>A <a href="qitemselectionmodel.html">QItemSelectionModel</a> 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 <a href="qitemselectionmodel.html">QItemSelectionModel</a> class is one of the <a href="../qtwidgets/model-view-programming.html#model-view-classes">Model/View Classes</a> and is part of Qt's <a href="../qtwidgets/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 <a href="qitemselectionmodel.html">QItemSelectionModel</a> 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, <a href="../qtwidgets/qtablewidget.html#selectedItems">selecteditems()</a> will return items from both layers.</p>
<p><b>Note: </b>Since 5.5, <a href="qitemselectionmodel.html#model">model</a>, <a href="qitemselectionmodel.html#hasSelection">hasSelection</a>, and <a href="qitemselectionmodel.html#currentIndex">currentIndex</a> are meta-object properties.</p></div>
<p><b>See also </b><a href="../qtwidgets/model-view-programming.html">Model/View Programming</a>, <a href="qabstractitemmodel.html">QAbstractItemModel</a>, and <a href="../qtwidgets/qtwidgets-itemviews-chart-example.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" id="SelectionFlag-enum"><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>
<div class="table"><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"><code>QItemSelectionModel::NoUpdate</code></td><td class="topAlign tblval"><code>0x0000</code></td><td class="topAlign">No selection will be made.</td></tr>
<tr><td class="topAlign"><code>QItemSelectionModel::Clear</code></td><td class="topAlign tblval"><code>0x0001</code></td><td class="topAlign">The complete selection will be cleared.</td></tr>
<tr><td class="topAlign"><code>QItemSelectionModel::Select</code></td><td class="topAlign tblval"><code>0x0002</code></td><td class="topAlign">All specified indexes will be selected.</td></tr>
<tr><td class="topAlign"><code>QItemSelectionModel::Deselect</code></td><td class="topAlign tblval"><code>0x0004</code></td><td class="topAlign">All specified indexes will be deselected.</td></tr>
<tr><td class="topAlign"><code>QItemSelectionModel::Toggle</code></td><td class="topAlign tblval"><code>0x0008</code></td><td class="topAlign">All specified indexes will be selected or deselected depending on their current state.</td></tr>
<tr><td class="topAlign"><code>QItemSelectionModel::Current</code></td><td class="topAlign tblval"><code>0x0010</code></td><td class="topAlign">The current selection will be updated.</td></tr>
<tr><td class="topAlign"><code>QItemSelectionModel::Rows</code></td><td class="topAlign tblval"><code>0x0020</code></td><td class="topAlign">All indexes will be expanded to span rows.</td></tr>
<tr><td class="topAlign"><code>QItemSelectionModel::Columns</code></td><td class="topAlign tblval"><code>0x0040</code></td><td class="topAlign">All indexes will be expanded to span columns.</td></tr>
<tr><td class="topAlign"><code>QItemSelectionModel::SelectCurrent</code></td><td class="topAlign tblval"><code>Select | Current</code></td><td class="topAlign">A combination of Select and Current, provided for convenience.</td></tr>
<tr><td class="topAlign"><code>QItemSelectionModel::ToggleCurrent</code></td><td class="topAlign tblval"><code>Toggle | Current</code></td><td class="topAlign">A combination of Toggle and Current, provided for convenience.</td></tr>
<tr><td class="topAlign"><code>QItemSelectionModel::ClearAndSelect</code></td><td class="topAlign tblval"><code>Clear | Select</code></td><td class="topAlign">A combination of Clear and Select, provided for convenience.</td></tr>
</table></div>
<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="prop">
<h2>Property Documentation</h2>
<!-- $$$selectedIndexes-prop$$$selectedIndexes$$$selectionChangedconstQItemSelection&constQItemSelection& -->
<h3 class="fn" id="selectedIndexes-prop"><a name="selectedIndexes-prop"></a><span class="name">selectedIndexes</span> : const <span class="type"><a href="qmodelindex.html#QModelIndexList-typedef">QModelIndexList</a></span></h3>
<p>This property was introduced in  Qt 5.5.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QModelIndexList </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qitemselectionmodel.html#selectedIndexes">selectedIndexes</a></b></span>() const</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qitemselectionmodel.html#selectionChanged">selectionChanged</a></b></span>(const QItemSelection &amp;<i>selected</i>, const QItemSelection &amp;<i>deselected</i>)</td></tr>
</table></div>
<!-- @@@selectedIndexes -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QItemSelectionModel[overload1]$$$QItemSelectionModelQAbstractItemModel* -->
<h3 class="fn" id="QItemSelectionModel"><a name="QItemSelectionModel"></a>QItemSelectionModel::<span class="name">QItemSelectionModel</span>(<span class="type"><a href="qabstractitemmodel.html">QAbstractItemModel</a></span> *<i>model</i> = Q_NULLPTR)</h3>
<p>Constructs a selection model that operates on the specified item <i>model</i>.</p>
<!-- @@@QItemSelectionModel -->
<!-- $$$QItemSelectionModel$$$QItemSelectionModelQAbstractItemModel*QObject* -->
<h3 class="fn" id="QItemSelectionModel-1"><a name="QItemSelectionModel-1"></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">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" id="dtor.QItemSelectionModel"><a name="dtor.QItemSelectionModel"></a><code>[virtual] </code>QItemSelectionModel::<span class="name">~QItemSelectionModel</span>()</h3>
<p>Destroys the selection model.</p>
<!-- @@@~QItemSelectionModel -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn" id="clear"><a name="clear"></a><code>[virtual slot] </code><span class="type">void</span> QItemSelectionModel::<span class="name">clear</span>()</h3>
<p>Clears the selection model. Emits <a href="qitemselectionmodel.html#selectionChanged">selectionChanged</a>() and <a href="qitemselectionmodel.html#currentChanged">currentChanged</a>().</p>
<!-- @@@clear -->
<!-- $$$clearCurrentIndex[overload1]$$$clearCurrentIndex -->
<h3 class="fn" id="clearCurrentIndex"><a name="clearCurrentIndex"></a><code>[virtual slot] </code><span class="type">void</span> QItemSelectionModel::<span class="name">clearCurrentIndex</span>()</h3>
<p>Clears the current index. Emits <a href="qitemselectionmodel.html#currentChanged">currentChanged</a>().</p>
<!-- @@@clearCurrentIndex -->
<!-- $$$clearSelection[overload1]$$$clearSelection -->
<h3 class="fn" id="clearSelection"><a name="clearSelection"></a><code>[slot] </code><span class="type">void</span> QItemSelectionModel::<span class="name">clearSelection</span>()</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" id="columnIntersectsSelection"><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 <code>true</code> 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" id="currentChanged"><a name="currentChanged"></a><code>[signal] </code><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>)</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" id="currentColumnChanged"><a name="currentColumnChanged"></a><code>[signal] </code><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>)</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" id="currentIndex"><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" id="currentRowChanged"><a name="currentRowChanged"></a><code>[signal] </code><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>)</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" id="emitSelectionChanged"><a name="emitSelectionChanged"></a><code>[protected] </code><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>)</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" id="hasSelection"><a name="hasSelection"></a><span class="type">bool</span> QItemSelectionModel::<span class="name">hasSelection</span>() const</h3>
<p>Returns <code>true</code> if the selection model contains any selection ranges; otherwise returns <code>false</code>.</p>
<p>This function was introduced in  Qt 4.2.</p>
<!-- @@@hasSelection -->
<!-- $$$isColumnSelected[overload1]$$$isColumnSelectedintconstQModelIndex& -->
<h3 class="fn" id="isColumnSelected"><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 <code>true</code> 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" id="isRowSelected"><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 <code>true</code> 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" id="isSelected"><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 <code>true</code> if the given model item <i>index</i> is selected.</p>
<!-- @@@isSelected -->
<!-- $$$model[overload1]$$$model -->
<h3 class="fn" id="model"><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>
<p><b>See also </b><a href="qitemselectionmodel.html#setModel">setModel</a>().</p>
<!-- @@@model -->
<!-- $$$model$$$model -->
<h3 class="fn" id="model-1"><a name="model-1"></a><span class="type"><a href="qabstractitemmodel.html">QAbstractItemModel</a></span> *QItemSelectionModel::<span class="name">model</span>()</h3>
<p>Returns the item model operated on by the selection model.</p>
<p>This function was introduced in  Qt 5.5.</p>
<!-- @@@model -->
<!-- $$$modelChanged[overload1]$$$modelChangedQAbstractItemModel* -->
<h3 class="fn" id="modelChanged"><a name="modelChanged"></a><code>[signal] </code><span class="type">void</span> QItemSelectionModel::<span class="name">modelChanged</span>(<span class="type"><a href="qabstractitemmodel.html">QAbstractItemModel</a></span> *<i>model</i>)</h3>
<p>This signal is emitted when the <i>model</i> is successfully set with <a href="qitemselectionmodel.html#setModel">setModel</a>().</p>
<p>This function was introduced in  Qt 5.5.</p>
<p><b>See also </b><a href="qitemselectionmodel.html#model">model</a>() and <a href="qitemselectionmodel.html#setModel">setModel</a>().</p>
<!-- @@@modelChanged -->
<!-- $$$reset[overload1]$$$reset -->
<h3 class="fn" id="reset"><a name="reset"></a><code>[virtual slot] </code><span class="type">void</span> QItemSelectionModel::<span class="name">reset</span>()</h3>
<p>Clears the selection model. Does not emit any signals.</p>
<!-- @@@reset -->
<!-- $$$rowIntersectsSelection[overload1]$$$rowIntersectsSelectionintconstQModelIndex& -->
<h3 class="fn" id="rowIntersectsSelection"><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 <code>true</code> 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" id="select"><a name="select"></a><code>[virtual slot] </code><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>)</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" id="select-1"><a name="select-1"></a><code>[virtual slot] </code><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>)</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" id="selectedColumns"><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 -->
<h3 class="fn" id="selectedIndexes"><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>
<p><b>Note:</b> Getter function for property <a href="qitemselectionmodel.html#selectedIndexes-prop">selectedIndexes</a>. </p><!-- @@@selectedIndexes -->
<!-- $$$selectedRows[overload1]$$$selectedRowsint -->
<h3 class="fn" id="selectedRows"><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" id="selection"><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 -->
<h3 class="fn" id="selectionChanged"><a name="selectionChanged"></a><code>[signal] </code><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>)</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>Note:</b> Notifier signal for property <a href="qitemselectionmodel.html#selectedIndexes-prop">selectedIndexes</a>. </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" id="setCurrentIndex"><a name="setCurrentIndex"></a><code>[virtual slot] </code><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>)</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 -->
<!-- $$$setModel[overload1]$$$setModelQAbstractItemModel* -->
<h3 class="fn" id="setModel"><a name="setModel"></a><span class="type">void</span> QItemSelectionModel::<span class="name">setModel</span>(<span class="type"><a href="qabstractitemmodel.html">QAbstractItemModel</a></span> *<i>model</i>)</h3>
<p>Sets the model to <i>model</i>. The <a href="qitemselectionmodel.html#modelChanged">modelChanged</a>() signal will be emitted.</p>
<p>This function was introduced in  Qt 5.5.</p>
<p><b>See also </b><a href="qitemselectionmodel.html#model">model</a>() and <a href="qitemselectionmodel.html#modelChanged">modelChanged</a>().</p>
<!-- @@@setModel -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    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.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>