summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-15 11:29:40 (UTC)
committer zautrix <zautrix>2005-03-15 11:29:40 (UTC)
commit79b580aacaa1626ccb8c2657796051bf79701e2d (patch) (unidiff)
tree3c2d7d61a945e5abb77eb542b943d8b1d5c0d029
parent6b748e1b7b4213871a5866a9af50e99800d2a704 (diff)
downloadkdepimpi-79b580aacaa1626ccb8c2657796051bf79701e2d.zip
kdepimpi-79b580aacaa1626ccb8c2657796051bf79701e2d.tar.gz
kdepimpi-79b580aacaa1626ccb8c2657796051bf79701e2d.tar.bz2
monthview tooltip sort fixed
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp24
-rw-r--r--korganizer/komonthview.h2
2 files changed, 14 insertions, 12 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 4bf9dea..004ff50 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -493,6 +493,6 @@ void MonthViewCell::startUpdateCell()
493#ifdef DESKTOP_VERSION 493#ifdef DESKTOP_VERSION
494 QToolTip::remove(this); 494 QToolTip::remove(this);
495#endif 495#endif
496 mToolTip = ""; 496 mToolTip.clear();
497 //qApp->processEvents(); 497 //qApp->processEvents();
498 if ( !mHolidayString.isEmpty() ) { 498 if ( !mHolidayString.isEmpty() ) {
@@ -500,5 +500,5 @@ void MonthViewCell::startUpdateCell()
500 item->setPalette( mHolidayPalette ); 500 item->setPalette( mHolidayPalette );
501 mItemList->insertItem( item ); 501 mItemList->insertItem( item );
502 mToolTip += mHolidayString+"\n"; 502 mToolTip.append ( mHolidayString );
503 } 503 }
504} 504}
@@ -506,5 +506,5 @@ void MonthViewCell::startUpdateCell()
506void MonthViewCell::insertEvent(Event *event) 506void MonthViewCell::insertEvent(Event *event)
507{ 507{
508 508 QString mToolTipText;
509 mItemList->setFocusPolicy(WheelFocus); 509 mItemList->setFocusPolicy(WheelFocus);
510 if ( !(event->doesRecur() == Recurrence::rNone) ) { 510 if ( !(event->doesRecur() == Recurrence::rNone) ) {
@@ -553,14 +553,14 @@ void MonthViewCell::insertEvent(Event *event)
553 } 553 }
554 text = time + event->summary(); 554 text = time + event->summary();
555 mToolTip += prefix + text; 555 mToolTipText += prefix + text;
556 } else { 556 } else {
557 if (event->doesFloat()) { 557 if (event->doesFloat()) {
558 text = event->summary(); 558 text = event->summary();
559 mToolTip += text; 559 mToolTipText += text;
560 } 560 }
561 else { 561 else {
562 text = KGlobal::locale()->formatTime(event->dtStart().time()); 562 text = KGlobal::locale()->formatTime(event->dtStart().time());
563 text += " " + event->summary(); 563 text += " " + event->summary();
564 mToolTip += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); 564 mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary();
565 } 565 }
566 } 566 }
@@ -607,5 +607,5 @@ void MonthViewCell::insertEvent(Event *event)
607 item->setMultiDay( multiday ); 607 item->setMultiDay( multiday );
608 mItemList->insertItem( item ); 608 mItemList->insertItem( item );
609 mToolTip += "\n"; 609 mToolTip.append( mToolTipText );
610} 610}
611void MonthViewCell::insertTodo(Todo *todo) 611void MonthViewCell::insertTodo(Todo *todo)
@@ -651,11 +651,13 @@ void MonthViewCell::insertTodo(Todo *todo)
651 item->setMoreInfo( todo->description().length() > 0 ); 651 item->setMoreInfo( todo->description().length() > 0 );
652 mItemList->insertItem( item ); 652 mItemList->insertItem( item );
653 mToolTip += text+"\n"; 653 mToolTip.append( text );
654} 654}
655void MonthViewCell::finishUpdateCell() 655void MonthViewCell::finishUpdateCell()
656{ 656{
657#ifdef DESKTOP_VERSION 657#ifdef DESKTOP_VERSION
658 if (mToolTip != "") 658 if (mToolTip.count() > 0 ) {
659 QToolTip::add(this,mToolTip,toolTipGroup(),""); 659 mToolTip.sort();
660 QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),"");
661 }
660#endif 662#endif
661 mItemList->sort(); 663 mItemList->sort();
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index fd8cbf2..a92421b 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -168,5 +168,5 @@ class MonthViewCell : public QWidget
168 168
169 protected: 169 protected:
170 QString mToolTip; 170 QStringList mToolTip;
171 void resizeEvent( QResizeEvent * ); 171 void resizeEvent( QResizeEvent * );
172 172