~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qsortfilterproxymodel.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/gui/itemviews/qsortfilterproxymodel.cpp -->
 
5
<!-- qsortfilterproxymodel.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: QSortFilterProxyModel Class Reference</title>
 
7
  <title>Qt 4.6: QSortFilterProxyModel Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//QSortFilterProxyModel" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QSortFilterProxyModel Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">QSortFilterProxyModel Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
16
17
</h1>
17
18
<p>The QSortFilterProxyModel class provides support for sorting and filtering data passed between another model and a view. <a href="#details">More...</a></p>
18
19
<pre> #include &lt;QSortFilterProxyModel&gt;</pre><p>Inherits <a href="qabstractproxymodel.html">QAbstractProxyModel</a>.</p>
21
22
<li><a href="qsortfilterproxymodel-members.html">List of all members, including inherited members</a></li>
22
23
<li><a href="qsortfilterproxymodel-obsolete.html">Obsolete members</a></li>
23
24
</ul>
 
25
<hr />
24
26
<a name="properties"></a>
25
 
<h3>Properties</h3>
26
 
<p><table width="100%" border="0" cellpadding="0" cellspacing="0">
 
27
<h2>Properties</h2>
 
28
<p><table class="propsummary" width="100%" border="0" cellpadding="0" cellspacing="0">
27
29
<tr><td width="45%" valign="top"><ul>
28
 
<li><div class="fn"></div><b><a href="qsortfilterproxymodel.html#dynamicSortFilter-prop">dynamicSortFilter</a></b> : bool</li>
29
 
<li><div class="fn"></div><b><a href="qsortfilterproxymodel.html#filterCaseSensitivity-prop">filterCaseSensitivity</a></b> : Qt::CaseSensitivity</li>
30
 
<li><div class="fn"></div><b><a href="qsortfilterproxymodel.html#filterKeyColumn-prop">filterKeyColumn</a></b> : int</li>
31
 
<li><div class="fn"></div><b><a href="qsortfilterproxymodel.html#filterRegExp-prop">filterRegExp</a></b> : QRegExp</li>
 
30
<li><div class="fn"><b><a href="qsortfilterproxymodel.html#dynamicSortFilter-prop">dynamicSortFilter</a></b> : bool</div></li>
 
31
<li><div class="fn"><b><a href="qsortfilterproxymodel.html#filterCaseSensitivity-prop">filterCaseSensitivity</a></b> : Qt::CaseSensitivity</div></li>
 
32
<li><div class="fn"><b><a href="qsortfilterproxymodel.html#filterKeyColumn-prop">filterKeyColumn</a></b> : int</div></li>
 
33
<li><div class="fn"><b><a href="qsortfilterproxymodel.html#filterRegExp-prop">filterRegExp</a></b> : QRegExp</div></li>
32
34
</ul></td><td valign="top"><ul>
33
 
<li><div class="fn"></div><b><a href="qsortfilterproxymodel.html#filterRole-prop">filterRole</a></b> : int</li>
34
 
<li><div class="fn"></div><b><a href="qsortfilterproxymodel.html#isSortLocaleAware-prop">isSortLocaleAware</a></b> : bool</li>
35
 
<li><div class="fn"></div><b><a href="qsortfilterproxymodel.html#sortCaseSensitivity-prop">sortCaseSensitivity</a></b> : Qt::CaseSensitivity</li>
36
 
<li><div class="fn"></div><b><a href="qsortfilterproxymodel.html#sortRole-prop">sortRole</a></b> : int</li>
 
35
<li><div class="fn"><b><a href="qsortfilterproxymodel.html#filterRole-prop">filterRole</a></b> : int</div></li>
 
36
<li><div class="fn"><b><a href="qsortfilterproxymodel.html#isSortLocaleAware-prop">isSortLocaleAware</a></b> : bool</div></li>
 
37
<li><div class="fn"><b><a href="qsortfilterproxymodel.html#sortCaseSensitivity-prop">sortCaseSensitivity</a></b> : Qt::CaseSensitivity</div></li>
 
38
<li><div class="fn"><b><a href="qsortfilterproxymodel.html#sortRole-prop">sortRole</a></b> : int</div></li>
37
39
</ul>
38
40
</td></tr>
39
41
</table></p>
40
42
<ul>
41
 
<li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
43
<li><div bar="2" class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
42
44
</ul>
 
45
<hr />
43
46
<a name="public-functions"></a>
44
 
<h3>Public Functions</h3>
45
 
<ul>
46
 
<li><div class="fn"></div><b><a href="qsortfilterproxymodel.html#QSortFilterProxyModel">QSortFilterProxyModel</a></b> ( QObject * <i>parent</i> = 0 )</li>
47
 
<li><div class="fn"></div><b><a href="qsortfilterproxymodel.html#dtor.QSortFilterProxyModel">~QSortFilterProxyModel</a></b> ()</li>
48
 
<li><div class="fn"></div>bool <b><a href="qsortfilterproxymodel.html#dynamicSortFilter-prop">dynamicSortFilter</a></b> () const</li>
49
 
<li><div class="fn"></div>Qt::CaseSensitivity <b><a href="qsortfilterproxymodel.html#filterCaseSensitivity-prop">filterCaseSensitivity</a></b> () const</li>
50
 
<li><div class="fn"></div>int <b><a href="qsortfilterproxymodel.html#filterKeyColumn-prop">filterKeyColumn</a></b> () const</li>
51
 
<li><div class="fn"></div>QRegExp <b><a href="qsortfilterproxymodel.html#filterRegExp-prop">filterRegExp</a></b> () const</li>
52
 
<li><div class="fn"></div>int <b><a href="qsortfilterproxymodel.html#filterRole-prop">filterRole</a></b> () const</li>
53
 
<li><div class="fn"></div>bool <b><a href="qsortfilterproxymodel.html#isSortLocaleAware-prop">isSortLocaleAware</a></b> () const</li>
54
 
<li><div class="fn"></div>virtual QModelIndex <b><a href="qsortfilterproxymodel.html#mapFromSource">mapFromSource</a></b> ( const QModelIndex &amp; <i>sourceIndex</i> ) const</li>
55
 
<li><div class="fn"></div>virtual QModelIndex <b><a href="qsortfilterproxymodel.html#mapToSource">mapToSource</a></b> ( const QModelIndex &amp; <i>proxyIndex</i> ) const</li>
56
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#dynamicSortFilter-prop">setDynamicSortFilter</a></b> ( bool <i>enable</i> )</li>
57
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#filterCaseSensitivity-prop">setFilterCaseSensitivity</a></b> ( Qt::CaseSensitivity <i>cs</i> )</li>
58
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#filterKeyColumn-prop">setFilterKeyColumn</a></b> ( int <i>column</i> )</li>
59
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#filterRegExp-prop">setFilterRegExp</a></b> ( const QRegExp &amp; <i>regExp</i> )</li>
60
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#filterRole-prop">setFilterRole</a></b> ( int <i>role</i> )</li>
61
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#sortCaseSensitivity-prop">setSortCaseSensitivity</a></b> ( Qt::CaseSensitivity <i>cs</i> )</li>
62
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#isSortLocaleAware-prop">setSortLocaleAware</a></b> ( bool <i>on</i> )</li>
63
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#sortRole-prop">setSortRole</a></b> ( int <i>role</i> )</li>
64
 
<li><div class="fn"></div>Qt::CaseSensitivity <b><a href="qsortfilterproxymodel.html#sortCaseSensitivity-prop">sortCaseSensitivity</a></b> () const</li>
65
 
<li><div class="fn"></div>int <b><a href="qsortfilterproxymodel.html#sortColumn">sortColumn</a></b> () const</li>
66
 
<li><div class="fn"></div>Qt::SortOrder <b><a href="qsortfilterproxymodel.html#sortOrder">sortOrder</a></b> () const</li>
67
 
<li><div class="fn"></div>int <b><a href="qsortfilterproxymodel.html#sortRole-prop">sortRole</a></b> () const</li>
68
 
</ul>
69
 
<ul>
70
 
<li><div class="fn"></div>6 public functions inherited from <a href="qabstractproxymodel.html#public-functions">QAbstractProxyModel</a></li>
71
 
<li><div class="fn"></div>34 public functions inherited from <a href="qabstractitemmodel.html#public-functions">QAbstractItemModel</a></li>
72
 
<li><div class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
73
 
</ul>
 
47
<h2>Public Functions</h2>
 
48
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
49
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#QSortFilterProxyModel">QSortFilterProxyModel</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
 
50
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#dtor.QSortFilterProxyModel">~QSortFilterProxyModel</a></b> ()</td></tr>
 
51
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#dynamicSortFilter-prop">dynamicSortFilter</a></b> () const</td></tr>
 
52
<tr><td class="memItemLeft" align="right" valign="top">Qt::CaseSensitivity </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#filterCaseSensitivity-prop">filterCaseSensitivity</a></b> () const</td></tr>
 
53
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#filterKeyColumn-prop">filterKeyColumn</a></b> () const</td></tr>
 
54
<tr><td class="memItemLeft" align="right" valign="top">QRegExp </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#filterRegExp-prop">filterRegExp</a></b> () const</td></tr>
 
55
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#filterRole-prop">filterRole</a></b> () const</td></tr>
 
56
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#isSortLocaleAware-prop">isSortLocaleAware</a></b> () const</td></tr>
 
57
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#dynamicSortFilter-prop">setDynamicSortFilter</a></b> ( bool <i>enable</i> )</td></tr>
 
58
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#filterCaseSensitivity-prop">setFilterCaseSensitivity</a></b> ( Qt::CaseSensitivity <i>cs</i> )</td></tr>
 
59
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#filterKeyColumn-prop">setFilterKeyColumn</a></b> ( int <i>column</i> )</td></tr>
 
60
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#filterRegExp-prop">setFilterRegExp</a></b> ( const QRegExp &amp; <i>regExp</i> )</td></tr>
 
61
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#filterRole-prop">setFilterRole</a></b> ( int <i>role</i> )</td></tr>
 
62
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#sortCaseSensitivity-prop">setSortCaseSensitivity</a></b> ( Qt::CaseSensitivity <i>cs</i> )</td></tr>
 
63
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#isSortLocaleAware-prop">setSortLocaleAware</a></b> ( bool <i>on</i> )</td></tr>
 
64
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#sortRole-prop">setSortRole</a></b> ( int <i>role</i> )</td></tr>
 
65
<tr><td class="memItemLeft" align="right" valign="top">Qt::CaseSensitivity </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#sortCaseSensitivity-prop">sortCaseSensitivity</a></b> () const</td></tr>
 
66
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#sortColumn">sortColumn</a></b> () const</td></tr>
 
67
<tr><td class="memItemLeft" align="right" valign="top">Qt::SortOrder </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#sortOrder">sortOrder</a></b> () const</td></tr>
 
68
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#sortRole-prop">sortRole</a></b> () const</td></tr>
 
69
</table>
 
70
<hr />
 
71
<a name="reimplemented-public-functions"></a>
 
72
<h2>Reimplemented Public Functions</h2>
 
73
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
74
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#buddy">buddy</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
 
75
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#canFetchMore">canFetchMore</a></b> ( const QModelIndex &amp; <i>parent</i> ) const</td></tr>
 
76
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#columnCount">columnCount</a></b> ( const QModelIndex &amp; <i>parent</i> = QModelIndex() ) const</td></tr>
 
77
<tr><td class="memItemLeft" align="right" valign="top">virtual QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#data">data</a></b> ( const QModelIndex &amp; <i>index</i>, int <i>role</i> = Qt::DisplayRole ) const</td></tr>
 
78
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#dropMimeData">dropMimeData</a></b> ( const QMimeData * <i>data</i>, Qt::DropAction <i>action</i>, int <i>row</i>, int <i>column</i>, const QModelIndex &amp; <i>parent</i> )</td></tr>
 
79
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#fetchMore">fetchMore</a></b> ( const QModelIndex &amp; <i>parent</i> )</td></tr>
 
80
<tr><td class="memItemLeft" align="right" valign="top">virtual Qt::ItemFlags </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#flags">flags</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
 
81
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#hasChildren">hasChildren</a></b> ( const QModelIndex &amp; <i>parent</i> = QModelIndex() ) const</td></tr>
 
82
<tr><td class="memItemLeft" align="right" valign="top">virtual QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#headerData">headerData</a></b> ( int <i>section</i>, Qt::Orientation <i>orientation</i>, int <i>role</i> = Qt::DisplayRole ) const</td></tr>
 
83
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#index">index</a></b> ( int <i>row</i>, int <i>column</i>, const QModelIndex &amp; <i>parent</i> = QModelIndex() ) const</td></tr>
 
84
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#insertColumns">insertColumns</a></b> ( int <i>column</i>, int <i>count</i>, const QModelIndex &amp; <i>parent</i> = QModelIndex() )</td></tr>
 
85
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#insertRows">insertRows</a></b> ( int <i>row</i>, int <i>count</i>, const QModelIndex &amp; <i>parent</i> = QModelIndex() )</td></tr>
 
86
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#mapFromSource">mapFromSource</a></b> ( const QModelIndex &amp; <i>sourceIndex</i> ) const</td></tr>
 
87
<tr><td class="memItemLeft" align="right" valign="top">virtual QItemSelection </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#mapSelectionFromSource">mapSelectionFromSource</a></b> ( const QItemSelection &amp; <i>sourceSelection</i> ) const</td></tr>
 
88
<tr><td class="memItemLeft" align="right" valign="top">virtual QItemSelection </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#mapSelectionToSource">mapSelectionToSource</a></b> ( const QItemSelection &amp; <i>proxySelection</i> ) const</td></tr>
 
89
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#mapToSource">mapToSource</a></b> ( const QModelIndex &amp; <i>proxyIndex</i> ) const</td></tr>
 
90
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndexList </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#match">match</a></b> ( const QModelIndex &amp; <i>start</i>, int <i>role</i>, const QVariant &amp; <i>value</i>, int <i>hits</i> = 1, Qt::MatchFlags <i>flags</i> = Qt::MatchFlags( Qt::MatchStartsWith | Qt::MatchWrap ) ) const</td></tr>
 
91
<tr><td class="memItemLeft" align="right" valign="top">virtual QMimeData * </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#mimeData">mimeData</a></b> ( const QModelIndexList &amp; <i>indexes</i> ) const</td></tr>
 
92
<tr><td class="memItemLeft" align="right" valign="top">virtual QStringList </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#mimeTypes">mimeTypes</a></b> () const</td></tr>
 
93
<tr><td class="memItemLeft" align="right" valign="top">virtual QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#parent">parent</a></b> ( const QModelIndex &amp; <i>child</i> ) const</td></tr>
 
94
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#removeColumns">removeColumns</a></b> ( int <i>column</i>, int <i>count</i>, const QModelIndex &amp; <i>parent</i> = QModelIndex() )</td></tr>
 
95
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#removeRows">removeRows</a></b> ( int <i>row</i>, int <i>count</i>, const QModelIndex &amp; <i>parent</i> = QModelIndex() )</td></tr>
 
96
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#rowCount">rowCount</a></b> ( const QModelIndex &amp; <i>parent</i> = QModelIndex() ) const</td></tr>
 
97
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#setData">setData</a></b> ( const QModelIndex &amp; <i>index</i>, const QVariant &amp; <i>value</i>, int <i>role</i> = Qt::EditRole )</td></tr>
 
98
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#setHeaderData">setHeaderData</a></b> ( int <i>section</i>, Qt::Orientation <i>orientation</i>, const QVariant &amp; <i>value</i>, int <i>role</i> = Qt::EditRole )</td></tr>
 
99
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#setSourceModel">setSourceModel</a></b> ( QAbstractItemModel * <i>sourceModel</i> )</td></tr>
 
100
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#sort">sort</a></b> ( int <i>column</i>, Qt::SortOrder <i>order</i> = Qt::AscendingOrder )</td></tr>
 
