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