#include <kdganttforwardingproxymodel.h>
Public Member Functions | |
int | columnCount (const QModelIndex &idx=QModelIndex()) const |
bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) |
ForwardingProxyModel (QObject *parent=0) | |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
QModelIndex | mapFromSource (const QModelIndex &sourceIndex) const |
QModelIndex | mapToSource (const QModelIndex &proxyIndex) const |
QMimeData * | mimeData (const QModelIndexList &indexes) const |
QStringList | mimeTypes () const |
QModelIndex | parent (const QModelIndex &idx) const |
int | rowCount (const QModelIndex &idx=QModelIndex()) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
void | setSourceModel (QAbstractItemModel *model) |
Qt::DropActions | supportedDropActions () const |
virtual | ~ForwardingProxyModel () |
Protected Slots | |
virtual void | sourceColumnsAboutToBeInserted (const QModelIndex &idx, int start, int end) |
virtual void | sourceColumnsAboutToBeRemoved (const QModelIndex &idx, int start, int end) |
virtual void | sourceColumnsInserted (const QModelIndex &idx, int start, int end) |
virtual void | sourceColumnsRemoved (const QModelIndex &idx, int start, int end) |
virtual void | sourceDataChanged (const QModelIndex &from, const QModelIndex &to) |
virtual void | sourceLayoutAboutToBeChanged () |
virtual void | sourceLayoutChanged () |
virtual void | sourceModelAboutToBeReset () |
virtual void | sourceModelReset () |
virtual void | sourceRowsAboutToBeInserted (const QModelIndex &idx, int start, int end) |
virtual void | sourceRowsAboutToBeRemoved (const QModelIndex &, int start, int end) |
virtual void | sourceRowsInserted (const QModelIndex &idx, int start, int end) |
virtual void | sourceRowsRemoved (const QModelIndex &, int start, int end) |
Definition at line 31 of file kdganttforwardingproxymodel.h.
ForwardingProxyModel::ForwardingProxyModel | ( | QObject * | parent = 0 |
) | [explicit] |
Constructor. Creates a new ForwardingProxyModel with parent parent
Definition at line 35 of file kdganttforwardingproxymodel.cpp.
ForwardingProxyModel::~ForwardingProxyModel | ( | ) | [virtual] |
Definition at line 40 of file kdganttforwardingproxymodel.cpp.
int ForwardingProxyModel::columnCount | ( | const QModelIndex & | idx = QModelIndex() |
) | const |
Reimplemented in KDGantt::ProxyModel.
Definition at line 254 of file kdganttforwardingproxymodel.cpp.
References mapToSource().
bool ForwardingProxyModel::dropMimeData | ( | const QMimeData * | data, | |
Qt::DropAction | action, | |||
int | row, | |||
int | column, | |||
const QModelIndex & | parent | |||
) |
Definition at line 286 of file kdganttforwardingproxymodel.cpp.
References index(), mapToSource(), and rowCount().
QModelIndex ForwardingProxyModel::index | ( | int | row, | |
int | column, | |||
const QModelIndex & | parent = QModelIndex() | |||
) | const |
Definition at line 260 of file kdganttforwardingproxymodel.cpp.
References mapFromSource(), and mapToSource().
Referenced by KDGantt::ProxyModel::data(), dropMimeData(), and KDAB_SCOPED_UNITTEST_SIMPLE().
QModelIndex ForwardingProxyModel::mapFromSource | ( | const QModelIndex & | sourceIndex | ) | const |
Converts indexes in the source model to indexes in the proxy model
Reimplemented in KDGantt::ProxyModel.
Definition at line 45 of file kdganttforwardingproxymodel.cpp.
Referenced by KDGantt::View::ensureVisible(), index(), parent(), KDGantt::SummaryHandlingProxyModel::setData(), sourceColumnsAboutToBeInserted(), sourceColumnsAboutToBeRemoved(), KDGantt::SummaryHandlingProxyModel::sourceDataChanged(), sourceDataChanged(), sourceRowsAboutToBeInserted(), and sourceRowsAboutToBeRemoved().
QModelIndex ForwardingProxyModel::mapToSource | ( | const QModelIndex & | proxyIndex | ) | const |
Converts indexes in the proxy model to indexes in the source model
Reimplemented in KDGantt::ProxyModel.
Definition at line 66 of file kdganttforwardingproxymodel.cpp.
Referenced by columnCount(), KDGantt::SummaryHandlingProxyModel::data(), dropMimeData(), KDGantt::SummaryHandlingProxyModel::flags(), index(), mimeData(), parent(), rowCount(), KDGantt::SummaryHandlingProxyModel::setData(), and setData().
QMimeData * ForwardingProxyModel::mimeData | ( | const QModelIndexList & | indexes | ) | const |
Definition at line 278 of file kdganttforwardingproxymodel.cpp.
References mapToSource().
QStringList ForwardingProxyModel::mimeTypes | ( | ) | const |
Definition at line 306 of file kdganttforwardingproxymodel.cpp.
QModelIndex ForwardingProxyModel::parent | ( | const QModelIndex & | idx | ) | const |
Definition at line 266 of file kdganttforwardingproxymodel.cpp.
References mapFromSource(), and mapToSource().
int ForwardingProxyModel::rowCount | ( | const QModelIndex & | idx = QModelIndex() |
) | const |
Reimplemented in KDGantt::ProxyModel.
Definition at line 248 of file kdganttforwardingproxymodel.cpp.
References mapToSource().
Referenced by dropMimeData().
bool ForwardingProxyModel::setData | ( | const QModelIndex & | index, | |
const QVariant & | value, | |||
int | role = Qt::EditRole | |||
) |
Reimplemented in KDGantt::ProxyModel, and KDGantt::SummaryHandlingProxyModel.
Definition at line 272 of file kdganttforwardingproxymodel.cpp.
References mapToSource().
void ForwardingProxyModel::setSourceModel | ( | QAbstractItemModel * | model | ) |
Sets the model to be used as the source model for this proxy. The proxy does not take ownership of the model.
Reimplemented in KDGantt::SummaryHandlingProxyModel.
Definition at line 87 of file kdganttforwardingproxymodel.cpp.
References sourceColumnsAboutToBeInserted(), sourceColumnsAboutToBeRemoved(), sourceColumnsInserted(), sourceColumnsRemoved(), sourceDataChanged(), sourceLayoutAboutToBeChanged(), sourceLayoutChanged(), sourceModelAboutToBeReset(), sourceModelReset(), sourceRowsAboutToBeInserted(), sourceRowsAboutToBeRemoved(), sourceRowsInserted(), and sourceRowsRemoved().
void ForwardingProxyModel::sourceColumnsAboutToBeInserted | ( | const QModelIndex & | parentIdx, | |
int | start, | |||
int | end | |||
) | [protected, virtual, slot] |
Called just before columns are inserted into the source model.
Reimplemented in KDGantt::SummaryHandlingProxyModel.
Definition at line 170 of file kdganttforwardingproxymodel.cpp.
References mapFromSource().
Referenced by setSourceModel().
void ForwardingProxyModel::sourceColumnsAboutToBeRemoved | ( | const QModelIndex & | parentIdx, | |
int | start, | |||
int | end | |||
) | [protected, virtual, slot] |
Called just before columns are removed from the source model.
Reimplemented in KDGantt::SummaryHandlingProxyModel.
Definition at line 191 of file kdganttforwardingproxymodel.cpp.
References mapFromSource().
Referenced by setSourceModel().
void ForwardingProxyModel::sourceColumnsInserted | ( | const QModelIndex & | parentIdx, | |
int | start, | |||
int | end | |||
) | [protected, virtual, slot] |
Called after columns have been inserted into the source model.
Definition at line 180 of file kdganttforwardingproxymodel.cpp.
Referenced by setSourceModel().
void ForwardingProxyModel::sourceColumnsRemoved | ( | const QModelIndex & | parentIdx, | |
int | start, | |||
int | end | |||
) | [protected, virtual, slot] |
Called after columns have been removed from the source model.
Definition at line 201 of file kdganttforwardingproxymodel.cpp.
Referenced by setSourceModel().
void ForwardingProxyModel::sourceDataChanged | ( | const QModelIndex & | from, | |
const QModelIndex & | to | |||
) | [protected, virtual, slot] |
Called when the data in an existing item in the source model changes.
Reimplemented in KDGantt::SummaryHandlingProxyModel.
Definition at line 161 of file kdganttforwardingproxymodel.cpp.
References mapFromSource().
Referenced by setSourceModel().
void ForwardingProxyModel::sourceLayoutAboutToBeChanged | ( | ) | [protected, virtual, slot] |
Called just before the layout of the source model is changed.
Definition at line 143 of file kdganttforwardingproxymodel.cpp.
Referenced by setSourceModel().
void ForwardingProxyModel::sourceLayoutChanged | ( | ) | [protected, virtual, slot] |
Called when the layout of the source model has changed.
Reimplemented in KDGantt::SummaryHandlingProxyModel.
Definition at line 152 of file kdganttforwardingproxymodel.cpp.
Referenced by setSourceModel().
void ForwardingProxyModel::sourceModelAboutToBeReset | ( | ) | [protected, virtual, slot] |
Called when the source model is about to be reset.
Definition at line 125 of file kdganttforwardingproxymodel.cpp.
Referenced by setSourceModel().
void ForwardingProxyModel::sourceModelReset | ( | ) | [protected, virtual, slot] |
Called when the source model is reset
Reimplemented in KDGantt::SummaryHandlingProxyModel.
Definition at line 133 of file kdganttforwardingproxymodel.cpp.
Referenced by setSourceModel().
void ForwardingProxyModel::sourceRowsAboutToBeInserted | ( | const QModelIndex & | parentIdx, | |
int | start, | |||
int | end | |||
) | [protected, virtual, slot] |
Called just before rows are inserted into the source model.
Reimplemented in KDGantt::SummaryHandlingProxyModel.
Definition at line 212 of file kdganttforwardingproxymodel.cpp.
References mapFromSource().
Referenced by setSourceModel().
void ForwardingProxyModel::sourceRowsAboutToBeRemoved | ( | const QModelIndex & | parentIdx, | |
int | start, | |||
int | end | |||
) | [protected, virtual, slot] |
Called just before rows are removed from the source model.
Reimplemented in KDGantt::SummaryHandlingProxyModel.
Definition at line 231 of file kdganttforwardingproxymodel.cpp.
References mapFromSource().
Referenced by setSourceModel().
void ForwardingProxyModel::sourceRowsInserted | ( | const QModelIndex & | parentIdx, | |
int | start, | |||
int | end | |||
) | [protected, virtual, slot] |
Called after rows have been inserted into the source model.
Definition at line 220 of file kdganttforwardingproxymodel.cpp.
Referenced by setSourceModel().
void ForwardingProxyModel::sourceRowsRemoved | ( | const QModelIndex & | parentIdx, | |
int | start, | |||
int | end | |||
) | [protected, virtual, slot] |
Called after rows have been removed from the source model.
Definition at line 239 of file kdganttforwardingproxymodel.cpp.
Referenced by setSourceModel().
Qt::DropActions ForwardingProxyModel::supportedDropActions | ( | ) | const |
Definition at line 311 of file kdganttforwardingproxymodel.cpp.