mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Merge pull request #5270 from Ultimaker/action_panel_per_stage
Let each stage create its own action panel
This commit is contained in:
commit
cfdadbaffb
6 changed files with 58 additions and 36 deletions
24
plugins/PrepareStage/PrepareMain.qml
Normal file
24
plugins/PrepareStage/PrepareMain.qml
Normal file
|
@ -0,0 +1,24 @@
|
|||
//Copyright (c) 2019 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
|
||||
|
||||
Item
|
||||
{
|
||||
id: prepareMain
|
||||
|
||||
Cura.ActionPanelWidget
|
||||
{
|
||||
id: actionPanelWidget
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.rightMargin: UM.Theme.getSize("thick_margin").width
|
||||
anchors.bottomMargin: UM.Theme.getSize("thick_margin").height
|
||||
}
|
||||
}
|
|
@ -1,13 +1,11 @@
|
|||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import os.path
|
||||
from UM.Application import Application
|
||||
from UM.PluginRegistry import PluginRegistry
|
||||
from UM.Resources import Resources
|
||||
from cura.Stages.CuraStage import CuraStage
|
||||
|
||||
|
||||
|
||||
## Stage for preparing model (slicing).
|
||||
class PrepareStage(CuraStage):
|
||||
def __init__(self, parent = None):
|
||||
|
@ -16,4 +14,6 @@ class PrepareStage(CuraStage):
|
|||
|
||||
def _engineCreated(self):
|
||||
menu_component_path = os.path.join(PluginRegistry.getInstance().getPluginPath("PrepareStage"), "PrepareMenu.qml")
|
||||
main_component_path = os.path.join(PluginRegistry.getInstance().getPluginPath("PrepareStage"), "PrepareMain.qml")
|
||||
self.addDisplayComponent("menu", menu_component_path)
|
||||
self.addDisplayComponent("main", main_component_path)
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Copyright (c) 2019 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.4
|
||||
|
@ -9,10 +9,22 @@ import QtQuick.Controls.Styles 1.1
|
|||
import UM 1.0 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
|
||||
Loader
|
||||
Item
|
||||
{
|
||||
id: previewMain
|
||||
Loader
|
||||
{
|
||||
id: previewMain
|
||||
|
||||
source: UM.Controller.activeView != null && UM.Controller.activeView.mainComponent != null ? UM.Controller.activeView.mainComponent : ""
|
||||
source: UM.Controller.activeView != null && UM.Controller.activeView.mainComponent != null ? UM.Controller.activeView.mainComponent : ""
|
||||
}
|
||||
|
||||
Cura.ActionPanelWidget
|
||||
{
|
||||
id: actionPanelWidget
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.rightMargin: UM.Theme.getSize("thick_margin").width
|
||||
anchors.bottomMargin: UM.Theme.getSize("thick_margin").height
|
||||
hasPreviewButton: false
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue