Changeset View
Changeset View
Standalone View
Standalone View
src/creator/qml/Book.qml
Context not available. | |||||
89 | model: bookModel; | 89 | model: bookModel; | ||
---|---|---|---|---|---|
90 | } | 90 | } | ||
91 | } | 91 | } | ||
92 | Component { | ||||
93 | id: editBookPage; | ||||
94 | BookPage { | ||||
95 | model: bookModel; | ||||
96 | onSave: { | ||||
97 | bookList.updateTitle(index, currentPage.title("")); | ||||
98 | } | ||||
99 | } | ||||
100 | } | ||||
101 | function updateTitle(index, title) { | ||||
102 | //Need to add feature to update data here. | ||||
103 | } | ||||
92 | 104 | | |||
93 | delegate: Kirigami.SwipeListItem { | 105 | delegate: Kirigami.SwipeListItem { | ||
94 | id: listItem; | 106 | id: listItem; | ||
Context not available. | |||||
119 | text: i18nc("add a page to the book after this one", "Add Page After This"); | 131 | text: i18nc("add a page to the book after this one", "Add Page After This"); | ||
120 | iconName: "list-add" | 132 | iconName: "list-add" | ||
121 | onTriggered: root.addPage(model.index); | 133 | onTriggered: root.addPage(model.index); | ||
134 | }, | ||||
135 | Kirigami.Action { | ||||
136 | text: i18nc("Edit page data such as title, frames, etc.", "Edit Page"); | ||||
137 | iconName: "document-edit"; | ||||
138 | onTriggered: { | ||||
139 | pageStack.push(editBookPage, { index: model.index, pageUrl: model.url }) | ||||
140 | } | ||||
122 | } | 141 | } | ||
142 | | ||||
123 | ] | 143 | ] | ||
124 | Item { | 144 | Item { | ||
125 | anchors.fill: parent; | 145 | anchors.fill: parent; | ||
Context not available. |