summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-21 17:39:46 (UTC)
committer zautrix <zautrix>2005-03-21 17:39:46 (UTC)
commit3c5d7b484e6ab263ab4091f22815770ea8da6c9c (patch) (unidiff)
tree97f86965d7ae565fc054918978756c3953476e82
parent070055b60f76ffd6907e44a4ffc2d752578f3211 (diff)
downloadkdepimpi-3c5d7b484e6ab263ab4091f22815770ea8da6c9c.zip
kdepimpi-3c5d7b484e6ab263ab4091f22815770ea8da6c9c.tar.gz
kdepimpi-3c5d7b484e6ab263ab4091f22815770ea8da6c9c.tar.bz2
fix
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp3
-rw-r--r--korganizer/kodaymatrix.cpp4
-rw-r--r--korganizer/komonthview.cpp3
-rw-r--r--korganizer/kowhatsnextview.cpp8
-rw-r--r--libkcal/incidence.cpp32
-rw-r--r--libkcal/incidence.h5
6 files changed, 44 insertions, 11 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index e029fdb..eb3a6cd 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1420,4 +1420,3 @@ void KOAgendaView::setHolidayMasks()
1420 for( event = events.first(); event; event = events.next() ) { 1420 for( event = events.first(); event; event = events.next() ) {
1421 if ( event->categories().contains("Holiday") || 1421 if ( event->isHoliday()) {
1422 event->categories().contains(i18n("Holiday"))) {
1423 showHoliday = true; 1422 showHoliday = true;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index d7a4112..36cd990 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -350,3 +350,3 @@ void KODayMatrix::updateViewTimed()
350 } 350 }
351 if ( event->categories().contains( i18n("Holiday") ) || event->categories().contains( "Holiday" )) { 351 if ( event->isHoliday()) {
352 if ( !holiStr.isEmpty() ) 352 if ( !holiStr.isEmpty() )
@@ -357,3 +357,3 @@ void KODayMatrix::updateViewTimed()
357 } 357 }
358 if ( event->categories().contains( i18n("Birthday") ) || event->categories().contains( "Birthday" )) { 358 if ( event->isBirthday()) {
359 if ( !holiStr.isEmpty() ) 359 if ( !holiStr.isEmpty() )
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 004ff50..76982b4 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -517,4 +517,3 @@ void MonthViewCell::insertEvent(Event *event)
517 517
518 if ( event->categories().contains("Holiday") || 518 if ( event->isHoliday()) {
519 event->categories().contains(i18n("Holiday"))) {
520 setHoliday( true ); 519 setHoliday( true );
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 18dc656..66ff75d 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -480,3 +480,3 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
480 bool bDay = false; 480 bool bDay = false;
481 if ( ev->categories().contains( i18n("Birthday") ) || ev->categories().contains( i18n("Anniversary") ) ) 481 if ( ev->isBirthday() || ev->isAnniversary() )
482 bDay = true; 482 bDay = true;
@@ -538,6 +538,6 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
538 538
539 if ( ev->categories().contains( i18n("Birthday") )) 539 if ( ev->isBirthday())
540 tempText += "<font color=\"#F00000\">" + i18n("Birthday") +":</font>"; 540 tempText += "<font color=\"#00B000\">" + i18n("Birthday") +":</font>";
541 else 541 else
542 tempText += "<font color=\"#F00000\">" + i18n("Anniversary")+":</font>"; 542 tempText += "<font color=\"#00B0000\">" + i18n("Anniversary")+":</font>";
543 } else { 543 } else {
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 708ee6b..9a36939 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -42,2 +42,6 @@ Incidence::Incidence() :
42 mHasRecurrenceID = false; 42 mHasRecurrenceID = false;
43 mHoliday = false;
44 mBirthday = false;
45 mAnniversary = false;
46
43} 47}
@@ -77,2 +81,5 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i )
77 mRecurrence = new Recurrence( *(i.mRecurrence), this ); 81 mRecurrence = new Recurrence( *(i.mRecurrence), this );
82 mHoliday = i.mHoliday ;
83 mBirthday = i.mBirthday;
84 mAnniversary = i.mAnniversary;
78} 85}
@@ -91,2 +98,18 @@ Incidence::~Incidence()
91} 98}
99
100bool Incidence::isHoliday() const
101{
102 return mHoliday;
103}
104bool Incidence::isBirthday() const
105{
106
107 return mBirthday ;
108}
109bool Incidence::isAnniversary() const
110{
111 return mAnniversary ;
112
113}
114
92bool Incidence::hasRecurrenceID() const 115bool Incidence::hasRecurrenceID() const
@@ -304,2 +327,8 @@ QString Incidence::summary() const
304} 327}
328void Incidence::checkCategories()
329{
330 mHoliday = mCategories.contains("Holiday") || mCategories.contains(i18n("Holiday"));
331 mBirthday = mCategories.contains("Birthday") || mCategories.contains(i18n("Birthday"));
332 mAnniversary = mCategories.contains("Anniversary") || mCategories.contains(i18n("Anniversary"));
333}
305 334
@@ -309,2 +338,3 @@ void Incidence::setCategories(const QStringList &categories)
309 mCategories = categories; 338 mCategories = categories;
339 checkCategories();
310 updated(); 340 updated();
@@ -326,3 +356,3 @@ void Incidence::setCategories(const QString &catStr)
326 } 356 }
327 357 checkCategories();
328 updated(); 358 updated();
diff --git a/libkcal/incidence.h b/libkcal/incidence.h
index 0ae9656..f8da342 100644
--- a/libkcal/incidence.h
+++ b/libkcal/incidence.h
@@ -272,2 +272,5 @@ class Incidence : public IncidenceBase
272 QDateTime dtStart() const; 272 QDateTime dtStart() const;
273 bool isHoliday() const;
274 bool isBirthday() const;
275 bool isAnniversary() const;
273 276
@@ -280,2 +283,4 @@ protected:
280 private: 283 private:
284 void checkCategories();
285 bool mHoliday, mBirthday, mAnniversary;
281 int mRevision; 286 int mRevision;