author | eilers <eilers> | 2003-08-01 12:30:16 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-08-01 12:30:16 (UTC) |
commit | 6c715b67a8f0e32a4edca5be91332622834c8d91 (patch) (unidiff) | |
tree | ae2d660e1fd9c990c2d725c075ce6c42480b0af8 /libopie2/opiepim | |
parent | cb45aa10043fdd6fddcab42ef0e07ddafc3d506d (diff) | |
download | opie-6c715b67a8f0e32a4edca5be91332622834c8d91.zip opie-6c715b67a8f0e32a4edca5be91332622834c8d91.tar.gz opie-6c715b67a8f0e32a4edca5be91332622834c8d91.tar.bz2 |
Merging changes from BRANCH_1_0 to HEAD
22 files changed, 327 insertions, 122 deletions
diff --git a/libopie2/opiepim/backend/obackendfactory.h b/libopie2/opiepim/backend/obackendfactory.h index ad6cf5a..f3c339d 100644 --- a/libopie2/opiepim/backend/obackendfactory.h +++ b/libopie2/opiepim/backend/obackendfactory.h | |||
@@ -17,4 +17,12 @@ | |||
17 | * History: | 17 | * History: |
18 | * $Log$ | 18 | * $Log$ |
19 | * Revision 1.7 2003/08/01 12:30:16 eilers | ||
20 | * Merging changes from BRANCH_1_0 to HEAD | ||
21 | * | ||
22 | * Revision 1.6.4.1 2003/06/30 14:34:19 eilers | ||
23 | * Patches from Zecke: | ||
24 | * Fixing and cleaning up extraMap handling | ||
25 | * Adding d_ptr for binary compatibility in the future | ||
26 | * | ||
19 | * Revision 1.6 2003/04/13 18:07:10 zecke | 27 | * Revision 1.6 2003/04/13 18:07:10 zecke |
20 | * More API doc | 28 | * More API doc |
@@ -69,4 +77,6 @@ | |||
69 | #endif | 77 | #endif |
70 | 78 | ||
79 | class OBackendPrivate; | ||
80 | |||
71 | /** | 81 | /** |
72 | * This class is our factory. It will give us the default implementations | 82 | * This class is our factory. It will give us the default implementations |
@@ -149,4 +159,6 @@ class OBackendFactory | |||
149 | 159 | ||
150 | } | 160 | } |
161 | private: | ||
162 | OBackendPrivate* d; | ||
151 | }; | 163 | }; |
152 | 164 | ||
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend.h b/libopie2/opiepim/backend/ocontactaccessbackend.h index ebeb42d..280e05c 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend.h +++ b/libopie2/opiepim/backend/ocontactaccessbackend.h | |||
@@ -20,4 +20,12 @@ | |||
20 | * History: | 20 | * History: |
21 | * $Log$ | 21 | * $Log$ |
22 | * Revision 1.6 2003/08/01 12:30:16 eilers | ||
23 | * Merging changes from BRANCH_1_0 to HEAD | ||
24 | * | ||
25 | * Revision 1.5.4.1 2003/06/30 14:34:19 eilers | ||
26 | * Patches from Zecke: | ||
27 | * Fixing and cleaning up extraMap handling | ||
28 | * Adding d_ptr for binary compatibility in the future | ||
29 | * | ||
22 | * Revision 1.5 2003/04/13 18:07:10 zecke | 30 | * Revision 1.5 2003/04/13 18:07:10 zecke |
23 | * More API doc | 31 | * More API doc |
@@ -103,5 +111,9 @@ class OContactAccessBackend: public OPimAccessBackend<OContact> { | |||
103 | */ | 111 | */ |
104 | virtual QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0; | 112 | virtual QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0; |
105 | 113 | ||
114 | |||
115 | private: | ||
116 | class Private; | ||
117 | Private *d; | ||
106 | }; | 118 | }; |
107 | #endif | 119 | #endif |
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp index 270bef3..b60c5be 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp | |||
@@ -18,4 +18,19 @@ | |||
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.11 2003/08/01 12:30:16 eilers | ||
21 | * Merging changes from BRANCH_1_0 to HEAD | ||
22 | * | ||
23 | * Revision 1.10.4.3 2003/07/23 08:54:37 eilers | ||
24 | * Default email was added to the list of all emails, which already contains | ||
25 | * the default email.. | ||
26 | * This closes bug #1045 | ||
27 | * | ||
28 | * Revision 1.10.4.2 2003/07/23 08:44:45 eilers | ||
29 | * Importing of Notes in vcard files wasn't implemented. | ||
30 | * Closes bug #1044 | ||
31 | * | ||
32 | * Revision 1.10.4.1 2003/06/02 13:37:49 eilers | ||
33 | * Fixing memory leak | ||
34 | * | ||
20 | * Revision 1.10 2003/04/13 18:07:10 zecke | 35 | * Revision 1.10 2003/04/13 18:07:10 zecke |
21 | * More API doc | 36 | * More API doc |
@@ -152,4 +167,5 @@ bool OContactAccessBackend_VCard::save() | |||
152 | } | 167 | } |
153 | cleanStrTbl(); | 168 | cleanStrTbl(); |
169 | deleteVObject( obj ); | ||
154 | 170 | ||
155 | m_dirty = false; | 171 | m_dirty = false; |
@@ -447,5 +463,7 @@ OContact OContactAccessBackend_VCard::parseVObject( VObject *obj ) | |||
447 | 463 | ||
448 | } | 464 | } |
449 | 465 | else if ( name == VCCommentProp ) { | |
466 | c.setNotes( value ); | ||
467 | } | ||
450 | #if 0 | 468 | #if 0 |
451 | else { | 469 | else { |
@@ -535,5 +553,5 @@ VObject* OContactAccessBackend_VCard::createVObject( const OContact &c ) | |||
535 | 553 | ||
536 | QStringList emails = c.emailList(); | 554 | QStringList emails = c.emailList(); |
537 | emails.prepend( c.defaultEmail() ); | 555 | // emails.prepend( c.defaultEmail() ); Fix for bugreport #1045 |
538 | for( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) { | 556 | for( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) { |
539 | VObject *email = safeAddPropValue( vcard, VCEmailAddressProp, *it ); | 557 | VObject *email = safeAddPropValue( vcard, VCEmailAddressProp, *it ); |
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp index 097142b..1c21619 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.cpp | |||
@@ -18,4 +18,7 @@ | |||
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.7 2003/08/01 12:30:16 eilers | ||
21 | * Merging changes from BRANCH_1_0 to HEAD | ||
22 | * | ||
20 | * Revision 1.6 2003/07/07 16:19:47 eilers | 23 | * Revision 1.6 2003/07/07 16:19:47 eilers |
21 | * Fixing serious bug in hasQuerySettings() | 24 | * Fixing serious bug in hasQuerySettings() |
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend.h b/libopie2/opiepim/backend/odatebookaccessbackend.h index 86ff298..3c02c42 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend.h +++ b/libopie2/opiepim/backend/odatebookaccessbackend.h | |||
@@ -69,4 +69,8 @@ public: | |||
69 | virtual OEffectiveEvent::ValueList effecticeEvents( const QDateTime& start ); | 69 | virtual OEffectiveEvent::ValueList effecticeEvents( const QDateTime& start ); |
70 | 70 | ||
71 | private: | ||
72 | class Private; | ||
73 | Private *d; | ||
74 | |||
71 | }; | 75 | }; |
72 | 76 | ||
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp index ab2eea4..5ea945c 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp +++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp | |||
@@ -431,7 +431,7 @@ bool ODateBookAccessBackend_XML::loadFile() { | |||
431 | find = dict[attr.data()]; | 431 | find = dict[attr.data()]; |
432 | if (!find) | 432 | if (!find) |
433 | ev.setCustomField( attr, value ); | 433 | ev.setCustomField( attr, str ); |
434 | else { | 434 | else { |
435 | setField( ev, *find, value ); | 435 | setField( ev, *find, str ); |
436 | } | 436 | } |
437 | } | 437 | } |
@@ -454,5 +454,5 @@ void ODateBookAccessBackend_XML::finalizeRecord( OEvent& ev ) { | |||
454 | }else { | 454 | }else { |
455 | /* to current date time */ | 455 | /* to current date time */ |
456 | qWarning(" Start is %d", start ); | 456 | // qWarning(" Start is %d", start ); |
457 | OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); | 457 | OTimeZone zone( ev.timeZone().isEmpty() ? OTimeZone::current() : ev.timeZone() ); |
458 | QDateTime date = zone.toDateTime( start ); | 458 | QDateTime date = zone.toDateTime( start ); |
diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h index f4bbe35..c3d91f7 100644 --- a/libopie2/opiepim/backend/opimaccessbackend.h +++ b/libopie2/opiepim/backend/opimaccessbackend.h | |||
@@ -8,4 +8,5 @@ | |||
8 | 8 | ||
9 | 9 | ||
10 | class OPimAccessBackendPrivate; | ||
10 | /** | 11 | /** |
11 | * OPimAccessBackend is the base class | 12 | * OPimAccessBackend is the base class |
@@ -108,6 +109,5 @@ protected: | |||
108 | 109 | ||
109 | private: | 110 | private: |
110 | class Private; | 111 | OPimAccessBackendPrivate *d; |
111 | Private* d; | ||
112 | Frontend* m_front; | 112 | Frontend* m_front; |
113 | uint m_read; | 113 | uint m_read; |
diff --git a/libopie2/opiepim/backend/otodoaccessbackend.h b/libopie2/opiepim/backend/otodoaccessbackend.h index 05e8ca9..6be95bc 100644 --- a/libopie2/opiepim/backend/otodoaccessbackend.h +++ b/libopie2/opiepim/backend/otodoaccessbackend.h | |||
@@ -19,4 +19,8 @@ public: | |||
19 | virtual void removeAllCompleted() = 0; | 19 | virtual void removeAllCompleted() = 0; |
20 | virtual QBitArray supports()const = 0; | 20 | virtual QBitArray supports()const = 0; |
21 | |||
22 | private: | ||
23 | class Private; | ||
24 | Private *d; | ||
21 | 25 | ||
22 | }; | 26 | }; |
diff --git a/libopie2/opiepim/backend/otodoaccessvcal.cpp b/libopie2/opiepim/backend/otodoaccessvcal.cpp index 3577e14..6415952 100644 --- a/libopie2/opiepim/backend/otodoaccessvcal.cpp +++ b/libopie2/opiepim/backend/otodoaccessvcal.cpp | |||
@@ -16,10 +16,18 @@ namespace { | |||
16 | if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){ | 16 | if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){ |
17 | name = vObjectStringZValue( ob ); | 17 | name = vObjectStringZValue( ob ); |
18 | #if 0 | ||
18 | event.setDescription( name ); | 19 | event.setDescription( name ); |
20 | #else | ||
21 | event.setSummary( name ); | ||
22 | #endif | ||
19 | } | 23 | } |
20 | // summary | 24 | // summary |
21 | if ( ( ob = isAPropertyOf( obj, VCSummaryProp ) ) != 0 ) { | 25 | if ( ( ob = isAPropertyOf( obj, VCSummaryProp ) ) != 0 ) { |
22 | name = vObjectStringZValue( ob ); | 26 | name = vObjectStringZValue( ob ); |
27 | #if 0 | ||
23 | event.setSummary( name ); | 28 | event.setSummary( name ); |
29 | #else | ||
30 | event.setDescription( name ); | ||
31 | #endif | ||
24 | } | 32 | } |
25 | // completed | 33 | // completed |
@@ -75,4 +83,12 @@ namespace { | |||
75 | event.idsToString( event.categories() ).local8Bit() ); | 83 | event.idsToString( event.categories() ).local8Bit() ); |
76 | 84 | ||
85 | #if 0 | ||
86 | |||
87 | // There seems a misrepresentation between summary in otodoevent | ||
88 | // and summary in vcard. | ||
89 | // The same with description.. | ||
90 | // Description is summary and vice versa.. Argh.. (eilers) | ||
91 | |||
92 | |||
77 | addPropValue( task, VCDescriptionProp, | 93 | addPropValue( task, VCDescriptionProp, |
78 | event.description().local8Bit() ); | 94 | event.description().local8Bit() ); |
@@ -80,4 +96,12 @@ namespace { | |||
80 | addPropValue( task, VCSummaryProp, | 96 | addPropValue( task, VCSummaryProp, |
81 | event.summary().local8Bit() ); | 97 | event.summary().local8Bit() ); |
98 | |||
99 | #else | ||
100 | addPropValue( task, VCDescriptionProp, | ||
101 | event.summary().local8Bit() ); | ||
102 | |||
103 | addPropValue( task, VCSummaryProp, | ||
104 | event.description().local8Bit() ); | ||
105 | #endif | ||
82 | return task; | 106 | return task; |
83 | }; | 107 | }; |
@@ -186,5 +210,5 @@ QArray<int> OTodoAccessVCal::allRecords()const { | |||
186 | return ar; | 210 | return ar; |
187 | } | 211 | } |
188 | QArray<int> OTodoAccessVCal::matchRegexp(const QRegExp &r)const { | 212 | QArray<int> OTodoAccessVCal::matchRegexp(const QRegExp& /* r */)const { |
189 | QArray<int> ar(0); | 213 | QArray<int> ar(0); |
190 | return ar; | 214 | return ar; |
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp index 3d15354..f688735 100644 --- a/libopie2/opiepim/backend/otodoaccessxml.cpp +++ b/libopie2/opiepim/backend/otodoaccessxml.cpp | |||
@@ -88,5 +88,5 @@ bool OTodoAccessXML::load() { | |||
88 | * UPDATE dict if you change anything!!! | 88 | * UPDATE dict if you change anything!!! |
89 | */ | 89 | */ |
90 | QAsciiDict<int> dict(21); | 90 | QAsciiDict<int> dict(26); |
91 | dict.setAutoDelete( TRUE ); | 91 | dict.setAutoDelete( TRUE ); |
92 | dict.insert("Categories" , new int(OTodo::Category) ); | 92 | dict.insert("Categories" , new int(OTodo::Category) ); |
@@ -837,8 +837,10 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder, | |||
837 | }; | 837 | }; |
838 | void OTodoAccessXML::removeAllCompleted() { | 838 | void OTodoAccessXML::removeAllCompleted() { |
839 | QMap<int, OTodo> events = m_events; | ||
839 | for ( QMap<int, OTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) { | 840 | for ( QMap<int, OTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) { |
840 | if ( (*it).isCompleted() ) | 841 | if ( (*it).isCompleted() ) |
841 | m_events.remove( it ); | 842 | events.remove( it.key() ); |
842 | } | 843 | } |
844 | m_events = events; | ||
843 | } | 845 | } |
844 | QBitArray OTodoAccessXML::supports()const { | 846 | QBitArray OTodoAccessXML::supports()const { |
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h index e90db32..9b0a719 100644 --- a/libopie2/opiepim/core/ocontactaccess.h +++ b/libopie2/opiepim/core/ocontactaccess.h | |||
@@ -18,4 +18,12 @@ | |||
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.9 2003/08/01 12:30:16 eilers | ||
21 | * Merging changes from BRANCH_1_0 to HEAD | ||
22 | * | ||
23 | * Revision 1.8.2.1 2003/06/30 14:34:19 eilers | ||
24 | * Patches from Zecke: | ||
25 | * Fixing and cleaning up extraMap handling | ||
26 | * Adding d_ptr for binary compatibility in the future | ||
27 | * | ||
20 | * Revision 1.8 2003/05/08 13:55:09 tille | 28 | * Revision 1.8 2003/05/08 13:55:09 tille |
21 | * search stuff | 29 | * search stuff |
@@ -166,4 +174,7 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact> | |||
166 | void copMessage( const QCString &msg, const QByteArray &data ); | 174 | void copMessage( const QCString &msg, const QByteArray &data ); |
167 | 175 | ||
176 | private: | ||
177 | class Private; | ||
178 | Private *d; | ||
168 | 179 | ||
169 | }; | 180 | }; |
diff --git a/libopie2/opiepim/core/oconversion.h b/libopie2/opiepim/core/oconversion.h index 13367e1..4c0a497 100644 --- a/libopie2/opiepim/core/oconversion.h +++ b/libopie2/opiepim/core/oconversion.h | |||
@@ -38,4 +38,9 @@ public: | |||
38 | static QString dateTimeToString( const QDateTime& ); | 38 | static QString dateTimeToString( const QDateTime& ); |
39 | static QDateTime dateTimeFromString( const QString& ); | 39 | static QDateTime dateTimeFromString( const QString& ); |
40 | |||
41 | private: | ||
42 | class Private; | ||
43 | Private* d; | ||
44 | |||
40 | }; | 45 | }; |
41 | 46 | ||
diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h index 8ff205c..ecbeb68 100644 --- a/libopie2/opiepim/core/opimaccesstemplate.h +++ b/libopie2/opiepim/core/opimaccesstemplate.h | |||
@@ -11,4 +11,5 @@ | |||
11 | #include "otemplatebase.h" | 11 | #include "otemplatebase.h" |
12 | 12 | ||
13 | class OPimAccessTemplatePrivate; | ||
13 | /** | 14 | /** |
14 | * Thats the frontend to our OPIE PIM | 15 | * Thats the frontend to our OPIE PIM |
@@ -153,4 +154,7 @@ protected: | |||
153 | Cache m_cache; | 154 | Cache m_cache; |
154 | 155 | ||
156 | private: | ||
157 | OPimAccessTemplatePrivate *d; | ||
158 | |||
155 | }; | 159 | }; |
156 | 160 | ||
diff --git a/libopie2/opiepim/core/opimcache.h b/libopie2/opiepim/core/opimcache.h index 73414e5..7f7cff5 100644 --- a/libopie2/opiepim/core/opimcache.h +++ b/libopie2/opiepim/core/opimcache.h | |||
@@ -6,4 +6,6 @@ | |||
6 | #include "opimrecord.h" | 6 | #include "opimrecord.h" |
7 | 7 | ||
8 | class OPimCacheItemPrivate; | ||
9 | |||
8 | template <class T = OPimRecord> | 10 | template <class T = OPimRecord> |
9 | class OPimCacheItem { | 11 | class OPimCacheItem { |
@@ -19,6 +21,9 @@ public: | |||
19 | private: | 21 | private: |
20 | T m_t; | 22 | T m_t; |
23 | OPimCacheItemPrivate *d; | ||
21 | }; | 24 | }; |
22 | 25 | ||
26 | |||
27 | class OPimCachePrivate; | ||
23 | /** | 28 | /** |
24 | * OPimCache for caching the items | 29 | * OPimCache for caching the items |
@@ -47,4 +52,5 @@ public: | |||
47 | private: | 52 | private: |
48 | QIntCache<Item> m_cache; | 53 | QIntCache<Item> m_cache; |
54 | OPimCachePrivate* d; | ||
49 | }; | 55 | }; |
50 | 56 | ||
diff --git a/libopie2/opiepim/core/opimxrefmanager.h b/libopie2/opiepim/core/opimxrefmanager.h index 39e5eef..c485e98 100644 --- a/libopie2/opiepim/core/opimxrefmanager.h +++ b/libopie2/opiepim/core/opimxrefmanager.h | |||
@@ -37,4 +37,6 @@ public: | |||
37 | private: | 37 | private: |
38 | OPimXRef::ValueList m_list; | 38 | OPimXRef::ValueList m_list; |
39 | class Private; | ||
40 | Private *d; | ||
39 | }; | 41 | }; |
40 | 42 | ||
diff --git a/libopie2/opiepim/core/otemplatebase.h b/libopie2/opiepim/core/otemplatebase.h index 29fb6ec..cadac74 100644 --- a/libopie2/opiepim/core/otemplatebase.h +++ b/libopie2/opiepim/core/otemplatebase.h | |||
@@ -15,4 +15,5 @@ | |||
15 | * POOR mans interface | 15 | * POOR mans interface |
16 | */ | 16 | */ |
17 | class OPimBasePrivate; | ||
17 | struct OPimBase { | 18 | struct OPimBase { |
18 | /** | 19 | /** |
@@ -33,4 +34,6 @@ struct OPimBase { | |||
33 | * -zecke | 34 | * -zecke |
34 | */ | 35 | */ |
36 | private: | ||
37 | OPimBasePrivate* d; | ||
35 | 38 | ||
36 | }; | 39 | }; |
@@ -39,4 +42,5 @@ struct OPimBase { | |||
39 | * T needs to implement the copy c'tor!!! | 42 | * T needs to implement the copy c'tor!!! |
40 | */ | 43 | */ |
44 | class OTemplateBasePrivate; | ||
41 | template <class T = OPimRecord> | 45 | template <class T = OPimRecord> |
42 | class OTemplateBase : public OPimBase { | 46 | class OTemplateBase : public OPimBase { |
@@ -62,4 +66,7 @@ public: | |||
62 | OPimRecord* record(int uid )const; | 66 | OPimRecord* record(int uid )const; |
63 | static T* rec(); | 67 | static T* rec(); |
68 | |||
69 | private: | ||
70 | OTemplateBasePrivate *d; | ||
64 | }; | 71 | }; |
65 | 72 | ||
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp index be4ce0a..3473baa 100644 --- a/libopie2/opiepim/ocontact.cpp +++ b/libopie2/opiepim/ocontact.cpp | |||
@@ -22,8 +22,9 @@ | |||
22 | #include "ocontact.h" | 22 | #include "ocontact.h" |
23 | #include "opimresolver.h" | 23 | #include "opimresolver.h" |
24 | #include "oconversion.h" | ||
24 | 25 | ||
25 | #include <qpe/stringutil.h> | 26 | #include <qpe/stringutil.h> |
26 | #include "oconversion.h" | ||
27 | #include <qpe/timestring.h> | 27 | #include <qpe/timestring.h> |
28 | #include <qpe/config.h> | ||
28 | 29 | ||
29 | #include <qobject.h> | 30 | #include <qobject.h> |
@@ -439,10 +440,14 @@ QString OContact::toRichText() const | |||
439 | bool marker = false; | 440 | bool marker = false; |
440 | 441 | ||
442 | Config cfg("qpe"); | ||
443 | cfg.setGroup("Appearance"); | ||
444 | int addressformat = cfg.readNumEntry( "AddressFormat", Zip_City_State ); | ||
445 | |||
441 | // name, jobtitle and company | 446 | // name, jobtitle and company |
442 | if ( !(value = fullName()).isEmpty() ) | 447 | if ( !(value = fullName()).isEmpty() ) |
443 | text += "<b><h3><img src=\"addressbook/AddressBook\">" + Qtopia::escapeString(value) + "</h3></b>"; | 448 | text += "<b><h3><img src=\"addressbook/AddressBook\"> " + Qtopia::escapeString(value) + "</h3></b>"; |
444 | 449 | ||
445 | if ( !(value = jobTitle()).isEmpty() ) | 450 | if ( !(value = jobTitle()).isEmpty() ) |
446 | text += Qtopia::escapeString(value) + "<br>"; | 451 | text += Qtopia::escapeString(value); |
447 | 452 | ||
448 | comp = company(); | 453 | comp = company(); |
@@ -455,75 +460,108 @@ QString OContact::toRichText() const | |||
455 | } | 460 | } |
456 | if ( !comp.isEmpty() ) | 461 | if ( !comp.isEmpty() ) |
457 | text += Qtopia::escapeString(comp) + "<br>"; | 462 | text += Qtopia::escapeString(comp); |
458 | 463 | ||
459 | text += "<hr><br>"; | 464 | text += "<br><hr>"; |
460 | 465 | ||
461 | // defailt email | 466 | // defailt email |
462 | QString defEmail = defaultEmail(); | 467 | QString defEmail = defaultEmail(); |
463 | if ( !defEmail.isEmpty() ) | 468 | if ( !defEmail.isEmpty() ){ |
464 | text += "<b><img src=\"addressbook/email\">" + QObject::tr("Default Email: ") + "</b>" | 469 | text += "<b><img src=\"addressbook/email\"> " + QObject::tr("Default Email: ") + "</b>" |
465 | + Qtopia::escapeString(defEmail) + "<br>"; | 470 | + Qtopia::escapeString(defEmail); |
466 | 471 | marker = true; | |
467 | text += "<br>"; | 472 | } |
468 | 473 | ||
469 | // business address | 474 | // business address |
470 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || | 475 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || |
471 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { | 476 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { |
472 | text += QObject::tr( "<b>Work Address:</b>" ); | 477 | text += QObject::tr( "<br><br><b>Work Address:</b>" ); |
473 | text += "<br>"; | ||
474 | marker = true; | 478 | marker = true; |
475 | } | 479 | } |
476 | 480 | ||
477 | if ( !(value = businessStreet()).isEmpty() ) | 481 | if ( !(value = businessStreet()).isEmpty() ){ |
478 | text += Qtopia::escapeString(value) + "<br>"; | 482 | text += "<br>" + Qtopia::escapeString(value); |
479 | state = businessState(); | 483 | marker = true; |
480 | if ( !(value = businessZip()).isEmpty() ) | 484 | } |
481 | text += Qtopia::escapeString(value) + " "; | 485 | |
482 | if ( !(value = businessCity()).isEmpty() ) { | 486 | switch( addressformat ){ |
483 | text += Qtopia::escapeString(value); | 487 | case Zip_City_State:{ // Zip_Code City, State |
484 | if ( state ) | 488 | state = businessState(); |
485 | text += ", " + Qtopia::escapeString(state); | 489 | if ( !(value = businessZip()).isEmpty() ){ |
486 | text += "<br>"; | 490 | text += "<br>" + Qtopia::escapeString(value) + " "; |
487 | } else if ( !state.isEmpty() ) | 491 | marker = true; |
488 | text += Qtopia::escapeString(state) + "<br>"; | 492 | |
493 | } else | ||
494 | text += "<br>"; | ||
495 | |||
496 | if ( !(value = businessCity()).isEmpty() ) { | ||
497 | marker = true; | ||
498 | text += Qtopia::escapeString(value); | ||
499 | if ( state ) | ||
500 | text += ", " + Qtopia::escapeString(state); | ||
501 | } else if ( !state.isEmpty() ){ | ||
502 | text += "<br>" + Qtopia::escapeString(state); | ||
503 | marker = true; | ||
504 | } | ||
505 | break; | ||
506 | } | ||
507 | case City_State_Zip:{ // City, State Zip_Code | ||
508 | state = businessState(); | ||
509 | if ( !(value = businessCity()).isEmpty() ) { | ||
510 | marker = true; | ||
511 | text += "<br>" + Qtopia::escapeString(value); | ||
512 | if ( state ) | ||
513 | text += ", " + Qtopia::escapeString(state); | ||
514 | } else if ( !state.isEmpty() ){ | ||
515 | text += "<br>" + Qtopia::escapeString(state); | ||
516 | marker = true; | ||
517 | } | ||
518 | if ( !(value = businessZip()).isEmpty() ){ | ||
519 | text += " " + Qtopia::escapeString(value); | ||
520 | marker = true; | ||
521 | } | ||
522 | break; | ||
523 | } | ||
524 | } | ||
489 | 525 | ||
490 | if ( !(value = businessCountry()).isEmpty() ) | 526 | if ( !(value = businessCountry()).isEmpty() ){ |
491 | text += Qtopia::escapeString(value) + "<br>"; | 527 | text += "<br>" + Qtopia::escapeString(value); |
528 | marker = true; | ||
529 | } | ||
492 | 530 | ||
493 | // rest of Business data | 531 | // rest of Business data |
494 | str = office(); | 532 | str = office(); |
495 | if ( !str.isEmpty() ){ | 533 | if ( !str.isEmpty() ){ |
496 | text += "<b>" + QObject::tr("Office: ") + "</b>" | 534 | text += "<br><b>" + QObject::tr("Office: ") + "</b>" |
497 | + Qtopia::escapeString(str) + "<br>"; | 535 | + Qtopia::escapeString(str); |
498 | marker = true; | 536 | marker = true; |
499 | } | 537 | } |
500 | str = businessWebpage(); | 538 | str = businessWebpage(); |
501 | if ( !str.isEmpty() ){ | 539 | if ( !str.isEmpty() ){ |
502 | text += "<b><img src=\"addressbook/webpagework\">" + QObject::tr("Business Web Page: ") + "</b>" | 540 | text += "<br><b><img src=\"addressbook/webpagework\"> " + QObject::tr("Business Web Page: ") + "</b>" |
503 | + Qtopia::escapeString(str) + "<br>"; | 541 | + Qtopia::escapeString(str); |
504 | marker = true; | 542 | marker = true; |
505 | } | 543 | } |
506 | str = businessPhone(); | 544 | str = businessPhone(); |
507 | if ( !str.isEmpty() ){ | 545 | if ( !str.isEmpty() ){ |
508 | text += "<b><img src=\"addressbook/phonework\">" + QObject::tr("Business Phone: ") + "</b>" | 546 | text += "<br><b><img src=\"addressbook/phonework\"> " + QObject::tr("Business Phone: ") + "</b>" |
509 | + Qtopia::escapeString(str) + "<br>"; | 547 | + Qtopia::escapeString(str); |
510 | marker = true; | 548 | marker = true; |
511 | } | 549 | } |
512 | str = businessFax(); | 550 | str = businessFax(); |
513 | if ( !str.isEmpty() ){ | 551 | if ( !str.isEmpty() ){ |
514 | text += "<b><img src=\"addressbook/faxwork\">" + QObject::tr("Business Fax: ") + "</b>" | 552 | text += "<br><b><img src=\"addressbook/faxwork\"> " + QObject::tr("Business Fax: ") + "</b>" |
515 | + Qtopia::escapeString(str) + "<br>"; | 553 | + Qtopia::escapeString(str); |
516 | marker = true; | 554 | marker = true; |
517 | } | 555 | } |
518 | str = businessMobile(); | 556 | str = businessMobile(); |
519 | if ( !str.isEmpty() ){ | 557 | if ( !str.isEmpty() ){ |
520 | text += "<b><img src=\"addressbook/mobilework\">" + QObject::tr("Business Mobile: ") + "</b>" | 558 | text += "<br><b><img src=\"addressbook/mobilework\"> " + QObject::tr("Business Mobile: ") + "</b>" |
521 | + Qtopia::escapeString(str) + "<br>"; | 559 | + Qtopia::escapeString(str); |
522 | marker = true; | 560 | marker = true; |
523 | } | 561 | } |
524 | str = businessPager(); | 562 | str = businessPager(); |
525 | if ( !str.isEmpty() ){ | 563 | if ( !str.isEmpty() ){ |
526 | text += "<b>" + QObject::tr("Business Pager: ") + "</b>" | 564 | text += "<br><b>" + QObject::tr("Business Pager: ") + "</b>" |
527 | + Qtopia::escapeString(str) + "<br>"; | 565 | + Qtopia::escapeString(str); |
528 | marker = true; | 566 | marker = true; |
529 | } | 567 | } |
@@ -534,105 +572,140 @@ QString OContact::toRichText() const | |||
534 | if ( !homeStreet().isEmpty() || !homeCity().isEmpty() || | 572 | if ( !homeStreet().isEmpty() || !homeCity().isEmpty() || |
535 | !homeZip().isEmpty() || !homeCountry().isEmpty() ) { | 573 | !homeZip().isEmpty() || !homeCountry().isEmpty() ) { |
536 | text += QObject::tr( "<b>Home Address:</b>" ); | 574 | text += QObject::tr( "<br><br><b>Home Address:</b>" ); |
537 | text += "<br>"; | 575 | marker = true; |
538 | } | 576 | } |
539 | 577 | ||
540 | if ( !(value = homeStreet()).isEmpty() ) | 578 | if ( !(value = homeStreet()).isEmpty() ){ |
541 | text += Qtopia::escapeString(value) + "<br>"; | 579 | text += "<br>" + Qtopia::escapeString(value); |
542 | state = homeState(); | 580 | marker = true; |
543 | if ( !(value = homeZip()).isEmpty() ) | 581 | } |
544 | text += Qtopia::escapeString(value) + " "; | 582 | |
545 | if ( !(value = homeCity()).isEmpty() ) { | 583 | switch( addressformat ){ |
546 | text += Qtopia::escapeString(value); | 584 | case Zip_City_State:{ // Zip_Code City, State |
547 | if ( !state.isEmpty() ) | 585 | state = homeState(); |
548 | text += ", " + Qtopia::escapeString(state); | 586 | if ( !(value = homeZip()).isEmpty() ){ |
549 | text += "<br>"; | 587 | text += "<br>" + Qtopia::escapeString(value) + " "; |
550 | } else if (!state.isEmpty()) | 588 | marker = true; |
551 | text += Qtopia::escapeString(state) + "<br>"; | 589 | } else |
552 | if ( !(value = homeCountry()).isEmpty() ) | 590 | text += "<br>"; |
553 | text += Qtopia::escapeString(value) + "<br>"; | 591 | |
592 | if ( !(value = homeCity()).isEmpty() ) { | ||
593 | marker = true; | ||
594 | text += Qtopia::escapeString(value); | ||
595 | if ( !state.isEmpty() ) | ||
596 | text += ", " + Qtopia::escapeString(state); | ||
597 | } else if (!state.isEmpty()) { | ||
598 | text += "<br>" + Qtopia::escapeString(state); | ||
599 | marker = true; | ||
600 | } | ||
601 | break; | ||
602 | } | ||
603 | case City_State_Zip:{ // City, State Zip_Code | ||
604 | state = homeState(); | ||
605 | if ( !(value = homeCity()).isEmpty() ) { | ||
606 | marker = true; | ||
607 | text += "<br>" + Qtopia::escapeString(value); | ||
608 | if ( state ) | ||
609 | text += ", " + Qtopia::escapeString(state); | ||
610 | } else if ( !state.isEmpty() ){ | ||
611 | text += "<br>" + Qtopia::escapeString(state); | ||
612 | marker = true; | ||
613 | } | ||
614 | if ( !(value = homeZip()).isEmpty() ){ | ||
615 | text += " " + Qtopia::escapeString(value); | ||
616 | marker = true; | ||
617 | } | ||
618 | break; | ||
619 | } | ||
620 | } | ||
621 | |||
622 | if ( !(value = homeCountry()).isEmpty() ){ | ||
623 | text += "<br>" + Qtopia::escapeString(value); | ||
624 | marker = true; | ||
625 | } | ||
554 | 626 | ||
555 | // rest of Home data | 627 | // rest of Home data |
556 | str = homeWebpage(); | 628 | str = homeWebpage(); |
557 | if ( !str.isEmpty() ){ | 629 | if ( !str.isEmpty() ){ |
558 | text += "<b><img src=\"addressbook/webpagehome\">" + QObject::tr("Home Web Page: ") + "</b>" | 630 | text += "<br><b><img src=\"addressbook/webpagehome\"> " + QObject::tr("Home Web Page: ") + "</b>" |
559 | + Qtopia::escapeString(str) + "<br>"; | 631 | + Qtopia::escapeString(str); |
560 | marker = true; | 632 | marker = true; |
561 | } | 633 | } |
562 | str = homePhone(); | 634 | str = homePhone(); |
563 | if ( !str.isEmpty() ){ | 635 | if ( !str.isEmpty() ){ |
564 | text += "<b><img src=\"addressbook/phonehome\">" + QObject::tr("Home Phone: ") + "</b>" | 636 | text += "<br><b><img src=\"addressbook/phonehome\"> " + QObject::tr("Home Phone: ") + "</b>" |
565 | + Qtopia::escapeString(str) + "<br>"; | 637 | + Qtopia::escapeString(str); |
566 | marker = true; | 638 | marker = true; |
567 | } | 639 | } |
568 | str = homeFax(); | 640 | str = homeFax(); |
569 | if ( !str.isEmpty() ){ | 641 | if ( !str.isEmpty() ){ |
570 | text += "<b><img src=\"addressbook/faxhome\">" + QObject::tr("Home Fax: ") + "</b>" | 642 | text += "<br><b><img src=\"addressbook/faxhome\"> " + QObject::tr("Home Fax: ") + "</b>" |
571 | + Qtopia::escapeString(str) + "<br>"; | 643 | + Qtopia::escapeString(str); |
572 | marker = true; | 644 | marker = true; |
573 | } | 645 | } |
574 | str = homeMobile(); | 646 | str = homeMobile(); |
575 | if ( !str.isEmpty() ){ | 647 | if ( !str.isEmpty() ){ |
576 | text += "<b><img src=\"addressbook/mobilehome\">" + QObject::tr("Home Mobile: ") + "</b>" | 648 | text += "<br><b><img src=\"addressbook/mobilehome\"> " + QObject::tr("Home Mobile: ") + "</b>" |
577 | + Qtopia::escapeString(str) + "<br>"; | 649 | + Qtopia::escapeString(str); |
578 | marker = true; | 650 | marker = true; |
579 | } | 651 | } |
580 | 652 | ||
581 | if ( marker ) | 653 | if ( marker ) |
582 | text += "<br><hr><br>"; | 654 | text += "<br><hr>"; |
583 | // the others... | 655 | |
656 | // the rest... | ||
584 | str = emails(); | 657 | str = emails(); |
585 | if ( !str.isEmpty() && ( str != defEmail ) ) | 658 | if ( !str.isEmpty() && ( str != defEmail ) ) |
586 | text += "<b>" + QObject::tr("All Emails: ") + "</b>" | 659 | text += "<br><b>" + QObject::tr("All Emails: ") + "</b>" |
587 | + Qtopia::escapeString(str) + "<br>"; | 660 | + Qtopia::escapeString(str); |
588 | str = profession(); | 661 | str = profession(); |
589 | if ( !str.isEmpty() ) | 662 | if ( !str.isEmpty() ) |
590 | text += "<b>" + QObject::tr("Profession: ") + "</b>" | 663 | text += "<br><b>" + QObject::tr("Profession: ") + "</b>" |
591 | + Qtopia::escapeString(str) + "<br>"; | 664 | + Qtopia::escapeString(str); |
592 | str = assistant(); | 665 | str = assistant(); |
593 | if ( !str.isEmpty() ) | 666 | if ( !str.isEmpty() ) |
594 | text += "<b>" + QObject::tr("Assistant: ") + "</b>" | 667 | text += "<br><b>" + QObject::tr("Assistant: ") + "</b>" |
595 | + Qtopia::escapeString(str) + "<br>"; | 668 | + Qtopia::escapeString(str); |
596 | str = manager(); | 669 | str = manager(); |
597 | if ( !str.isEmpty() ) | 670 | if ( !str.isEmpty() ) |
598 | text += "<b>" + QObject::tr("Manager: ") + "</b>" | 671 | text += "<br><b>" + QObject::tr("Manager: ") + "</b>" |
599 | + Qtopia::escapeString(str) + "<br>"; | 672 | + Qtopia::escapeString(str); |
600 | str = gender(); | 673 | str = gender(); |
601 | if ( !str.isEmpty() && str.toInt() != 0 ) { | 674 | if ( !str.isEmpty() && str.toInt() != 0 ) { |
602 | if ( str.toInt() == 1 ) | 675 | text += "<br>"; |
603 | str = QObject::tr( "Male" ); | 676 | if ( str.toInt() == 1 ) |
604 | else if ( str.toInt() == 2 ) | 677 | str = QObject::tr( "Male" ); |
605 | str = QObject::tr( "Female" ); | 678 | else if ( str.toInt() == 2 ) |
606 | text += "<b>" + QObject::tr("Gender: ") + "</b>" + str + "<br>"; | 679 | str = QObject::tr( "Female" ); |
680 | text += "<b>" + QObject::tr("Gender: ") + "</b>" + str; | ||
607 | } | 681 | } |
608 | str = spouse(); | 682 | str = spouse(); |
609 | if ( !str.isEmpty() ) | 683 | if ( !str.isEmpty() ) |
610 | text += "<b>" + QObject::tr("Spouse: ") + "</b>" | 684 | text += "<br><b>" + QObject::tr("Spouse: ") + "</b>" |
611 | + Qtopia::escapeString(str) + "<br>"; | 685 | + Qtopia::escapeString(str); |
612 | if ( birthday().isValid() ){ | 686 | if ( birthday().isValid() ){ |
613 | str = TimeString::numberDateString( birthday() ); | 687 | str = TimeString::numberDateString( birthday() ); |
614 | text += "<b>" + QObject::tr("Birthday: ") + "</b>" | 688 | text += "<br><b>" + QObject::tr("Birthday: ") + "</b>" |
615 | + Qtopia::escapeString(str) + "<br>"; | 689 | + Qtopia::escapeString(str); |
616 | } | 690 | } |
617 | if ( anniversary().isValid() ){ | 691 | if ( anniversary().isValid() ){ |
618 | str = TimeString::numberDateString( anniversary() ); | 692 | str = TimeString::numberDateString( anniversary() ); |
619 | text += "<b>" + QObject::tr("Anniversary: ") + "</b>" | 693 | text += "<br><b>" + QObject::tr("Anniversary: ") + "</b>" |
620 | + Qtopia::escapeString(str) + "<br>"; | 694 | + Qtopia::escapeString(str); |
621 | } | 695 | } |
622 | str = children(); | 696 | str = children(); |
623 | if ( !str.isEmpty() ) | 697 | if ( !str.isEmpty() ) |
624 | text += "<b>" + QObject::tr("Children: ") + "</b>" | 698 | text += "<br><b>" + QObject::tr("Children: ") + "</b>" |
625 | + Qtopia::escapeString(str) + "<br>"; | 699 | + Qtopia::escapeString(str); |
626 | 700 | ||
627 | str = nickname(); | 701 | str = nickname(); |
628 | if ( !str.isEmpty() ) | 702 | if ( !str.isEmpty() ) |
629 | text += "<b>" + QObject::tr("Nickname: ") + "</b>" | 703 | text += "<br><b>" + QObject::tr("Nickname: ") + "</b>" |
630 | + Qtopia::escapeString(str) + "<br>"; | 704 | + Qtopia::escapeString(str); |
631 | 705 | ||
632 | // categories | 706 | // categories |
633 | if ( categoryNames("Contacts").count() ){ | 707 | if ( categoryNames("Contacts").count() ){ |
634 | text += "<b>" + QObject::tr( "Category:") + "</b> "; | 708 | text += "<br><b>" + QObject::tr( "Category:") + "</b> "; |
635 | text += categoryNames("Contacts").join(", "); | 709 | text += categoryNames("Contacts").join(", "); |
636 | text += "<br>"; | ||
637 | } | 710 | } |
638 | 711 | ||
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 | |||
@@ -33,5 +33,5 @@ QPC_TEMPLATEEXTERN template class QPC_EXPORT QMap<int, QString>; | |||
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | class ContactPrivate; | 35 | class OContactPrivate; |
36 | 36 | ||
37 | /** | 37 | /** |
@@ -50,4 +50,9 @@ public: | |||
50 | virtual ~OContact(); | 50 | virtual ~OContact(); |
51 | 51 | ||
52 | enum DateFormat{ | ||
53 | Zip_City_State = 0, | ||
54 | City_State_Zip | ||
55 | }; | ||
56 | |||
52 | /* | 57 | /* |
53 | * do we need to inline them | 58 | * do we need to inline them |
@@ -234,5 +239,5 @@ private: | |||
234 | 239 | ||
235 | QMap<int, QString> mMap; | 240 | QMap<int, QString> mMap; |
236 | ContactPrivate *d; | 241 | OContactPrivate *d; |
237 | }; | 242 | }; |
238 | 243 | ||
diff --git a/libopie2/opiepim/orecordlist.h b/libopie2/opiepim/orecordlist.h index edcd729..5211f57 100644 --- a/libopie2/opiepim/orecordlist.h +++ b/libopie2/opiepim/orecordlist.h | |||
@@ -8,4 +8,5 @@ | |||
8 | #include "opimrecord.h" | 8 | #include "opimrecord.h" |
9 | 9 | ||
10 | class ORecordListIteratorPrivate; | ||
10 | /** | 11 | /** |
11 | * Our List Iterator | 12 | * Our List Iterator |
@@ -72,7 +73,8 @@ private: | |||
72 | 73 | ||
73 | /* d pointer for future versions */ | 74 | /* d pointer for future versions */ |
74 | class IteratorPrivate; | 75 | ORecordListIteratorPrivate *d; |
75 | IteratorPrivate *d; | ||
76 | }; | 76 | }; |
77 | |||
78 | class ORecordListPrivate; | ||
77 | /** | 79 | /** |
78 | * The recordlist used as a return type | 80 | * The recordlist used as a return type |
@@ -112,5 +114,5 @@ ORecordList( const QArray<int>& ids, | |||
112 | int uidAt(uint i ); | 114 | int uidAt(uint i ); |
113 | 115 | ||
114 | /** | 116 | /** |
115 | * Remove the contact with given uid | 117 | * Remove the contact with given uid |
116 | */ | 118 | */ |
@@ -124,4 +126,5 @@ private: | |||
124 | QArray<int> m_ids; | 126 | QArray<int> m_ids; |
125 | const Base* m_acc; | 127 | const Base* m_acc; |
128 | ORecordListPrivate *d; | ||
126 | }; | 129 | }; |
127 | 130 | ||
@@ -221,4 +224,7 @@ ORecordListIterator<T>::ORecordListIterator( const QArray<int> uids, | |||
221 | m_direction( false ) | 224 | m_direction( false ) |
222 | { | 225 | { |
226 | /* if the list is empty we're already at the end of the list */ | ||
227 | if (uids.count() == 0 ) | ||
228 | m_end = true; | ||
223 | } | 229 | } |
224 | template <class T> | 230 | template <class T> |
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index 38b93f7..5a18c37 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp | |||
@@ -29,4 +29,9 @@ struct OTodo::OTodoData : public QShared { | |||
29 | notifiers = 0; | 29 | notifiers = 0; |
30 | }; | 30 | }; |
31 | ~OTodoData() { | ||
32 | delete recur; | ||
33 | delete maintainer; | ||
34 | delete notifiers; | ||
35 | } | ||
31 | 36 | ||
32 | QDate date; | 37 | QDate date; |
@@ -275,5 +280,5 @@ QString OTodo::toRichText() const | |||
275 | 280 | ||
276 | // summary | 281 | // summary |
277 | text += "<b><h3><img src=\"todo/TodoList\">"; | 282 | text += "<b><h3><img src=\"todo/TodoList\"> "; |
278 | if ( !summary().isEmpty() ) { | 283 | if ( !summary().isEmpty() ) { |
279 | text += Qtopia::escapeString(summary() ).replace(QRegExp( "[\n]"), "" ); | 284 | text += Qtopia::escapeString(summary() ).replace(QRegExp( "[\n]"), "" ); |
@@ -283,6 +288,6 @@ QString OTodo::toRichText() const | |||
283 | // description | 288 | // description |
284 | if( !description().isEmpty() ){ | 289 | if( !description().isEmpty() ){ |
285 | text += "<b>" + QObject::tr( "Description:" ) + "</b><br>"; | 290 | text += "<b>" + QObject::tr( "Notes:" ) + "</b><br>"; |
286 | text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ; | 291 | text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) + "<br>"; |
287 | } | 292 | } |
288 | 293 | ||
@@ -290,7 +295,6 @@ QString OTodo::toRichText() const | |||
290 | int priorityval = priority(); | 295 | int priorityval = priority(); |
291 | text += "<b>" + QObject::tr( "Priority:") +" </b><img src=\"todo/priority" + | 296 | text += "<b>" + QObject::tr( "Priority:") +" </b><img src=\"todo/priority" + |
292 | QString::number( priorityval ) + "\">"; | 297 | QString::number( priorityval ) + "\"> "; |
293 | // text += "<b>" + QObject::tr( "Priority:") +"</b><img src=\"todo/priority" + | 298 | |
294 | // QString::number( priority() ) + "\"><br>"; | ||
295 | switch ( priorityval ) | 299 | switch ( priorityval ) |
296 | { | 300 | { |
diff --git a/libopie2/opiepim/otodo.h b/libopie2/opiepim/otodo.h index f9a345a..6df98b9 100644 --- a/libopie2/opiepim/otodo.h +++ b/libopie2/opiepim/otodo.h | |||
@@ -99,9 +99,4 @@ public: | |||
99 | 99 | ||
100 | /** | 100 | /** |
101 | * Does this Event has an alarm time ? | ||
102 | */ | ||
103 | bool hasAlarmDateTime() const; | ||
104 | |||
105 | /** | ||
106 | * What is the priority? | 101 | * What is the priority? |
107 | */ | 102 | */ |
@@ -242,8 +237,4 @@ public: | |||
242 | 237 | ||
243 | void setRecurrence( const ORecur& ); | 238 | void setRecurrence( const ORecur& ); |
244 | /** | ||
245 | * set the alarm time | ||
246 | */ | ||
247 | void setAlarmDateTime ( const QDateTime& alarm ); | ||
248 | 239 | ||
249 | void setDescription(const QString& ); | 240 | void setDescription(const QString& ); |
diff --git a/libopie2/opiepim/ui/opimmainwindow.cpp b/libopie2/opiepim/ui/opimmainwindow.cpp index 4044bc1..2739e26 100644 --- a/libopie2/opiepim/ui/opimmainwindow.cpp +++ b/libopie2/opiepim/ui/opimmainwindow.cpp | |||
@@ -5,4 +5,5 @@ | |||
5 | #include <qpe/sound.h> | 5 | #include <qpe/sound.h> |
6 | #include <qpe/qcopenvelope_qws.h> | 6 | #include <qpe/qcopenvelope_qws.h> |
7 | #include <qpe/qpeapplication.h> | ||
7 | 8 | ||
8 | #include "opimresolver.h" | 9 | #include "opimresolver.h" |
@@ -39,4 +40,5 @@ void OPimMainWindow::doSetDocument( const QString& ) { | |||
39 | } | 40 | } |
40 | void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) { | 41 | void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) { |
42 | bool needShow = false; | ||
41 | /* | 43 | /* |
42 | * create demands to create | 44 | * create demands to create |
@@ -45,7 +47,9 @@ void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) | |||
45 | QDataStream stream(array, IO_ReadOnly); | 47 | QDataStream stream(array, IO_ReadOnly); |
46 | if ( cmd == "create()" ) { | 48 | if ( cmd == "create()" ) { |
49 | raise(); | ||
47 | int uid = create(); | 50 | int uid = create(); |
48 | QCopEnvelope e(m_str, "created(int)" ); | 51 | QCopEnvelope e(m_str, "created(int)" ); |
49 | e << uid; | 52 | e << uid; |
53 | needShow = true; | ||
50 | }else if ( cmd == "remove(int)" ) { | 54 | }else if ( cmd == "remove(int)" ) { |
51 | int uid; | 55 | int uid; |
@@ -54,4 +58,5 @@ void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) | |||
54 | QCopEnvelope e(m_str, "removed(bool)" ); | 58 | QCopEnvelope e(m_str, "removed(bool)" ); |
55 | e << rem; | 59 | e << rem; |
60 | needShow = true; | ||
56 | }else if ( cmd == "beam(int)" ) { | 61 | }else if ( cmd == "beam(int)" ) { |
57 | int uid; | 62 | int uid; |
@@ -59,8 +64,11 @@ void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) | |||
59 | beam( uid); | 64 | beam( uid); |
60 | }else if ( cmd == "show(int)" ) { | 65 | }else if ( cmd == "show(int)" ) { |
66 | raise(); | ||
61 | int uid; | 67 | int uid; |
62 | stream >> uid; | 68 | stream >> uid; |
63 | show( uid ); | 69 | show( uid ); |
70 | needShow = true; | ||
64 | }else if ( cmd == "edit(int)" ) { | 71 | }else if ( cmd == "edit(int)" ) { |
72 | raise(); | ||
65 | int uid; | 73 | int uid; |
66 | stream >> uid; | 74 | stream >> uid; |
@@ -76,4 +84,5 @@ void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) | |||
76 | delete m_fallBack; | 84 | delete m_fallBack; |
77 | }else if ( cmd == "alarm(QDateTime,int)" ) { | 85 | }else if ( cmd == "alarm(QDateTime,int)" ) { |
86 | raise(); | ||
78 | QDateTime dt; int uid; | 87 | QDateTime dt; int uid; |
79 | stream >> dt; | 88 | stream >> dt; |
@@ -84,6 +93,9 @@ void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) | |||
84 | return; | 93 | return; |
85 | doAlarm( dt, uid ); | 94 | doAlarm( dt, uid ); |
86 | 95 | needShow = true; | |
87 | } | 96 | } |
97 | |||
98 | if (needShow ) | ||
99 | QPEApplication::setKeepRunning(); | ||
88 | } | 100 | } |
89 | /* implement the url scripting here */ | 101 | /* implement the url scripting here */ |