101
<tr><td class="memItemLeft" align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#span">span</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
 
102
<tr><td class="memItemLeft" align="right" valign="top">virtual Qt::DropActions </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#supportedDropActions">supportedDropActions</a></b> () const</td></tr>
 
103
</table>
 
104
<ul>
 
105
<li><div bar="2" class="fn"></div>14 public functions inherited from <a href="qabstractproxymodel.html#public-functions">QAbstractProxyModel</a></li>
 
106
<li><div bar="2" class="fn"></div>35 public functions inherited from <a href="qabstractitemmodel.html#public-functions">QAbstractItemModel</a></li>
 
107
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
108
</ul>
 
109
<hr />
74
110
<a name="public-slots"></a>
75
 
<h3>Public Slots</h3>
76
 
<ul>
77
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#invalidate">invalidate</a></b> ()</li>
78
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#setFilterFixedString">setFilterFixedString</a></b> ( const QString &amp; <i>pattern</i> )</li>
79
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#filterRegExp-prop">setFilterRegExp</a></b> ( const QString &amp; <i>pattern</i> )</li>
80
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#setFilterWildcard">setFilterWildcard</a></b> ( const QString &amp; <i>pattern</i> )</li>
81
 
</ul>
82
 
<ul>
83
 
<li><div class="fn"></div>2 public slots inherited from <a href="qabstractitemmodel.html#public-slots">QAbstractItemModel</a></li>
84
 
<li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
85
 
</ul>
 
111
<h2>Public Slots</h2>
 
112
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
113
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#invalidate">invalidate</a></b> ()</td></tr>
 
114
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#setFilterFixedString">setFilterFixedString</a></b> ( const QString &amp; <i>pattern</i> )</td></tr>
 
115
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#filterRegExp-prop">setFilterRegExp</a></b> ( const QString &amp; <i>pattern</i> )</td></tr>
 
116
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#setFilterWildcard">setFilterWildcard</a></b> ( const QString &amp; <i>pattern</i> )</td></tr>
 
117
</table>
 
118
<ul>
 
119
<li><div bar="2" class="fn"></div>2 public slots inherited from <a href="qabstractitemmodel.html#public-slots">QAbstractItemModel</a></li>
 
120
<li><div bar="2" class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
121
</ul>
 
122
<hr />
86
123
<a name="protected-functions"></a>
87
 
<h3>Protected Functions</h3>
88
 
<ul>
89
 
<li><div class="fn"></div>virtual bool <b><a href="qsortfilterproxymodel.html#filterAcceptsColumn">filterAcceptsColumn</a></b> ( int <i>source_column</i>, const QModelIndex &amp; <i>source_parent</i> ) const</li>
90
 
<li><div class="fn"></div>virtual bool <b><a href="qsortfilterproxymodel.html#filterAcceptsRow">filterAcceptsRow</a></b> ( int <i>source_row</i>, const QModelIndex &amp; <i>source_parent</i> ) const</li>
91
 
<li><div class="fn"></div>void <b><a href="qsortfilterproxymodel.html#invalidateFilter">invalidateFilter</a></b> ()</li>
92
 
<li><div class="fn"></div>virtual bool <b><a href="qsortfilterproxymodel.html#lessThan">lessThan</a></b> ( const QModelIndex &amp; <i>left</i>, const QModelIndex &amp; <i>right</i> ) const</li>
93
 
</ul>
94
 
<ul>
95
 
<li><div class="fn"></div>14 protected functions inherited from <a href="qabstractitemmodel.html#protected-functions">QAbstractItemModel</a></li>
96
 
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
124
<h2>Protected Functions</h2>
 
125
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
126
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#filterAcceptsColumn">filterAcceptsColumn</a></b> ( int <i>source_column</i>, const QModelIndex &amp; <i>source_parent</i> ) const</td></tr>
 
127
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#filterAcceptsRow">filterAcceptsRow</a></b> ( int <i>source_row</i>, const QModelIndex &amp; <i>source_parent</i> ) const</td></tr>
 
128
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#invalidateFilter">invalidateFilter</a></b> ()</td></tr>
 
129
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qsortfilterproxymodel.html#lessThan">lessThan</a></b> ( const QModelIndex &amp; <i>left</i>, const QModelIndex &amp; <i>right</i> ) const</td></tr>
 
130
</table>
 
131
<ul>
 
132
<li><div bar="2" class="fn"></div>21 protected functions inherited from <a href="qabstractitemmodel.html#protected-functions">QAbstractItemModel</a></li>
 
133
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
97
134
</ul>
98
135
<h3>Additional Inherited Members</h3>
99
136
<ul>
100
 
<li><div class="fn"></div>14 signals inherited from <a href="qabstractitemmodel.html#signals">QAbstractItemModel</a></li>
 
137
<li><div class="fn"></div>18 signals inherited from <a href="qabstractitemmodel.html#signals">QAbstractItemModel</a></li>
101
138
<li><div class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
102
139
<li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
103
140
</ul>
111
148
         MyItemModel *model = new MyItemModel(this);
112
149
 
113
150
         treeView-&gt;setModel(model);</pre>
114
 
<p>To add sorting and filtering support to <tt>MyItemModel</tt>, we need to create a QSortFilterProxyModel, call <a href="qabstractproxymodel.html#setSourceModel">setSourceModel</a>() with the <tt>MyItemModel</tt> as argument, and install the QSortFilterProxyModel on the view:</p>
 
151
<p>To add sorting and filtering support to <tt>MyItemModel</tt>, we need to create a QSortFilterProxyModel, call <a href="qsortfilterproxymodel.html#setSourceModel">setSourceModel</a>() with the <tt>MyItemModel</tt> as argument, and install the QSortFilterProxyModel on the view:</p>
115
152
<pre>         QTreeView *treeView = new QTreeView;
116
153
         MyItemModel *sourceModel = new MyItemModel(this);
117
154
         QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(this);
119
156
         proxyModel-&gt;setSourceModel(sourceModel);
120
157
         treeView-&gt;setModel(proxyModel);</pre>
121
158
<p>At this point, neither sorting nor filtering is enabled; the original data is displayed in the view. Any changes made through the QSortFilterProxyModel are applied to the original model.</p>
122
 
<p>The QSortFilterProxyModel acts as a wrapper for the original model. If you need to convert source <a href="qmodelindex.html">QModelIndex</a>es to sorted/filtered model indexes or vice versa, use <a href="qsortfilterproxymodel.html#mapToSource">mapToSource</a>(), <a href="qsortfilterproxymodel.html#mapFromSource">mapFromSource</a>(), <a href="qabstractproxymodel.html#mapSelectionToSource">mapSelectionToSource</a>(), and <a href="qabstractproxymodel.html#mapSelectionFromSource">mapSelectionFromSource</a>().</p>
 
159
<p>The QSortFilterProxyModel acts as a wrapper for the original model. If you need to convert source <a href="qmodelindex.html">QModelIndex</a>es to sorted/filtered model indexes or vice versa, use <a href="qsortfilterproxymodel.html#mapToSource">mapToSource</a>(), <a href="qsortfilterproxymodel.html#mapFromSource">mapFromSource</a>(), <a href="qsortfilterproxymodel.html#mapSelectionToSource">mapSelectionToSource</a>(), and <a href="qsortfilterproxymodel.html#mapSelectionFromSource">mapSelectionFromSource</a>().</p>
123
160
<p><b>Note:</b> By default, the model does not dynamically re-sort and re-filter data whenever the original model changes. This behavior can be changed by setting the <a href="qsortfilterproxymodel.html#dynamicSortFilter-prop">dynamicSortFilter</a> property.</p>
124
161
<p>The <a href="itemviews-basicsortfiltermodel.html">Basic Sort/Filter Model</a> and <a href="itemviews-customsortfiltermodel.html">Custom Sort/Filter Model</a> examples illustrate how to use QSortFilterProxyModel to perform basic sorting and filtering and how to subclass it to implement custom behavior.</p>
125
162
<a name="sorting"></a>
127
164
<p><a href="qtableview.html">QTableView</a> and <a href="qtreeview.html">QTreeView</a> have a <a href="qtreeview.html#sortingEnabled-prop">sortingEnabled</a> property that controls whether the user can sort the view by clicking the view's horizontal header. For example:</p>
128
165
<pre>         treeView-&gt;setSortingEnabled(true);</pre>
129
166
<p>When this feature is on (the default is off), clicking on a header section sorts the items according to that column. By clicking repeatedly, the user can alternate between ascending and descending order.</p>
130
 
