#include <KDGanttView>
This is the easy to use, complete gantt chart widget. It consists of a QTreeView on the left and a KDGantt::GraphicsView on the right separated by a QSplitter. The two views share the same model.
Definition at line 47 of file kdganttview.h.
Public Slots | |
void | setConstraintModel (ConstraintModel *) |
void | setGrid (AbstractGrid *) |
void | setItemDelegate (ItemDelegate *) |
void | setModel (QAbstractItemModel *model) |
void | setRootIndex (const QModelIndex &idx) |
void | setSelectionModel (QItemSelectionModel *smodel) |
Protected Member Functions | |
void | resizeEvent (QResizeEvent *) |
void View::resizeEvent | ( | QResizeEvent * | ev | ) | [protected] |
void View::setConstraintModel | ( | ConstraintModel * | cm | ) | [slot] |
Sets the constraintmodel displayed by this view.
Definition at line 426 of file kdganttview.cpp.
References d.
00427 { 00428 d->constraintProxy.setSourceModel( cm ); 00429 d->gfxview.setConstraintModel( &d->mappedConstraintModel ); 00430 }
void View::setGrid | ( | AbstractGrid * | grid | ) | [slot] |
Sets the AbstractGrid for this view. The grid is an object that controls how QModelIndexes are mapped to and from the view and how the background and header is rendered.
Definition at line 379 of file kdganttview.cpp.
References d.
00380 { 00381 d->gfxview.setGrid( grid ); 00382 }
void View::setItemDelegate | ( | ItemDelegate * | delegate | ) | [slot] |
Sets the KDGantt::ItemDelegate used for rendering items on this view.
Definition at line 417 of file kdganttview.cpp.
References d.
00418 { 00419 leftView()->setItemDelegate( delegate ); 00420 d->gfxview.setItemDelegate( delegate ); 00421 }
void View::setModel | ( | QAbstractItemModel * | model | ) | [slot] |
Sets the QAbstractItemModel to be displayed in this view to model.
Definition at line 351 of file kdganttview.cpp.
References d.
00352 { 00353 leftView()->setModel( model ); 00354 d->ganttProxyModel.setSourceModel( model ); 00355 d->gfxview.setModel( &d->ganttProxyModel ); 00356 }
void View::setRootIndex | ( | const QModelIndex & | idx | ) | [slot] |
Sets the root index of the model displayed by this view. Similar to QAbstractItemView::setRootIndex, default is QModelIndex().
Definition at line 401 of file kdganttview.cpp.
References d.
00402 { 00403 leftView()->setRootIndex( idx ); 00404 d->gfxview.setRootIndex( idx ); 00405 }
void View::setSelectionModel | ( | QItemSelectionModel * | smodel | ) | [slot] |
Sets the QItemSelectionModel used by this view to manage selections. Similar to QAbstractItemView::setSelectionModel
Definition at line 368 of file kdganttview.cpp.
References d.
00369 { 00370 leftView()->setSelectionModel( smodel ); 00371 d->gfxview.setSelectionModel( new QItemSelectionModel( &( d->ganttProxyModel ),this ) ); 00372 }