NDEVR
API Documentation
DesignObjectDialog

A popup dialog for showing options or information to the user for a particular DesignObject. More...

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

Public Member Functions

 DesignObjectDialog (const DynamicPointer< QTDesignObject > &object, const ShowPropertiesSettings &style)
 Constructs a DesignObjectDialog for the given object and display style.
 DesignObjectDialog (const ShowPropertiesSettings &style)
 Constructs a DesignObjectDialog with the given display style but no target object.
 ~DesignObjectDialog ()
 Destructor.
void addEditor (Editor *editor, uint04 index=Constant< uint04 >::Invalid)
 Adds an editor tab to the dialog.
void addTabDialog (QWidget *editor, uint04 index=Constant< uint04 >::Invalid)
 Adds a generic widget as a tab in the dialog.
virtual Buffer< QWidget * > bottomOptions () override
 Returns widgets displayed at the bottom of the dialog.
void clearTabDialogs ()
 Removes all tab dialogs from the dialog.
virtual StringView customDialogIcon () const override
 Returns the custom dialog icon name, if set.
virtual TranslatedString customDialogTitle () const override
 Returns the custom dialog title, if set.
const QTDesignObjectdesignObject () const
 Returns a const reference to the underlying QTDesignObject.
const DynamicPointer< QTDesignObject > & designObjectPtr ()
 Returns the pointer to the target design object.
void dialogFinishedSignal ()
 Emitted when the dialog has completed all operations and is finished.
const UnitManagerdialogUnits () const
 Returns the unit manager used by this dialog for value conversions.
const Buffer< Editor * > & editors () const
 Returns the list of editors in this dialog.
Model getModel () const
 Returns the target as a Model.
DesignObject getObject () const
 Returns the target as a DesignObject.
template<class t_type>
bool hasEditor () const
 Checks whether this dialog contains an editor of the specified type.
virtual Buffer< QWidget * > printableWidgetOptions () override
 Returns widgets that provide print configuration options.
virtual Buffer< QWidget * > printableWidgets () override
 Returns the list of widgets that can be printed.
void requestBackSignal ()
 Emitted when the user presses the back button.
void requestCancelSignal ()
 Emitted when the user cancels the dialog.
void requestConfirmSignal ()
 Emitted when the user confirms the dialog.
void requestDeleteSignal ()
 Emitted when the user requests deletion of the target object.
void requestPrintSignal ()
 Emitted when the user requests printing.
void setCustomTitle (const TranslatedString &title)
 Sets a custom title for the dialog window.
void setHorizontal (bool horizontal) override
 Sets whether the dialog layout is horizontal or vertical.
virtual void setReadOnly (bool read_only) override
 Sets whether the dialog is in read-only mode.
virtual void setTarget (const DynamicPointer< QTDesignObject > &object) override
 Sets the target design object and refreshes all editors.
void setType (const StringView &type)
 Sets the type name used for dialog setup callbacks.
void showCurrentIndex (uint04 index)
 Shows the editor tab at the given index.
EditorShowMode showMode () const override
 Returns the show mode for this editor.
template<class t_type>
bool showSubDialog ()
 Finds the editor of type t_type and displays its tab.
QSize sizeHint () const override
 Returns the recommended size for this dialog.
virtual void updateValues () override
 Updates all editor values from the current target object state.
Public Member Functions inherited from Editor
 Editor (const DynamicPointer< QTDesignObject > &object, QWidget *parent=nullptr)
 Constructs an Editor targeting the given design object.
 Editor (QWidget *parent=nullptr)
 Constructs an Editor with no design object target.
virtual bool disableExport () const
 Returns whether exporting should be disabled for this editor.
Model getModel () const
 Returns the target design object as a Model.
DesignObject getObject () const
 Returns the target design object.
virtual bool isBusy () const
 Returns whether the editor is currently busy performing an operation.
void isBusyStatusChanged ()
 Emitted when the busy status of the editor changes.
virtual bool isHorizontal () const
 Returns whether the editor layout is horizontal.
virtual void moveTargetWithMouse ()
 Initiates interactive mouse-based movement of the target object in the viewport.
void objectUpdatedSignal ()
 Emitted when the target object has been updated.
virtual InterfaceOrientationControllerorientationController () const
 Returns the orientation controller associated with this editor.
