mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Show a splash screen during application startup
This commit is contained in:
parent
c83ba7f6f6
commit
b94763875f
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue