Friendiqa/v0.002/Release/source-linux/qml/newsqml/Conversation.qml

55 lines
1.3 KiB
QML

// ConversationStack with buttons
import QtQuick 2.0
import QtQuick.Controls 1.2
import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml"
import "qrc:/qml"
Rectangle {
id:conversationStack
property var news
y:1
color: "white"
width:root.width-2*mm
height:root.height-8*mm
ListView {
id: conversationView
x:3*mm
y:8*mm
width: conversationStack.width-4*mm
height: conversationStack.height-10*mm
clip: true
spacing: 0
model: conversationModel
delegate: Newsitem{}
}
ListModel{id: conversationModel}
WorkerScript {
id: conversationWorker
source: "qrc:/js/newsworker.js"
}
BlueButton {
id: closeButton
width:10*mm
anchors.top: parent.top
anchors.topMargin: 1*mm
anchors.right: parent.right
anchors.rightMargin: 1*mm
text: qsTr("Close")
onClicked: {
newstab.newstabstatus=login.newsViewType;
newsStack.pop()
}
}
Component.onCompleted: {
var currentTime= new Date();
var msg = {'currentTime': currentTime, 'model': conversationModel,'news':news};
conversationWorker.sendMessage(msg)
}
}