#include "TreeWidget.h"
Classes | |
| struct | ItemInformation |
Public Member Functions | |
| TreeWidget (QWidget *_parentWidget=(QWidget *) nullptr) | |
| virtual | ~TreeWidget () |
| virtual QWidget * | getQWidget (void) override |
| Returns a pointer to the root widget of this object. | |
| QTreeWidgetItem * | findItem (const QString &_itemPath, char _delimiter='/') const |
| bool | itemExists (const QString &_itemPath, char _delimiter='/') const |
| Checks if the item at the given path exists. | |
| bool | itemTextExists (const QString &_itemText) const |
| Checks if an item with the given text exists. The item text is the text of the single item. The item to check may be nested. | |
| QString | getItemPath (QTreeWidgetItem *_item, char _delimiter='/') const |
| QTreeWidgetItem * | addItem (const TreeWidgetItemInfo &_item) |
| void | deselectAll (void) |
| Deselects all items. Emits itemSelectionChanged when done. | |
| virtual void | mousePressEvent (QMouseEvent *_event) override |
| virtual void | drawRow (QPainter *_painter, const QStyleOptionViewItem &_options, const QModelIndex &_index) const override |
| bool | itemTextExists (QTreeWidgetItem *_parent, const QString &_itemText) const |
| Checks if an item with the given text exists. The item text is the text of the single item. The item to check may be nested. | |
| QTreeWidgetItem * | findItem (QTreeWidgetItem *_item, const QStringList &_childPath) const |
| QTreeWidgetItem * | findItemText (QTreeWidgetItem *_parent, const QString &_itemText) const |
Public Member Functions inherited from ot::QWidgetInterface | |
| QWidgetInterface () | |
| virtual | ~QWidgetInterface () |
| void | setOTWidgetFlags (const WidgetFlags &_flags) |
| const WidgetFlags & | otWidgetFlags (void) const |
| virtual void | otWidgetFlagsChanged (const WidgetFlags &_flags) |
| void | centerOnParent (const QWidget *const _parentWidget) |
| Centers this widget on the parent. If no parent is provided the widget will center on the screen. | |
| QPoint | calculateCenterOnParentPos (const QWidget *const _parentWidget) |
| Calculates the top left corner of this widget centered on the parent widget. If no parent is provided the widget will center on the screen. | |
Additional Inherited Members | |
Protected Attributes inherited from ot::QWidgetInterface | |
| WidgetFlags | m_widgetFlags |
| ot::TreeWidget::TreeWidget | ( | QWidget * | _parentWidget = (QWidget*)nullptr | ) |
|
virtual |
| QTreeWidgetItem * ot::TreeWidget::addItem | ( | const TreeWidgetItemInfo & | _item | ) |
| void ot::TreeWidget::deselectAll | ( | void | ) |
Deselects all items. Emits itemSelectionChanged when done.
|
overridevirtual |
Reimplemented in ot::PropertyGrid::PropertyGridTree.
| QTreeWidgetItem * ot::TreeWidget::findItem | ( | const QString & | _itemPath, |
| char | _delimiter = '/' ) const |
| QTreeWidgetItem * ot::TreeWidget::findItem | ( | QTreeWidgetItem * | _item, |
| const QStringList & | _childPath ) const |
| QTreeWidgetItem * ot::TreeWidget::findItemText | ( | QTreeWidgetItem * | _parent, |
| const QString & | _itemText ) const |
| QString ot::TreeWidget::getItemPath | ( | QTreeWidgetItem * | _item, |
| char | _delimiter = '/' ) const |
|
inlineoverridevirtual |
Returns a pointer to the root widget of this object.
Implements ot::QWidgetInterface.
|
inline |
Checks if the item at the given path exists.
| _itemPath | Path to the item (e.g. "Root/Child/Item" for a delimiter '/'). |
| _delimiter | Delimiter to separate the item path. |
| bool ot::TreeWidget::itemTextExists | ( | const QString & | _itemText | ) | const |
Checks if an item with the given text exists. The item text is the text of the single item. The item to check may be nested.
| _itemText | Text to check. |
| bool ot::TreeWidget::itemTextExists | ( | QTreeWidgetItem * | _parent, |
| const QString & | _itemText ) const |
Checks if an item with the given text exists. The item text is the text of the single item. The item to check may be nested.
| _parent | The parent item to check the childs. |
| _itemText | Text to check. |
|
overridevirtual |
Reimplemented in ot::PropertyGrid::PropertyGridTree.