Merge branch 'qml' of ssh://drop.maemo.org/git/mdictionary into qml
[mdictionary] / src / mdictionary / qml / HistoryListDialog.qml
1 import Qt 4.7
2
3 Rectangle {
4     SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
5     color : myPalette.window;
6
7     signal selectedRow(int nr)
8
9     id: rectangle1
10     width: 100
11     height: 300
12
13
14     Rectangle {
15         id: rectangle2
16         color: "#ffffff"
17         anchors.topMargin: 20
18         anchors.fill: parent
19     }
20
21     ElementsListView{
22
23         id: historyList
24         width: rectangle1.width
25         anchors.topMargin: 20
26         anchors.bottom: parent.bottom
27         anchors.top: parent.top
28         highlightResizeSpeed: 1000
29         delegate: Component{
30             id: historyListDelegate
31             Item {
32                 width: rectangle1.width
33                 height: typeText.height
34                 MouseArea{
35                     anchors.fill: parent
36                     onClicked: {
37                         historyList.currentIndex = number
38                     }
39                     onDoubleClicked: {
40                         selectedRow(number)
41                     }
42                 }
43                 Row {
44                     Text {
45                         id: typeText
46                         text: (number+1) +". "+word
47                         width: rectangle1.width
48                     }
49                 }
50             }
51         }
52         model: historyTypeModel
53     }
54
55     Text {
56         id: text1
57         x: 29
58         y: 0
59         width: 80
60         height: 20
61         text: qsTr("History");
62         anchors.horizontalCenterOffset: 19
63         anchors.topMargin: 0
64         anchors.top: parent.top
65         anchors.horizontalCenter: parent.horizontalCenter
66         font.pixelSize: 12
67     }
68
69 }