NDEVR
API Documentation
CameraRulerMenu

A menu that provides options for configuring ruler visibility, grid display, and camera locking for a viewport. More...

Collaboration diagram for CameraRulerMenu:
[legend]

Public Member Functions

 CameraRulerMenu (Button *combo, const void *lock_ptr)
 Constructs a CameraRulerMenu without an initial camera.
 CameraRulerMenu (const DynamicPointer< Camera > &camera, Button *combo, const void *lock_ptr)
 Constructs a CameraRulerMenu for the given camera and button.
void requestShowRuler (bool show_vertical, bool show_horizontal)
 Emitted when the user requests to change ruler visibility.
void setCamera (const DynamicPointer< Camera > &camera)
 Sets the camera whose ruler settings are controlled.
void setLockPointer (const void *lock_ptr)
 Sets the pointer used to identify the lock owner for the camera.
void setShowRuler (const TranslatedString &ruler_name, bool show_vertical, bool show_horizontal, bool show_lockable)
 Configures which ruler options are available in the menu.
void updateFromModel ()
 Updates the menu toggle states from the camera model.

Protected Member Functions

void init ()
 Initializes the menu actions and connects signals.

Protected Attributes

DynamicPointer< Cameram_camera
 The camera whose settings are controlled.
Buttonm_combo
 The button that opens this menu.
Togglem_horz_toggle
 The horizontal ruler visibility toggle.
bool m_is_locked
 Whether the camera is currently locked.
bool m_is_shown
 Whether the ruler is currently shown.
QWidgetAction * m_lock_act
 The action for the camera lock toggle.
const void * m_lock_ptr
 The pointer identifying the lock owner.
Togglem_lock_toggle
 The camera lock toggle.
QMenu * m_menu
 The popup menu containing ruler options.
TranslatedString m_ruler_name
 The display name for the ruler.
QWidgetAction * m_show_grid_act
 The action for the grid display toggle.
Togglem_show_grid_toggle
 The grid display toggle.
QWidgetAction * m_show_horz_act
 The action for the horizontal ruler toggle.
bool m_show_lockable
 Whether the lock toggle option is available.
QWidgetAction * m_show_vert_act
 The action for the vertical ruler toggle.
Togglem_vert_toggle
 The vertical ruler visibility toggle.
QActionGroup * m_view_mode_group
 The action group for mutually exclusive view modes.

Detailed Description

A menu that provides options for configuring ruler visibility, grid display, and camera locking for a viewport.


Definition at line 243 of file Ruler.h.

Constructor & Destructor Documentation

◆ CameraRulerMenu() [1/2]

CameraRulerMenu::CameraRulerMenu ( const DynamicPointer< Camera > & camera,
Button * combo,
const void * lock_ptr )

Constructs a CameraRulerMenu for the given camera and button.

Parameters
[in]cameraThe camera whose ruler settings are controlled.
[in]comboThe button that opens this menu.
[in]lock_ptrA pointer used to identify the lock owner.

◆ CameraRulerMenu() [2/2]

CameraRulerMenu::CameraRulerMenu ( Button * combo,
const void * lock_ptr )

Constructs a CameraRulerMenu without an initial camera.

Parameters
[in]comboThe button that opens this menu.
[in]lock_ptrA pointer used to identify the lock owner.

Member Function Documentation

◆ requestShowRuler()

void CameraRulerMenu::requestShowRuler ( bool show_vertical,
bool show_horizontal )

Emitted when the user requests to change ruler visibility.

Parameters
[in]show_verticalWhether to show the vertical ruler.
[in]show_horizontalWhether to show the horizontal ruler.

◆ setCamera()

void CameraRulerMenu::setCamera ( const DynamicPointer< Camera > & camera)

Sets the camera whose ruler settings are controlled.

Parameters
[in]cameraThe camera to configure.

◆ setLockPointer()

void CameraRulerMenu::setLockPointer ( const void * lock_ptr)

Sets the pointer used to identify the lock owner for the camera.

Parameters
[in]lock_ptrThe lock owner pointer.

◆ setShowRuler()

void CameraRulerMenu::setShowRuler ( const TranslatedString & ruler_name,
bool show_vertical,
bool show_horizontal,
bool show_lockable )

Configures which ruler options are available in the menu.

Parameters
[in]ruler_nameThe display name for the ruler.
[in]show_verticalWhether the vertical ruler toggle is shown.
[in]show_horizontalWhether the horizontal ruler toggle is shown.
[in]show_lockableWhether the camera lock toggle is shown.

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