mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 13:34:01 -06:00
Sidebar and main view via loader
This commit is contained in:
parent
a57a5aab6b
commit
2d044a37ae
6 changed files with 50 additions and 59 deletions
|
@ -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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue