-
Notifications
You must be signed in to change notification settings - Fork 0
/
TodoItemPage.qml
71 lines (57 loc) · 1.71 KB
/
TodoItemPage.qml
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
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.12
import TodoApp 1.0
import "../Components/TodoItems"
Page {
width: parent.width
ColumnLayout {
anchors.fill: parent
anchors.margins: 8
AddTodoItemForm {
id: addTodoItemForm
target: ctrl
}
ClosedTodoItemList {
id: closedTodoItemList
target: ctrl
}
OpenTodoItemList {
id: openTodoItemList
target: ctrl
}
}
TodoItemsController {
id: ctrl
Component.onCompleted: {
ctrl.initialize()
}
function handleAddTodoItem(title, description) {
console.log("Handle AddTodoItem called")
ctrl.addTodoItem(title, description)
}
function handleCloseTodoItem(todoItemId) {
console.log("Handle CloseTodoItem called")
ctrl.closeTodoItem(todoItemId)
}
function handleOpenTodoItem(todoItemId) {
console.log("Handle OpenTodoItem called")
ctrl.openTodoItem(todoItemId)
}
function handleDeleteTodoItem(todoItemId) {
console.log("Handle DeleteTodoItem called")
ctrl.deleteTodoItem(todoItemId)
}
function handleOpenTodoItemDialog(todoItemId, title, description) {
console.log("Handle OpenTodoItemDialog called")
todoItemDialog.todoItemId = todoItemId
todoItemDialog.todoItemTitle = title
todoItemDialog.todoItemDescription = description
todoItemDialog.open()
}
}
TodoItemDialog {
id: todoItemDialog
}
}