import QtQuick 1.0
import org.hildon.components 1.0
import org.hildon.settings 1.0
Dialog {
id: dialog
title: qsTr("Settings Example")
id: settings
property int number
property string text
fileName: "/home/user/.config/QtComponentsHildon/SettingsExample.conf"
}
Column {
id: column
anchors {
left: parent.left
right: button.left
bottom: parent.bottom
}
width: parent.width
text: qsTr("Text")
}
id: textField
width: parent.width
}
id: numberButton
width: parent.width
text: qsTr("Number")
id: numberSelector
model: 10
currentIndex: settings.number
}
}
}
id: button
anchors {
right: parent.right
bottom: parent.bottom
}
text: qsTr("Done")
onClicked: dialog.accept()
}
onAccepted: {
settings.text = textField.text;
settings.number = numberSelector.currentIndex;
}
Component.onCompleted: open()
}