summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Unidiff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 475bb4a..cba85fa 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -306,47 +306,44 @@ void MonthViewItem::recycle( Incidence *incidence, QDate qd, const QString & s)
306} 306}
307 307
308void MonthViewItem::paint(QPainter *p) 308void MonthViewItem::paint(QPainter *p)
309{ 309{
310 if ( mblockRepaint ) { 310 if ( mblockRepaint ) {
311 return; 311 return;
312 } 312 }
313#if QT_VERSION >= 0x030000 313#if QT_VERSION >= 0x030000
314 bool sel = isSelected(); 314 bool sel = isSelected();
315#else 315#else
316 bool sel = selected(); 316 bool sel = selected();
317#endif 317#endif
318
319
320 int heihei = height( listBox () ); 318 int heihei = height( listBox () );
321 int x = 1; 319 int x = 1;
322 if (KOPrefs::instance()->mMonthViewUsesCategoryColor) 320 if (KOPrefs::instance()->mMonthViewUsesCategoryColor)
323 { 321 {
324 p->setBackgroundColor( palette().color( QPalette::Normal, \ 322 p->setBackgroundColor( palette().color( QPalette::Normal, \
325 sel ? QColorGroup::Highlight : QColorGroup::Background ) ); 323 sel ? QColorGroup::Highlight : QColorGroup::Background ) );
326 p->eraseRect( 0, 0, listBox()->maxItemWidth(), heihei ); 324 p->eraseRect( 0, 0, listBox()->maxItemWidth(), heihei );
327 } 325 }
328 326
329 //int y = 3;//(height() - mRecurPixmap.height()) /2; 327 //int y = 3;//(height() - mRecurPixmap.height()) /2;
330 int size = PIXMAP_SIZE; 328 int size = PIXMAP_SIZE;
331 if ( QApplication::desktop()->width() < 300 ) 329 if ( QApplication::desktop()->width() < 300 )
332 size = 3; 330 size = 3;
333 int y = (heihei - size -1 ) /2; 331 int y = (heihei - size -1 ) /2;
334 332
335 if ( mIncidence->calID() > 1 ) { 333 if ( mIncidence->calID() > 1 ) {
336 p->fillRect ( x, y-2,size,size+4, KOPrefs::instance()->defaultColor( mIncidence->calID() ) ); 334 p->fillRect ( x, y-2,size,size+4, KOPrefs::instance()->defaultColor( mIncidence->calID() ) );
337 p->drawRect ( x, y-2,size,size+4); 335 p->drawRect ( x, y-2,size,size+4);
338 x += size + 1; 336 x += size + 1;
339 } 337 }
340
341 if ( KOPrefs::instance()->mMonthShowIcons ) { 338 if ( KOPrefs::instance()->mMonthShowIcons ) {
342 if ( mInfo ) { 339 if ( mInfo ) {
343 p->fillRect ( x, y,size,size, Qt::darkGreen ); 340 p->fillRect ( x, y,size,size, Qt::darkGreen );
344 x += size + 1; 341 x += size + 1;
345 } 342 }
346 if ( mRecur ) { 343 if ( mRecur ) {
347 p->fillRect ( x, y,size,size, Qt::blue ); 344 p->fillRect ( x, y,size,size, Qt::blue );
348 x += size + 1; 345 x += size + 1;
349 } 346 }
350 if ( mAlarm ) { 347 if ( mAlarm ) {
351 p->fillRect ( x, y,size,size, Qt::red ); 348 p->fillRect ( x, y,size,size, Qt::red );
352 x += size + 1; 349 x += size + 1;
@@ -368,25 +365,24 @@ void MonthViewItem::paint(QPainter *p)
368 pa.setPoint (2, x+sizeM/2, yyy-sizeM/2 ); 365 pa.setPoint (2, x+sizeM/2, yyy-sizeM/2 );
369 p->drawPolygon( pa ); 366 p->drawPolygon( pa );
370 } 367 }
371 if ( mMultiday == 2 || mMultiday == 1 ) { 368 if ( mMultiday == 2 || mMultiday == 1 ) {
372 QPointArray pa ( 3 ); 369 QPointArray pa ( 3 );
373 pa.setPoint (0, x+sizeM +sizeM/2, yyy ); 370 pa.setPoint (0, x+sizeM +sizeM/2, yyy );
374 pa.setPoint (1, x+sizeM, yyy+sizeM/2 ); 371 pa.setPoint (1, x+sizeM, yyy+sizeM/2 );
375 pa.setPoint (2, x+sizeM, yyy-sizeM/2 ); 372 pa.setPoint (2, x+sizeM, yyy-sizeM/2 );
376 p->drawPolygon( pa ); 373 p->drawPolygon( pa );
377 } 374 }
378 if ( mMultiday == 1 ) { 375 if ( mMultiday == 1 ) {
379 // p->fillRect ( x, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) ); 376 // p->fillRect ( x, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) );
380
381 p->drawLine ( x+1, yyy-sizeM/2, x+1, yyy+sizeM/2 ); 377 p->drawLine ( x+1, yyy-sizeM/2, x+1, yyy+sizeM/2 );
382 } 378 }
383 if ( mMultiday == 3 ) { 379 if ( mMultiday == 3 ) {
384 // p->fillRect ( x+sizeM, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) ); 380 // p->fillRect ( x+sizeM, yyy-sizeM/2+1, sizeM/2, size, QBrush ( QBrush::SolidPattern ) );
385 p->drawLine ( x+sizeM +sizeM/2-1, yyy-sizeM/2, x+sizeM +sizeM/2-1, yyy+sizeM/2 ); 381 p->drawLine ( x+sizeM +sizeM/2-1, yyy-sizeM/2, x+sizeM +sizeM/2-1, yyy+sizeM/2 );
386 382
387 } 383 }
388 x += sizeM/2 + 1; 384 x += sizeM/2 + 1;
389 x += sizeM + 1; 385 x += sizeM + 1;
390 } 386 }
391 387
392 if ( mIncidence->typeID() == todoID ){ 388 if ( mIncidence->typeID() == todoID ){