Search for usage in LXR

KGantt::SummaryHandlingProxyModel Class Reference

#include <kganttsummaryhandlingproxymodel.h>

Inherits KGantt::ForwardingProxyModel.

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

Definition at line 32 of file kganttsummaryhandlingproxymodel.h.

Constructor & Destructor Documentation

◆ SummaryHandlingProxyModel()

SummaryHandlingProxyModel::SummaryHandlingProxyModel ( QObject parent = nullptr)

Constructor. Creates a new SummaryHandlingProxyModel with parent parent

Definition at line 92 of file kganttsummaryhandlingproxymodel.cpp.

Member Function Documentation

◆ data()

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

Reimplemented from QAbstractProxyModel.

Definition at line 185 of file kganttsummaryhandlingproxymodel.cpp.

◆ flags()

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

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 
See also

Reimplemented from QAbstractProxyModel.

Definition at line 209 of file kganttsummaryhandlingproxymodel.cpp.

◆ setSourceModel()

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

Reimplemented from QAbstractProxyModel.

Definition at line 109 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-2023 The KDE developers.
Generated on Tue Dec 5 2023 04:00:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.