« Return to Thread: porting int options managed by radio button groups to kde4

Re: porting int options managed by radio button groups to kde4

by Bugzilla from asoliverez@gmail.com :: Rate this Message:

Reply to Author | View in Thread



On Thu, Jul 9, 2009 at 9:35 AM, Cristian Oneţ <onet.cristian@...> wrote:
On Thu, Jul 9, 2009 at 3:06 PM, Alvaro Soliverez<asoliverez@...> wrote:
>
>
> On Thu, Jul 9, 2009 at 2:30 AM, Cristian Oneţ <onet.cristian@...>
> wrote:
>>
>> Hi,
>>
>> It seems that in kde4 KConfigDialog can't manage int configuration options
>> with
>> a radio button group. We have a few options in this situation in kmymoney.
>> According to this
>> http://www.nabble.com/KConfigDialog-to9326936.html#a9327787
>> thread the way to go is to define a bool option for each radio button.
>> Should we follow this path or change the editor widget of the option?
>>
>> --
>
> It kind of sucks to define a bool for each one. It feels like html.
> Do you think there is another suitable method to do it?
Well I have tried changing it to an Enum but without any luck.
Changing the option too "Bool" and naming the corresponding radio
button to kcfg_optionName worked but as you said this sucks because a
radio button group by definition can have only one value. It models an
option with one value from a defined set not several options as the
"Bool" model (since there is no constraint to force two "Bool"
options, in the same radio button group, to have only one "true"
value).

I'll try to check if we can find a better way. If not the UI files
must be changed. What do you use to edit the UI files? I use
qtassistant (qt4 version) but it seems to change a lot more in the UI
files than I actually changed since opening the file. Is it because
the UI files from kmymoney haven't been edited yet with the
qtassistant from qt4? If yes is it OK to commit the UI files with the
changes automatically done by the designer?

Thanks,

Cristian


What I used to do in html is have a method to check that all other bools were false whenever a bool changes to true. It is a band aid to have consistency, but it's useful in those cases. An Enum won't work in this case, because behing the enum template, it is an int too.

The UI files were converted with a script, and have not been used with QtAssistant yet. Is it similar to Qt Designer? That's the one I would recommend using.

Regards,
Alvaro


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
KMyMoney2-developer mailing list
KMyMoney2-developer@...
https://lists.sourceforge.net/lists/listinfo/kmymoney2-developer

 « Return to Thread: porting int options managed by radio button groups to kde4