24 #include "kdganttlistviewrowcontroller_p.h" 26 #include <QAbstractProxyModel> 41 : _d( new Private(lv,proxy) )
54 return d->listview->viewport()->y()-
d->listview->frameWidth();
59 return d->listview->fontMetrics().height();
64 return d->listview->verticalScrollBar()->maximum()+
d->listview->viewport()->height();
69 const QModelIndex idx =
d->proxy->mapToSource( _idx );
70 assert( idx.isValid() ? ( idx.model() ==
d->listview->model() ):(
true ) );
71 return d->listview->visualRect(idx).isValid();
83 const QModelIndex idx =
d->proxy->mapToSource( _idx );
84 assert( idx.isValid() ? ( idx.model() ==
d->listview->model() ):(
true ) );
85 QRect r =
d->listview->visualRect(idx).translated( QPoint( 0,
86 static_cast<Private::HackListView*>(
d->listview)->verticalOffset() ) );
87 return Span( r.y(), r.height() );
92 return d->proxy->mapFromSource(
d->listview->indexAt( QPoint( 1,height ) ) );
97 const QModelIndex idx =
d->proxy->mapToSource( _idx );
98 return d->proxy->mapFromSource( idx.sibling( idx.row()-1, idx.column()) );
103 const QModelIndex idx =
d->proxy->mapToSource( _idx );
104 if ( !idx.isValid() || idx.column()!=0 )
return QModelIndex();
105 if ( idx.model()->rowCount(idx.parent())<idx.row()+1 )
return QModelIndex();
106 return d->proxy->mapFromSource( idx.sibling( idx.row()+1, idx.column()) );
QModelIndex indexAbove(const QModelIndex &idx) const override
QModelIndex indexAt(int height) const override
int totalHeight() const override
bool isRowVisible(const QModelIndex &idx) const override
A class representing a start point and a length.
Class only listed here to document inheritance of some KDChart classes.
int headerHeight() const override
int maximumItemHeight() const override
~ListViewRowController() override
Span rowGeometry(const QModelIndex &idx) const override
bool isRowExpanded(const QModelIndex &idx) const override
QModelIndex indexBelow(const QModelIndex &idx) const override
ListViewRowController(QListView *lv, QAbstractProxyModel *proxy)