KGantt::SummaryHandlingProxyModel

Search for usage in LXR

KGantt::SummaryHandlingProxyModel Class Reference

#include <kganttsummaryhandlingproxymodel.h>

Public Member Functions

 SummaryHandlingProxyModel (QObject *parent=nullptr)
 
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
 

Protected Member Functions

void sourceColumnsAboutToBeInserted (const QModelIndex &idx, int start, int end) override
 
void sourceColumnsAboutToBeRemoved (const QModelIndex &idx, int start, int end) override
 
void sourceDataChanged (const QModelIndex &from, const QModelIndex &to) override
 
void sourceLayoutChanged () override
 
void sourceModelReset () override
 
void sourceRowsAboutToBeInserted (const QModelIndex &idx, int start, int end) override
 
void sourceRowsAboutToBeRemoved (const QModelIndex &, int start, int end) override
 

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 KGantt::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

Constructor & Destructor Documentation

◆ SummaryHandlingProxyModel()

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

Constructor. Creates a new SummaryHandlingProxyModel with parent parent

Definition at line 92 of file kganttsummaryhandlingproxymodel.cpp.

◆ ~SummaryHandlingProxyModel()

SummaryHandlingProxyModel::~SummaryHandlingProxyModel ( )
override

Definition at line 99 of file kganttsummaryhandlingproxymodel.cpp.

Member Function Documentation

◆ data()

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

Reimplemented from QAbstractProxyModel.

Definition at line 185 of file kganttsummaryhandlingproxymodel.cpp.

◆ flags()

Qt::ItemFlags SummaryHandlingProxyModel::flags ( const QModelIndex & idx) const
overridevirtual
See also
QAbstractItemModel::flags

Reimplemented from QAbstractProxyModel.

Definition at line 173 of file kganttsummaryhandlingproxymodel.cpp.

◆ setData()

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

Reimplemented from QAbstractProxyModel.

Definition at line 209 of file kganttsummaryhandlingproxymodel.cpp.

◆ setSourceModel()

void SummaryHandlingProxyModel::setSourceModel ( QAbstractItemModel * model)
overridevirtual

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 QAbstractProxyModel.

Definition at line 109 of file kganttsummaryhandlingproxymodel.cpp.

◆ sourceColumnsAboutToBeInserted()

void SummaryHandlingProxyModel::sourceColumnsAboutToBeInserted ( const QModelIndex & idx,
int start,
int end )
overrideprotected

Definition at line 144 of file kganttsummaryhandlingproxymodel.cpp.

◆ sourceColumnsAboutToBeRemoved()

void SummaryHandlingProxyModel::sourceColumnsAboutToBeRemoved ( const QModelIndex & idx,
int start,
int end )
overrideprotected

Definition at line 152 of file kganttsummaryhandlingproxymodel.cpp.

◆ sourceDataChanged()

void SummaryHandlingProxyModel::sourceDataChanged ( const QModelIndex & from,
const QModelIndex & to )
overrideprotected

Definition at line 127 of file kganttsummaryhandlingproxymodel.cpp.

◆ sourceLayoutChanged()

void SummaryHandlingProxyModel::sourceLayoutChanged ( )
overrideprotected

Definition at line 121 of file kganttsummaryhandlingproxymodel.cpp.

◆ sourceModelReset()

void SummaryHandlingProxyModel::sourceModelReset ( )
overrideprotected

Definition at line 115 of file kganttsummaryhandlingproxymodel.cpp.

◆ sourceRowsAboutToBeInserted()

void SummaryHandlingProxyModel::sourceRowsAboutToBeInserted ( const QModelIndex & idx,
int start,
int end )
overrideprotected

Definition at line 160 of file kganttsummaryhandlingproxymodel.cpp.

◆ sourceRowsAboutToBeRemoved()

void SummaryHandlingProxyModel::sourceRowsAboutToBeRemoved ( const QModelIndex & parentIdx,
int start,
int end )
overrideprotected

Definition at line 166 of file kganttsummaryhandlingproxymodel.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:02:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.