author | zautrix <zautrix> | 2005-04-05 09:30:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-05 09:30:00 (UTC) |
commit | 53d7ec81939a9cf7ea2f63f133c1b61b2e2a9216 (patch) (side-by-side diff) | |
tree | 8dfcb059271cbfd4e28425d85dea747aa998594d /korganizer/komonthview.cpp | |
parent | 768858848f466a726e2f50b777345976828cc2ff (diff) | |
download | kdepimpi-53d7ec81939a9cf7ea2f63f133c1b61b2e2a9216.zip kdepimpi-53d7ec81939a9cf7ea2f63f133c1b61b2e2a9216.tar.gz kdepimpi-53d7ec81939a9cf7ea2f63f133c1b61b2e2a9216.tar.bz2 |
fix
-rw-r--r-- | korganizer/komonthview.cpp | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 1ed288b..425496a 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -270,4 +270,5 @@ MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s) mReply = false; mInfo = false; + mdayPos = 0; isWeekItem = KOPrefs::instance()->mMonthViewWeek; //qDebug("NEWWWWWWWWWWWWW "); @@ -283,4 +284,5 @@ void MonthViewItem::recycle( Incidence *incidence, QDate qd, const QString & s) mReply = false; mInfo = false; + mdayPos = 0; //qDebug("recucleeeeeeeeeeeeeeeee "); } @@ -571,5 +573,5 @@ void MonthViewCell::setHoliday( const QString &holiday ) void MonthViewCell::startUpdateCell() { - + mdayCount = 0; setFocusPolicy(NoFocus); if ( !mMonthView->isUpdatePossible() ) @@ -622,5 +624,5 @@ void MonthViewCell::startUpdateCell() } -void MonthViewCell::insertEvent(Event *event) +int MonthViewCell::insertEvent(Event *event) { QString mToolTipText; @@ -628,8 +630,8 @@ void MonthViewCell::insertEvent(Event *event) if ( !(event->doesRecur() == Recurrence::rNone) ) { if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) - return; + return mdayCount; else if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly ) - return; + return mdayCount; } @@ -731,6 +733,22 @@ void MonthViewCell::insertEvent(Event *event) #endif item->setMultiDay( multiday ); - insertItem( item ); + if ( multiday ) { + insertItem( item ,mdayCount); + ++mdayCount; + } else { + uint i; + int pos = mdayCount; + for ( i = mdayCount; i < count();++i ) { + QListBoxItem* it = this->item ( i ); + if ( text < it->text() ) { + pos = i; + break; + } + ++pos; + } + insertItem( item ,pos); + } mToolTip.append( mToolTipText ); + return mdayCount; } void MonthViewCell::insertTodo(Todo *todo) @@ -782,5 +800,5 @@ void MonthViewCell::insertTodo(Todo *todo) item->setAlarm( todo->isAlarmEnabled() ); item->setMoreInfo( todo->description().length() > 0 ); - insertItem( item ); + insertItem( item , count()); mToolTip.append( text ); } @@ -805,5 +823,5 @@ void MonthViewCell::finishUpdateCell() } #endif - sort(); + //sort(); //setMyPalette(); setMyPalette(); |