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

#include <kdganttproxymodel.h>

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

Public Member Functions

 ProxyModel (QObject *parent=nullptr)
 
 ~ProxyModel () override
 
int column (int ganttrole) const
 
int columnCount (const QModelIndex &idx) const override
 
QVariant data (const QModelIndex &idx, int role=Qt::DisplayRole) const override
 
QModelIndex mapFromSource (const QModelIndex &idx) const override
 
QModelIndex mapToSource (const QModelIndex &proxyIdx) const override
 
int role (int ganttrole) const
 
int rowCount (const QModelIndex &idx) const override
 
void setColumn (int ganttrole, int col)
 
bool setData (const QModelIndex &idx, const QVariant &value, int role=Qt::EditRole) override
 
void setRole (int ganttrole, int role)
 
- Public Member Functions inherited from KDGantt::ForwardingProxyModel
 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
 

Additional Inherited Members

- Protected Slots inherited from KDGantt::ForwardingProxyModel
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 17 of file kdganttproxymodel.h.

Constructor & Destructor Documentation

◆ ProxyModel()

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

Definition at line 40 of file kdganttproxymodel.cpp.

◆ ~ProxyModel()

ProxyModel::~ProxyModel ( )
override

Definition at line 47 of file kdganttproxymodel.cpp.

Member Function Documentation

◆ column()

int ProxyModel::column ( int  ganttrole) const

Definition at line 101 of file kdganttproxymodel.cpp.

References d.

◆ columnCount()

int ProxyModel::columnCount ( const QModelIndex &  idx) const
override

Definition at line 137 of file kdganttproxymodel.cpp.

References mapToSource().

◆ data()

QVariant ProxyModel::data ( const QModelIndex &  idx,
int  role = Qt::DisplayRole 
) const
override

Definition at line 142 of file kdganttproxymodel.cpp.

References d, mapToSource(), and role().

◆ mapFromSource()

QModelIndex ProxyModel::mapFromSource ( const QModelIndex &  idx) const
override

Definition at line 59 of file kdganttproxymodel.cpp.

◆ mapToSource()

QModelIndex ProxyModel::mapToSource ( const QModelIndex &  proxyIdx) const
override

Definition at line 81 of file kdganttproxymodel.cpp.

Referenced by columnCount(), data(), and setData().

◆ role()

int ProxyModel::role ( int  ganttrole) const

Definition at line 111 of file kdganttproxymodel.cpp.

References d.

Referenced by data(), setData(), and setRole().

◆ rowCount()

int ProxyModel::rowCount ( const QModelIndex &  idx) const
override

Definition at line 131 of file kdganttproxymodel.cpp.

◆ setColumn()

void ProxyModel::setColumn ( int  ganttrole,
int  col 
)

Definition at line 96 of file kdganttproxymodel.cpp.

References d.

◆ setData()

bool ProxyModel::setData ( const QModelIndex &  idx,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

Definition at line 165 of file kdganttproxymodel.cpp.

References d, mapToSource(), and role().

◆ setRole()

void ProxyModel::setRole ( int  ganttrole,
int  role 
)

Definition at line 106 of file kdganttproxymodel.cpp.

References d, and role().


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