Instantiate the QmlChatView instead of the QGV-based ChatView
[quassel.git] / qml / ChatView.qml
1 import QtQuick 1.1
2 // import Qt.components 1.0
3
4
5 ListView {
6   id: flickable
7   anchors.fill: parent
8
9   Component {
10       id: msgDelegate
11       Item {
12         Row {
13           id: chatline
14           Text { text: timestamp; wrapMode: Text.NoWrap; width: 100 }
15           Text { text: sender; wrapMode: Text.NoWrap; width: 100 }
16           Text { text: contents; wrapMode: Text.Wrap; width: flickable.width-200}
17         }
18         height: chatline.height
19         ListView.onAdd: positionViewAtEnd()
20       }
21   }
22
23   model: msgModel
24
25   delegate: msgDelegate
26
27   Rectangle {
28     id: scrollbar
29     anchors.right: flickable.right
30     y: flickable.visibleArea.yPosition * flickable.height
31            width: 10
32            height: flickable.visibleArea.heightRatio * flickable.height
33            color: "black"
34   }
35 }