Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2018-10-29 18:21:16 +0300
committerJaime van Kessel <nallath@gmail.com>2018-10-29 18:21:16 +0300
commit0a3803d6651c66cb81fb9d2b82187fe79736aac3 (patch)
tree02ba42d6a1dbc2fc12c8751ce306636d211743d9 /cura/CuraView.py
parentd8dd9bf3631bcfd5cd77d11cb41688127dd31e60 (diff)
Add CuraView, which does something similar to CuraStage
So instead of relying on strange activeViewProxy, it's up to the CuraView to provide a set of components. These can subsequently be used by the active stage again. CURA-5829
Diffstat (limited to 'cura/CuraView.py')
-rw-r--r--cura/CuraView.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/cura/CuraView.py b/cura/CuraView.py
new file mode 100644
index 0000000000..978c651b43
--- /dev/null
+++ b/cura/CuraView.py
@@ -0,0 +1,24 @@
+# Copyright (c) 2018 Ultimaker B.V.
+# Cura is released under the terms of the LGPLv3 or higher.
+
+from PyQt5.QtCore import pyqtProperty, QUrl
+
+from UM.View.View import View
+
+
+# Since Cura has a few pre-defined "space claims" for the locations of certain components, we've provided some structure
+# to indicate this.
+# MainComponent works in the same way the MainComponent of a stage.
+# the stageMenuComponent returns an item that should be used somehwere in the stage menu. It's up to the active stage
+# to actually do something with this.
+class CuraView(View):
+ def __init__(self, parent = None) -> None:
+ super().__init__(parent)
+
+ @pyqtProperty(QUrl, constant = True)
+ def mainComponent(self) -> QUrl:
+ return self.getDisplayComponent("main")
+
+ @pyqtProperty(QUrl, constant = True)
+ def stageMenuComponent(self) -> QUrl:
+ return self.getDisplayComponent("menu") \ No newline at end of file