SettingsPage.qml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. // import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
  2. import QtQuick 1.1
  3. import "main.js" as Engine
  4. MyPage {
  5. id: settingsPage
  6. Component {
  7. id: cmpSounds
  8. Column {
  9. spacing: 10
  10. width: flickArea.width
  11. /*-------------------------------------------------*/
  12. Text {
  13. text: qsTr("Message received")
  14. font.pixelSize: 20
  15. font.bold: true
  16. anchors.horizontalCenter: parent.horizontalCenter
  17. }
  18. Item {
  19. id: itemIncommingMsg
  20. width: parent.width
  21. height: 64
  22. Text {
  23. id: textIncommingMsg
  24. anchors.left: parent.left
  25. anchors.leftMargin: 10
  26. anchors.verticalCenter: parent.verticalCenter
  27. anchors.right: btnFileIncommingMsg.left
  28. anchors.rightMargin: 10
  29. text: settings.soundIncomingMessage == "" ? "Empty" : Engine.baseName( settings.soundIncomingMessage )
  30. color: settings.soundIncomingMessage == "" ? "gray" : "black"
  31. //font.italic: settings.soundIncomingMessage == "" ? true : false
  32. font.italic: true
  33. font.pixelSize: 22
  34. clip: true
  35. MouseArea {
  36. anchors.fill: parent
  37. onClicked: {
  38. notify.notifyMessageRecv()
  39. }
  40. onPressedChanged: {
  41. if( pressed ) {
  42. textIncommingMsg.font.bold = true
  43. } else {
  44. textIncommingMsg.font.bold = false
  45. }
  46. }
  47. } //MouseArea
  48. }
  49. Button {
  50. id: btnFileIncommingMsg
  51. text: "..."
  52. anchors.verticalCenter: parent.verticalCenter
  53. anchors.right: btnClearIncommingMsg.left
  54. anchors.rightMargin: 10
  55. height: parent.height - 4
  56. width: 72
  57. onClicked: {
  58. //chooseFilesSoundInMsg.dlgShowHide()
  59. var p = Engine.basePath( settings.soundIncomingMessage )
  60. //console.log( "presetPath:" + p )
  61. Engine.dlgFilesChoose( settingsPage, p, funcFileSoundInMsg )
  62. }
  63. }
  64. ToolButton {
  65. id: btnClearIncommingMsg
  66. anchors.right: parent.right
  67. anchors.rightMargin: 10
  68. icon: "qrc:/qml/images/bar_close.png"
  69. onClicked: {
  70. settings.soundIncomingMessage = ""
  71. }
  72. pauseAnim: 1
  73. }
  74. } // Item{ id: itemIncommingMsg ... }
  75. /*-------------------------------------------------------------------*/
  76. Text {
  77. text: qsTr("Message sent")
  78. font.pixelSize: 20
  79. font.bold: true
  80. anchors.horizontalCenter: parent.horizontalCenter
  81. }
  82. Item {
  83. id: itemOutcommingMsg
  84. width: parent.width
  85. height: 64
  86. Text {
  87. id: textOutcommingMsg
  88. anchors.left: parent.left
  89. anchors.leftMargin: 10
  90. anchors.verticalCenter: parent.verticalCenter
  91. anchors.right: btnFileOutcommingMsg.left
  92. anchors.rightMargin: 10
  93. text: settings.soundOutcomingMessage == "" ? "Empty" : Engine.baseName( settings.soundOutcomingMessage )
  94. color: settings.soundOutcomingMessage == "" ? "gray" : "black"
  95. //font.italic: settings.soundOutcomingMessage == "" ? true : false
  96. font.italic: true
  97. font.pixelSize: 22
  98. clip: true
  99. MouseArea {
  100. anchors.fill: parent
  101. onClicked: {
  102. notify.notifyMessageSent()
  103. }
  104. onPressedChanged: {
  105. if( pressed ) {
  106. textOutcommingMsg.font.bold = true
  107. } else {
  108. textOutcommingMsg.font.bold = false
  109. }
  110. }
  111. } //MouseArea
  112. }
  113. Button {
  114. id: btnFileOutcommingMsg
  115. text: "..."
  116. anchors.verticalCenter: parent.verticalCenter
  117. anchors.right: btnClearOutcommingMsg.left
  118. anchors.rightMargin: 10
  119. height: parent.height-4
  120. width: 72
  121. onClicked: {
  122. //chooseFilesSoundOutMsg.dlgShowHide()
  123. var p = Engine.basePath( settings.soundOutcomingMessage )
  124. Engine.dlgFilesChoose( settingsPage, p, funcFilesSoundOutMsg )
  125. }
  126. }
  127. ToolButton {
  128. id: btnClearOutcommingMsg
  129. anchors.right: parent.right
  130. anchors.rightMargin: 10
  131. icon: "qrc:/qml/images/bar_close.png"
  132. onClicked: {
  133. settings.soundOutcomingMessage = ""
  134. }
  135. pauseAnim: 1
  136. }
  137. } // Item{ id: itemIncommingMsg ... }
  138. /*----------------------------------------------------------------*/
  139. Text {
  140. text: qsTr("Buddy logs in")
  141. font.pixelSize: 20
  142. anchors.horizontalCenter: parent.horizontalCenter
  143. font.bold: true
  144. }
  145. Item {
  146. id: itemBuddyLogsIn
  147. width: parent.width
  148. height: 64
  149. Text {
  150. id: textBuddyLogsIn
  151. anchors.left: parent.left
  152. anchors.leftMargin: 10
  153. anchors.verticalCenter: parent.verticalCenter
  154. anchors.right: btnBuddyLogsIn.left
  155. anchors.rightMargin: 10
  156. text: settings.soundBuddyLogsIn == "" ? "Empty" : Engine.baseName( settings.soundBuddyLogsIn )
  157. color: settings.soundBuddyLogsIn == "" ? "gray" : "black"
  158. //font.italic: settings.soundBuddyLogsIn == "" ? true : false
  159. font.italic: true
  160. font.pixelSize: 22
  161. clip: true
  162. MouseArea {
  163. anchors.fill: parent
  164. onClicked: {
  165. notify.notifyBuddyLogsIn()
  166. }
  167. onPressedChanged: {
  168. if( pressed ) {
  169. textBuddyLogsIn.font.bold = true
  170. } else {
  171. textBuddyLogsIn.font.bold = false
  172. }
  173. }
  174. } //MouseArea
  175. }
  176. Button {
  177. id: btnBuddyLogsIn
  178. text: "..."
  179. anchors.verticalCenter: parent.verticalCenter
  180. anchors.right: btnClearBuddyLogsIn.left
  181. anchors.rightMargin: 10
  182. height: parent.height-4
  183. width: 72
  184. onClicked: {
  185. //chooseFilesSoundIBuddyLogsIn.dlgShowHide()
  186. var p = Engine.basePath( settings.soundBuddyLogsIn )
  187. Engine.dlgFilesChoose( settingsPage, p, funcFilesSoundIBuddyLogsIn )
  188. }
  189. }
  190. ToolButton {
  191. id: btnClearBuddyLogsIn
  192. anchors.right: parent.right
  193. anchors.rightMargin: 10
  194. icon: "qrc:/qml/images/bar_close.png"
  195. onClicked: {
  196. settings.soundBuddyLogsIn = ""
  197. }
  198. pauseAnim: 1
  199. }
  200. } // Item{ id: itemBuddyLogsIn ... }
  201. /*---------------------------------------------------------------------*/
  202. Text {
  203. text: qsTr("Buddy logs Out")
  204. font.pixelSize: 20
  205. anchors.horizontalCenter: parent.horizontalCenter
  206. font.bold: true
  207. }
  208. Item {
  209. id: itemBuddyLogsOut
  210. width: parent.width
  211. height: 64
  212. Text {
  213. id: textBuddyLogsOut
  214. anchors.left: parent.left
  215. anchors.leftMargin: 10
  216. anchors.verticalCenter: parent.verticalCenter
  217. anchors.right: btnBuddyLogsOut.left
  218. anchors.rightMargin: 10
  219. text: settings.soundBuddyLogsOut == "" ? "Empty" : Engine.baseName( settings.soundBuddyLogsOut )
  220. color: settings.soundBuddyLogsOut == "" ? "gray" : "black"
  221. //font.italic: settings.soundBuddyLogsOut == "" ? true : false
  222. font.italic: true
  223. font.pixelSize: 22
  224. clip: true
  225. MouseArea {
  226. anchors.fill: parent
  227. onClicked: {
  228. notify.notifyBuddyLogsOut()
  229. }
  230. onPressedChanged: {
  231. if( pressed ) {
  232. textBuddyLogsOut.font.bold = true
  233. } else {
  234. textBuddyLogsOut.font.bold = false
  235. }
  236. }
  237. } //MouseArea
  238. }
  239. Button {
  240. id: btnBuddyLogsOut
  241. text: "..."
  242. anchors.verticalCenter: parent.verticalCenter
  243. anchors.right: btnClearBuddyLogsOut.left
  244. anchors.rightMargin: 10
  245. height: parent.height-4
  246. width: 72
  247. onClicked: {
  248. //chooseFilesSoundIBuddyLogsOut.dlgShowHide()
  249. var p = Engine.basePath( settings.soundBuddyLogsOut )
  250. Engine.dlgFilesChoose( settingsPage, p, funcFilesSoundIBuddyLogsOut )
  251. }
  252. }
  253. ToolButton {
  254. id: btnClearBuddyLogsOut
  255. anchors.right: parent.right
  256. anchors.rightMargin: 10
  257. icon: "qrc:/qml/images/bar_close.png"
  258. onClicked: {
  259. settings.soundBuddyLogsOut = ""
  260. }
  261. pauseAnim: 1
  262. }
  263. } // Item{ id: itemBuddyLogsIn ... }
  264. /*-------------------------------------------------*/
  265. Text {
  266. text: qsTr("Someone says your name in chat")
  267. font.pixelSize: 20
  268. font.bold: true
  269. anchors.horizontalCenter: parent.horizontalCenter
  270. }
  271. Item {
  272. id: itemSaysYourName
  273. width: parent.width
  274. height: 64
  275. Text {
  276. id: textSaysYourName
  277. anchors.left: parent.left
  278. anchors.leftMargin: 10
  279. anchors.verticalCenter: parent.verticalCenter
  280. anchors.right: btnFileSaysYourName.left
  281. anchors.rightMargin: 10
  282. text: settings.soundChatSomeoneSaysMyName == "" ? "Empty" : Engine.baseName( settings.soundChatSomeoneSaysMyName )
  283. color: settings.soundChatSomeoneSaysMyName == "" ? "gray" : "black"
  284. font.italic: true
  285. font.pixelSize: 22
  286. clip: true
  287. MouseArea {
  288. anchors.fill: parent
  289. onClicked: {
  290. notify.notifyChatSomeoneSaysMyName()
  291. }
  292. onPressedChanged: {
  293. if( pressed ) {
  294. textSaysYourName.font.bold = true
  295. } else {
  296. textSaysYourName.font.bold = false
  297. }
  298. }
  299. } //MouseArea
  300. }
  301. Button {
  302. id: btnFileSaysYourName
  303. text: "..."
  304. anchors.verticalCenter: parent.verticalCenter
  305. anchors.right: btnClearSaysYourName.left
  306. anchors.rightMargin: 10
  307. height: parent.height - 4
  308. width: 72
  309. onClicked: {
  310. var p = Engine.basePath( settings.soundChatSomeoneSaysMyName )
  311. Engine.dlgFilesChoose( settingsPage, p, funcFileSaysYourName )
  312. }
  313. }
  314. ToolButton {
  315. id: btnClearSaysYourName
  316. anchors.right: parent.right
  317. anchors.rightMargin: 10
  318. icon: "qrc:/qml/images/bar_close.png"
  319. onClicked: {
  320. settings.soundChatSomeoneSaysMyName = ""
  321. }
  322. pauseAnim: 1
  323. }
  324. } // Item{ id: itemSaysYourName ... }
  325. /*-------------------------------------------------*/
  326. Text {
  327. text: qsTr("Others talk")
  328. font.pixelSize: 20
  329. font.bold: true
  330. anchors.horizontalCenter: parent.horizontalCenter
  331. }
  332. Item {
  333. id: itemOthersSay
  334. width: parent.width
  335. height: 64
  336. Text {
  337. id: textOthersSay
  338. anchors.left: parent.left
  339. anchors.leftMargin: 10
  340. anchors.verticalCenter: parent.verticalCenter
  341. anchors.right: btnFileOthersSay.left
  342. anchors.rightMargin: 10
  343. text: settings.soundChatOthersTalk == "" ? "Empty" : Engine.baseName( settings.soundChatOthersTalk )
  344. color: settings.soundChatOthersTalk == "" ? "gray" : "black"
  345. font.italic: true
  346. font.pixelSize: 22
  347. clip: true
  348. MouseArea {
  349. anchors.fill: parent
  350. onClicked: {
  351. notify.notifyChatOthersTalk()
  352. }
  353. onPressedChanged: {
  354. if( pressed ) {
  355. textOthersSay.font.bold = true
  356. } else {
  357. textOthersSay.font.bold = false
  358. }
  359. }
  360. } //MouseArea
  361. }
  362. Button {
  363. id: btnFileOthersSay
  364. text: "..."
  365. anchors.verticalCenter: parent.verticalCenter
  366. anchors.right: btnClearOthersSay.left
  367. anchors.rightMargin: 10
  368. height: parent.height - 4
  369. width: 72
  370. onClicked: {
  371. var p = Engine.basePath( settings.soundChatOthersTalk )
  372. Engine.dlgFilesChoose( settingsPage, p, funcFileChatOthersTalk )
  373. }
  374. }
  375. ToolButton {
  376. id: btnClearOthersSay
  377. anchors.right: parent.right
  378. anchors.rightMargin: 10
  379. icon: "qrc:/qml/images/bar_close.png"
  380. onClicked: {
  381. settings.soundChatOthersTalk = ""
  382. }
  383. pauseAnim: 1
  384. }
  385. } // Item{ id: itemOthersSay ... }
  386. } //Column
  387. }
  388. Component {
  389. id: cmpVibration
  390. Column {
  391. spacing: 10
  392. width: flickArea.width
  393. MyCheckBox {
  394. id: vibrMsgRecv
  395. text: qsTr("Message received")
  396. font.pixelSize: 24
  397. checked: settings.vibrationMessageReceived
  398. onCheckedChanged: {
  399. settings.vibrationMessageReceived = checked
  400. }
  401. }
  402. MyCheckBox {
  403. id: vibrMesgSent
  404. text: qsTr("Message sent")
  405. font.pixelSize: 24
  406. checked: settings.vibrationMessageSent
  407. onCheckedChanged: {
  408. settings.vibrationMessageSent = checked
  409. }
  410. }
  411. MyCheckBox {
  412. id: vibrChatSaysYourName
  413. text: qsTr("Someone says you name")
  414. font.pixelSize: 24
  415. checked: settings.vibrationChatSomeoneSaysMyName
  416. onCheckedChanged: {
  417. settings.vibrationChatSomeoneSaysMyName = checked
  418. }
  419. }
  420. MyCheckBox {
  421. id: vibrChatOthersTalk
  422. text: qsTr("Others talk")
  423. font.pixelSize: 24
  424. checked: settings.vibrationChatOthersTalk
  425. onCheckedChanged: {
  426. settings.vibrationChatOthersTalk = checked
  427. }
  428. }
  429. }
  430. }
  431. Component {
  432. id: cmpNotification
  433. Column {
  434. spacing: 10
  435. width: flickArea.width
  436. MyCheckBox {
  437. id: notifyConnecting
  438. text: qsTr("Connecting")
  439. font.pixelSize: 24
  440. checked: settings.notifyConnection
  441. onCheckedChanged: {
  442. settings.notifyConnection = checked
  443. }
  444. }
  445. MyCheckBox {
  446. id: notifyOnlibe
  447. text: qsTr("Online")
  448. font.pixelSize: 24
  449. checked: settings.notifyOnline
  450. onCheckedChanged: {
  451. settings.notifyOnline = checked
  452. }
  453. }
  454. MyCheckBox {
  455. id: notifyOffline
  456. text: qsTr("Offline")
  457. font.pixelSize: 24
  458. checked: settings.notifyOffline
  459. onCheckedChanged: {
  460. settings.notifyOffline = checked
  461. }
  462. }
  463. MyCheckBox {
  464. id: notifyMsgReceived
  465. text: qsTr("Message received")
  466. font.pixelSize: 24
  467. checked: settings.notifyMessage
  468. onCheckedChanged: {
  469. settings.notifyMessage = checked
  470. }
  471. }
  472. MyCheckBox {
  473. id: notifyBoxTyping
  474. text: qsTr("Typing")
  475. font.pixelSize: 24
  476. checked: settings.notifyTyping
  477. onCheckedChanged: {
  478. settings.notifyTyping = checked
  479. }
  480. }
  481. }
  482. }
  483. Component {
  484. id: cmpConnection
  485. Column {
  486. spacing: 10
  487. width: flickArea.width
  488. MyCheckBox {
  489. id: cbNeedReconnect
  490. text: qsTr("Reconnect when error")
  491. font.pixelSize: 24
  492. checked: settings.reconnectWhenError === true ? true : false
  493. onCheckedChanged: {
  494. console.log("Reconnect when error: checked="+checked)
  495. xmppClient.reconnectOnError = checked
  496. settings.reconnectWhenError = checked
  497. }
  498. }
  499. Text {
  500. text: qsTr("Keep alive interval (secs)")
  501. font.pixelSize: 20
  502. anchors.horizontalCenter: parent.horizontalCenter
  503. font.bold: true
  504. }
  505. MyTextInput {
  506. id: tiKeepAlive
  507. anchors.horizontalCenter: parent.horizontalCenter
  508. height: 50
  509. width: parent.width - 20
  510. Component.onCompleted: {
  511. tiKeepAlive.text = settings.keepAliveInterval
  512. }
  513. onTextChanged: {
  514. var interval = parseInt(tiKeepAlive.text)
  515. xmppClient.keepAlive = interval
  516. settings.keepAliveInterval = interval
  517. }
  518. }
  519. Item {
  520. id: space
  521. anchors.horizontalCenter: parent.horizontalCenter
  522. width: parent.width
  523. height: 50
  524. }
  525. }
  526. }
  527. Component {
  528. id: cmpSmilesTheme
  529. Column {
  530. spacing: 10
  531. width: flickArea.width
  532. Text {
  533. id: textCurrentTheme
  534. font.pixelSize: 24
  535. anchors.horizontalCenter: parent.horizontalCenter
  536. }
  537. ListView {
  538. id: listModelThemeSmiles
  539. delegate: delegateThemeSmiles
  540. model: mainSmiles.themeSmiles
  541. height: 400
  542. width: parent.width
  543. clip: true
  544. }
  545. }
  546. }
  547. Component {
  548. id: delegateThemeSmiles
  549. Rectangle {
  550. id: wrapper
  551. width: listModelThemeSmiles.width-4
  552. height: 70
  553. border.color: "gray"
  554. anchors.horizontalCenter: parent.horizontalCenter
  555. Image {
  556. id: imgTheme
  557. anchors.verticalCenter: parent.verticalCenter
  558. anchors.left: parent.left
  559. anchors.leftMargin: 15
  560. smooth: true
  561. height: 58; width: height
  562. source:smileThemePicture
  563. }
  564. Text {
  565. id: textName
  566. font.pixelSize: 28
  567. anchors.left: imgTheme.right
  568. anchors.leftMargin: 15
  569. anchors.top: parent.top
  570. anchors.topMargin: 5
  571. text: smileThemeName
  572. }
  573. Text {
  574. id: textAuthor
  575. font.pixelSize: 16
  576. color: "gray"
  577. anchors.left: imgTheme.right
  578. anchors.leftMargin: 15
  579. anchors.top: textName.bottom
  580. anchors.topMargin: 5
  581. text: qsTr("Author") + ": " + smileThemeAuthor
  582. }
  583. MouseArea {
  584. id: mouseAreaItem;
  585. anchors.fill: parent
  586. onClicked:
  587. {
  588. wrapper.ListView.view.currentIndex = index
  589. settings.smilesTheme = smileThemeFile
  590. mainSmiles.file = smileThemeFile
  591. textCurrentTheme.text = qsTr("Current theme is") + " <b>'" + smileThemeName + "'</b>"
  592. }
  593. }
  594. Component.onCompleted: {
  595. console.log("mainSmiles.file="+mainSmiles.file)
  596. console.log("index="+index)
  597. if (settings.smilesTheme == smileThemeFile) {
  598. textCurrentTheme.text = qsTr("Current theme is") + " <b>'" + smileThemeName + "'</b>"
  599. }
  600. }
  601. states: State {
  602. name: "Current"
  603. when: (wrapper.ListView.isCurrentItem && (mainSmiles.file = smileThemeFile) )
  604. PropertyChanges { target: wrapper; color: "lightblue" }
  605. }
  606. //color: (settings.smilesTheme == smileThemeFile) ? "lightblue" : "white"
  607. }
  608. }
  609. Flickable {
  610. id: flickArea
  611. anchors.top: parent.top; anchors.topMargin: 5
  612. anchors.bottom: toolBar.top; anchors.bottomMargin: 5
  613. anchors.left: parent.left; anchors.leftMargin: 10
  614. anchors.right: parent.right; anchors.rightMargin: 10
  615. contentHeight: columnContent.height
  616. contentWidth: columnContent.width
  617. flickableDirection: Flickable.VerticalFlick
  618. Column {
  619. id: columnContent
  620. width: settingsPage.width - flickArea.anchors.rightMargin - flickArea.anchors.leftMargin
  621. spacing: 5
  622. HiddenBlock {
  623. id: soundNotify
  624. state: "open"
  625. contentBlock: cmpSounds
  626. title: qsTr("Sounds")
  627. }
  628. HiddenBlock {
  629. id: vibrNotify
  630. state: "close"
  631. contentBlock: cmpVibration
  632. title: qsTr("Vibration")
  633. }
  634. HiddenBlock {
  635. id: optNotify
  636. state: "close"
  637. contentBlock: cmpNotification
  638. title: qsTr("Notification")
  639. }
  640. HiddenBlock {
  641. id: optConnection
  642. state: "close"
  643. contentBlock: cmpConnection
  644. title: qsTr("Connection")
  645. }
  646. HiddenBlock {
  647. id: optThemeSmiles
  648. state: "close"
  649. contentBlock: cmpSmilesTheme
  650. title: qsTr("Smiles")
  651. }
  652. }
  653. }
  654. /****************************************************/
  655. function funcFileSoundInMsg( fileSelected ) {
  656. settings.soundIncomingMessage = fileSelected
  657. }
  658. function funcFilesSoundOutMsg( fileSelected ) {
  659. settings.soundOutcomingMessage = fileSelected
  660. }
  661. function funcFilesSoundIBuddyLogsIn( fileSelected ) {
  662. settings.soundBuddyLogsIn = fileSelected
  663. }
  664. function funcFilesSoundIBuddyLogsOut( fileSelected ) {
  665. settings.soundBuddyLogsOut = fileSelected
  666. }
  667. function funcFileSaysYourName( fileSelected ) {
  668. settings.soundChatSomeoneSaysMyName = fileSelected
  669. }
  670. function funcFileChatPersonEnters( fileSelected ) {
  671. settings.soundChatPersonEnters = fileSelected
  672. }
  673. function funcFileChatPersonLeaves( fileSelected ) {
  674. settings.soundChatPersonLeaves = fileSelected
  675. }
  676. function funcFileChatITalk( fileSelected ) {
  677. settings.soundChatChatITalk = fileSelected
  678. }
  679. function funcFileChatOthersTalk( fileSelected ) {
  680. settings.soundChatOthersTalk = fileSelected
  681. }
  682. /****************************************************/
  683. ToolBar {
  684. id: toolBar
  685. ToolButton {
  686. id: toolBarButtonDialog
  687. icon: "qrc:/qml/images/bar_roster.png"
  688. anchors.left: parent.left
  689. anchors.leftMargin: 30
  690. onClicked: {
  691. settingsPage.closePage( "qrc:/qml/RosterPage.qml" )
  692. }
  693. pauseAnim: 500
  694. }
  695. } //ToolBar
  696. } //MyPage