NDEVR
API Documentation
PaintCommandWidget.h
1#pragma once
2#include <NDEVR/ModelCommandsWidget.h>
3#include <NDEVR/QTImageEditor.h>
4#if NDEVR_VIEWPORT
5namespace NDEVR
6{
11 {
12 public:
18 virtual ~PaintCommandWidget();
20 virtual TranslatedString group() const override;
22 virtual TranslatedString hint() const override;
24 virtual TranslatedString expandedHint() const override;
25 virtual bool processKeyEvent(const KeyEvent& event, DesignObjectLookup* lookup, Camera* camera) override;
26 virtual bool processMouseEvent(MouseControllerEvent& event) override;
27 virtual bool selectionModeAllowed(const SubSelectionMode& mode) const override;
28 virtual void refreshState(ModelEditController& controller) override;
29 virtual SubSelectionMode defaultSelectionMode() const override;
37 virtual void setupFilters(SelectionController* controller) override;
38 virtual void onSelect(const Buffer<UUID>& selection) override;
39 virtual bool isSelecting() const override;
40 virtual void onCancel() override;
42 virtual QWidget* editWidget() override;
43 protected:
45 UUID m_current_model = Constant<UUID>::Invalid;
46 };
47}
48#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.
Describes a mouse or touch input event with position, button, and modifier information.
Definition Event.h:316
virtual bool selectionModeAllowed(const SubSelectionMode &mode) const override
Checks whether a given sub-selection mode is valid for this function.
virtual bool processMouseEvent(MouseControllerEvent &event) override
Processes a mouse controller event during this function's operation.
virtual bool isSelecting() const override
Checks whether the function is currently in a selection state.
virtual bool processKeyEvent(const KeyEvent &event, DesignObjectLookup *lookup, Camera *camera) override
Processes a keyboard event during this function's operation.
UUID m_current_model
The UUID of the model currently being painted.
SelectionInfo createSelectionInfo(const MouseEvent &event, Camera *camera)
Creates selection info from a mouse event for determining paint targets.
PaintCommandWidget(QTModelManager *manager)
Constructs the paint command widget.
virtual TranslatedString hint() const override
Gets the short tooltip hint for this command.
virtual QWidget * editWidget() override
Gets the edit widget displayed to the user during painting.
virtual TranslatedString group() const override
Gets the ribbon group name for this command.
virtual void setupFilters(SelectionController *controller) override
Sets up selection filters on the given selection controller for this function.
virtual void refreshState(ModelEditController &controller) override
Refreshes the internal state of this function based on the current controller state.
virtual void onSelect(const Buffer< UUID > &selection) override
Called when objects are selected during this function's operation.
QTModelManager * m_manager
The model manager for accessing design data.
virtual void onCancel() override
Called when the function's operation is cancelled.
virtual SubSelectionMode defaultSelectionMode() const override
Returns the default sub-selection mode for this function.
virtual TranslatedString expandedHint() const override
Gets the expanded tooltip description for this command.
QTImageEditor(QWidget *parent=nullptr)
Constructs a QTImageEditor widget.
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.
Responsible for turning a user interaction into a selection within a DesignObjectLookup.
Definition Selector.h:52
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.
A wrapper for a mouse event that is used by MouseControllerBase.