KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
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

 ListViewRowController (QListView *lv, QAbstractProxyModel *proxy)
 
 ~ListViewRowController () override
 
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
 
- Public Member Functions inherited from KDGantt::AbstractRowController
 AbstractRowController ()
 Constructor.
 
virtual ~AbstractRowController ()
 Destructor.
 

Detailed Description

Definition at line 22 of file kdganttlistviewrowcontroller.h.

Constructor & Destructor Documentation

◆ ListViewRowController()

ListViewRowController::ListViewRowController ( QListView lv,
QAbstractProxyModel proxy 
)

Definition at line 28 of file kdganttlistviewrowcontroller.cpp.

◆ ~ListViewRowController()

ListViewRowController::~ListViewRowController ( )
override

Definition at line 33 of file kdganttlistviewrowcontroller.cpp.

Member Function Documentation

◆ headerHeight()

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 41 of file kdganttlistviewrowcontroller.cpp.

References d.

◆ indexAbove()

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 84 of file kdganttlistviewrowcontroller.cpp.

References QModelIndex::column(), d, QModelIndex::row(), and QModelIndex::sibling().

◆ indexAt()

QModelIndex ListViewRowController::indexAt ( int  height) const
overridevirtual

Implements KDGantt::AbstractRowController.

Definition at line 79 of file kdganttlistviewrowcontroller.cpp.

References d.

◆ indexBelow()

QModelIndex ListViewRowController::indexBelow ( const QModelIndex idx) const
overridevirtual

◆ isRowExpanded()

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

Implements KDGantt::AbstractRowController.

Definition at line 63 of file kdganttlistviewrowcontroller.cpp.

◆ isRowVisible()

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 56 of file kdganttlistviewrowcontroller.cpp.

References d, QModelIndex::isValid(), and QModelIndex::model().

◆ maximumItemHeight()

int ListViewRowController::maximumItemHeight ( ) const
overridevirtual

Implements KDGantt::AbstractRowController.

Definition at line 46 of file kdganttlistviewrowcontroller.cpp.

References d.

◆ rowGeometry()

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);
}
A class representing a start point and a length.
int row() const const

Implements KDGantt::AbstractRowController.

Definition at line 70 of file kdganttlistviewrowcontroller.cpp.

References d, QRect::height(), QModelIndex::isValid(), QModelIndex::model(), QRect::translated(), and QRect::y().

◆ totalHeight()

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 51 of file kdganttlistviewrowcontroller.cpp.

References d.


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

© 2001 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/
Generated on Fri Apr 26 2024 00:04:58 for KD Chart API Documentation by doxygen 1.9.8