OpenRV icon indicating copy to clipboard operation
OpenRV copied to clipboard

SG-41009: Add alertPanelWithCheckBox

Open eloisebrosseau opened this issue 2 months ago • 0 comments

SG-41009: Add alertPanelWithCheckBox

Summarize your change.

QAlertPanel was updated to handle rich text for hyperlinks in the body message and to display a check box with a message. To avoid changing the alertPanel command that is used in different part of the code, a new alertPanelWithCheckBox was added, but both commands are sharing the same logic that was moved inside showAlertPanel. The only differences are the addition of a check box text parameter in the new command with a tuple return type of (buttonResult, isCheckBoxChecked) instead of just the buttonResult as an int. I also made a small change to the alertPanel so that the title is only added in the message itself if isSheet is True for macOS. In that case, the title is in bold to differentiate it from the reste of the text. On Linux and Windows or if isSheet is False on macOS, the title is simply added to the window title.

Describe the reason for the change.

A new confirmation modal in the Live Review plugin needs to display a link and a check box for the user to decide if the message should be shown again or not in the futur.

Describe what you have tested and on which operating system.

The confirmation panel was tested on macOS 15.6.1.

eloisebrosseau avatar Nov 14 '25 19:11 eloisebrosseau