-
Notifications
You must be signed in to change notification settings - Fork 0
/
Element2.qml
51 lines (41 loc) · 1.09 KB
/
Element2.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
import QtQuick 2.12
import QtQuick.Dialogs 1.2
import QtQuick.LocalStorage 2.13
import "nextnote.js" as NN
ElementForm{
id: element
property alias element: element
title: name
property int indexId: nId
property int listIndex
property var data
width: page.width
mouseArea.onClicked: {
if (!addButton)
{
NN.getNote(indexId)
note.indexId = indexId
stackView.push(note)
addButton = true
label.readOnly = false
note.textArea.focus = true
note.textArea.cursorVisible = true
}
}
delButton.onClicked: {
delDialog.visible = true
}
MessageDialog{
id: delDialog
visible: false
title: qsTr("Warning!")
icon: StandardIcon.Critical
informativeText: qsTr("Realy want to delete?")
standardButtons: StandardButton.Ok | StandardButton.Cancel
onAccepted: {
NN.delNote(indexId)
elementModel.remove(index)
console.log(index+" : "+indexId)
}
}
}