#include <warptreeview.h>
Public Member Functions |
|
| WarpTreeView (QWidget *p=0) | |
| ~WarpTreeView () | |
| QRect | visualRect (const QModelIndex &) const |
| void | scrollTo (const QModelIndex &, QAbstractItemView::ScrollHint) |
| QModelIndex | indexAt (const QPoint &) const |
| QModelIndex | moveCursor (QAbstractItemView::CursorAction, Qt::KeyboardModifiers) |
| int | horizontalOffset () const |
| int | verticalOffset () const |
| bool | isIndexHidden (const QModelIndex &) const |
| void | setSelection (const QRect &, QFlags< QItemSelectionModel::SelectionFlag >) |
| QRegion | visualRegionForSelection (const QItemSelection &) const |
| void | currentChanged (const QModelIndex ¤t, const QModelIndex &previous) |
| void | paintEvent (QPaintEvent *e) |
| void | resizeEvent (QResizeEvent *e) |
| void | mouseMoveEvent (QMouseEvent *event) |
| void | mousePressEvent (QMouseEvent *event) |
| void | mouseReleaseEvent (QMouseEvent *event) |
| void | wheelEvent (QWheelEvent *event) |
| void | setModel (QAbstractItemModel *model) |
| void | setRootIndex (const QModelIndex &index) |
| void | setWarpNodePainter (WarpNodePainter *painter) |
| void | setAntialiased (bool a) |
| bool | antialiased () const |
Classes |
|
| class | Private |
| WarpTreeView::WarpTreeView | ( | QWidget * | p = 0 |
) |
Constructs an empty WarpTreeView. Set a model with setModel() to use the WarpTreeView.
| WarpTreeView::~WarpTreeView | ( | ) |
Destroys the view.
| QRect WarpTreeView::visualRect | ( | const QModelIndex & | ) | const |
Return the bounding rectangle of the given QModelIndex.
| void WarpTreeView::scrollTo | ( | const QModelIndex & | , | |
| QAbstractItemView::ScrollHint | ||||
| ) |
Move the given index to the center of the view. The ScrollHint has no effect.
| QModelIndex WarpTreeView::indexAt | ( | const QPoint & | ) | const |
Returns the model index of the item at the viewport coordinates.
| QModelIndex WarpTreeView::moveCursor | ( | QAbstractItemView::CursorAction | , | |
| Qt::KeyboardModifiers | ||||
| ) |
Moves the cursor in the view according to the given cursorAction and keyboard modifiers specified by modifiers.
| int WarpTreeView::horizontalOffset | ( | ) | const |
Returns the horizontal offset of the view.
| int WarpTreeView::verticalOffset | ( | ) | const |
Returns the vertical offset of the view.
| bool WarpTreeView::isIndexHidden | ( | const QModelIndex & | ) | const |
Returns true if the item referred to by the given index is hidden in the view, otherwise returns false.
| void WarpTreeView::setSelection | ( | const QRect & | , | |
| QFlags< QItemSelectionModel::SelectionFlag > | ||||
| ) |
Applies the selection flags to the items in or touched by the rectangle, rect.
| QRegion WarpTreeView::visualRegionForSelection | ( | const QItemSelection & | ) | const |
Returns the region from the viewport of the items in the given selection.
| void WarpTreeView::currentChanged | ( | const QModelIndex & | current, | |
| const QModelIndex & | previous | |||
| ) |
This slot is called when a new item becomes the current item. The previous current item is specified by the previous index, and the new item by the current index.
| void WarpTreeView::paintEvent | ( | QPaintEvent * | e | ) |
Handle a paint event.
| void WarpTreeView::resizeEvent | ( | QResizeEvent * | e | ) |
Handle a resize event.
| void WarpTreeView::mouseMoveEvent | ( | QMouseEvent * | event | ) |
Handle a mouse move event. This is used for dragging the view.
| void WarpTreeView::mousePressEvent | ( | QMouseEvent * | event | ) |
Handle a mouse press event.
| void WarpTreeView::mouseReleaseEvent | ( | QMouseEvent * | event | ) |
Handle a mouse release event.
| void WarpTreeView::wheelEvent | ( | QWheelEvent * | event | ) |
Handle a mouse wheel event by zooming the view in or out.
| void WarpTreeView::setModel | ( | QAbstractItemModel * | model | ) |
Change the model of the widget.
| void WarpTreeView::setRootIndex | ( | const QModelIndex & | index | ) |
Change the index that is drawn as the root of the widget.
| void WarpTreeView::setWarpNodePainter | ( | WarpNodePainter * | painter | ) |
Set a new painter for the lines and nodes.
| void WarpTreeView::setAntialiased | ( | bool | a | ) |
Change whether the tree is drawn antialiassed or not.
| bool WarpTreeView::antialiased | ( | ) | const |
Determine whether the tree is drawn antialiassed or not.
1.5.0