34#include <NDEVR/QTModelManagerView.h>
36#include <QItemDelegate>
38class QPropertyAnimation;
71 bool event(QEvent* e)
override;
87 void selectionChanged(
const QItemSelection& selected,
const QItemSelection&)
override;
110 void resizeEvent(QResizeEvent* size)
override;
165 QSize sizeHint()
const override;
167 QMenu* m_menu =
nullptr;
168 QSize m_custom_size_hint;
171 Button* m_project_settings_button =
nullptr;
172 bool auto_expanding =
false;
173 bool m_allow_header_click =
true;
174 bool m_ignore_expand_signal =
false;
The equivelent of std::vector but with a bit more control.
Sets up a button to be a combobox with the various snap locations of a camera.
A dialog designed to allow the user to navigate a filesytem and select or create one or more files or...
A core class that represents a node on model hierarchy.
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...
Responsible for rendering an entry into a SceneTree widget.
Shows all objects in a QTModelManager in a tree hierarchy view that allows for user interaction.
QTModelManager * manager() const
Retrieves the model manager used by this tree.
void setShowMaterials(bool show_materials)
Sets whether materials are shown as child items in the tree.
void setup()
Sets up the tree view connections and model.
void setCustomHeader(const TranslatedString &header_title, const StringView &header_icon=StringView(), bool allow_click=true)
Sets a custom header for the tree view.
void initialize()
Initializes the tree view, connecting signals and setting up delegates.
void setVisibleFilter(const std::function< bool(const Model &)> &filter)
Sets a filter function that determines which models are visible in the tree.
void createContextMenu(const Buffer< UUID > &ids, const QPoint &pos)
Creates and displays a context menu for the given objects at the specified position.
void setRootModels(const Buffer< UUID > &ids)
Sets the root models displayed in the tree.
void contextMenu(const QPoint &pos)
Opens a context menu at the given position.
Buffer< UUID > selectedObjects() const
Retrieves the UUIDs of all currently selected objects.
void setCustomSizeHint(const QSize &size)
Sets a custom size hint for the tree widget.
void updateSelection(Buffer< UUID > ids, bool selected)
Updates the selection state of objects in the tree.
SceneTree(QTModelManagerView *view, QWidget *parent=nullptr)
Constructs a scene tree from a model manager view.
void updateFocus(UUID id, bool focussed)
Updates the focus state of an object in the tree.
void setIsRootFilter(const std::function< bool(const Model &)> &filter)
Sets a filter function that determines which models appear as root nodes.
void onCollapsedSlot(const QModelIndex &index)
Handles item collapse events.
void updateExpanded(const QModelIndex &index)
Updates the expanded state for a given index.
void onExpandedSlot(const QModelIndex &index)
Handles item expansion events.
SceneTree(QTModelManager *manager, QWidget *parent=nullptr)
Constructs a scene tree from a model manager.
void updateModel(UUID id)
Updates the display of a model in the tree.
The core String View 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.