NDEVR
API Documentation
QCustomTreeWidget

A wrapper around QTreeWidget with native NDEVR objects. More...

Inheritance diagram for QCustomTreeWidget:
[legend]

Public Member Functions

 QCustomTreeWidget (QWidget *parent=nullptr)
 Constructs a tree widget.
void clear ()
 Removes all items from the tree widget.
bool event (QEvent *event)
 Handles events including palette changes to refresh icons and text.
void itemActivatedSignal (String id, int column)
 Signal emitted when a tree item is activated (e.g., by Enter key).
void itemChangedSignal (String id, int column)
 Signal emitted when a tree item's data changes.
void itemClickedSignal (String id, int column)
 Signal emitted when a tree item is clicked.
void itemCollapsedSignal (String id)
 Signal emitted when a tree item is collapsed.
void itemDoubleClickedSignal (String id, int column)
 Signal emitted when a tree item is double-clicked.
void itemEnteredSignal (String id, int column)
 Signal emitted when the mouse enters a tree item.
void itemExpandedSignal (String id)
 Signal emitted when a tree item is expanded.
void itemPressedSignal (String id)
 Signal emitted when a tree item is pressed.
Buffer< StringselectedIDs () const
 Returns the IDs of all currently selected tree items.
void selectionEditedSignal ()
 Signal emitted when the item selection changes.
void setTitle (const TranslatedString &title)
 Sets the header title for the tree widget.
void setup (const Buffer< QCustomTreeNode > &children)
 Sets up the tree with the given root-level nodes and their children.

Detailed Description

A wrapper around QTreeWidget with native NDEVR objects.


Will automatically update icons and translated strings as needed.

Definition at line 27 of file QCustomTreeWidget.h.

Constructor & Destructor Documentation

◆ QCustomTreeWidget()

QCustomTreeWidget::QCustomTreeWidget ( QWidget * parent = nullptr)

Constructs a tree widget.

Parameters
[in]parentThe parent widget, or nullptr for no parent.

Referenced by DevActionTree::DevActionTree().

Member Function Documentation

◆ event()

bool QCustomTreeWidget::event ( QEvent * event)

Handles events including palette changes to refresh icons and text.

Parameters
[in]eventThe event to handle.
Returns
True if the event was handled, false otherwise.

References event().

Referenced by event().

◆ itemActivatedSignal()

void QCustomTreeWidget::itemActivatedSignal ( String id,
int column )

Signal emitted when a tree item is activated (e.g., by Enter key).

Parameters
[in]idThe ID of the activated item.
[in]columnThe column that was activated.

◆ itemChangedSignal()

void QCustomTreeWidget::itemChangedSignal ( String id,
int column )

Signal emitted when a tree item's data changes.

Parameters
[in]idThe ID of the changed item.
[in]columnThe column that changed.

◆ itemClickedSignal()

void QCustomTreeWidget::itemClickedSignal ( String id,
int column )

Signal emitted when a tree item is clicked.

Parameters
[in]idThe ID of the clicked item.
[in]columnThe column that was clicked.

◆ itemCollapsedSignal()

void QCustomTreeWidget::itemCollapsedSignal ( String id)

Signal emitted when a tree item is collapsed.

Parameters
[in]idThe ID of the collapsed item.

◆ itemDoubleClickedSignal()

void QCustomTreeWidget::itemDoubleClickedSignal ( String id,
int column )

Signal emitted when a tree item is double-clicked.

Parameters
[in]idThe ID of the double-clicked item.
[in]columnThe column that was double-clicked.

◆ itemEnteredSignal()

void QCustomTreeWidget::itemEnteredSignal ( String id,
int column )

Signal emitted when the mouse enters a tree item.

Parameters
[in]idThe ID of the entered item.
[in]columnThe column that was entered.

◆ itemExpandedSignal()

void QCustomTreeWidget::itemExpandedSignal ( String id)

Signal emitted when a tree item is expanded.

Parameters
[in]idThe ID of the expanded item.

◆ itemPressedSignal()

void QCustomTreeWidget::itemPressedSignal ( String id)

Signal emitted when a tree item is pressed.

Parameters
[in]idThe ID of the pressed item.

◆ selectedIDs()

Buffer< String > QCustomTreeWidget::selectedIDs ( ) const

Returns the IDs of all currently selected tree items.

Returns
A buffer of string IDs for the selected items.

Referenced by DevActionTree::selectedActions().

◆ setTitle()

void QCustomTreeWidget::setTitle ( const TranslatedString & title)

Sets the header title for the tree widget.

Parameters
[in]titleThe translated title text.

◆ setup()

void QCustomTreeWidget::setup ( const Buffer< QCustomTreeNode > & children)

Sets up the tree with the given root-level nodes and their children.

Parameters
[in]childrenThe buffer of root-level tree nodes to display.

Referenced by DevActionTree::init(), and selectionEditedSignal().


The documentation for this class was generated from the following file: