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

List:       kde-commits
Subject:    Re: kdebase/kicker (silent)
From:       Frans Englich <frans.englich () telia ! com>
Date:       2004-10-22 18:12:44
Message-ID: 200410221812.44549.frans.englich () telia ! com
[Download RAW message or body]

On Friday 22 October 2004 17:50, Aaron J. Seigo wrote:
> CVS commit by aseigo:
>
> CVS_SILENT more additions. seems people are actually reading this thing.
>
>
>   M +10 -0     TODO   1.14
>
>
> --- kdebase/kicker/TODO  #1.13:1.14
> @@ -19,4 +19,14 @@
>  Priority, But Unnasigned
>  -----------------------
> ++++   Clean up usage of KConfig objects.
> +*     We read a LOT from KConfig objects in kicker, often reading the
> +      same setting(s) over and over when they could be cached somewhere
> +      centralized. More use of KConfigGroup would also be good.
> +
> ++++++ KConfigXT-ize kicker's settings.
> +***   Making the KConfigXT file is easy, switching everything over to use
> +      it is tedious, but porting the control panel is the real annoyance.
> +      Therefore the 3 stars.

Yes, KConfigXT is the way to go. While the Kicker KCM is a little monster, I 
think it's a lot easier with the support in KCModule. For example, the 
attached file is a rough conversion of the accessibility KCM -- those lines 
plus a Designer and KConfigXT file takes care of loading,saving, etc(Kicker 
is more complex, but that can be achieved by overloading the save/load and 
then calling the base functions).

If there's cases of kdeglobals settings, it should be implemented in 
kdelibs/kutils/kdeglobals.kcfg, drop a mail and I'll take care of it.


Cheers,

		Frans


["main.cpp" (text/x-c++src)]

/**
 *
 *  Copyright (C) 2000 Matthias Hölzer-Klüpfel
 *  Copyright (C) 2004 Frans Englich <frans.englich@telia.com>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *
 *  Original Author: Matthias Hölzer-Klüpfel
 *  Maintainer: José Pablo Ezequiel "Pupeno" Fernández <pupeno@kde.org>
 */

#include <kcmodule.h>
#include <kaboutdata.h>
#include <kgenericfactory.h>

#include "accessibilityconfigwidget.h"
#include "settings.h"

class KCMAccessibility : public KCModuleXT
{
	public:
		KCMAccessibility( QWidget* parent, const char* name, const QStringList& strlist)
			: KCModuleXT( parent, name )
		{
			AccessibilityConfigWidget* mainWidget = 
				new AccessibilityConfigWidget( this );

			addConfig( Settings, mainWidget );
			//setAboutData( new KAboutData( ... ) );
		}
};

typedef KGenericFactory<KCMAccessibility, QWidget> AccessibilityFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_accessibility, AccessibilityFactory("kcmaccessibility") )




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

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