44 #ifndef QT_NO_PROXYMODEL 47 #include <private/qabstractproxymodel_p.h> 48 #include <QtCore/QSize> 49 #include <QtCore/QStringList> 136 d->roleNames =
d->model->roleNames();
156 return d->model->submit();
202 for (
int i = 0; i < proxyIndexes.
size(); ++i) {
208 return sourceSelection;
220 for (
int i = 0; i < sourceIndexes.
size(); ++i) {
226 return proxySelection;
252 return d->model->headerData(sourceSection, orientation, role);
278 return d->model->setData(
mapToSource(index), value, role);
303 return d->model->setHeaderData(sourceSection, orientation, value, role);
343 d->model->sort(column, order);
376 return d->model->mimeData(list);
386 return d->model->mimeTypes();
396 return d->model->supportedDropActions();
401 #include "moc_qabstractproxymodel.cpp" 403 #endif // QT_NO_PROXYMODEL The QVariant class acts like a union for the most common Qt data types.
static QAbstractItemModel * staticEmptyModel()
#define QT_END_NAMESPACE
This macro expands to.
virtual QMap< int, QVariant > itemData(const QModelIndex &index) const
Returns a map with values for all predefined roles in the model for the item at the given index...
virtual QItemSelection mapSelectionToSource(const QItemSelection &selection) const
Returns a source selection mapped from the specified proxySelection.
virtual QItemSelection mapSelectionFromSource(const QItemSelection &selection) const
Returns a proxy selection mapped from the specified sourceSelection.
QVariant headerData(int section, Qt::Orientation orientation, int role) const
Reimplemented Function
virtual void setSourceModel(QAbstractItemModel *sourceModel)
Sets the given sourceModel to be processed by the proxy model.
The QItemSelectionRange class manages information about a range of selected items in a model...
virtual bool setItemData(const QModelIndex &index, const QMap< int, QVariant > &roles)
Sets the role data for the item at index to the associated value in roles, for every Qt::ItemDataRole...
void fetchMore(const QModelIndex &parent)
Reimplemented Function
bool canFetchMore(const QModelIndex &parent) const
Reimplemented Function
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const =0
Reimplement this function to return the model index in the source model that corresponds to the proxy...
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const =0
Reimplement this function to return the model index in the proxy model that corresponds to the source...
The QObject class is the base class of all Qt objects.
bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
Reimplemented Function
QAbstractProxyModel(QObject *parent=0)
Constructs a proxy model with the given parent.
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
Returns the index of the item in the model specified by the given row, column and parent index...
#define QT_BEGIN_NAMESPACE
This macro expands to.
void destroyed(QObject *=0)
This signal is emitted immediately before the object obj is destroyed, and can not be blocked...
QAbstractItemModel * sourceModel() const
Returns the model that contains the data that is available through the proxy model.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
void revert()
Reimplemented Function
int row() const
Returns the row this model index refers to.
Qt::DropActions supportedDropActions() const
Reimplemented Function
const T & at(int i) const
Returns the item at index position i in the list.
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Reimplemented Function
The QStringList class provides a list of strings.
QMap< int, QVariant > itemData(const QModelIndex &index) const
Reimplemented Function
QStringList mimeTypes() const
Reimplemented Function
bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
QModelIndex buddy(const QModelIndex &index) const
Reimplemented Function
QSize span(const QModelIndex &index) const
Reimplemented Function
The QMimeData class provides a container for data that records information about its MIME type...
bool isValid() const
Returns true if this model index is valid; otherwise returns false.
The QAbstractItemModel class provides the abstract interface for item model classes.
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting...
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
The QItemSelection class manages information about selected items in a model.
bool setItemData(const QModelIndex &index, const QMap< int, QVariant > &roles)
Reimplemented Function
QMimeData * mimeData(const QModelIndexList &indexes) const
Reimplemented Function
QAbstractItemModel * model
QVariant data(const QModelIndex &proxyIndex, int role=Qt::DisplayRole) const
Reimplemented Function
QObject * parent() const
Returns a pointer to the parent object.
The QModelIndex class is used to locate data in a data model.
int size() const
Returns the number of items in the list.
Qt::ItemFlags flags(const QModelIndex &index) const
Reimplemented Function
~QAbstractProxyModel()
Destroys the proxy model.
void sort(int column, Qt::SortOrder order=Qt::AscendingOrder)
Reimplemented Function
The QSize class defines the size of a two-dimensional object using integer point precision.
QModelIndexList indexes() const
Returns a list of model indexes that correspond to the selected items.
virtual void _q_sourceModelDestroyed()
bool submit()
Reimplemented Function
The QMap class is a template class that provides a skip-list-based dictionary.
int column() const
Returns the column this model index refers to.