Implement simplemode -> profilesetup -> infill selection

not yet fully functional. Fast implement for string freeze

Contributes to: issue CURA-123
This commit is contained in:
Tamara Hogenhout 2015-09-11 13:02:01 +02:00
parent 506180fff9
commit b816f0b03b
5 changed files with 162 additions and 148 deletions

View File

@ -21,119 +21,126 @@ Item
Component.onDestruction: PrintInformation.enabled = false Component.onDestruction: PrintInformation.enabled = false
UM.I18nCatalog { id: catalog; name:"cura"} UM.I18nCatalog { id: catalog; name:"cura"}
// Rectangle { Rectangle{
// anchors.top: simpleModeGrid.top id: infillCellLeft
// anchors.left: simpleModeGrid.left anchors.top: parent.top
// width: simpleModeGrid.width anchors.left: parent.left
// height: simpleModeGrid.height width: base.width/100*55 - UM.Theme.sizes.default_margin.width
// color: "blue" height: childrenRect.height < UM.Theme.sizes.simple_mode_infill_caption.height ? UM.Theme.sizes.simple_mode_infill_caption.height : childrenRect.height
// }
Grid { Label{
id: simpleModeGrid id: infillLabel
anchors.fill: parent; //: Infill selection label
columns: 2 text: catalog.i18nc("@label","Infill:");
spacing: 0 font: UM.Theme.fonts.default;
anchors.top: parent.top
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
}
Label{
id: infillCaption
width: infillCellLeft.width - UM.Theme.sizes.default_margin.width
text: infillModel.get(infillListView.activeIndex).text
font: UM.Theme.fonts.caption
wrapMode: Text.Wrap
color: UM.Theme.colors.text
anchors.top: infillLabel.bottom
anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width
}
}
// Rectangle{ Rectangle{
// id: infillLabelCell id: infillCellRight
// width: base.width/100*45 height: 100
// height: 100 width: base.width/100*45
// Column { anchors.right: parent.right
// spacing: 0 anchors.rightMargin: UM.Theme.sizes.default_margin.width - (UM.Theme.sizes.default_margin.width/4)
// anchors{ anchors.top: parent.top
// top: parent.top anchors.topMargin: UM.Theme.sizes.default_margin.height
// topMargin: UM.Theme.sizes.default_margin.height Component{
// right: parent.right id: infillDelegate
// rightMargin: UM.Theme.sizes.default_margin.width Item{
// bottom: parent.bottom width: infillCellRight.width/3
// bottomMargin: UM.Theme.sizes.default_margin.height x: index * (infillCellRight.width/3)
// left: parent.left anchors.top: parent.top
// leftMargin: UM.Theme.sizes.default_margin.width Rectangle{
// } id: infillIconLining
// anchors.top: parent.top
// Label{ anchors.horizontalCenter: parent.horizontalCenter
// id: infillLabel width: parent.width - (UM.Theme.sizes.default_margin.width/2)
// //: Infill selection label height: parent.width - (UM.Theme.sizes.default_margin.width/2)
// text: catalog.i18nc("@label","Infill:"); border.color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_text : UM.Theme.colors.setting_control_border
// font: UM.Theme.fonts.default; border.width: infillListView.activeIndex == index ? 2 : 1
// } color: infillListView.activeIndex == index ? UM.Theme.colors.setting_category_active : "transparent"
// Label{ UM.RecolorImage {
// id: infillCaption id: infillIcon
// width: infillLabelCell.width - UM.Theme.sizes.default_margin.width z: parent.z + 1
// text: "hier staat overig tekst hier staat overig tekst hier staat overig tekst" anchors.verticalCenter: parent.verticalCenter
// font: UM.Theme.fonts.caption anchors.horizontalCenter: parent.horizontalCenter
// wrapMode: Text.Wrap width: parent.width - UM.Theme.sizes.default_margin.width
// color: UM.Theme.colors.text height: parent.width - UM.Theme.sizes.default_margin.width
// } sourceSize.width: width
// } sourceSize.height: width
// } color: UM.Theme.colors.setting_control_text
// source: UM.Theme.icons[model.icon];
// Rectangle{ }
// id: infillCell MouseArea {
// height: 100 anchors.fill: parent
// width: base.width/100*55 onClicked: {
// Row { infillListView.activeIndex = index
// spacing: 0 }
// anchors.right: parent.right }
// anchors.rightMargin: UM.Theme.sizes.default_margin.width }
// Rectangle { Label{
// id: infillWrapper id: infillLabel
// width: infillCell.width/4; anchors.top: infillIconLining.bottom
// height: infillCell.height anchors.horizontalCenter: parent.horizontalCenter
// Rectangle{ color: infillListView.activeIndex == index ? UM.Theme.colors.setting_control_text : UM.Theme.colors.setting_control_border
// id: infillIconLining text: name
// anchors.top: parent.top //font.bold: infillListView.activeIndex == index ? true : false
// 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 ListView{
// height: parent.width - UM.Theme.sizes.default_margin.width/2 id: infillListView
// color: "grey" property int activeIndex: 0
// border.color: "black" model: infillModel
// border.width:1 delegate: infillDelegate
// UM.RecolorImage { anchors.fill: parent
// id: infillIcon }
// z: parent.z + 1 ListModel {
// anchors.verticalCenter: parent.verticalCenter id: infillModel
// anchors.horizontalCenter: parent.horizontalCenter
// width: UM.Theme.sizes.save_button_specs_icons.width ListElement {
// height: UM.Theme.sizes.save_button_specs_icons.height name: "Sparse"
// sourceSize.width: width percentage: 20
// sourceSize.height: width text: "Sparse (20%) infill will give your model an average strength"
// color: UM.Theme.colors.text_hover icon: "sparse"
// source: UM.Theme.icons.print_time; }
// } ListElement {
// } name: "Dense"
// Label{ percentage: 50
// //: Infill version label "light: text: "Dense (50%) infill will give your model an above average strength"
// text: catalog.i18nc("@label","Light"); icon: "dense"
// anchors.top: infillIconLining.bottom }
// anchors.horizontalCenter: parent.horizontalCenter ListElement {
// font.bold: true name: "Solid"
// } percentage: 100;
// } text: "Solid (100%) infill will make your model completely solid"
// Rectangle { icon: "solid"
// 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 { Rectangle {
id: helpersCellLeft
anchors.top: infillCellLeft.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: parent.left
width: parent.width/100*45 - UM.Theme.sizes.default_margin.width width: parent.width/100*45 - UM.Theme.sizes.default_margin.width
height: 100 height: childrenRect.height
Label{ Label{
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: UM.Theme.sizes.default_margin.width anchors.leftMargin: UM.Theme.sizes.default_margin.width
@ -143,12 +150,17 @@ Item
} }
} }
Rectangle { Rectangle {
id: helpersCellRight
anchors.top: helpersCellLeft.top
anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.left: helpersCellLeft.right
width: parent.width/100*55 - UM.Theme.sizes.default_margin.width width: parent.width/100*55 - UM.Theme.sizes.default_margin.width
height: 100 height: childrenRect.height
Column {
spacing: 4
CheckBox{ CheckBox{
id: skirtCheckBox
anchors.top: parent.top
anchors.left: parent.left
Layout.preferredHeight: UM.Theme.sizes.section.height; Layout.preferredHeight: UM.Theme.sizes.section.height;
//: Setting enable skirt adhesion checkbox //: Setting enable skirt adhesion checkbox
text: catalog.i18nc("@option:check","Enable Skirt Adhesion"); text: catalog.i18nc("@option:check","Enable Skirt Adhesion");
@ -163,6 +175,9 @@ Item
} }
} }
CheckBox{ CheckBox{
anchors.top: skirtCheckBox.bottom
anchors.topMargin: UM.Theme.sizes.default_lining.height
anchors.left: parent.left
Layout.preferredHeight: UM.Theme.sizes.section.height; Layout.preferredHeight: UM.Theme.sizes.section.height;
//: Setting enable support checkbox //: Setting enable support checkbox
@ -180,8 +195,6 @@ Item
} }
} }
} }
}
}
/* /*
Item Item

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 791 B

After

Width:  |  Height:  |  Size: 791 B

View File

@ -172,6 +172,7 @@
"setting_control_margin": [3.0, 3.0], "setting_control_margin": [3.0, 3.0],
"setting_unit_margin": [0.5, 0.5], "setting_unit_margin": [0.5, 0.5],
"setting_text_maxwidth": [40.0, 0.0], "setting_text_maxwidth": [40.0, 0.0],
"simple_mode_infill_caption": [0.0, 5.0],
"standard_list_lineheight": [1.5, 1.5], "standard_list_lineheight": [1.5, 1.5],
"standard_list_input": [20.0, 25.0], "standard_list_input": [20.0, 25.0],