summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
authorzautrix <zautrix>2005-04-09 16:49:42 (UTC)
committer zautrix <zautrix>2005-04-09 16:49:42 (UTC)
commitd1982b1423417eb59c275bb09d4e3012a67ca086 (patch) (side-by-side diff)
treef170a17f3d04e9d11d450233ea2d55f5803760fb /korganizer/koagenda.cpp
parent329ecb2c6b4153c51415513a28f2dc0576f4ddca (diff)
downloadkdepimpi-d1982b1423417eb59c275bb09d4e3012a67ca086.zip
kdepimpi-d1982b1423417eb59c275bb09d4e3012a67ca086.tar.gz
kdepimpi-d1982b1423417eb59c275bb09d4e3012a67ca086.tar.bz2
nf
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp124
1 files changed, 57 insertions, 67 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 148d914..18c506e 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1364,81 +1364,71 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
if ( globalFlagBlockAgenda )
return;
- //qDebug("KOAgenda::drawContents ");
- if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() )
- ;//drawContentsToPainter();
+ if ( ! mAllDayMode ) {
+ // currently not working for
- QPaintDevice* pd = p->device();
- p->end();
- int vx, vy;
- int selectionX = KOGlobals::self()->reverseLayout() ?
+ //qDebug("KOAgenda::drawContents ");
+ if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() )
+ ;//drawContentsToPainter();
+
+ QPaintDevice* pd = p->device();
+ p->end();
+ int vx, vy;
+ int selectionX = KOGlobals::self()->reverseLayout() ?
(mColumns - 1 - mSelectionCellX) * mGridSpacingX :
mSelectionCellX * mGridSpacingX;
- contentsToViewport ( cx, cy, vx,vy);
- //qDebug(" %d %d %d %d %d", cx, cy, cw,ch,mGridSpacingX-1) ;
+ contentsToViewport ( cx, cy, vx,vy);
+ //qDebug(" %d %d %d %d %d", cx, cy, cw,ch,mGridSpacingX-1) ;
- if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) {
- if ( mGridSpacingX == cw && mSelectionHeight > 0 && ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
- ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) ) {
+ if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) {
+ if ( mGridSpacingX == cw && mSelectionHeight > 0 && ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
+ ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) ) {
- int vxSel, vySel;
- contentsToViewport ( selectionX, mSelectionYTop, vxSel,vySel);
- int off = mSelectionHeight;
- if ( vySel < 0 )
- off += vySel;
- //qDebug("OFF %d %d %d", off,vySel, vy );
- bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,CopyROP);
- } else {
- bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP);
+ int vxSel, vySel;
+ contentsToViewport ( selectionX, mSelectionYTop, vxSel,vySel);
+ int off = mSelectionHeight;
+ if ( vySel < 0 )
+ off += vySel;
+ //qDebug("OFF %d %d %d", off,vySel, vy );
+ bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,CopyROP);
+ } else {
+ bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP);
+ }
}
- }
- if ( mSelectionHeight > 0 ) {
- //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight );
- if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
- ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) {
- contentsToViewport ( selectionX, mSelectionYTop, vx,vy);
- bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP);
- }
- }
- //qDebug("btbl ");
- p->begin( pd );
- //qDebug("end ");
-#if 0
-
- if ( globalFlagBlockAgenda )
- return;
- //qDebug("KOAgenda::drawContents ");
- if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() )
- ;//drawContentsToPainter();
+ if ( mSelectionHeight > 0 ) {
+ //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight );
+ if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
+ ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) {
+ contentsToViewport ( selectionX, mSelectionYTop, vx,vy);
+ bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP);
+ }
+ }
+ p->begin( pd );
+ } else {
+
+ if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() )
+ ;//drawContentsToPainter();
- QPaintDevice* pd = p->device();
- p->end();
- int vx, vy;
- int selectionX = KOGlobals::self()->reverseLayout() ?
+ QPaintDevice* pd = p->device();
+ p->end();
+ int vx, vy;
+ int selectionX = KOGlobals::self()->reverseLayout() ?
(mColumns - 1 - mSelectionCellX) * mGridSpacingX :
mSelectionCellX * mGridSpacingX;
- contentsToViewport ( cx, cy, vx,vy);
- // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ;
- if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) )
- bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP);
+ contentsToViewport ( cx, cy, vx,vy);
+ // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ;
+ if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) )
+ bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP);
- if ( mSelectionHeight > 0 ) {
- //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight );
- if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
- ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) {
- contentsToViewport ( selectionX, mSelectionYTop, vx,vy);
- bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP);
- }
- }
- //qDebug("btbl ");
- p->begin( pd );
- //qDebug("end ");
-
-
-
-
-
-
+ if ( mSelectionHeight > 0 ) {
+ //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight );
+ if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) &&
+ ( cy + ch ) >= mSelectionYTop && cy <= ( mSelectionYTop + mSelectionHeight ) ) {
+ contentsToViewport ( selectionX, mSelectionYTop, vx,vy);
+ bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP);
+ }
+ }
+ p->begin( pd );
+ }
-#endif
}
@@ -1968,5 +1958,5 @@ void KOAgenda::finishResize ( )
void KOAgenda::resizeEvent ( QResizeEvent *ev )
{
-
+ mSelectionHeight = 0;
mResizeTimer.start( 150 , true );
computeSizes();