<p align="center"><img src="images/qsortfilterproxymodel-sorting.png" alt="A sorted QTreeView" /></p><p>Behind the scene, the view calls the <a href="qabstractitemmodel.html#sort">sort</a>() virtual function on the model to reorder the data in the model. To make your data sortable, you can either implement <a href="qabstractitemmodel.html#sort">sort</a>() in your model, or you use a QSortFilterProxyModel to wrap your model -- QSortFilterProxyModel provides a generic <a href="qabstractitemmodel.html#sort">sort</a>() reimplementation that operates on the <a href="qsortfilterproxymodel.html#sortRole-prop">sortRole</a>() (<a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a> by default) of the items and that understands several data types, including <tt>int</tt>, <a href="qstring.html">QString</a>, and <a href="qdatetime.html">QDateTime</a>. For hierarchical models, sorting is applied recursively to all child items. String comparisons are case sensitive by default; this can be changed by setting the <a href="qsortfilterproxymodel.html#sortCaseSensitivity-prop">sortCaseSensitivity</a> property.</p>
 
167
<p align="center"><img src="images/qsortfilterproxymodel-sorting.png" alt="A sorted QTreeView" /></p><p>Behind the scene, the view calls the <a href="qsortfilterproxymodel.html#sort">sort</a>() virtual function on the model to reorder the data in the model. To make your data sortable, you can either implement <a href="qsortfilterproxymodel.html#sort">sort</a>() in your model, or use a QSortFilterProxyModel to wrap your model -- QSortFilterProxyModel provides a generic <a href="qsortfilterproxymodel.html#sort">sort</a>() reimplementation that operates on the <a href="qsortfilterproxymodel.html#sortRole-prop">sortRole</a>() (<a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a> by default) of the items and that understands several data types, including <tt>int</tt>, <a href="qstring.html">QString</a>, and <a href="qdatetime.html">QDateTime</a>. For hierarchical models, sorting is applied recursively to all child items. String comparisons are case sensitive by default; this can be changed by setting the <a href="qsortfilterproxymodel.html#sortCaseSensitivity-prop">sortCaseSensitivity</a> property.</p>
131
168
<p>Custom sorting behavior is achieved by subclassing QSortFilterProxyModel and reimplementing <a href="qsortfilterproxymodel.html#lessThan">lessThan</a>(), which is used to compare items. For example:</p>
132
169
<pre> bool MySortFilterProxyModel::lessThan(const QModelIndex &amp;left,
133
170
                                       const QModelIndex &amp;right) const
152
189
     }
153
190
 }</pre>
154
191
<p>(This code snippet comes from the <a href="itemviews-customsortfiltermodel.html">Custom Sort/Filter Model</a> example.)</p>
155
 
<p>An alternative approach to sorting is to disable sorting on the view and to impose a certain order to the user. This is done by explicitly calling <a href="qabstractitemmodel.html#sort">sort</a>() with the desired column and order as arguments on the QSortFilterProxyModel (or on the original model if it implements <a href="qabstractitemmodel.html#sort">sort</a>()). For example:</p>
 
192
<p>An alternative approach to sorting is to disable sorting on the view and to impose a certain order to the user. This is done by explicitly calling <a href="qsortfilterproxymodel.html#sort">sort</a>() with the desired column and order as arguments on the QSortFilterProxyModel (or on the original model if it implements <a href="qsortfilterproxymodel.html#sort">sort</a>()). For example:</p>
156
193
<pre>         proxyModel-&gt;sort(2, Qt::AscendingOrder);</pre>
157
194
<p>QSortFilterProxyModel can be sorted by column -1, in which case it returns to the sort order of the underlying source model.</p>
158
195
<a name="filtering"></a>
159
196
<h3>Filtering</h3>
160
 
<p>In addition to sorting, QSortFilterProxyModel can be used to hide items that don't match a certain filter. The filter is specified using a <a href="qregexp.html">QRegExp</a> object and is applied to the <a href="qsortfilterproxymodel.html#filterRole-prop">filterRole</a>() (<a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a> by default) of each item, for a given column. The <a href="qregexp.html">QRegExp</a> object can be used to match a regular expression, a wildcard pattern, or a fixed string. For example:</p>
 
197
<p>In addition to sorting, QSortFilterProxyModel can be used to hide items that do not match a certain filter. The filter is specified using a <a href="qregexp.html">QRegExp</a> object and is applied to the <a href="qsortfilterproxymodel.html#filterRole-prop">filterRole</a>() (<a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a> by default) of each item, for a given column. The <a href="qregexp.html">QRegExp</a> object can be used to match a regular expression, a wildcard pattern, or a fixed string. For example:</p>
161
198
<pre>         proxyModel-&gt;setFilterRegExp(QRegExp(&quot;.png&quot;, Qt::CaseInsensitive,
162
199
                                             QRegExp::FixedString));
163
200
         proxyModel-&gt;setFilterKeyColumn(1);</pre>
164
201
<p>For hierarchical models, the filter is applied recursively to all children. If a parent item doesn't match the filter, none of its children will be shown.</p>
165
202
<p>A common use case is to let the user specify the filter regexp, wildcard pattern, or fixed string in a <a href="qlineedit.html">QLineEdit</a> and to connect the <a href="qlineedit.html#textChanged">textChanged()</a> signal to <a href="qsortfilterproxymodel.html#filterRegExp-prop">setFilterRegExp</a>(), <a href="qsortfilterproxymodel.html#setFilterWildcard">setFilterWildcard</a>(), or <a href="qsortfilterproxymodel.html#setFilterFixedString">setFilterFixedString</a>() to reapply the filter.</p>
166
 
<p>Custom filtering behavior can be achieved by reimplementing the <a href="qsortfilterproxymodel.html#filterAcceptsRow">filterAcceptsRow</a>() and <a href="qsortfilterproxymodel.html#filterAcceptsColumn">filterAcceptsColumn</a>() functions. For example, the following implementation ignores the <a href="qsortfilterproxymodel.html#filterKeyColumn-prop">filterKeyColumn</a> property and performs filtering on columns 0, 1, and 2:</p>
 
203
<p>Custom filtering behavior can be achieved by reimplementing the <a href="qsortfilterproxymodel.html#filterAcceptsRow">filterAcceptsRow</a>() and <a href="qsortfilterproxymodel.html#filterAcceptsColumn">filterAcceptsColumn</a>() functions. For example (from the <a href="itemviews-customsortfiltermodel.html">Custom Sort/Filter Model</a> example), the following implementation ignores the <a href="qsortfilterproxymodel.html#filterKeyColumn-prop">filterKeyColumn</a> property and performs filtering on columns 0, 1, and 2:</p>
167
204
<pre> bool MySortFilterProxyModel::filterAcceptsRow(int sourceRow,
168
205
         const QModelIndex &amp;sourceParent) const
169
206
 {
176
213
            &amp;&amp; dateInRange(sourceModel()-&gt;data(index2).toDate());
177
214
 }</pre>
178
215
<p>(This code snippet comes from the <a href="itemviews-customsortfiltermodel.html">Custom Sort/Filter Model</a> example.)</p>
179
 
<p>If you are working with large amounts of filtering and have to invoke <a href="qsortfilterproxymodel.html#invalidateFilter">invalidateFilter</a>() repeatedly, using <a href="qabstractitemmodel.html#reset">reset</a>() may be more efficient, depending on the implementation of your model. However, note that <a href="qabstractitemmodel.html#reset">reset</a>() returns the proxy model to its original state, losing selection information, and will cause the proxy model to be repopulated.</p>
 
216
<p>If you are working with large amounts of filtering and have to invoke <a href="qsortfilterproxymodel.html#invalidateFilter">invalidateFilter</a>() repeatedly, using <a href="qabstractitemmodel.html#reset">reset</a>() may be more efficient, depending on the implementation of your model. However, <a href="qabstractitemmodel.html#reset">reset</a>() returns the proxy model to its original state, losing selection information, and will cause the proxy model to be repopulated.</p>
180
217
<a name="subclassing"></a>
181
218
<h3>Subclassing</h3>
 
219
<p>Since <a href="qabstractproxymodel.html">QAbstractProxyModel</a> and its subclasses are derived from <a href="qabstractitemmodel.html">QAbstractItemModel</a>, much of the same advice about subclassing normal models also applies to proxy models. In addition, it is worth noting that many of the default implementations of functions in this class are written so that they call the equivalent functions in the relevant source model. This simple proxying mechanism may need to be overridden for source models with more complex behavior; for example, if the source model provides a custom <a href="qsortfilterproxymodel.html#hasChildren">hasChildren</a>() implementation, you should also provide one in the proxy model.</p>
182
220
<p><b>Note:</b> Some general guidelines for subclassing models are available in the <a href="model-view-model-subclassing.html">Model Subclassing Reference</a>.</p>
183
 
<p>Since <a href="qabstractproxymodel.html">QAbstractProxyModel</a> and its subclasses are derived from <a href="qabstractitemmodel.html">QAbstractItemModel</a>, much of the same advice about subclassing normal models also applies to proxy models. In addition, it is worth noting that many of the default implementations of functions in this class are written so that they call the equivalent functions in the relevant source model. This simple proxying mechanism may need to be overridden for source models with more complex behavior; for example, if the source model provides a custom <a href="qabstractitemmodel.html#hasChildren">hasChildren</a>() implementation, you should also provide one in the proxy model.</p>
184
221
<p>See also <a href="qabstractproxymodel.html">QAbstractProxyModel</a>, <a href="qabstractitemmodel.html">QAbstractItemModel</a>, <a href="model-view-programming.html">Model/View Programming</a>, <a href="itemviews-basicsortfiltermodel.html">Basic Sort/Filter Model Example</a>, and <a href="itemviews-customsortfiltermodel.html">Custom Sort/Filter Model Example</a>.</p>
185
222
<hr />
186
223
<h2>Property Documentation</h2>
 
224
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/dynamicSortFilter" />
 
225
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setDynamicSortFilter" />
187
226
<h3 class="fn"><a name="dynamicSortFilter-prop"></a>dynamicSortFilter : bool</h3>
188
227
<p>This property holds whether the proxy model is dynamically sorted and filtered whenever the contents of the source model change.</p>
189
228
<p>The default value is false.</p>
190
229
<p>This property was introduced in Qt 4.2.</p>
191
 
<p>Access functions:</p>
192
 
<ul>
193
 
<li><div class="fn"></div><b>bool dynamicSortFilter () const</b></li>
194
 
<li><div class="fn"></div><b>void setDynamicSortFilter ( bool <i>enable</i> )</b></li>
195
 
</ul>
 
230
<p><b>Access functions:</b></p>
 
231
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
232
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>dynamicSortFilter</b> () const</td></tr>
 
233
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setDynamicSortFilter</b> ( bool <i>enable</i> )</td></tr>
 
234
</table>
 
235
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/filterCaseSensitivity" />
 
236
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setFilterCaseSensitivity" />
196
237
<h3 class="fn"><a name="filterCaseSensitivity-prop"></a>filterCaseSensitivity : <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></h3>
197
238
<p>This property holds the case sensitivity of the QRegExp pattern used to filter the contents of the source model.</p>
198
239
<p>By default, the filter is case sensitive.</p>
199
 
<p>Access functions:</p>
200
 
<ul>
201
 
<li><div class="fn"></div><b>Qt::CaseSensitivity filterCaseSensitivity () const</b></li>
202
 
<li><div class="fn"></div><b>void setFilterCaseSensitivity ( Qt::CaseSensitivity <i>cs</i> )</b></li>
203
 
</ul>
 
240
<p><b>Access functions:</b></p>
 
241
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
242
<tr><td class="memItemLeft" align="right" valign="top">Qt::CaseSensitivity </td><td class="memItemRight" valign="bottom"><b>filterCaseSensitivity</b> () const</td></tr>
 
243
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFilterCaseSensitivity</b> ( Qt::CaseSensitivity <i>cs</i> )</td></tr>
 
244
</table>
204
245
<p>See also <a href="qsortfilterproxymodel.html#filterRegExp-prop">filterRegExp</a> and <a href="qsortfilterproxymodel.html#sortCaseSensitivity-prop">sortCaseSensitivity</a>.</p>
 
246
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/filterKeyColumn" />
 
247
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setFilterKeyColumn" />
205
248
<h3 class="fn"><a name="filterKeyColumn-prop"></a>filterKeyColumn : int</h3>
206
249
<p>This property holds the column where the key used to filter the contents of the source model is read from.</p>
207
250
<p>The default value is 0. If the value is -1, the keys will be read from all columns.</p>
208
 
<p>Access functions:</p>
209
 
<ul>
210
 
<li><div class="fn"></div><b>int filterKeyColumn () const</b></li>
211
 
<li><div class="fn"></div><b>void setFilterKeyColumn ( int <i>column</i> )</b></li>
212
 
</ul>
 
251
<p><b>Access functions:</b></p>
 
252
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
253
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>filterKeyColumn</b> () const</td></tr>
 
254
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFilterKeyColumn</b> ( int <i>column</i> )</td></tr>
 
255
</table>
 
256
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/filterRegExp" />
 
257
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setFilterRegExp" />
213
258
<h3 class="fn"><a name="filterRegExp-prop"></a>filterRegExp : <a href="qregexp.html">QRegExp</a></h3>
214
259
<p>This property holds the QRegExp used to filter the contents of the source model.</p>
215
260
<p>Setting this property overwrites the current <a href="qsortfilterproxymodel.html#filterCaseSensitivity-prop">filterCaseSensitivity</a>. By default, the <a href="qregexp.html">QRegExp</a> is an empty string matching all contents.</p>
216
 
<p>Access functions:</p>
217
 
<ul>
218
 
<li><div class="fn"></div><b>QRegExp filterRegExp () const</b></li>
219
 
<li><div class="fn"></div><b>void setFilterRegExp ( const QRegExp &amp; <i>regExp</i> )</b></li>
220
 
<li><div class="fn"></div><b>void setFilterRegExp ( const QString &amp; <i>pattern</i> )</b></li>
221
 
</ul>
 
261
<p>If no <a href="qregexp.html">QRegExp</a> or an empty string is set, everything in the source model will be accepted.</p>
 
262
<p><b>Access functions:</b></p>
 
263
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
264
<tr><td class="memItemLeft" align="right" valign="top">QRegExp </td><td class="memItemRight" valign="bottom"><b>filterRegExp</b> () const</td></tr>
 
265
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFilterRegExp</b> ( const QRegExp &amp; <i>regExp</i> )</td></tr>
 
266
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFilterRegExp</b> ( const QString &amp; <i>pattern</i> )</td></tr>
 
267
</table>
222
268
<p>See also <a href="qsortfilterproxymodel.html#filterCaseSensitivity-prop">filterCaseSensitivity</a>, <a href="qsortfilterproxymodel.html#setFilterWildcard">setFilterWildcard</a>(), and <a href="qsortfilterproxymodel.html#setFilterFixedString">setFilterFixedString</a>().</p>
 
269
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/filterRole" />
 
270
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setFilterRole" />
223
271
<h3 class="fn"><a name="filterRole-prop"></a>filterRole : int</h3>
224
272
<p>This property holds the item role that is used to query the source model's data when filtering items.</p>
225
273
<p>The default value is <a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a>.</p>
226
274
<p>This property was introduced in Qt 4.2.</p>
227
 
<p>Access functions:</p>
228
 
