Public Member Functions | Protected Slots | Protected Member Functions

KDGantt::SummaryHandlingProxyModel Class Reference

Proxy model that supports summary gantt items. More...

#include <kdganttsummaryhandlingproxymodel.h>

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

List of all members.

Public Member Functions

int columnCount (const QModelIndex &idx=QModelIndex()) const
QVariant data (const QModelIndex &proxyIndex, int role=Qt::DisplayRole) const
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Qt::ItemFlags flags (const QModelIndex &idx) const
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
QModelIndex mapFromSource (const QModelIndex &sourceIndex) const
QModelIndex mapToSource (const QModelIndex &proxyIndex) const
QMimeData * mimeData (const QModelIndexList &indexes) const
QStringList mimeTypes () const
QModelIndex parent (const QModelIndex &idx) const
int rowCount (const QModelIndex &idx=QModelIndex()) const
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
void setSourceModel (QAbstractItemModel *model)
 SummaryHandlingProxyModel (QObject *parent=0)
Qt::DropActions supportedDropActions () const
virtual ~SummaryHandlingProxyModel ()

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)
void sourceColumnsAboutToBeRemoved (const QModelIndex &idx, int start, int end)
void sourceDataChanged (const QModelIndex &from, const QModelIndex &to)
void sourceLayoutChanged ()
void sourceModelReset ()
void sourceRowsAboutToBeInserted (const QModelIndex &idx, int start, int end)
void sourceRowsAboutToBeRemoved (const QModelIndex &, int start, int end)

Detailed Description

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.

See also:
GraphicsView::setModel

Definition at line 29 of file kdganttsummaryhandlingproxymodel.h.


Constructor & Destructor Documentation

SummaryHandlingProxyModel::SummaryHandlingProxyModel ( QObject parent = 0  )  [explicit]

Constructor. Creates a new SummaryHandlingProxyModel with parent parent

Definition at line 122 of file kdganttsummaryhandlingproxymodel.cpp.

SummaryHandlingProxyModel::~SummaryHandlingProxyModel (  )  [virtual]

Definition at line 129 of file kdganttsummaryhandlingproxymodel.cpp.


Member Function Documentation

int ForwardingProxyModel::columnCount ( const QModelIndex &  idx = QModelIndex()  )  const [inherited]
See also:
QAbstractItemModel::columnCount

Reimplemented in KDGantt::ProxyModel.

Definition at line 254 of file kdganttforwardingproxymodel.cpp.

References KDGantt::ForwardingProxyModel::mapToSource().

QVariant SummaryHandlingProxyModel::data ( const QModelIndex &  proxyIndex,
int  role = Qt::DisplayRole 
) const
See also:
QAbstractItemModel::data

Definition at line 227 of file kdganttsummaryhandlingproxymodel.cpp.

References d, KDGantt::EndTimeRole, KDGantt::ForwardingProxyModel::mapToSource(), and KDGantt::StartTimeRole.

Referenced by KDAB_SCOPED_UNITTEST_SIMPLE().

bool ForwardingProxyModel::dropMimeData ( const QMimeData *  data,
Qt::DropAction  action,
int  row,
int  column,
const QModelIndex &  parent 
) [inherited]
Qt::ItemFlags SummaryHandlingProxyModel::flags ( const QModelIndex &  idx  )  const
See also:
QAbstractItemModel::flags

Definition at line 215 of file kdganttsummaryhandlingproxymodel.cpp.

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

Referenced by KDAB_SCOPED_UNITTEST_SIMPLE().

QModelIndex ForwardingProxyModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const [inherited]
QModelIndex ForwardingProxyModel::mapFromSource ( const QModelIndex &  sourceIndex  )  const [inherited]
QModelIndex ForwardingProxyModel::mapToSource ( const QModelIndex &  proxyIndex  )  const [inherited]
QMimeData * ForwardingProxyModel::mimeData ( const QModelIndexList &  indexes  )  const [inherited]
QStringList ForwardingProxyModel::mimeTypes (  )  const [inherited]

Definition at line 306 of file kdganttforwardingproxymodel.cpp.

QModelIndex ForwardingProxyModel::parent ( const QModelIndex &  idx  )  const [inherited]
See also:
QAbstractItemModel::parent

Definition at line 266 of file kdganttforwardingproxymodel.cpp.

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

int ForwardingProxyModel::rowCount ( const QModelIndex &  idx = QModelIndex()  )  const [inherited]
See also:
QAbstractItemModel::rowCount

Reimplemented in KDGantt::ProxyModel.

Definition at line 248 of file kdganttforwardingproxymodel.cpp.

References KDGantt::ForwardingProxyModel::mapToSource().

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

bool SummaryHandlingProxyModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
void SummaryHandlingProxyModel::setSourceModel ( QAbstractItemModel *  model  ) 

Sets the model to be used as the source model for this proxy. The proxy does not take ownership of the model.

See also:
QAbstractProxyModel::setSourceModel

Reimplemented from KDGantt::ForwardingProxyModel.

Definition at line 151 of file kdganttsummaryhandlingproxymodel.cpp.

