3#include <NDEVR/ContextMenuManager.h>
4#include <NDEVR/QTModelManager.h>
5#include <NDEVR/DesignObjectDialog.h>
6#include <NDEVR/Pointer.h>
8#include <NDEVR/String.h>
15 class CustomModelSorter;
18 class CustomDesignObjectDialogSetupCallback;
80 friend class CustomModelContextMenu;
81 friend class CustomModelTreeWidgets;
82 friend class CustomModelSorter;
83 friend class CustomDesignObjectDialogSetupCallback;
129 NDEVR_API
virtual const UUID&
id()
const;
The equivelent of std::vector but with a bit more control.
NDVSetupCallback * m_ndv_setup_callback
Callback for NDV file read setup.
CustomTreeWidgets * m_tree_button_menu
Callback for custom tree selection widgets.
CustomDesignObjectDialogSetupCallback * m_dialog_callback
Callback for customizing property dialogs.
NDVSetupCallback * ndvFileReadLogic()
Returns the NDV file read setup callback for this model logic.
virtual void setupUI(WindowManager *)
Override to set up custom UI elements for this model type.
ContextMenuCallback * m_custom_context_menu
Callback for custom context menu actions.
virtual ~CustomModelLogic()
Destructor.
const Buffer< String > & typeNames() const
Returns the type names handled by this custom model logic.
virtual const UUID & id() const
Returns the unique identifier for this custom model logic instance.
virtual void setTreeWidgetsForSelection(const Model &, Buffer< QWidget * > &, SceneTree *)
Override to provide custom tree widgets shown when the model is selected.
ContextMenuCallback * contextMenuCallback()
Returns the context menu callback for this model logic.
CustomDesignObjectDialogSetupCallback * dialogSetupCallback()
Returns the dialog setup callback for this model logic.
CustomTreeWidgets * treeWidgetCallback()
Returns the tree widget callback for this model logic.
virtual void registerAll()
Registers all callbacks (context menu, tree widgets, dialog, NDV) with the manager.
virtual bool canBeHandledBySelectionWidget() const
Returns whether this model type can be handled by the generic selection widget.
CustomModelLogic(QTModelManager *manager, const Buffer< String > &type_names)
Constructs a CustomModelLogic for multiple model type names.
virtual void executeMenuItems(Model &, QTModelManager *, QAction *, const Buffer< UUID > &, const SelectionInfo &, PopupInfo)
Override to handle execution of custom context menu actions.
Buffer< String > m_type_names
The model type names handled by this logic.
UUID m_id
The unique identifier for this logic instance.
CustomModelSorter * m_sorter
Custom sorting logic for the model type.
virtual void setupPropertiesDialog(DesignObjectDialog *, const DynamicPointer< QTDesignObject > &)
Override to customize property dialogs when objects of this type are created.
QTModelManager * m_manager
The model manager providing data context.
void setSorter(const std::function< bool(const Model &a, const Model &b)> &sort_function)
Sets a custom sorting function for models of this type.
CustomModelLogic(QTModelManager *manager, const StringView &type_name)
Constructs a CustomModelLogic for a single model type name.
virtual void setupModel(Model &)
Override to perform setup when a model of this type is read from an NDV file.
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.
A popup dialog for showing options or information to the user for a particular DesignObject.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
A core class that represents a node on model hierarchy.
A callback service used to modify Model objects when they are imported using the NDVFactory.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Manages all windows and logic surrounding dialogs and views for displaying and managing a 3D environm...
Shows all objects in a QTModelManager in a tree hierarchy view that allows for user interaction.
Responsible for turning a user interaction into a selection within a DesignObjectLookup.
The core String View class for the NDEVR API.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Manages all windows and logic surrounding dialogs and views for displaying and managing any environme...
The primary namespace for the NDEVR SDK.