mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Add in all of the changes for Cura Connect
CURA-4376
This commit is contained in:
parent
823807144f
commit
85efd9249c
13 changed files with 1769 additions and 42 deletions
103
plugins/UM3NetworkPrinting/PrintWindow.qml
Normal file
103
plugins/UM3NetworkPrinting/PrintWindow.qml
Normal file
|
@ -0,0 +1,103 @@
|
|||
// Copyright (c) 2015 Ultimaker B.V.
|
||||
// Cura is released under the terms of the AGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Window 2.2
|
||||
import QtQuick.Controls 1.2
|
||||
|
||||
import UM 1.1 as UM
|
||||
|
||||
UM.Dialog
|
||||
{
|
||||
id: base;
|
||||
|
||||
minimumWidth: 500
|
||||
minimumHeight: 140
|
||||
maximumWidth: minimumWidth
|
||||
maximumHeight: minimumHeight
|
||||
width: minimumWidth
|
||||
height: minimumHeight
|
||||
|
||||
visible: true
|
||||
modality: Qt.ApplicationModal
|
||||
|
||||
title: catalog.i18nc("@title:window","Print over network")
|
||||
|
||||
Column
|
||||
{
|
||||
id: printerSelection
|
||||
anchors.fill: parent
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
height: 50
|
||||
|
||||
Label
|
||||
{
|
||||
id: manualPrinterSelectionLabel
|
||||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
topMargin: UM.Theme.getSize("default_margin").height
|
||||
right: parent.right
|
||||
}
|
||||
text: "Printer selection"
|
||||
wrapMode: Text.Wrap
|
||||
height: 20
|
||||
}
|
||||
|
||||
ComboBox
|
||||
{
|
||||
id: printerSelectionCombobox
|
||||
model: OutputDevice.printers
|
||||
textRole: "friendly_name"
|
||||
|
||||
width: parent.width
|
||||
height: 40
|
||||
Behavior on height { NumberAnimation { duration: 100 } }
|
||||
|
||||
onActivated:
|
||||
{
|
||||
var printerData = OutputDevice.printers[index];
|
||||
OutputDevice.selectPrinter(printerData.unique_name, printerData.friendly_name);
|
||||
}
|
||||
}
|
||||
|
||||
SystemPalette
|
||||
{
|
||||
id: palette
|
||||
}
|
||||
|
||||
UM.I18nCatalog { id: catalog; name: "cura"; }
|
||||
}
|
||||
|
||||
leftButtons: [
|
||||
Button
|
||||
{
|
||||
text: catalog.i18nc("@action:button","Cancel")
|
||||
enabled: true
|
||||
onClicked: {
|
||||
base.visible = false;
|
||||
// reset to defaults
|
||||
OutputDevice.selectAutomaticPrinter()
|
||||
printerSelectionCombobox.currentIndex = 0
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
rightButtons: [
|
||||
Button
|
||||
{
|
||||
text: catalog.i18nc("@action:button","Print")
|
||||
enabled: true
|
||||
onClicked: {
|
||||
base.visible = false;
|
||||
OutputDevice.sendPrintJob();
|
||||
// reset to defaults
|
||||
OutputDevice.selectAutomaticPrinter()
|
||||
printerSelectionCombobox.currentIndex = 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue