本文整理汇总了C++中DistributionList::name方法的典型用法代码示例。如果您正苦于以下问题:C++ DistributionList::name方法的具体用法?C++ DistributionList::name怎么用?C++ DistributionList::name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DistributionList
的用法示例。
在下文中一共展示了DistributionList::name方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
DistributionList *DistributionListManager::list( const QString &name )
{
DistributionList *list;
for( list = mLists.first(); list; list = mLists.next() ) {
if ( list->name() == name ) return list;
}
return 0;
}
示例2: listNames
QStringList DistributionListManager::listNames()
{
QStringList names;
DistributionList *list;
for( list = mLists.first(); list; list = mLists.next() ) {
names.append( list->name() );
}
return names;
}
示例3: remove
void DistributionListManager::remove( DistributionList *l )
{
if ( !l )
return;
DistributionList *list;
for( list = mLists.first(); list; list = mLists.next() ) {
if ( list->name() == l->name() ) {
mLists.remove( list );
return;
}
}
}
示例4: insert
void DistributionListManager::insert( DistributionList *l )
{
if ( !l )
return;
DistributionList *list;
for( list = mLists.first(); list; list = mLists.next() ) {
if ( list->name() == l->name() ) {
mLists.remove( list );
break;
}
}
mLists.append( l );
}
示例5: save
bool DistributionListManager::save()
{
kdDebug(5700) << "DistListManager::save()" << endl;
KSimpleConfig cfg( locateLocal( "data", "kabc/distlists" ) );
cfg.deleteGroup( "DistributionLists" );
cfg.setGroup( "DistributionLists" );
DistributionList *list;
for( list = mLists.first(); list; list = mLists.next() ) {
kdDebug(5700) << " Saving '" << list->name() << "'" << endl;
QStringList value;
const DistributionList::Entry::List entries = list->entries();
DistributionList::Entry::List::ConstIterator it;
for( it = entries.begin(); it != entries.end(); ++it ) {
value.append( (*it).addressee.uid() );
value.append( (*it).email );
}
if ( d->mMissingEntries.find( list->name() ) != d->mMissingEntries.end() ) {
const MissingEntryList missList = d->mMissingEntries[ list->name() ];
MissingEntryList::ConstIterator missIt;
for ( missIt = missList.begin(); missIt != missList.end(); ++missIt ) {
value.append( (*missIt).first );
value.append( (*missIt).second );
}
}
cfg.writeEntry( list->name(), value );
}
cfg.sync();
return true;
}