← Back to team overview

kicad-developers team mailing list archive

Re: idea suggestion for a settings module

 

On 3/18/2016 8:39 AM, Mário Luzeiro wrote:
> Interesting... these things are (almost) all invented already these days.. :O
> 
> https://github.com/KiCad/kicad-source-mirror/blob/master/include/config_params.h
> https://github.com/KiCad/kicad-source-mirror/blob/master/common/config_params.cpp
> 
> "// Project settings are saved in the corresponding <board name>.pro file"
> 
> This is a good tool to save in .pro if I used it in 3d-viewer and add the existent options to .pro will that be consider a change format in .pro files?
> Or I am freely to change, add, remove that configuration options?

The .pro file is really an .ini file.  Take a look at wxConfig to see
how it works.  You are free to modify the .pro file contents to suit
your needs since it will not effect any file formats that we wrote.
Please keep in mind that the information in the .pro file will only be
loaded when a project is loaded.  If you require settings for all
projects, this should be stored in the appropriate application config file.

> 
> For example, on 3d-viewer, I saw some user requests for the mask color should be saved per project.
> 
> Mario
> ________________________________________
> From: Kicad-developers [kicad-developers-bounces+mrluzeiro=ua.pt@xxxxxxxxxxxxxxxxxxx] on behalf of jp charras [jp.charras@xxxxxxxxxx]
> Sent: 18 March 2016 12:09
> To: kicad-developers@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Kicad-developers] idea suggestion for a settings module
> 
> Le 18/03/2016 11:42, Mário Luzeiro a écrit :
>> Hello all,
>>
>> I just want to left a simple idea if someone have the need in future.
>>
>> While working on 3d-viewer, create / changing new settings (the ones that are stored in local user.. etc) I notice there are a lot of "manual work source code write" on this task every time I want to add a simple option flag..
>>
>> I was thinking that some "automation module" could be implemented and used global in kicad.
>> That module could also create an automatic UI to change that settings.
>>
>> So we just have to write a structure with:
>>
>> "Name of group of options"...
>> "Name of the option 1", OPTION_TYPE, default value, min range, max range, etc..
>> "Name of the option 2", OPTION_TYPE, default value, min range, max range, etc..
>> ...
>>
>> This could be somehow used for automatic settings reading.. writing... UI creation...
>>
>> I am not an expert and I didn't tough much about it, but I just left this here if anyone may come with the same need we can investigate / discuss a way to create such module..
>>
>> Regards,
>> Mario Luzeiro
> 
> Something like you are talking about is existing, for project config.
> For instance, have a look at
> PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetProjectFileParametersList()
> and bool SCH_EDIT_FRAME::LoadProjectFile()
> 
> in eeschema_config.cpp
> 
> 
> 
> 
> --
> Jean-Pierre CHARRAS
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



References