[Kde-games-devel] Next-Gen KSpaceDuel

Branan Riley branan at gmail.com
Thu Mar 8 01:18:00 CET 2007


On Wednesday 07 March 2007 15:58, Parker Coates wrote:
> On 3/7/07, Branan Riley <branan at gmail.com> wrote:
> > My current plan is to have a directory, $KDEHOME/apps/kspaceduel/configs,
> > which stores all the alternate configurations in separate files. The main
> > config file has all the current settings and such, just like it is now.
> > The configuration screen will allow you to save any set of settings in a
> > new file, or load the settings from a file.
> >
> > Or at least, that's the idea. It seems like it should work, but I've yet
> > to test it.
>
> All that makes sense; that's the standard KDE way to do it. What I was
> asking was how you plan to get the data into and out of the files. Do
> you plan to build this into the existing config dialog? Do you plan to
> use KConfig, KConfigXT or a custom parser?

Ah. Now I see what you wanted to know. I plan to use KConfig. Whenever 'save' 
is pressed, a function creates a new KConfig object, points it to the new 
config file, and copies the data from the GUI to that object. Loading is 
similar. A new KConfig object poiting to the config file, the data is loaded 
into the GUI, and KConfigXT takes care of updating the main configuration 
file to match the new settings.

Branan


More information about the kde-games-devel mailing list