![]() |
KD Chart API Documentation
3.1
|
Proxy model that supports summary gantt items. More...
#include <kdganttsummaryhandlingproxymodel.h>
Public Member Functions | |
SummaryHandlingProxyModel (QObject *parent=nullptr) | |
Constructor. More... | |
~SummaryHandlingProxyModel () override | |
QVariant | data (const QModelIndex &proxyIndex, int role=Qt::DisplayRole) const override |
Qt::ItemFlags | flags (const QModelIndex &idx) const override |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
void | setSourceModel (QAbstractItemModel *model) override |
Sets the model to be used as the source model for this proxy. More... | |
![]() | |
ForwardingProxyModel (QObject *parent=nullptr) | |
Constructor. More... | |
~ForwardingProxyModel () override | |
int | columnCount (const QModelIndex &idx=QModelIndex()) const override |
bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
QModelIndex | mapFromSource (const QModelIndex &sourceIndex) const override |
Converts indexes in the source model to indexes in the proxy model. More... | |
QModelIndex | mapToSource (const QModelIndex &proxyIndex) const override |
Converts indexes in the proxy model to indexes in the source model. More... | |
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 |
Sets the model to be used as the source model for this proxy. More... | |
Qt::DropActions | supportedDropActions () const override |
Protected Member Functions | |
void | sourceColumnsAboutToBeInserted (const QModelIndex &idx, int start, int end) override |
Called just before columns are inserted into the source model. More... | |
void | sourceColumnsAboutToBeRemoved (const QModelIndex &idx, int start, int end) override |
Called just before columns are removed from the source model. More... | |
void | sourceDataChanged (const QModelIndex &from, const QModelIndex &to) override |
Called when the data in an existing item in the source model changes. More... | |
void | sourceLayoutChanged () override |
Called when the layout of the source model has changed. More... | |
void | sourceModelReset () override |
Called when the source model is reset. More... | |
void | sourceRowsAboutToBeInserted (const QModelIndex &idx, int start, int end) override |
Called just before rows are inserted into the source model. More... | |
void | sourceRowsAboutToBeRemoved (const QModelIndex &, int start, int end) override |
Called just before rows are removed from the source model. More... | |
Additional Inherited Members | |
![]() | |
virtual void | sourceColumnsInserted (const QModelIndex &idx, int start, int end) |
Called after columns have been inserted into the source model. More... | |
virtual void | sourceColumnsRemoved (const QModelIndex &idx, int start, int end) |
Called after columns have been removed from the source model. More... | |
virtual void | sourceLayoutAboutToBeChanged () |
Called just before the layout of the source model is changed. More... | |
virtual void | sourceModelAboutToBeReset () |
Called when the source model is about to be reset. More... | |
virtual void | sourceRowsInserted (const QModelIndex &idx, int start, int end) |
Called after rows have been inserted into the source model. More... | |
virtual void | sourceRowsRemoved (const QModelIndex &, int start, int end) |
Called after rows have been removed from the source model. More... | |
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 17 of file kdganttsummaryhandlingproxymodel.h.
|
explicit |
Constructor.
Creates a new SummaryHandlingProxyModel with parent parent
Definition at line 115 of file kdganttsummaryhandlingproxymodel.cpp.
|
override |
Definition at line 123 of file kdganttsummaryhandlingproxymodel.cpp.
|
override |
Definition at line 223 of file kdganttsummaryhandlingproxymodel.cpp.
References d, KDGantt::EndTimeRole, KDGantt::ForwardingProxyModel::mapToSource(), and KDGantt::StartTimeRole.
Referenced by KDAB_SCOPED_UNITTEST_SIMPLE().
|
override |
Definition at line 211 of file kdganttsummaryhandlingproxymodel.cpp.
References d, and KDGantt::ForwardingProxyModel::mapToSource().
Referenced by KDAB_SCOPED_UNITTEST_SIMPLE().
|
override |
Definition at line 249 of file kdganttsummaryhandlingproxymodel.cpp.
References d, KDGantt::EndTimeRole, KDGantt::ForwardingProxyModel::index(), 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 147 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 182 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
|
overrideprotectedvirtual |
Called just before columns are removed from the source model.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 190 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
|
overrideprotectedvirtual |
Called when the data in an existing item in the source model changes.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 165 of file kdganttsummaryhandlingproxymodel.cpp.
References d, KDGantt::ItemTypeRole, KDGantt::ForwardingProxyModel::mapFromSource(), and KDGantt::TypeSummary.
|
overrideprotectedvirtual |
Called when the layout of the source model has changed.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 159 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
|
overrideprotectedvirtual |
Called when the source model is reset.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 153 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
|
overrideprotectedvirtual |
Called just before rows are inserted into the source model.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 198 of file kdganttsummaryhandlingproxymodel.cpp.
References d.
|
overrideprotectedvirtual |
Called just before rows are removed from the source model.
Reimplemented from KDGantt::ForwardingProxyModel.
Definition at line 204 of file kdganttsummaryhandlingproxymodel.cpp.
References d.