Subversion Repositories harbour-onvista

Rev

Rev 1 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 devnull 1
import QtQuick 2.0
2
import Sailfish.Silica 1.0
3
import QtWebKit 3.0
4
 
5
Page {
6
    id: page
7
 
8
    // The effective value will be restricted by ApplicationWindow.allowedOrientations
9
    allowedOrientations: Orientation.All
10
 
11
    // To enable PullDownMenu, place our content in a SilicaFlickable
12
    SilicaWebView {
13
 
14
        id: webView
15
        anchors.fill: parent
16
        quickScroll: true
17
        quickScrollAnimating: true
18
        _cookiesEnabled: true
19
        antialiasing: true
20
 
21
 
22
        VerticalScrollDecorator {}
23
 
24
        // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
25
        PullDownMenu {
2 devnull 26
            MenuItem {
27
                text: qsTr("Aktien suchen")
28
                onClicked: webView.url = "https://m.onvista.de/onvista/search"
29
            }
30
            MenuItem {
31
                text: qsTr("Project page")
32
                onClicked: webView.url = "https://wiki.siningsoft.de/doku.php?id=sailfishos:projects:onvista"
33
            }
1 devnull 34
        }
35
 
36
        //header: navarea
37
        anchors {
38
                     top: parent.top
39
                     left: parent.left
40
                     right: parent.right
41
                     bottom: navarea.top
42
                 }
43
        url: "https://m.onvista.de"
44
 
45
        }
46
 
47
    Rectangle {
48
        id: navarea
49
        height: Theme.iconSizeLarge
50
        width: parent.width
51
        antialiasing: true
52
        color: Theme.secondaryColor
53
        opacity: 100
54
        anchors.top: webView.bottom
55
 
56
 
57
        IconButton
58
        {
59
            id: navback
60
            icon.source: "image://theme/icon-m-back?" + (pressed
61
                                                    ? Theme.highlightColor
62
                                                    : Theme.primaryColor)
63
            onClicked: webView.goBack()
64
 
65
        }
66
 
67
        IconButton
68
        {
69
            id: navhome
70
            icon.source: Qt.resolvedUrl("fallbackFavIcon.png")
71
            anchors.left: navback.right
72
            // wie kommen wir zurück auf die hauptseite?
73
            onClicked: webView.loadHtml(webView.url)
74
 
75
        }
76
 
77
        IconButton
78
        {
79
            id: navforward
80
            icon.source: "image://theme/icon-m-forward?" + (pressed
81
                                                    ? Theme.highlightColor
82
                                                    : Theme.primaryColor)
83
 
84
            anchors.left: navhome.right
85
            onClicked: webView.goForward()
86
 
87
        }
88
 
89
        Label
90
        {
91
             id: navlabel
92
             text: webView.title
93
             anchors.left: navforward.right
94
 
95
        }
96
 
97
 
98
     }
99
}