summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp34
1 files changed, 26 insertions, 8 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 1ed288b..425496a 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -271,2 +271,3 @@ MonthViewItem::MonthViewItem( Incidence *incidence, QDate qd, const QString & s)
mInfo = false;
+ mdayPos = 0;
isWeekItem = KOPrefs::instance()->mMonthViewWeek;
@@ -283,3 +284,4 @@ void MonthViewItem::recycle( Incidence *incidence, QDate qd, const QString & s)
mReply = false;
- mInfo = false;
+ mInfo = false;
+ mdayPos = 0;
//qDebug("recucleeeeeeeeeeeeeeeee ");
@@ -572,3 +574,3 @@ void MonthViewCell::startUpdateCell()
{
-
+ mdayCount = 0;
setFocusPolicy(NoFocus);
@@ -623,3 +625,3 @@ void MonthViewCell::startUpdateCell()
-void MonthViewCell::insertEvent(Event *event)
+int MonthViewCell::insertEvent(Event *event)
{
@@ -629,6 +631,6 @@ void MonthViewCell::insertEvent(Event *event)
if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily )
- return;
+ return mdayCount;
else
if ( !KOPrefs::instance()->mMonthWeeklyRecur && event->doesRecur() == Recurrence::rWeekly )
- return;
+ return mdayCount;
}
@@ -732,4 +734,20 @@ void MonthViewCell::insertEvent(Event *event)
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;
}
@@ -783,3 +801,3 @@ void MonthViewCell::insertTodo(Todo *todo)
item->setMoreInfo( todo->description().length() > 0 );
- insertItem( item );
+ insertItem( item , count());
mToolTip.append( text );
@@ -806,3 +824,3 @@ void MonthViewCell::finishUpdateCell()
#endif
- sort();
+ //sort();
//setMyPalette();