[ui][settings] sketch

This commit is contained in:
Vinícius Moreira
2020-01-23 18:28:23 -03:00
parent 535e6ab3bb
commit c8a4370ff0
9 changed files with 189 additions and 26 deletions

View File

@@ -11,6 +11,7 @@ from bauh.api.abstract.context import ApplicationContext
from bauh.api.abstract.disk import DiskCacheLoader
from bauh.api.abstract.handler import ProcessWatcher
from bauh.api.abstract.model import SoftwarePackage, PackageUpdate, PackageHistory, PackageSuggestion, PackageAction
from bauh.api.abstract.view import FormComponent, ViewComponent
class SearchResult:
@@ -272,3 +273,9 @@ class SoftwareManager(ABC):
Removes all data created by the SoftwareManager instance
"""
pass
def get_settings(self) -> ViewComponent:
"""
:return: a form abstraction with all available settings
"""
pass

View File

@@ -38,9 +38,6 @@ class InputOption:
if not label:
raise Exception("'label' must be a not blank string")
if value is None:
raise Exception("'value' must be a not blank string")
self.id = id_
self.label = label
self.value = value
@@ -132,3 +129,18 @@ class FileChooserComponent(ViewComponent):
self.label = label
self.allowed_extensions = allowed_extensions
self.file_path = None
class TabComponent(ViewComponent):
def __init__(self, label: str, content: ViewComponent, id_: str = None):
super(TabComponent, self).__init__(id_=id_)
self.label = label
self.content = content
class TabGroupComponent(ViewComponent):
def __init__(self, components: List[TabComponent], id_: str = None):
super(TabGroupComponent, self).__init__(id_=id_)
self.components = components