34#include <NDEVR/QTModelManager.h>
35#include <NDEVR/Model.h>
36#include <NDEVR/DesignCommandGroup.h>
37#include <NDEVR/UUID.h>
47 template<
class t_type>
100 friend class QTModelManager;
111 lib_assert(
m_manager->hasObjectID(
m_id),
"Tried to access Invalid id in QTModel");
125 lib_assert(
IsValid(m_id),
"Tried to access Invalid id in QTModel");
132 template<
class t_type>
135 lib_assert(
IsValid(
m_id),
"Tried to access Invalid id in QTModel");
150 template<
class t_type>
153 lib_assert(
m_manager->hasObjectID(
m_id),
"Tried to access Invalid id in QTModel");
163 template<
class t_type,
class t_property_type>
164 decltype(
auto)
get(t_property_type property)
const
172 template<auto t_property>
173 decltype(
auto)
get()
const
198 template<
class t_design_command_type>
207 template<
class t_design_command_type>
210 runCommand(command.template as<DesignCommand>());
257 lib_assert(
m_manager == other.
m_manager,
"Cannot set equal to Design Object from another Manager");
A core object representing a user view as well as convenience functions for moving this view through ...
Allows for convenient groupings of commands that can be redo-undo all at once.
Forward declaration of the central design object registry.
bool hasMaterialID(const UUID &id, bool allow_deleted=false) const
Checks whether a material with the given UUID exists.
bool hasCamera(const UUID &id) const
Checks whether a camera with the given UUID exists.
bool hasGeometryID(const UUID &id, bool allow_deleted=false) const
Checks whether a geometry with the given UUID exists.
Model modelOrLayer(const UUID &id, bool allow_deleted=false) const
Retrieves a model or layer by its UUID, checking both stores.
bool hasSelectionInfo(const UUID &id) const
Checks whether selection info with the given UUID exists.
bool hasObjectID(const UUID &id, bool allow_deleted=false) const
Checks whether any design object with the given UUID exists.
A low-level database object that can be used to access general stored properties within the NDEVR Mod...
bool isValid() const
Checks whether this design object has a valid index into the database.
A simple structure for storing a collection of data.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
A core class within the model hierarchy containing vertex-based data (Usually 3D data) within a set c...
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR ...
A core class that represents a node on model hierarchy.
A pointer to a DesignObject within a QTModelManager that receives and emits update signals based on t...
void postCommand(const DynamicPointer< t_design_command_type > &command)
Posts a typed design command to the command queue for deferred execution.
void showProperties(const PopupInfo &location=PopupInfo())
Opens the properties dialog for this object.
bool is() const
Checks whether this object is of the specified design object type.
void selectedSignal(UUID id)
Emitted when this object is selected.
QTDesignObject(const UUID &object, QTModelManager *manager)
Constructs a QTDesignObject wrapping the given UUID and manager.
QTModelManager * m_manager
The model manager owning this object.
void postCommand(const DynamicPointer< DesignCommand > &command)
Posts a design command to the command queue for deferred execution.
decltype(auto) get(t_property_type property) const
Gets a typed property value from the underlying design object.
void postCommand(std::initializer_list< DynamicPointer< DesignCommand > > l)
Posts a group of design commands to the command queue for deferred execution.
void updateSelected(UUID id, bool is_selected)
Emits the selected signal if this object matches the given UUID and is selected.
decltype(auto) get() const
Gets a compile-time property value from the underlying design object.
void runCommand(std::initializer_list< DynamicPointer< DesignCommand > > l)
Runs a group of design commands immediately.
UUID m_id
The UUID of the wrapped design object.
UUID uuid() const
Gets the UUID of this design object.
TranslatedString displayName() const
Gets the user-facing display name of this object.
void runCommand(const DynamicPointer< DesignCommand > &command)
Runs a design command immediately.
void updatedSignal(UUID id)
Emitted when this object is updated.
QTDesignObject(const QTDesignObject &object)
Copy constructs a QTDesignObject from another.
void deleteModel(UUID id)
Emits the deleted signal if this object matches the given UUID.
void setSelected(bool is_selected)
Sets this object as selected in the model manager.
void zoomToModel() const
Zooms the viewport camera to focus on this model.
void update()
Updates the design modified timestamp for this object.
void updateDescendent()
Emits the descendent updated signal for this object.
void deleteObject()
Deletes this object from the model manager.
void descendentUpdatedSignal(UUID id)
Emitted when a descendent of this object is updated.
UUID id() const
Gets the UUID of this design object.
void deletedSignal(UUID id)
Emitted when this object is deleted.
void runCommand(const DynamicPointer< t_design_command_type > &command)
Runs a typed design command immediately.
void updateObject()
Emits the updated signal for this object.
QTModelManager * manager() const
Gets the model manager that owns this object.
void exportToFile()
Exports this object to an external file format.
void setFocus(bool focus)
Sets the UI focus to this object.
t_type getAs() const
Converts this design object to the specified type.
DesignSelection getAsSelection() const
Gets this object as a DesignSelection.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
The primary namespace for the NDEVR SDK.
static constexpr bool IsValid(const Angle< t_type > &value)
Checks whether the given Angle holds a valid value.
@ is_selected
Whether the object is currently selected.
Used with QTDesignObject to check the type of an object.