Fix #7: Make TaskView editable (#8)

Co-authored-by: Alexis Drai <adrai@cikaba.com>
Reviewed-on: #8
pull/10/head
Alexis Drai 2 years ago
parent b7e11f0a2f
commit c70b8a3c72

@ -24,28 +24,28 @@ Page {
height: 2 * Theme.paddingLarge
}
Label {
TextField {
id: titleField
text: taskModel.title
label: qsTr("Title")
font.pixelSize: Theme.fontSizeExtraLarge
onTextChanged: taskModel.title = text
}
Label {
text: qsTr("Description")
font.bold: true
font.pixelSize: Theme.fontSizeLarge
}
Label {
TextField {
id: descriptionField
text: taskModel.description
font.pixelSize: Theme.fontSizeMedium
label: qsTr("Description")
font.pixelSize: Theme.fontSizeLarge
onTextChanged: taskModel.description = text
}
Label {
text: qsTr("Priority ") + taskModel.priority
color: taskModel.priority === 0 ? "red" :
taskModel.priority === 1 ? "orange" :
taskModel.priority === 2 ? "blue" : Theme.primaryColor
font.pixelSize: Theme.fontSizeLarge
TextField {
id: priorityField
text: taskModel.priority.toString()
label: qsTr("Priority")
validator: IntValidator { bottom: 0; top: 3 }
onTextChanged: taskModel.priority = parseInt(text)
}
}
}

@ -15,7 +15,11 @@
<translation type="unfinished"></translation>
</message>
<message>
<source>Priority </source>
<source>Title</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Priority</source>
<translation type="unfinished"></translation>
</message>
</context>

@ -15,7 +15,11 @@
<translation type="unfinished"></translation>
</message>
<message>
<source>Priority </source>
<source>Title</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Priority</source>
<translation type="unfinished"></translation>
</message>
</context>

Loading…
Cancel
Save