-rw-r--r-- | library/backend/contact.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/backend/contact.h b/library/backend/contact.h index 4999430..2294986 100644 --- a/library/backend/contact.h +++ b/library/backend/contact.h @@ -158,106 +158,106 @@ public: QString office() const { return find( Qtopia::Office ); } QString businessPhone() const { return find( Qtopia::BusinessPhone ); } QString businessFax() const { return find( Qtopia::BusinessFax ); } QString businessMobile() const { return find( Qtopia::BusinessMobile ); } QString businessPager() const { return find( Qtopia::BusinessPager ); } QString profession() const { return find( Qtopia::Profession ); } QString assistant() const { return find( Qtopia::Assistant ); } QString manager() const { return find( Qtopia::Manager ); } /** Multi line string containing all non-empty address info in the form * Street * City, State Zip * Country */ QString displayBusinessAddress() const; //personal QString spouse() const { return find( Qtopia::Spouse ); } QString gender() const { return find( Qtopia::Gender ); } QString birthday() const { return find( Qtopia::Birthday ); } QString anniversary() const { return find( Qtopia::Anniversary ); } QString nickname() const { return find( Qtopia::Nickname ); } QString children() const { return find( Qtopia::Children ); } QStringList childrenList() const; // other QString notes() const { return find( Qtopia::Notes ); } QString groups() const { return find( Qtopia::Groups ); } QStringList groupList() const; // // custom // const QString &customField( const QString &key ) // { return find( Custom- + key ); } static QStringList fields(); static QStringList trfields(); QString toRichText() const; QMap<int, QString> toMap() const; QString field( int key ) const { return find( key ); } // journaling... void saveJournal( journal_action action, const QString &key = QString::null ); void save( QString &buf ) const; void setUid( int i ) { Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } + void setEmails( const QString &v ); + QString emails() const { return find( Qtopia::Emails ); } private: friend class AbEditor; friend class AbTable; friend class AddressBookAccessPrivate; friend class XMLIO; QString emailSeparator() const { return " "; } // the emails should be seperated by a comma - void setEmails( const QString &v ); - QString emails() const { return find( Qtopia::Emails ); } void insert( int key, const QString &value ); void replace( int key, const QString &value ); QString find( int key ) const; QString displayAddress( const QString &street, const QString &city, const QString &state, const QString &zip, const QString &country ) const; Qtopia::UidGen &uidGen() { return sUidGen; } static Qtopia::UidGen sUidGen; QMap<int, QString> mMap; ContactPrivate *d; }; // these methods are inlined to keep binary compatability with Qtopia 1.5 inline void Contact::insertEmail( const QString &v ) { //qDebug("insertEmail %s", v.latin1()); QString e = v.simplifyWhiteSpace(); QString def = defaultEmail(); // if no default, set it as the default email and don't insert if ( def.isEmpty() ) { setDefaultEmail( e ); // will insert into the list for us return; } // otherwise, insert assuming doesn't already exist QString emailsStr = find( Qtopia::Emails ); if ( emailsStr.contains( e )) return; if ( !emailsStr.isEmpty() ) emailsStr += emailSeparator(); emailsStr += e; replace( Qtopia::Emails, emailsStr ); } inline void Contact::removeEmail( const QString &v ) { QString e = v.simplifyWhiteSpace(); QString def = defaultEmail(); QString emailsStr = find( Qtopia::Emails ); QStringList emails = emailList(); // otherwise, must first contain it |