[view] improvement: displaying a tooltip with the missing dependencies for a supported packaging technology

This commit is contained in:
Vinicius Moreira
2021-11-22 15:48:48 -03:00
parent 5121bb40ef
commit c80845cde4
47 changed files with 525 additions and 47 deletions

View File

@@ -275,6 +275,10 @@ class RadioButtonQt(QRadioButton):
self.setAttribute(Qt.WA_TransparentForMouseEvents)
self.setFocusPolicy(Qt.NoFocus)
if model.extra_properties:
for name, val in model.extra_properties.items():
self.setProperty(name, val)
def _set_checked(self, checked: bool):
if checked:
self.model_parent.value = self.model
@@ -303,6 +307,10 @@ class CheckboxQt(QCheckBox):
else:
self.setCursor(QCursor(Qt.PointingHandCursor))
if model.extra_properties:
for name, val in model.extra_properties.items():
self.setProperty(name, val)
def _set_checked(self, state):
checked = state == 2
@@ -541,7 +549,12 @@ class MultipleSelectQt(QGroupBox):
if op.tooltip:
help_icon = QLabel()
help_icon.setProperty('help_icon', 'true')
if op.extra_properties and op.extra_properties.get('warning') == 'true':
help_icon.setProperty('warning_icon', 'true')
else:
help_icon.setProperty('help_icon', 'true')
help_icon.setCursor(QCursor(Qt.WhatsThisCursor))
help_icon.setToolTip(op.tooltip)
widget.layout().addWidget(help_icon)
@@ -596,7 +609,12 @@ class FormMultipleSelectQt(QWidget):
if op.tooltip:
help_icon = QLabel()
help_icon.setProperty('help_icon', 'true')
if op.extra_properties and op.extra_properties.get('warning') == 'true':
help_icon.setProperty('warning_icon', 'true')
else:
help_icon.setProperty('help_icon', 'true')
help_icon.setToolTip(op.tooltip)
help_icon.setCursor(QCursor(Qt.WhatsThisCursor))
widget.layout().addWidget(help_icon)