[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

@@ -1,6 +1,6 @@
from abc import ABC
from enum import Enum
from typing import List, Set, Optional
from typing import List, Set, Optional, Dict
class MessageType(Enum):
@@ -46,13 +46,14 @@ class InputOption:
def __init__(self, label: str, value: object, tooltip: Optional[str] = None,
icon_path: Optional[str] = None, read_only: bool = False, id_: Optional[str] = None,
invalid: bool = False):
invalid: bool = False, extra_properties: Optional[Dict[str, str]] = None):
"""
:param label: the string that will be shown to the user
:param value: the option value (not shown)
:param tooltip: an optional tooltip
:param icon_path: an optional icon path
:param invalid: if this option is considered invalid
:param extra_properties: extra properties
"""
if not label:
raise Exception("'label' must be a not blank string")
@@ -64,6 +65,7 @@ class InputOption:
self.icon_path = icon_path
self.read_only = read_only
self.invalid = invalid
self.extra_properties = extra_properties
def __hash__(self):
return hash(self.label) + hash(self.value)