|
|
||||||||||
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.QAbstractProxyModel
public abstract class QAbstractProxyModel
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting, filtering or other data processing tasks.
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.
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 QSortFilterProxyModel.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.core.QAbstractItemModel |
---|
dataChanged, headerDataChanged, layoutAboutToBeChanged, layoutChanged |
Constructor Summary | |
---|---|
QAbstractProxyModel()
Equivalent to QAbstractProxyModel(0). |
|
QAbstractProxyModel(QObject parent)
Constructs a proxy model with the given parent. |
Method Summary | |
---|---|
java.lang.Object |
data(QModelIndex proxyIndex,
int role)
Returns the data stored under the given role for the item referred to by the index. |
Qt.ItemFlags |
flags(QModelIndex index)
Returns the item flags for the given index. |
static QAbstractProxyModel |
fromNativePointer(QNativePointer nativePointer)
This function returns the QAbstractProxyModel instance pointed to by nativePointer |
java.lang.Object |
headerData(int section,
Qt.Orientation orientation,
int role)
Returns the data for the given role and section in the header with the specified orientation. |
java.util.SortedMap<java.lang.Integer,java.lang.Object> |
itemData(QModelIndex index)
Returns a map with values for all predefined roles in the model for the item at the given index. |
abstract QModelIndex |
mapFromSource(QModelIndex sourceIndex)
Reimplement this function to return the model index in the proxy model that corresponds to the sourceIndex from the source model. |
QItemSelection |
mapSelectionFromSource(QItemSelection selection)
Returns a proxy selection mapped from the specified selection. |
QItemSelection |
mapSelectionToSource(QItemSelection selection)
Returns a source selection mapped from the specified selection. |
abstract QModelIndex |
mapToSource(QModelIndex proxyIndex)
Reimplement this function to return the model index in the source model that corresponds to the proxyIndex in the proxy model. |
void |
revert()
Called to let the model know that it should discard whatever it has cached. |
void |
setSourceModel(QAbstractItemModel sourceModel)
Sets the given sourceModel to be processed by the proxy model. |
QAbstractItemModel |
sourceModel()
Returns the model that contains the data that is available through the proxy model. |
boolean |
submit()
Called to let the model know that it should submit whatever it has cached to the permanent storage. |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
blockSignals, childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
disconnect, disconnect, signalSender |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QAbstractProxyModel()
Equivalent to QAbstractProxyModel(0).
public QAbstractProxyModel(QObject parent)
Constructs a proxy model with the given parent.
Method Detail |
---|
public final QAbstractItemModel sourceModel()
Returns the model that contains the data that is available through the proxy model.
public java.lang.Object data(QModelIndex proxyIndex, int role)
Returns the data stored under the given role for the item referred to by the index.
data
in class QAbstractItemModel
public Qt.ItemFlags flags(QModelIndex index)
Returns the item flags for the given index.
The base class implementation returns a combination of flags that enables the item (ItemIsEnabled) and allows it to be selected (ItemIsSelectable).
flags
in class QAbstractItemModel
public java.lang.Object headerData(int section, Qt.Orientation orientation, int role)
Returns the data for the given role and section in the header with the specified orientation.
headerData
in class QAbstractItemModel
public java.util.SortedMap<java.lang.Integer,java.lang.Object> itemData(QModelIndex index)
Returns a map with values for all predefined roles in the model for the item at the given index.
Reimplemented this function if you want to extend the default behavior of this function to include custom roles in the map.
itemData
in class QAbstractItemModel
public abstract QModelIndex mapFromSource(QModelIndex sourceIndex)
Reimplement this function to return the model index in the proxy model that corresponds to the sourceIndex from the source model.
public QItemSelection mapSelectionFromSource(QItemSelection selection)
Returns a proxy selection mapped from the specified selection.
Reimplement this method to map source selections to proxy selections.
public QItemSelection mapSelectionToSource(QItemSelection selection)
Returns a source selection mapped from the specified selection.
Reimplement this method to map proxy selections to source selections.
public abstract QModelIndex mapToSource(QModelIndex proxyIndex)
Reimplement this function to return the model index in the source model that corresponds to the proxyIndex in the proxy model.
public void revert()
Called to let the model know that it should discard whatever it has cached. Typically used for row editing.
revert
in class QAbstractItemModel
public void setSourceModel(QAbstractItemModel sourceModel)
Sets the given sourceModel to be processed by the proxy model.
public boolean submit()
Called to let the model know that it should submit whatever it has cached to the permanent storage. Typically used for row editing.
Returns false on error, otherwise true.
submit
in class QAbstractItemModel
public static QAbstractProxyModel fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |