diff options
author | ChrisTerBeke <c.terbeke@ultimaker.com> | 2017-12-06 11:58:50 +0300 |
---|---|---|
committer | ChrisTerBeke <c.terbeke@ultimaker.com> | 2017-12-06 11:58:50 +0300 |
commit | 0e1c9146cfa62209d09b71424bc8831e5f2a6ab6 (patch) | |
tree | 1c8a08c63dfe112981403007eb8e45d6f9712dde | |
parent | 9b4b6b2eaeb986c7592f59cea6e8c8bac1806c0f (diff) |
Implement stage model in top bar
-rwxr-xr-x | cura/CuraApplication.py | 7 | ||||
-rw-r--r-- | plugins/MonitorStage/__init__.py | 2 | ||||
-rw-r--r-- | plugins/MonitorStage/plugin.json | 8 | ||||
-rw-r--r-- | plugins/PrepareStage/plugin.json | 8 | ||||
-rw-r--r-- | resources/qml/Topbar.qml | 1 |
5 files changed, 23 insertions, 3 deletions
diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 5acaecbdd5..c83ed04c82 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -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) diff --git a/plugins/MonitorStage/__init__.py b/plugins/MonitorStage/__init__.py index c1f7cf0f6b..e18ecba7f9 100644 --- a/plugins/MonitorStage/__init__.py +++ b/plugins/MonitorStage/__init__.py @@ -10,7 +10,7 @@ def getMetaData(): return {
"stage": {
"name": i18n_catalog.i18nc("@item:inmenu", "Monitor"),
- "weight": 0,
+ "weight": 1,
"icon": ""
}
}
diff --git a/plugins/MonitorStage/plugin.json b/plugins/MonitorStage/plugin.json new file mode 100644 index 0000000000..cb3f55a80d --- /dev/null +++ b/plugins/MonitorStage/plugin.json @@ -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"
+}
\ No newline at end of file diff --git a/plugins/PrepareStage/plugin.json b/plugins/PrepareStage/plugin.json new file mode 100644 index 0000000000..4fd55e955e --- /dev/null +++ b/plugins/PrepareStage/plugin.json @@ -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"
+}
\ No newline at end of file diff --git a/resources/qml/Topbar.qml b/resources/qml/Topbar.qml index f2d053ce70..50e90a9a37 100644 --- a/resources/qml/Topbar.qml +++ b/resources/qml/Topbar.qml @@ -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) } } |