FirstPage.qml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. VerticalScrollDecorator {}
  17. // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
  18. PullDownMenu {
  19. MenuItem {
  20. text: qsTr("Project page")
  21. onClicked: webView.url = "https://wiki.siningsoft.de/doku.php?id=sailfishos:projects:golem"
  22. }
  23. }
  24. //header: navarea
  25. anchors {
  26. fill: parent
  27. top: parent.top
  28. left: parent.left
  29. right: parent.right
  30. bottom: navarea.top
  31. }
  32. url: "https://www.golem.de/&[view]=mobile"
  33. }
  34. Rectangle {
  35. id: navarea
  36. height: Theme.iconSizeLarge
  37. width: parent.width
  38. antialiasing: true
  39. color: Theme.secondaryColor
  40. opacity: 100
  41. anchors {
  42. top: webView.bottom
  43. }
  44. IconButton
  45. {
  46. id: navback
  47. icon.source: "image://theme/icon-m-back?" + (pressed
  48. ? Theme.highlightColor
  49. : Theme.primaryColor)
  50. onClicked: webView.goBack()
  51. }
  52. // IconButton
  53. // {
  54. // id: navhome
  55. // icon.source: Qt.resolvedUrl("fallbackFavIcon.png")
  56. // anchors.left: navback.right
  57. // // wie kommen wir zurück auf die hauptseite?
  58. // onClicked: webView.loadHtml(webView.url)
  59. // }
  60. // IconButton
  61. // {
  62. // id: navforward
  63. // icon.source: "image://theme/icon-m-forward?" + (pressed
  64. // ? Theme.highlightColor
  65. // : Theme.primaryColor)
  66. // anchors.left: navhome.right
  67. // onClicked: webView.goForward()
  68. // }
  69. // Label
  70. // {
  71. // id: navlabel
  72. // text: webView.title
  73. // anchors.left: navforward.right
  74. // }
  75. }
  76. }