Class SBGEditor#
This class is the base class for Editor.
#include <SBGEditor.hpp>
Inherits the following classes: SBGWindowWidget
Public Slots inherited from SBGWindowWidget#
See SBGWindowWidget
| Type | Name |
|---|---|
| slot void | stopHighlighting Handles the stop highlighting. |
Public Signals#
| Type | Name |
|---|---|
| signal void | editing (bool) |
Public Signals inherited from SBGWindowWidget#
See SBGWindowWidget
| Type | Name |
|---|---|
| signal void | shown (bool) Emitted when the widget is shown or hidden. |
Public Functions#
| Type | Name |
|---|---|
| virtual void | beginEditing () Called when editing is about to begin. |
| virtual void | display (SBNode::RenderingPass renderingPass) To display elements related to the editor. |
| virtual void | display () To display elements related to the editor (deprecated) |
| virtual void | displayForInterface () To display interface elements related to the editor (deprecated) |
| virtual void | displayForShadow () To display shadowing elements related to the editor (deprecated) |
| virtual void | endEditing () Called when editing is about to end. |
| virtual void | getContextMenuActions (SBVector< SBGAction * > & actionVector) Returns the editor's context menu actions. |
| virtual QString | getDescription () const Returns the menu item text. |
| virtual int | getFormat () override const Returns the format. |
| virtual QPixmap | getLogo () override const Returns the pixmap logo. |
| virtual QString | getName () override const Returns the class name. |
| SBGWindowWidget * | getPropertyWidget () const Get the property window. |
| virtual void | getQuickAccessActions (SBVector< SBGAction * > & actionVector) Returns the editor's quick access actions. |
| virtual QKeySequence | getShortcut () const Returns the shortcut. |
| virtual QString | getToolTip () const Returns the tool tip. |
| virtual SBCContainerUUID | getUUID () override const Returns the widget UUID. |
| virtual void | handleMoveEvent (const SBPosition3 & position, SBNode * node) Handles mouse move event. |
| virtual void | handlePressEvent (const SBPosition3 & position, SBNode * node) Handles mouse press event. |
| virtual void | handleReleaseEvent (const SBPosition3 & position, SBNode * node) Handles mouse release event. |
| virtual bool | isSelectionDependent () const Returns true when the editor's context menu actions depend on the current selection. |
| virtual void | keyPressEvent (QKeyEvent * event) override Handles key press event. |
| virtual void | keyReleaseEvent (QKeyEvent * event) override Handles key release event. |
| virtual void | mouseDoubleClickEvent (QMouseEvent * event) override Handles mouse double click event. |
| virtual void | mouseMoveEvent (QMouseEvent * event) override Handles mouse move event. |
| virtual void | mousePressEvent (QMouseEvent * event) override Handles mouse press event. |
| virtual void | mouseReleaseEvent (QMouseEvent * event) override Handles mouse release event. |
| void | setPropertyWidget (SBGWindowWidget * propertyWidget) Set the property window. |
| virtual void | wheelEvent (QWheelEvent * event) override Handles wheel event. |
| virtual | ~SBGEditor () Destroys the SBGEditor instance. |
Public Functions inherited from SBGWindowWidget#
See SBGWindowWidget
| Type | Name |
|---|---|
| virtual QString | getCitation () const Returns the citation information. |
| SBGWindowDock * | getDockWindow () const Returns the pointer to the embedding dock window, if any. |
| virtual int | getFormat () const Returns the format. |
| bool | getHighlightingFlag () const Returns the highlighting flag. |
| bool | getLockedFlag () const Returns whether the widget is locked (on top) |
| virtual QPixmap | getLogo () const Returns the pixmap logo. |
| virtual QString | getName () const Returns the widget name (used as a title for the embedding window) |
| SBUUID | getPreferencesUUID () const Returns the UUID of preferences (static attributes), if present. |
| virtual SBUUID | getUUID () const Returns the widget UUID. |
| SBGWindow * | getWindow () const Returns the pointer to the embedding window, if any. |
| void | highlight (const SBQuantity::second & duration=SBQuantity::second(1.0)) Highlights the widget for a moment. |
| void | loadDefaultSettings () Loads default settings. |
| virtual void | loadSettings (SBGSettings * settings) Loads settings . |
| void | saveDefaultSettings () Saves default settings. |
| virtual void | saveSettings (SBGSettings * settings) Saves settings . |
| void | setHighlightingFlag (bool highlightingFlag) Sets the highlighting flag. |
| void | setLockedFlag (bool lockedFlag) Sets whether the widget is locked (on top) |
| void | setPreferencesUUID (const SBUUID & preferencesUUID) Sets the UUID of preferences (static attributes), if present. |
| virtual | ~SBGWindowWidget () Destructor. |
Protected Attributes#
| Type | Name |
|---|---|
| SBGWindowWidget * | propertyWidget |
Protected Attributes inherited from SBGWindowWidget#
See SBGWindowWidget
| Type | Name |
|---|---|
| SBGWindowWidgetData * | dataPointer A pointer to the private data. |
Protected Functions#
| Type | Name |
|---|---|
| SBGEditor () Constructs a new SBGEditor instance. |
Protected Functions inherited from SBGWindowWidget#
See SBGWindowWidget
| Type | Name |
|---|---|
| SBGWindowWidget () Protected constructor. |
|
| SBGWindowWidget (SBGWindowWidgetData * dataPointer) Protected constructor. |
|
| void | changeEvent (QEvent * event) Handles events. |
| void | hideEvent (QHideEvent * event) Handles hide event. |
| void | showEvent (QShowEvent * event) Handles show event. |
Public Signals Documentation#
signal editing#
Public Functions Documentation#
function beginEditing#
Called when editing is about to begin.
Allows the editor to perform any necessary preparation before editing starts.
function display [1/2]#
To display elements related to the editor.
Displays editor elements based on the specified rendering pass.
Selects the appropriate display routine depending on the rendering pass.
Parameters:
renderingPassThe rendering pass for which to display elements.
function display [2/2]#
To display elements related to the editor (deprecated)
Displays editor elements for opaque geometry rendering.
function displayForInterface#
To display interface elements related to the editor (deprecated)
Displays editor elements for interface rendering.
function displayForShadow#
To display shadowing elements related to the editor (deprecated)
Displays editor elements for shadow rendering.
function endEditing#
Called when editing is about to end.
Called when editing has finished.
Allows the editor to perform any necessary cleanup after editing ends.
function getContextMenuActions#
Returns the editor's context menu actions.
Retrieves the editor's context menu actions.
Populates the provided vector with actions that should appear in the editor's context menu.
Parameters:
actionVectorReference to a vector that will be filled with context menu actions.
function getDescription#
Returns the menu item text.
Returns the description of the editor.
Returns:
The description string.
function getFormat#
Returns the format.
Returns the format identifier of the editor.
Returns:
The format identifier as an integer.
Implements SBGWindowWidget::getFormat
function getLogo#
Returns the pixmap logo.
Returns the logo pixmap of the editor.
Returns:
The logo as a QPixmap.
Implements SBGWindowWidget::getLogo
function getName#
Returns the class name.
Returns the class name of the editor.
Returns:
The name of the editor class.
Implements SBGWindowWidget::getName
function getPropertyWidget#
Get the property window.
Returns the property widget associated with the editor.
Returns:
Pointer to the property widget, or nullptr if none.
function getQuickAccessActions#
Returns the editor's quick access actions.
Retrieves the editor's quick access actions.
Populates the provided vector with actions that are available for quick access.
Parameters:
actionVectorReference to a vector that will be filled with quick access actions.
function getShortcut#
Returns the shortcut.
Returns the keyboard shortcut associated with the editor.
Returns:
The shortcut as a QKeySequence.
function getToolTip#
Returns the tool tip.
Returns the tooltip text for the editor.
Returns:
The tooltip string.
function getUUID#
Returns the widget UUID.
Returns the unique identifier of the editor widget.
Returns:
The UUID of the editor.
Implements SBGWindowWidget::getUUID
function handleMoveEvent#
Handles mouse move event.
Handles a mouse move at a specific 3D position.
Processes a move event at the given position, optionally targeting a node.
Parameters:
positionThe 3D position where the move occurred.nodePointer to the node under the cursor, if any.
function handlePressEvent#
Handles mouse press event.
Handles a mouse press at a specific 3D position.
Processes a press event at the given position, optionally targeting a node.
Parameters:
positionThe 3D position where the press occurred.nodePointer to the node under the cursor, if any.
function handleReleaseEvent#
Handles mouse release event.
Handles a mouse release at a specific 3D position.
Processes a release event at the given position, optionally targeting a node.
Parameters:
positionThe 3D position where the release occurred.nodePointer to the node under the cursor, if any.
function isSelectionDependent#
Returns true when the editor's context menu actions depend on the current selection.
Indicates whether the editor's context menu actions depend on the current selection.
Returns:
true if the editor's actions are selection dependent; otherwise false.
function keyPressEvent#
Handles key press event.
Handles a key press event.
Called when a key is pressed while the editor has focus.
Parameters:
eventPointer to the QKeyEvent containing details of the key press.
function keyReleaseEvent#
Handles key release event.
Handles a key release event.
Called when a key is released while the editor has focus.
Parameters:
eventPointer to the QKeyEvent containing details of the key release.
function mouseDoubleClickEvent#
Handles mouse double click event.
Handles a mouse double-click event.
Called when a mouse button is double-clicked within the editor.
Parameters:
eventPointer to the QMouseEvent containing details of the double-click.
function mouseMoveEvent#
Handles mouse move event.
Handles a mouse move event.
Called when the mouse is moved within the editor.
Parameters:
eventPointer to the QMouseEvent containing details of the mouse movement.
function mousePressEvent#
Handles mouse press event.
Handles a mouse press event.
Called when a mouse button is pressed within the editor.
Parameters:
eventPointer to the QMouseEvent containing details of the mouse press.
function mouseReleaseEvent#
Handles mouse release event.
Handles a mouse release event.
Called when a mouse button is released within the editor.
Parameters:
eventPointer to the QMouseEvent containing details of the mouse release.
function setPropertyWidget#
Set the property window.
Sets the property widget for the editor.
Parameters:
pPointer to the widget to be used as the property widget.
function wheelEvent#
Handles wheel event.
Handles a wheel (scroll) event.
Called when a wheel action occurs within the editor.
Parameters:
eventPointer to the QWheelEvent containing details of the wheel action.
function ~SBGEditor#
Destroys the SBGEditor instance.
Releases resources owned by the editor.
Protected Attributes Documentation#
variable propertyWidget#
Protected Functions Documentation#
function SBGEditor#
Constructs a new SBGEditor instance.
Initializes the editor's internal state.