NDEVR
API Documentation
ImageModelLogic

Logic for handling Images in the NDEVR space, including dialogs and imports. More...

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

Public Member Functions

 ImageModelLogic (QTModelManager *manager)
 Constructs an ImageModelLogic for the given model manager.
 ImageModelLogic (QTModelManager *manager)
 Constructs the image model logic for the given manager.
virtual bool canBeHandledBySelectionWidget () const override
 Returns whether this logic can be handled by the selection widget.
virtual bool canBeHandledBySelectionWidget () const override
 Returns whether this model type can be handled by the generic selection widget.
Public Member Functions inherited from CustomModelLogic
virtual const UUIDid () const
 Returns the unique identifier for this custom model logic instance.
virtual void registerAll ()
 Registers all callbacks (context menu, tree widgets, dialog, NDV) with the manager.
const Buffer< String > & typeNames () const
 Returns the type names handled by this custom model logic.

Static Public Member Functions

static void SetEnabled (bool is_enabled, QTModelManager *manager)
 Enables or disables default image model logic for the given manager.
static void SetEnabled (bool is_enabled, QTModelManager *manager)
 Enables or disables the default image model logic for the given manager.

Protected Member Functions

virtual void setupPropertiesDialog (DesignObjectDialog *dialog, const DynamicPointer< QTDesignObject > &object) override
 Modifies property dialogs when image model objects are created or selected.
virtual void setupPropertiesDialog (DesignObjectDialog *dialog, const DynamicPointer< QTDesignObject > &object) override
 Modifies property dialogs when image objects are created or selected.
Protected Member Functions inherited from CustomModelLogic
 CustomModelLogic (QTModelManager *manager, const Buffer< String > &type_names)
 Constructs a CustomModelLogic for multiple model type names.
 CustomModelLogic (QTModelManager *manager, const StringView &type_name)
 Constructs a CustomModelLogic for a single model type name.
virtual ~CustomModelLogic ()
 Destructor.
virtual void addMenuItems (Model &, QTModelManager *, QMenu &, const Buffer< UUID > &, const SelectionInfo &)
 Override to add custom context menu items when a model of this type is selected.
ContextMenuCallbackcontextMenuCallback ()
 Returns the context menu callback for this model logic.
CustomDesignObjectDialogSetupCallback * dialogSetupCallback ()
 Returns the dialog setup callback for this model logic.
virtual void executeMenuItems (Model &, QTModelManager *, QAction *, const Buffer< UUID > &, const SelectionInfo &, PopupInfo)
 Override to handle execution of custom context menu actions.
NDVSetupCallbackndvFileReadLogic ()
 Returns the NDV file read setup callback for this model logic.
void setSorter (const std::function< bool(const Model &a, const Model &b)> &sort_function)
 Sets a custom sorting function for models of this type.
virtual void setTreeWidgetsForSelection (const Model &, Buffer< QWidget * > &, SceneTree *)
 Override to provide custom tree widgets shown when the model is selected.
virtual void setupModel (Model &)
 Override to perform setup when a model of this type is read from an NDV file.
virtual void setupUI (WindowManager *)
 Override to set up custom UI elements for this model type.
CustomTreeWidgetstreeWidgetCallback ()
 Returns the tree widget callback for this model logic.

Protected Attributes

Dictionary< UUID, Buffer< QPointer< Button > > > m_buttons
 Maps model UUIDs to their associated UI buttons.
Model m_last_model
 The most recently interacted-with image model.
Buttonm_play_button = nullptr
 Button for playing video content in image models.
Protected Attributes inherited from CustomModelLogic
ContextMenuCallbackm_custom_context_menu = nullptr
 Callback for custom context menu actions.
CustomDesignObjectDialogSetupCallback * m_dialog_callback = nullptr
 Callback for customizing property dialogs.
UUID m_id
 The unique identifier for this logic instance.
QTModelManagerm_manager
 The model manager providing data context.
NDVSetupCallbackm_ndv_setup_callback = nullptr
 Callback for NDV file read setup.
