marble
kdescendantsproxymodel.cpp
Go to the documentation of this file.
143 const QPersistentModelIndex sourceIndex = q->sourceModel()->index(rowCount - 1, 0, sourceParent);
219 QModelIndexList KDescendantsProxyModel::match(const QModelIndex &start, int role, const QVariant &value, int hits, Qt::MatchFlags flags) const
517 QVariant KDescendantsProxyModel::headerData(int section, Qt::Orientation orientation, int role) const
535 void KDescendantsProxyModelPrivate::sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end)
575 void KDescendantsProxyModelPrivate::sourceRowsInserted(const QModelIndex &parent, int start, int end)
630 // The updateInternalIndexes call above will have updated the F and G mappings correctly because proxyStart is 5.
636 const QModelIndex oldIndex = q->sourceModel()->index(rowCount - 1 - difference, column, parent);
655 indexAbove = q->sourceModel()->index(q->sourceModel()->rowCount(indexAbove) - 1, column, indexAbove);
689 void KDescendantsProxyModelPrivate::sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
709 static QModelIndex getFirstDeepest(QAbstractItemModel *model, const QModelIndex &parent, int *count) {
723 void KDescendantsProxyModelPrivate::sourceRowsRemoved(const QModelIndex &parent, int start, int end)
854 void KDescendantsProxyModelPrivate::sourceRowsAboutToBeMoved(const QModelIndex &srcParent, int srcStart, int srcEnd, const QModelIndex &destParent, int destStart)
865 void KDescendantsProxyModelPrivate::sourceRowsMoved(const QModelIndex &srcParent, int srcStart, int srcEnd, const QModelIndex &destParent, int destStart)
937 q->changePersistentIndex(m_proxyIndexes.at(i), q->mapFromSource(m_layoutChangePersistentIndexes.at(i)));
946 void KDescendantsProxyModelPrivate::sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
963 const QModelIndex sourceTopLeft = q->sourceModel()->index(i, topLeft.column(), topLeft.parent());
968 const QModelIndex sourceBottomRight = q->sourceModel()->index(i, bottomRight.column(), bottomRight.parent());
bool hasIndex(int row, int column, const QModelIndex &parent) const
void clear()
virtual int rowCount(const QModelIndex &parent) const =0
iterator insert(const Key &key, const T &value)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
virtual QModelIndex index(int, int, const QModelIndex &parent=QModelIndex()) const
Definition: kdescendantsproxymodel.cpp:344
void layoutChanged()
Proxy Model for restructuring a Tree into a list.
Definition: kdescendantsproxymodel.h:69
void append(const T &value)
iterator begin()
virtual Qt::DropActions supportedDropActions() const
QString & prepend(QChar ch)
virtual QMimeData * mimeData(const QModelIndexList &indexes) const
Definition: kdescendantsproxymodel.cpp:983
iterator erase(iterator begin, iterator end)
typedef MatchFlags
void modelAboutToBeReset()
void modelReset()
virtual QMimeData * mimeData(const QModelIndexList &indexes) const
void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
virtual QStringList mimeTypes() const
QModelIndex mapToSource(const QModelIndex &proxyIndex) const
Definition: kdescendantsproxymodel.cpp:355
void beginResetModel()
virtual QModelIndexList match(const QModelIndex &start, int role, const QVariant &value, int hits, QFlags< Qt::MatchFlag > flags) const
void layoutAboutToBeChanged()
bool isValid() const
void setAncestorSeparator(const QString &separator)
Sets the ancestor separator used between data of ancestors.
Definition: kdescendantsproxymodel.cpp:236
QMap< int, QPersistentModelIndex >::const_iterator right_const_iterator
Definition: kbihash_p.h:125
_iterator< QMap< int, QPersistentModelIndex > > right_iterator
Definition: kbihash_p.h:124
bool isValid() const
bool contains(const T &value) const
void rowsAboutToBeInserted(const QModelIndex &parent, int start, int end)
const_iterator constEnd() const
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
virtual bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Definition: kdescendantsproxymodel.cpp:324
QModelIndex mapFromSource(const QModelIndex &sourceIndex) const
Definition: kdescendantsproxymodel.cpp:416
int row() const
QString ancestorSeparator() const
Separator used between data of ancestors.
Definition: kdescendantsproxymodel.cpp:242
virtual Qt::DropActions supportedDropActions() const
virtual void setSourceModel(QAbstractItemModel *sourceModel)
static QModelIndex getFirstDeepest(QAbstractItemModel *model, const QModelIndex &parent, int *count)
Definition: kdescendantsproxymodel.cpp:709
virtual QVariant data(const QModelIndex &index, int role) const =0
KDescendantsProxyModel(QObject *parent=0)
Creates a new descendant entities proxy model.
Definition: kdescendantsproxymodel.cpp:209
virtual QMimeData * mimeData(const QModelIndexList &indexes) const
QModelIndex parent() const
void rowsRemoved(const QModelIndex &parent, int start, int end)
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: kdescendantsproxymodel.cpp:485
QModelIndex createIndex(int row, int column, void *ptr) const
virtual Qt::DropActions supportedDropActions() const
Definition: kdescendantsproxymodel.cpp:1002
virtual QStringList mimeTypes() const
const_iterator constBegin() const
QAbstractItemModel * sourceModel() const
const QAbstractItemModel * model() const
virtual int columnCount(const QModelIndex &index=QModelIndex()) const
Definition: kdescendantsproxymodel.cpp:477
QVariant data(int role) const
typedef DropActions
virtual void setSourceModel(QAbstractItemModel *model)
Sets the source model of the proxy.
Definition: kdescendantsproxymodel.cpp:249
virtual bool hasChildren(const QModelIndex &parent) const
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
QModelIndex sibling(int row, int column) const
virtual Qt::ItemFlags flags(const QModelIndex &index) const
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Definition: kdescendantsproxymodel.cpp:525
virtual int columnCount(const QModelIndex &parent) const =0
int column() const
void setDisplayAncestorData(bool display)
Set whether to show ancestor data in the model.
Definition: kdescendantsproxymodel.cpp:224
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: kdescendantsproxymodel.cpp:330
void push_back(const T &value)
virtual ~KDescendantsProxyModel()
Destroys the descendant entities proxy model.
Definition: kdescendantsproxymodel.cpp:214
virtual Qt::ItemFlags flags(const QModelIndex &index) const
void rowsInserted(const QModelIndex &parent, int start, int end)
void endResetModel()
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
virtual QStringList mimeTypes() const
Definition: kdescendantsproxymodel.cpp:994
QString toString() const
iterator end()
bool displayAncestorData() const
Whether ancestor data will be displayed.
Definition: kdescendantsproxymodel.cpp:230
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
Definition: kdescendantsproxymodel.cpp:517
void destroyed(QObject *obj)
virtual QModelIndexList match(const QModelIndex &start, int role, const QVariant &value, int hits=1, Qt::MatchFlags flags=Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const
Reimplemented to match all descendants.
Definition: kdescendantsproxymodel.cpp:219
typedef ItemFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.