summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-04 22:01:37 (UTC)
committer zautrix <zautrix>2005-07-04 22:01:37 (UTC)
commitd7931731fcf0ffeb5b5267f25fce741ebe1ced13 (patch) (unidiff)
tree87c5e91d5df7d80c6218b0f52323bfdeab24949e /korganizer
parent35f1ad23e06a0f6014d98c952e8b8652b5cffc49 (diff)
downloadkdepimpi-d7931731fcf0ffeb5b5267f25fce741ebe1ced13.zip
kdepimpi-d7931731fcf0ffeb5b5267f25fce741ebe1ced13.tar.gz
kdepimpi-d7931731fcf0ffeb5b5267f25fce741ebe1ced13.tar.bz2
next pix wech
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp24
-rw-r--r--korganizer/koagendaitem.h1
-rw-r--r--korganizer/koagendaview.cpp2
3 files changed, 11 insertions, 16 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 9fe1be4..abb29f7 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -344,7 +344,7 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
344 QPainter pa; 344 QPainter pa;
345 345
346 if ( mSelected ) { 346 if ( mSelected ) {
347 pa.begin( paintPixSel() ); 347 pa.begin( this );
348 } else { 348 } else {
349 if ( mAllDay ) 349 if ( mAllDay )
350 pa.begin( paintPixAllday() ); 350 pa.begin( paintPixAllday() );
@@ -357,7 +357,10 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
357 if ( mAllDay ) 357 if ( mAllDay )
358 yy = y(); 358 yy = y();
359 else 359 else
360 yy = mCellYTop * ( height() / cellHeight() ); 360 yy = mCellYTop * ( height() / cellHeight() );
361 if ( mSelected ) {
362 pa.translate( -x, -yy );
363 }
361 xPaintCoord= x; 364 xPaintCoord= x;
362 yPaintCoord = yy; 365 yPaintCoord = yy;
363 wPaintCoord = width(); 366 wPaintCoord = width();
@@ -470,7 +473,6 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
470void KOAgendaItem::resizePixmap( int w , int h ) 473void KOAgendaItem::resizePixmap( int w , int h )
471{ 474{
472 paintPix()->resize( w, h ); 475 paintPix()->resize( w, h );
473 paintPixSel()->resize( w, h );
474 476
475} 477}
476QPixmap * KOAgendaItem::paintPix() 478QPixmap * KOAgendaItem::paintPix()
@@ -493,16 +495,7 @@ QPixmap * KOAgendaItem::paintPixAllday()
493 } 495 }
494 return mPaintPixA ; 496 return mPaintPixA ;
495} 497}
496QPixmap * KOAgendaItem::paintPixSel() 498
497{
498 static QPixmap* mPaintPixSel = 0;
499 if ( ! mPaintPixSel ) {
500 int w = QApplication::desktop()->width();
501 int h = QApplication::desktop()->height();
502 mPaintPixSel = new QPixmap(w,h);
503 }
504 return mPaintPixSel ;
505}
506void KOAgendaItem::paintEvent ( QPaintEvent *e ) 499void KOAgendaItem::paintEvent ( QPaintEvent *e )
507{ 500{
508 501
@@ -527,6 +520,8 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
527 paintMe( mSelected ); 520 paintMe( mSelected );
528 //qDebug("calling paintMe "); 521 //qDebug("calling paintMe ");
529 globalFlagBlockAgendaItemUpdate = 1; 522 globalFlagBlockAgendaItemUpdate = 1;
523 if ( mSelected )
524 return;
530 } 525 }
531 int rx, ry, rw, rh; 526 int rx, ry, rw, rh;
532 rx = e->rect().x(); 527 rx = e->rect().x();
@@ -537,7 +532,8 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
537 532
538 QPixmap* paintFrom ; 533 QPixmap* paintFrom ;
539 if ( mSelected ) { 534 if ( mSelected ) {
540 paintFrom = paintPixSel(); 535 paintMe( mSelected );
536 return;
541 } else { 537 } else {
542 if ( mAllDay ) 538 if ( mAllDay )
543 paintFrom = paintPixAllday(); 539 paintFrom = paintPixAllday();
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index dc2316a..7103abe 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -103,7 +103,6 @@ class KOAgendaItem : public QWidget
103 void repaintMe(); 103 void repaintMe();
104 static void resizePixmap( int, int ); 104 static void resizePixmap( int, int );
105 static QPixmap * paintPix(); 105 static QPixmap * paintPix();
106 static QPixmap * paintPixSel();
107 static QPixmap * paintPixAllday(); 106 static QPixmap * paintPixAllday();
108 void updateItem(); 107 void updateItem();
109 void computeText(); 108 void computeText();
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 5a63b35..f811fba 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -603,7 +603,7 @@ KOAgendaView::~KOAgendaView()
603 delete mAllAgendaPopup; 603 delete mAllAgendaPopup;
604 //delete mAllDayAgendaPopup; 604 //delete mAllDayAgendaPopup;
605 delete KOAgendaItem::paintPix(); 605 delete KOAgendaItem::paintPix();
606 delete KOAgendaItem::paintPixSel(); 606 delete KOAgendaItem::paintPixAllday();
607} 607}
608void KOAgendaView::resizeEvent( QResizeEvent* e ) 608void KOAgendaView::resizeEvent( QResizeEvent* e )
609{ 609{