SDK: Application Settings

Registered by Cris Dywan

Apps need to store user settings (preferences) as do games, and they need a way to sync them.

Blueprint information

Status:
Started
Approver:
Zoltan Balogh
Priority:
High
Drafter:
Cris Dywan
Direction:
Needs approval
Assignee:
Cris Dywan
Definition:
Drafting
Series goal:
None
Implementation:
Slow progress
Milestone target:
milestone icon april-2014
Started by
Cris Dywan

Whiteboard

Rationale:
Qt5 upstream says QSettings it's dead
Jolla won't share their plans
QConfig is not ready http://www.qtdeveloperdays.com/northamerica/2013/qconfig-transitioning-qsettings-modern-config-system-qt

Requirements:
declarative QML
Arbitrary key/value pairs
Sync (optional)

Features:
"do the right thing" relating it to the existing app name/ id/ folder
Free-form group names
U1Db backend - sync
Easily bind actions to settings?
Allow defining settings and groups in separate files

Concerns:
Non-portable API

Resources:
API doc https://docs.google.com/a/canonical.com/document/d/1ZC4whqRT1Hf1xg7czvElUWSJ6JzkKMdWamt56Vhl1eU/edit
http://qt-project.org/doc/qt-5.1/qtcore/qsettings.html
Labs: http://qt-project.org/doc/qt-5/qml-qt-labs-settings-settings.html
spec app-data-folders

Mock examples of what it might look like:

// Use objects to define keys
Settings {
    group "sound"
    bool sync: true
        Option {
            name: "vibrate"
            default: false

// Use properties to define keys
Settings {
    group "tabletOnly"
    property bool led: false

(?)

Work Items

Work items for ubuntu-13.10:
[kalikiana] Design and implement settings API: TODO
[kalikiana] Store settings in U1Db-Qt and support sync: TODO
[kalikiana] Allow binding properties to UI components: TODO

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.