summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookweek.cpp
Unidiff
Diffstat (limited to 'core/pim/datebook/datebookweek.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebookweek.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/core/pim/datebook/datebookweek.cpp b/core/pim/datebook/datebookweek.cpp
index 8435132..933e191 100644
--- a/core/pim/datebook/datebookweek.cpp
+++ b/core/pim/datebook/datebookweek.cpp
@@ -73,27 +73,24 @@ DateBookWeekView::DateBookWeekView( bool ap, bool startOnMonday,
73 73
74 QObject::connect(qApp, SIGNAL(clockChanged(bool)), 74 QObject::connect(qApp, SIGNAL(clockChanged(bool)),
75 this, SLOT(slotChangeClock(bool))); 75 this, SLOT(slotChangeClock(bool)));
76 76
77 QFontMetrics fm( font() ); 77 QFontMetrics fm( font() );
78 rowHeight = fm.height()+2; 78 rowHeight = fm.height()+2;
79 79
80 resizeContents( width(), 24*rowHeight ); 80 resizeContents( width(), 24*rowHeight );
81} 81}
82 82
83void DateBookWeekView::initNames() 83void DateBookWeekView::initNames()
84{ 84{
85#warning Please review this ! (eilers)
86
87 // Ok, I am Mr. Pedantic, but shouldn't we count until 6 instead of 7, if bOnMonday is false ? (eilers)
88 85
89 static bool bFirst = true; 86 static bool bFirst = true;
90 if ( bFirst ) { 87 if ( bFirst ) {
91 if ( bOnMonday ) { 88 if ( bOnMonday ) {
92 for ( int i = 1; i<=7; i++ ) { 89 for ( int i = 1; i<=7; i++ ) {
93 header->addLabel( Calendar::nameOfDay( i ) ); 90 header->addLabel( Calendar::nameOfDay( i ) );
94 } 91 }
95 92
96 } else { 93 } else {
97 header->addLabel( Calendar::nameOfDay( 7 ) ); 94 header->addLabel( Calendar::nameOfDay( 7 ) );
98 for ( int i = 1; i<7; i++ ) { 95 for ( int i = 1; i<7; i++ ) {
99 header->addLabel( Calendar::nameOfDay( i ) ); 96 header->addLabel( Calendar::nameOfDay( i ) );
@@ -305,25 +302,24 @@ void DateBookWeekView::drawContents( QPainter *p, int cx, int cy, int cw, int ch
305 if ( i->geometry().intersects( ur ) ) { 302 if ( i->geometry().intersects( ur ) ) {
306 p->setBrush( i->color() ); 303 p->setBrush( i->color() );
307 p->drawRect( i->geometry() ); 304 p->drawRect( i->geometry() );
308 } 305 }
309 } 306 }
310} 307}
311 308
312void DateBookWeekView::resizeEvent( QResizeEvent *e ) 309void DateBookWeekView::resizeEvent( QResizeEvent *e )
313{ 310{
314 const int hourWidth = 20; 311 const int hourWidth = 20;
315 QScrollView::resizeEvent( e ); 312 QScrollView::resizeEvent( e );
316 313
317#warning check the geometry i have choosen BRANCH_1_0 (waspe)
318 314
319 //HEAD 315 //HEAD
320 /* 316 /*
321 int avail = visibleWidth(); 317 int avail = visibleWidth();
322 header->setGeometry( leftMargin()+frameWidth()+frameRect().left() , frameWidth(), 318 header->setGeometry( leftMargin()+frameWidth()+frameRect().left() , frameWidth(),
323 visibleWidth(), header->sizeHint().height() ); 319 visibleWidth(), header->sizeHint().height() );
324 setMargins( 0, header->sizeHint().height(), 0, 0 ); 320 setMargins( 0, header->sizeHint().height(), 0, 0 );
325 */ 321 */
326 //BRANCH_1_0 322 //BRANCH_1_0
327 int avail = width()-qApp->style().scrollBarExtent().width()-1; 323 int avail = width()-qApp->style().scrollBarExtent().width()-1;
328 header->setGeometry( 0, 0, avail, header->sizeHint().height() ); 324 header->setGeometry( 0, 0, avail, header->sizeHint().height() );
329 setMargins( 0, header->height(), 0, 0 ); 325 setMargins( 0, header->height(), 0, 0 );