mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-28 05:11:04 -07:00
WIP: Add Welcome Page and use CTRL+Alt+D to trigger
This commit is contained in:
parent
3b63f92d55
commit
ac012e8f09
5 changed files with 91 additions and 0 deletions
|
|
@ -59,6 +59,8 @@ from cura.Scene.CuraSceneNode import CuraSceneNode
|
|||
|
||||
from cura.Scene.CuraSceneController import CuraSceneController
|
||||
|
||||
from cura.UI.WelcomePagesModel import WelcomePagesModel
|
||||
|
||||
from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType
|
||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||
from UM.Settings.SettingFunction import SettingFunction
|
||||
|
|
@ -208,6 +210,8 @@ class CuraApplication(QtApplication):
|
|||
self._cura_scene_controller = None
|
||||
self._machine_error_checker = None
|
||||
|
||||
self._welcome_pages_model = WelcomePagesModel(self)
|
||||
|
||||
self._quality_profile_drop_down_menu_model = None
|
||||
self._custom_quality_profile_drop_down_menu_model = None
|
||||
self._cura_API = CuraAPI(self)
|
||||
|
|
@ -745,6 +749,8 @@ class CuraApplication(QtApplication):
|
|||
# Initialize Cura API
|
||||
self._cura_API.initialize()
|
||||
|
||||
self._welcome_pages_model.initialize()
|
||||
|
||||
# Detect in which mode to run and execute that mode
|
||||
if self._is_headless:
|
||||
self.runWithoutGUI()
|
||||
|
|
@ -843,6 +849,10 @@ class CuraApplication(QtApplication):
|
|||
def getSettingVisibilityPresetsModel(self, *args) -> SettingVisibilityPresetsModel:
|
||||
return self._setting_visibility_presets_model
|
||||
|
||||
@pyqtSlot(result = QObject)
|
||||
def getWelcomePagesModel(self, *args) -> "WelcomePagesModel":
|
||||
return self._welcome_pages_model
|
||||
|
||||
def getCuraFormulaFunctions(self, *args) -> "CuraFormulaFunctions":
|
||||
if self._cura_formula_functions is None:
|
||||
self._cura_formula_functions = CuraFormulaFunctions(self)
|
||||
|
|
@ -975,6 +985,8 @@ class CuraApplication(QtApplication):
|
|||
qmlRegisterSingletonType(SimpleModeSettingsManager, "Cura", 1, 0, "SimpleModeSettingsManager", self.getSimpleModeSettingsManager)
|
||||
qmlRegisterSingletonType(MachineActionManager.MachineActionManager, "Cura", 1, 0, "MachineActionManager", self.getMachineActionManager)
|
||||
|
||||
qmlRegisterType(WelcomePagesModel, "Cura", 1, 0, "WelcomePageModel")
|
||||
|
||||
qmlRegisterType(NetworkMJPGImage, "Cura", 1, 0, "NetworkMJPGImage")
|
||||
|
||||
qmlRegisterSingletonType(ObjectsModel, "Cura", 1, 0, "ObjectsModel", self.getObjectsModel)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue