![]() |
VR-Forces Developer's Guide
|
A tree widget that allows for selecting no item. Mouse clicking on any item in the tree will switch the selection-focus normally. Clicking white space off the tree will remove selection-focus from the current items.

Public Member Functions | |
| DtDeselectableTreeWidget (QWidget *parent) | |
| virtual | ~DtDeselectableTreeWidget () |
| virtual QTreeWidgetItem * | currentSelectedItem () |
| virtual void | setCurrentSelectedItem (QTreeWidgetItem *item) |
| virtual bool | ifCurrentSelectedItemHasChild () |
Protected Slots | |
| virtual void | rowsInserted (const QModelIndex &parent, int start, int end) |
| virtual void | rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end) |
Protected Member Functions | |
| virtual void | mousePressEvent (QMouseEvent *event) |
| virtual bool | eventFilter (QObject *obj, QEvent *event) |
Protected Attributes | |
| QTreeWidgetItem * | myCurrentSelectedItem |
| makVrv::DtDeselectableTreeWidget::DtDeselectableTreeWidget | ( | QWidget * | parent | ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
get the current selected tree item
|
virtual |
set the current selected tree item
|
virtual |
whether the current selected tree item has child
|
protectedvirtual |
Handle mouse press events on the widget. This handler identifies where the mouse clicked on the tree. If the click was on an item, the event is handled normally. If the click was not on an item, any selected item becomes un-selected.
|
protectedvirtual |
Handle events on the widget. This handler un-selects all items when the widget is hidden so no item is selected when the widget is re-shown. The handler reselects the current item when the widget is activated. The re-selection forces the item to visually display focus, giving feedback to the user.
|
protectedvirtualslot |
Handle when rows are inserted into the tree. This handler clears the current selected item.
|
protectedvirtualslot |
Handle when rows are removed from the tree. This handler clears the current selected item.
|
protected |