mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Add main stage to previewStage so that SimulationView can use it
CURA-5829
This commit is contained in:
parent
0a3803d665
commit
f773030218
7 changed files with 272 additions and 250 deletions
19
plugins/PreviewStage/PreviewMain.qml
Normal file
19
plugins/PreviewStage/PreviewMain.qml
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.4
|
||||
import QtQuick.Controls 1.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
|
||||
import UM 1.0 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
|
||||
Loader
|
||||
{
|
||||
id: previewMain
|
||||
|
||||
source: UM.Controller.activeView != null && UM.Controller.activeView.mainComponent != null ? UM.Controller.activeView.mainComponent : ""
|
||||
onSourceChanged: print("THE SOURCE IS", source)
|
||||
}
|
|
@ -30,4 +30,6 @@ class PreviewStage(CuraStage):
|
|||
plugin_path = self._application.getPluginRegistry().getPluginPath(self.getPluginId())
|
||||
if plugin_path is not None:
|
||||
menu_component_path = os.path.join(plugin_path, "PreviewMenu.qml")
|
||||
main_component_path = os.path.join(plugin_path, "PreviewMain.qml")
|
||||
self.addDisplayComponent("menu", menu_component_path)
|
||||
self.addDisplayComponent("main", main_component_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue