mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-22 14:13:55 -06:00
re-implements the safebutton -> filename -> textfield
Not yet fully functional but re-implemented for stringfreeze Contributes to: issue CURA-125
This commit is contained in:
parent
032b6e4000
commit
ae2a07ca06
1 changed files with 43 additions and 45 deletions
|
@ -48,7 +48,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//printJobTextfield.text = abbrMachine + '_' + base.fileBaseName
|
printJobTextfield.text = abbrMachine + '_' + base.fileBaseName
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
@ -62,49 +62,47 @@ Rectangle {
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id: printJobRow
|
id: printJobRow
|
||||||
implicitWidth: base.width;
|
implicitWidth: base.width;
|
||||||
//implicitHeight: UM.Theme.sizes.sidebar_header.height /////////////remove this TODO
|
implicitHeight: UM.Theme.sizes.sidebar_header.height
|
||||||
implicitHeight: 1
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
//color: UM.Theme.colors.sidebar_header_bar
|
color: UM.Theme.colors.sidebar_header_bar
|
||||||
color: UM.Theme.colors.setting_control_border
|
Label{
|
||||||
// Label{
|
id: printJobTextfieldLabel
|
||||||
// id: printJobTextfieldLabel
|
text: catalog.i18nc("@label:textbox", "Printjob name");
|
||||||
// text: catalog.i18nc("@label","Printjob name");
|
anchors.left: parent.left
|
||||||
// anchors.left: parent.left
|
anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
||||||
// anchors.leftMargin: UM.Theme.sizes.default_margin.width;
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
// anchors.verticalCenter: parent.verticalCenter
|
font: UM.Theme.fonts.default;
|
||||||
// font: UM.Theme.fonts.default;
|
color: UM.Theme.colors.text_white
|
||||||
// color: UM.Theme.colors.text_white
|
}
|
||||||
// }
|
TextField {
|
||||||
// TextField {
|
id: printJobTextfield
|
||||||
// id: printJobTextfield
|
anchors.right: parent.right
|
||||||
// anchors.right: parent.right
|
anchors.rightMargin: UM.Theme.sizes.default_margin.width;
|
||||||
// anchors.rightMargin: UM.Theme.sizes.default_margin.width;
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
// anchors.verticalCenter: parent.verticalCenter
|
width: parent.width/100*55
|
||||||
// width: parent.width/100*55
|
height: UM.Theme.sizes.sidebar_inputFields.height
|
||||||
// height: UM.Theme.sizes.sidebar_inputFields.height
|
property int unremovableSpacing: 5
|
||||||
// property int unremovableSpacing: 5
|
text: ''
|
||||||
// text: ''
|
onEditingFinished: {
|
||||||
// onEditingFinished: {
|
if (printJobTextfield.text != ''){
|
||||||
// if (printJobTextfield.text != ''){
|
printJobTextfield.focus = false
|
||||||
// printJobTextfield.focus = false
|
}
|
||||||
// }
|
}
|
||||||
// }
|
validator: RegExpValidator {
|
||||||
// validator: RegExpValidator {
|
regExp: /^[^\\ \/ \.]*$/
|
||||||
// regExp: /^[^\\ \/ \.]*$/
|
}
|
||||||
// }
|
style: TextFieldStyle{
|
||||||
// style: TextFieldStyle{
|
textColor: UM.Theme.colors.setting_control_text;
|
||||||
// textColor: UM.Theme.colors.setting_control_text;
|
font: UM.Theme.fonts.default;
|
||||||
// font: UM.Theme.fonts.default;
|
background: Rectangle {
|
||||||
// background: Rectangle {
|
radius: 0
|
||||||
// radius: 0
|
implicitWidth: parent.width
|
||||||
// implicitWidth: parent.width
|
implicitHeight: parent.height
|
||||||
// implicitHeight: parent.height
|
border.width: 1;
|
||||||
// border.width: 1;
|
border.color: UM.Theme.colors.slider_groove_border;
|
||||||
// border.color: UM.Theme.colors.slider_groove_border;
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -138,7 +136,7 @@ Rectangle {
|
||||||
anchors.leftMargin: UM.Theme.sizes.default_margin.width/2
|
anchors.leftMargin: UM.Theme.sizes.default_margin.width/2
|
||||||
font: UM.Theme.fonts.default
|
font: UM.Theme.fonts.default
|
||||||
color: UM.Theme.colors.text
|
color: UM.Theme.colors.text
|
||||||
text: (!base.printDuration || !base.printDuration.valid) ? "" : catalog.i18nc("@label h:m (hours:minutes) is added to the expected printtime (%1)", "%1 h:m").arg(base.printDuration.getDisplayString(UM.DurationFormat.Short))
|
text: (!base.printDuration || !base.printDuration.valid) ? "" : catalog.i18nc("@label h:m (abbreviation for hours:minutes) is added to the expected printtime (%1)", "%1 h:m").arg(base.printDuration.getDisplayString(UM.DurationFormat.Short))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item{
|
Item{
|
||||||
|
@ -165,7 +163,7 @@ Rectangle {
|
||||||
anchors.leftMargin: UM.Theme.sizes.default_margin.width/2
|
anchors.leftMargin: UM.Theme.sizes.default_margin.width/2
|
||||||
font: UM.Theme.fonts.default
|
font: UM.Theme.fonts.default
|
||||||
color: UM.Theme.colors.text
|
color: UM.Theme.colors.text
|
||||||
text: base.printMaterialAmount <= 0 ? "" : catalog.i18nc("@label","%1 m").arg(base.printMaterialAmount)
|
text: base.printMaterialAmount <= 0 ? "" : catalog.i18nc("@label m (abbreviation for meters) is added to the expected length of filament (%1) ","%1 m").arg(base.printMaterialAmount)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue