mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
[ui][settings] sketch
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user