blob: d4fd28cdd57894a3a8a477aad1a733c9d949b169 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
//Copyright (c) 2022 Ultimaker B.V.
//Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
import QtQuick.Layouts 1.1
import UM 1.6 as UM
import Cura 1.6 as Cura
Item
{
id: recommendedPrintSetup
height: childrenRect.height + 2 * padding
property bool settingsEnabled: Cura.ExtruderManager.activeExtruderStackId || extrudersEnabledCount.properties.value == 1
property real padding: UM.Theme.getSize("default_margin").width
ColumnLayout
{
spacing: UM.Theme.getSize("default_margin").height
anchors
{
left: parent.left
right: parent.right
top: parent.top
margins: parent.padding
}
// TODO
property real firstColumnWidth: Math.round(width / 3)
UM.Label
{
text: catalog.i18nc("@label", "Profiles")
font: UM.Theme.getFont("medium")
}
RecommendedQualityProfileSelector
{
width: parent.width
hasQualityOptions: recommendedResolutionSelector.visible
}
RecommendedResolutionSelector
{
id: recommendedResolutionSelector
Layout.fillWidth: true
width: parent.width
}
UnsupportedProfileIndication
{
width: parent.width
visible: !recommendedResolutionSelector.visible
Layout.fillWidth: true
}
ProfileWarningReset
{
width: parent.width
Layout.fillWidth: true
Layout.topMargin: UM.Theme.getSize("thin_margin").height
Layout.bottomMargin: UM.Theme.getSize("thin_margin").height
}
//Line between the sections.
Rectangle
{
width: parent.width
height: UM.Theme.getSize("default_lining").height
Layout.topMargin: UM.Theme.getSize("narrow_margin").height
Layout.bottomMargin: UM.Theme.getSize("narrow_margin").height
Layout.fillWidth: true
color: UM.Theme.getColor("lining")
}
UM.Label
{
text: catalog.i18nc("@label", "Print settings")
font: UM.Theme.getFont("medium")
}
RecommendedInfillDensitySelector
{
width: parent.width
// TODO Create a reusable component with these properties to not define them separately for each component
labelColumnWidth: parent.firstColumnWidth
Layout.fillWidth: true
Layout.rightMargin: UM.Theme.getSize("default_margin").width
}
RecommendedSupportSelector
{
width: parent.width
// TODO Create a reusable component with these properties to not define them separately for each component
labelColumnWidth: parent.firstColumnWidth
Layout.fillWidth: true
}
RecommendedAdhesionSelector
{
width: parent.width
// TODO Create a reusable component with these properties to not define them separately for each component
labelColumnWidth: parent.firstColumnWidth
Layout.fillWidth: true
}
}
UM.SettingPropertyProvider
{
id: extrudersEnabledCount
containerStack: Cura.MachineManager.activeMachine
key: "extruders_enabled_count"
watchedProperties: [ "value" ]
storeIndex: 0
}
}
|