-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.qml
More file actions
85 lines (72 loc) · 2 KB
/
main.qml
File metadata and controls
85 lines (72 loc) · 2 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import QtQuick 2.0
import Notquick 1.0
import QtQuick.Controls 1.0
ApplicationWindow {
visibility: "Maximized"
visible: true
title: qsTr("Notquick")
Item {
id: leftPanel
anchors {
top: parent.top
bottom: parent.bottom
left: parent.left
}
width: (parent.width - 5) / 2
QueryInput {
id: qi
anchors {
top: parent.top
left: parent.left
right: parent.right
margins: 5
}
queryString: "list:notmuch"
onRefresh: updateThreads()
Component.onCompleted: updateThreads()
function updateThreads() { // this is done to implement refreshing on 'Go' click
threadList.model = 0
threadList.model = NotmuchDatabase.queryThreads(queryString)
}
}
NotquickList {
id: threadList
objectDelegate: ThreadItem {}
anchors {
top: qi.bottom
bottom: parent.bottom
left: parent.left
right: parent.right
topMargin: 5
bottomMargin: 5
}
onAtYEndChanged: if (atYEnd && model) {
model.loadMore()
}
}
}
NotquickList {
id: messageList
objectDelegate: MessageItem {}
model: threadList.currentObject.messages
anchors {
left: leftPanel.right
leftMargin: 5
top: parent.top
topMargin: 5
right: parent.right
}
height: (parent.height - 15) / 2
}
MessageViewer {
id: messageViewer
message: messageList.currentObject
anchors {
top: messageList.bottom
left: leftPanel.right
right: parent.right
bottom: parent.bottom
margins: 5
}
}
}