24 #include "addresseeconfig.h"
27 using namespace TDEABC;
29 AddresseeConfig::AddresseeConfig()
31 mAddressee = Addressee();
34 AddresseeConfig::AddresseeConfig(
const Addressee &addr )
39 void AddresseeConfig::setAddressee(
const Addressee &addr )
44 Addressee AddresseeConfig::addressee()
49 void AddresseeConfig::setAutomaticNameParsing(
bool value )
51 TDEConfig config(
"kaddressbook_addrconfig" );
52 config.setGroup( mAddressee.uid() );
53 config.writeEntry(
"AutomaticNameParsing", value );
57 bool AddresseeConfig::automaticNameParsing()
59 TDEConfig config(
"kaddressbook_addrconfig" );
60 config.setGroup( mAddressee.uid() );
61 return config.readBoolEntry(
"AutomaticNameParsing",
62 KABPrefs::instance()->automaticNameParsing() );
65 void AddresseeConfig::setNoDefaultAddrTypes(
const TQValueList<int> &types )
67 TDEConfig config(
"kaddressbook_addrconfig" );
68 config.setGroup( mAddressee.uid() );
69 config.writeEntry(
"NoDefaultAddrTypes", types );
73 TQValueList<int> AddresseeConfig::noDefaultAddrTypes()
const
75 TDEConfig config(
"kaddressbook_addrconfig" );
76 config.setGroup( mAddressee.uid() );
77 return config.readIntListEntry(
"NoDefaultAddrTypes" );
80 void AddresseeConfig::setCustomFields(
const TQStringList &fields )
82 TDEConfig config(
"kaddressbook_addrconfig" );
83 config.setGroup( mAddressee.uid() );
84 config.writeEntry(
"LocalCustomFields", fields );
88 TQStringList AddresseeConfig::customFields()
const
90 TDEConfig config(
"kaddressbook_addrconfig" );
91 config.setGroup( mAddressee.uid() );
92 return config.readListEntry(
"LocalCustomFields" );
95 void AddresseeConfig::remove()
97 TDEConfig config(
"kaddressbook_addrconfig" );
98 config.deleteGroup( mAddressee.uid() );