KD Chart API Documentation  3.1
Public Member Functions | Protected Slots | List of all members
KDGantt::ForwardingProxyModel Class Reference

#include <kdganttforwardingproxymodel.h>

Inheritance diagram for KDGantt::ForwardingProxyModel:
KDGantt::ProxyModel KDGantt::SummaryHandlingProxyModel

Public Member Functions

 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 Slots

virtual void sourceColumnsAboutToBeInserted (const QModelIndex &idx, int start, int end)
 Called just before columns are inserted into the source model. More...
 
virtual void sourceColumnsAboutToBeRemoved (const QModelIndex &idx, int start, int end)
 Called just before columns are removed from the source model. More...
 
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 sourceDataChanged (const QModelIndex &from, const QModelIndex &to)
 Called when the data in an existing item in the source model changes. More...
 
virtual void sourceLayoutAboutToBeChanged ()
 Called just before the layout of the source model is changed. More...
 
virtual void sourceLayoutChanged ()
 Called when the layout of the source model has changed. More...
 
virtual void sourceModelAboutToBeReset ()
 Called when the source model is about to be reset. More...
 
virtual void sourceModelReset ()
 Called when the source model is reset. More...
 
virtual void sourceRowsAboutToBeInserted (const QModelIndex &idx, int start, int end)
 Called just before rows are inserted into the source model. More...
 
virtual void sourceRowsAboutToBeRemoved (const QModelIndex &, int start, int end)
 Called just before rows are removed from the source model. 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...
 

Detailed Description

Definition at line 19 of file kdganttforwardingproxymodel.h.

Constructor & Destructor Documentation

◆ ForwardingProxyModel()

ForwardingProxyModel::ForwardingProxyModel ( QObject *  parent = nullptr)
explicit

Constructor.

Creates a new ForwardingProxyModel with parent parent

Definition at line 23 of file kdganttforwardingproxymodel.cpp.

◆ ~ForwardingProxyModel()

ForwardingProxyModel::~ForwardingProxyModel ( )
override

Definition at line 28 of file kdganttforwardingproxymodel.cpp.

Member Function Documentation

◆ columnCount()

int ForwardingProxyModel::columnCount ( const QModelIndex &  idx = QModelIndex()) const
override
See also
QAbstractItemModel::columnCount

Definition at line 252 of file kdganttforwardingproxymodel.cpp.

References mapToSource().

◆ dropMimeData()

bool ForwardingProxyModel::dropMimeData ( const QMimeData *  data,
Qt::DropAction  action,
int  row,
int  column,
const QModelIndex &  parent 
)
override

Definition at line 284 of file kdganttforwardingproxymodel.cpp.

References index(), mapToSource(), parent(), and rowCount().

◆ index()

QModelIndex ForwardingProxyModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
override
See also
QAbstractItemModel::index

Definition at line 258 of file kdganttforwardingproxymodel.cpp.

References mapFromSource(), mapToSource(), and parent().

Referenced by dropMimeData(), KDAB_SCOPED_UNITTEST_SIMPLE(), setData(), and KDGantt::SummaryHandlingProxyModel::setData().

◆ mapFromSource()

QModelIndex ForwardingProxyModel::mapFromSource ( const QModelIndex &  sourceIndex) const
override

◆ mapToSource()

QModelIndex ForwardingProxyModel::mapToSource ( const QModelIndex &  proxyIndex) const
override

◆ mimeData()

QMimeData * ForwardingProxyModel::mimeData ( const QModelIndexList &  indexes) const
override

Definition at line 276 of file kdganttforwardingproxymodel.cpp.

References mapToSource().

◆ mimeTypes()

QStringList ForwardingProxyModel::mimeTypes ( ) const
override

Definition at line 304 of file kdganttforwardingproxymodel.cpp.

◆ parent()

QModelIndex ForwardingProxyModel::parent ( const QModelIndex &  idx) const
override
See also
QAbstractItemModel::parent

Definition at line 264 of file kdganttforwardingproxymodel.cpp.

References mapFromSource(), and mapToSource().

Referenced by dropMimeData(), and index().

◆ rowCount()

int ForwardingProxyModel::rowCount ( const QModelIndex &  idx = QModelIndex()) const
override
See also
QAbstractItemModel::rowCount

Definition at line 246 of file kdganttforwardingproxymodel.cpp.

References mapToSource().

Referenced by dropMimeData().

◆ setData()

bool ForwardingProxyModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override
See also
QAbstractItemModel::setData

Definition at line 270 of file kdganttforwardingproxymodel.cpp.

References index(), and mapToSource().

◆ setSourceModel()

void ForwardingProxyModel::setSourceModel ( QAbstractItemModel *  model)
override

◆ sourceColumnsAboutToBeInserted

void ForwardingProxyModel::sourceColumnsAboutToBeInserted ( const QModelIndex &  parentIdx,
int  start,
int  end 
)
protectedvirtualslot

Called just before columns are inserted into the source model.

See also
QAbstractItemModel::columnsAboutToBeInserted()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 168 of file kdganttforwardingproxymodel.cpp.

References mapFromSource().

Referenced by setSourceModel().

◆ sourceColumnsAboutToBeRemoved

void ForwardingProxyModel::sourceColumnsAboutToBeRemoved ( const QModelIndex &  parentIdx,
int  start,
int  end 
)
protectedvirtualslot

Called just before columns are removed from the source model.

See also
QAbstractItemModel::columnsAboutToBeRemoved()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 189 of file kdganttforwardingproxymodel.cpp.

References mapFromSource().

Referenced by setSourceModel().

◆ sourceColumnsInserted

void ForwardingProxyModel::sourceColumnsInserted ( const QModelIndex &  parentIdx,
int  start,
int  end 
)
protectedvirtualslot

Called after columns have been inserted into the source model.

See also
QAbstractItemModel::columnsInserted()

Definition at line 178 of file kdganttforwardingproxymodel.cpp.

Referenced by setSourceModel().

◆ sourceColumnsRemoved

void ForwardingProxyModel::sourceColumnsRemoved ( const QModelIndex &  parentIdx,
int  start,
int  end 
)
protectedvirtualslot

Called after columns have been removed from the source model.

See also
QAbstractItemModel::columnsRemoved()

Definition at line 199 of file kdganttforwardingproxymodel.cpp.

Referenced by setSourceModel().

◆ sourceDataChanged

void ForwardingProxyModel::sourceDataChanged ( const QModelIndex &  from,
const QModelIndex &  to 
)
protectedvirtualslot

Called when the data in an existing item in the source model changes.

See also
QAbstractItemModel::dataChanged()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 159 of file kdganttforwardingproxymodel.cpp.

References mapFromSource().

Referenced by setSourceModel().

◆ sourceLayoutAboutToBeChanged

void ForwardingProxyModel::sourceLayoutAboutToBeChanged ( )
protectedvirtualslot

Called just before the layout of the source model is changed.

See also
QAbstractItemModel::layoutAboutToBeChanged()

Definition at line 140 of file kdganttforwardingproxymodel.cpp.

Referenced by setSourceModel().

◆ sourceLayoutChanged

void ForwardingProxyModel::sourceLayoutChanged ( )
protectedvirtualslot

Called when the layout of the source model has changed.

See also
QAbstractItemModel::layoutChanged()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 149 of file kdganttforwardingproxymodel.cpp.

Referenced by setSourceModel().

◆ sourceModelAboutToBeReset

void ForwardingProxyModel::sourceModelAboutToBeReset ( )
protectedvirtualslot

Called when the source model is about to be reset.

See also
QAbstractItemModel::modelAboutToBeReset()

Definition at line 121 of file kdganttforwardingproxymodel.cpp.

Referenced by setSourceModel().

◆ sourceModelReset

void ForwardingProxyModel::sourceModelReset ( )
protectedvirtualslot

Called when the source model is reset.

See also
QAbstractItemModel::modelReset()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 129 of file kdganttforwardingproxymodel.cpp.

Referenced by setSourceModel().

◆ sourceRowsAboutToBeInserted

void ForwardingProxyModel::sourceRowsAboutToBeInserted ( const QModelIndex &  parentIdx,
int  start,
int  end 
)
protectedvirtualslot

Called just before rows are inserted into the source model.

See also
QAbstractItemModel::rowsAboutToBeInserted()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 210 of file kdganttforwardingproxymodel.cpp.

References mapFromSource().

Referenced by setSourceModel().

◆ sourceRowsAboutToBeRemoved

void ForwardingProxyModel::sourceRowsAboutToBeRemoved ( const QModelIndex &  parentIdx,
int  start,
int  end 
)
protectedvirtualslot

Called just before rows are removed from the source model.

See also
QAbstractItemModel::rowsAboutToBeRemoved()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 229 of file kdganttforwardingproxymodel.cpp.

References mapFromSource().

Referenced by setSourceModel().

◆ sourceRowsInserted

void ForwardingProxyModel::sourceRowsInserted ( const QModelIndex &  parentIdx,
int  start,
int  end 
)
protectedvirtualslot

Called after rows have been inserted into the source model.

See also
QAbstractItemModel::rowsInserted()

Definition at line 218 of file kdganttforwardingproxymodel.cpp.

Referenced by setSourceModel().

◆ sourceRowsRemoved

void ForwardingProxyModel::sourceRowsRemoved ( const QModelIndex &  parentIdx,
int  start,
int  end 
)
protectedvirtualslot

Called after rows have been removed from the source model.

See also
QAbstractItemModel::rowsRemoved()

Definition at line 237 of file kdganttforwardingproxymodel.cpp.

Referenced by setSourceModel().

◆ supportedDropActions()

Qt::DropActions ForwardingProxyModel::supportedDropActions ( ) const
override

Definition at line 309 of file kdganttforwardingproxymodel.cpp.


The documentation for this class was generated from the following files:

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated by doxygen 1.9.1