SaunaView.qml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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 "javascript/sauna.js" as SaunaEngine
  50. import "javascript/sql.js" as HCS
  51. import "../colibri/javascripts/functions.js" as Functions
  52. import "../colibri"
  53. import "styles"
  54. Item {
  55. id: structure
  56. property CLStyle style: StyleHomeControlSystem {}
  57. signal closeWindow()
  58. width: 640
  59. height: 424
  60. CLTab {
  61. id: saunaCLTab
  62. style: structure.style
  63. width: structure.width
  64. height: structure.height
  65. tabHeight: structure.width*0.08
  66. contentColor: "transparent"
  67. borderColor: "transparent"
  68. tabColorWhenSelected:style.selectionColor
  69. tabColor:style.colorWhenDefault
  70. borderWidth: 1.5
  71. headerMarginSides: structure.width*0.01
  72. Item {
  73. property string title : "Basic"
  74. anchors.fill: parent
  75. SaunaBasic{
  76. style: structure.style
  77. id: saunaBasic
  78. x: - structure.width*0.02;
  79. width: structure.width + structure.width*0.04;
  80. height: structure.height-saunaCLTab.tabHeight+structure.height*0.08;
  81. anchors.verticalCenter: parent.verticalCenter;
  82. anchors.horizontalCenter: parent.horizontalCenter
  83. }
  84. Behavior on opacity {
  85. SmoothedAnimation{velocity: 1}
  86. }
  87. }
  88. Item {
  89. property string title : "Timer"
  90. anchors.fill: parent
  91. opacity: 0;
  92. SaunaTimer{
  93. style: structure.style
  94. x: - structure.width*0.02;
  95. width: structure.width + structure.width*0.04;
  96. height: structure.height-saunaCLTab.tabHeight+structure.height*0.08;
  97. anchors.verticalCenter: parent.verticalCenter;
  98. anchors.horizontalCenter: parent.horizontalCenter
  99. onSaunaTimed: {
  100. saunaBasic.startSaunaWithParemeters(temperature,length);
  101. }
  102. }
  103. Behavior on opacity {
  104. SmoothedAnimation{velocity: 1}
  105. }
  106. }
  107. }
  108. RoomExitButton {
  109. windowWidth: structure.width
  110. windowHeight: structure.height
  111. style: structure.style
  112. onClicked: structure.closeWindow();
  113. }
  114. }