本文整理汇总了C++中addressee::List::append方法的典型用法代码示例。如果您正苦于以下问题:C++ List::append方法的具体用法?C++ List::append怎么用?C++ List::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类addressee::List
的用法示例。
在下文中一共展示了List::append方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addressees
Addressee::List AddresseeDialog::addressees()
{
Addressee::List al;
AddresseeItem *aItem = 0;
if(mMultiple)
{
QListViewItem *item = mSelectedList->firstChild();
while(item)
{
aItem = dynamic_cast< AddresseeItem * >(item);
if(aItem)
al.append(aItem->addressee());
item = item->nextSibling();
}
}
else
{
aItem = dynamic_cast< AddresseeItem * >(mAddresseeList->selectedItem());
if(aItem)
al.append(aItem->addressee());
}
return al;
}
示例2: createAgent
VCardLine VCardTool::createAgent(VCard::Version version, const Agent &agent)
{
VCardLine line("AGENT");
if(agent.isIntern())
{
if(agent.addressee() != 0)
{
Addressee::List list;
list.append(*agent.addressee());
QString str = createVCards(list, version);
str.replace("\r\n", "\\n");
str.replace(";", "\\;");
str.replace(":", "\\:");
str.replace(",", "\\,");
line.setValue(str);
}
}
else if(!agent.url().isEmpty())
{
line.setValue(agent.url());
line.addParameter("value", "URI");
}
return line;
}
示例3: save
bool ResourceEvolution::save(Ticket *ticket)
{
delete ticket;
if(!m_isOpen)
return false;
// just delete the summary so evolution will regenerate it
// on next start up
(void)QFile::remove(QDir::homeDirPath() + "/evolution/local/Contacts/addressbook.db.summary");
AddressBook::Iterator it;
Addressee::List list;
for(it = addressBook()->begin(); it != addressBook()->end(); ++it)
{
if((*it).resource() != this || !(*it).changed())
continue;
// remove, convert add set unchanged false
list.clear();
mWrap->remove((*it).uid());
VCardTool tool;
list.append((*it));
mWrap->add((*it).uid(), tool.createVCards(list, VCard::v2_1));
(*it).setChanged(false);
}
return true;
}
示例4: save
void VCardFormat::save( const Addressee &addressee, QFile *file )
{
VCardConverter converter;
Addressee::List vcardlist;
vcardlist.append( addressee );
QByteArray data = converter.createVCards( vcardlist );
file->write( data );
}
示例5: allAddressees
Addressee::List AddressBook::allAddressees() const
{
Addressee::List list;
ConstIterator it;
for ( it = begin(); it != end(); ++it ) {
list.append( *it );
}
return list;
}
示例6: findByName
Addressee::List Resource::findByName( const TQString &name )
{
Addressee::List results;
ConstIterator it;
for ( it = begin(); it != end(); ++it ) {
if ( name == (*it).name() )
results.append( *it );
}
return results;
}
示例7: findByCategory
Addressee::List Resource::findByCategory( const TQString &category )
{
Addressee::List results;
ConstIterator it;
for ( it = begin(); it != end(); ++it ) {
if ( (*it).hasCategory( category) ) {
results.append( *it );
}
}
return results;
}
示例8: saveAll
void VCardFormat::saveAll( AddressBook *, Resource *resource, QFile *file )
{
VCardConverter converter;
Addressee::List vcardlist;
Resource::Iterator it;
Resource::Iterator end( resource->end() );
for ( it = resource->begin(); it != end; ++it ) {
( *it ).setChanged( false );
vcardlist.append( *it );
}
QByteArray data = converter.createVCards( vcardlist );
file->write( data );
}
示例9: findByEmail
Addressee::List Resource::findByEmail( const TQString &email )
{
Addressee::List results;
const TQString lowerEmail = email.lower();
ConstIterator it;
for ( it = begin(); it != end(); ++it ) {
const TQStringList mailList = (*it).emails();
for ( TQStringList::ConstIterator ite = mailList.begin(); ite != mailList.end(); ++ite ) {
if ( lowerEmail == (*ite).lower() )
results.append( *it );
}
}
return results;
}
示例10: parseVCards
//.........这里部分代码省略.........
else if(identifier == "nickname")
addr.setNickName((*lineIt).value().asString());
// NOTE
else if(identifier == "note")
addr.setNote((*lineIt).value().asString());
// ORGANIZATION
else if(identifier == "org")
{
const QStringList orgParts = splitString(semicolonSep, (*lineIt).value().asString());
if(orgParts.count() > 0)
addr.setOrganization(orgParts[0]);
if(orgParts.count() > 1)
addr.setDepartment(orgParts[1]);
}
// PHOTO
else if(identifier == "photo")
addr.setPhoto(parsePicture(*lineIt));
// PROID
else if(identifier == "prodid")
addr.setProductId((*lineIt).value().asString());
// REV
else if(identifier == "rev")
addr.setRevision(parseDateTime((*lineIt).value().asString()));
// ROLE
else if(identifier == "role")
addr.setRole((*lineIt).value().asString());
// SORT-STRING
else if(identifier == "sort-string")
addr.setSortString((*lineIt).value().asString());
// SOUND
else if(identifier == "sound")
addr.setSound(parseSound(*lineIt));
// TEL
else if(identifier == "tel")
{
PhoneNumber phone;
phone.setNumber((*lineIt).value().asString());
int type = 0;
const QStringList types = (*lineIt).parameters("type");
for(QStringList::ConstIterator it = types.begin(); it != types.end(); ++it)
type += mPhoneTypeMap[(*it).upper()];
phone.setType(type);
addr.insertPhoneNumber(phone);
}
// TITLE
else if(identifier == "title")
addr.setTitle((*lineIt).value().asString());
// TZ
else if(identifier == "tz")
{
TimeZone tz;
const QString date = (*lineIt).value().asString();
int hours = date.mid(1, 2).toInt();
int minutes = date.mid(4, 2).toInt();
int offset = (hours * 60) + minutes;
offset = offset * (date[0] == '+' ? 1 : -1);
tz.setOffset(offset);
addr.setTimeZone(tz);
}
// UID
else if(identifier == "uid")
addr.setUid((*lineIt).value().asString());
// URL
else if(identifier == "url")
addr.setUrl(KURL((*lineIt).value().asString()));
// X-
else if(identifier.startsWith("x-"))
{
const QString key = (*lineIt).identifier().mid(2);
int dash = key.find("-");
addr.insertCustom(key.left(dash), key.mid(dash + 1), (*lineIt).value().asString());
}
}
}
addrList.append(addr);
}
return addrList;
}