mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
T466: Added hiding of properties menu
This commit is contained in:
parent
d7b4296cfc
commit
2ee5e2cb0b
3 changed files with 27 additions and 4 deletions
|
@ -1007,3 +1007,18 @@ class CuraApplication(QtApplication):
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def log(self, msg):
|
def log(self, msg):
|
||||||
Logger.log("d", msg)
|
Logger.log("d", msg)
|
||||||
|
|
||||||
|
_hide_settings = False
|
||||||
|
|
||||||
|
HideSettingsChanged = pyqtSignal(bool)
|
||||||
|
|
||||||
|
@pyqtSlot(bool)
|
||||||
|
def setHideSettings(self, hide):
|
||||||
|
self._hide_settings = hide
|
||||||
|
self.HideSettingsChanged.emit(hide)
|
||||||
|
|
||||||
|
@pyqtProperty(bool, notify=HideSettingsChanged)
|
||||||
|
def hideSettings(self):
|
||||||
|
return self._hide_settings
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -71,10 +71,14 @@ class GCODEReader(MeshReader):
|
||||||
# Preferences.getInstance().setValue("cura/jobname_prefix", True)
|
# Preferences.getInstance().setValue("cura/jobname_prefix", True)
|
||||||
backend = Application.getInstance().getBackend()
|
backend = Application.getInstance().getBackend()
|
||||||
backend._pauseSlicing = False
|
backend._pauseSlicing = False
|
||||||
|
Application.getInstance().setHideSettings(False)
|
||||||
|
#Application.getInstance().getPrintInformation()._setAbbreviatedMachineName()
|
||||||
else:
|
else:
|
||||||
backend = Application.getInstance().getBackend()
|
backend = Application.getInstance().getBackend()
|
||||||
backend._pauseSlicing = True
|
backend._pauseSlicing = True
|
||||||
backend.backendStateChange.emit(1)
|
backend.backendStateChange.emit(1)
|
||||||
|
Application.getInstance().getPrintInformation()._abbr_machine = "Pre-sliced"
|
||||||
|
Application.getInstance().setHideSettings(True)
|
||||||
|
|
||||||
def read(self, file_name):
|
def read(self, file_name):
|
||||||
scene_node = None
|
scene_node = None
|
||||||
|
@ -213,6 +217,8 @@ class GCODEReader(MeshReader):
|
||||||
decorator.setLayerData(layer_mesh)
|
decorator.setLayerData(layer_mesh)
|
||||||
scene_node.addDecorator(decorator)
|
scene_node.addDecorator(decorator)
|
||||||
|
|
||||||
|
Application.getInstance().getPrintInformation()._abbr_machine = "Pre-sliced"
|
||||||
|
|
||||||
scene_node_parent = Application.getInstance().getBuildVolume()
|
scene_node_parent = Application.getInstance().getBuildVolume()
|
||||||
scene_node.setParent(scene_node_parent)
|
scene_node.setParent(scene_node_parent)
|
||||||
|
|
||||||
|
@ -230,10 +236,11 @@ class GCODEReader(MeshReader):
|
||||||
# scene_node.setMeshData(mesh_builder.build())
|
# scene_node.setMeshData(mesh_builder.build())
|
||||||
# scene_node.setMeshData(MeshData(file_name=file_name))
|
# scene_node.setMeshData(MeshData(file_name=file_name))
|
||||||
|
|
||||||
Application.getInstance().getPrintInformation()._abbr_machine = "Pre-sliced"
|
|
||||||
|
|
||||||
Preferences.getInstance().setValue("cura/jobname_prefix", True)
|
Preferences.getInstance().setValue("cura/jobname_prefix", True)
|
||||||
|
|
||||||
|
|
||||||
view = Application.getInstance().getController().getActiveView()
|
view = Application.getInstance().getController().getActiveView()
|
||||||
if view.getPluginId() == "LayerView":
|
if view.getPluginId() == "LayerView":
|
||||||
view.resetLayerData()
|
view.resetLayerData()
|
||||||
|
|
|
@ -16,6 +16,7 @@ Rectangle
|
||||||
|
|
||||||
property int currentModeIndex;
|
property int currentModeIndex;
|
||||||
property bool monitoringPrint: false
|
property bool monitoringPrint: false
|
||||||
|
property bool hideSettings: Printer.hideSettings
|
||||||
Connections
|
Connections
|
||||||
{
|
{
|
||||||
target: Printer
|
target: Printer
|
||||||
|
@ -296,7 +297,7 @@ Rectangle
|
||||||
width: parent.width * 0.45 - 2 * UM.Theme.getSize("default_margin").width
|
width: parent.width * 0.45 - 2 * UM.Theme.getSize("default_margin").width
|
||||||
font: UM.Theme.getFont("large")
|
font: UM.Theme.getFont("large")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
visible: !monitoringPrint
|
visible: !monitoringPrint && !hideSettings
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,7 +309,7 @@ Rectangle
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
anchors.top: headerSeparator.bottom
|
anchors.top: headerSeparator.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
visible: !monitoringPrint
|
visible: !monitoringPrint && !hideSettings
|
||||||
Component{
|
Component{
|
||||||
id: wizardDelegate
|
id: wizardDelegate
|
||||||
Button {
|
Button {
|
||||||
|
@ -432,7 +433,7 @@ Rectangle
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
anchors.left: base.left
|
anchors.left: base.left
|
||||||
anchors.right: base.right
|
anchors.right: base.right
|
||||||
visible: !monitoringPrint
|
visible: !monitoringPrint && !hideSettings
|
||||||
|
|
||||||
delegate: StackViewDelegate
|
delegate: StackViewDelegate
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue