summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/ocontact.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/ocontact.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ocontact.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/libopie2/opiepim/ocontact.h b/libopie2/opiepim/ocontact.h
index dd2de17..9a1a8dc 100644
--- a/libopie2/opiepim/ocontact.h
+++ b/libopie2/opiepim/ocontact.h
@@ -1,99 +1,104 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
** Copyright (C) 2002-2003 by Stefan Eilers (eilers.stefan@epost.de)
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef __OCONTACT_H__
#define __OCONTACT_H__
#include <opie/opimrecord.h>
#include <qpe/recordfields.h>
#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
-class ContactPrivate;
+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:
OContact();
OContact( const QMap<int, QString> &fromMap );
virtual ~OContact();
+ enum DateFormat{
+ 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 ); }
void setFileAs( const QString &v ) { replace( Qtopia::FileAs, v ); }
void setFileAs();
// default email address
void setDefaultEmail( const QString &v );
// inserts email to list and ensure's doesn't already exist
void insertEmail( const QString &v );
void removeEmail( const QString &v );
void clearEmails();
void insertEmails( const QStringList &v );
// home
void setHomeStreet( const QString &v ) { replace( Qtopia::HomeStreet, v ); }
void setHomeCity( const QString &v ) { replace( Qtopia::HomeCity, v ); }
void setHomeState( const QString &v ) { replace( Qtopia::HomeState, v ); }
void setHomeZip( const QString &v ) { replace( Qtopia::HomeZip, v ); }
void setHomeCountry( const QString &v ) { replace( Qtopia::HomeCountry, v ); }
void setHomePhone( const QString &v ) { replace( Qtopia::HomePhone, v ); }
void setHomeFax( const QString &v ) { replace( Qtopia::HomeFax, v ); }
void setHomeMobile( const QString &v ) { replace( Qtopia::HomeMobile, v ); }
void setHomeWebpage( const QString &v ) { replace( Qtopia::HomeWebPage, v ); }
// business
void setCompany( const QString &v ) { replace( Qtopia::Company, v ); }
void setBusinessStreet( const QString &v ) { replace( Qtopia::BusinessStreet, v ); }
void setBusinessCity( const QString &v ) { replace( Qtopia::BusinessCity, v ); }
void setBusinessState( const QString &v ) { replace( Qtopia::BusinessState, v ); }
void setBusinessZip( const QString &v ) { replace( Qtopia::BusinessZip, v ); }
void setBusinessCountry( const QString &v ) { replace( Qtopia::BusinessCountry, v ); }
void setBusinessWebpage( const QString &v ) { replace( Qtopia::BusinessWebPage, v ); }
void setJobTitle( const QString &v ) { replace( Qtopia::JobTitle, v ); }
void setDepartment( const QString &v ) { replace( Qtopia::Department, v ); }
void setOffice( const QString &v ) { replace( Qtopia::Office, v ); }
void setBusinessPhone( const QString &v ) { replace( Qtopia::BusinessPhone, v ); }
void setBusinessFax( const QString &v ) { replace( Qtopia::BusinessFax, v ); }
void setBusinessMobile( const QString &v ) { replace( Qtopia::BusinessMobile, v ); }
void setBusinessPager( const QString &v ) { replace( Qtopia::BusinessPager, v ); }
void setProfession( const QString &v ) { replace( Qtopia::Profession, v ); }
@@ -188,53 +193,53 @@ public:
// 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 ); }
QString toRichText() const;
QMap<int, QString> toMap() const;
QString field( int key ) const { return find( key ); }
void setUid( int i );
QString toShortText()const;
QString OContact::type()const;
QMap<QString,QString> OContact::toExtraMap() const;
class QString OContact::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:
// 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;
QMap<int, QString> mMap;
- ContactPrivate *d;
+ OContactPrivate *d;
};
#endif