mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Add PreviewStagePlugin stubs
Since we are going to move all the views into a seperate stage, we need to add another stage to do that. CURA-5829
This commit is contained in:
parent
90e8a05aab
commit
3248a05819
5 changed files with 47 additions and 1 deletions
|
@ -433,6 +433,7 @@ class CuraApplication(QtApplication):
|
|||
"XmlMaterialProfile",
|
||||
"Toolbox",
|
||||
"PrepareStage",
|
||||
"PreviewStage",
|
||||
"MonitorStage",
|
||||
"LocalFileOutputDevice",
|
||||
"LocalContainerProvider",
|
||||
|
|
|
@ -7,14 +7,16 @@ from . import MonitorStage
|
|||
from UM.i18n import i18nCatalog
|
||||
i18n_catalog = i18nCatalog("cura")
|
||||
|
||||
|
||||
def getMetaData():
|
||||
return {
|
||||
"stage": {
|
||||
"name": i18n_catalog.i18nc("@item:inmenu", "Monitor"),
|
||||
"weight": 1
|
||||
"weight": 2
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def register(app):
|
||||
return {
|
||||
"stage": MonitorStage.MonitorStage()
|
||||
|
|
13
plugins/PreviewStage/PreviewStage.py
Normal file
13
plugins/PreviewStage/PreviewStage.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from UM.Application import Application
|
||||
from cura.Stages.CuraStage import CuraStage
|
||||
|
||||
|
||||
class PreviewStage(CuraStage):
|
||||
def __init__(self, parent = None) -> None:
|
||||
super().__init__(parent)
|
||||
Application.getInstance().engineCreatedSignal.connect(self._engineCreated)
|
||||
|
||||
def _engineCreated(self):
|
||||
return
|
22
plugins/PreviewStage/__init__.py
Normal file
22
plugins/PreviewStage/__init__.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Copyright (c) 2017 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from . import PreviewStage
|
||||
|
||||
from UM.i18n import i18nCatalog
|
||||
i18n_catalog = i18nCatalog("cura")
|
||||
|
||||
|
||||
def getMetaData():
|
||||
return {
|
||||
"stage": {
|
||||
"name": i18n_catalog.i18nc("@item:inmenu", "Preview"),
|
||||
"weight": 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def register(app):
|
||||
return {
|
||||
"stage": PreviewStage.PreviewStage()
|
||||
}
|
8
plugins/PreviewStage/plugin.json
Normal file
8
plugins/PreviewStage/plugin.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "Preview Stage",
|
||||
"author": "Ultimaker B.V.",
|
||||
"version": "1.0.0",
|
||||
"description": "Provides a preview stage in Cura.",
|
||||
"api": 5,
|
||||
"i18n-catalog": "cura"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue