diff options
author | Jaime van Kessel <nallath@gmail.com> | 2018-10-11 11:41:29 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2018-10-11 11:41:29 +0300 |
commit | cc6d5617eefe9431012bbf98496743c4c11723c4 (patch) | |
tree | 229585c62063f200d280f8c6417578d34e4bfea6 /cura/Stages | |
parent | 4743bd8bd5a8f777c85e0dfb6e5ec2107e7ad951 (diff) |
Update documentation & typing
CURA-5772
Diffstat (limited to 'cura/Stages')
-rw-r--r-- | cura/Stages/CuraStage.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/cura/Stages/CuraStage.py b/cura/Stages/CuraStage.py index b2f6d61799..774a5a6e76 100644 --- a/cura/Stages/CuraStage.py +++ b/cura/Stages/CuraStage.py @@ -5,19 +5,28 @@ from PyQt5.QtCore import pyqtProperty, QUrl from UM.Stage import Stage
+# Since Cura has a few pre-defined "space claims" for the locations of certain components, we've provided some structure
+# to indicate this.
+# * The StageMenuComponent is the horizontal area below the stage bar. This should be used to show stage specific
+# buttons and elements. This component will be drawn over the bar & main component.
+# * The MainComponent is the component that will be drawn starting from the bottom of the stageBar and fills the rest
+# of the screen.
class CuraStage(Stage):
-
- def __init__(self, parent = None):
+ def __init__(self, parent = None) -> None:
super().__init__(parent)
@pyqtProperty(str, constant = True)
- def stageId(self):
+ def stageId(self) -> str:
return self.getPluginId()
@pyqtProperty(QUrl, constant = True)
- def mainComponent(self):
+ def mainComponent(self) -> QUrl:
return self.getDisplayComponent("main")
@pyqtProperty(QUrl, constant = True)
- def sidebarComponent(self):
+ def sidebarComponent(self) -> QUrl:
return self.getDisplayComponent("sidebar")
+
+ @pyqtProperty(QUrl, constant=True)
+ def stageMenuComponent(self) -> QUrl:
+ return self.getDisplayComponent("menu")
\ No newline at end of file |