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.cpp47
1 files changed, 10 insertions, 37 deletions
diff --git a/core/pim/datebook/datebookweek.cpp b/core/pim/datebook/datebookweek.cpp
index 8241655..3ae4610 100644
--- a/core/pim/datebook/datebookweek.cpp
+++ b/core/pim/datebook/datebookweek.cpp
@@ -369,20 +369,10 @@ DateBookWeek::DateBookWeek( bool ap, bool startOnMonday, DateBookDB *newDB,
369 369
370 connect( view, SIGNAL( showDay( int ) ), 370 connect( view, SIGNAL( showDay( int ) ), this, SLOT( showDay( int ) ) );
371 this, SLOT( showDay( int ) ) ); 371 connect( view, SIGNAL(signalShowEvent(const EffectiveEvent&)), this, SLOT(slotShowEvent(const EffectiveEvent&)) );
372 connect( view, SIGNAL(signalShowEvent(const EffectiveEvent&)), 372 connect( view, SIGNAL(signalHideEvent()), this, SLOT(slotHideEvent()) );
373 this, SLOT(slotShowEvent(const EffectiveEvent&)) ); 373 connect( header, SIGNAL( dateChanged( int, int ) ), this, SLOT( dateChanged( int, int ) ) );
374 connect( view, SIGNAL(signalHideEvent()), 374 connect( tHide, SIGNAL( timeout() ), lblDesc, SLOT( hide() ) );
375 this, SLOT(slotHideEvent()) ); 375 connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(slotWeekChanged(bool)) );
376 connect( header, SIGNAL( dateChanged( int, int ) ), 376 connect( qApp, SIGNAL(clockChanged(bool)), this, SLOT(slotClockChanged(bool)));
377 this, SLOT( dateChanged( int, int ) ) );
378 connect( tHide, SIGNAL( timeout() ),
379 lblDesc, SLOT( hide() ) );
380 connect( header->spinYear, SIGNAL(valueChanged(int)),
381 this, SLOT(slotYearChanged(int)) );
382 connect( qApp, SIGNAL(weekChanged(bool)),
383 this, SLOT(slotWeekChanged(bool)) );
384 connect( qApp, SIGNAL(clockChanged(bool)),
385 this, SLOT(slotClockChanged(bool)));
386 setDate(QDate::currentDate()); 377 setDate(QDate::currentDate());
387
388} 378}
@@ -420,4 +410,2 @@ void DateBookWeek::setDate( int y, int m, int d )
420{ 410{
421 QDate date;
422 date.setYMD( y, m, d );
423 setDate(QDate(y, m, d)); 411 setDate(QDate(y, m, d));
@@ -430,3 +418,3 @@ void DateBookWeek::setDate(QDate date)
430 calcWeek( date, w, y, bStartOnMonday ); 418 calcWeek( date, w, y, bStartOnMonday );
431 header->setDate( y, w ); 419 header->setDate( date );
432} 420}
@@ -460,4 +448,3 @@ void DateBookWeek::getEvents()
460 QDate endWeek = startWeek.addDays( 6 ); 448 QDate endWeek = startWeek.addDays( 6 );
461 QValueList<EffectiveEvent> eventList = db->getEffectiveEvents(startWeek, 449 QValueList<EffectiveEvent> eventList = db->getEffectiveEvents(startWeek, endWeek);
462 endWeek);
463 view->showEvents( eventList ); 450 view->showEvents( eventList );
@@ -470,4 +457,3 @@ void DateBookWeek::generateAllDayTooltext( QString& text ) {
470 457
471void DateBookWeek::generateNormalTooltext( QString& str, 458void DateBookWeek::generateNormalTooltext( QString& str, const EffectiveEvent &ev ) {
472 const EffectiveEvent &ev ) {
473 str += "<b>" + QObject::tr("Start") + "</b>: "; 459 str += "<b>" + QObject::tr("Start") + "</b>: ";
@@ -576,15 +562,2 @@ void DateBookWeek::slotYearChanged( int y )
576 } 562 }
577 if ( totWeek != totalWeeks() )
578 setTotalWeeks( totWeek );
579}
580
581
582void DateBookWeek::setTotalWeeks( int numWeeks )
583{
584 header->spinWeek->setMaxValue( numWeeks );
585}
586
587int DateBookWeek::totalWeeks() const
588{
589 return header->spinWeek->maxValue();
590} 563}