KD Chart 2  [rev.2.6]
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
 
QModelIndex indexAbove (const QModelIndex &idx) const
 
QModelIndex indexAt (int height) const
 
QModelIndex indexBelow (const QModelIndex &idx) const
 
bool isRowExpanded (const QModelIndex &idx) const
 
bool isRowVisible (const QModelIndex &idx) const
 
 ListViewRowController (QListView *lv, QAbstractProxyModel *proxy)
 
int maximumItemHeight () const
 
Span rowGeometry (const QModelIndex &idx) const
 
int totalHeight () const
 
 ~ListViewRowController ()
 

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 ( )

Definition at line 45 of file kdganttlistviewrowcontroller.cpp.

Member Function Documentation

int ListViewRowController::headerHeight ( ) const
virtual
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
virtual
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
virtual

Implements KDGantt::AbstractRowController.

Definition at line 90 of file kdganttlistviewrowcontroller.cpp.

References d.

QModelIndex ListViewRowController::indexBelow ( const QModelIndex &  idx) const
virtual
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
virtual

Implements KDGantt::AbstractRowController.

Definition at line 74 of file kdganttlistviewrowcontroller.cpp.

bool ListViewRowController::isRowVisible ( const QModelIndex &  idx) const
virtual
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
virtual

Implements KDGantt::AbstractRowController.

Definition at line 57 of file kdganttlistviewrowcontroller.cpp.

References d.

Span ListViewRowController::rowGeometry ( const QModelIndex &  idx) const
virtual
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
virtual
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)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-chart/