Sidebar and main view via loader

This commit is contained in:
ChrisTerBeke 2017-12-06 13:33:05 +01:00
parent a57a5aab6b
commit 2d044a37ae
6 changed files with 50 additions and 59 deletions

View file

@ -1,6 +1,8 @@
# Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os.path
from UM.Application import Application
from UM.Resources import Resources
from cura.Stages.CuraStage import CuraStage
@ -10,6 +12,11 @@ class MonitorStage(CuraStage):
def __init__(self):
super().__init__()
Application.getInstance().engineCreatedSignal.connect(self._engineCreated)
# TODO: connect output device state to icon source
def _engineCreated(self):
# Note: currently the sidebar component for prepare and monitor stages is the same, this will change with the printer output device refactor!
sidebar_component_path = os.path.join(Resources.getPath(Application.getInstance().ResourceTypes.QmlFiles), "Sidebar.qml")
sidebar_component = Application.getInstance().createQmlComponent(sidebar_component_path)
self.addDisplayComponent("sidebar", sidebar_component)
self.setIconSource(Application.getInstance().getTheme().getIcon("tab_status_connected"))