summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-04 22:19:14 (UTC)
committer zautrix <zautrix>2005-07-04 22:19:14 (UTC)
commit671d832454c8b68e0bb44e439f28fb1c768e033d (patch) (unidiff)
treea938029d62ba7d54ee5cb3de0c6cc0cc449dba51
parentd7931731fcf0ffeb5b5267f25fce741ebe1ced13 (diff)
downloadkdepimpi-671d832454c8b68e0bb44e439f28fb1c768e033d.zip
kdepimpi-671d832454c8b68e0bb44e439f28fb1c768e033d.tar.gz
kdepimpi-671d832454c8b68e0bb44e439f28fb1c768e033d.tar.bz2
fixix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp10
-rw-r--r--korganizer/koagendaitem.cpp6
-rw-r--r--korganizer/koagendaitem.h1
3 files changed, 8 insertions, 9 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 9b817bc..01cef35 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1904,30 +1904,34 @@ void KOAgenda::computeSizes()
1904 subCellWidth = mGridSpacingX / item->subCells(); 1904 subCellWidth = mGridSpacingX / item->subCells();
1905 item->resize(subCellWidth,item->height()); 1905 item->resize(subCellWidth,item->height());
1906 moveChild(item,(KOGlobals::self()->reverseLayout() ? 1906 moveChild(item,(KOGlobals::self()->reverseLayout() ?
1907 (mColumns - 1 - item->cellX()) * mGridSpacingX : 1907 (mColumns - 1 - item->cellX()) * mGridSpacingX :
1908 item->cellX() * mGridSpacingX) + 1908 item->cellX() * mGridSpacingX) +
1909 item->subCell() * subCellWidth,childY(item)); 1909 item->subCell() * subCellWidth,childY(item));
1910 } 1910 }
1911 } 1911 }
1912 int cw = contentsWidth(); 1912 int cw = contentsWidth();
1913 int ch = contentsHeight(); 1913 int ch = contentsHeight();
1914 if ( mAllDayMode ) { 1914 if ( mAllDayMode ) {
1915 QPixmap* paintPixAll = KOAgendaItem::paintPixAllday(); 1915 QPixmap* paintPixAll = KOAgendaItem::paintPixAllday();
1916 if ( (paintPixAll->width() < cw || paintPixAll->height() < ch) && cw > 0 && ch > 0 ) 1916 if ( (paintPixAll->width() < cw || paintPixAll->height() < ch) && cw > 0 && ch > 0 ) {
1917 //qDebug("paintPixAll->resize ");
1917 paintPixAll->resize( cw, ch ); 1918 paintPixAll->resize( cw, ch );
1919 }
1918 } else { 1920 } else {
1919 QPixmap* paintPix = KOAgendaItem::paintPix(); 1921 QPixmap* paintPix = KOAgendaItem::paintPix();
1920 if ( paintPix->width() < cw || paintPix->height() < ch ) 1922 if ( paintPix->width() < cw || paintPix->height() < ch ) {
1921 KOAgendaItem::resizePixmap( cw , ch ); 1923 //qDebug("paintPix->resize ");
1924 paintPix->resize( cw , ch );
1925 }
1922 } 1926 }
1923 1927
1924 checkScrollBoundaries(); 1928 checkScrollBoundaries();
1925 marcus_bains(); 1929 marcus_bains();
1926 drawContentsToPainter(); 1930 drawContentsToPainter();
1927 viewport()->repaint(false); 1931 viewport()->repaint(false);
1928} 1932}
1929 1933
1930void KOAgenda::scrollUp() 1934void KOAgenda::scrollUp()
1931{ 1935{
1932 scrollBy(0,-mScrollOffset); 1936 scrollBy(0,-mScrollOffset);
1933} 1937}
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index abb29f7..f855b03 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -461,45 +461,41 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
461 461
462 small = ( height() < 20 ); 462 small = ( height() < 20 );
463 463
464 if ( ! small ) { 464 if ( ! small ) {
465 QFontMetrics fm ( paint->font() ); 465 QFontMetrics fm ( paint->font() );
466 paint->drawLine(dr.left(), yy+fm.height()/2, dr.right()-2, yy+fm.height()/2); 466 paint->drawLine(dr.left(), yy+fm.height()/2, dr.right()-2, yy+fm.height()/2);
467 } 467 }
468 468
469 } 469 }
470 pa.end(); 470 pa.end();
471 471
472} 472}
473void KOAgendaItem::resizePixmap( int w , int h )
474{
475 paintPix()->resize( w, h );
476 473
477}
478QPixmap * KOAgendaItem::paintPix() 474QPixmap * KOAgendaItem::paintPix()
479{ 475{
480 static QPixmap* mPaintPix = 0; 476 static QPixmap* mPaintPix = 0;
481 if ( ! mPaintPix ) { 477 if ( ! mPaintPix ) {
482 int w = QApplication::desktop()->width(); 478 int w = QApplication::desktop()->width();
483 int h = QApplication::desktop()->height(); 479 int h = QApplication::desktop()->height();
484 mPaintPix = new QPixmap(w,h); 480 mPaintPix = new QPixmap(w,h);
485 } 481 }
486 return mPaintPix ; 482 return mPaintPix ;
487} 483}
488QPixmap * KOAgendaItem::paintPixAllday() 484QPixmap * KOAgendaItem::paintPixAllday()
489{ 485{
490 static QPixmap* mPaintPixA = 0; 486 static QPixmap* mPaintPixA = 0;
491 if ( ! mPaintPixA ) { 487 if ( ! mPaintPixA ) {
492 int w = QApplication::desktop()->width(); 488 int w = QApplication::desktop()->width();
493 int h = QApplication::desktop()->height()/3; 489 int h = QApplication::desktop()->height()/5;
494 mPaintPixA = new QPixmap(w,h); 490 mPaintPixA = new QPixmap(w,h);
495 } 491 }
496 return mPaintPixA ; 492 return mPaintPixA ;
497} 493}
498 494
499void KOAgendaItem::paintEvent ( QPaintEvent *e ) 495void KOAgendaItem::paintEvent ( QPaintEvent *e )
500{ 496{
501 497
502 if ( globalFlagBlockAgendaItemPaint ) 498 if ( globalFlagBlockAgendaItemPaint )
503 return; 499 return;
504 if ( globalFlagBlockAgenda > 0 && globalFlagBlockAgenda < 5 ) 500 if ( globalFlagBlockAgenda > 0 && globalFlagBlockAgenda < 5 )
505 return; 501 return;
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 7103abe..3ed68b0 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -92,25 +92,24 @@ class KOAgendaItem : public QWidget
92 void setText ( const QString & text ) { mDisplayedText = text; } 92 void setText ( const QString & text ) { mDisplayedText = text; }
93 QString text () { return mDisplayedText; } 93 QString text () { return mDisplayedText; }
94 94
95 virtual bool eventFilter ( QObject *, QEvent * ); 95 virtual bool eventFilter ( QObject *, QEvent * );
96 96
97 static QToolTipGroup *toolTipGroup(); 97 static QToolTipGroup *toolTipGroup();
98 98
99 QPtrList<KOAgendaItem> conflictItems(); 99 QPtrList<KOAgendaItem> conflictItems();
100 void setConflictItems(QPtrList<KOAgendaItem>); 100 void setConflictItems(QPtrList<KOAgendaItem>);
101 void addConflictItem(KOAgendaItem *ci); 101 void addConflictItem(KOAgendaItem *ci);
102 void paintMe( bool, QPainter* painter = 0 ); 102 void paintMe( bool, QPainter* painter = 0 );
103 void repaintMe(); 103 void repaintMe();
104 static void resizePixmap( int, int );
105 static QPixmap * paintPix(); 104 static QPixmap * paintPix();
106 static QPixmap * paintPixAllday(); 105 static QPixmap * paintPixAllday();
107 void updateItem(); 106 void updateItem();
108 void computeText(); 107 void computeText();
109 void recreateIncidence(); 108 void recreateIncidence();
110 bool checkLayout(); 109 bool checkLayout();
111 void initColor (); 110 void initColor ();
112 public slots: 111 public slots:
113 bool updateIcons( QPainter *, bool ); 112 bool updateIcons( QPainter *, bool );
114 void select(bool=true); 113 void select(bool=true);
115 114
116 protected: 115 protected: