kpilot/lib
PilotAddress Class Reference
#include <pilotAddress.h>
Inheritance diagram for PilotAddress:

Detailed Description
A wrapper class around the Address struct provided by pi-address.h.This class allows the user to set and get address field values. For everything but phone fields, the user can simply pass the the pi-address enum for the index for setField() and getField() such as entryLastname.
Phone fields are a bit trickier. The structure allows for 8 possible phone fields with 5 possible slots. That means there could be three fields that don't have available storage. The setPhoneField() method will attempt to store the extra fields in a custom field if there is an overflow.
There are eight possible fields for 5 view slots:
- fields: Work, Home, Fax, Other, Pager, Mobile, E-mail, Main
- slots: entryPhone1, entryPhone2, entryPhone3, entryPhone4, entryPhone5
Internally in the pilot-link library, the AddressAppInfo phone array stores the strings for the eight possible phone values. Their English string values are :
- phone[0] = Work
- phone[1] = Home
- phone[2] = Fax
- phone[3] = Other
- phone[4] = E-mail
- phone[5] = Main
- phone[6] = Pager
- phone[7] = Mobile
Apparently, this order is kept for all languages, just with localized strings. The implementation of the internal methods will assume this order is kept. In other languages, main can replaced with Corporation.
Definition at line 190 of file pilotAddress.h.
Public Types | |
enum | PhoneHandlingFlags { NoFlags = 0, Replace } |
Public Member Functions | |
PilotAddress (PilotRecord *rec=0L) | |
PilotAddress (const PilotAddress ©From) | |
PilotAddress & | operator= (const PilotAddress &r) |
bool | operator== (const PilotAddress &r) |
virtual | ~PilotAddress () |
QString | getTextRepresentation (const PilotAddressInfo *info, Qt::TextFormat richText) const |
void | setField (int field, const QString &text) |
void | setField (const PhoneSlot &i, const QString &t) |
QString | getField (int field) const |
QString | getField (const PhoneSlot &i) const |
QStringList | getEmails () const |
void | setEmails (const QStringList &emails) |
QString | getPhoneField (PilotAddressInfo::EPhoneType type) const |
PhoneSlot | setPhoneField (PilotAddressInfo::EPhoneType type, const QString &value, PhoneHandlingFlags flags) |
PhoneSlot | getShownPhone () const |
PhoneSlot | setShownPhone (PilotAddressInfo::EPhoneType phoneType) |
const PhoneSlot & | setShownPhone (const PhoneSlot &v) |
PilotAddressInfo::EPhoneType | getPhoneType (const PhoneSlot &field) const |
PilotRecord * | pack () const |
const struct Address * | address () const |
Protected Member Functions | |
const char * | getFieldP (int field) const |
Member Enumeration Documentation
|
Definition at line 245 of file pilotAddress.h. |
Member Function Documentation
|
Return list of all email addresses. This will search through our "phone" fields and will return only those which are e-mail addresses. Definition at line 416 of file pilotAddress.cc. |
|
Returns the value of the phone field
Definition at line 233 of file pilotAddress.h. |
|
Returns the text value of a given field
Definition at line 462 of file pilotAddress.cc. |
|
Definition at line 534 of file pilotAddress.cc. |
|
Get the phone type (label) for a given field
The
Definition at line 590 of file pilotAddress.cc. |
|
Returns the slot of the phone number selected by the user to be shown in the overview of addresses.
Definition at line 547 of file pilotAddress.cc. |
|
Returns a text representation of the address.
If Definition at line 276 of file pilotAddress.cc. |
|
Set a field Uses the phone slots only. Definition at line 220 of file pilotAddress.h. |
|
Definition at line 602 of file pilotAddress.cc. |
|
Definition at line 489 of file pilotAddress.cc. |
|
Set the shown phone (the one preferred by the user for display on the handheld's overview page) to the given
Definition at line 553 of file pilotAddress.cc. |
|
Set the shown phone (the one preferred by the user for display on the handheld's overview page) to the type (not index) indicated. Looks through the phone entries of this record to find the first one one of this type.
Definition at line 563 of file pilotAddress.cc. |
The documentation for this class was generated from the following files: