Re: [Development] Settings API for QML

2013-08-01 Thread Thiago Macieira
On quinta-feira, 1 de agosto de 2013 07:58:41, André Somers wrote: > I do see a use for using a schema right there. Settings can be accessed > from all over the application. If you use QSettings or QConfiguration or > whatever for that directly, it means that everywhere you need a specific > val

Re: [Development] Settings API for QML

2013-07-31 Thread Thiago Macieira
On quarta-feira, 31 de julho de 2013 08:38:54, Pier Luigi wrote: > Here's my implementation which I started last year and finally managed > to move into its own repo: > > https://github.com/hawaii-desktop/qtconfiguration Thanks! > It's still primitive but it's aimed at providing persistent stora

Re: [Development] Settings API for QML

2013-06-21 Thread Andrew den Exter
On Sat, Jun 22, 2013 at 12:38 PM, Alan Alpert <4163654...@gmail.com> wrote: > On Fri, Jun 21, 2013 at 2:24 PM, Jeremy Katz > wrote: > > On 06/21/2013 09:58 AM, Hausmann Simon wrote: > >> Hi, > >> > >> I like this, but as a next step I think it would be good to get rid of > the manual JS code for

Re: [Development] Settings API for QML

2012-12-14 Thread Saether Jan-Arve
.org; Bache-Wiig Jens > Subject: Re: [Development] Settings API for QML > On Wed, Dec 12, 2012 at 2:13 AM, Mark wrote: >> On Wed, Dec 12, 2012 at 10:03 AM, Simon Hausmann >> wrote: >>> On Tuesday, December 11, 2012 04:40:50 PM Bache-Wiig Jens wrote: >>>>>> .

Re: [Development] Settings API for QML

2012-12-12 Thread Alan Alpert
On Wed, Dec 12, 2012 at 2:13 AM, Mark wrote: > On Wed, Dec 12, 2012 at 10:03 AM, Simon Hausmann > wrote: >> On Tuesday, December 11, 2012 04:40:50 PM Bache-Wiig Jens wrote: >>> >>... >> I think a dedicated syntax has two distinct advantages over a >> Qt.storedProperty alike approach: >> >> (1

Re: [Development] Settings API for QML

2012-12-12 Thread Alan Alpert
On Tue, Dec 11, 2012 at 3:25 PM, Thiago Macieira wrote: > On terça-feira, 11 de dezembro de 2012 14.51.31, Alan Alpert wrote: >> The reason why most QML APIs are developed separate from C++ >> considerations is that there's already a C++ API for that >> functionality. For new functionality QML and

Re: [Development] Settings API for QML

2012-12-12 Thread Stephen Kelly
On Tuesday, December 11, 2012 14:51:31 Alan Alpert wrote: > One thing that I started thinking about though is that we will need in > this case to have a C++ and QML API that can work with the same > settings (unlike the existing Local Storage API), so that the C++ and > QML halves of an application

Re: [Development] Settings API for QML

2012-12-12 Thread Mark
On Wed, Dec 12, 2012 at 10:03 AM, Simon Hausmann wrote: > On Tuesday, December 11, 2012 04:40:50 PM Bache-Wiig Jens wrote: >> >> I would also consider an even simpler API. How about we introduce a new >> >> keyword for persistent properties and make it part of the language. >> >> >> >> Rectangle {

Re: [Development] Settings API for QML

2012-12-12 Thread Simon Hausmann
On Tuesday, December 11, 2012 04:40:50 PM Bache-Wiig Jens wrote: > >> I would also consider an even simpler API. How about we introduce a new > >> keyword for persistent properties and make it part of the language. > >> > >> Rectangle { > >> > >> id: root > >> persistent property width: 4

Re: [Development] Settings API for QML

2012-12-12 Thread Alberto Mardegan
On 12/12/2012 01:16 AM, Thiago Macieira wrote: > On terça-feira, 11 de dezembro de 2012 15.55.52, Alan Alpert wrote: >> Would you care to sketch out what your PersistentSettings element >> would look like in practice? > > In a non QML approximant syntax: > > Rectangle { > PersistentSettings {

Re: [Development] Settings API for QML

2012-12-11 Thread Thiago Macieira
On terça-feira, 11 de dezembro de 2012 15.55.52, Alan Alpert wrote: > Would you care to sketch out what your PersistentSettings element > would look like in practice? In a non QML approximant syntax: Rectangle { PersistentSettings { id: settings property int width path("applic

Re: [Development] Settings API for QML

2012-12-11 Thread Alan Alpert
On Tue, Dec 11, 2012 at 3:30 PM, Thiago Macieira wrote: > On terça-feira, 11 de dezembro de 2012 15.10.18, Alan Alpert wrote: >> The two-way binding would be tricky. You don't have a reference to the >> property and I'd prefer this not be baked into the language. >> >> But here's another way of do

Re: [Development] Settings API for QML

2012-12-11 Thread Thiago Macieira
On terça-feira, 11 de dezembro de 2012 15.10.18, Alan Alpert wrote: > The two-way binding would be tricky. You don't have a reference to the > property and I'd prefer this not be baked into the language. > > But here's another way of doing roughly that: > Rectangle { > Persistent.property("widt

Re: [Development] Settings API for QML

2012-12-11 Thread Thiago Macieira
On terça-feira, 11 de dezembro de 2012 14.51.31, Alan Alpert wrote: > The reason why most QML APIs are developed separate from C++ > considerations is that there's already a C++ API for that > functionality. For new functionality QML and C++ APIs should be > developed side-by-side where possible. E

Re: [Development] Settings API for QML

2012-12-11 Thread Alan Alpert
On Tue, Dec 11, 2012 at 11:09 AM, Thiago Macieira wrote: > On terça-feira, 11 de dezembro de 2012 16.40.50, Bache-Wiig Jens wrote: >> Rectangle { >> property int width: Qt.storedProperty("application.width", 400) >> property int height: Qt.storedProperty("application.height", 400) >> } > >

Re: [Development] Settings API for QML

2012-12-11 Thread Alan Alpert
On Tue, Dec 11, 2012 at 5:55 AM, Shawn Rutledge wrote: > On Mon, Dec 10, 2012 at 07:51:32PM -0800, Alan Alpert wrote: >> There was a discussion a while ago about a better settings API for >> QML, http://permalink.gmane.org/gmane.comp.lib.qt.qml/3162 was the >> best link I could find, but no progre

Re: [Development] Settings API for QML

2012-12-11 Thread Alan Alpert
On Tue, Dec 11, 2012 at 6:36 AM, Stephen Kelly wrote: > On Monday, December 10, 2012 20:46:19 Thiago Macieira wrote: >> Before we do settings for QML, we need to figure out what to replace >> QSettings with. Or, better yet, we do the two at the same time: we develop >> the new C++ and QML setting

Re: [Development] Settings API for QML

2012-12-11 Thread Thiago Macieira
On terça-feira, 11 de dezembro de 2012 16.40.50, Bache-Wiig Jens wrote: > Rectangle { > property int width: Qt.storedProperty("application.width", 400) > property int height: Qt.storedProperty("application.height", 400) > } Will this bind the stored property back to the width? I.e., two-wa

Re: [Development] Settings API for QML

2012-12-11 Thread Bache-Wiig Jens
>> I would also consider an even simpler API. How about we introduce a new >> keyword for persistent properties and make it part of the language. >> >> Rectangle { >> id: root >> persistent property width: 400 >> persistent property height: 300 >> } >> >> What this means is that the

Re: [Development] Settings API for QML

2012-12-11 Thread André Somers
Op 11-12-2012 16:37, Bache-Wiig Jens schreef: >> To get the discussion going, here's my suggestion for that API: >> PersistentSettings >> { >> property bool loadOnStartup: true >> property bool saveOnExit: true >> function load() >> function save() >> } > I would also consider an ev

Re: [Development] Settings API for QML

2012-12-11 Thread Shawn Rutledge
On Tue, Dec 11, 2012 at 03:37:23PM +, Bache-Wiig Jens wrote: > I would also consider an even simpler API. How about we introduce a new > keyword for persistent properties and make it part of the language. > > Rectangle { > id: root > persistent property width: 400 > persistent pro

Re: [Development] Settings API for QML

2012-12-11 Thread Thiago Macieira
On terça-feira, 11 de dezembro de 2012 09.41.48, Mark wrote: > Perhaps it's an idea to look at KConfig for Qt inclusion? KConfig (XT) > seems nice and works rather well in KDE applications. All that's > needed then is a QML API to access the KConfig configuration. If i'm > right, KDE already has th

Re: [Development] Settings API for QML

2012-12-11 Thread Bache-Wiig Jens
> > To get the discussion going, here's my suggestion for that API: > PersistentSettings > { >property bool loadOnStartup: true >property bool saveOnExit: true >function load() >function save() > } I would also consider an even simpler API. How about we introduce a new keyword fo

Re: [Development] Settings API for QML

2012-12-11 Thread Stephen Kelly
On Monday, December 10, 2012 20:46:19 Thiago Macieira wrote: > Before we do settings for QML, we need to figure out what to replace > QSettings with. Or, better yet, we do the two at the same time: we develop > the new C++ and QML settings APIs at the same time. I agree with this, of course. QML

Re: [Development] Settings API for QML

2012-12-11 Thread Shawn Rutledge
On Tue, Dec 11, 2012 at 01:37:53PM +, Knoll Lars wrote: > One idea we had earlier was to use JSON to load and save settings. The > advantage would be that it's JS compatible, and we could possibly even load > it in a way that you can simply bind to setting values in there. That would be hand

Re: [Development] Settings API for QML

2012-12-11 Thread Shawn Rutledge
On Mon, Dec 10, 2012 at 07:51:32PM -0800, Alan Alpert wrote: > There was a discussion a while ago about a better settings API for > QML, http://permalink.gmane.org/gmane.comp.lib.qt.qml/3162 was the > best link I could find, but no progress has been made since. The main > concensus I got from that

Re: [Development] Settings API for QML

2012-12-11 Thread Knoll Lars
On Dec 11, 2012, at 4:51 AM, Alan Alpert <4163654...@gmail.com> wrote: > There was a discussion a while ago about a better settings API for > QML, http://permalink.gmane.org/gmane.comp.lib.qt.qml/3162 was the > best link I could find, but no progress has been made since. The main > concensus I go

Re: [Development] Settings API for QML

2012-12-11 Thread Mark
On Tue, Dec 11, 2012 at 5:46 AM, Thiago Macieira wrote: > On segunda-feira, 10 de dezembro de 2012 19.51.32, Alan Alpert wrote: >> There was a discussion a while ago about a better settings API for >> QML, http://permalink.gmane.org/gmane.comp.lib.qt.qml/3162 was the >> best link I could find, but

Re: [Development] Settings API for QML

2012-12-10 Thread Thiago Macieira
On segunda-feira, 10 de dezembro de 2012 19.51.32, Alan Alpert wrote: > There was a discussion a while ago about a better settings API for > QML, http://permalink.gmane.org/gmane.comp.lib.qt.qml/3162 was the > best link I could find, but no progress has been made since. The main > concensus I got f

[Development] Settings API for QML

2012-12-10 Thread Alan Alpert
There was a discussion a while ago about a better settings API for QML, http://permalink.gmane.org/gmane.comp.lib.qt.qml/3162 was the best link I could find, but no progress has been made since. The main concensus I got from that thread was just that no one likes QSettings (ancient, file-based) and