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

#include <kdgantttreeviewrowcontroller.h>

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

Public Member Functions

int headerHeight () const override
 
QModelIndex indexAbove (const QModelIndex &idx) const override
 
QModelIndex indexAt (int height) const override
 
QModelIndex indexBelow (const QModelIndex &idx) const override
 
bool isRowExpanded (const QModelIndex &idx) const override
 
bool isRowVisible (const QModelIndex &idx) const override
 
int maximumItemHeight () const override
 
Span rowGeometry (const QModelIndex &idx) const override
 
int totalHeight () const override
 
 TreeViewRowController (QTreeView *tv, QAbstractProxyModel *proxy)
 
 ~TreeViewRowController () override
 

Detailed Description

Definition at line 34 of file kdgantttreeviewrowcontroller.h.

Constructor & Destructor Documentation

TreeViewRowController::TreeViewRowController ( QTreeView *  tv,
QAbstractProxyModel proxy 
)

Definition at line 39 of file kdgantttreeviewrowcontroller.cpp.

TreeViewRowController::~TreeViewRowController ( )
override

Definition at line 47 of file kdgantttreeviewrowcontroller.cpp.

Member Function Documentation

int TreeViewRowController::headerHeight ( ) const
overridevirtual
Returns
The height of the header part of the view.

Implement this to control how much space is reserved at the top of the view for a header

Implements KDGantt::AbstractRowController.

Definition at line 54 of file kdgantttreeviewrowcontroller.cpp.

References d.

QModelIndex TreeViewRowController::indexAbove ( const QModelIndex &  idx) const
overridevirtual
Returns
The modelindex for the previous row before idx.
See also
QTreeView::indexAbove

Implements KDGantt::AbstractRowController.

Definition at line 119 of file kdgantttreeviewrowcontroller.cpp.

References d.

QModelIndex TreeViewRowController::indexAt ( int  height) const
overridevirtual

Implements KDGantt::AbstractRowController.

Definition at line 93 of file kdgantttreeviewrowcontroller.cpp.

References d.

QModelIndex TreeViewRowController::indexBelow ( const QModelIndex &  idx) const
overridevirtual
Returns
The modelindex for the next row after idx.
See also
QTreeView::indexBelow

Implements KDGantt::AbstractRowController.

Definition at line 125 of file kdgantttreeviewrowcontroller.cpp.

References d.

bool TreeViewRowController::isRowExpanded ( const QModelIndex &  idx) const
overridevirtual

Implements KDGantt::AbstractRowController.

Definition at line 78 of file kdgantttreeviewrowcontroller.cpp.

References d.

bool TreeViewRowController::isRowVisible ( const QModelIndex &  idx) const
overridevirtual
Returns
true if the row containing index idx is visible in the view.

Implement this to allow KDGantt to optimize how items on screen are created. It is not harmful to always return true here, but the View will not perform optimally.

Implements KDGantt::AbstractRowController.

Definition at line 70 of file kdgantttreeviewrowcontroller.cpp.

References d.

int TreeViewRowController::maximumItemHeight ( ) const
overridevirtual

Implements KDGantt::AbstractRowController.

Definition at line 60 of file kdgantttreeviewrowcontroller.cpp.

References d.

Span TreeViewRowController::rowGeometry ( const QModelIndex &  idx) const
overridevirtual
Returns
A Span consisting of the row offset and height for the row containing idx. A simple implementation might look like
Span MyRowCtrlr::rowGeometry(const QModelIndex& idx)
{
return Span(idx.row()*10,10);
}

Implements KDGantt::AbstractRowController.

Definition at line 85 of file kdgantttreeviewrowcontroller.cpp.

References d.

int TreeViewRowController::totalHeight ( ) const
overridevirtual
Returns
the total height of the rows. For uniformly sized rows that would be number_of_rows*row_height.

Implements KDGantt::AbstractRowController.

Definition at line 65 of file kdgantttreeviewrowcontroller.cpp.

References d.


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/