Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Thomas Tanghus
rg] on behalf of Thomas Tanghus > [tho...@tanghus.net] Sent: Friday, November 15, 2013 4:24 PM > To: Sailfish OS Developers > Subject: Re: [SailfishDevel] Saving state/config > > On Friday 15 November 2013 05:44 Jonni Rainisto wrote: > > import org.nemomobile.configuration 1.0 &g

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Artem Marchenko
Thanks a lot, Jonni! Discussion went further already, but I am just fascinated you guys have got such a plugin ready! I used to implement GConf modification on my own or create a Settings wrapper for the LocalStorage and now there's a ready made plugin for GConf - great! Best regards, Artem. O

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Thomas Tanghus
Ah OK. I had missed that. It would also have been almost too easy ;) Thanks a lot for your thorough help On Friday 15 November 2013 23:39 Andrey Kozhevnikov wrote: > unfortunately you cant use QSettings class this way. It have no public > slots to be used from QML side. You need to write some Qml

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Andrey Kozhevnikov
unfortunately you cant use QSettings class this way. It have no public slots to be used from QML side. You need to write some QmlSettings class wrapper for QSettings: class QmlSettings: publicQObject ... public slots: QVariant value(const QString &key); void setValue(const QString &key, con

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Thomas Tanghus
On Friday 15 November 2013 20:50 Andrey Kozhevnikov wrote: > both are easy. check Qt Assistant. examples and api reference are inside > your Qt Creator ;) Forgive me for non-SailfishOS questions, but I must be doing something wrong, even if it's easy ;) My main is now: int main(int argc, char *

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Thomas Tanghus
I'm also just learning to use Qt Creator. Used to a simple text editor ;) On Friday 15 November 2013 20:50 Andrey Kozhevnikov wrote: > both are easy. check Qt Assistant. examples and api reference are inside > your Qt Creator ;) > > On 15.11.2013 20:48, Thomas Tanghus wrote: > > On Friday 15 Nove

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Andrey Kozhevnikov
Sure. but you can make own classes for bth QSettings and GConfItem ;) On 15.11.2013 21:00, Marcin M. wrote: The plugin uses gconf, doesn't it? Can we use it to modify any gconf entry then? -- Marcin 2013/11/15 Andrey Kozhevnikov > both are easy. check Qt A

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Marcin M.
The plugin uses gconf, doesn't it? Can we use it to modify any gconf entry then? -- Marcin 2013/11/15 Andrey Kozhevnikov > both are easy. check Qt Assistant. examples and api reference are inside > your Qt Creator ;) > > > On 15.11.2013 20:48, Thomas Tanghus wrote: > >> On Friday 15 November 2

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Andrey Kozhevnikov
both are easy. check Qt Assistant. examples and api reference are inside your Qt Creator ;) On 15.11.2013 20:48, Thomas Tanghus wrote: On Friday 15 November 2013 20:26 Andrey Kozhevnikov wrote: use QSettings as Jonni said and register own component to use in qml, if need, or export single clas

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Thomas Tanghus
On Friday 15 November 2013 20:26 Andrey Kozhevnikov wrote: > use QSettings as Jonni said and register own component to use in qml, if > need, or export single class instance via setContextProperty The latter sounds like the easiest approach. Thanks both for your good advice. > On 15.11.2013 20:2

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Thomas Tanghus
On Friday 15 November 2013 14:21 Jonni Rainisto wrote: > Yes its as simple as assign a new value and it will be automaticly stored. > > your_foo_setting.value = newValue Ah, even more simple - I like that ;) > But having said that, I'm not sure what is the store's current intake QA > rules, it m

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Jonni Rainisto
] Sent: Friday, November 15, 2013 4:24 PM To: Sailfish OS Developers Subject: Re: [SailfishDevel] Saving state/config On Friday 15 November 2013 05:44 Jonni Rainisto wrote: > import org.nemomobile.configuration 1.0 My n00bness shows again :P Will I have to add this module to my project? The Sailfis

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Andrey Kozhevnikov
use QSettings as Jonni said and register own component to use in qml, if need, or export single class instance via setContextProperty On 15.11.2013 20:24, Thomas Tanghus wrote: On Friday 15 November 2013 05:44 Jonni Rainisto wrote: import org.nemomobile.configuration 1.0 My n00bness shows aga

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Thomas Tanghus
On Friday 15 November 2013 05:44 Jonni Rainisto wrote: > import org.nemomobile.configuration 1.0 My n00bness shows again :P Will I have to add this module to my project? The SailfishOS-i486-x86 target only comes with org.nemomobile.ngf -- Med venlig hilsen / Best Regards Thomas Tanghus ___

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Jonni Rainisto
r 15, 2013 4:13 PM To: Sailfish OS Developers Subject: Re: [SailfishDevel] Saving state/config On Friday 15 November 2013 05:44 Jonni Rainisto wrote: > Hi, > > Normal usage of QSettings which saves under /home/nemo/.config/app would be > just fine for C++. If you just want to save fe

Re: [SailfishDevel] Saving state/config

2013-11-15 Thread Thomas Tanghus
On Friday 15 November 2013 05:44 Jonni Rainisto wrote: > Hi, > > Normal usage of QSettings which saves under /home/nemo/.config/app would be > just fine for C++. If you just want to save few config values in QML, then > you might want to use GConf by importing nemo-qml-plugin-configuration > modul

Re: [SailfishDevel] Saving state/config

2013-11-14 Thread Jonni Rainisto
Hi, Normal usage of QSettings which saves under /home/nemo/.config/app would be just fine for C++. If you just want to save few config values in QML, then you might want to use GConf by importing nemo-qml-plugin-configuration module (https://github.com/nemomobile/nemo-qml-plugin-configuration)