author | waspe <waspe> | 2003-11-03 18:29:32 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-11-03 18:29:32 (UTC) |
commit | 3a7d9b9ed8f9cf9c7e3d02f9239f327b2b652b0c (patch) (side-by-side diff) | |
tree | 96119aac19a49850a221d34f3152fa12b0a86a46 | |
parent | 87a9d6badcf518ffd14559ef886ff7729b63b73b (diff) | |
download | opie-3a7d9b9ed8f9cf9c7e3d02f9239f327b2b652b0c.zip opie-3a7d9b9ed8f9cf9c7e3d02f9239f327b2b652b0c.tar.gz opie-3a7d9b9ed8f9cf9c7e3d02f9239f327b2b652b0c.tar.bz2 |
remove merge conflict
-rw-r--r-- | core/pim/datebook/datebookweek.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/core/pim/datebook/datebookweek.cpp b/core/pim/datebook/datebookweek.cpp index dad1c3f..8435132 100644 --- a/core/pim/datebook/datebookweek.cpp +++ b/core/pim/datebook/datebookweek.cpp @@ -300,36 +300,48 @@ void DateBookWeekView::drawContents( QPainter *p, int cx, int cy, int cw, int ch } QListIterator<DateBookWeekItem> it(items); for ( ; it.current(); ++it ) { DateBookWeekItem *i = it.current(); if ( i->geometry().intersects( ur ) ) { p->setBrush( i->color() ); p->drawRect( i->geometry() ); } } } void DateBookWeekView::resizeEvent( QResizeEvent *e ) { const int hourWidth = 20; QScrollView::resizeEvent( e ); + +#warning check the geometry i have choosen BRANCH_1_0 (waspe) + + //HEAD + /* int avail = visibleWidth(); header->setGeometry( leftMargin()+frameWidth()+frameRect().left() , frameWidth(), visibleWidth(), header->sizeHint().height() ); setMargins( 0, header->sizeHint().height(), 0, 0 ); + */ + //BRANCH_1_0 + int avail = width()-qApp->style().scrollBarExtent().width()-1; + header->setGeometry( 0, 0, avail, header->sizeHint().height() ); + setMargins( 0, header->height(), 0, 0 ); + + header->resizeSection( 0, hourWidth ); int sw = (avail - hourWidth) / 7; for ( int i = 1; i < 7; i++ ) header->resizeSection( i, sw ); header->resizeSection( 7, avail - hourWidth - sw*6 ); } void DateBookWeekView::setStartOfWeek( bool bStartOnMonday ) { bOnMonday = bStartOnMonday; initNames(); } //------------------------------------------------------------------- DateBookWeek::DateBookWeek( bool ap, bool startOnMonday, DateBookDB *newDB, @@ -361,33 +373,33 @@ DateBookWeek::DateBookWeek( bool ap, bool startOnMonday, DateBookDB *newDB, connect( tHide, SIGNAL( timeout() ), lblDesc, SLOT( hide() ) ); connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(slotWeekChanged(bool)) ); connect( qApp, SIGNAL(clockChanged(bool)), this, SLOT(slotClockChanged(bool))); setDate(QDate::currentDate()); } void DateBookWeek::keyPressEvent(QKeyEvent *e) { switch(e->key()) { case Key_Up: view->scrollBy(0, -20); break; case Key_Down: view->scrollBy(0, 20); break; case Key_Left: - setDate(date().addDays(-7)); + setDate(date().addDays(-7)); break; case Key_Right: setDate(date().addDays(7)); break; default: e->ignore(); } } void DateBookWeek::showDay( int day ) { QDate d=bdate; // Calculate offset to first day of week. int dayoffset=d.dayOfWeek() % 7; |