main.qml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. import QtQuick 1.1
  2. import com.nokia.meego 1.0
  3. PageStackWindow {
  4. id: appWindow
  5. initialPage: mainPage
  6. MainPage{id: mainPage}
  7. ToolBarLayout {
  8. id: commonTools
  9. visible: true
  10. ToolIcon { platformIconId: "toolbar-view-menu";
  11. anchors.right: parent===undefined ? undefined : parent.right
  12. onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close()
  13. }
  14. }
  15. Page{
  16. id: aboutPage
  17. Rectangle {
  18. id: aboutWindow
  19. color: "#0080e6"
  20. gradient: Gradient {
  21. GradientStop {
  22. position: 0.00;
  23. color: "#048ef7";
  24. }
  25. GradientStop {
  26. position: 0.26;
  27. color: "#dbdbdb";
  28. }
  29. GradientStop {
  30. position: 0.62;
  31. color: "#ffffff";
  32. }
  33. GradientStop {
  34. position: 1.00;
  35. color: "#c0c0c0";
  36. }
  37. }
  38. anchors.left: parent.left
  39. anchors.leftMargin: 0
  40. anchors.top: parent.top
  41. width: aboutPage.width
  42. height: aboutPage.height
  43. Row {
  44. id: aboutMainRow
  45. height: 70
  46. Image {
  47. id: appLogo
  48. x: 0; y: 0
  49. width: 64; height: 64
  50. source: "qrc:/appLogoWithoutBG"
  51. MouseArea {
  52. anchors.fill: parent
  53. onClicked: Qt.openUrlExternally("http://dadablog.net/HarmattanApps")
  54. }
  55. }
  56. Rectangle {
  57. Text {
  58. id: txtAppName
  59. x: 80; y: 0
  60. text: qsTr("IMQuery v1.0.3")
  61. color: "#000080"
  62. font { family: "Helvetica"; pixelSize: 24; bold: true; }
  63. MouseArea {
  64. anchors.fill: parent
  65. onClicked: Qt.openUrlExternally("http://dadablog.net/HarmattanApps")
  66. }
  67. }
  68. Text {
  69. id: txtAppURL
  70. x: 80; y: 40
  71. text: "DaDaBlog.net/HarmattanApps"
  72. color: "#000080"
  73. font { family: "Helvetica"; pixelSize: 24; bold: true; }
  74. MouseArea {
  75. anchors.fill: parent
  76. onClicked: Qt.openUrlExternally("http://dadablog.net/HarmattanApps")
  77. }
  78. }
  79. }
  80. }
  81. Flickable {
  82. id: flickAbout
  83. anchors.left: parent.left
  84. anchors.leftMargin: 0
  85. anchors.top: aboutMainRow.bottom; anchors.topMargin: 40
  86. contentHeight: aboutPage.height
  87. width: aboutPage.width
  88. height: aboutPage.height
  89. clip: true
  90. flickableDirection: Flickable.VerticalFlick
  91. boundsBehavior: Flickable.DragOverBounds
  92. Text {
  93. id: txtAppDesc
  94. width: aboutPage.width - 10
  95. height: aboutPage.height - 144
  96. text: qsTr("IMQuery is an application that guides you how to type a particular Chinese character in some popular input methods.\n\n" +
  97. "This application makes use of input method tables from the SCIM, GCIN, IBus and VimIM open source projects; " +
  98. "and radical information from the zdic.net website.\n\n" +
  99. "Notice: Information provided in this application is for reference purpose only; its accuracy is not guaranteed.\n\n"
  100. )
  101. font { family: "Helvetica"; pixelSize: 22}
  102. wrapMode: Text.WordWrap;
  103. }
  104. }
  105. Rectangle {
  106. id: aboutProduct
  107. x: 0; y: aboutPage.height - 50
  108. width: aboutPage.width /2
  109. height: 50
  110. color: "#d9d9d9"
  111. Text {
  112. text: qsTr("About this app")
  113. font { family: "Helvetica"; pixelSize: 20; bold: true }
  114. anchors.fill: parent
  115. horizontalAlignment: Text.AlignHCenter
  116. }
  117. MouseArea {
  118. anchors.fill: parent
  119. onClicked: aboutProductDialog.open()
  120. }
  121. QueryDialog {
  122. id: aboutProductDialog
  123. titleText: qsTr("IMQuery v1.0.3")
  124. acceptButtonText: qsTr("OK")
  125. message: qsTr("for MeeGo 1.2 Harmattan\n(C)Amanda Lam, 2011 All rights reserved.")
  126. }
  127. }
  128. Rectangle {
  129. id: btnBack
  130. width: aboutPage.width / 2
  131. height: 50
  132. color: "#b6e4fa"
  133. x: aboutPage.width / 2; y: aboutPage.height - 50
  134. Text {
  135. text: qsTr("< Back")
  136. anchors.fill: parent
  137. horizontalAlignment: Text.AlignHCenter
  138. font { family: "Helvetica"; pixelSize: 20; bold: true; }
  139. }
  140. MouseArea {
  141. anchors.fill: parent
  142. onClicked: appWindow.pageStack.pop()
  143. }
  144. }
  145. }
  146. }
  147. Menu {
  148. id: myMenu
  149. visualParent: pageStack
  150. MenuLayout {
  151. MenuItem {
  152. text: qsTr("Sponsor")
  153. onClicked: Qt.openUrlExternally(qsTr("http://dadablog.net/maemo/donation.html"))
  154. }
  155. MenuItem {
  156. text: qsTr("About this app")
  157. onClicked: appWindow.pageStack.push(aboutPage)
  158. }
  159. MenuItem {
  160. text: qsTr("Exit")
  161. onClicked: Qt.quit()
  162. }
  163. }
  164. }
  165. }