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:
Jaime van Kessel 2018-10-29 11:28:08 +01:00
parent 90e8a05aab
commit 3248a05819
5 changed files with 47 additions and 1 deletions

View file

@ -433,6 +433,7 @@ class CuraApplication(QtApplication):
"XmlMaterialProfile", "XmlMaterialProfile",
"Toolbox", "Toolbox",
"PrepareStage", "PrepareStage",
"PreviewStage",
"MonitorStage", "MonitorStage",
"LocalFileOutputDevice", "LocalFileOutputDevice",
"LocalContainerProvider", "LocalContainerProvider",

View file

@ -7,14 +7,16 @@ from . import MonitorStage
from UM.i18n import i18nCatalog from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("cura") i18n_catalog = i18nCatalog("cura")
def getMetaData(): def getMetaData():
return { return {
"stage": { "stage": {
"name": i18n_catalog.i18nc("@item:inmenu", "Monitor"), "name": i18n_catalog.i18nc("@item:inmenu", "Monitor"),
"weight": 1 "weight": 2
} }
} }
def register(app): def register(app):
return { return {
"stage": MonitorStage.MonitorStage() "stage": MonitorStage.MonitorStage()

View 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

View 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()
}

View 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"
}