NDEVR
API Documentation
MouseEditorWidget

Allows the end user to set default mouse buttons and behavior for navigating in a Viewport. More...

Collaboration diagram for MouseEditorWidget:
[legend]

Public Member Functions

 MouseEditorWidget (QWidget *parent=nullptr)
 Constructs a MouseEditorWidget with an optional parent.
void edited ()
 Emitted when the user modifies any mouse binding.
void resizeEvent (QResizeEvent *resize_event) override
 Handles resize events to update the background image scaling.
void setMouseController (const DynamicPointer< MouseController > &controller)
 Sets the mouse controller whose bindings this widget edits.

Protected Member Functions

void setBackgroundImage (const StringView &image)
 Sets the background image displayed behind the mouse diagram.
void updateFromController ()
 Updates the dialog UI to reflect the current mouse controller state.
void updateFromDialog ()
 Updates the mouse controller from the current dialog UI values.

Protected Attributes

QPixmap m_background
 The scaled background pixmap for the mouse diagram.
String m_background_resource
 The resource identifier of the current background image.
DynamicPointer< MouseControllerm_mouse_controller
 The mouse controller being edited.
Ui::MouseSetupEditor * ui
 The auto-generated UI form for mouse setup editing.

Detailed Description

Allows the end user to set default mouse buttons and behavior for navigating in a Viewport.


Definition at line 49 of file MouseEditorWidget.h.

Constructor & Destructor Documentation

◆ MouseEditorWidget()

MouseEditorWidget::MouseEditorWidget ( QWidget * parent = nullptr)

Constructs a MouseEditorWidget with an optional parent.

Parameters
[in]parentThe parent QWidget, or nullptr for no parent.

References MouseEditorWidget().

Referenced by MouseEditorWidget().

Member Function Documentation

◆ resizeEvent()

void MouseEditorWidget::resizeEvent ( QResizeEvent * resize_event)
override

Handles resize events to update the background image scaling.

Parameters
[in]resize_eventThe resize event.

◆ setBackgroundImage()

void MouseEditorWidget::setBackgroundImage ( const StringView & image)
protected

Sets the background image displayed behind the mouse diagram.

Parameters
[in]imageThe resource identifier of the background image.

◆ setMouseController()

void MouseEditorWidget::setMouseController ( const DynamicPointer< MouseController > & controller)

Sets the mouse controller whose bindings this widget edits.

Parameters
[in]controllerThe MouseController to configure.

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