Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Opie::OPimContact Class Reference

Contact Container. More...

#include </home/clem/local/src/opie/libopie2/opiepim/core/opimcontact.h>

Inheritance diagram for Opie::OPimContact:

Inheritance graph
[legend]
Collaboration diagram for Opie::OPimContact:

Collaboration graph
[legend]
List of all members.

Public Types

enum  DateFormat { Zip_City_State = 0, City_State_Zip }

Public Member Functions

 OPimContact ()
 OPimContact (const QMap< int, QString > &fromMap)
virtual ~OPimContact ()
void setTitle (const QString &v)
void setFirstName (const QString &v)
void setMiddleName (const QString &v)
void setLastName (const QString &v)
void setSuffix (const QString &v)
void setFileAs (const QString &v)
void setFileAs ()
void setDefaultEmail (const QString &v)
void insertEmail (const QString &v)
void removeEmail (const QString &v)
void clearEmails ()
void insertEmails (const QStringList &v)
void setHomeStreet (const QString &v)
void setHomeCity (const QString &v)
void setHomeState (const QString &v)
void setHomeZip (const QString &v)
void setHomeCountry (const QString &v)
void setHomePhone (const QString &v)
void setHomeFax (const QString &v)
void setHomeMobile (const QString &v)
void setHomeWebpage (const QString &v)
void setCompany (const QString &v)
void setBusinessStreet (const QString &v)
void setBusinessCity (const QString &v)
void setBusinessState (const QString &v)
void setBusinessZip (const QString &v)
void setBusinessCountry (const QString &v)
void setBusinessWebpage (const QString &v)
void setJobTitle (const QString &v)
void setDepartment (const QString &v)
void setOffice (const QString &v)
void setBusinessPhone (const QString &v)
void setBusinessFax (const QString &v)
void setBusinessMobile (const QString &v)
void setBusinessPager (const QString &v)
void setProfession (const QString &v)
void setAssistant (const QString &v)
void setManager (const QString &v)
void setSpouse (const QString &v)
void setGender (const QString &v)
void setBirthday (const QDate &v)
void setAnniversary (const QDate &v)
void setNickname (const QString &v)
void setChildren (const QString &v)
void setNotes (const QString &v)
virtual bool match (const QRegExp &regexp) const
QString fullName () const
QString title () const
QString firstName () const
QString middleName () const
QString lastName () const
QString suffix () const
QString fileAs () const
QString defaultEmail () const
QStringList emailList () const
QString homeStreet () const
QString homeCity () const
QString homeState () const
QString homeZip () const
QString homeCountry () const
QString homePhone () const
QString homeFax () const
QString homeMobile () const
QString homeWebpage () const
QString displayHomeAddress () const
QString company () const
QString businessStreet () const
QString businessCity () const
QString businessState () const
QString businessZip () const
QString businessCountry () const
QString businessWebpage () const
QString jobTitle () const
QString department () const
QString office () const
QString businessPhone () const
QString businessFax () const
QString businessMobile () const
QString businessPager () const
QString profession () const
QString assistant () const
QString manager () const
QString displayBusinessAddress () const
QString spouse () const
QString gender () const
QDate birthday () const
QDate anniversary () const
QString nickname () const
QString children () const
QStringList childrenList () const
QString notes () const
QString groups () const
QStringList groupList () const
QString toRichText () const
QMap< int, QStringtoMap () const
QString field (int key) const
void setUid (int i)
QString toShortText () const
QString type () const
QString recordField (int) const
QString emailSeparator () const
void setEmails (const QString &v)
QString emails () const
int rtti () const

Static Public Member Functions

static OPimContactsafeCast (const OPimRecord *)
 Cast to OPimContact or on failure return 0l.

Private Member Functions

void insert (int key, const QString &value)
void replace (int key, const QString &value)
QString find (int key) const
void save (QString &buf) const
QString displayAddress (const QString &street, const QString &city, const QString &state, const QString &zip, const QString &country) const

Static Private Member Functions

static QStringList fields ()

Private Attributes

QMap< int, QStringmMap
OPimContactPrivate * d

Friends

class DataSet
class OPimContactAccessBackend_XML

Detailed Description

Contact Container.

OPimContact class represents a specialised PIM Record for contacts. It does store all kind of persopn related information.

Author:
TT, Stefan Eiler, Holger Freyther

Definition at line 58 of file opimcontact.h.


Member Enumeration Documentation

enum Opie::OPimContact::DateFormat
 

Enumeration values:
Zip_City_State 
City_State_Zip 

Definition at line 67 of file opimcontact.h.


Constructor & Destructor Documentation

Opie::OPimContact::OPimContact  ) 
 

Creates a new, empty contact.

Definition at line 66 of file opimcontact.cpp.

Opie::OPimContact::OPimContact const QMap< int, QString > &  fromMap  ) 
 

For internal use only.

Creates a new contact. The properties of the contact are set from fromMap.

Definition at line 74 of file opimcontact.cpp.

References Qtopia::AddressCategory, Qtopia::AddressUid, find(), Qtopia::Record::idsFromString(), QString::isEmpty(), mMap, Qtopia::Record::setCategories(), setUid(), QString::toInt(), and Opie::OPimRecord::uidGen().

Opie::OPimContact::~OPimContact  )  [virtual]
 

Destroys a contact.

Definition at line 96 of file opimcontact.cpp.


Member Function Documentation

QDate Opie::OPimContact::anniversary  )  const
 

Returns the anniversary of the contact.

Definition at line 1183 of file opimcontact.cpp.

References Qtopia::Anniversary, Opie::OPimDateConversion::dateFromString(), empty, find(), QString::isEmpty(), and str.

Referenced by Opie::Internal::OPimContactSortVector::compareItems(), Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), Opie::OPimContactAccessBackend::occurrences(), Opie::OPimContactAccessBackend_SQL::queryByExample(), Opie::OPimContactAccessBackend::queryByExample(), toRichText(), and ContactEditor::updateDatePicker().

QString Opie::OPimContact::assistant  )  const [inline]
 

Returns the assistant of the contact.

Definition at line 191 of file opimcontact.h.

References Qtopia::Assistant.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QDate Opie::OPimContact::birthday  )  const
 

Returns the birthday of the contact.

Definition at line 1170 of file opimcontact.cpp.

References Qtopia::Birthday, Opie::OPimDateConversion::dateFromString(), find(), QString::isEmpty(), and str.

Referenced by Opie::Internal::OPimContactSortVector::compareItems(), Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), Opie::OPimContactAccessBackend_SQL::queryByExample(), Opie::OPimContactAccessBackend::queryByExample(), toRichText(), and ContactEditor::updateDatePicker().

QString Opie::OPimContact::businessCity  )  const [inline]
 

Returns the business city of the contact.

Definition at line 178 of file opimcontact.h.

References Qtopia::BusinessCity.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), displayBusinessAddress(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::businessCountry  )  const [inline]
 

Returns the business country of the contact.

Definition at line 181 of file opimcontact.h.

References Qtopia::BusinessCountry.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), displayBusinessAddress(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::businessFax  )  const [inline]
 

Returns the business fax number of the contact.

Definition at line 187 of file opimcontact.h.

References Qtopia::BusinessFax.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::businessMobile  )  const [inline]
 

Returns the business mobile number of the contact.

Definition at line 188 of file opimcontact.h.

References Qtopia::BusinessMobile.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::businessPager  )  const [inline]
 

Returns the business pager number of the contact.

Definition at line 189 of file opimcontact.h.

References Qtopia::BusinessPager.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::businessPhone  )  const [inline]
 

Returns the business phone number of the contact.

Definition at line 186 of file opimcontact.h.

References Qtopia::BusinessPhone.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::businessState  )  const [inline]
 

Returns the business state of the contact.

Definition at line 179 of file opimcontact.h.

References Qtopia::BusinessState.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), displayBusinessAddress(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::businessStreet  )  const [inline]
 

Returns the business street address of the contact.

Definition at line 177 of file opimcontact.h.

References Qtopia::BusinessStreet.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), displayBusinessAddress(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::businessWebpage  )  const [inline]
 

Returns the business webpage of the contact.

Definition at line 182 of file opimcontact.h.

References Qtopia::BusinessWebPage.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::businessZip  )  const [inline]
 

Returns the business zip of the contact.

Definition at line 180 of file opimcontact.h.

References Qtopia::BusinessZip.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), displayBusinessAddress(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::children  )  const [inline]
 

Returns the children of the contact.

Definition at line 206 of file opimcontact.h.

References Qtopia::Children.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QStringList Opie::OPimContact::childrenList  )  const
 

Returns a list of the names of the children of the contact.

Definition at line 896 of file opimcontact.cpp.

References Qtopia::Children, find(), and QStringList::split().

void Opie::OPimContact::clearEmails  ) 
 

Clears the email list.

Definition at line 1248 of file opimcontact.cpp.

References Qtopia::DefaultEmail, Qtopia::Emails, mMap, and QMap< Key, T >::remove().

Referenced by removeEmail().

QString Opie::OPimContact::company  )  const [inline]
 

Returns the company for the contact.

Definition at line 176 of file opimcontact.h.

References Qtopia::Company.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), AddressbookWindow::slotItemDelete(), and toRichText().

QString Opie::OPimContact::defaultEmail  )  const [inline]
 

Returns the default email address of the contact.

Definition at line 150 of file opimcontact.h.

References Qtopia::DefaultEmail.

Referenced by Opie::Internal::OPimContactSortVector::compareItems(), AbTable::findContactContact(), insertEmail(), removeEmail(), ContactEditor::setEntry(), toRichText(), and AddressbookWindow::writeMail().

QString Opie::OPimContact::department  )  const [inline]
 

Returns the department for the contact.

Definition at line 184 of file opimcontact.h.

References Qtopia::Department.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::displayAddress const QString street,
const QString city,
const QString state,
const QString zip,
const QString country
const [private]
 

For internal use only.

Definition at line 812 of file opimcontact.cpp.

References QString::isEmpty(), and s.

Referenced by displayBusinessAddress(), and displayHomeAddress().

QString Opie::OPimContact::displayBusinessAddress  )  const
 

Multi line string containing all non-empty address info in the form Street City, State Zip Country

Definition at line 837 of file opimcontact.cpp.

References businessCity(), businessCountry(), businessState(), businessStreet(), businessZip(), and displayAddress().

QString Opie::OPimContact::displayHomeAddress  )  const
 

Multi line string containing all non-empty address info in the form Street City, State Zip Country

Definition at line 847 of file opimcontact.cpp.

References displayAddress(), homeCity(), homeCountry(), homeState(), homeStreet(), and homeZip().

QStringList Opie::OPimContact::emailList  )  const
 

Returns a list of email addresses belonging to the contact, including the default email address.

Definition at line 928 of file opimcontact.cpp.

References QValueList< T >::begin(), emails(), emailSeparator(), QValueList< T >::end(), QString::isEmpty(), l, odebug, oendl, and QStringList::split().

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), removeEmail(), and ContactEditor::setEntry().

QString Opie::OPimContact::emails  )  const [inline]
 

Returns the list of email address for a contact separated by ';'s in a single string.

Definition at line 230 of file opimcontact.h.

References Qtopia::Emails.

Referenced by emailList(), AbTable::findContactContact(), removeEmail(), and toRichText().

QString Opie::OPimContact::emailSeparator  )  const [inline]
 

Definition at line 226 of file opimcontact.h.

Referenced by emailList(), insertEmail(), and removeEmail().

QString Opie::OPimContact::field int  key  )  const [inline]
 

For internal use only.

Definition at line 216 of file opimcontact.h.

Referenced by Opie::OPimContactAccessBackend::queryByExample().

QStringList Opie::OPimContact::fields  )  [static, private]
 

For internal use only.

Returns the list of fields belonging to a contact Never change order of this list ! It has to be regarding enum AddressBookFields !!

Definition at line 1008 of file opimcontact.cpp.

References QValueList< T >::append(), and list.

Referenced by save().

QString Opie::OPimContact::fileAs  )  const [inline]
 

Returns the string the contact is filed as.

Definition at line 147 of file opimcontact.h.

References Qtopia::FileAs.

Referenced by Opie::Internal::OPimContactSortVector::compareItems(), AbTable::findContactContact(), AbTable::paintCell(), ContactEditor::setEntry(), and AddressbookWindow::writeMail().

QString Opie::OPimContact::find int  key  )  const [private]
 

For internal use only.

Definition at line 804 of file opimcontact.cpp.

References mMap.

Referenced by anniversary(), birthday(), childrenList(), fullName(), insertEmail(), OPimContact(), removeEmail(), and setFileAs().

QString Opie::OPimContact::firstName  )  const [inline]
 

Returns the first name of the contact.

Definition at line 143 of file opimcontact.h.

References Qtopia::FirstName.

Referenced by Opie::Internal::OPimContactSortVector::compareItems(), Opie::OPimContactAccessBackend_VCard::createVObject(), fullName(), ContactEditor::setEntry(), and setFileAs().

QString Opie::OPimContact::fullName  )  const
 

Returns the full name of the contact

Definition at line 857 of file opimcontact.cpp.

References find(), Qtopia::FirstName, firstName(), QString::isEmpty(), Qtopia::LastName, lastName(), Qtopia::MiddleName, middleName(), name, QString::simplifyWhiteSpace(), Qtopia::Suffix, suffix(), Qtopia::Title, and title().

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), Today::setOwnerField(), AddressbookWindow::slotItemBeam(), AddressbookWindow::slotItemDelete(), toRichText(), and toShortText().

QString Opie::OPimContact::gender  )  const [inline]
 

Returns the gender of the contact.

Definition at line 202 of file opimcontact.h.

References Qtopia::Gender.

Referenced by Opie::Internal::OPimContactSortVector::compareItems(), Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QStringList Opie::OPimContact::groupList  )  const
 

For internal use only.

QString Opie::OPimContact::groups  )  const [inline]
 

For internal use only.

Returns the groups for the contact.

Definition at line 211 of file opimcontact.h.

References Qtopia::Groups.

QString Opie::OPimContact::homeCity  )  const [inline]
 

Returns the home city of the contact.

Definition at line 160 of file opimcontact.h.

References Qtopia::HomeCity.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), displayHomeAddress(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::homeCountry  )  const [inline]
 

Returns the home country of the contact.

Definition at line 163 of file opimcontact.h.

References Qtopia::HomeCountry.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), displayHomeAddress(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::homeFax  )  const [inline]
 

Returns the home fax number of the contact.

Definition at line 165 of file opimcontact.h.

References Qtopia::HomeFax.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::homeMobile  )  const [inline]
 

Returns the home mobile number of the contact.

Definition at line 166 of file opimcontact.h.

References Qtopia::HomeMobile.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::homePhone  )  const [inline]
 

Returns the home phone number of the contact.

Definition at line 164 of file opimcontact.h.

References Qtopia::HomePhone.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::homeState  )  const [inline]
 

Returns the home state of the contact.

Definition at line 161 of file opimcontact.h.

References Qtopia::HomeState.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), displayHomeAddress(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::homeStreet  )  const [inline]
 

Returns the home street address of the contact.

Definition at line 159 of file opimcontact.h.

References Qtopia::HomeStreet.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), displayHomeAddress(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::homeWebpage  )  const [inline]
 

Returns the home webpage of the contact.

Definition at line 167 of file opimcontact.h.

References Qtopia::HomeWebPage.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::homeZip  )  const [inline]
 

Returns the home zip of the contact.

Definition at line 162 of file opimcontact.h.

References Qtopia::HomeZip.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), displayHomeAddress(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

void Opie::OPimContact::insert int  key,
const QString v
[private]
 

For internal use only.

Definition at line 780 of file opimcontact.cpp.

References QMap< Key, T >::insert(), QString::isEmpty(), mMap, QMap< Key, T >::remove(), and QString::stripWhiteSpace().

void Opie::OPimContact::insertEmail const QString v  ) 
 

Insert email into the email list. Ensures email can only be added once. If there is no default email address set, it sets it to the email.

Definition at line 1194 of file opimcontact.cpp.

References QString::contains(), defaultEmail(), Qtopia::Emails, emailSeparator(), find(), QString::isEmpty(), replace(), setDefaultEmail(), and QString::simplifyWhiteSpace().

Referenced by insertEmails(), Opie::OPimContactAccessBackend_VCard::parseVObject(), and setDefaultEmail().

void Opie::OPimContact::insertEmails const QStringList v  ) 
 

Appends the emailList to the exiting email list

Definition at line 1268 of file opimcontact.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), and insertEmail().

Referenced by AddressbookWindow::appMessage().

QString Opie::OPimContact::jobTitle  )  const [inline]
 

Returns the job title of the contact.

Definition at line 183 of file opimcontact.h.

References Qtopia::JobTitle.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::lastName  )  const [inline]
 

Returns the last name of the contact.

Definition at line 145 of file opimcontact.h.

References Qtopia::LastName.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), fullName(), ContactEditor::setEntry(), and setFileAs().

QString Opie::OPimContact::manager  )  const [inline]
 

Returns the manager of the contact.

Definition at line 192 of file opimcontact.h.

References Qtopia::Manager.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

bool Opie::OPimContact::match const QRegExp r  )  const [virtual]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns TRUE if the contact matches the regular expression regexp. Otherwise returns FALSE.

Reimplemented from Qtopia::Record.

Definition at line 1091 of file opimcontact.cpp.

References QMap< Key, T >::begin(), QMap< Key, T >::end(), mMap, and Opie::OPimRecord::setLastHitField().

QString Opie::OPimContact::middleName  )  const [inline]
 

Returns the middle name of the contact.

Definition at line 144 of file opimcontact.h.

References Qtopia::MiddleName.

Referenced by Opie::Internal::OPimContactSortVector::compareItems(), Opie::OPimContactAccessBackend_VCard::createVObject(), fullName(), ContactEditor::setEntry(), and setFileAs().

QString Opie::OPimContact::nickname  )  const [inline]
 

Returns the nickname of the contact.

Definition at line 205 of file opimcontact.h.

References Qtopia::Nickname.

Referenced by Opie::Internal::OPimContactSortVector::compareItems(), Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::notes  )  const [inline]
 

Returns the notes relating to the the contact.

Definition at line 210 of file opimcontact.h.

References Qtopia::Notes.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), ContactEditor::slotNote(), and toRichText().

QString Opie::OPimContact::office  )  const [inline]
 

Returns the office for the contact.

Definition at line 185 of file opimcontact.h.

References Qtopia::Office.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::profession  )  const [inline]
 

Returns the profession of the contact.

Definition at line 190 of file opimcontact.h.

References Qtopia::Profession.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

class QString Opie::OPimContact::recordField int   )  const [virtual]
 

the name for a recordField

Implements Opie::OPimRecord.

Definition at line 1122 of file opimcontact.cpp.

References pos.

void Opie::OPimContact::removeEmail const QString v  ) 
 

Removes the email from the email list. If the default email was email, then the default email address is assigned to the first email in the email list

Definition at line 1218 of file opimcontact.cpp.

References clearEmails(), QString::contains(), QValueList< T >::count(), defaultEmail(), emailList(), emails(), Qtopia::Emails, emailSeparator(), find(), QValueList< T >::first(), QStringList::join(), QValueList< T >::remove(), replace(), setDefaultEmail(), and QString::simplifyWhiteSpace().

void Opie::OPimContact::replace int  key,
const QString v
[private]
 

For internal use only.

Definition at line 792 of file opimcontact.cpp.

References QString::isEmpty(), mMap, QMap< Key, T >::remove(), QMap< Key, T >::replace(), and QString::stripWhiteSpace().

Referenced by insertEmail(), removeEmail(), setAnniversary(), setBirthday(), setChildren(), setDefaultEmail(), setEmails(), setFileAs(), and setUid().

int Opie::OPimContact::rtti  )  const [virtual]
 

Reimplemented from Opie::OPimRecord.

Definition at line 1275 of file opimcontact.cpp.

References Opie::OPimResolver::AddressBook.

OPimContact * Opie::OPimContact::safeCast const OPimRecord rec  )  [static]
 

Cast to OPimContact or on failure return 0l.

This method tries to cast from a OPimRecord to a OPimContact it uses. If the OPimRecord is from type OPimContact the case will suceed and a pointer to OPimContact is returned otherwise a Null Pointer is returned.

See also:
OPimTodo::safeCast()

OPimEvent::safeCast()

Returns:
Return a OPimContact or a Null Pointer

Definition at line 1293 of file opimcontact.cpp.

References Opie::OPimResolver::AddressBook, l, and Opie::OPimRecord::rtti().

void Opie::OPimContact::save QString buf  )  const [private]
 

For internal use only.

Appends the contact information to buf.

Definition at line 975 of file opimcontact.cpp.

References Qtopia::AddressCategory, Qtopia::AddressUid, QMap< Key, T >::begin(), Qtopia::Record::categories(), Qtopia::Record::customToXml(), QMap< Key, T >::end(), Qtopia::escapeString(), fields(), Qtopia::Record::idsToString(), QString::isEmpty(), mMap, QString::number(), and Qtopia::Record::uid().

Referenced by Opie::OPimContactAccessBackend_XML::updateJournal().

void Opie::OPimContact::setAnniversary const QDate v  ) 
 

Sets the anniversary of the contact to date. If date is null, the current stored date will be removed.

Definition at line 1154 of file opimcontact.cpp.

References Qtopia::Anniversary, Opie::OPimDateConversion::dateToString(), QDate::isNull(), QDate::isValid(), QString::null, and replace().

Referenced by Birthday::_entries(), Birthday::entries(), AddressBookPluginWidget::getAddress(), Opie::OPimContactAccessBackend_VCard::parseVObject(), ContactEditor::slotAnniversaryDateChanged(), and ContactEditor::slotRemoveAnniversary().

void Opie::OPimContact::setAssistant const QString str  )  [inline]
 

Sets the assistant of the contact to str.

Definition at line 120 of file opimcontact.h.

References Qtopia::Assistant, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setBirthday const QDate v  ) 
 

Sets the birthday for the contact to date. If date is null the current stored date will be removed.

Definition at line 1136 of file opimcontact.cpp.

References Qtopia::Birthday, Opie::OPimDateConversion::dateToString(), QDate::isNull(), QDate::isValid(), QString::null, and replace().

Referenced by Birthday::_entries(), Birthday::entries(), AddressBookPluginWidget::getAddress(), Opie::OPimContactAccessBackend_VCard::parseVObject(), ContactEditor::slotBirthdayDateChanged(), and ContactEditor::slotRemoveBirthday().

void Opie::OPimContact::setBusinessCity const QString str  )  [inline]
 

Sets the business city of the contact to str.

Definition at line 107 of file opimcontact.h.

References Qtopia::BusinessCity, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setBusinessCountry const QString str  )  [inline]
 

Sets the business country of the contact to str.

Definition at line 110 of file opimcontact.h.

References Qtopia::BusinessCountry, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setBusinessFax const QString str  )  [inline]
 

Sets the business fax number of the contact to str.

Definition at line 116 of file opimcontact.h.

References Qtopia::BusinessFax, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setBusinessMobile const QString str  )  [inline]
 

Sets the business mobile phone number of the contact to str.

Definition at line 117 of file opimcontact.h.

References Qtopia::BusinessMobile, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setBusinessPager const QString str  )  [inline]
 

Sets the business pager number of the contact to str.

Definition at line 118 of file opimcontact.h.

References Qtopia::BusinessPager, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setBusinessPhone const QString str  )  [inline]
 

Sets the business phone number of the contact to str.

Definition at line 115 of file opimcontact.h.

References Qtopia::BusinessPhone, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setBusinessState const QString str  )  [inline]
 

Sets the business state of the contact to str.

Definition at line 108 of file opimcontact.h.

References Qtopia::BusinessState, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setBusinessStreet const QString str  )  [inline]
 

Sets the business street address of the contact to str.

Definition at line 106 of file opimcontact.h.

References Qtopia::BusinessStreet, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setBusinessWebpage const QString str  )  [inline]
 

Sets the business webpage of the contact to str.

Definition at line 111 of file opimcontact.h.

References Qtopia::BusinessWebPage, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setBusinessZip const QString str  )  [inline]
 

Sets the business zip code of the contact to str.

Definition at line 109 of file opimcontact.h.

References Qtopia::BusinessZip, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setChildren const QString str  ) 
 

Sets the list of children for the contact to those contained in str.

Definition at line 1081 of file opimcontact.cpp.

References Qtopia::Children, and replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setCompany const QString str  )  [inline]
 

Sets the company for contact to str.

Definition at line 105 of file opimcontact.h.

References Qtopia::Company, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setDefaultEmail const QString v  ) 
 

Sets the default email of the contact to str.

Definition at line 1255 of file opimcontact.cpp.

References Qtopia::DefaultEmail, insertEmail(), QString::isEmpty(), and replace().

Referenced by AddressbookWindow::appMessage(), insertEmail(), removeEmail(), ContactEditor::saveEntry(), and setEmails().

void Opie::OPimContact::setDepartment const QString str  )  [inline]
 

Sets the department for contact to str.

Definition at line 113 of file opimcontact.h.

References Qtopia::Department, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setEmails const QString str  ) 
 

Sets the list of email address for contact to those contained in str. Email address should be separated by ';'s.

Definition at line 1071 of file opimcontact.cpp.

References Qtopia::Emails, QString::isEmpty(), QString::null, replace(), and setDefaultEmail().

Referenced by ContactEditor::saveEntry().

void Opie::OPimContact::setFileAs  ) 
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Generates the string for the contact to be filed as from the first, middle and last name of the contact.

Definition at line 950 of file opimcontact.cpp.

References Qtopia::FileAs, find(), Qtopia::FirstName, firstName(), QString::isEmpty(), Qtopia::LastName, lastName(), Qtopia::MiddleName, middleName(), and replace().

void Opie::OPimContact::setFileAs const QString str  )  [inline]
 

Sets the contact to filed as str.

Definition at line 82 of file opimcontact.h.

References Qtopia::FileAs, and KateCommands::replace().

Referenced by AddressbookWindow::appMessage(), Opie::OPimContactAccessBackend_VCard::parseVObject(), ContactEditor::saveEntry(), and AbView::setShowByLetter().

void Opie::OPimContact::setFirstName const QString str  )  [inline]
 

Sets the first name of the contact to str.

Definition at line 78 of file opimcontact.h.

References Qtopia::FirstName, and KateCommands::replace().

Referenced by AddressbookWindow::appMessage(), Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setGender const QString str  )  [inline]
 

Sets the gender of the contact to str.

Definition at line 125 of file opimcontact.h.

References Qtopia::Gender, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setHomeCity const QString str  )  [inline]
 

Sets the home city of the contact to str.

Definition at line 95 of file opimcontact.h.

References Qtopia::HomeCity, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setHomeCountry const QString str  )  [inline]
 

Sets the home country of the contact to str.

Definition at line 98 of file opimcontact.h.

References Qtopia::HomeCountry, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setHomeFax const QString str  )  [inline]
 

Sets the home fax number of the contact to str.

Definition at line 100 of file opimcontact.h.

References Qtopia::HomeFax, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setHomeMobile const QString str  )  [inline]
 

Sets the home mobile phone number of the contact to str.

Definition at line 101 of file opimcontact.h.

References Qtopia::HomeMobile, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setHomePhone const QString str  )  [inline]
 

Sets the home phone number of the contact to str.

Definition at line 99 of file opimcontact.h.

References Qtopia::HomePhone, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setHomeState const QString str  )  [inline]
 

Sets the home state of the contact to str.

Definition at line 96 of file opimcontact.h.

References Qtopia::HomeState, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setHomeStreet const QString str  )  [inline]
 

Sets the home street address of the contact to str.

Definition at line 94 of file opimcontact.h.

References Qtopia::HomeStreet, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setHomeWebpage const QString str  )  [inline]
 

Sets the home webpage of the contact to str.

Definition at line 102 of file opimcontact.h.

References Qtopia::HomeWebPage, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setHomeZip const QString str  )  [inline]
 

Sets the home zip code of the contact to str.

Definition at line 97 of file opimcontact.h.

References Qtopia::HomeZip, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setJobTitle const QString str  )  [inline]
 

Sets the job title of the contact to str.

Definition at line 112 of file opimcontact.h.

References Qtopia::JobTitle, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setLastName const QString str  )  [inline]
 

Sets the last name of the contact to str.

Definition at line 80 of file opimcontact.h.

References Qtopia::LastName, and KateCommands::replace().

Referenced by AddressbookWindow::appMessage(), Opie::OPimContactAccessBackend_VCard::parseVObject(), ContactEditor::saveEntry(), and AbView::setShowByLetter().

void Opie::OPimContact::setManager const QString str  )  [inline]
 

Sets the manager of the contact to str.

Definition at line 121 of file opimcontact.h.

References Qtopia::Manager, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setMiddleName const QString str  )  [inline]
 

Sets the middle name of the contact to str.

Definition at line 79 of file opimcontact.h.

References Qtopia::MiddleName, and KateCommands::replace().

Referenced by AddressbookWindow::appMessage(), Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setNickname const QString str  )  [inline]
 

Sets the nickname of the contact to str.

Definition at line 128 of file opimcontact.h.

References Qtopia::Nickname, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setNotes const QString str  )  [inline]
 

Sets the notes about the contact to str.

Definition at line 132 of file opimcontact.h.

References Qtopia::Notes, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setOffice const QString str  )  [inline]
 

Sets the office for contact to str.

Definition at line 114 of file opimcontact.h.

References Qtopia::Office, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setProfession const QString str  )  [inline]
 

Sets the profession of the contact to str.

Definition at line 119 of file opimcontact.h.

References Qtopia::Profession, and KateCommands::replace().

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setSpouse const QString str  )  [inline]
 

Sets the spouse of the contact to str.

Definition at line 124 of file opimcontact.h.

References KateCommands::replace(), and Qtopia::Spouse.

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setSuffix const QString str  )  [inline]
 

Sets the suffix of the contact to str.

Definition at line 81 of file opimcontact.h.

References KateCommands::replace(), and Qtopia::Suffix.

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject(), and ContactEditor::saveEntry().

void Opie::OPimContact::setTitle const QString str  )  [inline]
 

Sets the title of the contact to str.

Definition at line 77 of file opimcontact.h.

References KateCommands::replace(), and Qtopia::Title.

Referenced by Opie::OPimContactAccessBackend_VCard::parseVObject().

void Opie::OPimContact::setUid int  i  )  [virtual]
 

For internal use only.

Sets the uid for this record to id.

Reimplemented from Opie::OPimRecord.

Definition at line 1300 of file opimcontact.cpp.

References Qtopia::AddressUid, QString::number(), replace(), and OPimRecord::setUid().

Referenced by Opie::OPimContactAccessBackend_VCard::load(), and OPimContact().

QString Opie::OPimContact::spouse  )  const [inline]
 

Returns the spouse of the contact.

Definition at line 201 of file opimcontact.h.

References Qtopia::Spouse.

Referenced by Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), ContactEditor::setEntry(), and toRichText().

QString Opie::OPimContact::suffix  )  const [inline]
 

Returns the suffix of the contact.

Definition at line 146 of file opimcontact.h.

References Qtopia::Suffix.

Referenced by Opie::Internal::OPimContactSortVector::compareItems(), Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), fullName(), and ContactEditor::setEntry().

QString Opie::OPimContact::title  )  const [inline]
 

Returns the title of the contact.

Definition at line 142 of file opimcontact.h.

References Qtopia::Title.

Referenced by Opie::Internal::OPimContactSortVector::compareItems(), Opie::OPimContactAccessBackend_VCard::createVObject(), AbTable::findContactContact(), and fullName().

QMap< int, QString > Opie::OPimContact::toMap  )  const [virtual]
 

For internal use only.

Implements Opie::OPimRecord.

Definition at line 433 of file opimcontact.cpp.

References Qtopia::AddressCategory, Qtopia::Record::categories(), Qtopia::Record::idsToString(), QMap< Key, T >::insert(), QString::isEmpty(), and mMap.

Referenced by Opie::OPimContactAccessBackend_SQL::queryByExample().

QString Opie::OPimContact::toRichText  )  const [virtual]
 

Returns a rich text formatted QString representing the contents the contact.

Implements Opie::OPimRecord.

Definition at line 445 of file opimcontact.cpp.

References anniversary(), assistant(), birthday(), businessCity(), businessCountry(), businessFax(), businessMobile(), businessPager(), businessPhone(), businessState(), businessStreet(), businessWebpage(), businessZip(), Opie::OPimRecord::categoryNames(), children(), City_State_Zip, company(), defaultEmail(), department(), emails(), Qtopia::escapeString(), fullName(), gender(), homeCity(), homeCountry(), homeFax(), homeMobile(), homePhone(), homeState(), homeStreet(), homeWebpage(), homeZip(), QString::isEmpty(), Opie::OPimRecord::isEmpty(), jobTitle(), manager(), marker, nickname(), notes(), TimeString::numberDateString(), office(), profession(), Config::readNumEntry(), Config::setGroup(), spouse(), str, text, QString::toInt(), tr, and Zip_City_State.

Referenced by Opie::Security::Internal::runPlugins(), and ContactItem::toRichText().

QString Opie::OPimContact::toShortText  )  const [virtual]
 

a small one line summary

Implements Opie::OPimRecord.

Definition at line 1110 of file opimcontact.cpp.

References fullName().

Referenced by ContactItem::ContactItem().

QString Opie::OPimContact::type  )  const [virtual]
 

the name of the Record

Implements Opie::OPimRecord.

Definition at line 1116 of file opimcontact.cpp.

References QString::fromLatin1().


Friends And Related Function Documentation

friend class DataSet [friend]
 

Definition at line 60 of file opimcontact.h.

friend class OPimContactAccessBackend_XML [friend]
 

Definition at line 239 of file opimcontact.h.


Member Data Documentation

OPimContactPrivate* Opie::OPimContact::d [private]
 

Reimplemented from Opie::OPimRecord.

Definition at line 255 of file opimcontact.h.

QMap<int, QString> Opie::OPimContact::mMap [private]
 

Definition at line 254 of file opimcontact.h.

Referenced by clearEmails(), find(), insert(), match(), OPimContact(), replace(), save(), and toMap().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:59:39 2005 for OPIE by  doxygen 1.4.2