NDEVR
API Documentation
SceneTreeModelDelegate

Responsible for rendering an entry into a SceneTree widget. More...

Inheritance diagram for SceneTreeModelDelegate:
[legend]
Collaboration diagram for SceneTreeModelDelegate:
[legend]

Public Member Functions

 SceneTreeModelDelegate (ProxyModelViewFilter *manager, SceneTree *parent)
 Constructs a scene tree model delegate.
void indexSelected (const QModelIndex &index)
 Handles selection of an index in the tree.
void selectAllBetween (QModelIndex a, QModelIndex b)
 Selects all items between two model indices.
UUID selected () const
 Retrieves the UUID of the currently selected object.
fltp08 selectedSize () const
 Retrieves the current animated selection size.
int selectionBoxHeight () const
 Calculates the height of the selection box for the selected item.
void setSelectedSize (fltp08 o)
 Sets the animated selection size.
QWidget * setupPopup (UUID selected)
 Creates and returns the popup widget displayed when an item is selected.

Static Public Member Functions

static void AddWidgetCallback (CustomTreeWidgets *delegate)
 Registers a custom tree widget callback.
static void RemoveWidgetCallback (const UUID &id)
 Removes a custom tree widget callback.

Protected Member Functions

Buffer< QWidget * > defaultWidgets (UUID selected)
 Creates the default set of action widgets for a selected object.

Protected Attributes

QWidget * m_button_popup
 The popup widget containing action buttons.
Buttonm_context_menu = nullptr
 Button for opening the context menu.
UUID m_current_model = Constant<UUID>::Invalid
 UUID of the model being painted.
QPropertyAnimation * m_grow_animation
 Animation for expanding the selection row.
fltp08 m_grow_size
 The current animated grow size for the selection row.
QModelIndex m_last_index
 The last selected model index.
UUID m_last_model = Constant<UUID>::Invalid
 UUID of the last painted model.
UUID m_last_selected = Constant<UUID>::Invalid
 UUID of the previously selected object.
Buffer< QWidget * > m_last_widgets
 Widgets from the last selection popup.
SceneTreem_parent
 The parent scene tree widget.
Buttonm_properties = nullptr
 Button for opening the properties dialog.
QCustomLabelm_property_name = nullptr
 Label showing the property name.
Buttonm_save_button = nullptr
 Button for saving the selected object.
UUID m_selected = Constant<UUID>::Invalid
 UUID of the currently selected object.
QPropertyAnimation * m_shrink_animation
 Animation for shrinking the previously selected row.
ProxyModelViewFilterm_view
 The proxy filter model for the tree.
DesignObjectVisibleButtonm_visible
 Button for toggling object visibility.
CameraLocationCombom_zoom_combo = nullptr
 Combo for camera zoom presets.
Buttonm_zoom_to = nullptr
 Button for zooming to the selected object.

Static Protected Attributes

static Dictionary< UUID, CustomTreeWidgets * > s_custom_widget_callbacks
 Registered custom widget providers.

Detailed Description

Responsible for rendering an entry into a SceneTree widget.


Definition at line 71 of file SceneTreeModelDelegate.h.

Constructor & Destructor Documentation

◆ SceneTreeModelDelegate()

SceneTreeModelDelegate::SceneTreeModelDelegate ( ProxyModelViewFilter * manager,
SceneTree * parent )

Constructs a scene tree model delegate.

Parameters
[in]managerThe proxy model view filter providing data.
[in]parentThe parent scene tree widget.

Member Function Documentation

◆ AddWidgetCallback()

void SceneTreeModelDelegate::AddWidgetCallback ( CustomTreeWidgets * delegate)
static

Registers a custom tree widget callback.

Parameters
[in]delegateThe custom widget provider to register.

◆ defaultWidgets()

Buffer< QWidget * > SceneTreeModelDelegate::defaultWidgets ( UUID selected)
protected

Creates the default set of action widgets for a selected object.

Parameters
[in]selectedThe UUID of the selected object.
Returns
A buffer of default widget pointers.

References selected().

◆ indexSelected()

void SceneTreeModelDelegate::indexSelected ( const QModelIndex & index)

Handles selection of an index in the tree.

Parameters
[in]indexThe newly selected index.

◆ RemoveWidgetCallback()

void SceneTreeModelDelegate::RemoveWidgetCallback ( const UUID & id)
static

Removes a custom tree widget callback.

Parameters
[in]idThe UUID of the provider to remove.

◆ selectAllBetween()

void SceneTreeModelDelegate::selectAllBetween ( QModelIndex a,
QModelIndex b )

Selects all items between two model indices.

Parameters
[in]aThe starting index.
[in]bThe ending index.

◆ selected()

UUID SceneTreeModelDelegate::selected ( ) const
inline

Retrieves the UUID of the currently selected object.

Returns
The UUID of the selected object.

Definition at line 98 of file SceneTreeModelDelegate.h.

References m_selected.

Referenced by defaultWidgets(), and setupPopup().

◆ selectedSize()

fltp08 SceneTreeModelDelegate::selectedSize ( ) const
inline

Retrieves the current animated selection size.

Returns
The current grow size value.

Definition at line 133 of file SceneTreeModelDelegate.h.

References m_grow_size.

◆ selectionBoxHeight()

int SceneTreeModelDelegate::selectionBoxHeight ( ) const

Calculates the height of the selection box for the selected item.

Returns
The height in pixels.

◆ setSelectedSize()

void SceneTreeModelDelegate::setSelectedSize ( fltp08 o)

Sets the animated selection size.

Parameters
[in]oThe new grow size value.

◆ setupPopup()

QWidget * SceneTreeModelDelegate::setupPopup ( UUID selected)

Creates and returns the popup widget displayed when an item is selected.

Parameters
[in]selectedThe UUID of the selected object.
Returns
A pointer to the popup widget.

References selected().


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