1 // import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
3 import com.nokia.meego 1.0
4 import "settingsstorage.js" as SettingsStorage
11 acceptButtonText: "Save"
12 rejectButtonText: "Cancel"
14 function loadBindings(){
15 console.log("Loading stored key bindings.")
16 fieldA.text = SettingsStorage.getSetting("A")
17 fieldB.text = SettingsStorage.getSetting("B")
18 fieldC.text = SettingsStorage.getSetting("C")
19 fieldD.text = SettingsStorage.getSetting("D")
21 fieldUp.text = SettingsStorage.getSetting("Up")
22 fieldDown.text = SettingsStorage.getSetting("Down")
23 fieldLeft.text = SettingsStorage.getSetting("Left")
24 fieldRight.text = SettingsStorage.getSetting("Right")
27 function saveBindings(){
28 console.log("Saving new key bindings.")
29 SettingsStorage.setSetting("A", fieldA.text)
30 SettingsStorage.setSetting("B", fieldB.text)
31 SettingsStorage.setSetting("C", fieldC.text)
32 SettingsStorage.setSetting("D", fieldD.text)
34 SettingsStorage.setSetting("Up", fieldUp.text)
35 SettingsStorage.setSetting("Down", fieldDown.text)
36 SettingsStorage.setSetting("Left", fieldLeft.text)
37 SettingsStorage.setSetting("Right", fieldRight.text)
40 onAccepted: saveBindings()
43 if(status === DialogStatus.Opening){
51 contentHeight: contentGrid.height
56 anchors{top: parent.top}