NDEVR
API Documentation
ButtonDialog

Typically used for dialogs which have any number of buttons associated with it that are toggled on when the dialog is visible, and off when the widget is invisible. More...

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

Public Member Functions

virtual ~ButtonDialog ()
 Virtual destructor.
virtual void addButton (Button *button)
 Adds a button that controls the visibility of the dialog.
PopupInfo buttonDialogBestPopupInfo () const
 Returns the best PopupInfo configuration based on the last pressed button's position.
virtual void onCheckedClick ()
 Called when an associated button is clicked while already checked, typically to toggle visibility.
virtual void removeButton (Button *button)
 Removes a previously associated button.
virtual void setButtonsChecked (bool check)
 Sets the checked state of all associated buttons.

Protected Attributes

Buffer< QPointer< Button > > m_buttons
 All buttons associated with this dialog.
QPointer< Buttonm_last_pressed
 The most recently pressed button, used for popup positioning.
bool m_should_be_checked = false
 Whether the associated buttons should be in the checked state.

Detailed Description

Typically used for dialogs which have any number of buttons associated with it that are toggled on when the dialog is visible, and off when the widget is invisible.


Each button controls the visibility of the dialog.

Definition at line 46 of file ButtonDialog.h.

Member Function Documentation

◆ addButton()

virtual void ButtonDialog::addButton ( Button * button)
virtual

Adds a button that controls the visibility of the dialog.

Parameters
[in]buttonThe button to associate with this dialog.

◆ buttonDialogBestPopupInfo()

PopupInfo ButtonDialog::buttonDialogBestPopupInfo ( ) const

Returns the best PopupInfo configuration based on the last pressed button's position.

Returns
A PopupInfo struct configured for optimal popup placement.

◆ removeButton()

virtual void ButtonDialog::removeButton ( Button * button)
virtual

Removes a previously associated button.

Parameters
[in]buttonThe button to disassociate.

◆ setButtonsChecked()

virtual void ButtonDialog::setButtonsChecked ( bool check)
virtual

Sets the checked state of all associated buttons.

Parameters
[in]checkWhether the buttons should be checked.

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