Get meta data per sidebar view in sidebar view model

This commit is contained in:
ChrisTerBeke 2017-12-04 12:37:29 +01:00
parent f2b4cbe182
commit 713055e320
3 changed files with 55 additions and 4 deletions

View file

@ -3,7 +3,7 @@ from UM.Logger import Logger
from UM.PluginRegistry import PluginRegistry
from UM.Signal import Signal
from .SidebarView import SidebarView
from typing import Optional
from typing import Optional, Dict
# The sidebar controller manages available sidebar components and decides which one to display.
# The cura.qml file uses this controller to repeat over the sidebars and show the active index.
@ -46,3 +46,7 @@ class SidebarController:
## Change the active sidebar view to one of the registered views.
def setActiveSidebarView(self, name: str):
print("setting active sidebar view")
## Get all sidebar views registered in this controller.
def getAllSidebarViews(self) -> Dict[SidebarView]:
return self._sidebar_views