NDEVR
API Documentation
FrameOfReferenceCommandWidget.h
1#pragma once
2#include <NDEVR/StationModel.h>
3#include <NDEVR/ModelCommandsWidget.h>
4#if NDEVR_VIEWPORT
5namespace NDEVR
6{
10 class FrameOfReferenceCommandWidget : public QtModelFunction, public QWidget
11 {
12 public:
26 virtual TranslatedString group() const override;
31 virtual TranslatedString hint() const override;
36 virtual TranslatedString expandedHint() const override;
44 virtual bool processKeyEvent(const KeyEvent& event, DesignObjectLookup* lookup, Camera* camera) override;
50 virtual bool selectionModeAllowed(const SubSelectionMode& mode) const override;
55 virtual void refreshState(ModelEditController& controller) override;
60 virtual SubSelectionMode defaultSelectionMode() const override;
65 virtual void setupFilters(SelectionController* controller) override;
70 virtual void onSelect(const Buffer<UUID>& selection) override;
75 virtual bool isSelecting() const override;
79 virtual void onCancel() override;
84 virtual QWidget* editWidget() override;
89 protected:
90 StationModel m_station;
92 UUID m_target = Constant<UUID>::Invalid;
93 };
94}
95#endif
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
A core object representing a user view as well as convenience functions for moving this view through ...
Definition Camera.h:95
A core class where all Design Objects including models, materials, and geometries are stored.
virtual TranslatedString hint() const override
Returns a short hint describing this command.
UUID m_target
The UUID of the target model being transformed.
virtual TranslatedString group() const override
Returns the group name for categorizing this command.
FrameOfReferenceCommandWidget(QTModelManager *manager)
Constructs a FrameOfReferenceCommandWidget.
StationModel m_station
The station model used for frame-of-reference calculations.
virtual SubSelectionMode defaultSelectionMode() const override
Returns the default sub-selection mode for this command.
virtual void refreshState(ModelEditController &controller) override
Refreshes the command state based on the current edit controller.
virtual ~FrameOfReferenceCommandWidget()
Destructor.
virtual TranslatedString expandedHint() const override
Returns an expanded hint with more detail about this command.
virtual bool selectionModeAllowed(const SubSelectionMode &mode) const override
Returns whether the given sub-selection mode is allowed during this command.
virtual QWidget * editWidget() override
Returns the edit widget for this command.
void applyTransform()
Applies the configured frame-of-reference transform to the target model.
virtual void setupFilters(SelectionController *controller) override
Sets up selection filters for this command.
QTModelManager * m_manager
The model manager providing data access.
virtual void onCancel() override
Cancels the current command operation.
virtual bool isSelecting() const override
Returns whether the command is currently in a selecting state.
virtual bool processKeyEvent(const KeyEvent &event, DesignObjectLookup *lookup, Camera *camera) override
Processes a key event during the command interaction.
virtual void onSelect(const Buffer< UUID > &selection) override
Called when the user makes a selection during the command.
Describes a user key press event used to trigger behavior in the NDEVR API.
Definition Event.h:49
Takes user input in order to modify a model in real-time.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Can be used to add functionality to the ModelCommandsWidget by showing a unique widget when the actio...
Allows user to select data in a DesignObjectLookup.
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...
Definition UUID.h:61
The primary namespace for the NDEVR SDK.
SubSelectionMode
Defines the mode of sub-selection used by the SelectionController.