<ul>
229
 
<li><div class="fn"></div><b>int filterRole () const</b></li>
230
 
<li><div class="fn"></div><b>void setFilterRole ( int <i>role</i> )</b></li>
231
 
</ul>
 
275
<p><b>Access functions:</b></p>
 
276
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
277
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>filterRole</b> () const</td></tr>
 
278
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFilterRole</b> ( int <i>role</i> )</td></tr>
 
279
</table>
232
280
<p>See also <a href="qsortfilterproxymodel.html#filterAcceptsRow">filterAcceptsRow</a>().</p>
 
281
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/isSortLocaleAware" />
 
282
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setSortLocaleAware" />
233
283
<h3 class="fn"><a name="isSortLocaleAware-prop"></a>isSortLocaleAware : bool</h3>
234
284
<p>This property holds the local aware setting used for comparing strings when sorting.</p>
235
285
<p>By default, sorting is not local aware.</p>
236
286
<p>This property was introduced in Qt 4.3.</p>
237
 
<p>Access functions:</p>
238
 
<ul>
239
 
<li><div class="fn"></div><b>bool isSortLocaleAware () const</b></li>
240
 
<li><div class="fn"></div><b>void setSortLocaleAware ( bool <i>on</i> )</b></li>
241
 
</ul>
 
287
<p><b>Access functions:</b></p>
 
288
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
289
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isSortLocaleAware</b> () const</td></tr>
 
290
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSortLocaleAware</b> ( bool <i>on</i> )</td></tr>
 
291
</table>
242
292
<p>See also <a href="qsortfilterproxymodel.html#sortCaseSensitivity-prop">sortCaseSensitivity</a> and <a href="qsortfilterproxymodel.html#lessThan">lessThan</a>().</p>
 
293
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/sortCaseSensitivity" />
 
294
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setSortCaseSensitivity" />
243
295
<h3 class="fn"><a name="sortCaseSensitivity-prop"></a>sortCaseSensitivity : <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a></h3>
244
296
<p>This property holds the case sensitivity setting used for comparing strings when sorting.</p>
245
297
<p>By default, sorting is case sensitive.</p>
246
298
<p>This property was introduced in Qt 4.2.</p>
247
 
<p>Access functions:</p>
248
 
<ul>
249
 
<li><div class="fn"></div><b>Qt::CaseSensitivity sortCaseSensitivity () const</b></li>
250
 
<li><div class="fn"></div><b>void setSortCaseSensitivity ( Qt::CaseSensitivity <i>cs</i> )</b></li>
251
 
</ul>
 
299
<p><b>Access functions:</b></p>
 
300
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
301
<tr><td class="memItemLeft" align="right" valign="top">Qt::CaseSensitivity </td><td class="memItemRight" valign="bottom"><b>sortCaseSensitivity</b> () const</td></tr>
 
302
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSortCaseSensitivity</b> ( Qt::CaseSensitivity <i>cs</i> )</td></tr>
 
303
</table>
252
304
<p>See also <a href="qsortfilterproxymodel.html#filterCaseSensitivity-prop">filterCaseSensitivity</a> and <a href="qsortfilterproxymodel.html#lessThan">lessThan</a>().</p>
 
305
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/sortRole" />
 
306
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setSortRole" />
253
307
<h3 class="fn"><a name="sortRole-prop"></a>sortRole : int</h3>
254
308
<p>This property holds the item role that is used to query the source model's data when sorting items.</p>
255
309
<p>The default value is <a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a>.</p>
256
310
<p>This property was introduced in Qt 4.2.</p>
257
 
<p>Access functions:</p>
258
 
<ul>
259
 
<li><div class="fn"></div><b>int sortRole () const</b></li>
260
 
<li><div class="fn"></div><b>void setSortRole ( int <i>role</i> )</b></li>
261
 
</ul>
 
311
<p><b>Access functions:</b></p>
 
312
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
313
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>sortRole</b> () const</td></tr>
 
314
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSortRole</b> ( int <i>role</i> )</td></tr>
 
315
</table>
262
316
<p>See also <a href="qsortfilterproxymodel.html#lessThan">lessThan</a>().</p>
263
317
<hr />
264
318
<h2>Member Function Documentation</h2>
 
