24 #include "kcmkabcustomfields.h"
28 #include <kstandarddirs.h>
32 #include <tdemacros.h>
36 TDE_EXPORT TDECModule *create_kabcustomfields( TQWidget *parent, const char * ) {
37 return new KCMKabCustomFields( parent, "kcmkabcustomfields" );
41 KCMKabCustomFields::KCMKabCustomFields( TQWidget *parent, const char *name )
42 : KCMDesignerFields( parent, name )
46 TQString KCMKabCustomFields::localUiDir()
48 return kabLocalDir() + "contacteditorpages/";
51 TQString KCMKabCustomFields::uiPath()
53 return "kaddressbook/contacteditorpages/";
56 void KCMKabCustomFields::writeActivePages( const TQStringList &activePages )
58 KABPrefs::instance()->setAdvancedCustomFields( activePages );
59 KABPrefs::instance()->writeConfig();
62 TQStringList KCMKabCustomFields::readActivePages()
64 return KABPrefs::instance()->advancedCustomFields();
67 TQString KCMKabCustomFields::applicationName()
69 return "KADDRESSBOOK";
72 TQString KCMKabCustomFields::kabLocalDir()
74 TQStringList kabdirs = locateLocal( "data", "kaddressbook/");
75 return kabdirs.grep( TQRegExp( "^"+TDEGlobal::dirs()->localtdedir() ) ).first();
|