ACView.qml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /**
  2. * Copyright © 2010 Digia Plc
  3. * Copyright © 2010 Nokia Corporation
  4. *
  5. * All rights reserved.
  6. *
  7. * Nokia and Nokia Connecting People are registered trademarks of
  8. * Nokia Corporation.
  9. * Java and all Java-based marks are trademarks or registered
  10. * trademarks of
  11. * Sun Microsystems, Inc. Other product and company names
  12. * mentioned herein may be
  13. * trademarks or trade names of their respective owners.
  14. *
  15. *
  16. * Subject to the conditions below, you may, without charge:
  17. *
  18. * · Use, copy, modify and/or merge copies of this software and
  19. * associated documentation files (the "Software")
  20. *
  21. * · Publish, distribute, sub-licence and/or sell new software
  22. * derived from or incorporating the Software.
  23. *
  24. *
  25. * This file, unmodified, shall be included with all copies or
  26. * substantial portions
  27. * of the Software that are distributed in source code form.
  28. *
  29. * The Software cannot constitute the primary value of any new
  30. * software derived
  31. * from or incorporating the Software.
  32. *
  33. * Any person dealing with the Software shall not misrepresent
  34. * the source of the Software.
  35. *
  36. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
  37. * KIND, EXPRESS OR IMPLIED,
  38. * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  39. * MERCHANTABILITY, FITNESS FOR A
  40. * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  41. * AUTHORS OR COPYRIGHT
  42. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  43. * WHETHER IN AN ACTION
  44. * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  45. * CONNECTION WITH THE
  46. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  47. */
  48. import Qt 4.7
  49. import QtWebKit 1.0
  50. import "../colibri"
  51. import "../colibri/gradients"
  52. import "styles"
  53. Item {
  54. id: structure
  55. property CLStyle style: StyleHomeControlSystem {}
  56. signal closeWindow()
  57. MouseArea {
  58. anchors.fill: parent;
  59. }
  60. Rectangle {
  61. width: structure.width*0.955
  62. height: structure.height*0.924
  63. color: style.selectionColor
  64. anchors.centerIn: parent
  65. radius: 7
  66. }
  67. Image {
  68. source: "images/control_bg_trans_420x275_png.png"
  69. anchors.fill: parent
  70. opacity: 0.7
  71. }
  72. RoomExitButton {
  73. windowWidth: structure.width
  74. windowHeight: structure.height
  75. style: structure.style
  76. onClicked: structure.closeWindow()
  77. }
  78. Text {
  79. text: "Air Conditioning"
  80. font.pixelSize: 1 + Math.round( 23 * (structure.height / 424) )
  81. x: Math.round( structure.width * 0.05 )
  82. y: Math.round( structure.height * 0.05 )
  83. color: structure.style.textColor
  84. font.bold: true
  85. }
  86. Rectangle {
  87. x: Math.round( structure.width * 0.05 )
  88. y: Math.round( structure.height * 0.15 )
  89. width: Math.round(572*(structure.width/640))
  90. height: Math.round(330*(structure.height/424))
  91. clip: true
  92. WebView {
  93. id: webview
  94. anchors.fill: parent
  95. url: "html/airconditioning.html"
  96. onLoadFinished: { webview.visible = true; progwindow.visible = false; }
  97. onLoadStarted: progwindow.visible = true
  98. transformOrigin: Item.TopLeft
  99. visible: false
  100. scale: 1.3
  101. smooth: true
  102. clip: true
  103. }
  104. Rectangle {
  105. id: progwindow
  106. visible: false
  107. anchors.fill: parent
  108. Column {
  109. anchors.centerIn: parent
  110. spacing: 8
  111. Text { text: "Loading..."; color: "#26566f"; font.pixelSize: 1 + Math.round( 16 * (structure.height / 424) ); anchors.horizontalCenter: parent.horizontalCenter; }
  112. CLProgressBar { id: progress; value: webview.progress; width: progwindow.width*0.5; style: structure.style }
  113. }
  114. }
  115. }
  116. }