-rw-r--r-- | libopie/pim/ocontact.cpp | 4 | ||||
-rw-r--r-- | libopie/pim/opimrecord.cpp | 4 | ||||
-rw-r--r-- | libopie/pim/opimrecord.h | 2 | ||||
-rw-r--r-- | libopie/pim/otodo.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimrecord.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimrecord.h | 2 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.cpp | 2 |
8 files changed, 12 insertions, 12 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp index 178559b..9cccfc8 100644 --- a/libopie/pim/ocontact.cpp +++ b/libopie/pim/ocontact.cpp | |||
@@ -614,35 +614,35 @@ QString OContact::toRichText() const | |||
614 | } | 614 | } |
615 | if ( anniversary().isValid() ){ | 615 | if ( anniversary().isValid() ){ |
616 | str = TimeString::numberDateString( anniversary() ); | 616 | str = TimeString::numberDateString( anniversary() ); |
617 | text += "<b>" + QObject::tr("Anniversary: ") + "</b>" | 617 | text += "<b>" + QObject::tr("Anniversary: ") + "</b>" |
618 | + Qtopia::escapeString(str) + "<br>"; | 618 | + Qtopia::escapeString(str) + "<br>"; |
619 | } | 619 | } |
620 | str = children(); | 620 | str = children(); |
621 | if ( !str.isEmpty() ) | 621 | if ( !str.isEmpty() ) |
622 | text += "<b>" + QObject::tr("Children: ") + "</b>" | 622 | text += "<b>" + QObject::tr("Children: ") + "</b>" |
623 | + Qtopia::escapeString(str) + "<br>"; | 623 | + Qtopia::escapeString(str) + "<br>"; |
624 | 624 | ||
625 | str = nickname(); | 625 | str = nickname(); |
626 | if ( !str.isEmpty() ) | 626 | if ( !str.isEmpty() ) |
627 | text += "<b>" + QObject::tr("Nickname: ") + "</b>" | 627 | text += "<b>" + QObject::tr("Nickname: ") + "</b>" |
628 | + Qtopia::escapeString(str) + "<br>"; | 628 | + Qtopia::escapeString(str) + "<br>"; |
629 | 629 | ||
630 | if ( categoryNames().count() ){ | 630 | if ( categoryNames("Contacts").count() ){ |
631 | text += "<b>" + QObject::tr( "Category:") + "</b> "; | 631 | text += "<b>" + QObject::tr( "Category:") + "</b> "; |
632 | text += categoryNames().join(", "); | 632 | text += categoryNames("Contacts").join(", "); |
633 | text += "<br>"; | 633 | text += "<br>"; |
634 | } | 634 | } |
635 | 635 | ||
636 | // notes last | 636 | // notes last |
637 | if ( !(value = notes()).isEmpty() ) { | 637 | if ( !(value = notes()).isEmpty() ) { |
638 | text += "<br><hr><b>" + QObject::tr( "Notes:") + "</b> "; | 638 | text += "<br><hr><b>" + QObject::tr( "Notes:") + "</b> "; |
639 | QRegExp reg("\n"); | 639 | QRegExp reg("\n"); |
640 | 640 | ||
641 | //QString tmp = Qtopia::escapeString(value); | 641 | //QString tmp = Qtopia::escapeString(value); |
642 | QString tmp = QStyleSheet::convertFromPlainText(value); | 642 | QString tmp = QStyleSheet::convertFromPlainText(value); |
643 | //tmp.replace( reg, "<br>" ); | 643 | //tmp.replace( reg, "<br>" ); |
644 | text += "<br>" + tmp + "<br>"; | 644 | text += "<br>" + tmp + "<br>"; |
645 | } | 645 | } |
646 | return text; | 646 | return text; |
647 | } | 647 | } |
648 | 648 | ||
diff --git a/libopie/pim/opimrecord.cpp b/libopie/pim/opimrecord.cpp index ac0f4a9..d45417a 100644 --- a/libopie/pim/opimrecord.cpp +++ b/libopie/pim/opimrecord.cpp | |||
@@ -17,40 +17,40 @@ OPimRecord::~OPimRecord() { | |||
17 | } | 17 | } |
18 | OPimRecord::OPimRecord( const OPimRecord& rec ) | 18 | OPimRecord::OPimRecord( const OPimRecord& rec ) |
19 | : Qtopia::Record( rec ) | 19 | : Qtopia::Record( rec ) |
20 | { | 20 | { |
21 | (*this) = rec; | 21 | (*this) = rec; |
22 | } | 22 | } |
23 | 23 | ||
24 | OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { | 24 | OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { |
25 | Qtopia::Record::operator=( rec ); | 25 | Qtopia::Record::operator=( rec ); |
26 | m_xrefman = rec.m_xrefman; | 26 | m_xrefman = rec.m_xrefman; |
27 | 27 | ||
28 | return *this; | 28 | return *this; |
29 | } | 29 | } |
30 | /* | 30 | /* |
31 | * category names | 31 | * category names |
32 | */ | 32 | */ |
33 | QStringList OPimRecord::categoryNames()const { | 33 | QStringList OPimRecord::categoryNames( const QString& appname ) const { |
34 | QStringList list; | 34 | QStringList list; |
35 | QArray<int> cats = categories(); | 35 | QArray<int> cats = categories(); |
36 | Categories catDB; | 36 | Categories catDB; |
37 | catDB.load( categoryFileName() ); | 37 | catDB.load( categoryFileName() ); |
38 | 38 | ||
39 | for (uint i = 0; i < cats.count(); i++ ) { | 39 | for (uint i = 0; i < cats.count(); i++ ) { |
40 | list << catDB.label("Todo List", cats[i] ); | 40 | list << catDB.label( appname, cats[i] ); |
41 | } | 41 | } |
42 | 42 | ||
43 | return list; | 43 | return list; |
44 | } | 44 | } |
45 | void OPimRecord::setCategoryNames( const QStringList& ) { | 45 | void OPimRecord::setCategoryNames( const QStringList& ) { |
46 | 46 | ||
47 | } | 47 | } |
48 | void OPimRecord::addCategoryName( const QString& ) { | 48 | void OPimRecord::addCategoryName( const QString& ) { |
49 | Categories catDB; | 49 | Categories catDB; |
50 | catDB.load( categoryFileName() ); | 50 | catDB.load( categoryFileName() ); |
51 | 51 | ||
52 | 52 | ||
53 | } | 53 | } |
54 | bool OPimRecord::isEmpty()const { | 54 | bool OPimRecord::isEmpty()const { |
55 | return ( uid() == 0 ); | 55 | return ( uid() == 0 ); |
56 | } | 56 | } |
diff --git a/libopie/pim/opimrecord.h b/libopie/pim/opimrecord.h index 665530f..c7f9460 100644 --- a/libopie/pim/opimrecord.h +++ b/libopie/pim/opimrecord.h | |||
@@ -25,33 +25,33 @@ public: | |||
25 | OPimRecord(int uid = 0); | 25 | OPimRecord(int uid = 0); |
26 | ~OPimRecord(); | 26 | ~OPimRecord(); |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * copy c'tor | 29 | * copy c'tor |
30 | */ | 30 | */ |
31 | OPimRecord( const OPimRecord& rec ); | 31 | OPimRecord( const OPimRecord& rec ); |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * copy operator | 34 | * copy operator |
35 | */ | 35 | */ |
36 | OPimRecord &operator=( const OPimRecord& ); | 36 | OPimRecord &operator=( const OPimRecord& ); |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * category names resolved | 39 | * category names resolved |
40 | */ | 40 | */ |
41 | QStringList categoryNames()const; | 41 | QStringList categoryNames( const QString& appname )const; |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * set category names they will be resolved | 44 | * set category names they will be resolved |
45 | */ | 45 | */ |
46 | void setCategoryNames( const QStringList& ); | 46 | void setCategoryNames( const QStringList& ); |
47 | 47 | ||
48 | /** | 48 | /** |
49 | * addCategoryName adds a name | 49 | * addCategoryName adds a name |
50 | * to the internal category list | 50 | * to the internal category list |
51 | */ | 51 | */ |
52 | void addCategoryName( const QString& ); | 52 | void addCategoryName( const QString& ); |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * if a Record isEmpty | 55 | * if a Record isEmpty |
56 | * it's empty if it's 0 | 56 | * it's empty if it's 0 |
57 | */ | 57 | */ |
diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp index cde2b3d..b4d4aa9 100644 --- a/libopie/pim/otodo.cpp +++ b/libopie/pim/otodo.cpp | |||
@@ -242,33 +242,33 @@ QString OTodo::toRichText() const | |||
242 | text += "<b>" + QObject::tr( "Description:" ) + "</b><br>"; | 242 | text += "<b>" + QObject::tr( "Description:" ) + "</b><br>"; |
243 | text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ; | 243 | text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ; |
244 | } | 244 | } |
245 | text += "<br><br><br>"; | 245 | text += "<br><br><br>"; |
246 | 246 | ||
247 | text += "<b>" + QObject::tr( "Priority:") +" </b>" | 247 | text += "<b>" + QObject::tr( "Priority:") +" </b>" |
248 | + QString::number( priority() ) + " <br>"; | 248 | + QString::number( priority() ) + " <br>"; |
249 | text += "<b>" + QObject::tr( "Progress:") + " </b>" | 249 | text += "<b>" + QObject::tr( "Progress:") + " </b>" |
250 | + QString::number( progress() ) + " %<br>"; | 250 | + QString::number( progress() ) + " %<br>"; |
251 | if (hasDueDate() ){ | 251 | if (hasDueDate() ){ |
252 | text += "<b>" + QObject::tr( "Deadline:") + " </b>"; | 252 | text += "<b>" + QObject::tr( "Deadline:") + " </b>"; |
253 | text += dueDate().toString(); | 253 | text += dueDate().toString(); |
254 | text += "<br>"; | 254 | text += "<br>"; |
255 | } | 255 | } |
256 | 256 | ||
257 | text += "<b>" + QObject::tr( "Category:") + "</b> "; | 257 | text += "<b>" + QObject::tr( "Category:") + "</b> "; |
258 | text += categoryNames().join(", "); | 258 | text += categoryNames( "Todo List" ).join(", "); |
259 | text += "<br>"; | 259 | text += "<br>"; |
260 | 260 | ||
261 | return text; | 261 | return text; |
262 | } | 262 | } |
263 | OPimNotifyManager& OTodo::notifiers() { | 263 | OPimNotifyManager& OTodo::notifiers() { |
264 | return data->notifiers; | 264 | return data->notifiers; |
265 | } | 265 | } |
266 | 266 | ||
267 | bool OTodo::operator<( const OTodo &toDoEvent )const{ | 267 | bool OTodo::operator<( const OTodo &toDoEvent )const{ |
268 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; | 268 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; |
269 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; | 269 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; |
270 | if( hasDueDate() && toDoEvent.hasDueDate() ){ | 270 | if( hasDueDate() && toDoEvent.hasDueDate() ){ |
271 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide | 271 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide |
272 | return priority() < toDoEvent.priority(); | 272 | return priority() < toDoEvent.priority(); |
273 | }else{ | 273 | }else{ |
274 | return dueDate() < toDoEvent.dueDate(); | 274 | return dueDate() < toDoEvent.dueDate(); |
diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp index ac0f4a9..d45417a 100644 --- a/libopie2/opiepim/core/opimrecord.cpp +++ b/libopie2/opiepim/core/opimrecord.cpp | |||
@@ -17,40 +17,40 @@ OPimRecord::~OPimRecord() { | |||
17 | } | 17 | } |
18 | OPimRecord::OPimRecord( const OPimRecord& rec ) | 18 | OPimRecord::OPimRecord( const OPimRecord& rec ) |
19 | : Qtopia::Record( rec ) | 19 | : Qtopia::Record( rec ) |
20 | { | 20 | { |
21 | (*this) = rec; | 21 | (*this) = rec; |
22 | } | 22 | } |
23 | 23 | ||
24 | OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { | 24 | OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { |
25 | Qtopia::Record::operator=( rec ); | 25 | Qtopia::Record::operator=( rec ); |
26 | m_xrefman = rec.m_xrefman; | 26 | m_xrefman = rec.m_xrefman; |
27 | 27 | ||
28 | return *this; | 28 | return *this; |
29 | } | 29 | } |
30 | /* | 30 | /* |
31 | * category names | 31 | * category names |
32 | */ | 32 | */ |
33 | QStringList OPimRecord::categoryNames()const { | 33 | QStringList OPimRecord::categoryNames( const QString& appname ) const { |
34 | QStringList list; | 34 | QStringList list; |
35 | QArray<int> cats = categories(); | 35 | QArray<int> cats = categories(); |
36 | Categories catDB; | 36 | Categories catDB; |
37 | catDB.load( categoryFileName() ); | 37 | catDB.load( categoryFileName() ); |
38 | 38 | ||
39 | for (uint i = 0; i < cats.count(); i++ ) { | 39 | for (uint i = 0; i < cats.count(); i++ ) { |
40 | list << catDB.label("Todo List", cats[i] ); | 40 | list << catDB.label( appname, cats[i] ); |
41 | } | 41 | } |
42 | 42 | ||
43 | return list; | 43 | return list; |
44 | } | 44 | } |
45 | void OPimRecord::setCategoryNames( const QStringList& ) { | 45 | void OPimRecord::setCategoryNames( const QStringList& ) { |
46 | 46 | ||
47 | } | 47 | } |
48 | void OPimRecord::addCategoryName( const QString& ) { | 48 | void OPimRecord::addCategoryName( const QString& ) { |
49 | Categories catDB; | 49 | Categories catDB; |
50 | catDB.load( categoryFileName() ); | 50 | catDB.load( categoryFileName() ); |
51 | 51 | ||
52 | 52 | ||
53 | } | 53 | } |
54 | bool OPimRecord::isEmpty()const { | 54 | bool OPimRecord::isEmpty()const { |
55 | return ( uid() == 0 ); | 55 | return ( uid() == 0 ); |
56 | } | 56 | } |
diff --git a/libopie2/opiepim/core/opimrecord.h b/libopie2/opiepim/core/opimrecord.h index 665530f..c7f9460 100644 --- a/libopie2/opiepim/core/opimrecord.h +++ b/libopie2/opiepim/core/opimrecord.h | |||
@@ -25,33 +25,33 @@ public: | |||
25 | OPimRecord(int uid = 0); | 25 | OPimRecord(int uid = 0); |
26 | ~OPimRecord(); | 26 | ~OPimRecord(); |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * copy c'tor | 29 | * copy c'tor |
30 | */ | 30 | */ |
31 | OPimRecord( const OPimRecord& rec ); | 31 | OPimRecord( const OPimRecord& rec ); |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * copy operator | 34 | * copy operator |
35 | */ | 35 | */ |
36 | OPimRecord &operator=( const OPimRecord& ); | 36 | OPimRecord &operator=( const OPimRecord& ); |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * category names resolved | 39 | * category names resolved |
40 | */ | 40 | */ |
41 | QStringList categoryNames()const; | 41 | QStringList categoryNames( const QString& appname )const; |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * set category names they will be resolved | 44 | * set category names they will be resolved |
45 | */ | 45 | */ |
46 | void setCategoryNames( const QStringList& ); | 46 | void setCategoryNames( const QStringList& ); |
47 | 47 | ||
48 | /** | 48 | /** |
49 | * addCategoryName adds a name | 49 | * addCategoryName adds a name |
50 | * to the internal category list | 50 | * to the internal category list |
51 | */ | 51 | */ |
52 | void addCategoryName( const QString& ); | 52 | void addCategoryName( const QString& ); |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * if a Record isEmpty | 55 | * if a Record isEmpty |
56 | * it's empty if it's 0 | 56 | * it's empty if it's 0 |
57 | */ | 57 | */ |
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp index 178559b..9cccfc8 100644 --- a/libopie2/opiepim/ocontact.cpp +++ b/libopie2/opiepim/ocontact.cpp | |||
@@ -614,35 +614,35 @@ QString OContact::toRichText() const | |||
614 | } | 614 | } |
615 | if ( anniversary().isValid() ){ | 615 | if ( anniversary().isValid() ){ |
616 | str = TimeString::numberDateString( anniversary() ); | 616 | str = TimeString::numberDateString( anniversary() ); |
617 | text += "<b>" + QObject::tr("Anniversary: ") + "</b>" | 617 | text += "<b>" + QObject::tr("Anniversary: ") + "</b>" |
618 | + Qtopia::escapeString(str) + "<br>"; | 618 | + Qtopia::escapeString(str) + "<br>"; |
619 | } | 619 | } |
620 | str = children(); | 620 | str = children(); |
621 | if ( !str.isEmpty() ) | 621 | if ( !str.isEmpty() ) |
622 | text += "<b>" + QObject::tr("Children: ") + "</b>" | 622 | text += "<b>" + QObject::tr("Children: ") + "</b>" |
623 | + Qtopia::escapeString(str) + "<br>"; | 623 | + Qtopia::escapeString(str) + "<br>"; |
624 | 624 | ||
625 | str = nickname(); | 625 | str = nickname(); |
626 | if ( !str.isEmpty() ) | 626 | if ( !str.isEmpty() ) |
627 | text += "<b>" + QObject::tr("Nickname: ") + "</b>" | 627 | text += "<b>" + QObject::tr("Nickname: ") + "</b>" |
628 | + Qtopia::escapeString(str) + "<br>"; | 628 | + Qtopia::escapeString(str) + "<br>"; |
629 | 629 | ||
630 | if ( categoryNames().count() ){ | 630 | if ( categoryNames("Contacts").count() ){ |
631 | text += "<b>" + QObject::tr( "Category:") + "</b> "; | 631 | text += "<b>" + QObject::tr( "Category:") + "</b> "; |
632 | text += categoryNames().join(", "); | 632 | text += categoryNames("Contacts").join(", "); |
633 | text += "<br>"; | 633 | text += "<br>"; |
634 | } | 634 | } |
635 | 635 | ||
636 | // notes last | 636 | // notes last |
637 | if ( !(value = notes()).isEmpty() ) { | 637 | if ( !(value = notes()).isEmpty() ) { |
638 | text += "<br><hr><b>" + QObject::tr( "Notes:") + "</b> "; | 638 | text += "<br><hr><b>" + QObject::tr( "Notes:") + "</b> "; |
639 | QRegExp reg("\n"); | 639 | QRegExp reg("\n"); |
640 | 640 | ||
641 | //QString tmp = Qtopia::escapeString(value); | 641 | //QString tmp = Qtopia::escapeString(value); |
642 | QString tmp = QStyleSheet::convertFromPlainText(value); | 642 | QString tmp = QStyleSheet::convertFromPlainText(value); |
643 | //tmp.replace( reg, "<br>" ); | 643 | //tmp.replace( reg, "<br>" ); |
644 | text += "<br>" + tmp + "<br>"; | 644 | text += "<br>" + tmp + "<br>"; |
645 | } | 645 | } |
646 | return text; | 646 | return text; |
647 | } | 647 | } |
648 | 648 | ||
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index cde2b3d..b4d4aa9 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp | |||
@@ -242,33 +242,33 @@ QString OTodo::toRichText() const | |||
242 | text += "<b>" + QObject::tr( "Description:" ) + "</b><br>"; | 242 | text += "<b>" + QObject::tr( "Description:" ) + "</b><br>"; |
243 | text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ; | 243 | text += Qtopia::escapeString(description() ).replace(QRegExp( "[\n]"), "<br>" ) ; |
244 | } | 244 | } |
245 | text += "<br><br><br>"; | 245 | text += "<br><br><br>"; |
246 | 246 | ||
247 | text += "<b>" + QObject::tr( "Priority:") +" </b>" | 247 | text += "<b>" + QObject::tr( "Priority:") +" </b>" |
248 | + QString::number( priority() ) + " <br>"; | 248 | + QString::number( priority() ) + " <br>"; |
249 | text += "<b>" + QObject::tr( "Progress:") + " </b>" | 249 | text += "<b>" + QObject::tr( "Progress:") + " </b>" |
250 | + QString::number( progress() ) + " %<br>"; | 250 | + QString::number( progress() ) + " %<br>"; |
251 | if (hasDueDate() ){ | 251 | if (hasDueDate() ){ |
252 | text += "<b>" + QObject::tr( "Deadline:") + " </b>"; | 252 | text += "<b>" + QObject::tr( "Deadline:") + " </b>"; |
253 | text += dueDate().toString(); | 253 | text += dueDate().toString(); |
254 | text += "<br>"; | 254 | text += "<br>"; |
255 | } | 255 | } |
256 | 256 | ||
257 | text += "<b>" + QObject::tr( "Category:") + "</b> "; | 257 | text += "<b>" + QObject::tr( "Category:") + "</b> "; |
258 | text += categoryNames().join(", "); | 258 | text += categoryNames( "Todo List" ).join(", "); |
259 | text += "<br>"; | 259 | text += "<br>"; |
260 | 260 | ||
261 | return text; | 261 | return text; |
262 | } | 262 | } |
263 | OPimNotifyManager& OTodo::notifiers() { | 263 | OPimNotifyManager& OTodo::notifiers() { |
264 | return data->notifiers; | 264 | return data->notifiers; |
265 | } | 265 | } |
266 | 266 | ||
267 | bool OTodo::operator<( const OTodo &toDoEvent )const{ | 267 | bool OTodo::operator<( const OTodo &toDoEvent )const{ |
268 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; | 268 | if( !hasDueDate() && !toDoEvent.hasDueDate() ) return true; |
269 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; | 269 | if( !hasDueDate() && toDoEvent.hasDueDate() ) return false; |
270 | if( hasDueDate() && toDoEvent.hasDueDate() ){ | 270 | if( hasDueDate() && toDoEvent.hasDueDate() ){ |
271 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide | 271 | if( dueDate() == toDoEvent.dueDate() ){ // let's the priority decide |
272 | return priority() < toDoEvent.priority(); | 272 | return priority() < toDoEvent.priority(); |
273 | }else{ | 273 | }else{ |
274 | return dueDate() < toDoEvent.dueDate(); | 274 | return dueDate() < toDoEvent.dueDate(); |