mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 06:05:52 +08:00
Merge branch 'master' of https://github.com/Ultimaker/Cura
This commit is contained in:
commit
2ecdac441f
@ -29,16 +29,24 @@ class ConvexHullNode(SceneNode):
|
|||||||
self._node.parentChanged.connect(self._onNodeParentChanged)
|
self._node.parentChanged.connect(self._onNodeParentChanged)
|
||||||
self._node.decoratorsChanged.connect(self._onNodeDecoratorsChanged)
|
self._node.decoratorsChanged.connect(self._onNodeDecoratorsChanged)
|
||||||
self._onNodeDecoratorsChanged(self._node)
|
self._onNodeDecoratorsChanged(self._node)
|
||||||
|
self.convexHullHeadMesh = None
|
||||||
self._hull = hull
|
self._hull = hull
|
||||||
|
|
||||||
hull_points = self._hull.getPoints()
|
hull_points = self._hull.getPoints()
|
||||||
|
hull_mesh = self.createHullMesh(self._hull.getPoints())
|
||||||
|
if hull_mesh:
|
||||||
|
self.setMeshData(hull_mesh)
|
||||||
|
convex_hull_head = self._node.callDecoration("getConvexHullHead")
|
||||||
|
if convex_hull_head:
|
||||||
|
self.convexHullHeadMesh = self.createHullMesh(convex_hull_head.getPoints())
|
||||||
|
|
||||||
|
def createHullMesh(self, hull_points):
|
||||||
mesh = MeshData()
|
mesh = MeshData()
|
||||||
if len(hull_points) > 3:
|
if len(hull_points) > 3:
|
||||||
center = (hull_points.min(0) + hull_points.max(0)) / 2.0
|
center = (hull_points.min(0) + hull_points.max(0)) / 2.0
|
||||||
mesh.addVertex(center[0], 0.1, center[1])
|
mesh.addVertex(center[0], 0.1, center[1])
|
||||||
else: #Hull has not enough points
|
else:
|
||||||
return
|
return None
|
||||||
for point in hull_points:
|
for point in hull_points:
|
||||||
mesh.addVertex(point[0], 0.1, point[1])
|
mesh.addVertex(point[0], 0.1, point[1])
|
||||||
indices = []
|
indices = []
|
||||||
@ -48,8 +56,7 @@ class ConvexHullNode(SceneNode):
|
|||||||
indices.append([0, mesh.getVertexCount() - 1, 1])
|
indices.append([0, mesh.getVertexCount() - 1, 1])
|
||||||
|
|
||||||
mesh.addIndices(numpy.array(indices, numpy.int32))
|
mesh.addIndices(numpy.array(indices, numpy.int32))
|
||||||
|
return mesh
|
||||||
self.setMeshData(mesh)
|
|
||||||
|
|
||||||
def getWatchedNode(self):
|
def getWatchedNode(self):
|
||||||
return self._node
|
return self._node
|
||||||
@ -61,6 +68,8 @@ class ConvexHullNode(SceneNode):
|
|||||||
if self.getParent():
|
if self.getParent():
|
||||||
self._material.setUniformValue("u_color", self._color)
|
self._material.setUniformValue("u_color", self._color)
|
||||||
renderer.queueNode(self, material = self._material, transparent = True)
|
renderer.queueNode(self, material = self._material, transparent = True)
|
||||||
|
if self.convexHullHeadMesh:
|
||||||
|
renderer.queueNode(self, material = self._material,transparent = True, mesh = self.convexHullHeadMesh)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# Cura is released under the terms of the AGPLv3 or higher.
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
from UM.Scene.Iterator import Iterator
|
from UM.Scene.Iterator import Iterator
|
||||||
|
from UM.Scene.SceneNode import SceneNode
|
||||||
from functools import cmp_to_key
|
from functools import cmp_to_key
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
|
|
||||||
@ -10,13 +11,16 @@ from UM.Application import Application
|
|||||||
# Take note that the list of nodes can have children (that may or may not contain mesh data)
|
# Take note that the list of nodes can have children (that may or may not contain mesh data)
|
||||||
class OneAtATimeIterator(Iterator.Iterator):
|
class OneAtATimeIterator(Iterator.Iterator):
|
||||||
def __init__(self, scene_node):
|
def __init__(self, scene_node):
|
||||||
super(OneAtATimeIterator, self).__init__(scene_node) # Call super to make multiple inheritence work.
|
super().__init__(scene_node) # Call super to make multiple inheritence work.
|
||||||
self._hit_map = [[]]
|
self._hit_map = [[]]
|
||||||
self._original_node_list = []
|
self._original_node_list = []
|
||||||
|
|
||||||
def _fillStack(self):
|
def _fillStack(self):
|
||||||
node_list = []
|
node_list = []
|
||||||
for node in self._scene_node.getChildren():
|
for node in self._scene_node.getChildren():
|
||||||
|
if not type(node) is SceneNode:
|
||||||
|
continue
|
||||||
|
|
||||||
if node.getBoundingBox().height > Application.getInstance().getMachineManager().getActiveProfile().getSettingValue("gantry_height"):
|
if node.getBoundingBox().height > Application.getInstance().getMachineManager().getActiveProfile().getSettingValue("gantry_height"):
|
||||||
return
|
return
|
||||||
if node.callDecoration("getConvexHull"):
|
if node.callDecoration("getConvexHull"):
|
||||||
|
@ -111,7 +111,11 @@ class PlatformPhysics:
|
|||||||
|
|
||||||
# Get the overlap distance for both convex hulls. If this returns None, there is no intersection.
|
# Get the overlap distance for both convex hulls. If this returns None, there is no intersection.
|
||||||
try:
|
try:
|
||||||
overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_node.callDecoration("getConvexHull"))
|
head_hull = node.callDecoration("getConvexHullHead")
|
||||||
|
if head_hull:
|
||||||
|
overlap = head_hull.intersectsPolygon(other_node.callDecoration("getConvexHull"))
|
||||||
|
else:
|
||||||
|
overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_node.callDecoration("getConvexHull"))
|
||||||
except:
|
except:
|
||||||
overlap = None #It can sometimes occur that the caclulated convex hull has no size, in which case there is no overlap.
|
overlap = None #It can sometimes occur that the caclulated convex hull has no size, in which case there is no overlap.
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ Item
|
|||||||
|
|
||||||
property alias addMachine: addMachineAction;
|
property alias addMachine: addMachineAction;
|
||||||
property alias configureMachines: settingsAction;
|
property alias configureMachines: settingsAction;
|
||||||
|
property alias manageProfiles: manageProfilesAction;
|
||||||
|
|
||||||
property alias preferences: preferencesAction;
|
property alias preferences: preferencesAction;
|
||||||
|
|
||||||
@ -101,6 +102,13 @@ Item
|
|||||||
iconName: "configure";
|
iconName: "configure";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Action
|
||||||
|
{
|
||||||
|
id: manageProfilesAction;
|
||||||
|
//: manage profiles action
|
||||||
|
text: catalog.i18nc("@action","Manage Profiles");
|
||||||
|
}
|
||||||
|
|
||||||
Action
|
Action
|
||||||
{
|
{
|
||||||
id: documentationAction;
|
id: documentationAction;
|
||||||
|
@ -301,9 +301,9 @@ UM.MainWindow
|
|||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
top: parent.top;
|
top: parent.top;
|
||||||
topMargin: UM.Theme.sizes.loadfile_margin.height
|
//topMargin: UM.Theme.sizes.loadfile_margin.height
|
||||||
left: parent.left;
|
left: parent.left;
|
||||||
leftMargin: UM.Theme.sizes.loadfile_margin.width
|
//leftMargin: UM.Theme.sizes.loadfile_margin.width
|
||||||
}
|
}
|
||||||
action: actions.open;
|
action: actions.open;
|
||||||
}
|
}
|
||||||
@ -393,6 +393,7 @@ UM.MainWindow
|
|||||||
|
|
||||||
addMachineAction: actions.addMachine;
|
addMachineAction: actions.addMachine;
|
||||||
configureMachinesAction: actions.configureMachines;
|
configureMachinesAction: actions.configureMachines;
|
||||||
|
manageProfilesAction: actions.manageProfiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
@ -503,6 +504,7 @@ UM.MainWindow
|
|||||||
|
|
||||||
preferences.onTriggered: preferences.visible = true;
|
preferences.onTriggered: preferences.visible = true;
|
||||||
configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(2); }
|
configureMachines.onTriggered: { preferences.visible = true; preferences.setPage(2); }
|
||||||
|
manageProfiles.onTriggered: { preferences.visible = true; preferences.setPage(4); }
|
||||||
|
|
||||||
documentation.onTriggered: CuraActions.openDocumentation();
|
documentation.onTriggered: CuraActions.openDocumentation();
|
||||||
reportBug.onTriggered: CuraActions.openBugReportPage();
|
reportBug.onTriggered: CuraActions.openBugReportPage();
|
||||||
|
@ -12,6 +12,7 @@ Column{
|
|||||||
id: base;
|
id: base;
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
property int totalHeightProfileSetup: childrenRect.height
|
property int totalHeightProfileSetup: childrenRect.height
|
||||||
|
property Action manageProfilesAction
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
@ -87,17 +88,17 @@ Column{
|
|||||||
ToolButton {
|
ToolButton {
|
||||||
id: globalProfileSelection
|
id: globalProfileSelection
|
||||||
text: UM.MachineManager.activeProfile
|
text: UM.MachineManager.activeProfile
|
||||||
width: parent.width/100*45
|
width: parent.width/100*55
|
||||||
height: UM.Theme.sizes.setting_control.height
|
height: UM.Theme.sizes.setting_control.height
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: (UM.Theme.sizes.default_margin.width * 2) + saveProfileButton.width
|
anchors.rightMargin: UM.Theme.sizes.default_margin.width
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
tooltip: UM.MachineManager.activeProfile
|
tooltip: UM.MachineManager.activeProfile
|
||||||
style: UM.Theme.styles.sidebar_header_button
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
|
|
||||||
menu: Menu
|
menu: Menu
|
||||||
{
|
{
|
||||||
id: machineSelectionMenu
|
id: profileSelectionMenu
|
||||||
Instantiator
|
Instantiator
|
||||||
{
|
{
|
||||||
model: UM.ProfilesModel { }
|
model: UM.ProfilesModel { }
|
||||||
@ -109,36 +110,42 @@ Column{
|
|||||||
exclusiveGroup: profileSelectionMenuGroup;
|
exclusiveGroup: profileSelectionMenuGroup;
|
||||||
onTriggered: UM.MachineManager.setActiveProfile(model.name)
|
onTriggered: UM.MachineManager.setActiveProfile(model.name)
|
||||||
}
|
}
|
||||||
onObjectAdded: machineSelectionMenu.insertItem(index, object)
|
onObjectAdded: profileSelectionMenu.insertItem(index, object)
|
||||||
onObjectRemoved: machineSelectionMenu.removeItem(object)
|
onObjectRemoved: profileSelectionMenu.removeItem(object)
|
||||||
}
|
}
|
||||||
ExclusiveGroup { id: profileSelectionMenuGroup; }
|
ExclusiveGroup { id: profileSelectionMenuGroup; }
|
||||||
}
|
|
||||||
Button {
|
|
||||||
id: saveProfileButton
|
|
||||||
visible: true
|
|
||||||
anchors.top: parent.top
|
|
||||||
x: globalProfileSelection.width + 2
|
|
||||||
width: parent.width/100*25
|
|
||||||
text: catalog.i18nc("@action:button", "Save");
|
|
||||||
height: parent.height
|
|
||||||
|
|
||||||
style: ButtonStyle {
|
MenuSeparator { }
|
||||||
background: Rectangle {
|
MenuItem {
|
||||||
color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
|
action: base.manageProfilesAction;
|
||||||
Behavior on color { ColorAnimation { duration: 50; } }
|
|
||||||
width: actualLabel.width + UM.Theme.sizes.default_margin.width
|
|
||||||
Label {
|
|
||||||
id: actualLabel
|
|
||||||
anchors.centerIn: parent
|
|
||||||
color: UM.Theme.colors.load_save_button_text
|
|
||||||
font: UM.Theme.fonts.default
|
|
||||||
text: control.text;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
label: Item { }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Button {
|
||||||
|
// id: saveProfileButton
|
||||||
|
// visible: true
|
||||||
|
// anchors.top: parent.top
|
||||||
|
// x: globalProfileSelection.width + 2
|
||||||
|
// width: parent.width/100*25
|
||||||
|
// text: catalog.i18nc("@action:button", "Save");
|
||||||
|
// height: parent.height
|
||||||
|
//
|
||||||
|
// style: ButtonStyle {
|
||||||
|
// background: Rectangle {
|
||||||
|
// color: control.hovered ? UM.Theme.colors.load_save_button_hover : UM.Theme.colors.load_save_button
|
||||||
|
// Behavior on color { ColorAnimation { duration: 50; } }
|
||||||
|
// width: actualLabel.width + UM.Theme.sizes.default_margin.width
|
||||||
|
// Label {
|
||||||
|
// id: actualLabel
|
||||||
|
// anchors.centerIn: parent
|
||||||
|
// color: UM.Theme.colors.load_save_button_text
|
||||||
|
// font: UM.Theme.fonts.default
|
||||||
|
// text: control.text;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// label: Item { }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle{
|
Rectangle{
|
||||||
|
@ -15,79 +15,96 @@ Rectangle {
|
|||||||
property bool activity: Printer.getPlatformActivity;
|
property bool activity: Printer.getPlatformActivity;
|
||||||
Behavior on progress { NumberAnimation { duration: 250; } }
|
Behavior on progress { NumberAnimation { duration: 250; } }
|
||||||
property int totalHeight: childrenRect.height
|
property int totalHeight: childrenRect.height
|
||||||
|
property string fileBaseName
|
||||||
|
property variant activeMachineInstance: UM.MachineManager.activeMachineInstance
|
||||||
|
|
||||||
|
onActiveMachineInstanceChanged:
|
||||||
|
{
|
||||||
|
base.createFileName()
|
||||||
|
}
|
||||||
|
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
|
|
||||||
property variant printDuration: PrintInformation.currentPrintTime;
|
property variant printDuration: PrintInformation.currentPrintTime;
|
||||||
property real printMaterialAmount: PrintInformation.materialAmount;
|
property real printMaterialAmount: PrintInformation.materialAmount;
|
||||||
|
|
||||||
function createFileName(baseName){
|
function createFileName(){
|
||||||
var splitMachineName = UM.Application.machineName.split(" ")
|
var splitMachineName = UM.MachineManager.activeMachineInstance.split(" ")
|
||||||
var abbrMachine = ''
|
var abbrMachine = ''
|
||||||
for (var i = 0; i < splitMachineName.length; i++){
|
for (var i = 0; i < splitMachineName.length; i++){
|
||||||
if (splitMachineName[i].search(/ultimaker/i) != -1)
|
if (splitMachineName[i].search(/ultimaker/i) != -1){
|
||||||
abbrMachine += 'UM'
|
abbrMachine += 'UM'
|
||||||
else
|
}
|
||||||
abbrMachine += splitMachineName[i].charAt(0)
|
else{
|
||||||
|
if (splitMachineName[i].charAt(0).search(/[0-9]/g) == -1)
|
||||||
|
abbrMachine += splitMachineName[i].charAt(0)
|
||||||
|
}
|
||||||
var regExpAdditives = /[0-9\+]/g;
|
var regExpAdditives = /[0-9\+]/g;
|
||||||
var resultAdditives = splitMachineName[i].match(regExpAdditives);
|
var resultAdditives = splitMachineName[i].match(regExpAdditives);
|
||||||
if (resultAdditives != null){
|
if (resultAdditives != null){
|
||||||
for (var j = 0; j < resultAdditives.length; j++){ abbrMachine += resultAdditives[j] }
|
for (var j = 0; j < resultAdditives.length; j++){
|
||||||
|
abbrMachine += resultAdditives[j]
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printJobTextfield.text = abbrMachine + '_' + baseName
|
//printJobTextfield.text = abbrMachine + '_' + base.fileBaseName
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: openDialog
|
target: openDialog
|
||||||
onHasMesh: base.createFileName(name)
|
onHasMesh: {
|
||||||
|
base.fileBaseName = name
|
||||||
|
base.createFileName()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id: printJobRow
|
id: printJobRow
|
||||||
implicitWidth: base.width;
|
implicitWidth: base.width;
|
||||||
implicitHeight: UM.Theme.sizes.sidebar_header.height
|
//implicitHeight: UM.Theme.sizes.sidebar_header.height /////////////remove this TODO
|
||||||
|
implicitHeight: 1
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
color: UM.Theme.colors.sidebar_header_bar
|
//color: UM.Theme.colors.sidebar_header_bar
|
||||||
Label{
|
color: UM.Theme.colors.setting_control_border
|
||||||
id: printJobTextfieldLabel
|
// Label{
|
||||||
text: catalog.i18nc("@label","Printjob name");
|
// id: printJobTextfieldLabel
|
||||||
anchors.left: parent.left
|
// text: catalog.i18nc("@label","Printjob name");
|
||||||
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
// anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
// anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
||||||
font: UM.Theme.fonts.default;
|
// anchors.verticalCenter: parent.verticalCenter
|
||||||
color: UM.Theme.colors.text_white
|
// font: UM.Theme.fonts.default;
|
||||||
}
|
// color: UM.Theme.colors.text_white
|
||||||
TextField {
|
// }
|
||||||
id: printJobTextfield
|
// TextField {
|
||||||
anchors.right: parent.right
|
// id: printJobTextfield
|
||||||
anchors.rightMargin: UM.Theme.sizes.default_margin.width;
|
// anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
// anchors.rightMargin: UM.Theme.sizes.default_margin.width;
|
||||||
width: parent.width/100*55
|
// anchors.verticalCenter: parent.verticalCenter
|
||||||
height: UM.Theme.sizes.sidebar_inputFields.height
|
// width: parent.width/100*55
|
||||||
property int unremovableSpacing: 5
|
// height: UM.Theme.sizes.sidebar_inputFields.height
|
||||||
text: ''
|
// property int unremovableSpacing: 5
|
||||||
onEditingFinished: {
|
// text: ''
|
||||||
if (printJobTextfield.text != ''){
|
// onEditingFinished: {
|
||||||
printJobTextfield.focus = false
|
// if (printJobTextfield.text != ''){
|
||||||
}
|
// printJobTextfield.focus = false
|
||||||
}
|
// }
|
||||||
validator: RegExpValidator {
|
// }
|
||||||
regExp: /^[^\\ \/ \.]*$/
|
// validator: RegExpValidator {
|
||||||
}
|
// regExp: /^[^\\ \/ \.]*$/
|
||||||
style: TextFieldStyle{
|
// }
|
||||||
textColor: UM.Theme.colors.setting_control_text;
|
// style: TextFieldStyle{
|
||||||
font: UM.Theme.fonts.default;
|
// textColor: UM.Theme.colors.setting_control_text;
|
||||||
background: Rectangle {
|
// font: UM.Theme.fonts.default;
|
||||||
radius: 0
|
// background: Rectangle {
|
||||||
implicitWidth: parent.width
|
// radius: 0
|
||||||
implicitHeight: parent.height
|
// implicitWidth: parent.width
|
||||||
border.width: 1;
|
// implicitHeight: parent.height
|
||||||
border.color: UM.Theme.colors.slider_groove_border;
|
// border.width: 1;
|
||||||
}
|
// border.color: UM.Theme.colors.slider_groove_border;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -14,6 +14,7 @@ Rectangle
|
|||||||
|
|
||||||
property Action addMachineAction;
|
property Action addMachineAction;
|
||||||
property Action configureMachinesAction;
|
property Action configureMachinesAction;
|
||||||
|
property Action manageProfilesAction;
|
||||||
|
|
||||||
color: UM.Theme.colors.sidebar;
|
color: UM.Theme.colors.sidebar;
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
@ -64,6 +65,7 @@ Rectangle
|
|||||||
|
|
||||||
ProfileSetup {
|
ProfileSetup {
|
||||||
id: profileItem
|
id: profileItem
|
||||||
|
manageProfilesAction: base.manageProfilesAction
|
||||||
anchors.top: header.bottom
|
anchors.top: header.bottom
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: totalHeightProfileSetup
|
height: totalHeightProfileSetup
|
||||||
|
@ -11,23 +11,167 @@ import UM 1.1 as UM
|
|||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
id: base;
|
id: base;
|
||||||
|
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
|
||||||
anchors.rightMargin: UM.Theme.sizes.default_margin.width;
|
|
||||||
|
|
||||||
property Action configureSettings;
|
property Action configureSettings;
|
||||||
|
|
||||||
property variant minimumPrintTime: PrintInformation.minimumPrintTime;
|
property variant minimumPrintTime: PrintInformation.minimumPrintTime;
|
||||||
property variant maximumPrintTime: PrintInformation.maximumPrintTime;
|
property variant maximumPrintTime: PrintInformation.maximumPrintTime;
|
||||||
|
|
||||||
Component.onCompleted: PrintInformation.enabled = true
|
Component.onCompleted: PrintInformation.enabled = true
|
||||||
Component.onDestruction: PrintInformation.enabled = false
|
Component.onDestruction: PrintInformation.enabled = false
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||||
ColumnLayout
|
|
||||||
{
|
|
||||||
anchors.fill: parent;
|
|
||||||
|
|
||||||
|
// Rectangle {
|
||||||
|
// anchors.top: simpleModeGrid.top
|
||||||
|
// anchors.left: simpleModeGrid.left
|
||||||
|
// width: simpleModeGrid.width
|
||||||
|
// height: simpleModeGrid.height
|
||||||
|
// color: "blue"
|
||||||
|
// }
|
||||||
|
|
||||||
|
Grid {
|
||||||
|
id: simpleModeGrid
|
||||||
|
anchors.fill: parent;
|
||||||
|
columns: 2
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
// Rectangle{
|
||||||
|
// id: infillLabelCell
|
||||||
|
// width: base.width/100*45
|
||||||
|
// height: 100
|
||||||
|
// Column {
|
||||||
|
// spacing: 0
|
||||||
|
// anchors{
|
||||||
|
// top: parent.top
|
||||||
|
// topMargin: UM.Theme.sizes.default_margin.height
|
||||||
|
// right: parent.right
|
||||||
|
// rightMargin: UM.Theme.sizes.default_margin.width
|
||||||
|
// bottom: parent.bottom
|
||||||
|
// bottomMargin: UM.Theme.sizes.default_margin.height
|
||||||
|
// left: parent.left
|
||||||
|
// leftMargin: UM.Theme.sizes.default_margin.width
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Label{
|
||||||
|
// id: infillLabel
|
||||||
|
// //: Infill selection label
|
||||||
|
// text: catalog.i18nc("@label","Infill:");
|
||||||
|
// font: UM.Theme.fonts.default;
|
||||||
|
// }
|
||||||
|
// Label{
|
||||||
|
// id: infillCaption
|
||||||
|
// width: infillLabelCell.width - UM.Theme.sizes.default_margin.width
|
||||||
|
// text: "hier staat overig tekst hier staat overig tekst hier staat overig tekst"
|
||||||
|
// font: UM.Theme.fonts.caption
|
||||||
|
// wrapMode: Text.Wrap
|
||||||
|
// color: UM.Theme.colors.text
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Rectangle{
|
||||||
|
// id: infillCell
|
||||||
|
// height: 100
|
||||||
|
// width: base.width/100*55
|
||||||
|
// Row {
|
||||||
|
// spacing: 0
|
||||||
|
// anchors.right: parent.right
|
||||||
|
// anchors.rightMargin: UM.Theme.sizes.default_margin.width
|
||||||
|
// Rectangle {
|
||||||
|
// id: infillWrapper
|
||||||
|
// width: infillCell.width/4;
|
||||||
|
// height: infillCell.height
|
||||||
|
// Rectangle{
|
||||||
|
// id: infillIconLining
|
||||||
|
// anchors.top: parent.top
|
||||||
|
// anchors.topMargin: UM.Theme.sizes.default_margin.height
|
||||||
|
// anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
// z: parent.z + 1
|
||||||
|
// width: parent.width - UM.Theme.sizes.default_margin.width/2
|
||||||
|
// height: parent.width - UM.Theme.sizes.default_margin.width/2
|
||||||
|
// color: "grey"
|
||||||
|
// border.color: "black"
|
||||||
|
// border.width:1
|
||||||
|
// UM.RecolorImage {
|
||||||
|
// id: infillIcon
|
||||||
|
// z: parent.z + 1
|
||||||
|
// anchors.verticalCenter: parent.verticalCenter
|
||||||
|
// anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
// width: UM.Theme.sizes.save_button_specs_icons.width
|
||||||
|
// height: UM.Theme.sizes.save_button_specs_icons.height
|
||||||
|
// sourceSize.width: width
|
||||||
|
// sourceSize.height: width
|
||||||
|
// color: UM.Theme.colors.text_hover
|
||||||
|
// source: UM.Theme.icons.print_time;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// Label{
|
||||||
|
// //: Infill version label "light:
|
||||||
|
// text: catalog.i18nc("@label","Light");
|
||||||
|
// anchors.top: infillIconLining.bottom
|
||||||
|
// anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
// font.bold: true
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// Rectangle {
|
||||||
|
// color: "green";
|
||||||
|
// width: infillCell.width/4;
|
||||||
|
// height: infillCell.height
|
||||||
|
// }
|
||||||
|
// Rectangle {
|
||||||
|
// color: "blue";
|
||||||
|
// width: infillCell.width/4;
|
||||||
|
// height: infillCell.height
|
||||||
|
// }
|
||||||
|
// Rectangle {
|
||||||
|
// color: "yellow";
|
||||||
|
// width: infillCell.width/4;
|
||||||
|
// height: infillCell.height
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width/100*45 - UM.Theme.sizes.default_margin.width
|
||||||
|
height: 100
|
||||||
|
Label{
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: UM.Theme.sizes.default_margin.width
|
||||||
|
//: Helpers selection label
|
||||||
|
text: catalog.i18nc("@label","Helpers:");
|
||||||
|
font: UM.Theme.fonts.default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width/100*55 - UM.Theme.sizes.default_margin.width
|
||||||
|
height: 100
|
||||||
|
Column {
|
||||||
|
spacing: 4
|
||||||
|
|
||||||
|
CheckBox{
|
||||||
|
Layout.preferredHeight: UM.Theme.sizes.section.height;
|
||||||
|
//: Setting enable skirt adhesion checkbox
|
||||||
|
text: catalog.i18nc("@action:checkbox","Enable Skirt Adhesion");
|
||||||
|
style: UM.Theme.styles.checkbox;
|
||||||
|
checked: Printer.getSettingValue("skirt_line_count");
|
||||||
|
onCheckedChanged: Printer.setSettingValue("skirt_line_count", checked);
|
||||||
|
}
|
||||||
|
CheckBox{
|
||||||
|
Layout.preferredHeight: UM.Theme.sizes.section.height;
|
||||||
|
|
||||||
|
//: Setting enable support checkbox
|
||||||
|
text: catalog.i18nc("@action:checkbox","Enable Support");
|
||||||
|
|
||||||
|
style: UM.Theme.styles.checkbox;
|
||||||
|
|
||||||
|
checked: Printer.getSettingValue("support_enable");
|
||||||
|
onCheckedChanged: Printer.setSettingValue("support_enable", checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
Layout.fillWidth: true;
|
Layout.fillWidth: true;
|
||||||
@ -130,5 +274,5 @@ Item
|
|||||||
}
|
}
|
||||||
|
|
||||||
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
|
Item { Layout.fillWidth: true; Layout.fillHeight: true; }
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ Item {
|
|||||||
model: UM.Models.toolModel
|
model: UM.Models.toolModel
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: model.name;
|
text: model.name
|
||||||
iconSource: UM.Theme.icons[model.icon];
|
iconSource: UM.Theme.icons[model.icon];
|
||||||
|
|
||||||
checkable: true;
|
checkable: true;
|
||||||
|
@ -1,7 +1,45 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
<svg version="1.2" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
x="0px" y="0px" viewBox="0 0 30 30" xml:space="preserve">
|
<svg
|
||||||
<path d="M30,20L25.1,6.7L27.6,0H12.9l1.6,5H7.1H6.9H6.4l2.3,6H2.4l2.4,6.2L0,30h19.5l-1.7-4h7.5h0.1h0.6l-2.3-6H30z M17.5,25
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
l-2.8-7.5l2.4-6.5H9.6L7.7,6h7.2h7.5l-2.4,6.4l2.9,7.6l2,5H17.5z"/>
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
</svg>
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
version="1.2"
|
||||||
|
id="Layer_1"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
viewBox="0 0 30 30"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="setting_per_object.svg"><metadata
|
||||||
|
id="metadata9"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs7" /><sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1440"
|
||||||
|
inkscape:window-height="834"
|
||||||
|
id="namedview5"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="7.8666667"
|
||||||
|
inkscape:cx="15"
|
||||||
|
inkscape:cy="15"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="27"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="Layer_1" /><path
|
||||||
|
d="M30,20L25.1,6.7L27.6,0H12.9l1.6,5H7.1H6.9H6.4l2.3,6H2.4l2.4,6.2L0,30h19.5l-1.7-4h7.5h0.1h0.6l-2.3-6H30z M17.5,25 l-2.8-7.5l2.4-6.5H9.6L7.7,6h7.2h7.5l-2.4,6.4l2.9,7.6l2,5H17.5z"
|
||||||
|
id="path3"
|
||||||
|
style="fill:#ffffff" /></svg>
|
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 1.7 KiB |
@ -121,7 +121,7 @@
|
|||||||
"checkbox_hover": [245, 245, 245, 255],
|
"checkbox_hover": [245, 245, 245, 255],
|
||||||
"checkbox_border": [174, 174, 174, 255],
|
"checkbox_border": [174, 174, 174, 255],
|
||||||
"checkbox_mark": [35, 35, 35, 255],
|
"checkbox_mark": [35, 35, 35, 255],
|
||||||
"checkbox_text": [140, 144, 154, 255],
|
"checkbox_text": [0, 0, 0, 255],
|
||||||
|
|
||||||
"tooltip": [255, 225, 146, 255],
|
"tooltip": [255, 225, 146, 255],
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user