KD Chart 2  [rev.2.7]
Public Member Functions | Protected Slots | List of all members
KDGantt::ProxyModel Class Reference

#include <kdganttproxymodel.h>

Inheritance diagram for KDGantt::ProxyModel:
Inheritance graph
[legend]
Collaboration diagram for KDGantt::ProxyModel:
Collaboration graph
[legend]

Public Member Functions

int column (int ganttrole) const
 
int columnCount (const QModelIndex &idx) const override
 
QVariant data (const QModelIndex &idx, int role=Qt::DisplayRole) 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 &idx) const override
 
QModelIndex mapToSource (const QModelIndex &proxyIdx) const override
 
QMimeData * mimeData (const QModelIndexList &indexes) const override
 
QStringList mimeTypes () const override
 
QModelIndex parent (const QModelIndex &idx) const override
 
 ProxyModel (QObject *parent=0)
 
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)
 
void setSourceModel (QAbstractItemModel *model) override
 
Qt::DropActions supportedDropActions () const override
 
 ~ProxyModel () override
 

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)
 

Detailed Description

Definition at line 29 of file kdganttproxymodel.h.

Constructor & Destructor Documentation

ProxyModel::ProxyModel ( QObject parent = 0)
explicit

Definition at line 53 of file kdganttproxymodel.cpp.

ProxyModel::~ProxyModel ( )
override

Definition at line 59 of file kdganttproxymodel.cpp.

Member Function Documentation

int ProxyModel::column ( int  ganttrole) const

Definition at line 112 of file kdganttproxymodel.cpp.

References d.

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

Definition at line 148 of file kdganttproxymodel.cpp.

References mapToSource().

QVariant ProxyModel::data ( const QModelIndex &  idx,
int  role = Qt::DisplayRole 
) const
override
bool ForwardingProxyModel::dropMimeData ( const QMimeData *  data,
Qt::DropAction  action,
int  row,
int  column,
const QModelIndex &  parent 
)
overrideinherited
QModelIndex ForwardingProxyModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
overrideinherited
QModelIndex ProxyModel::mapFromSource ( const QModelIndex &  idx) const
override

Definition at line 70 of file kdganttproxymodel.cpp.

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

Definition at line 92 of file kdganttproxymodel.cpp.

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

QMimeData * ForwardingProxyModel::mimeData ( const QModelIndexList &  indexes) const
overrideinherited
QStringList ForwardingProxyModel::mimeTypes ( ) const
overrideinherited

Definition at line 314 of file kdganttforwardingproxymodel.cpp.

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

Definition at line 274 of file kdganttforwardingproxymodel.cpp.

References KDGantt::ForwardingProxyModel::mapFromSource(), and KDGantt::ForwardingProxyModel::mapToSource().

int ProxyModel::role ( int  ganttrole) const

Definition at line 122 of file kdganttproxymodel.cpp.

References d.

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

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

Definition at line 142 of file kdganttproxymodel.cpp.

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

Definition at line 107 of file kdganttproxymodel.cpp.

References d.

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

Definition at line 174 of file kdganttproxymodel.cpp.

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

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

Definition at line 117 of file kdganttproxymodel.cpp.

References d, and role().

void ForwardingProxyModel::setSourceModel ( QAbstractItemModel *  model)
overrideinherited
void ForwardingProxyModel::sourceColumnsAboutToBeInserted ( const QModelIndex &  parentIdx,
int  start,
int  end 
)
protectedvirtualslotinherited

Called just before columns are inserted into the source model.

See also
QAbstractItemModel::columnsAboutToBeInserted()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 178 of file kdganttforwardingproxymodel.cpp.

References KDGantt::ForwardingProxyModel::mapFromSource().

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

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

Called just before columns are removed from the source model.

See also
QAbstractItemModel::columnsAboutToBeRemoved()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 199 of file kdganttforwardingproxymodel.cpp.

References KDGantt::ForwardingProxyModel::mapFromSource().

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

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

Called after columns have been inserted into the source model.

See also
QAbstractItemModel::columnsInserted()

Definition at line 188 of file kdganttforwardingproxymodel.cpp.

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

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

Called after columns have been removed from the source model.

See also
QAbstractItemModel::columnsRemoved()

Definition at line 209 of file kdganttforwardingproxymodel.cpp.

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

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

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

See also
QAbstractItemModel::dataChanged()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 169 of file kdganttforwardingproxymodel.cpp.

References KDGantt::ForwardingProxyModel::mapFromSource().

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

void ForwardingProxyModel::sourceLayoutAboutToBeChanged ( )
protectedvirtualslotinherited

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

See also
QAbstractItemModel::layoutAboutToBeChanged()

Definition at line 150 of file kdganttforwardingproxymodel.cpp.

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

void ForwardingProxyModel::sourceLayoutChanged ( )
protectedvirtualslotinherited

Called when the layout of the source model has changed.

See also
QAbstractItemModel::layoutChanged()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 159 of file kdganttforwardingproxymodel.cpp.

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

void ForwardingProxyModel::sourceModelAboutToBeReset ( )
protectedvirtualslotinherited

Called when the source model is about to be reset.

See also
QAbstractItemModel::modelAboutToBeReset()

Definition at line 131 of file kdganttforwardingproxymodel.cpp.

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

void ForwardingProxyModel::sourceModelReset ( )
protectedvirtualslotinherited

Called when the source model is reset

See also
QAbstractItemModel::modelReset()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 139 of file kdganttforwardingproxymodel.cpp.

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

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

Called just before rows are inserted into the source model.

See also
QAbstractItemModel::rowsAboutToBeInserted()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 220 of file kdganttforwardingproxymodel.cpp.

References KDGantt::ForwardingProxyModel::mapFromSource().

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

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

Called just before rows are removed from the source model.

See also
QAbstractItemModel::rowsAboutToBeRemoved()

Reimplemented in KDGantt::SummaryHandlingProxyModel.

Definition at line 239 of file kdganttforwardingproxymodel.cpp.

References KDGantt::ForwardingProxyModel::mapFromSource().

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

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

Called after rows have been inserted into the source model.

See also
QAbstractItemModel::rowsInserted()

Definition at line 228 of file kdganttforwardingproxymodel.cpp.

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

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

Called after rows have been removed from the source model.

See also
QAbstractItemModel::rowsRemoved()

Definition at line 247 of file kdganttforwardingproxymodel.cpp.

Referenced by KDGantt::ForwardingProxyModel::setSourceModel().

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

Definition at line 319 of file kdganttforwardingproxymodel.cpp.


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

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/