KD Chart 2
[rev.2.7]
|
Proxy model that supports summary gantt items. More...
#include <kdganttsummaryhandlingproxymodel.h>
Public Member Functions | |
int | columnCount (const QModelIndex &idx=QModelIndex()) const override |
QVariant | data (const QModelIndex &proxyIndex, int role=Qt::DisplayRole) const override |
bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override |
Qt::ItemFlags | flags (const QModelIndex &idx) const override |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
QModelIndex | mapFromSource (const QModelIndex &sourceIndex) const override |
QModelIndex | mapToSource (const QModelIndex &proxyIndex) const override |
QMimeData * | mimeData (const QModelIndexList &indexes) const override |
QStringList | mimeTypes () const override |
QModelIndex | parent (const QModelIndex &idx) const override |
int | rowCount (const QModelIndex &idx=QModelIndex()) const override |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
void | setSourceModel (QAbstractItemModel *model) override |
SummaryHandlingProxyModel (QObject *parent=0) | |
Qt::DropActions | supportedDropActions () const override |
~SummaryHandlingProxyModel () override | |
Protected Slots | |
virtual void | sourceColumnsInserted (const QModelIndex &idx, int start, int end) |
virtual void | sourceColumnsRemoved (const QModelIndex &idx, int start, int end) |
virtual void | sourceLayoutAboutToBeChanged () |
virtual void | sourceModelAboutToBeReset () |
virtual void | sourceRowsInserted (const QModelIndex &idx, int start, int end) |
virtual void | sourceRowsRemoved (const QModelIndex &, int start, int end) |
Protected Member Functions | |
void | sourceColumnsAboutToBeInserted (const QModelIndex &idx, int start, int end) override |
void | sourceColumnsAboutToBeRemoved (const QModelIndex &idx, int start, int end) override |
void | sourceDataChanged (const QModelIndex &from, const QModelIndex &to) override |
void | sourceLayoutChanged () override |
void | sourceModelReset () override |
void | sourceRowsAboutToBeInserted (const QModelIndex &idx, int start, int end) override |
void | sourceRowsAboutToBeRemoved (const QModelIndex &, int start, int end) override |
Proxy model that supports summary gantt items.
This proxy model provides the functionality of summary items. A summary item is an item with type KDGantt::TypeSummary and zero or more children in the model that it summarizes. GraphicsView itself does not dictate any policy for summary items, instead the logic for making the summary items start and end points span it's children is provided by this proxy.
The start and end times of a summary is the min/max of the start/end times of it's children.
Definition at line 29 of file kdganttsummaryhandlingproxymodel.h.
|
explicit |
Constructor. Creates a new SummaryHandlingProxyModel with parent parent
Definition at line 122 of file kdganttsummaryhandlingproxymodel.cpp.
|
override |
Definition at line 129 of file kdganttsummaryhandlingproxymodel.cpp.
|
overrideinherited |
Definition at line 262 of file kdganttforwardingproxymodel.cpp.
References KDGantt::ForwardingProxyModel::mapToSource().
|
override |
Definition at line 228 of file kdganttsummaryhandlingproxymodel.cpp.
References d, KDGantt::EndTimeRole, KDGantt::ForwardingProxyModel::mapToSource(), and KDGantt::StartTimeRole.
Referenced by KDAB_SCOPED_UNITTEST_SIMPLE().
|
overrideinherited |
Definition at line 294 of file kdganttforwardingproxymodel.cpp.
References KDGantt::ForwardingProxyModel::index(), KDGantt::ForwardingProxyModel::mapToSource(), and KDGantt::ForwardingProxyModel::rowCount().
|
override |
Definition at line 216 of file kdganttsummaryhandlingproxymodel.cpp.
References d, and KDGantt::ForwardingProxyModel::mapToSource().
Referenced by KDAB_SCOPED_UNITTEST_SIMPLE().
|
overrideinherited |
Definition at line 268 of file kdganttforwardingproxymodel.cpp.
References KDGantt::ForwardingProxyModel::mapFromSource(), and KDGantt::ForwardingProxyModel::mapToSource().
Referenced by KDGantt::ProxyModel::data(), KDGantt::ForwardingProxyModel::dropMimeData(), and KDAB_SCOPED_UNITTEST_SIMPLE().
|
overrideinherited |
Converts indexes in the source model to indexes in the proxy model
Definition at line 45 of file kdganttforwardingproxymodel.cpp.
Referenced by KDGantt::View::ensureVisible(), KDGantt::ForwardingProxyModel::index(), KDGantt::ForwardingProxyModel::parent(), setData(), KDGantt::ForwardingProxyModel::sourceColumnsAboutToBeInserted(), KDGantt::ForwardingProxyModel::sourceColumnsAboutToBeRemoved(), sourceDataChanged(), KDGantt::ForwardingProxyModel::sourceDataChanged(), KDGantt::ForwardingProxyModel::sourceRowsAboutToBeInserted(), and KDGantt::ForwardingProxyModel::sourceRowsAboutToBeRemoved().
|
overrideinherited |
Converts indexes in the proxy model to indexes in the source model
Definition at line 72 of file kdganttforwardingproxymodel.cpp.
Referenced by KDGantt::ForwardingProxyModel::columnCount(), data(), KDGantt::ForwardingProxyModel::dropMimeData(), flags(), KDGantt::ForwardingProxyModel::index(), KDGantt::ForwardingProxyModel::mimeData(), KDGantt::ForwardingProxyModel::parent(), KDGantt::ForwardingProxyModel::rowCount(), setData(), and KDGantt::ForwardingProxyModel::setData().
|
overrideinherited |
Definition at line 286 of file kdganttforwardingproxymodel.cpp.
References KDGantt::ForwardingProxyModel::mapToSource().
|
overrideinherited |
Definition at line 314 of file kdganttforwardingproxymodel.cpp.
|
overrideinherited |
Definition at line 274 of file kdganttforwardingproxymodel.cpp.
References KDGantt::ForwardingProxyModel::mapFromSource(), and KDGantt::ForwardingProxyModel::mapToSource().
|
overrideinherited |
Definition at line 256 of file kdganttforwardingproxymodel.cpp.
References KDGantt::ForwardingProxyModel::mapToSource().
Referenced by KDGantt::ForwardingProxyModel::dropMimeData().
|
override |
Definition at line 252 of file kdganttsummaryhandlingproxymodel.cpp.
References d, KDGantt::EndTimeRole, KDGantt::ForwardingProxyModel::mapFromSource(), KDGantt::ForwardingProxyModel::mapToSource(), and KDGantt::StartTimeRole.
|
override |
Sets the model to be used as the source model for this proxy. The proxy does not take ownership of the model.
Definition at line 152 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
Referenced by KDAB_SCOPED_UNITTEST_SIMPLE().
|
overrideprotectedvirtual |
Called just before columns are inserted into the source model.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 187 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
|
overrideprotectedvirtual |
Called just before columns are removed from the source model.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 195 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
|
protectedvirtualslotinherited |
Called after columns have been inserted into the source model.
Definition at line 188 of file kdganttforwardingproxymodel.cpp.
Referenced by KDGantt::ForwardingProxyModel::setSourceModel().
|
protectedvirtualslotinherited |
Called after columns have been removed from the source model.
Definition at line 209 of file kdganttforwardingproxymodel.cpp.
Referenced by KDGantt::ForwardingProxyModel::setSourceModel().
|
overrideprotectedvirtual |
Called when the data in an existing item in the source model changes.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 170 of file kdganttsummaryhandlingproxymodel.cpp.
References d, KDGantt::ItemTypeRole, KDGantt::ForwardingProxyModel::mapFromSource(), and KDGantt::TypeSummary.
|
protectedvirtualslotinherited |
Called just before the layout of the source model is changed.
Definition at line 150 of file kdganttforwardingproxymodel.cpp.
Referenced by KDGantt::ForwardingProxyModel::setSourceModel().
|
overrideprotectedvirtual |
Called when the layout of the source model has changed.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 164 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
|
protectedvirtualslotinherited |
Called when the source model is about to be reset.
Definition at line 131 of file kdganttforwardingproxymodel.cpp.
Referenced by KDGantt::ForwardingProxyModel::setSourceModel().
|
overrideprotectedvirtual |
Called when the source model is reset
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 158 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
|
overrideprotectedvirtual |
Called just before rows are inserted into the source model.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 203 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
|
overrideprotectedvirtual |
Called just before rows are removed from the source model.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 209 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
|
protectedvirtualslotinherited |
Called after rows have been inserted into the source model.
Definition at line 228 of file kdganttforwardingproxymodel.cpp.
Referenced by KDGantt::ForwardingProxyModel::setSourceModel().
|
protectedvirtualslotinherited |
Called after rows have been removed from the source model.
Definition at line 247 of file kdganttforwardingproxymodel.cpp.
Referenced by KDGantt::ForwardingProxyModel::setSourceModel().
|
overrideinherited |
Definition at line 319 of file kdganttforwardingproxymodel.cpp.