-rw-r--r-- | korganizer/koagenda.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 148d914..18c506e 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -1358,16 +1358,19 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem) | |||
1358 | // } | 1358 | // } |
1359 | // placeItem->updateItem(); | 1359 | // placeItem->updateItem(); |
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(); |
1372 | int vx, vy; | 1375 | int vx, vy; |
1373 | int selectionX = KOGlobals::self()->reverseLayout() ? | 1376 | int selectionX = KOGlobals::self()->reverseLayout() ? |
@@ -1394,24 +1397,19 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | |||
1394 | if ( mSelectionHeight > 0 ) { | 1397 | if ( mSelectionHeight > 0 ) { |
1395 | //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); | 1398 | //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); |
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; |
1416 | int selectionX = KOGlobals::self()->reverseLayout() ? | 1414 | int selectionX = KOGlobals::self()->reverseLayout() ? |
1417 | (mColumns - 1 - mSelectionCellX) * mGridSpacingX : | 1415 | (mColumns - 1 - mSelectionCellX) * mGridSpacingX : |
@@ -1424,27 +1422,19 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) | |||
1424 | if ( mSelectionHeight > 0 ) { | 1422 | if ( mSelectionHeight > 0 ) { |
1425 | //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); | 1423 | //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); |
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; |
1449 | globalFlagBlockAgendaItemPaint = 1; | 1439 | globalFlagBlockAgendaItemPaint = 1; |
1450 | // Adjust sub cell geometry of all conflict items of all conflict items of all conflict items ... of the conflict item with the max number of conflictitems | 1440 | // Adjust sub cell geometry of all conflict items of all conflict items of all conflict items ... of the conflict item with the max number of conflictitems |
@@ -1962,17 +1952,17 @@ void KOAgenda::finishResize ( ) | |||
1962 | //qDebug("finishUpdate() called "); | 1952 | //qDebug("finishUpdate() called "); |
1963 | } | 1953 | } |
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() |
1977 | { | 1967 | { |
1978 | if ( globalFlagBlockStartup ) | 1968 | if ( globalFlagBlockStartup ) |