NDEVR
API Documentation
ScaleCommandWidget.h
1#pragma once
2#include <NDEVR/ModelCommandsWidget.h>
3#if NDEVR_VIEWPORT
4namespace NDEVR
5{
9 class ScaleCommandWidget : public QtModelFunction, public QWidget
10 {
11 public:
17 virtual ~ScaleCommandWidget();
22 virtual TranslatedString group() const override;
27 virtual TranslatedString hint() const override;
32 virtual TranslatedString expandedHint() const override;
40 virtual bool processKeyEvent(const KeyEvent& event, DesignObjectLookup* lookup, Camera* camera) override;
46 virtual bool selectionModeAllowed(const SubSelectionMode& mode) const override;
51 virtual void refreshState(ModelEditController& controller) override;
56 virtual SubSelectionMode defaultSelectionMode() const override;
61 virtual void setupFilters(SelectionController* controller) override;
66 virtual void onSelect(const Buffer<UUID>& selection) override;
71 virtual bool isSelecting() const override;
73 virtual void onCancel() override;
78 virtual QWidget* editWidget() override;
79 protected:
81 };
82}
83#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.
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...
virtual TranslatedString expandedHint() const override
Retrieves an expanded hint with more detail about the scale command.
virtual void refreshState(ModelEditController &controller) override
Refreshes the widget state from the model edit controller.
virtual void onSelect(const Buffer< UUID > &selection) override
Handles selection of objects for the scale operation.
QTModelManager * m_manager
The model manager providing objects to scale.
ScaleCommandWidget(QTModelManager *manager)
Constructs a scale command widget for the given model manager.
virtual TranslatedString hint() const override
Retrieves a short hint describing the scale command.
virtual bool selectionModeAllowed(const SubSelectionMode &mode) const override
Checks whether a given sub-selection mode is allowed during scaling.
virtual TranslatedString group() const override
Retrieves the command group name for UI categorization.
virtual QWidget * editWidget() override
Retrieves the edit widget for displaying scale controls.
virtual SubSelectionMode defaultSelectionMode() const override
Retrieves the default sub-selection mode for scaling.
virtual bool isSelecting() const override
Checks whether the widget is currently in a selection state.
virtual bool processKeyEvent(const KeyEvent &event, DesignObjectLookup *lookup, Camera *camera) override
Processes a keyboard event during the scale operation.
virtual void setupFilters(SelectionController *controller) override
Sets up selection filters for the scale operation.
virtual void onCancel() override
Cancels the current scale operation.
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...
The primary namespace for the NDEVR SDK.
SubSelectionMode
Defines the mode of sub-selection used by the SelectionController.