table view
[mdictionary] / src / mdictionary / qml / TranslationView.qml
1 import Qt 4.7
2 import QtWebKit 1.0
3
4 Rectangle {
5     id: webBrowser
6     width: 500
7     height: 500
8
9     SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
10     color: myPalette.window
11
12     function setUrl(string){
13         webView.url = "file:///home/jakub/test.html";
14         webView.url = string;
15     }
16
17     FlickableWebView {
18         id: webView
19         width:parent.width
20         height:parent.height
21         anchors { top: headerSpace.bottom; left: parent.left; right: parent.right; bottom: parent.bottom }
22     }
23
24     Item { id: headerSpace; width: parent.width; height: 1}
25
26     ScrollBar {
27         scrollArea: webView;
28         width: 8
29         anchors { right: parent.right; top: parent.bottom; bottom: parent.bottom }
30     }
31
32     ScrollBar {
33         scrollArea: webView;
34         height: 8; orientation: Qt.Horizontal
35         anchors { right: parent.right; rightMargin: 8; left: parent.left; bottom: parent.bottom }
36     }
37
38     Button {
39         id: button1
40         textInButton: "+"
41         width: 20;
42         height: 20;
43         anchors.right: parent.right
44         anchors.bottom: button2.top
45         onClicked: webView.doZoom(1.05);
46     }
47
48     Button {
49         id: button2
50         textInButton: "-"
51         width: 20;
52         height: 20;
53         anchors.right: parent.right
54         anchors.bottom: parent.bottom
55         onClicked: webView.doZoom(.95);
56     }
57 }