NDEVR
API Documentation
JoystickSettingsDialog

A dialog which allows the user to set sensitivity and other properties of a Joystick object. More...

Collaboration diagram for JoystickSettingsDialog:
[legend]

Public Member Functions

 JoystickSettingsDialog (Joystick *joystick, QWidget *parent=nullptr)
 Constructs the joystick settings dialog for a given joystick.
 ~JoystickSettingsDialog ()
 Destructor.
void acceptedSignal ()
 Emitted when the user accepts the new settings.
bool event (QEvent *event) override
 Processes generic events for the dialog.
virtual void setVisible (bool visible) override
 Overrides visibility to synchronize the UI when shown.

Protected Member Functions

void finish ()
 Applies the settings and performs cleanup.
void init ()
 Initializes the dialog UI and connects signals.
void updateCancelButton ()
 Updates the enabled state of the cancel button based on setting changes.
void updateUIFromSettings ()
 Updates the UI controls to reflect the current joystick settings.

Protected Attributes

Joystickm_joystick
 The joystick being configured.
JoystickSettings m_new_settings
 The settings currently being edited.
JoystickSettings m_original_settings
 The settings as they were when the dialog was opened.
QTimer * m_request_show_deadzone_timer
 Timer to temporarily show the deadzone overlay on the joystick.
QTimer * m_request_show_sensitivity_timer
 Timer to temporarily show the sensitivity overlay on the joystick.
Ui::JoystickSettingsUI * ui
 The auto-generated UI form.

Detailed Description

A dialog which allows the user to set sensitivity and other properties of a Joystick object.


Definition at line 14 of file JoystickSettingsDialog.h.

Constructor & Destructor Documentation

◆ JoystickSettingsDialog()

JoystickSettingsDialog::JoystickSettingsDialog ( Joystick * joystick,
QWidget * parent = nullptr )

Constructs the joystick settings dialog for a given joystick.

Parameters
[in]joystickThe joystick whose settings will be edited.
[in]parentThe parent widget.

Member Function Documentation

◆ event()

bool JoystickSettingsDialog::event ( QEvent * event)
override

Processes generic events for the dialog.

Parameters
[in]eventThe event to process.
Returns
True if the event was handled.

References event().

Referenced by event().

◆ setVisible()

virtual void JoystickSettingsDialog::setVisible ( bool visible)
overridevirtual

Overrides visibility to synchronize the UI when shown.

Parameters
[in]visibleWhether the dialog should be visible.

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