mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 05:29:01 +08:00
Merge branch '4.0' into STAR-322_cloud-connection
This commit is contained in:
commit
02a2585ad1
@ -1,5 +1,6 @@
|
||||
# Copyright (c) 2017 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from typing import Set
|
||||
|
||||
from PyQt5.QtCore import QObject, pyqtSignal, pyqtProperty, pyqtSlot
|
||||
|
||||
@ -63,10 +64,10 @@ class SimpleModeSettingsManager(QObject):
|
||||
|
||||
@pyqtSlot()
|
||||
def updateIsProfileUserCreated(self) -> None:
|
||||
quality_changes_keys = set()
|
||||
quality_changes_keys = set() # type: Set[str]
|
||||
|
||||
if not self._machine_manager.activeMachine:
|
||||
return False
|
||||
return
|
||||
|
||||
global_stack = self._machine_manager.activeMachine
|
||||
|
||||
|
@ -35,6 +35,6 @@ Item
|
||||
property real maximumWidth: parent.width
|
||||
property real maximumHeight: parent.height
|
||||
|
||||
sourceComponent: Cura.MachineManager.printerOutputDevices.length > 0 ? Cura.MachineManager.printerOutputDevices[0].monitorItem: null
|
||||
sourceComponent: Cura.MachineManager.printerOutputDevices.length > 0 ? Cura.MachineManager.printerOutputDevices[0].monitorItem : null
|
||||
}
|
||||
}
|
||||
|
@ -34,16 +34,20 @@ Component
|
||||
name: "cura"
|
||||
}
|
||||
|
||||
LinearGradient {
|
||||
LinearGradient
|
||||
{
|
||||
anchors.fill: parent
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
gradient: Gradient
|
||||
{
|
||||
GradientStop
|
||||
{
|
||||
position: 0.0
|
||||
color: "#f6f6f6"
|
||||
color: "#f6f6f6" // TODO: Theme!
|
||||
}
|
||||
GradientStop {
|
||||
GradientStop
|
||||
{
|
||||
position: 1.0
|
||||
color: "#ffffff"
|
||||
color: "#ffffff" // TODO: Theme!
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -81,7 +85,8 @@ Component
|
||||
id: queue
|
||||
width: Math.min(834 * screenScaleFactor, maximumWidth)
|
||||
|
||||
anchors {
|
||||
anchors
|
||||
{
|
||||
bottom: parent.bottom
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: printers.bottom
|
||||
@ -210,7 +215,8 @@ Component
|
||||
ScrollView
|
||||
{
|
||||
id: queuedPrintJobs
|
||||
anchors {
|
||||
anchors
|
||||
{
|
||||
bottom: parent.bottom
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: printJobQueueHeadings.bottom
|
||||
@ -239,7 +245,8 @@ Component
|
||||
}
|
||||
}
|
||||
|
||||
PrinterVideoStream {
|
||||
PrinterVideoStream
|
||||
{
|
||||
anchors.fill: parent
|
||||
cameraUrl: OutputDevice.activeCameraUrl
|
||||
visible: OutputDevice.activeCameraUrl != ""
|
||||
|
@ -13,8 +13,40 @@ Item {
|
||||
property string activeQualityDefinitionId: Cura.MachineManager.activeQualityDefinitionId;
|
||||
property bool isUM3: activeQualityDefinitionId == "ultimaker3" || activeQualityDefinitionId.match("ultimaker_") != null;
|
||||
property bool printerConnected: Cura.MachineManager.printerConnected;
|
||||
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands;
|
||||
property bool authenticationRequested: printerConnected && (Cura.MachineManager.printerOutputDevices[0].authenticationState == 2 || Cura.MachineManager.printerOutputDevices[0].authenticationState == 5); // AuthState.AuthenticationRequested or AuthenticationReceived.
|
||||
property bool printerAcceptsCommands:
|
||||
{
|
||||
if (printerConnected && Cura.MachineManager.printerOutputDevices[0])
|
||||
{
|
||||
return Cura.MachineManager.printerOutputDevices[0].acceptsCommands
|
||||
}
|
||||
return false
|
||||
}
|
||||
property bool authenticationRequested:
|
||||
{
|
||||
if (printerConnected && Cura.MachineManager.printerOutputDevices[0])
|
||||
{
|
||||
var device = Cura.MachineManager.printerOutputDevices[0]
|
||||
// AuthState.AuthenticationRequested or AuthState.AuthenticationReceived
|
||||
return device.authenticationState == 2 || device.authenticationState == 5
|
||||
}
|
||||
return false
|
||||
}
|
||||
property var materialNames:
|
||||
{
|
||||
if (printerConnected && Cura.MachineManager.printerOutputDevices[0])
|
||||
{
|
||||
return Cura.MachineManager.printerOutputDevices[0].materialNames
|
||||
}
|
||||
return null
|
||||
}
|
||||
property var hotendIds:
|
||||
{
|
||||
if (printerConnected && Cura.MachineManager.printerOutputDevices[0])
|
||||
{
|
||||
return Cura.MachineManager.printerOutputDevices[0].hotendIds
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
UM.I18nCatalog {
|
||||
id: catalog;
|
||||
@ -94,7 +126,7 @@ Item {
|
||||
Column {
|
||||
Repeater {
|
||||
id: nozzleColumn;
|
||||
model: printerConnected ? Cura.MachineManager.printerOutputDevices[0].hotendIds : null;
|
||||
model: hotendIds
|
||||
|
||||
Label {
|
||||
text: nozzleColumn.model[index];
|
||||
@ -105,7 +137,7 @@ Item {
|
||||
Column {
|
||||
Repeater {
|
||||
id: materialColumn;
|
||||
model: printerConnected ? Cura.MachineManager.printerOutputDevices[0].materialNames : null;
|
||||
model: materialNames
|
||||
|
||||
Label {
|
||||
text: materialColumn.model[index];
|
||||
|
@ -120,6 +120,8 @@ Column
|
||||
|
||||
height: UM.Theme.getSize("action_button").height
|
||||
text: catalog.i18nc("@button", "Preview")
|
||||
tooltip: text
|
||||
fixedWidthMode: true
|
||||
|
||||
onClicked: UM.Controller.setActiveStage("PreviewStage")
|
||||
visible: UM.Controller.activeStage != null && UM.Controller.activeStage.stageId != "PreviewStage"
|
||||
|
@ -11,5 +11,5 @@ UM.SimpleButton
|
||||
height: UM.Theme.getSize("small_button").height
|
||||
hoverColor: UM.Theme.getColor("small_button_text_hover")
|
||||
color: UM.Theme.getColor("small_button_text")
|
||||
iconMargin: 0.5 * UM.Theme.getSize("wide_lining").width
|
||||
iconMargin: UM.Theme.getSize("thick_lining").width
|
||||
}
|
@ -361,7 +361,7 @@
|
||||
"configuration_selector": [35.0, 4.0],
|
||||
"configuration_selector_mode_tabs": [0.0, 3.0],
|
||||
|
||||
"action_panel_widget": [25.0, 0.0],
|
||||
"action_panel_widget": [26.0, 0.0],
|
||||
"action_panel_information_widget": [20.0, 0.0],
|
||||
|
||||
"machine_selector_widget": [20.0, 4.0],
|
||||
|
Loading…
x
Reference in New Issue
Block a user