MainPage.qml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. import QtQuick 1.1
  2. import com.nokia.symbian 1.1
  3. import QtWebKit 1.0
  4. Page {
  5. id: mainPage
  6. function disable(){
  7. info_date.visible = false;
  8. sms.visible = false;
  9. sms_hors.visible = false;
  10. data.visible = false;
  11. data_hors.visible = false;
  12. voix_conso.visible = false;
  13. voix_hors.visible = false;
  14. }
  15. // tools: ToolBarLayout {
  16. // ToolButton {
  17. // iconSource: "toolbar-back"
  18. // onClicked: Qt.quit();
  19. // }
  20. // ButtonRow{
  21. // checkedButton: local
  22. // Button{
  23. // id: local
  24. // text : "France"
  25. // onClicked: flipable.flipped = !flipable.flipped
  26. // }
  27. // Button{
  28. // id: internatinal
  29. // text: "Etranger"
  30. // onClicked: flipable.flipped = !flipable.flipped
  31. // }
  32. // }
  33. // }
  34. Button{
  35. id: button
  36. x: 68
  37. y: 520
  38. width: 224
  39. height: 42
  40. anchors.horizontalCenterOffset: 0
  41. anchors.verticalCenterOffset: 221
  42. anchors.horizontalCenter: parent.horizontalCenter
  43. anchors.verticalCenter: parent.verticalCenter
  44. onClicked:
  45. {
  46. m_downData.split_data(web_view1.html);
  47. titulaire.text = m_downData.getProprietaire();
  48. info_date.text = m_downData.getLigneDetail();
  49. voix_conso.text = "Vous avez consommer : " + m_downData.getVoixConso();
  50. voix_hors.text = m_downData.getVoixHors();
  51. voix_int.text = "Voix International : " + m_downData.getVoixInt();
  52. sms.text = "Nombre SMS utiliser : " + m_downData.getSms();
  53. sms_hors.text = "Nombre SMS HorsForfait " + m_downData.getSmsHors();
  54. mms.text = "Nombre MMS utiliser : " + m_downData.getMMS();
  55. mms_hors.text = "Nombre MMS HorsForfait : " + m_downData.getMMSHors();
  56. data.text = "Data Utiliser : " + m_downData.getData();
  57. data_hors.text = "Data HorsForfait : " + m_downData.getDataHors();
  58. }
  59. }
  60. WebView {
  61. id: web_view1
  62. height: 10
  63. width: 10
  64. visible: false
  65. url: "free.html"
  66. }
  67. Flipable {
  68. id: flipable
  69. property bool flipped: false
  70. anchors.bottomMargin: 150
  71. anchors.fill: parent
  72. /********************* FRANCE ************************/
  73. front:
  74. Text {
  75. id: titulaire
  76. color: "#ffffff"
  77. text: qsTr("Titulaire de la ligne")
  78. anchors.horizontalCenter: parent.horizontalCenter
  79. font.pointSize: 10
  80. anchors.top: parent.top
  81. anchors.topMargin: 20
  82. Text {
  83. id: info_date
  84. color: "#ffffff"
  85. text: qsTr("Info Date")
  86. anchors.left: parent.left
  87. anchors.leftMargin: -50
  88. font.pointSize: 8
  89. anchors.top: titulaire.bottom
  90. anchors.topMargin: 20
  91. }
  92. Text {
  93. id: voix_conso
  94. width: 50
  95. color: "#ffffff"
  96. text: "Voix conso"
  97. anchors.left: parent.left
  98. anchors.leftMargin: -50
  99. font.pointSize: 8
  100. anchors.top: info_date.bottom
  101. anchors.topMargin: 5
  102. }
  103. Text {
  104. id: voix_hors
  105. width: 29
  106. height: 17
  107. color: "#ffffff"
  108. text: "voix hors"
  109. anchors.left: parent.left
  110. anchors.leftMargin: -20
  111. anchors.top: voix_conso.bottom
  112. anchors.topMargin: 5
  113. font.pointSize: 8
  114. }
  115. Text {
  116. id: sms
  117. text: qsTr("text")
  118. color: "#ffffff"
  119. anchors.top: voix_hors.bottom
  120. anchors.topMargin: 5
  121. anchors.left: parent.left
  122. anchors.leftMargin: -50
  123. font.pointSize: 8
  124. }
  125. Text {
  126. id: sms_hors
  127. text: qsTr("text")
  128. anchors.left: parent.left
  129. anchors.leftMargin: -20
  130. color: "#ffffff"
  131. anchors.top: sms.bottom
  132. anchors.topMargin: 5
  133. font.pointSize: 8
  134. }
  135. Text {
  136. id: mms
  137. text: qsTr("text")
  138. color: "#ffffff"
  139. anchors.top: sms_hors.bottom
  140. anchors.topMargin: 5
  141. anchors.left: parent.left
  142. anchors.leftMargin: -50
  143. font.pointSize: 8
  144. }
  145. Text {
  146. id: mms_hors
  147. width: 50
  148. color: "#ffffff"
  149. anchors.top: mms.bottom
  150. anchors.topMargin: 5
  151. anchors.left: parent.left
  152. anchors.leftMargin: -20
  153. font.pointSize: 8
  154. }
  155. Text {
  156. id: data
  157. text: qsTr("text")
  158. color: "#ffffff"
  159. anchors.top: mms_hors.bottom
  160. anchors.topMargin: 5
  161. anchors.left: parent.left
  162. anchors.leftMargin: -50
  163. font.pointSize: 8
  164. }
  165. Text {
  166. id: data_hors
  167. x: 0
  168. text: qsTr("text")
  169. color: "#ffffff"
  170. anchors.top: data.bottom
  171. anchors.topMargin: 5
  172. anchors.left: parent.left
  173. anchors.leftMargin: -20
  174. font.pointSize: 8
  175. }
  176. Rectangle {
  177. id: rectangle1
  178. y: 181
  179. height: 3
  180. color: "#ffffff"
  181. anchors.verticalCenterOffset: 20
  182. anchors.right: parent.right
  183. anchors.rightMargin: -100
  184. anchors.left: parent.left
  185. anchors.leftMargin: -100
  186. anchors.verticalCenter: parent.verticalCenter
  187. }
  188. } //Fin text
  189. /******************** Etranger *****************/
  190. back:
  191. Text {
  192. id: voix_int
  193. width: 65
  194. height: 13
  195. text: qsTr("text")
  196. anchors.left: titulaire.right
  197. anchors.leftMargin: 0
  198. anchors.top: titulaire.bottom
  199. anchors.topMargin: 0
  200. font.pointSize: 8
  201. color: "#ffffff"
  202. Text {
  203. id: voix_intHors
  204. text: qsTr("Voix Int HORS")
  205. anchors.top: parent.top
  206. anchors.topMargin: 20
  207. font.pointSize: 8
  208. color: "#ffffff"
  209. }
  210. Text {
  211. id: voix_intSpec
  212. text: qsTr("Voix Int SPEC")
  213. anchors.top: voix_intHors.bottom
  214. anchors.topMargin: 5
  215. font.pointSize: 8
  216. color: "#ffffff"
  217. }
  218. Text {
  219. id: sms_int
  220. text: qsTr("SMS Int")
  221. anchors.top: voix_intSpec.bottom
  222. anchors.topMargin: 5
  223. font.pointSize: 8
  224. color: "#ffffff"
  225. }
  226. Text {
  227. id: sms_intHors
  228. text: qsTr("SMS int Hors")
  229. anchors.top: sms_int.bottom
  230. anchors.topMargin: 5
  231. font.pointSize: 8
  232. color: "#ffffff"
  233. }
  234. Text {
  235. id: mms_int
  236. text: qsTr("MMS Int")
  237. anchors.top: sms_intHors.bottom
  238. anchors.topMargin: 5
  239. font.pointSize: 8
  240. color: "#ffffff"
  241. }
  242. Text {
  243. id: mms_intHors
  244. text: qsTr("MMS Int Hors")
  245. anchors.top: mms_int.bottom
  246. anchors.topMargin: 5
  247. font.pointSize: 8
  248. color: "#ffffff"
  249. }
  250. Text {
  251. id: data_int
  252. text: qsTr("Data INT")
  253. anchors.top: mms_intHors.bottom
  254. anchors.topMargin: 5
  255. font.pointSize: 8
  256. color: "#ffffff"
  257. }
  258. Text {
  259. id: data_intHors
  260. text: qsTr("Data int HORS")
  261. anchors.top: data_int.bottom
  262. anchors.topMargin: 5
  263. font.pointSize: 8
  264. color: "#ffffff"
  265. }
  266. }
  267. transform: Rotation {
  268. id: rotation
  269. origin.x: flipable.width/2
  270. origin.y: flipable.height/2
  271. axis.x: 0; axis.y: 1; axis.z: 0 // set axis.y to 1 to rotate around y-axis
  272. angle: 0 // the default angle
  273. }
  274. states: State {
  275. name: "back"
  276. PropertyChanges { target: rotation; angle: 180 }
  277. when: flipable.flipped
  278. }
  279. transitions: Transition {
  280. NumberAnimation { target: rotation; property: "angle"; duration: 500 }
  281. }
  282. MouseArea {
  283. anchors.fill: parent
  284. onClicked: {
  285. flipable.flipped = !flipable.flipped
  286. // disable();
  287. }
  288. }
  289. }
  290. }