virtual void requestScrollEnabled (bool enabled)
 Requests enabling or disabling scrolling within the editor.
virtual void setup (DesignObjectDialog *, const ShowPropertiesSettings &)
 Sets up the editor with a parent dialog and property display settings.
const DynamicPointer< QTDesignObject > & target () const
 Returns the current design object target.

Protected Member Functions

void checkIfBusy ()
 Checks if background operations are still busy before closing.
void onCancelPressed ()
 Slot called when the cancel button is pressed.
void onConfirmPressed ()
 Slot called when the confirm/accept button is pressed.
Protected Member Functions inherited from Editor
void onDesignObjectDeletedSlot ()
 Slot called when the target design object is deleted.
void onDesignObjectUpdateSlot ()
 Slot called when the target design object is updated.

Protected Attributes

Buttonm_accept_button = nullptr
 Button for accepting and closing.
QHBoxLayout * m_button_layout = nullptr
 Layout for the bottom button bar.
QWidget * m_button_layout_widget = nullptr
 Container widget for the button layout.
Buttonm_cancel_button = nullptr
 Button for canceling and closing.
TranslatedString m_custom_title
 Custom dialog title, if set.
UnitManager m_dialog_units
 Unit manager for value display conversions.
Buffer< Editor * > m_editors
 The list of editor tabs in this dialog.
Buttonm_print_button = nullptr
 Button for printing dialog content.
Buttonm_save_button = nullptr
 Button for saving changes.
ShowPropertiesSettings m_settings
 Display settings controlling property visibility.
QCustomTabWidgetm_tab_menu
 The tab widget for switching between editors.
Buffer< QWidget * > m_tabs
 The list of tab widgets.
SectionWidgetm_target_widget
 The main content section widget.
Buttonm_units_button = nullptr
 Button for changing unit settings.
Buttonm_zoom_button = nullptr
 Button for zooming to the target object.
Protected Attributes inherited from Editor
DynamicPointer< QTDesignObjectm_design_object
 The design object being edited.
bool m_is_read_only = false
 Whether the editor is in read-only mode.
InterfaceOrientationControllerm_orientation_controller
 The orientation controller for this editor.

Detailed Description

A popup dialog for showing options or information to the user for a particular DesignObject.


A DesignObjectDialog stores multiple Editors which are used to edit or modify the target Model, Material or Geometry.

Definition at line 154 of file DesignObjectDialog.h.

Constructor & Destructor Documentation

◆ DesignObjectDialog() [1/2]

DesignObjectDialog::DesignObjectDialog ( const DynamicPointer< QTDesignObject > & object,
const ShowPropertiesSettings & style )

Constructs a DesignObjectDialog for the given object and display style.

Parameters
[in]objectThe target design object to show properties for.
[in]styleThe display settings controlling which properties are shown.

◆ DesignObjectDialog() [2/2]

DesignObjectDialog::DesignObjectDialog ( const ShowPropertiesSettings & style)

Constructs a DesignObjectDialog with the given display style but no target object.

Parameters
[in]styleThe display settings controlling which properties are shown.

Member Function Documentation

◆ addEditor()

void DesignObjectDialog::addEditor ( Editor * editor,
uint04 index = Constantuint04 >::Invalid )

Adds an editor tab to the dialog.

Parameters
[in]editorThe editor to add.
[in]indexThe position to insert at, or Invalid to append.

References Editor::Editor().

◆ addTabDialog()

void DesignObjectDialog::addTabDialog ( QWidget * editor,
uint04 index = Constantuint04 >::Invalid )

Adds a generic widget as a tab in the dialog.

Parameters
[in]editorThe widget to add as a tab.
[in]indexThe position to insert at, or Invalid to append.

Referenced by BuildActionProgramLogic::setupPropertiesDialog().

◆ bottomOptions()

virtual Buffer< QWidget * > DesignObjectDialog::bottomOptions ( )
overridevirtual

Returns widgets displayed at the bottom of the dialog.

Returns
A buffer of bottom option widget pointers.

Reimplemented from Editor.

◆ customDialogIcon()

virtual StringView DesignObjectDialog::customDialogIcon ( ) const
overridevirtual

Returns the custom dialog icon name, if set.

Returns
The icon name as a StringView.

Reimplemented from Editor.

◆ customDialogTitle()

virtual TranslatedString DesignObjectDialog::customDialogTitle ( ) const
overridevirtual

