Version 0.003
This commit is contained in:
parent
9f9a9f618c
commit
10dccdcdbb
572 changed files with 3711 additions and 13631 deletions
74
source-android/qml/newsqml/AttachmentDialog.qml
Normal file
74
source-android/qml/newsqml/AttachmentDialog.qml
Normal file
|
@ -0,0 +1,74 @@
|
|||
import QtQuick 2.0
|
||||
import Qt.labs.folderlistmodel 2.1
|
||||
import "qrc:/js/service.js" as Service
|
||||
import "qrc:/js/helper.js" as Helperjs
|
||||
import "qrc:/qml/genericqml"
|
||||
|
||||
Rectangle{
|
||||
id:attachmentDialog
|
||||
z:2
|
||||
border.color: "grey"
|
||||
width: parent.width-4*mm
|
||||
height:parent.height-12*mm
|
||||
x:2*mm
|
||||
y:10*mm
|
||||
property var parsedAttachments: JSON.parse(attachedobjects)
|
||||
|
||||
Text{
|
||||
x:0.5*mm
|
||||
y:0.5*mm
|
||||
width: imageDialog-8*mm
|
||||
elide:Text.ElideRight
|
||||
text: "Attachments:"
|
||||
}
|
||||
BlueButton{
|
||||
id:closeButton
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 1*mm
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 1*mm
|
||||
text: "\uf057"
|
||||
onClicked:{attachmentDialog.destroy()}
|
||||
}
|
||||
ListView {
|
||||
id: attachmentView
|
||||
x:0.5*mm
|
||||
y:5.5*mm
|
||||
width: attachmentDialog.width-2*mm
|
||||
height: attachmentDialog.height-14*mm
|
||||
clip: true
|
||||
spacing:0
|
||||
model: attachmentModel
|
||||
delegate: attachmentItem
|
||||
}
|
||||
|
||||
ListModel{id: attachmentModel}
|
||||
|
||||
Component { id:attachmentItem
|
||||
Rectangle{
|
||||
border.color: "#EEEEEE"
|
||||
border.width: 1
|
||||
width:parent.width
|
||||
height:6*mm
|
||||
|
||||
Text{
|
||||
font.pixelSize: 3*mm
|
||||
x: mm
|
||||
text:attachment.name
|
||||
}
|
||||
|
||||
MouseArea{
|
||||
anchors.fill: parent
|
||||
onClicked:{
|
||||
Qt.openUrlExternally(attachment.url)
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
}
|
||||
Component.onCompleted: {
|
||||
for (var a in parsedAttachments){
|
||||
attachmentModel.append({"attachment":parsedAttachments[a]})
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue