NDEVR
API Documentation
DesignTableEditorWidget

A widget that pairs a DesignPropertyTable with a stacked editor panel, allowing the user to select a row and edit its details in an adjacent editor created by a callback. More...

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

Public Member Functions

 DesignTableEditorWidget (DesignPropertyTable *table, const std::function< QWidget *(const Model &)> &callback, QWidget *parent=nullptr)
 Constructs a DesignTableEditorWidget with a property table and editor factory callback.
void requestHiddenSignal ()
 Emitted when the editor panel requests to be hidden.
void setActive (const Model &model)
 Activates the editor for the given model, creating it via the callback if needed.

Protected Attributes

std::function< QWidget *(const Model &)> m_callback
 The factory function creating editor widgets.
QWidget * m_current_editor = nullptr
 The currently displayed editor widget.
QCustomStackedWidgetm_editor_stack = nullptr
 The stacked widget managing editor transitions.
QWidget * m_new_editor = nullptr
 A newly created editor widget pending display.
DesignPropertyTablem_table = nullptr
 The property table listing design objects.

Detailed Description

A widget that pairs a DesignPropertyTable with a stacked editor panel, allowing the user to select a row and edit its details in an adjacent editor created by a callback.


Definition at line 15 of file DesignTableEditorWidget.h.

Constructor & Destructor Documentation

◆ DesignTableEditorWidget()

DesignTableEditorWidget::DesignTableEditorWidget ( DesignPropertyTable * table,
const std::function< QWidget *(const Model &)> & callback,
QWidget * parent = nullptr )

Constructs a DesignTableEditorWidget with a property table and editor factory callback.

Parameters
[in]tableThe DesignPropertyTable providing the list of objects.
[in]callbackA factory function that creates an editor widget for the given Model.
[in]parentThe parent widget.

Member Function Documentation

◆ setActive()

void DesignTableEditorWidget::setActive ( const Model & model)

Activates the editor for the given model, creating it via the callback if needed.

Parameters
[in]modelThe model to display in the editor panel.

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