Returns the custom dialog title, if set.

Returns
The custom translated title string.

Reimplemented from Editor.

◆ designObject()

const QTDesignObject & DesignObjectDialog::designObject ( ) const

Returns a const reference to the underlying QTDesignObject.

Returns
Const reference to the QTDesignObject.

◆ designObjectPtr()

const DynamicPointer< QTDesignObject > & DesignObjectDialog::designObjectPtr ( )
inline

Returns the pointer to the target design object.

Returns
Reference to the DynamicPointer of the QTDesignObject.

Definition at line 218 of file DesignObjectDialog.h.

References Editor::m_design_object.

◆ dialogUnits()

const UnitManager & DesignObjectDialog::dialogUnits ( ) const

Returns the unit manager used by this dialog for value conversions.

Returns
Const reference to the UnitManager.

◆ editors()

const Buffer< Editor * > & DesignObjectDialog::editors ( ) const
inline

Returns the list of editors in this dialog.

Returns
Const reference to the buffer of Editor pointers.

Definition at line 233 of file DesignObjectDialog.h.

References m_editors.

◆ getModel()

Model DesignObjectDialog::getModel ( ) const

Returns the target as a Model.

Returns
The Model represented by the target object.

◆ getObject()

DesignObject DesignObjectDialog::getObject ( ) const

Returns the target as a DesignObject.

Returns
The DesignObject represented by the target.

◆ hasEditor()

template<class t_type>
bool DesignObjectDialog::hasEditor ( ) const
inline

Checks whether this dialog contains an editor of the specified type.

Returns
True if an editor of type t_type exists in this dialog.

Definition at line 239 of file DesignObjectDialog.h.

References Editor::Editor(), and m_editors.

◆ printableWidgetOptions()

virtual Buffer< QWidget * > DesignObjectDialog::printableWidgetOptions ( )
overridevirtual

Returns widgets that provide print configuration options.

Returns
A buffer of print option widget pointers.

Reimplemented from Editor.

◆ printableWidgets()

virtual Buffer< QWidget * > DesignObjectDialog::printableWidgets ( )
overridevirtual

Returns the list of widgets that can be printed.

Returns
A buffer of printable widget pointers.

Reimplemented from Editor.

◆ setCustomTitle()

void DesignObjectDialog::setCustomTitle ( const TranslatedString & title)

Sets a custom title for the dialog window.

Parameters
[in]titleThe translated title string.

◆ setHorizontal()

void DesignObjectDialog::setHorizontal ( bool horizontal)
overridevirtual

Sets whether the dialog layout is horizontal or vertical.

Parameters
[in]horizontalTrue for horizontal layout, false for vertical.

Reimplemented from Editor.

◆ setReadOnly()

virtual void DesignObjectDialog::setReadOnly ( bool read_only)
overridevirtual

Sets whether the dialog is in read-only mode.

Parameters
[in]read_onlyTrue to disable editing.

Reimplemented from Editor.

◆ setTarget()

virtual void DesignObjectDialog::setTarget ( const DynamicPointer< QTDesignObject > & object)
overridevirtual

Sets the target design object and refreshes all editors.

Parameters
[in]objectThe new target design object.

Reimplemented from Editor.

◆ setType()

void DesignObjectDialog::setType ( const StringView & type)

Sets the type name used for dialog setup callbacks.

Parameters
[in]typeThe type name string.

◆ showCurrentIndex()

void DesignObjectDialog::showCurrentIndex ( uint04 index)

Shows the editor tab at the given index.

Parameters
[in]indexThe tab index to display.

Referenced by showSubDialog().

◆ showMode()

EditorShowMode DesignObjectDialog::showMode ( ) const
overridevirtual

Returns the show mode for this editor.

Returns
The EditorShowMode for this dialog.

Reimplemented from Editor.

◆ showSubDialog()

template<class t_type>
bool DesignObjectDialog::showSubDialog ( )
inline

Finds the editor of type t_type and displays its tab.

Returns
True if an editor of the specified type was found and shown.

Definition at line 321 of file DesignObjectDialog.h.

References m_editors, and showCurrentIndex().

◆ sizeHint()

QSize DesignObjectDialog::sizeHint ( ) const
override

Returns the recommended size for this dialog.

Returns
The preferred QSize.

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