author | mickeyl <mickeyl> | 2004-02-23 13:15:42 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-23 13:15:42 (UTC) |
commit | f9f0c26d9ac94586ffc36efa1b582ece3dbc43cf (patch) (side-by-side diff) | |
tree | 4044006e676c78370fdeccf960ea4214f13eabd2 /libopie2/opiepim/ocontact.h | |
parent | 2d37d653310da0a9d6e2e2e6c9f5bf092e54cbbb (diff) | |
download | opie-f9f0c26d9ac94586ffc36efa1b582ece3dbc43cf.zip opie-f9f0c26d9ac94586ffc36efa1b582ece3dbc43cf.tar.gz opie-f9f0c26d9ac94586ffc36efa1b582ece3dbc43cf.tar.bz2 |
cosmetics
-rw-r--r-- | libopie2/opiepim/ocontact.h | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/libopie2/opiepim/ocontact.h b/libopie2/opiepim/ocontact.h index 34888dc..445fd7d 100644 --- a/libopie2/opiepim/ocontact.h +++ b/libopie2/opiepim/ocontact.h @@ -17,60 +17,65 @@ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __OCONTACT_H__ -#define __OCONTACT_H__ +#ifndef OCONTACT_H +#define OCONTACT_H + +/* OPIE */ #include <opie2/opimrecord.h> #include <qpe/recordfields.h> +/* QT */ #include <qdatetime.h> #include <qstringlist.h> #if defined(QPC_TEMPLATEDLL) // MOC_SKIP_BEGIN QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>; // MOC_SKIP_END #endif -namespace Opie { +namespace Opie +{ class OContactPrivate; /** * OContact class represents a specialised PIM Record for contacts. * It does store all kind of persopn related information. * * @short Contact Container * @author TT, Stefan Eiler, Holger Freyther */ class QPC_EXPORT OContact : public OPimRecord { friend class DataSet; -public: + + public: OContact(); OContact( const QMap<int, QString> &fromMap ); virtual ~OContact(); enum DateFormat{ - Zip_City_State = 0, - City_State_Zip + Zip_City_State = 0, + City_State_Zip }; /* * do we need to inline them * if yes do we need to inline them this way? * -zecke */ void setTitle( const QString &v ) { replace( Qtopia::Title, v ); } void setFirstName( const QString &v ) { replace( Qtopia::FirstName, v ); } void setMiddleName( const QString &v ) { replace( Qtopia::MiddleName, v ); } void setLastName( const QString &v ) { replace( Qtopia::LastName, v ); } void setSuffix( const QString &v ) { replace( Qtopia::Suffix, v ); } @@ -115,31 +120,31 @@ public: void setAssistant( const QString &v ) { replace( Qtopia::Assistant, v ); } void setManager( const QString &v ) { replace( Qtopia::Manager, v ); } // personal void setSpouse( const QString &v ) { replace( Qtopia::Spouse, v ); } void setGender( const QString &v ) { replace( Qtopia::Gender, v ); } void setBirthday( const QDate &v ); void setAnniversary( const QDate &v ); void setNickname( const QString &v ) { replace( Qtopia::Nickname, v ); } void setChildren( const QString &v ); // other - void setNotes( const QString &v ) { replace( Qtopia::Notes, v); } + void setNotes( const QString &v ) { replace( Qtopia::Notes, v ); } virtual bool match( const QRegExp ®exp ) const; -// // custom -// void setCustomField( const QString &key, const QString &v ) -// { replace(Custom- + key, v ); } + // // custom + // void setCustomField( const QString &key, const QString &v ) + // { replace(Custom- + key, v ); } // name QString fullName() const; QString title() const { return find( Qtopia::Title ); } QString firstName() const { return find( Qtopia::FirstName ); } QString middleName() const { return find( Qtopia::MiddleName ); } QString lastName() const { return find( Qtopia::LastName ); } QString suffix() const { return find( Qtopia::Suffix ); } QString fileAs() const { return find( Qtopia::FileAs ); } // email QString defaultEmail() const { return find( Qtopia::DefaultEmail ); } @@ -176,25 +181,25 @@ public: QString businessCountry() const { return find( Qtopia::BusinessCountry ); } QString businessWebpage() const { return find( Qtopia::BusinessWebPage ); } QString jobTitle() const { return find( Qtopia::JobTitle ); } QString department() const { return find( Qtopia::Department ); } 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 + /** 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 ); } QDate birthday() const; QDate anniversary() const; QString nickname() const { return find( Qtopia::Nickname ); } @@ -204,48 +209,48 @@ public: // other QString notes() const { return find( Qtopia::Notes ); } QString groups() const { return find( Qtopia::Groups ); } QStringList groupList() const; QString toRichText() const; QMap<int, QString> toMap() const; QString field( int key ) const { return find( key ); } void setUid( int i ); - QString toShortText()const; - QString type()const; - class QString recordField(int) const; + QString toShortText() const; + QString type() const; + class QString recordField( int ) const; // Why private ? (eilers,se) QString emailSeparator() const { return " "; } // the emails should be seperated by a comma void setEmails( const QString &v ); QString emails() const { return find( Qtopia::Emails ); } static int rtti(); -private: + private: // The XML Backend needs some access to the private functions friend class OContactAccessBackend_XML; void insert( int key, const QString &value ); void replace( int key, const QString &value ); QString find( int key ) const; static QStringList fields(); void save( QString &buf ) const; QString displayAddress( const QString &street, - const QString &city, - const QString &state, - const QString &zip, - const QString &country ) const; + const QString &city, + const QString &state, + const QString &zip, + const QString &country ) const; QMap<int, QString> mMap; OContactPrivate *d; }; } #endif |