summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookweek.cpp
Side-by-side diff
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,
- connect( view, SIGNAL( showDay( int ) ),
- this, SLOT( showDay( int ) ) );
- connect( view, SIGNAL(signalShowEvent(const EffectiveEvent&)),
- this, SLOT(slotShowEvent(const EffectiveEvent&)) );
- connect( view, SIGNAL(signalHideEvent()),
- this, SLOT(slotHideEvent()) );
- connect( header, SIGNAL( dateChanged( int, int ) ),
- this, SLOT( dateChanged( int, int ) ) );
- connect( tHide, SIGNAL( timeout() ),
- lblDesc, SLOT( hide() ) );
- connect( header->spinYear, SIGNAL(valueChanged(int)),
- this, SLOT(slotYearChanged(int)) );
- connect( qApp, SIGNAL(weekChanged(bool)),
- this, SLOT(slotWeekChanged(bool)) );
- connect( qApp, SIGNAL(clockChanged(bool)),
- this, SLOT(slotClockChanged(bool)));
+ connect( view, SIGNAL( showDay( int ) ), this, SLOT( showDay( int ) ) );
+ connect( view, SIGNAL(signalShowEvent(const EffectiveEvent&)), this, SLOT(slotShowEvent(const EffectiveEvent&)) );
+ connect( view, SIGNAL(signalHideEvent()), this, SLOT(slotHideEvent()) );
+ connect( header, SIGNAL( dateChanged( int, int ) ), this, SLOT( dateChanged( int, int ) ) );
+ 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());
-
}
@@ -420,4 +410,2 @@ void DateBookWeek::setDate( int y, int m, int d )
{
- QDate date;
- date.setYMD( y, m, d );
setDate(QDate(y, m, d));
@@ -430,3 +418,3 @@ void DateBookWeek::setDate(QDate date)
calcWeek( date, w, y, bStartOnMonday );
- header->setDate( y, w );
+ header->setDate( date );
}
@@ -460,4 +448,3 @@ void DateBookWeek::getEvents()
QDate endWeek = startWeek.addDays( 6 );
- QValueList<EffectiveEvent> eventList = db->getEffectiveEvents(startWeek,
- endWeek);
+ QValueList<EffectiveEvent> eventList = db->getEffectiveEvents(startWeek, endWeek);
view->showEvents( eventList );
@@ -470,4 +457,3 @@ void DateBookWeek::generateAllDayTooltext( QString& text ) {
-void DateBookWeek::generateNormalTooltext( QString& str,
- const EffectiveEvent &ev ) {
+void DateBookWeek::generateNormalTooltext( QString& str, const EffectiveEvent &ev ) {
str += "<b>" + QObject::tr("Start") + "</b>: ";
@@ -576,15 +562,2 @@ void DateBookWeek::slotYearChanged( int y )
}
- if ( totWeek != totalWeeks() )
- setTotalWeeks( totWeek );
-}
-
-
-void DateBookWeek::setTotalWeeks( int numWeeks )
-{
- header->spinWeek->setMaxValue( numWeeks );
-}
-
-int DateBookWeek::totalWeeks() const
-{
- return header->spinWeek->maxValue();
}