ParaView
|
The pqFlatTreeView class is used to display a flattened tree view of a hierarchical model. More...
#include <pqFlatTreeView.h>
Public Types | |
enum | SelectionBehavior { SelectItems, SelectRows, SelectColumns } |
enum | SelectionMode { NoSelection, SingleSelection, ExtendedSelection } |
Public Slots | |
void | reset () |
void | selectAll () |
void | setCurrentIndex (const QModelIndex &index) |
void | expandAll () |
void | expand (const QModelIndex &index) |
void | collapse (const QModelIndex &index) |
void | scrollTo (const QModelIndex &index) |
Signals | |
void | activated (const QModelIndex &index) |
void | clicked (const QModelIndex &index) |
Public Member Functions | |
pqFlatTreeView (QWidget *parent=0) | |
Creates a flat tree view. More... | |
virtual | ~pqFlatTreeView () |
virtual bool | eventFilter (QObject *object, QEvent *e) |
Used to monitor the header view. More... | |
Model Setup Methods | |
QAbstractItemModel * | getModel () const |
void | setModel (QAbstractItemModel *model) |
QModelIndex | getRootIndex () const |
void | setRootIndex (const QModelIndex &index) |
Selection Setup Methods | |
QItemSelectionModel * | getSelectionModel () const |
void | setSelectionModel (QItemSelectionModel *selectionModel) |
SelectionBehavior | getSelectionBehavior () const |
void | setSelectionBehavior (SelectionBehavior behavior) |
SelectionMode | getSelectionMode () const |
void | setSelectionMode (SelectionMode mode) |
Column Management Methods | |
QHeaderView * | getHeader () const |
Gets whether or not the column size is managed by the view. More... | |
void | setHeader (QHeaderView *headerView) |
Gets whether or not the column size is managed by the view. More... | |
bool | isColumnSizeManaged () const |
Gets whether or not the column size is managed by the view. More... | |
void | setColumnSizeManaged (bool managed) |
Sets whether or not the column size is managed by the view. More... | |
Drawing Options | |
int | getIconSize () const |
void | setIconSize (int iconSize) |
Index Location Methods | |
bool | isIndexHidden (const QModelIndex &index) const |
void | getVisibleRect (const QModelIndex &index, QRect &area) const |
QModelIndex | getIndexVisibleAt (const QPoint &point) const |
QModelIndex | getIndexCellAt (const QPoint &point) const |
void | getSelectionIn (const QRect &rect, QItemSelection &items) const |
Index Navigation Methods | |
bool | isIndexExpanded (const QModelIndex &index) const |
QModelIndex | getNextVisibleIndex (const QModelIndex &index, const QModelIndex &root=QModelIndex()) const |
QModelIndex | getRelativeIndex (const QString &id, const QModelIndex &root=QModelIndex()) const |
void | getRelativeIndexId (const QModelIndex &index, QString &id, const QModelIndex &root=QModelIndex()) const |
Editing Methods | |
bool | startEditing (const QModelIndex &index) |
void | finishEditing () |
void | cancelEditing () |
Protected Slots | |
Model Change Handlers | |
void | insertRows (const QModelIndex &parent, int start, int end) |
void | startRowRemoval (const QModelIndex &parent, int start, int end) |
void | finishRowRemoval (const QModelIndex &parent, int start, int end) |
void | insertColumns (const QModelIndex &parent, int start, int end) |
void | startColumnRemoval (const QModelIndex &parent, int start, int end) |
void | finishColumnRemoval (const QModelIndex &parent, int start, int end) |
void | updateData (const QModelIndex &topLeft, const QModelIndex &bottomRight) |
Protected Member Functions | |
int | horizontalOffset () const |
int | verticalOffset () const |
virtual void | resizeEvent (QResizeEvent *e) |
virtual bool | viewportEvent (QEvent *e) |
virtual void | paintEvent (QPaintEvent *e) |
QStyleOptionViewItem | getViewOptions () const |
Keyboard Event Handlers | |
virtual void | keyPressEvent (QKeyEvent *e) |
void | keyboardSearch (const QString &search) |
Mouse Event Handlers | |
virtual void | mousePressEvent (QMouseEvent *e) |
virtual void | mouseMoveEvent (QMouseEvent *e) |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
virtual void | mouseDoubleClickEvent (QMouseEvent *e) |
virtual void | wheelEvent (QWheelEvent *e) |
Event Handlers | |
virtual bool | event (QEvent *e) |
The pqFlatTreeView class is used to display a flattened tree view of a hierarchical model.
The tree view is flattened by taking long indented chains of single items and lining them up vertically. If an item is the only descendent of its parent item, it is drawn directly below its parent. A vertical branch is drawn between the items to indicate relationship. If an item has more than one descendent, those items are indented from the parent. Normal tree view branches are drawn between the parent and child items to show the relationship.
Definition at line 72 of file pqFlatTreeView.h.
Enumerator | |
---|---|
SelectItems | |
SelectRows | |
SelectColumns |
Definition at line 77 of file pqFlatTreeView.h.
Enumerator | |
---|---|
NoSelection | |
SingleSelection | |
ExtendedSelection |
Definition at line 84 of file pqFlatTreeView.h.
pqFlatTreeView::pqFlatTreeView | ( | QWidget * | parent = 0 | ) |
Creates a flat tree view.
parent | The parent widget for this instance. |
|
virtual |
|
virtual |
Used to monitor the header view.
When the header view is shown or hidden, the layout needs to be updated and repainted.
object | The object which will receive the event. |
e | The event to be sent. |
Reimplemented in pqPipelineBrowserWidget.
|
inline |
Definition at line 110 of file pqFlatTreeView.h.
void pqFlatTreeView::setModel | ( | QAbstractItemModel * | model | ) |
QModelIndex pqFlatTreeView::getRootIndex | ( | ) | const |
void pqFlatTreeView::setRootIndex | ( | const QModelIndex & | index | ) |
|
inline |
Definition at line 119 of file pqFlatTreeView.h.
void pqFlatTreeView::setSelectionModel | ( | QItemSelectionModel * | selectionModel | ) |
|
inline |
Definition at line 122 of file pqFlatTreeView.h.
void pqFlatTreeView::setSelectionBehavior | ( | SelectionBehavior | behavior | ) |
|
inline |
Definition at line 125 of file pqFlatTreeView.h.
void pqFlatTreeView::setSelectionMode | ( | SelectionMode | mode | ) |
|
inline |
Gets whether or not the column size is managed by the view.
Column size management is on by default and used when the view header is hidden. When size management is on, the columns will be resized to fit the model data in the column.
Definition at line 131 of file pqFlatTreeView.h.
void pqFlatTreeView::setHeader | ( | QHeaderView * | headerView | ) |
Gets whether or not the column size is managed by the view.
Column size management is on by default and used when the view header is hidden. When size management is on, the columns will be resized to fit the model data in the column.
|
inline |
Gets whether or not the column size is managed by the view.
Column size management is on by default and used when the view header is hidden. When size management is on, the columns will be resized to fit the model data in the column.
Definition at line 143 of file pqFlatTreeView.h.
void pqFlatTreeView::setColumnSizeManaged | ( | bool | managed | ) |
Sets whether or not the column size is managed by the view.
managed | True if the column size should be managed. |
int pqFlatTreeView::getIconSize | ( | ) | const |
void pqFlatTreeView::setIconSize | ( | int | iconSize | ) |
bool pqFlatTreeView::isIndexHidden | ( | const QModelIndex & | index | ) | const |
void pqFlatTreeView::getVisibleRect | ( | const QModelIndex & | index, |
QRect & | area | ||
) | const |
QModelIndex pqFlatTreeView::getIndexVisibleAt | ( | const QPoint & | point | ) | const |
QModelIndex pqFlatTreeView::getIndexCellAt | ( | const QPoint & | point | ) | const |
void pqFlatTreeView::getSelectionIn | ( | const QRect & | rect, |
QItemSelection & | items | ||
) | const |
bool pqFlatTreeView::isIndexExpanded | ( | const QModelIndex & | index | ) | const |
QModelIndex pqFlatTreeView::getNextVisibleIndex | ( | const QModelIndex & | index, |
const QModelIndex & | root = QModelIndex() |
||
) | const |
QModelIndex pqFlatTreeView::getRelativeIndex | ( | const QString & | id, |
const QModelIndex & | root = QModelIndex() |
||
) | const |
void pqFlatTreeView::getRelativeIndexId | ( | const QModelIndex & | index, |
QString & | id, | ||
const QModelIndex & | root = QModelIndex() |
||
) | const |
bool pqFlatTreeView::startEditing | ( | const QModelIndex & | index | ) |
void pqFlatTreeView::finishEditing | ( | ) |
void pqFlatTreeView::cancelEditing | ( | ) |
|
signal |
|
signal |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedvirtual |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |