NDEVR
API Documentation
OrientationOperationsWidget

A popup Editor dialog for showing options or information related to the orientation of an Object layer or Calibration. More...

Inheritance diagram for OrientationOperationsWidget:
[legend]
Collaboration diagram for OrientationOperationsWidget:
[legend]

Classes

class  GNSSCallback
 Abstract callback interface for creating GNSS orientation widgets. More...

Public Member Functions

 OrientationOperationsWidget (uint01 dimension, const DynamicPointer< QTDesignObject > &object, QWidget *parent=nullptr)
 Constructs the orientation operations widget for a specific design object.
 OrientationOperationsWidget (uint01 dimension, DesignObjectLookup *lookup, QWidget *parent=nullptr)
 Constructs the orientation operations widget using a design object lookup.
void init ()
 Initializes the UI elements and connects signals.
void invert (bool invert_orientation)
 Sets whether the displayed orientation should be inverted.
DesignObjectLookuplookup ()
 Gets the design object lookup used by this widget.
void onCalculatedUpdatedSlot ()
 Slot called when a calculated orientation value is updated.
void onCopyFromExistingSlot ()
 Slot called when the user copies orientation from an existing object.
void onSpecifiedAngleUpdatedSlot ()
 Slot called when the user manually updates the specified angle.
OrientationOperations operations () const
 Gets the current orientation operations configuration.
void setAngle (const Angle< fltp08 > &angle)
 Sets the orientation angle directly.
void setDialToModelIcon ()
 Sets the dial icon to match the current model icon.
void setIsGeoReference (bool is_geo_reference)
 Sets whether this widget is editing a geographic reference orientation.
void setIsMagneticReference (bool is_magnetic_reference, DesignObjectLookup *lookup)
 Sets whether this widget is editing a magnetic reference orientation.
EditorShowMode showMode () const override
 Returns the preferred display mode for this editor.
void updateDialImages ()
 Updates the dial images to reflect the current orientation angle.
void updateMagneticReferenceSignal (const Angle< fltp08 > &angle)
 Emitted when the magnetic reference angle is updated.
void updateOrientationCalcOptionsSlot ()
 Slot called when the orientation calculation options change.
void updateValues () override
 Updates the displayed values to reflect the current state of the target object.
void updateVisibleWidgets ()
 Updates which sub-widgets are visible based on the current orientation type.
Public Member Functions inherited from Editor
 Editor (const DynamicPointer< QTDesignObject > &object, QWidget *parent=nullptr)
 Constructs an Editor targeting the given design object.
 Editor (QWidget *parent=nullptr)
 Constructs an Editor with no design object target.
virtual Buffer< QWidget * > bottomOptions ()
 Returns widgets to be placed at the bottom of the editor layout.
virtual StringView customDialogIcon () const
 Returns a custom icon name for the editor dialog, or an empty string if none.
virtual TranslatedString customDialogTitle () const
 Returns a custom title for the editor dialog, or an empty string if none.
virtual bool disableExport () const
 Returns whether exporting should be disabled for this editor.
Model getModel () const
 Returns the target design object as a Model.
DesignObject getObject () const
 Returns the target design object.
virtual bool isBusy () const
 Returns whether the editor is currently busy performing an operation.
void isBusyStatusChanged ()
 Emitted when the busy status of the editor changes.
virtual bool isHorizontal () const
 Returns whether the editor layout is horizontal.
virtual void moveTargetWithMouse ()
 Initiates interactive mouse-based movement of the target object in the viewport.
void objectUpdatedSignal ()
 Emitted when the target object has been updated.
virtual InterfaceOrientationControllerorientationController () const
 Returns the orientation controller associated with this editor.
virtual Buffer< QWidget * > printableWidgetOptions ()
 Returns option widgets to configure printing for this editor.
virtual Buffer< QWidget * > printableWidgets ()
 Returns the widgets that can be printed from this editor.
virtual void requestScrollEnabled (bool enabled)
 Requests enabling or disabling scrolling within the editor.
virtual void setHorizontal (bool horizontal)
 Sets whether the editor layout is horizontal.
virtual void setReadOnly (bool read_only)
 Sets whether the editor is in read-only mode.
virtual void setTarget (const DynamicPointer< QTDesignObject > &object)
 Sets the design object target for this editor.
virtual void setup (DesignObjectDialog *, const ShowPropertiesSettings &)
 Sets up the editor with a parent dialog and property display settings.
const DynamicPointer< QTDesignObject > & target () const
 Returns the current design object target.

Static Public Member Functions

static void SetGNSSCallback (GNSSCallback *callback)
 Sets the global GNSS callback for creating GNSS orientation widgets.
static void SetGridMagnetCallback (const std::function< void(Button *)> &function)
 Sets the global callback for configuring grid/magnetic reference buttons.

Static Public Attributes

static GNSSCallbacks_gnss_reading_callback
 Global callback for creating GNSS widgets.
static std::function< void(Button *)> s_magnetic_callback
 Global callback for magnetic reference button setup.

Protected Member Functions

bool isPrismModel () const
 Checks whether the current model is a prism type.
void updateComputedPosition ()
 Recomputes the orientation position from the current inputs.
void updateOrientation (const Matrix< fltp08 > &matrix)
 Applies an orientation matrix to the current object.
void updateRelativeCombos ()
 Updates the relative reference combo box options.
void updateTitles (OrientationOperations::AzimuthType type)
 Updates the UI titles based on the azimuth type.
Protected Member Functions inherited from Editor
void onDesignObjectDeletedSlot ()
 Slot called when the target design object is deleted.
void onDesignObjectUpdateSlot ()
 Slot called when the target design object is updated.

Protected Attributes

const uint01 m_dimension
 The axis dimension this widget edits.
bool m_has_offset = false
 Whether an angular offset is applied.
bool m_invert_orientation = false
 Whether to display the inverted orientation.
bool m_is_geo_reference = false
 Whether editing a geographic reference orientation.
bool m_is_magnet_reference = false
 Whether editing a magnetic reference orientation.
DesignObjectLookupm_lookup = nullptr
 The design object lookup for resolving references.
QWidget * m_orientation_gnss_widget = nullptr
 The GNSS input widget, if applicable.
bool m_use_model_icon = false
 Whether to use the model icon on the dial.
Ui::OrientationOperationsUI * ui
 The auto-generated UI form.
Protected Attributes inherited from Editor
DynamicPointer< QTDesignObjectm_design_object
 The design object being edited.
bool m_is_read_only = false
 Whether the editor is in read-only mode.
InterfaceOrientationControllerm_orientation_controller
 The orientation controller for this editor.

Detailed Description

A popup Editor dialog for showing options or information related to the orientation of an Object layer or Calibration.


Objects can be set to rotate along a given axis.

Definition at line 49 of file OrientationOperationsWidget.h.

Constructor & Destructor Documentation

◆ OrientationOperationsWidget() [1/2]

OrientationOperationsWidget::OrientationOperationsWidget ( uint01 dimension,
const DynamicPointer< QTDesignObject > & object,
QWidget * parent = nullptr )

Constructs the orientation operations widget for a specific design object.

Parameters
[in]dimensionThe axis dimension to edit (e.g., X, Y, or Z).
[in]objectThe design object whose orientation is being edited.
[in]parentThe parent widget.

Referenced by OrientationOperationsWidget().

◆ OrientationOperationsWidget() [2/2]

OrientationOperationsWidget::OrientationOperationsWidget ( uint01 dimension,
DesignObjectLookup * lookup,
QWidget * parent = nullptr )

Constructs the orientation operations widget using a design object lookup.

Parameters
[in]dimensionThe axis dimension to edit.
[in]lookupThe design object lookup for resolving references.
[in]parentThe parent widget.

References OrientationOperationsWidget(), and lookup().

Member Function Documentation

◆ invert()

void OrientationOperationsWidget::invert ( bool invert_orientation)

Sets whether the displayed orientation should be inverted.

Parameters
[in]invert_orientationWhether to invert the orientation.

◆ isPrismModel()

bool OrientationOperationsWidget::isPrismModel ( ) const
protected

Checks whether the current model is a prism type.

Returns
True if the model represents a prism.

◆ lookup()

DesignObjectLookup * OrientationOperationsWidget::lookup ( )

Gets the design object lookup used by this widget.

Returns
A pointer to the DesignObjectLookup.

Referenced by OrientationOperationsWidget(), and setIsMagneticReference().

◆ operations()

OrientationOperations OrientationOperationsWidget::operations ( ) const

Gets the current orientation operations configuration.

Returns
The OrientationOperations describing the current orientation state.

◆ setAngle()

void OrientationOperationsWidget::setAngle ( const Angle< fltp08 > & angle)

Sets the orientation angle directly.

Parameters
[in]angleThe angle to set.

◆ SetGNSSCallback()

void OrientationOperationsWidget::SetGNSSCallback ( GNSSCallback * callback)
static

Sets the global GNSS callback for creating GNSS orientation widgets.

Parameters
[in]callbackThe callback to use for GNSS widget creation.

◆ SetGridMagnetCallback()

void OrientationOperationsWidget::SetGridMagnetCallback ( const std::function< void(Button *)> & function)
static

Sets the global callback for configuring grid/magnetic reference buttons.

Parameters
[in]functionThe callback function applied to magnetic reference buttons.

◆ setIsGeoReference()

void OrientationOperationsWidget::setIsGeoReference ( bool is_geo_reference)

Sets whether this widget is editing a geographic reference orientation.

Parameters
[in]is_geo_referenceWhether the orientation is a geographic reference.

◆ setIsMagneticReference()

void OrientationOperationsWidget::setIsMagneticReference ( bool is_magnetic_reference,
DesignObjectLookup * lookup )

Sets whether this widget is editing a magnetic reference orientation.

Parameters
[in]is_magnetic_referenceWhether the orientation is a magnetic reference.
[in]lookupThe design object lookup for resolving references.

References lookup().

◆ showMode()

EditorShowMode OrientationOperationsWidget::showMode ( ) const
overridevirtual

Returns the preferred display mode for this editor.

Returns
The EditorShowMode.

Reimplemented from Editor.

◆ updateOrientation()

void OrientationOperationsWidget::updateOrientation ( const Matrix< fltp08 > & matrix)
protected

Applies an orientation matrix to the current object.

Parameters
[in]matrixThe orientation matrix to apply.

◆ updateTitles()

void OrientationOperationsWidget::updateTitles ( OrientationOperations::AzimuthType type)
protected

Updates the UI titles based on the azimuth type.

Parameters
[in]typeThe azimuth type determining the label text.

The documentation for this class was generated from the following file: