mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-17 03:37:48 -06:00
Also added canPreheatBed option
This commit is contained in:
parent
182c2f9fb6
commit
dd7ea80b68
2 changed files with 8 additions and 1 deletions
|
@ -73,6 +73,7 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
||||||
self._qml_context = None
|
self._qml_context = None
|
||||||
self._can_pause = True
|
self._can_pause = True
|
||||||
self._can_abort = 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")
|
||||||
|
@ -128,6 +129,11 @@ 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
|
# Does the printer support pause at all
|
||||||
@pyqtProperty(bool, constant=True)
|
@pyqtProperty(bool, constant=True)
|
||||||
def canPause(self):
|
def canPause(self):
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue