mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-03 01:04:35 +08:00
Show a splash screen during application startup
This commit is contained in:
parent
c83ba7f6f6
commit
b94763875f
@ -12,7 +12,7 @@ from UM.Scene.Selection import Selection
|
|||||||
from PlatformPhysics import PlatformPhysics
|
from PlatformPhysics import PlatformPhysics
|
||||||
from BuildVolume import BuildVolume
|
from BuildVolume import BuildVolume
|
||||||
|
|
||||||
from PyQt5.QtCore import pyqtSlot, QUrl
|
from PyQt5.QtCore import pyqtSlot, QUrl, Qt
|
||||||
from PyQt5.QtGui import QColor
|
from PyQt5.QtGui import QColor
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
@ -35,6 +35,8 @@ class PrinterApplication(QtApplication):
|
|||||||
self._plugin_registry.loadPlugin('CuraEngineBackend')
|
self._plugin_registry.loadPlugin('CuraEngineBackend')
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
self.showSplashMessage('Setting up scene...')
|
||||||
|
|
||||||
controller = self.getController()
|
controller = self.getController()
|
||||||
|
|
||||||
controller.setActiveView("MeshView")
|
controller.setActiveView("MeshView")
|
||||||
@ -93,10 +95,13 @@ class PrinterApplication(QtApplication):
|
|||||||
|
|
||||||
self.setActiveMachine(self.getMachines()[0])
|
self.setActiveMachine(self.getMachines()[0])
|
||||||
|
|
||||||
|
self.showSplashMessage('Loading interface...')
|
||||||
|
|
||||||
self.setMainQml(os.path.dirname(__file__) + "/Printer.qml")
|
self.setMainQml(os.path.dirname(__file__) + "/Printer.qml")
|
||||||
self.initializeEngine()
|
self.initializeEngine()
|
||||||
|
|
||||||
if self._engine.rootObjects:
|
if self._engine.rootObjects:
|
||||||
|
self.closeSplash()
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
|
||||||
self.saveMachines()
|
self.saveMachines()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user