FirstPage.qml 2.6 KB

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