34#include <NDEVR/Buffer.h>
35#include <NDEVR/UUID.h>
200 Button* m_context_menu_button =
nullptr;
201 bool m_auto_expanding =
false;
202 bool m_owns_design_model =
false;
The equivelent of std::vector but with a bit more control.
Serves as the primary program interface for processes to report issues and allows any number of LogSt...
bool event(QEvent *e) override
Processes general Qt events, including tooltip and drag events.
void initialize()
Initializes common state such as context menu policy and column settings.
void resizeEvent(QResizeEvent *size) override
Handles resize events to adjust column widths.
void setSelectedModelRoots(const Buffer< UUID > &roots, bool only_visible_children)
Sets the check state for the given root models and optionally their visible children.
void selectAllVisible()
Selects all visible items in the tree view.
void updateFocus(UUID id, bool focussed)
Slot called to update the focus highlight for a model.
void updateModel(UUID id)
Slot called when a model is updated, refreshing its tree display.
void onCollapsedSlot(const QModelIndex &index)
Slot called when a tree item is collapsed.
void setModelManager(QTModelManager *manager)
Sets the model manager and creates a default proxy filter.
ProxyModelViewFilter * filter() const
Returns the proxy filter model used by this tree view.
QTModelManager * manager() const
Returns the model manager associated with this tree view.
void clickedSlot(const QModelIndex &index)
Slot called when a tree item is clicked.
ModelSelectionTree(QTModelManager *manager, QWidget *parent=nullptr)
Constructs the tree view with the given model manager.
void onExpandedSlot(const QModelIndex &index)
Slot called when a tree item is expanded.
void selectionChanged(const QItemSelection &selected, const QItemSelection &) override
Slot called when the tree selection changes, updating the scene selection.
Buffer< UUID > getModelRoots() const
Returns the UUIDs of all root-level models in the tree.
void checkStateChanged()
Emitted when the check state of any item changes.
virtual ~ModelSelectionTree()
Destroys the tree view and optionally deletes the owned filter.
void updateSelection(UUID id, bool selected)
Slot called when a model's selection state changes.
void setupFilter(ProxyModelViewFilter *filter)
Configures the proxy filter and connects its signals to the tree view.
void expandSelected()
Expands the tree to show all currently selected items.
ModelSelectionTree(ProxyModelViewFilter *manager, bool owns_filter, QWidget *parent=nullptr)
Constructs the tree view with a custom proxy filter.
Buffer< UUID > getSelectedModelRoots() const
Returns the UUIDs of all checked root-level models.
void setHeader(const TranslatedString &header_title, const StringView &header_icon)
Sets the header title and icon for the tree view.
void contextMenu(const QPoint &pos)
Slot called to show the context menu at the given position.
ModelSelectionTree(QWidget *parent=nullptr)
Constructs the tree view with no initial model manager.
void setFilter(ProxyModelViewFilter *filter, bool owns_filter)
Sets a custom proxy filter for the tree view.
Filters and sorts Models from a ModelManager for views such as in a table or in a tree view.
A Qt compatible ItemModel for interfacing with a DesignObjectLookup.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
The primary namespace for the NDEVR SDK.