319
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/QSortFilterProxyModel" />
265
320
<h3 class="fn"><a name="QSortFilterProxyModel"></a>QSortFilterProxyModel::QSortFilterProxyModel ( <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
266
321
<p>Constructs a sorting filter model with the given <i>parent</i>.</p>
 
322
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/~QSortFilterProxyModel" />
267
323
<h3 class="fn"><a name="dtor.QSortFilterProxyModel"></a>QSortFilterProxyModel::~QSortFilterProxyModel ()</h3>
268
324
<p>Destroys this sorting filter model.</p>
 
325
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/buddy" />
 
326
<h3 class="fn"><a name="buddy"></a><a href="qmodelindex.html">QModelIndex</a> QSortFilterProxyModel::buddy ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
327
<p>Reimplemented from <a href="qabstractitemmodel.html#buddy">QAbstractItemModel::buddy</a>().</p>
 
328
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/canFetchMore" />
 
329
<h3 class="fn"><a name="canFetchMore"></a>bool QSortFilterProxyModel::canFetchMore ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
330
<p>Reimplemented from <a href="qabstractitemmodel.html#canFetchMore">QAbstractItemModel::canFetchMore</a>().</p>
 
331
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/columnCount" />
 
332
<h3 class="fn"><a name="columnCount"></a>int QSortFilterProxyModel::columnCount ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i> = QModelIndex() ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
333
<p>Reimplemented from <a href="qabstractitemmodel.html#columnCount">QAbstractItemModel::columnCount</a>().</p>
 
334
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/data" />
 
335
<h3 class="fn"><a name="data"></a><a href="qvariant.html">QVariant</a> QSortFilterProxyModel::data ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i>, int <i>role</i> = Qt::DisplayRole ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
336
<p>Reimplemented from <a href="qabstractitemmodel.html#data">QAbstractItemModel::data</a>().</p>
 
337
<p>See also <a href="qsortfilterproxymodel.html#setData">setData</a>().</p>
 
338
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/dropMimeData" />
 
339
<h3 class="fn"><a name="dropMimeData"></a>bool QSortFilterProxyModel::dropMimeData ( const <a href="qmimedata.html">QMimeData</a> * <i>data</i>, <a href="qt.html#DropAction-enum">Qt::DropAction</a> <i>action</i>, int <i>row</i>, int <i>column</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
340
<p>Reimplemented from <a href="qabstractitemmodel.html#dropMimeData">QAbstractItemModel::dropMimeData</a>().</p>
 
341
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/fetchMore" />
 
342
<h3 class="fn"><a name="fetchMore"></a>void QSortFilterProxyModel::fetchMore ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
343
<p>Reimplemented from <a href="qabstractitemmodel.html#fetchMore">QAbstractItemModel::fetchMore</a>().</p>
 
344
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/filterAcceptsColumn" />
269
345
<h3 class="fn"><a name="filterAcceptsColumn"></a>bool QSortFilterProxyModel::filterAcceptsColumn ( int <i>source_column</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>source_parent</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
270
346
<p>Returns true if the item in the column indicated by the given <i>source_column</i> and <i>source_parent</i> should be included in the model; otherwise returns false.</p>
271
347
<p>The default implementation returns true if the value held by the relevant item matches the filter string, wildcard string or regular expression.</p>
272
348
<p><b>Note:</b> By default, the <a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a> is used to determine if the row should be accepted or not. This can be changed by setting the <a href="qsortfilterproxymodel.html#filterRole-prop">filterRole</a> property.</p>
273
349
<p>See also <a href="qsortfilterproxymodel.html#filterAcceptsRow">filterAcceptsRow</a>(), <a href="qsortfilterproxymodel.html#setFilterFixedString">setFilterFixedString</a>(), <a href="qsortfilterproxymodel.html#filterRegExp-prop">setFilterRegExp</a>(), and <a href="qsortfilterproxymodel.html#setFilterWildcard">setFilterWildcard</a>().</p>
 
350
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/filterAcceptsRow" />
274
351
<h3 class="fn"><a name="filterAcceptsRow"></a>bool QSortFilterProxyModel::filterAcceptsRow ( int <i>source_row</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>source_parent</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
275
352
<p>Returns true if the item in the row indicated by the given <i>source_row</i> and <i>source_parent</i> should be included in the model; otherwise returns false.</p>
276
353
<p>The default implementation returns true if the value held by the relevant item matches the filter string, wildcard string or regular expression.</p>
277
354
<p><b>Note:</b> By default, the <a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a> is used to determine if the row should be accepted or not. This can be changed by setting the <a href="qsortfilterproxymodel.html#filterRole-prop">filterRole</a> property.</p>
278
355
<p>See also <a href="qsortfilterproxymodel.html#filterAcceptsColumn">filterAcceptsColumn</a>(), <a href="qsortfilterproxymodel.html#setFilterFixedString">setFilterFixedString</a>(), <a href="qsortfilterproxymodel.html#filterRegExp-prop">setFilterRegExp</a>(), and <a href="qsortfilterproxymodel.html#setFilterWildcard">setFilterWildcard</a>().</p>
 
356
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/flags" />
 
357
<h3 class="fn"><a name="flags"></a><a href="qt.html#ItemFlag-enum">Qt::ItemFlags</a> QSortFilterProxyModel::flags ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
358
<p>Reimplemented from <a href="qabstractitemmodel.html#flags">QAbstractItemModel::flags</a>().</p>
 
359
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/hasChildren" />
 
360
<h3 class="fn"><a name="hasChildren"></a>bool QSortFilterProxyModel::hasChildren ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i> = QModelIndex() ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
361
<p>Reimplemented from <a href="qabstractitemmodel.html#hasChildren">QAbstractItemModel::hasChildren</a>().</p>
 
362
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/headerData" />
 
363
<h3 class="fn"><a name="headerData"></a><a href="qvariant.html">QVariant</a> QSortFilterProxyModel::headerData ( int <i>section</i>, <a href="qt.html#Orientation-enum">Qt::Orientation</a> <i>orientation</i>, int <i>role</i> = Qt::DisplayRole ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
364
<p>Reimplemented from <a href="qabstractitemmodel.html#headerData">QAbstractItemModel::headerData</a>().</p>
 
365
<p>See also <a href="qsortfilterproxymodel.html#setHeaderData">setHeaderData</a>().</p>
 
366
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/index" />
 
367
<h3 class="fn"><a name="index"></a><a href="qmodelindex.html">QModelIndex</a> QSortFilterProxyModel::index ( int <i>row</i>, int <i>column</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i> = QModelIndex() ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
368
<p>Reimplemented from <a href="qabstractitemmodel.html#index">QAbstractItemModel::index</a>().</p>
 
369
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/insertColumns" />
 
370
<h3 class="fn"><a name="insertColumns"></a>bool QSortFilterProxyModel::insertColumns ( int <i>column</i>, int <i>count</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i> = QModelIndex() )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
371
<p>Reimplemented from <a href="qabstractitemmodel.html#insertColumns">QAbstractItemModel::insertColumns</a>().</p>
 
372
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/insertRows" />
 
373
<h3 class="fn"><a name="insertRows"></a>bool QSortFilterProxyModel::insertRows ( int <i>row</i>, int <i>count</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i> = QModelIndex() )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
374
<p>Reimplemented from <a href="qabstractitemmodel.html#insertRows">QAbstractItemModel::insertRows</a>().</p>
 
375
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/invalidate" />
279
376
<h3 class="fn"><a name="invalidate"></a>void QSortFilterProxyModel::invalidate ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
280
377
<p>Invalidates the current sorting and filtering.</p>
281
378
<p>This function was introduced in Qt 4.3.</p>
282
379
<p>See also <a href="qsortfilterproxymodel.html#invalidateFilter">invalidateFilter</a>().</p>
 
380
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/invalidateFilter" />
283
381
<h3 class="fn"><a name="invalidateFilter"></a>void QSortFilterProxyModel::invalidateFilter ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
284
382
<p>Invalidates the current filtering.</p>
285
383
<p>This function should be called if you are implementing custom filtering (e.g&#x2e; <a href="qsortfilterproxymodel.html#filterAcceptsRow">filterAcceptsRow</a>()), and your filter parameters have changed.</p>
286
384
<p>This function was introduced in Qt 4.3.</p>
287
385
<p>See also <a href="qsortfilterproxymodel.html#invalidate">invalidate</a>().</p>
 
386
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/lessThan" />
288
387
<h3 class="fn"><a name="lessThan"></a>bool QSortFilterProxyModel::lessThan ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>left</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>right</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
289
388
<p>Returns true if the value of the item referred to by the given index <i>left</i> is less than the value of the item referred to by the given index <i>right</i>, otherwise returns false.</p>
290
389
<p>This function is used as the &lt; operator when sorting, and handles the following <a href="qvariant.html">QVariant</a> types:</p>
305
404
<p>By default, the <a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a> associated with the <a href="qmodelindex.html">QModelIndex</a>es is used for comparisons. This can be changed by setting the <a href="qsortfilterproxymodel.html#sortRole-prop">sortRole</a> property.</p>
306
405
<p><b>Note:</b> The indices passed in correspond to the source model.</p>
307
406
<p>See also <a href="qsortfilterproxymodel.html#sortRole-prop">sortRole</a>, <a href="qsortfilterproxymodel.html#sortCaseSensitivity-prop">sortCaseSensitivity</a>, and <a href="qsortfilterproxymodel.html#dynamicSortFilter-prop">dynamicSortFilter</a>.</p>
 
407
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/mapFromSource" />
308
408
<h3 class="fn"><a name="mapFromSource"></a><a href="qmodelindex.html">QModelIndex</a> QSortFilterProxyModel::mapFromSource ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>sourceIndex</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
409
<p>Reimplemented from <a href="qabstractproxymodel.html#mapFromSource">QAbstractProxyModel::mapFromSource</a>().</p>
309
410
<p>Returns the model index in the <a href="qsortfilterproxymodel.html">QSortFilterProxyModel</a> given the <i>sourceIndex</i> from the source model.</p>
310
 
<p>Reimplemented from <a href="qabstractproxymodel.html#mapFromSource">QAbstractProxyModel</a>.</p>
311
411
<p>See also <a href="qsortfilterproxymodel.html#mapToSource">mapToSource</a>().</p>
 
412
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/mapSelectionFromSource" />
 
413
<h3 class="fn"><a name="mapSelectionFromSource"></a><a href="qitemselection.html">QItemSelection</a> QSortFilterProxyModel::mapSelectionFromSource ( const <a href="qitemselection.html">QItemSelection</a> &amp; <i>sourceSelection</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
414
<p>Reimplemented from <a href="qabstractproxymodel.html#mapSelectionFromSource">QAbstractProxyModel::mapSelectionFromSource</a>().</p>
 
415
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/mapSelectionToSource" />
 
416
<h3 class="fn"><a name="mapSelectionToSource"></a><a href="qitemselection.html">QItemSelection</a> QSortFilterProxyModel::mapSelectionToSource ( const <a href="qitemselection.html">QItemSelection</a> &amp; <i>proxySelection</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
417
<p>Reimplemented from <a href="qabstractproxymodel.html#mapSelectionToSource">QAbstractProxyModel::mapSelectionToSource</a>().</p>
 
418
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/mapToSource" />
312
419
<h3 class="fn"><a name="mapToSource"></a><a href="qmodelindex.html">QModelIndex</a> QSortFilterProxyModel::mapToSource ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>proxyIndex</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
420
<p>Reimplemented from <a href="qabstractproxymodel.html#mapToSource">QAbstractProxyModel::mapToSource</a>().</p>
313
421
<p>Returns the source model index corresponding to the given <i>proxyIndex</i> from the sorting filter model.</p>
314
 
<p>Reimplemented from <a href="qabstractproxymodel.html#mapToSource">QAbstractProxyModel</a>.</p>
315
422
<p>See also <a href="qsortfilterproxymodel.html#mapFromSource">mapFromSource</a>().</p>
 
423
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/match" />
 
424
<h3 class="fn"><a name="match"></a><a href="qmodelindex.html#QModelIndexList-typedef">QModelIndexList</a> QSortFilterProxyModel::match ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>start</i>, int <i>role</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>value</i>, int <i>hits</i> = 1, <a href="qt.html#MatchFlag-enum">Qt::MatchFlags</a> <i>flags</i> = Qt::MatchFlags( Qt::MatchStartsWith | Qt::MatchWrap ) ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
425
<p>Reimplemented from <a href="qabstractitemmodel.html#match">QAbstractItemModel::match</a>().</p>
 
426
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/mimeData" />
 
427
<h3 class="fn"><a name="mimeData"></a><a href="qmimedata.html">QMimeData</a> * QSortFilterProxyModel::mimeData ( const <a href="qmodelindex.html#QModelIndexList-typedef">QModelIndexList</a> &amp; <i>indexes</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
428
<p>Reimplemented from <a href="qabstractitemmodel.html#mimeData">QAbstractItemModel::mimeData</a>().</p>
 
429
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/mimeTypes" />
 
430
<h3 class="fn"><a name="mimeTypes"></a><a href="qstringlist.html">QStringList</a> QSortFilterProxyModel::mimeTypes () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
431
<p>Reimplemented from <a href="qabstractitemmodel.html#mimeTypes">QAbstractItemModel::mimeTypes</a>().</p>
 
432
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/parent" />
 
433
<h3 class="fn"><a name="parent"></a><a href="qmodelindex.html">QModelIndex</a> QSortFilterProxyModel::parent ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>child</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
434
<p>Reimplemented from <a href="qabstractitemmodel.html#parent">QAbstractItemModel::parent</a>().</p>
 
435
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/removeColumns" />
 
436
<h3 class="fn"><a name="removeColumns"></a>bool QSortFilterProxyModel::removeColumns ( int <i>column</i>, int <i>count</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i> = QModelIndex() )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
437
<p>Reimplemented from <a href="qabstractitemmodel.html#removeColumns">QAbstractItemModel::removeColumns</a>().</p>
 
438
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/removeRows" />
 
439
<h3 class="fn"><a name="removeRows"></a>bool QSortFilterProxyModel::removeRows ( int <i>row</i>, int <i>count</i>, const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i> = QModelIndex() )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
440
<p>Reimplemented from <a href="qabstractitemmodel.html#removeRows">QAbstractItemModel::removeRows</a>().</p>
 
441
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/rowCount" />
 
442
<h3 class="fn"><a name="rowCount"></a>int QSortFilterProxyModel::rowCount ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>parent</i> = QModelIndex() ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
443
<p>Reimplemented from <a href="qabstractitemmodel.html#rowCount">QAbstractItemModel::rowCount</a>().</p>
 
444
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setData" />
 
445
<h3 class="fn"><a name="setData"></a>bool QSortFilterProxyModel::setData ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>value</i>, int <i>role</i> = Qt::EditRole )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
446
<p>Reimplemented from <a href="qabstractitemmodel.html#setData">QAbstractItemModel::setData</a>().</p>
 
447
<p>See also <a href="qsortfilterproxymodel.html#data">data</a>().</p>
 
448
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setFilterFixedString" />
316
449
<h3 class="fn"><a name="setFilterFixedString"></a>void QSortFilterProxyModel::setFilterFixedString ( const <a href="qstring.html">QString</a> &amp; <i>pattern</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
317
450
<p>Sets the fixed string used to filter the contents of the source model to the given <i>pattern</i>.</p>
318
451
<p>See also <a href="qsortfilterproxymodel.html#filterCaseSensitivity-prop">setFilterCaseSensitivity</a>(), <a href="qsortfilterproxymodel.html#filterRegExp-prop">setFilterRegExp</a>(), <a href="qsortfilterproxymodel.html#setFilterWildcard">setFilterWildcard</a>(), and <a href="qsortfilterproxymodel.html#filterRegExp-prop">filterRegExp</a>().</p>
 
452
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setFilterWildcard" />
319
453
<h3 class="fn"><a name="setFilterWildcard"></a>void QSortFilterProxyModel::setFilterWildcard ( const <a href="qstring.html">QString</a> &amp; <i>pattern</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
320
454
<p>Sets the wildcard expression used to filter the contents of the source model to the given <i>pattern</i>.</p>
321
455
<p>See also <a href="qsortfilterproxymodel.html#filterCaseSensitivity-prop">setFilterCaseSensitivity</a>(), <a href="qsortfilterproxymodel.html#filterRegExp-prop">setFilterRegExp</a>(), <a href="qsortfilterproxymodel.html#setFilterFixedString">setFilterFixedString</a>(), and <a href="qsortfilterproxymodel.html#filterRegExp-prop">filterRegExp</a>().</p>
 
456
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setHeaderData" />
 
457
<h3 class="fn"><a name="setHeaderData"></a>bool QSortFilterProxyModel::setHeaderData ( int <i>section</i>, <a href="qt.html#Orientation-enum">Qt::Orientation</a> <i>orientation</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>value</i>, int <i>role</i> = Qt::EditRole )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
458
<p>Reimplemented from <a href="qabstractitemmodel.html#setHeaderData">QAbstractItemModel::setHeaderData</a>().</p>
 
459
<p>See also <a href="qsortfilterproxymodel.html#headerData">headerData</a>().</p>
 
460
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/setSourceModel" />
 
461
<h3 class="fn"><a name="setSourceModel"></a>void QSortFilterProxyModel::setSourceModel ( <a href="qabstractitemmodel.html">QAbstractItemModel</a> * <i>sourceModel</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
462
<p>Reimplemented from <a href="qabstractproxymodel.html#setSourceModel">QAbstractProxyModel::setSourceModel</a>().</p>
 
463
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/sort" />
 
464
<h3 class="fn"><a name="sort"></a>void QSortFilterProxyModel::sort ( int <i>column</i>, <a href="qt.html#SortOrder-enum">Qt::SortOrder</a> <i>order</i> = Qt::AscendingOrder )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
465
<p>Reimplemented from <a href="qabstractitemmodel.html#sort">QAbstractItemModel::sort</a>().</p>
 
466
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/sortColumn" />
322
467
<h3 class="fn"><a name="sortColumn"></a>int QSortFilterProxyModel::sortColumn () const</h3>
323
468
<p>the column currently used for sorting</p>
324
469
<p>This returns the most recently used sort column.</p>
325
470
<p>This function was introduced in Qt 4.5.</p>
 
471
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/sortOrder" />
326
472
<h3 class="fn"><a name="sortOrder"></a><a href="qt.html#SortOrder-enum">Qt::SortOrder</a> QSortFilterProxyModel::sortOrder () const</h3>
327
473
<p>the order currently used for sorting</p>
328
474
<p>This returns the most recently used sort order.</p>
329
475
<p>This function was introduced in Qt 4.5.</p>
 
476
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/span" />
 
477
<h3 class="fn"><a name="span"></a><a href="qsize.html">QSize</a> QSortFilterProxyModel::span ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
478
<p>Reimplemented from <a href="qabstractitemmodel.html#span">QAbstractItemModel::span</a>().</p>
 
479
<a name="//apple_ref/cpp/instm/QSortFilterProxyModel/supportedDropActions" />
 
480
<h3 class="fn"><a name="supportedDropActions"></a><a href="qt.html#DropAction-enum">Qt::DropActions</a> QSortFilterProxyModel::supportedDropActions () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
481
<p>Reimplemented from <a href="qabstractitemmodel.html#supportedDropActions">QAbstractItemModel::supportedDropActions</a>().</p>
330
482
<p /><address><hr /><div align="center">
331
483
<table width="100%" cellspacing="0" border="0"><tr class="address">
332
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
333
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
334
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
335
 
</tr></table></div></address></body>
 
484
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
485
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
486
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
487
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
336
488
</html>