mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
Remove confusing printer preference text
CURA-6003
This commit is contained in:
parent
e769b324e1
commit
1973397b92
3 changed files with 3 additions and 184 deletions
|
@ -90,67 +90,4 @@ Item {
|
|||
source: "DiscoverUM3Action.qml";
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
anchors.fill: parent;
|
||||
objectName: "networkPrinterConnectionInfo";
|
||||
spacing: UM.Theme.getSize("default_margin").width;
|
||||
visible: isUM3;
|
||||
|
||||
Button {
|
||||
onClicked: Cura.MachineManager.printerOutputDevices[0].requestAuthentication();
|
||||
text: catalog.i18nc("@action:button", "Request Access");
|
||||
tooltip: catalog.i18nc("@info:tooltip", "Send access request to the printer");
|
||||
visible: printerConnected && !printerAcceptsCommands && !authenticationRequested;
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors {
|
||||
left: parent.left;
|
||||
right: parent.right;
|
||||
}
|
||||
height: childrenRect.height;
|
||||
spacing: UM.Theme.getSize("default_margin").width;
|
||||
visible: printerConnected;
|
||||
|
||||
Column {
|
||||
Repeater {
|
||||
model: CuraApplication.getExtrudersModel()
|
||||
|
||||
Label {
|
||||
text: model.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
Repeater {
|
||||
id: nozzleColumn;
|
||||
model: hotendIds
|
||||
|
||||
Label {
|
||||
text: nozzleColumn.model[index];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
Repeater {
|
||||
id: materialColumn;
|
||||
model: materialNames
|
||||
|
||||
Label {
|
||||
text: materialColumn.model[index];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
onClicked: manager.loadConfigurationFromPrinter();
|
||||
text: catalog.i18nc("@action:button", "Activate Configuration");
|
||||
tooltip: catalog.i18nc("@info:tooltip", "Load the configuration of the printer into Cura");
|
||||
visible: false; // printerConnected && !isClusterPrinter()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,4 +193,3 @@ class DiscoverUM3Action(MachineAction):
|
|||
|
||||
# Create extra components
|
||||
CuraApplication.getInstance().addAdditionalComponent("monitorButtons", self.__additional_components_view.findChild(QObject, "networkPrinterConnectButton"))
|
||||
CuraApplication.getInstance().addAdditionalComponent("machinesDetailPane", self.__additional_components_view.findChild(QObject, "networkPrinterConnectionInfo"))
|
||||
|
|
|
@ -126,132 +126,15 @@ UM.ManagementPage
|
|||
}
|
||||
}
|
||||
|
||||
Grid
|
||||
{
|
||||
id: machineInfo
|
||||
|
||||
anchors.top: machineActions.visible ? machineActions.bottom : machineActions.anchors.top
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
rowSpacing: UM.Theme.getSize("default_lining").height
|
||||
columns: 2
|
||||
|
||||
visible: base.currentItem
|
||||
|
||||
property bool printerConnected: Cura.MachineManager.printerConnected
|
||||
property var connectedPrinter: printerConnected ? Cura.MachineManager.printerOutputDevices[0] : null
|
||||
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
||||
property var printJob: connectedPrinter != null ? connectedPrinter.activePrintJob: null
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Printer type:")
|
||||
visible: base.currentItem && "definition_name" in base.currentItem.metadata
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: (base.currentItem && "definition_name" in base.currentItem.metadata) ? base.currentItem.metadata.definition_name : ""
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Connection:")
|
||||
visible: base.currentItem && base.currentItem.id == Cura.MachineManager.activeMachineId
|
||||
}
|
||||
Label
|
||||
{
|
||||
width: (parent.width * 0.7) | 0
|
||||
text: machineInfo.printerConnected ? machineInfo.connectedPrinter.connectionText : catalog.i18nc("@info:status", "The printer is not connected.")
|
||||
visible: base.currentItem && base.currentItem.id == Cura.MachineManager.activeMachineId
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "State:")
|
||||
visible: base.currentItem && base.currentItem.id == Cura.MachineManager.activeMachineId && machineInfo.printerAcceptsCommands
|
||||
}
|
||||
Label {
|
||||
width: (parent.width * 0.7) | 0
|
||||
text:
|
||||
{
|
||||
if(!machineInfo.printerConnected || !machineInfo.printerAcceptsCommands) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (machineInfo.printJob == null)
|
||||
{
|
||||
return catalog.i18nc("@label:MonitorStatus", "Waiting for a printjob");
|
||||
}
|
||||
|
||||
switch(machineInfo.printJob.state)
|
||||
{
|
||||
case "printing":
|
||||
return catalog.i18nc("@label:MonitorStatus", "Printing...");
|
||||
case "paused":
|
||||
return catalog.i18nc("@label:MonitorStatus", "Paused");
|
||||
case "pre_print":
|
||||
return catalog.i18nc("@label:MonitorStatus", "Preparing...");
|
||||
case "wait_cleanup":
|
||||
return catalog.i18nc("@label:MonitorStatus", "Waiting for someone to clear the build plate");
|
||||
case "error":
|
||||
return printerOutputDevice.errorText;
|
||||
case "maintenance":
|
||||
return catalog.i18nc("@label:MonitorStatus", "In maintenance. Please check the printer");
|
||||
case "abort": // note sure if this jobState actually occurs in the wild
|
||||
return catalog.i18nc("@label:MonitorStatus", "Aborting print...");
|
||||
|
||||
}
|
||||
return ""
|
||||
}
|
||||
visible: base.currentItem && base.currentItem.id == Cura.MachineManager.activeMachineId && machineInfo.printerAcceptsCommands
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
id: additionalComponentsColumn
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: machineInfo.visible ? machineInfo.bottom : machineInfo.anchors.top
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").width
|
||||
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
visible: base.currentItem && base.currentItem.id == Cura.MachineManager.activeMachineId
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
for (var component in CuraApplication.additionalComponents["machinesDetailPane"]) {
|
||||
CuraApplication.additionalComponents["machinesDetailPane"][component].parent = additionalComponentsColumn
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
addAdditionalComponents("machinesDetailPane")
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: CuraApplication
|
||||
onAdditionalComponentsChanged: addAdditionalComponents
|
||||
}
|
||||
|
||||
function addAdditionalComponents (areaId) {
|
||||
if(areaId == "machinesDetailPane") {
|
||||
for (var component in CuraApplication.additionalComponents["machinesDetailPane"]) {
|
||||
CuraApplication.additionalComponents["machinesDetailPane"][component].parent = additionalComponentsColumn
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UM.I18nCatalog { id: catalog; name: "cura"; }
|
||||
|
||||
UM.ConfirmRemoveDialog
|
||||
{
|
||||
id: confirmDialog;
|
||||
object: base.currentItem && base.currentItem.name ? base.currentItem.name : "";
|
||||
id: confirmDialog
|
||||
object: base.currentItem && base.currentItem.name ? base.currentItem.name : ""
|
||||
onYes:
|
||||
{
|
||||
Cura.MachineManager.removeMachine(base.currentItem.id);
|
||||
Cura.MachineManager.removeMachine(base.currentItem.id)
|
||||
if(!base.currentItem)
|
||||
{
|
||||
objectList.currentIndex = activeMachineIndex()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue