summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookweek.cpp
authorzecke <zecke>2004-02-16 21:32:58 (UTC)
committer zecke <zecke>2004-02-16 21:32:58 (UTC)
commite228f4aa24ce73a49dde349544e55689cb0eccba (patch) (side-by-side diff)
tree5b9be29793b2a72f9260cb1325751d31e40c18f0 /core/pim/datebook/datebookweek.cpp
parent38d601a7d2a975bc0cbcc4cc933844f5572ec4fa (diff)
downloadopie-e228f4aa24ce73a49dde349544e55689cb0eccba.zip
opie-e228f4aa24ce73a49dde349544e55689cb0eccba.tar.gz
opie-e228f4aa24ce73a49dde349544e55689cb0eccba.tar.bz2
Take care of the lifetime of the EffectiveEvent/Occurence
Make sure not to keep reference on non existing objects
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,
QObject::connect(qApp, SIGNAL(clockChanged(bool)),
this, SLOT(slotChangeClock(bool)));
QFontMetrics fm( font() );
rowHeight = fm.height()+2;
resizeContents( width(), 24*rowHeight );
}
void DateBookWeekView::initNames()
{
-#warning Please review this ! (eilers)
-
- // Ok, I am Mr. Pedantic, but shouldn't we count until 6 instead of 7, if bOnMonday is false ? (eilers)
static bool bFirst = true;
if ( bFirst ) {
if ( bOnMonday ) {
for ( int i = 1; i<=7; i++ ) {
header->addLabel( Calendar::nameOfDay( i ) );
}
} else {
header->addLabel( Calendar::nameOfDay( 7 ) );
for ( int i = 1; i<7; i++ ) {
header->addLabel( Calendar::nameOfDay( i ) );
@@ -305,25 +302,24 @@ void DateBookWeekView::drawContents( QPainter *p, int cx, int cy, int cw, int ch
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 );