References d.

Referenced by KDAB_SCOPED_UNITTEST_SIMPLE().

void SummaryHandlingProxyModel::sourceColumnsAboutToBeInserted ( const QModelIndex &  parentIdx,
int  start,
int  end 
) [protected, virtual]

Called just before columns are inserted into the source model.

See also:
QAbstractItemModel::columnsAboutToBeInserted()

Reimplemented from KDGantt::ForwardingProxyModel.

Definition at line 186 of file kdganttsummaryhandlingproxymodel.cpp.

References d.

void SummaryHandlingProxyModel::sourceColumnsAboutToBeRemoved ( const QModelIndex &  parentIdx,
int  start,
int  end 
) [protected, virtual]

Called just before columns are removed from the source model.

See also:
QAbstractItemModel::columnsAboutToBeRemoved()

Reimplemented from KDGantt::ForwardingProxyModel.

Definition at line 194 of file kdganttsummaryhandlingproxymodel.cpp.

References d.

void ForwardingProxyModel::sourceColumnsInserted ( const QModelIndex &  parentIdx,
int  start,
int  end 
) [protected, virtual, slot, inherited]

Called after columns have been inserted into the source model.

See also:
QAbstractItemModel::columnsInserted()

Definition at line 180 of file kdganttforwardingproxymodel.cpp.

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

void ForwardingProxyModel::sourceColumnsRemoved ( const QModelIndex &  parentIdx,
int  start,
int  end 
) [protected, virtual, slot, inherited]

Called after columns have been removed from the source model.

See also:
QAbstractItemModel::columnsRemoved()

Definition at line 201 of file kdganttforwardingproxymodel.cpp.

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

void SummaryHandlingProxyModel::sourceDataChanged ( const QModelIndex &  from,
const QModelIndex &  to 
) [protected, virtual]

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

See also:
QAbstractItemModel::dataChanged()

Reimplemented from KDGantt::ForwardingProxyModel.

Definition at line 169 of file kdganttsummaryhandlingproxymodel.cpp.

References d, KDGantt::ItemTypeRole, and KDGantt::ForwardingProxyModel::mapFromSource().

void ForwardingProxyModel::sourceLayoutAboutToBeChanged (  )  [protected, virtual, slot, inherited]

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

See also:
QAbstractItemModel::layoutAboutToBeChanged()

Definition at line 143 of file kdganttforwardingproxymodel.cpp.

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

void SummaryHandlingProxyModel::sourceLayoutChanged (  )  [protected, virtual]

Called when the layout of the source model has changed.

See also:
QAbstractItemModel::layoutChanged()

Reimplemented from KDGantt::ForwardingProxyModel.

Definition at line 163 of file kdganttsummaryhandlingproxymodel.cpp.

References d.

void ForwardingProxyModel::sourceModelAboutToBeReset (  )  [protected, virtual, slot, inherited]

Called when the source model is about to be reset.

See also:
QAbstractItemModel::modelAboutToBeReset()

Definition at line 125 of file kdganttforwardingproxymodel.cpp.

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

void SummaryHandlingProxyModel::sourceModelReset (  )  [protected, virtual]

Called when the source model is reset

See also:
QAbstractItemModel::modelReset()

Reimplemented from KDGantt::ForwardingProxyModel.

Definition at line 157 of file kdganttsummaryhandlingproxymodel.cpp.

References d.

void SummaryHandlingProxyModel::sourceRowsAboutToBeInserted ( const QModelIndex &  parentIdx,
int  start,
int  end 
) [protected, virtual]

Called just before rows are inserted into the source model.

See also:
QAbstractItemModel::rowsAboutToBeInserted()

Reimplemented from KDGantt::ForwardingProxyModel.

Definition at line 202 of file kdganttsummaryhandlingproxymodel.cpp.

References d.

void SummaryHandlingProxyModel::sourceRowsAboutToBeRemoved ( const QModelIndex &  parentIdx,
int  start,
int  end 
) [protected, virtual]

Called just before rows are removed from the source model.

See also:
QAbstractItemModel::rowsAboutToBeRemoved()

Reimplemented from KDGantt::ForwardingProxyModel.

Definition at line 208 of file kdganttsummaryhandlingproxymodel.cpp.

References d.

void ForwardingProxyModel::sourceRowsInserted ( const QModelIndex &  parentIdx,
int  start,
int  end 
) [protected, virtual, slot, inherited]

Called after rows have been inserted into the source model.

See also:
QAbstractItemModel::rowsInserted()

Definition at line 220 of file kdganttforwardingproxymodel.cpp.

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

void ForwardingProxyModel::sourceRowsRemoved ( const QModelIndex &  parentIdx,
int  start,
int  end 
) [protected, virtual, slot, inherited]

Called after rows have been removed from the source model.

See also:
QAbstractItemModel::rowsRemoved()

Definition at line 239 of file kdganttforwardingproxymodel.cpp.

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

Qt::DropActions ForwardingProxyModel::supportedDropActions (  )  const [inherited]

Definition at line 311 of file kdganttforwardingproxymodel.cpp.


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