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

#include <kdganttlistviewrowcontroller.h>

Inheritance diagram for KDGantt::ListViewRowController:
Inheritance graph
[legend]
Collaboration diagram for KDGantt::ListViewRowController:
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
 
 ListViewRowController (QListView *lv, QAbstractProxyModel *proxy)
 
int maximumItemHeight () const override
 
Span rowGeometry (const QModelIndex &idx) const override
 
int totalHeight () const override
 
 ~ListViewRowController () override
 

Detailed Description

Definition at line 34 of file kdganttlistviewrowcontroller.h.

Constructor & Destructor Documentation

ListViewRowController::ListViewRowController ( QListView *  lv,
QAbstractProxyModel proxy 
)

Definition at line 40 of file kdganttlistviewrowcontroller.cpp.

ListViewRowController::~ListViewRowController ( )
override

Definition at line 45 of file kdganttlistviewrowcontroller.cpp.

Member Function Documentation

int ListViewRowController::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 52 of file kdganttlistviewrowcontroller.cpp.

References d.

QModelIndex ListViewRowController::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 95 of file kdganttlistviewrowcontroller.cpp.

References d.

QModelIndex ListViewRowController::indexAt ( int  height) const
overridevirtual

Implements KDGantt::AbstractRowController.

Definition at line 90 of file kdganttlistviewrowcontroller.cpp.

References d.

QModelIndex ListViewRowController::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 101 of file kdganttlistviewrowcontroller.cpp.

References d.

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

Implements KDGantt::AbstractRowController.

Definition at line 74 of file kdganttlistviewrowcontroller.cpp.

bool ListViewRowController::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 67 of file kdganttlistviewrowcontroller.cpp.

References d.

int ListViewRowController::maximumItemHeight ( ) const
overridevirtual

Implements KDGantt::AbstractRowController.

Definition at line 57 of file kdganttlistviewrowcontroller.cpp.

References d.

Span ListViewRowController::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 81 of file kdganttlistviewrowcontroller.cpp.

References d.

int ListViewRowController::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 62 of file kdganttlistviewrowcontroller.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/