File: qabstractproxymodel.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (25 lines) | stat: -rw-r--r-- 7,084 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QAbstractProxyModel Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QAbstractProxyModel Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QAbstractProxyModel class provides a base class for proxy item models that can do sorting, filtering or other data processing tasks. <a href="#details">More...</a></p>
<p>Inherits <a href="qabstractitemmodel.html">QAbstractItemModel</a>.</p><p>Inherited by <a href="qsortfilterproxymodel.html">QSortFilterProxyModel</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractproxymodel.html#QAbstractProxyModel">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />QModelIndex <b><a href="qabstractproxymodel.html#mapFromSource">mapFromSource</a></b> (<i>self</i>, QModelIndex&#160;<i>sourceIndex</i>)</li><li><div class="fn" />QItemSelection <b><a href="qabstractproxymodel.html#mapSelectionFromSource">mapSelectionFromSource</a></b> (<i>self</i>, QItemSelection&#160;<i>selection</i>)</li><li><div class="fn" />QItemSelection <b><a href="qabstractproxymodel.html#mapSelectionToSource">mapSelectionToSource</a></b> (<i>self</i>, QItemSelection&#160;<i>selection</i>)</li><li><div class="fn" />QModelIndex <b><a href="qabstractproxymodel.html#mapToSource">mapToSource</a></b> (<i>self</i>, QModelIndex&#160;<i>proxyIndex</i>)</li><li><div class="fn" /><b><a href="qabstractproxymodel.html#revert">revert</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractproxymodel.html#setSourceModel">setSourceModel</a></b> (<i>self</i>, QAbstractItemModel&#160;<i>sourceModel</i>)</li><li><div class="fn" />QAbstractItemModel <b><a href="qabstractproxymodel.html#sourceModel">sourceModel</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractproxymodel.html#submit">submit</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractProxyModel class provides a base class for proxy item models that can do sorting, filtering or other data processing tasks.</p>
<p>This class defines the standard interface that proxy models must use to be able to interoperate correctly with other model/view components. It is not supposed to be instantiated directly.</p>
<p>All standard proxy models are derived from the QAbstractProxyModel class. If you need to create a new proxy model class, it is usually better to subclass an existing class that provides the closest behavior to the one you want to provide. Proxy models that filter or sort items of data from a source model should be created by using or subclassing <a href="qsortfilterproxymodel.html">QSortFilterProxyModel</a>.</p>
<p>See also <a href="qsortfilterproxymodel.html">QSortFilterProxyModel</a>, <a href="qabstractitemmodel.html">QAbstractItemModel</a>, and <a href="model-view-programming.html">Model/View Programming</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractProxyModel" />QAbstractProxyModel.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a proxy model with the given <i>parent</i>.</p>
<h3 class="fn"><a name="mapFromSource" /><a href="qmodelindex.html">QModelIndex</a> QAbstractProxyModel.mapFromSource (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>sourceIndex</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Reimplement this function to return the model index in the proxy model that corresponds to the <i>sourceIndex</i> from the source model.</p>
<p>See also <a href="qabstractproxymodel.html#mapToSource">mapToSource</a>().</p>
<h3 class="fn"><a name="mapSelectionFromSource" /><a href="qitemselection.html">QItemSelection</a> QAbstractProxyModel.mapSelectionFromSource (<i>self</i>, <a href="qitemselection.html">QItemSelection</a>&#160;<i>selection</i>)</h3><p>Reimplement this method to map source selections to proxy selections.</p>
<h3 class="fn"><a name="mapSelectionToSource" /><a href="qitemselection.html">QItemSelection</a> QAbstractProxyModel.mapSelectionToSource (<i>self</i>, <a href="qitemselection.html">QItemSelection</a>&#160;<i>selection</i>)</h3><p>Reimplement this method to map proxy selections to source selections.</p>
<h3 class="fn"><a name="mapToSource" /><a href="qmodelindex.html">QModelIndex</a> QAbstractProxyModel.mapToSource (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>proxyIndex</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Reimplement this function to return the model index in the source model that corresponds to the <i>proxyIndex</i> in the proxy model.</p>
<p>See also <a href="qabstractproxymodel.html#mapFromSource">mapFromSource</a>().</p>
<h3 class="fn"><a name="revert" />QAbstractProxyModel.revert (<i>self</i>)</h3><h3 class="fn"><a name="setSourceModel" />QAbstractProxyModel.setSourceModel (<i>self</i>, <a href="qabstractitemmodel.html">QAbstractItemModel</a>&#160;<i>sourceModel</i>)</h3><p>Sets the given <i>sourceModel</i> to be processed by the proxy model.</p>
<p>See also <a href="qabstractproxymodel.html#sourceModel">sourceModel</a>().</p>
<h3 class="fn"><a name="sourceModel" /><a href="qabstractitemmodel.html">QAbstractItemModel</a> QAbstractProxyModel.sourceModel (<i>self</i>)</h3><p>Returns the model that contains the data that is available through the proxy model.</p>
<p>See also <a href="qabstractproxymodel.html#setSourceModel">setSourceModel</a>().</p>
<h3 class="fn"><a name="submit" />bool QAbstractProxyModel.submit (<i>self</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>