From 866e99bcbb76b3ac371b005a7b8636e6592c15c8 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Thu, 25 Jan 2018 23:02:46 +0100 Subject: [PATCH] More QML for sending custom commands, not styled or tested yet --- .../PrinterOutput/ManualPrinterControl.qml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/resources/qml/PrinterOutput/ManualPrinterControl.qml b/resources/qml/PrinterOutput/ManualPrinterControl.qml index d3ae280d61..0720cd1976 100644 --- a/resources/qml/PrinterOutput/ManualPrinterControl.qml +++ b/resources/qml/PrinterOutput/ManualPrinterControl.qml @@ -450,6 +450,43 @@ Item height: UM.Theme.getSize("setting_control").height verticalAlignment: Text.AlignVCenter } + + Row + { + TextInput + { + id: customCommandInput + + font: UM.Theme.getFont("default") + color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text") + selectByMouse: true + + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + + renderType: Text.NativeRendering + } + } + + Row + { + Button + { + id: sendCustomCommandButton + + height: UM.Theme.getSize("setting_control").height + + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.margins: UM.Theme.getSize("default_margin").width + + onClicked: { + printerModel.sendCustomCommand(customCommandInput.text) + } + } + } } ListModel