-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotesTab.qml
More file actions
56 lines (49 loc) · 1.19 KB
/
NotesTab.qml
File metadata and controls
56 lines (49 loc) · 1.19 KB
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
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Controls 1.4
import PectusViewer 1.1
Item {
id: root
property string notes : notesText.text
Rectangle {
id: tab
width: 80
height: 30
anchors.top: root.topAnchor
anchors.right: root.rightAnchor
color: myViewer.notesActive ? "#EEEEEE" : "lightGrey"
border.color: "black"
Text {
anchors.centerIn: parent
text: "Notes"
}
MouseArea {
anchors.fill: parent
onClicked: {
myViewer.toggleNotesActive();
}
}
}
Rectangle {
id: notesBox
width: 300
height: 400
anchors.top: tab.bottom
anchors.right: tab.right
color: "white"
border.color: "black"
border.width: 3
visible: myViewer.notesActive
TextArea {
id: notesText
anchors.fill: parent
text: myViewer.notes
onEditingFinished: {
myViewer.updateNotes(this.text)
}
onTextChanged: {
myViewer.updateNotes(this.text)
}
}
}
}