#include "TreeWidget.h"
|
| TreeWidget (QWidget *_parentWidget=(QWidget *) nullptr) |
|
virtual | ~TreeWidget () |
|
virtual QWidget * | getQWidget (void) override |
| Returns a pointer to the root widget of this object.
|
|
virtual const QWidget * | getQWidget (void) const override |
|
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 |
|
| QWidgetInterface () |
|
virtual | ~QWidgetInterface () |
|
void | setOTWidgetFlags (const WidgetFlags &_flags) |
|
const WidgetFlags & | otWidgetFlags (void) const |
|
◆ TreeWidget()
ot::TreeWidget::TreeWidget |
( |
QWidget * | _parentWidget = (QWidget*)nullptr | ) |
|
◆ ~TreeWidget()
ot::TreeWidget::~TreeWidget |
( |
| ) |
|
|
virtual |
◆ addItem()
◆ deselectAll()
void ot::TreeWidget::deselectAll |
( |
void | | ) |
|
Deselects all items. Emits itemSelectionChanged when done.
◆ drawRow()
void ot::TreeWidget::drawRow |
( |
QPainter * | _painter, |
|
|
const QStyleOptionViewItem & | _options, |
|
|
const QModelIndex & | _index ) const |
|
overridevirtual |
◆ findItem() [1/2]
QTreeWidgetItem * ot::TreeWidget::findItem |
( |
const QString & | _itemPath, |
|
|
char | _delimiter = '/' ) const |
◆ findItem() [2/2]
QTreeWidgetItem * ot::TreeWidget::findItem |
( |
QTreeWidgetItem * | _item, |
|
|
const QStringList & | _childPath ) const |
◆ findItemText()
QTreeWidgetItem * ot::TreeWidget::findItemText |
( |
QTreeWidgetItem * | _parent, |
|
|
const QString & | _itemText ) const |
◆ getItemPath()
QString ot::TreeWidget::getItemPath |
( |
QTreeWidgetItem * | _item, |
|
|
char | _delimiter = '/' ) const |
◆ getQWidget() [1/2]
virtual const QWidget * ot::TreeWidget::getQWidget |
( |
void | | ) |
const |
|
inlineoverridevirtual |
◆ getQWidget() [2/2]
virtual QWidget * ot::TreeWidget::getQWidget |
( |
void | | ) |
|
|
inlineoverridevirtual |
◆ itemExists()
bool ot::TreeWidget::itemExists |
( |
const QString & | _itemPath, |
|
|
char | _delimiter = '/' ) const |
|
inline |
Checks if the item at the given path exists.
- Parameters
-
_itemPath | Path to the item (e.g. "Root/Child/Item" for a delimiter '/'). |
_delimiter | Delimiter to separate the item path. |
◆ itemTextExists() [1/2]
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.
- Parameters
-
◆ itemTextExists() [2/2]
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.
- Parameters
-
_parent | The parent item to check the childs. |
_itemText | Text to check. |
◆ mousePressEvent()
void ot::TreeWidget::mousePressEvent |
( |
QMouseEvent * | _event | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: