mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 18:19:15 +08:00
Merge branch 'master' into fix_simple_mode_disabled_features
# Conflicts: # resources/qml/SidebarSimple.qml
This commit is contained in:
commit
46b333bfc9
@ -71,6 +71,9 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
|||||||
self._control_item = None
|
self._control_item = None
|
||||||
|
|
||||||
self._qml_context = None
|
self._qml_context = None
|
||||||
|
self._can_pause = True
|
||||||
|
self._can_abort = True
|
||||||
|
self._can_pre_heat_bed = True
|
||||||
|
|
||||||
def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None):
|
def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None):
|
||||||
raise NotImplementedError("requestWrite needs to be implemented")
|
raise NotImplementedError("requestWrite needs to be implemented")
|
||||||
@ -126,6 +129,21 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
|||||||
# Signal to be emitted when some drastic change occurs in the remaining time (not when the time just passes on normally).
|
# Signal to be emitted when some drastic change occurs in the remaining time (not when the time just passes on normally).
|
||||||
preheatBedRemainingTimeChanged = pyqtSignal()
|
preheatBedRemainingTimeChanged = pyqtSignal()
|
||||||
|
|
||||||
|
# Does the printer support pre-heating the bed at all
|
||||||
|
@pyqtProperty(bool, constant=True)
|
||||||
|
def canPreHeatBed(self):
|
||||||
|
return self._can_pre_heat_bed
|
||||||
|
|
||||||
|
# Does the printer support pause at all
|
||||||
|
@pyqtProperty(bool, constant=True)
|
||||||
|
def canPause(self):
|
||||||
|
return self._can_pause
|
||||||
|
|
||||||
|
# Does the printer support abort at all
|
||||||
|
@pyqtProperty(bool, constant=True)
|
||||||
|
def canAbort(self):
|
||||||
|
return self._can_abort
|
||||||
|
|
||||||
@pyqtProperty(QObject, constant=True)
|
@pyqtProperty(QObject, constant=True)
|
||||||
def monitorItem(self):
|
def monitorItem(self):
|
||||||
# Note that we specifically only check if the monitor component is created.
|
# Note that we specifically only check if the monitor component is created.
|
||||||
|
11
cura_app.py
11
cura_app.py
@ -54,8 +54,17 @@ import Arcus #@UnusedImport
|
|||||||
import cura.CuraApplication
|
import cura.CuraApplication
|
||||||
import cura.Settings.CuraContainerRegistry
|
import cura.Settings.CuraContainerRegistry
|
||||||
|
|
||||||
|
def get_cura_dir_path():
|
||||||
|
if Platform.isWindows():
|
||||||
|
return os.path.expanduser("~/AppData/Local/cura/")
|
||||||
|
elif Platform.isLinux():
|
||||||
|
return os.path.expanduser("~/.local/share/cura")
|
||||||
|
elif Platform.isOSX():
|
||||||
|
return os.path.expanduser("~/Library/Application Support/cura")
|
||||||
|
|
||||||
|
|
||||||
if hasattr(sys, "frozen"):
|
if hasattr(sys, "frozen"):
|
||||||
dirpath = os.path.expanduser("~/AppData/Local/cura/")
|
dirpath = get_cura_dir_path()
|
||||||
os.makedirs(dirpath, exist_ok = True)
|
os.makedirs(dirpath, exist_ok = True)
|
||||||
sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w")
|
sys.stdout = open(os.path.join(dirpath, "stdout.log"), "w")
|
||||||
sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w")
|
sys.stderr = open(os.path.join(dirpath, "stderr.log"), "w")
|
||||||
|
@ -220,7 +220,7 @@ Item
|
|||||||
property bool userClicked: false
|
property bool userClicked: false
|
||||||
property string lastJobState: ""
|
property string lastJobState: ""
|
||||||
|
|
||||||
visible: printerConnected
|
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].canPause
|
||||||
enabled: (!userClicked) && printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands &&
|
enabled: (!userClicked) && printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands &&
|
||||||
(["paused", "printing"].indexOf(Cura.MachineManager.printerOutputDevices[0].jobState) >= 0)
|
(["paused", "printing"].indexOf(Cura.MachineManager.printerOutputDevices[0].jobState) >= 0)
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: abortButton
|
id: abortButton
|
||||||
|
|
||||||
visible: printerConnected
|
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].canAbort
|
||||||
enabled: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands &&
|
enabled: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands &&
|
||||||
(["paused", "printing", "pre_print"].indexOf(Cura.MachineManager.printerOutputDevices[0].jobState) >= 0)
|
(["paused", "printing", "pre_print"].indexOf(Cura.MachineManager.printerOutputDevices[0].jobState) >= 0)
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ Column
|
|||||||
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
anchors.bottomMargin: UM.Theme.getSize("default_margin").height
|
||||||
width: UM.Theme.getSize("setting_control").width
|
width: UM.Theme.getSize("setting_control").width
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
|
visible: connectedPrinter != null ? connectedPrinter.canPreHeatBed: true
|
||||||
Rectangle //Highlight of input field.
|
Rectangle //Highlight of input field.
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@ -511,6 +511,7 @@ Column
|
|||||||
{
|
{
|
||||||
id: preheatButton
|
id: preheatButton
|
||||||
height: UM.Theme.getSize("setting_control").height
|
height: UM.Theme.getSize("setting_control").height
|
||||||
|
visible: connectedPrinter != null ? connectedPrinter.canPreHeatBed: true
|
||||||
enabled:
|
enabled:
|
||||||
{
|
{
|
||||||
if (!preheatTemperatureControl.enabled)
|
if (!preheatTemperatureControl.enabled)
|
||||||
|
@ -425,7 +425,7 @@ Item
|
|||||||
property alias _hovered: adhesionMouseArea.containsMouse
|
property alias _hovered: adhesionMouseArea.containsMouse
|
||||||
|
|
||||||
anchors.top: enableSupportCheckBox.visible ? supportExtruderCombobox.bottom : infillCellRight.bottom
|
anchors.top: enableSupportCheckBox.visible ? supportExtruderCombobox.bottom : infillCellRight.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2
|
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||||
anchors.left: infillCellRight.left
|
anchors.left: infillCellRight.left
|
||||||
|
|
||||||
//: Setting enable printing build-plate adhesion helper checkbox
|
//: Setting enable printing build-plate adhesion helper checkbox
|
||||||
|
Loading…
x
Reference in New Issue
Block a user