-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 | |||
@@ -25,14 +25,17 @@ | |||
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | #ifndef __OCONTACT_H__ | ||
30 | #define __OCONTACT_H__ | ||
31 | 29 | ||
30 | #ifndef OCONTACT_H | ||
31 | #define OCONTACT_H | ||
32 | |||
33 | /* OPIE */ | ||
32 | #include <opie2/opimrecord.h> | 34 | #include <opie2/opimrecord.h> |
33 | #include <qpe/recordfields.h> | 35 | #include <qpe/recordfields.h> |
34 | 36 | ||
37 | /* QT */ | ||
35 | #include <qdatetime.h> | 38 | #include <qdatetime.h> |
36 | #include <qstringlist.h> | 39 | #include <qstringlist.h> |
37 | 40 | ||
38 | #if defined(QPC_TEMPLATEDLL) | 41 | #if defined(QPC_TEMPLATEDLL) |
@@ -40,9 +43,10 @@ | |||
40 | QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>; | 43 | QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>; |
41 | // MOC_SKIP_END | 44 | // MOC_SKIP_END |
42 | #endif | 45 | #endif |
43 | 46 | ||
44 | namespace Opie { | 47 | namespace Opie |
48 | { | ||
45 | class OContactPrivate; | 49 | class OContactPrivate; |
46 | 50 | ||
47 | /** | 51 | /** |
48 | * OContact class represents a specialised PIM Record for contacts. | 52 | * OContact class represents a specialised PIM Record for contacts. |
@@ -53,16 +57,17 @@ class OContactPrivate; | |||
53 | */ | 57 | */ |
54 | class QPC_EXPORT OContact : public OPimRecord | 58 | class QPC_EXPORT OContact : public OPimRecord |
55 | { | 59 | { |
56 | friend class DataSet; | 60 | friend class DataSet; |
57 | public: | 61 | |
62 | public: | ||
58 | OContact(); | 63 | OContact(); |
59 | OContact( const QMap<int, QString> &fromMap ); | 64 | OContact( const QMap<int, QString> &fromMap ); |
60 | virtual ~OContact(); | 65 | virtual ~OContact(); |
61 | 66 | ||
62 | enum DateFormat{ | 67 | enum DateFormat{ |
63 | Zip_City_State = 0, | 68 | Zip_City_State = 0, |
64 | City_State_Zip | 69 | City_State_Zip |
65 | }; | 70 | }; |
66 | 71 | ||
67 | /* | 72 | /* |
68 | * do we need to inline them | 73 | * do we need to inline them |
@@ -123,15 +128,15 @@ public: | |||
123 | void setNickname( const QString &v ) { replace( Qtopia::Nickname, v ); } | 128 | void setNickname( const QString &v ) { replace( Qtopia::Nickname, v ); } |
124 | void setChildren( const QString &v ); | 129 | void setChildren( const QString &v ); |
125 | 130 | ||
126 | // other | 131 | // other |
127 | void setNotes( const QString &v ) { replace( Qtopia::Notes, v); } | 132 | void setNotes( const QString &v ) { replace( Qtopia::Notes, v ); } |
128 | 133 | ||
129 | virtual bool match( const QRegExp ®exp ) const; | 134 | virtual bool match( const QRegExp ®exp ) const; |
130 | 135 | ||
131 | // // custom | 136 | // // custom |
132 | // void setCustomField( const QString &key, const QString &v ) | 137 | // void setCustomField( const QString &key, const QString &v ) |
133 | // { replace(Custom- + key, v ); } | 138 | // { replace(Custom- + key, v ); } |
134 | 139 | ||
135 | // name | 140 | // name |
136 | QString fullName() const; | 141 | QString fullName() const; |
137 | QString title() const { return find( Qtopia::Title ); } | 142 | QString title() const { return find( Qtopia::Title ); } |
@@ -184,9 +189,9 @@ public: | |||
184 | QString businessPager() const { return find( Qtopia::BusinessPager ); } | 189 | QString businessPager() const { return find( Qtopia::BusinessPager ); } |
185 | QString profession() const { return find( Qtopia::Profession ); } | 190 | QString profession() const { return find( Qtopia::Profession ); } |
186 | QString assistant() const { return find( Qtopia::Assistant ); } | 191 | QString assistant() const { return find( Qtopia::Assistant ); } |
187 | QString manager() const { return find( Qtopia::Manager ); } | 192 | QString manager() const { return find( Qtopia::Manager ); } |
188 | /** Multi line string containing all non-empty address info in the form | 193 | /** Multi line string containing all non-empty address info in the form |
189 | * Street | 194 | * Street |
190 | * City, State Zip | 195 | * City, State Zip |
191 | * Country | 196 | * Country |
192 | */ | 197 | */ |
@@ -212,11 +217,11 @@ public: | |||
212 | 217 | ||
213 | 218 | ||
214 | void setUid( int i ); | 219 | void setUid( int i ); |
215 | 220 | ||
216 | QString toShortText()const; | 221 | QString toShortText() const; |
217 | QString type()const; | 222 | QString type() const; |
218 | class QString recordField(int) const; | 223 | class QString recordField( int ) const; |
219 | 224 | ||
220 | // Why private ? (eilers,se) | 225 | // Why private ? (eilers,se) |
221 | QString emailSeparator() const { return " "; } | 226 | QString emailSeparator() const { return " "; } |
222 | 227 | ||
@@ -224,9 +229,9 @@ public: | |||
224 | void setEmails( const QString &v ); | 229 | void setEmails( const QString &v ); |
225 | QString emails() const { return find( Qtopia::Emails ); } | 230 | QString emails() const { return find( Qtopia::Emails ); } |
226 | static int rtti(); | 231 | static int rtti(); |
227 | 232 | ||
228 | private: | 233 | private: |
229 | // The XML Backend needs some access to the private functions | 234 | // The XML Backend needs some access to the private functions |
230 | friend class OContactAccessBackend_XML; | 235 | friend class OContactAccessBackend_XML; |
231 | 236 | ||
232 | void insert( int key, const QString &value ); | 237 | void insert( int key, const QString &value ); |
@@ -236,12 +241,12 @@ private: | |||
236 | 241 | ||
237 | void save( QString &buf ) const; | 242 | void save( QString &buf ) const; |
238 | 243 | ||
239 | QString displayAddress( const QString &street, | 244 | QString displayAddress( const QString &street, |
240 | const QString &city, | 245 | const QString &city, |
241 | const QString &state, | 246 | const QString &state, |
242 | const QString &zip, | 247 | const QString &zip, |
243 | const QString &country ) const; | 248 | const QString &country ) const; |
244 | 249 | ||
245 | QMap<int, QString> mMap; | 250 | QMap<int, QString> mMap; |
246 | OContactPrivate *d; | 251 | OContactPrivate *d; |
247 | }; | 252 | }; |