|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.core.QAbstractItemModel
com.trolltech.qt.gui.QProxyModel
public class QProxyModel
The QProxyModel
class provides support for processing data passed between another model and a view. If you want to do filtering and sorting, see QSortFilterProxyModel
.
Proxy models provide a standard model interface that can be used to manipulate the data retrieved through an underlying model. They can be used to perform operations such as sorting and filtering on the data obtained without changing the contents of the model.
Just as with subclasses of QAbstractItemView
, QProxyModel
provides the setModel()
function that is used to specify the model to be acted on by the proxy. Views can be connected to either the underlying model or the proxy model with QAbstractItemView::setModel()
.
Since views rely on the information provided in model indexes to identify items of data from models, and to position these items in some visual representation, proxy models must create their own model indexes instead of supplying model indexes from their underlying models.
QAbstractItemModel
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.core.QAbstractItemModel |
---|
dataChanged, headerDataChanged, layoutAboutToBeChanged, layoutChanged |
Constructor Summary | |
---|---|
QProxyModel()
Constructs a proxy model with the given parent. |
|
QProxyModel(QObject parent)
Constructs a proxy model with the given parent. |
Method Summary | |
---|---|
static QProxyModel |
fromNativePointer(QNativePointer nativePointer)
|
java.util.List |
match(QModelIndex start,
int role,
java.lang.Object value,
int hits,
Qt.MatchFlags flags)
Returns a list of model indexes that each contain the given value for the role specified. |
QAbstractItemModel |
model()
Returns the model that contains the data that is available through the proxy model. |
void |
setModel(QAbstractItemModel model)
Sets the given model to be processed by the proxy model. |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QProxyModel()
public QProxyModel(QObject parent)
Method Detail |
---|
public final QAbstractItemModel model()
setModel()
.
public java.util.List match(QModelIndex start, int role, java.lang.Object value, int hits, Qt.MatchFlags flags)
QAbstractItemModel::match()
.
match
in class QAbstractItemModel
public void setModel(QAbstractItemModel model)
model()
.
public static QProxyModel fromNativePointer(QNativePointer nativePointer)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |