#include <kdganttlistviewrowcontroller.h>
Definition at line 34 of file kdganttlistviewrowcontroller.h.
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 () |
ListViewRowController::ListViewRowController | ( | QListView * | lv, | |
QAbstractProxyModel * | proxy | |||
) |
Definition at line 42 of file kdganttlistviewrowcontroller.cpp.
00043 : _d( new Private(lv,proxy) ) 00044 { 00045 }
ListViewRowController::~ListViewRowController | ( | ) |
int ListViewRowController::headerHeight | ( | ) | const [virtual] |
Implements KDGantt::AbstractRowController.
Definition at line 54 of file kdganttlistviewrowcontroller.cpp.
References d.
QModelIndex ListViewRowController::indexAbove | ( | const QModelIndex & | idx | ) | const [virtual] |
Implements KDGantt::AbstractRowController.
Definition at line 95 of file kdganttlistviewrowcontroller.cpp.
References d.
00096 { 00097 const QModelIndex idx = d->proxy->mapToSource( _idx ); 00098 return d->proxy->mapFromSource( idx.sibling( idx.row()-1, idx.column()) ); 00099 }
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] |
Implements KDGantt::AbstractRowController.
Definition at line 101 of file kdganttlistviewrowcontroller.cpp.
References d.
00102 { 00103 const QModelIndex idx = d->proxy->mapToSource( _idx ); 00104 if( !idx.isValid() || idx.column()!=0 ) return QModelIndex(); 00105 if( idx.model()->rowCount(idx.parent())<idx.row()+1 ) return QModelIndex(); 00106 return d->proxy->mapFromSource( idx.sibling( idx.row()+1, idx.column()) ); 00107 }
bool ListViewRowController::isRowExpanded | ( | const QModelIndex & | idx | ) | const [virtual] |
Implements KDGantt::AbstractRowController.
Definition at line 76 of file kdganttlistviewrowcontroller.cpp.
bool ListViewRowController::isRowVisible | ( | const QModelIndex & | idx | ) | const [virtual] |
Implements KDGantt::AbstractRowController.
Definition at line 69 of file kdganttlistviewrowcontroller.cpp.
References d.
00070 { 00071 const QModelIndex idx = d->proxy->mapToSource( _idx ); 00072 assert( idx.isValid() ? ( idx.model() == d->listview->model() ):( true ) ); 00073 return d->listview->visualRect(idx).isValid(); 00074 }
int ListViewRowController::maximumItemHeight | ( | ) | const [virtual] |
Implements KDGantt::AbstractRowController.
Definition at line 59 of file kdganttlistviewrowcontroller.cpp.
References d.
00060 { 00061 return d->listview->fontMetrics().height(); 00062 }
Span ListViewRowController::rowGeometry | ( | const QModelIndex & | idx | ) | const [virtual] |
Span MyRowCtrlr::rowGeometry(const QModelIndex& idx) { return Span(idx.row()*10,10); }
Implements KDGantt::AbstractRowController.
Definition at line 81 of file kdganttlistviewrowcontroller.cpp.
00082 { 00083 const QModelIndex idx = d->proxy->mapToSource( _idx ); 00084 assert( idx.isValid() ? ( idx.model() == d->listview->model() ):( true ) ); 00085 QRect r = d->listview->visualRect(idx).translated( QPoint( 0, 00086 static_cast<Private::HackListView*>(d->listview)->verticalOffset() ) ); 00087 return Span( r.y(), r.height() ); 00088 }
int ListViewRowController::totalHeight | ( | ) | const [virtual] |
Implements KDGantt::AbstractRowController.
Definition at line 64 of file kdganttlistviewrowcontroller.cpp.
References d.
00065 { 00066 return d->listview->verticalScrollBar()->maximum()+d->listview->viewport()->height(); 00067 }