mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 23:53:56 -06:00
Implement stage model in top bar
This commit is contained in:
parent
9b4b6b2eae
commit
0e1c9146cf
5 changed files with 23 additions and 3 deletions
|
@ -229,7 +229,9 @@ class CuraApplication(QtApplication):
|
|||
"TranslateTool",
|
||||
"FileLogger",
|
||||
"XmlMaterialProfile",
|
||||
"PluginBrowser"
|
||||
"PluginBrowser",
|
||||
"PrepareStage",
|
||||
"MonitorStage"
|
||||
])
|
||||
self._physics = None
|
||||
self._volume = None
|
||||
|
@ -668,13 +670,14 @@ class CuraApplication(QtApplication):
|
|||
|
||||
controller = self.getController()
|
||||
|
||||
controller.setActiveStage("PrepareStage")
|
||||
controller.setActiveView("SolidView")
|
||||
controller.setCameraTool("CameraTool")
|
||||
controller.setSelectionTool("SelectionTool")
|
||||
|
||||
t = controller.getTool("TranslateTool")
|
||||
if t:
|
||||
t.setEnabledAxis([ToolHandle.XAxis, ToolHandle.YAxis,ToolHandle.ZAxis])
|
||||
t.setEnabledAxis([ToolHandle.XAxis, ToolHandle.YAxis, ToolHandle.ZAxis])
|
||||
|
||||
Selection.selectionChanged.connect(self.onSelectionChanged)
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ def getMetaData():
|
|||
return {
|
||||
"stage": {
|
||||
"name": i18n_catalog.i18nc("@item:inmenu", "Monitor"),
|
||||
"weight": 0,
|
||||
"weight": 1,
|
||||
"icon": ""
|
||||
}
|
||||
}
|
||||
|
|
8
plugins/MonitorStage/plugin.json
Normal file
8
plugins/MonitorStage/plugin.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "Monitor Stage",
|
||||
"author": "Ultimaker B.V.",
|
||||
"version": "1.0.0",
|
||||
"description": "Provides a monitor stage in Cura.",
|
||||
"api": 4,
|
||||
"i18n-catalog": "cura"
|
||||
}
|
8
plugins/PrepareStage/plugin.json
Normal file
8
plugins/PrepareStage/plugin.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "Prepare Stage",
|
||||
"author": "Ultimaker B.V.",
|
||||
"version": "1.0.0",
|
||||
"description": "Provides a prepare stage in Cura.",
|
||||
"api": 4,
|
||||
"i18n-catalog": "cura"
|
||||
}
|
|
@ -82,6 +82,7 @@ Rectangle
|
|||
exclusiveGroup: sidebarHeaderBarGroup
|
||||
style: UM.Theme.styles.topbar_header_tab
|
||||
height: UM.Theme.getSize("sidebar_header").height
|
||||
onClicked: UM.Controller.setActiveStage(model.id)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue