[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KConfig and multiple values
From:       "David Jarvie" <lists () astrojar ! org ! uk>
Date:       2007-07-13 13:48:12
Message-ID: 29082.S0VKQUNDQxA=.1184334492.squirrel () www ! sensical ! net
[Download RAW message or body]

On Wednesday 11 July 2007 23:25, Yannick Gingras wrote:
>
>> On Wednesday 11 July 2007, Yannick Gingras wrote:
>>> I want to implement a list of configuration settings in my application.
>>
>> not exactly sure what you want given your description. is what you want
>> something like an array of structs? e.g.: [snip]
>
> What I want is an array of colors.  The colors would be presented in a
> listview and stored sequentially:
>
> [NickColors]
> #ffbbff
> #ffbbff
> #fabbff
> ...
> #b3b3b3
>
> I want to use a listview rather than buttons like most people do because I
> want 50+ colors.  The number of colors would also be variable.

You could create a QStringList containing the all the colours (use
QColor::name() to get each individual colour string). KConfig* reads and
writes a QStringList entry in the format

NickColors=#ffbbff,#ffbbff,...,#b3b3b3

-- 
David Jarvie.
KAlarm author & maintainer.
http://www.astrojar.org.uk/kalarm

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic