FirstPage.qml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. width: parent.width
  12. quickScroll: true
  13. quickScrollAnimating: true
  14. _cookiesEnabled: true
  15. antialiasing: true
  16. pixelAligned: true
  17. VerticalScrollDecorator {}
  18. // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
  19. PullDownMenu {
  20. MenuItem {
  21. text: qsTr("Project page")
  22. onClicked: webView.url = "https://wiki.siningsoft.de/doku.php?id=sailfishos:projects:golem"
  23. }
  24. }
  25. //header: navarea
  26. anchors {
  27. fill: parent
  28. top: parent.top
  29. left: parent.left
  30. right: parent.right
  31. bottom: navarea.top
  32. }
  33. url: "https://www.golem.de/&[view]=mobile"
  34. }
  35. Rectangle {
  36. id: navarea
  37. height: Theme.iconSizeLarge
  38. width: parent.width
  39. antialiasing: true
  40. color: Theme.secondaryColor
  41. opacity: 100
  42. anchors {
  43. top: webView.bottom
  44. }
  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. }