CustomModelSorter * m_sorter = nullptr
 Custom sorting logic for the model type.
CustomTreeWidgetsm_tree_button_menu = nullptr
 Callback for custom tree selection widgets.
Buffer< Stringm_type_names
 The model type names handled by this logic.

Detailed Description

Logic for handling Images in the NDEVR space, including dialogs and imports.


SetEnabled enables all default image logic.

Definition at line 24 of file ImageModelLogic.h.

Constructor & Destructor Documentation

◆ ImageModelLogic() [1/2]

ImageModelLogic::ImageModelLogic ( QTModelManager * manager)

Constructs an ImageModelLogic for the given model manager.

Parameters
[in]managerThe model manager to associate with.

◆ ImageModelLogic() [2/2]

ImageModelLogic::ImageModelLogic ( QTModelManager * manager)

Constructs the image model logic for the given manager.

Parameters
[in]managerThe model manager to register with.

Member Function Documentation

◆ canBeHandledBySelectionWidget() [1/2]

virtual bool ImageModelLogic::canBeHandledBySelectionWidget ( ) const
inlineoverridevirtual

Returns whether this logic can be handled by the selection widget.

Returns
Always false, as image models use a custom dialog.

Reimplemented from CustomModelLogic.

Definition at line 42 of file ImageModelLogic.h.

◆ canBeHandledBySelectionWidget() [2/2]

virtual bool ImageModelLogic::canBeHandledBySelectionWidget ( ) const
inlineoverridevirtual

Returns whether this model type can be handled by the generic selection widget.

Returns
True if the selection widget should handle this type.

Reimplemented from CustomModelLogic.

Definition at line 38 of file NDEVRChartLogic.h.

◆ SetEnabled() [1/2]

void ImageModelLogic::SetEnabled ( bool is_enabled,
QTModelManager * manager )
static

Enables or disables default image model logic for the given manager.

Parameters
[in]is_enabledWhether image model logic should be enabled.
[in]managerThe model manager to configure.

◆ SetEnabled() [2/2]

void ImageModelLogic::SetEnabled ( bool is_enabled,
QTModelManager * manager )
static

Enables or disables the default image model logic for the given manager.

Parameters
[in]is_enabledWhether to enable the image logic.
[in]managerThe model manager to register with.

◆ setupPropertiesDialog() [1/2]

virtual void ImageModelLogic::setupPropertiesDialog ( DesignObjectDialog * dialog,
const DynamicPointer< QTDesignObject > & object )
overrideprotectedvirtual

Modifies property dialogs when image model objects are created or selected.

Parameters
[in]dialogThe design object dialog to configure.
[in]objectThe design object being shown in the dialog.

Reimplemented from CustomModelLogic.

◆ setupPropertiesDialog() [2/2]

virtual void ImageModelLogic::setupPropertiesDialog ( DesignObjectDialog * dialog,
const DynamicPointer< QTDesignObject > & object )
overrideprotectedvirtual

Modifies property dialogs when image objects are created or selected.

Parameters
[in]dialogThe properties dialog to modify.
[in]objectThe design object being inspected.

Reimplemented from CustomModelLogic.

References m_buttons, m_last_model, and m_play_button.

Member Data Documentation

◆ m_buttons

Dictionary< UUID, Buffer< QPointer< Button > > > ImageModelLogic::m_buttons
protected

Maps model UUIDs to their associated UI buttons.

Per-object button collections for image actions.

Definition at line 52 of file ImageModelLogic.h.

Referenced by setupPropertiesDialog().

◆ m_last_model

Model ImageModelLogic::m_last_model
protected

The most recently interacted-with image model.

The most recently handled image model.

Definition at line 50 of file ImageModelLogic.h.

Referenced by setupPropertiesDialog().

◆ m_play_button

Button * ImageModelLogic::m_play_button = nullptr
protected

Button for playing video content in image models.

Button for playing animated image sequences.

Definition at line 51 of file ImageModelLogic.h.

Referenced by setupPropertiesDialog().


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