author | zautrix <zautrix> | 2005-04-09 16:49:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-09 16:49:42 (UTC) |
commit | d1982b1423417eb59c275bb09d4e3012a67ca086 (patch) (unidiff) | |
tree | f170a17f3d04e9d11d450233ea2d55f5803760fb | |
parent | 329ecb2c6b4153c51415513a28f2dc0576f4ddca (diff) | |
download | kdepimpi-d1982b1423417eb59c275bb09d4e3012a67ca086.zip kdepimpi-d1982b1423417eb59c275bb09d4e3012a67ca086.tar.gz kdepimpi-d1982b1423417eb59c275bb09d4e3012a67ca086.tar.bz2 |
nf
-rw-r--r-- | korganizer/koagenda.cpp | 22 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 5 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 28 |
3 files changed, 38 insertions, 17 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 148d914..18c506e 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -1360,12 +1360,15 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem) | |||
1360 | } | 1360 | } |
1361 | 1361 | ||
1362 | void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | 1362 | void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) |
1363 | { | 1363 | { |
1364 | if ( globalFlagBlockAgenda ) | 1364 | if ( globalFlagBlockAgenda ) |
1365 | return; | 1365 | return; |
1366 | if ( ! mAllDayMode ) { | ||
1367 | // currently not working for | ||
1368 | |||
1366 | //qDebug("KOAgenda::drawContents "); | 1369 | //qDebug("KOAgenda::drawContents "); |
1367 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) | 1370 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) |
1368 | ;//drawContentsToPainter(); | 1371 | ;//drawContentsToPainter(); |
1369 | 1372 | ||
1370 | QPaintDevice* pd = p->device(); | 1373 | QPaintDevice* pd = p->device(); |
1371 | p->end(); | 1374 | p->end(); |
@@ -1396,20 +1399,15 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | |||
1396 | if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && | 1399 | if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && |
1397 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { | 1400 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { |
1398 | contentsToViewport ( selectionX, mSelectionYTop, vx,vy); | 1401 | contentsToViewport ( selectionX, mSelectionYTop, vx,vy); |
1399 | bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP); | 1402 | bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP); |
1400 | } | 1403 | } |
1401 | } | 1404 | } |
1402 | //qDebug("btbl "); | ||
1403 | p->begin( pd ); | 1405 | p->begin( pd ); |
1404 | //qDebug("end "); | 1406 | } else { |
1405 | #if 0 | ||
1406 | 1407 | ||
1407 | if ( globalFlagBlockAgenda ) | ||
1408 | return; | ||
1409 | //qDebug("KOAgenda::drawContents "); | ||
1410 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) | 1408 | if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) |
1411 | ;//drawContentsToPainter(); | 1409 | ;//drawContentsToPainter(); |
1412 | 1410 | ||
1413 | QPaintDevice* pd = p->device(); | 1411 | QPaintDevice* pd = p->device(); |
1414 | p->end(); | 1412 | p->end(); |
1415 | int vx, vy; | 1413 | int vx, vy; |
@@ -1426,23 +1424,15 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | |||
1426 | if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && | 1424 | if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && |
1427 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { | 1425 | ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) { |
1428 | contentsToViewport ( selectionX, mSelectionYTop, vx,vy); | 1426 | contentsToViewport ( selectionX, mSelectionYTop, vx,vy); |
1429 | bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP); | 1427 | bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP); |
1430 | } | 1428 | } |
1431 | } | 1429 | } |
1432 | //qDebug("btbl "); | ||
1433 | p->begin( pd ); | 1430 | p->begin( pd ); |
1434 | //qDebug("end "); | 1431 | } |
1435 | |||
1436 | |||
1437 | |||
1438 | |||
1439 | |||
1440 | |||
1441 | 1432 | ||
1442 | #endif | ||
1443 | } | 1433 | } |
1444 | 1434 | ||
1445 | void KOAgenda::finishUpdate() | 1435 | void KOAgenda::finishUpdate() |
1446 | { | 1436 | { |
1447 | 1437 | ||
1448 | KOAgendaItem *item; | 1438 | KOAgendaItem *item; |
@@ -1964,13 +1954,13 @@ void KOAgenda::finishResize ( ) | |||
1964 | } | 1954 | } |
1965 | /* | 1955 | /* |
1966 | Overridden from QScrollView to provide proper resizing of KOAgendaItems. | 1956 | Overridden from QScrollView to provide proper resizing of KOAgendaItems. |
1967 | */ | 1957 | */ |
1968 | void KOAgenda::resizeEvent ( QResizeEvent *ev ) | 1958 | void KOAgenda::resizeEvent ( QResizeEvent *ev ) |
1969 | { | 1959 | { |
1970 | 1960 | mSelectionHeight = 0; | |
1971 | mResizeTimer.start( 150 , true ); | 1961 | mResizeTimer.start( 150 , true ); |
1972 | computeSizes(); | 1962 | computeSizes(); |
1973 | return; | 1963 | return; |
1974 | 1964 | ||
1975 | } | 1965 | } |
1976 | void KOAgenda::computeSizes() | 1966 | void KOAgenda::computeSizes() |
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index c9e307f..1801d7e 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -546,16 +546,19 @@ void KOAgendaItem::computeText() | |||
546 | } else { | 546 | } else { |
547 | if ( !(mIncidence->doesFloat()) && KOPrefs::instance()->mShowTimeInAgenda) | 547 | if ( !(mIncidence->doesFloat()) && KOPrefs::instance()->mShowTimeInAgenda) |
548 | mDisplayedText += ": " +KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtStart().time()) + " - " + KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtEnd().time()) ; | 548 | mDisplayedText += ": " +KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtStart().time()) + " - " + KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtEnd().time()) ; |
549 | 549 | ||
550 | if ( mAllDay ) { | 550 | if ( mAllDay ) { |
551 | if ( mIncidence->dtStart().date().addDays(3) < mIncidence->dtEnd().date() ) { | 551 | if ( mIncidence->dtStart().date().addDays(3) < mIncidence->dtEnd().date() ) { |
552 | if ( mIncidence->doesRecur() ) { | ||
553 | mDisplayedText += " (" + mIncidence->recurrence()->recurrenceText() + ")"; | ||
554 | } else { | ||
552 | mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) ; | 555 | mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) ; |
553 | } | 556 | } |
554 | } | 557 | } |
555 | 558 | } | |
556 | } | 559 | } |
557 | 560 | ||
558 | if ( !mIncidence->location().isEmpty() ) { | 561 | if ( !mIncidence->location().isEmpty() ) { |
559 | if ( mAllDay ) | 562 | if ( mAllDay ) |
560 | mDisplayedText += " ("; | 563 | mDisplayedText += " ("; |
561 | else | 564 | else |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 76d5c4b..f53e5d5 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -1157,13 +1157,41 @@ void KOAgendaView::fillAgenda() | |||
1157 | int endX = currentDate.daysTo(event->dtEnd().date()) + curCol; | 1157 | int endX = currentDate.daysTo(event->dtEnd().date()) + curCol; |
1158 | 1158 | ||
1159 | // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl; | 1159 | // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl; |
1160 | 1160 | ||
1161 | if (event->doesFloat()) { | 1161 | if (event->doesFloat()) { |
1162 | if (event->recurrence()->doesRecur()) { | 1162 | if (event->recurrence()->doesRecur()) { |
1163 | if (event->isMultiDay() ) { | ||
1164 | endX = endX - beginX;// endX is now number of days | ||
1165 | if ( event->recursOn( currentDate ) ) { | ||
1166 | endX += curCol; | ||
1167 | beginX = curCol; | ||
1168 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | ||
1169 | } else { | ||
1170 | //qDebug("days %d %s",endX , currentDate.toString().latin1()); | ||
1171 | QDate dateit = currentDate.addDays( -endX ); | ||
1172 | if ( event->recursOn( dateit ) ) { | ||
1173 | //qDebug("found %d %d %d %s", endX,curCol, curCol-endX ,dateit.toString().latin1() ); | ||
1174 | if ( curCol-endX < 0 ) { | ||
1175 | mAllDayAgenda->insertAllDayItem(event,currentDate,0,curCol); | ||
1176 | } | ||
1177 | } | ||
1178 | } | ||
1179 | } else { | ||
1163 | mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); | 1180 | mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); |
1181 | } | ||
1182 | #if 0 | ||
1183 | if (beginX <= 0 && curCol == 0) { | ||
1184 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | ||
1185 | } else if (beginX == curCol) { | ||
1186 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | ||
1187 | } else { | ||
1188 | qDebug("skipped %d %d %d ",beginX , endX, curCol); | ||
1189 | } | ||
1190 | #endif | ||
1191 | //mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); | ||
1164 | } else { | 1192 | } else { |
1165 | if (beginX <= 0 && curCol == 0) { | 1193 | if (beginX <= 0 && curCol == 0) { |
1166 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | 1194 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); |
1167 | } else if (beginX == curCol) { | 1195 | } else if (beginX == curCol) { |
1168 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | 1196 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); |
1169 | } | 1197 | } |