KGantt::TreeViewRowController
#include <kgantttreeviewrowcontroller.h>
Public Member Functions | |
TreeViewRowController (QTreeView *tv, QAbstractProxyModel *proxy) | |
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 KGantt::AbstractRowController | |
AbstractRowController () | |
virtual | ~AbstractRowController () |
Detailed Description
This is an implementation of AbstractRowController that aligns a gantt view with a QTreeView.
Definition at line 26 of file kgantttreeviewrowcontroller.h.
Constructor & Destructor Documentation
◆ TreeViewRowController()
TreeViewRowController::TreeViewRowController | ( | QTreeView * | tv, |
QAbstractProxyModel * | proxy ) |
Definition at line 22 of file kgantttreeviewrowcontroller.cpp.
◆ ~TreeViewRowController()
|
override |
Definition at line 30 of file kgantttreeviewrowcontroller.cpp.
Member Function Documentation
◆ headerHeight()
|
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 KGantt::AbstractRowController.
Definition at line 37 of file kgantttreeviewrowcontroller.cpp.
◆ indexAbove()
|
overridevirtual |
- Returns
- The modelindex for the previous row before idx.
- See also
- QTreeView::indexAbove
Implements KGantt::AbstractRowController.
Definition at line 96 of file kgantttreeviewrowcontroller.cpp.
◆ indexAt()
|
overridevirtual |
Implements KGantt::AbstractRowController.
Definition at line 76 of file kgantttreeviewrowcontroller.cpp.
◆ indexBelow()
|
overridevirtual |
- Returns
- The modelindex for the next row after idx.
- See also
- QTreeView::indexBelow
Implements KGantt::AbstractRowController.
Definition at line 102 of file kgantttreeviewrowcontroller.cpp.
◆ isRowExpanded()
|
overridevirtual |
Implements KGantt::AbstractRowController.
Definition at line 61 of file kgantttreeviewrowcontroller.cpp.
◆ isRowVisible()
|
overridevirtual |
- Returns
- true if the row containing index idx is visible in the view.
Implement this to allow KGantt 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 KGantt::AbstractRowController.
Definition at line 53 of file kgantttreeviewrowcontroller.cpp.
◆ maximumItemHeight()
|
overridevirtual |
Implements KGantt::AbstractRowController.
Definition at line 43 of file kgantttreeviewrowcontroller.cpp.
◆ rowGeometry()
|
overridevirtual |
- Returns
- A Span consisting of the row offset and height for the row containing idx. A simple implementation might look like
Implements KGantt::AbstractRowController.
Definition at line 68 of file kgantttreeviewrowcontroller.cpp.
◆ totalHeight()
|
overridevirtual |
- Returns
- the total height of the rows. For uniformly sized rows that would be number_of_rows*row_height.
Implements KGantt::AbstractRowController.
Definition at line 48 of file kgantttreeviewrowcontroller.cpp.
The documentation for this class was generated from the following files:
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.