BaseDialog¶
-
class
cgp_generic_utils.qt.BaseDialog(title, label, size=None, parent=None, isFrameless=False, orientation=None)¶ Bases:
PySide2.QtWidgets.QDialogbasic dialog with ok and cancel button
-
contentLayout()¶ the content layout
Returns: the content layout Return type: PySide2.QtWidgets.QBoxLayout
-
isValid()¶ check if the dialog is valid
Returns: Trueit is valid -Falseit is not validReturn type: bool
-
load()¶ load base dialog
Returns: cancel: self.rejection -ok: self.validationReturn type: any
-
rejection()¶ result of the dialog when
cancelis pressedReturns: the rejection of the dialog Return type: any
-
setCancelButton(text=None)¶ set the text of the cancel button
Parameters: text (str) – text to set on the cancel button
-
setOkButton(text=None)¶ set the text ok the ok button
Parameters: text (str) – text to set on the ok button
-
setSize(size)¶ set the size of the dialog
Parameters: size (list[int]) – values of the width and the height [width - height]
-
setStatus(okEnabled=True)¶ set the status of the ok button
Parameters: okEnabled (bool) – True: the ok button is enabled -Falsethe ok button is disabled
-
validation()¶ result of the dialog when
okis pressedReturns: the validation of the dialog Return type: any
-