-rw-r--r-- | libopie2/opiepim/ocontact.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libopie2/opiepim/ocontact.h b/libopie2/opiepim/ocontact.h index e0555c8..756c87d 100644 --- a/libopie2/opiepim/ocontact.h +++ b/libopie2/opiepim/ocontact.h | |||
@@ -187,58 +187,61 @@ public: | |||
187 | // // custom | 187 | // // custom |
188 | // const QString &customField( const QString &key ) | 188 | // const QString &customField( const QString &key ) |
189 | // { return find( Custom- + key ); } | 189 | // { return find( Custom- + key ); } |
190 | 190 | ||
191 | static QStringList fields(); | 191 | static QStringList fields(); |
192 | static QStringList trfields(); | 192 | static QStringList trfields(); |
193 | 193 | ||
194 | QString toRichText() const; | 194 | QString toRichText() const; |
195 | QMap<int, QString> toMap() const; | 195 | QMap<int, QString> toMap() const; |
196 | QString field( int key ) const { return find( key ); } | 196 | QString field( int key ) const { return find( key ); } |
197 | 197 | ||
198 | 198 | ||
199 | // journaling... | 199 | // journaling... |
200 | void saveJournal( journal_action action, const QString &key = QString::null ); | 200 | void saveJournal( journal_action action, const QString &key = QString::null ); |
201 | void save( QString &buf ) const; | 201 | void save( QString &buf ) const; |
202 | 202 | ||
203 | void setUid( int i ) | 203 | void setUid( int i ) |
204 | { Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } | 204 | { Record::setUid(i); replace( Qtopia::AddressUid , QString::number(i)); } |
205 | 205 | ||
206 | QString toShortText()const; | 206 | QString toShortText()const; |
207 | QString OContact::type()const; | 207 | QString OContact::type()const; |
208 | QMap<QString,QString> OContact::toExtraMap() const; | 208 | QMap<QString,QString> OContact::toExtraMap() const; |
209 | class QString OContact::recordField(int) const; | 209 | class QString OContact::recordField(int) const; |
210 | 210 | ||
211 | // Why private ? (eilers,se) | ||
212 | QString emailSeparator() const { return " "; } | ||
213 | // the emails should be seperated by a comma | ||
214 | void setEmails( const QString &v ); | ||
215 | QString emails() const { return find( Qtopia::Emails ); } | ||
216 | |||
217 | |||
211 | private: | 218 | private: |
212 | friend class AbEditor; | 219 | friend class AbEditor; |
213 | friend class AbTable; | 220 | friend class AbTable; |
214 | friend class AddressBookAccessPrivate; | 221 | friend class AddressBookAccessPrivate; |
215 | friend class XMLIO; | 222 | friend class XMLIO; |
216 | 223 | ||
217 | QString emailSeparator() const { return " "; } | ||
218 | // the emails should be seperated by a comma | ||
219 | void setEmails( const QString &v ); | ||
220 | QString emails() const { return find( Qtopia::Emails ); } | ||
221 | 224 | ||
222 | void insert( int key, const QString &value ); | 225 | void insert( int key, const QString &value ); |
223 | void replace( int key, const QString &value ); | 226 | void replace( int key, const QString &value ); |
224 | QString find( int key ) const; | 227 | QString find( int key ) const; |
225 | 228 | ||
226 | QString displayAddress( const QString &street, | 229 | QString displayAddress( const QString &street, |
227 | const QString &city, | 230 | const QString &city, |
228 | const QString &state, | 231 | const QString &state, |
229 | const QString &zip, | 232 | const QString &zip, |
230 | const QString &country ) const; | 233 | const QString &country ) const; |
231 | 234 | ||
232 | Qtopia::UidGen &uidGen() { return sUidGen; } | 235 | Qtopia::UidGen &uidGen() { return sUidGen; } |
233 | static Qtopia::UidGen sUidGen; | 236 | static Qtopia::UidGen sUidGen; |
234 | QMap<int, QString> mMap; | 237 | QMap<int, QString> mMap; |
235 | ContactPrivate *d; | 238 | ContactPrivate *d; |
236 | }; | 239 | }; |
237 | 240 | ||
238 | // these methods are inlined to keep binary compatability with Qtopia 1.5 | 241 | // these methods are inlined to keep binary compatability with Qtopia 1.5 |
239 | inline void OContact::insertEmail( const QString &v ) | 242 | inline void OContact::insertEmail( const QString &v ) |
240 | { | 243 | { |
241 | //qDebug("insertEmail %s", v.latin1()); | 244 | //qDebug("insertEmail %s", v.latin1()); |
242 | QString e = v.simplifyWhiteSpace(); | 245 | QString e = v.simplifyWhiteSpace(); |
243 | QString def = defaultEmail(); | 246 | QString def = defaultEmail(); |
244 | 247 | ||