-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 | |||
@@ -26,12 +26,15 @@ | |||
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 | ||
@@ -41,7 +44,8 @@ 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 | /** |
@@ -54,14 +58,15 @@ class OContactPrivate; | |||
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 | /* |
@@ -124,13 +129,13 @@ public: | |||
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; |
@@ -185,7 +190,7 @@ public: | |||
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 |
@@ -213,9 +218,9 @@ public: | |||
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 " "; } |
@@ -225,7 +230,7 @@ public: | |||
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 | ||
@@ -237,10 +242,10 @@ private: | |||
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; |