Subversion Repositories harbour-onvista

Rev

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

import QtQuick 2.0
import Sailfish.Silica 1.0
import QtWebKit 3.0

Page {
    id: page

    // The effective value will be restricted by ApplicationWindow.allowedOrientations
    allowedOrientations: Orientation.All

    // To enable PullDownMenu, place our content in a SilicaFlickable
    SilicaWebView {

        id: webView
        anchors.fill: parent
        quickScroll: true
        quickScrollAnimating: true
        _cookiesEnabled: true
        antialiasing: true


        VerticalScrollDecorator {}

        // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
        PullDownMenu {
            MenuItem {
                text: qsTr("Aktien suchen")
                onClicked: webView.url = "https://m.onvista.de/onvista/search"
            }
            MenuItem {
                text: qsTr("Project page")
                onClicked: webView.url = "https://wiki.siningsoft.de/doku.php?id=sailfishos:projects:onvista"
            }
        }

        //header: navarea
        anchors {
                     top: parent.top
                     left: parent.left
                     right: parent.right
                     bottom: navarea.top
                 }
        url: "https://m.onvista.de"

        }

    Rectangle {
        id: navarea
        height: Theme.iconSizeLarge
        width: parent.width
        antialiasing: true
        color: Theme.secondaryColor
        opacity: 100
        anchors.top: webView.bottom


        IconButton
        {
            id: navback
            icon.source: "image://theme/icon-m-back?" + (pressed
                                                    ? Theme.highlightColor
                                                    : Theme.primaryColor)
            onClicked: webView.goBack()

        }

        IconButton
        {
            id: navhome
            icon.source: Qt.resolvedUrl("fallbackFavIcon.png")
            anchors.left: navback.right
            // wie kommen wir zurück auf die hauptseite?
            onClicked: webView.loadHtml(webView.url)

        }

        IconButton
        {
            id: navforward
            icon.source: "image://theme/icon-m-forward?" + (pressed
                                                    ? Theme.highlightColor
                                                    : Theme.primaryColor)

            anchors.left: navhome.right
            onClicked: webView.goForward()

        }

        Label
        {
             id: navlabel
             text: webView.title
             anchors.left: navforward.right

        }


     }
}