author | zautrix <zautrix> | 2005-02-19 23:16:04 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-19 23:16:04 (UTC) |
commit | e82ab2271ce57a71a0ae3890e9b09a9fcc6043e4 (patch) (unidiff) | |
tree | f4aee70f22fe7807279e0b6c7ee2c6e420694331 | |
parent | 6c152b28df5d22b75b1b0dcef77073f0320c5710 (diff) | |
download | kdepimpi-e82ab2271ce57a71a0ae3890e9b09a9fcc6043e4.zip kdepimpi-e82ab2271ce57a71a0ae3890e9b09a9fcc6043e4.tar.gz kdepimpi-e82ab2271ce57a71a0ae3890e9b09a9fcc6043e4.tar.bz2 |
fix
-rw-r--r-- | korganizer/komonthview.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 3aaa50a..c125ce9 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -174,49 +174,49 @@ void KNoScrollListBox::oneDown() | |||
174 | void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e) | 174 | void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e) |
175 | { | 175 | { |
176 | switch(e->key()) { | 176 | switch(e->key()) { |
177 | case Key_Shift: | 177 | case Key_Shift: |
178 | emit shiftUp(); | 178 | emit shiftUp(); |
179 | break; | 179 | break; |
180 | default: | 180 | default: |
181 | break; | 181 | break; |
182 | } | 182 | } |
183 | } | 183 | } |
184 | 184 | ||
185 | void KNoScrollListBox::mousePressEvent(QMouseEvent *e) | 185 | void KNoScrollListBox::mousePressEvent(QMouseEvent *e) |
186 | { | 186 | { |
187 | QListBox::mousePressEvent(e); | 187 | QListBox::mousePressEvent(e); |
188 | 188 | ||
189 | if(e->button() == RightButton) { | 189 | if(e->button() == RightButton) { |
190 | emit rightClick(); | 190 | emit rightClick(); |
191 | } | 191 | } |
192 | } | 192 | } |
193 | 193 | ||
194 | MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s) | 194 | MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s) |
195 | : QListBoxItem() | 195 | : QListBoxItem() |
196 | { | 196 | { |
197 | setText( s ); | 197 | setText( s ); |
198 | 198 | mMultiday = 0; | |
199 | mIncidence = incidence; | 199 | mIncidence = incidence; |
200 | mDate = qd; | 200 | mDate = qd; |
201 | mRecur = false; | 201 | mRecur = false; |
202 | mAlarm = false; | 202 | mAlarm = false; |
203 | mReply = false; | 203 | mReply = false; |
204 | mInfo = false; | 204 | mInfo = false; |
205 | } | 205 | } |
206 | 206 | ||
207 | void MonthViewItem::paint(QPainter *p) | 207 | void MonthViewItem::paint(QPainter *p) |
208 | { | 208 | { |
209 | #if QT_VERSION >= 0x030000 | 209 | #if QT_VERSION >= 0x030000 |
210 | bool sel = isSelected(); | 210 | bool sel = isSelected(); |
211 | #else | 211 | #else |
212 | bool sel = selected(); | 212 | bool sel = selected(); |
213 | #endif | 213 | #endif |
214 | 214 | ||
215 | 215 | ||
216 | if (KOPrefs::instance()->mMonthViewUsesCategoryColor) | 216 | if (KOPrefs::instance()->mMonthViewUsesCategoryColor) |
217 | { | 217 | { |
218 | p->setBackgroundColor( palette().color( QPalette::Normal, \ | 218 | p->setBackgroundColor( palette().color( QPalette::Normal, \ |
219 | sel ? QColorGroup::Highlight : QColorGroup::Background ) ); | 219 | sel ? QColorGroup::Highlight : QColorGroup::Background ) ); |
220 | p->eraseRect( 0, 0, listBox()->maxItemWidth(), height( listBox() ) ); | 220 | p->eraseRect( 0, 0, listBox()->maxItemWidth(), height( listBox() ) ); |
221 | } | 221 | } |
222 | int x = 1; | 222 | int x = 1; |
@@ -495,50 +495,51 @@ void MonthViewCell::insertEvent(Event *event) | |||
495 | if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) | 495 | if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) |
496 | return; | 496 | return; |
497 | else | 497 | else |
498 | if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) | 498 | if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) |
499 | return; | 499 | return; |
500 | } | 500 | } |
501 | 501 | ||
502 | if ( event->categories().contains("Holiday") || | 502 | if ( event->categories().contains("Holiday") || |
503 | event->categories().contains(i18n("Holiday"))) { | 503 | event->categories().contains(i18n("Holiday"))) { |
504 | setHoliday( true ); | 504 | setHoliday( true ); |
505 | if ( mDate.dayOfWeek() == 7 ) | 505 | if ( mDate.dayOfWeek() == 7 ) |
506 | mItemList->setLineWidth( 3 ); | 506 | mItemList->setLineWidth( 3 ); |
507 | } | 507 | } |
508 | QString text; | 508 | QString text; |
509 | int multiday = 0;// 1 = start, 2 = midddle, 3 = end day | 509 | int multiday = 0;// 1 = start, 2 = midddle, 3 = end day |
510 | if (event->isMultiDay()) { | 510 | if (event->isMultiDay()) { |
511 | QString prefix = "<->";multiday = 2; | 511 | QString prefix = "<->";multiday = 2; |
512 | QString time; | 512 | QString time; |
513 | if ( event->doesRecur() ) { | 513 | if ( event->doesRecur() ) { |
514 | if ( event->recursOn( mDate) ) { | 514 | if ( event->recursOn( mDate) ) { |
515 | prefix ="->" ;multiday = 1; | 515 | prefix ="->" ;multiday = 1; |
516 | } | 516 | } |
517 | else { | 517 | else { |
518 | int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); | 518 | int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); |
519 | if ( event->recursOn( mDate.addDays( -days)) ) | 519 | if ( event->recursOn( mDate.addDays( -days)) ) { |
520 | prefix ="<-" ;multiday = 3; | 520 | prefix ="<-" ;multiday = 3; |
521 | } | ||
521 | } | 522 | } |
522 | 523 | ||
523 | } else { | 524 | } else { |
524 | if (mDate == event->dtStart().date()) { | 525 | if (mDate == event->dtStart().date()) { |
525 | prefix ="->" ;multiday = 1; | 526 | prefix ="->" ;multiday = 1; |
526 | } else if (mDate == event->dtEnd().date()) { | 527 | } else if (mDate == event->dtEnd().date()) { |
527 | prefix ="<-" ;multiday = 3; | 528 | prefix ="<-" ;multiday = 3; |
528 | } | 529 | } |
529 | } | 530 | } |
530 | if ( !event->doesFloat() ) { | 531 | if ( !event->doesFloat() ) { |
531 | if ( mDate == event->dtStart().date () ) | 532 | if ( mDate == event->dtStart().date () ) |
532 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; | 533 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; |
533 | else if ( mDate == event->dtEnd().date () ) | 534 | else if ( mDate == event->dtEnd().date () ) |
534 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; | 535 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; |
535 | 536 | ||
536 | } | 537 | } |
537 | text = time + event->summary(); | 538 | text = time + event->summary(); |
538 | mToolTip += prefix + text; | 539 | mToolTip += prefix + text; |
539 | } else { | 540 | } else { |
540 | if (event->doesFloat()) { | 541 | if (event->doesFloat()) { |
541 | text = event->summary(); | 542 | text = event->summary(); |
542 | mToolTip += text; | 543 | mToolTip += text; |
543 | } | 544 | } |
544 | else { | 545 | else { |