author | umopapisdn <umopapisdn> | 2003-05-05 21:44:39 (UTC) |
---|---|---|
committer | umopapisdn <umopapisdn> | 2003-05-05 21:44:39 (UTC) |
commit | 3b193b852133a82b5c1708b68a7e460c63629768 (patch) (side-by-side diff) | |
tree | 8cd0ff3adc14f0b937d24ab99fca327fb3f16875 /core/pim/datebook/datebookweek.cpp | |
parent | 12a700f8903eedeba03d3aba7990b9d660410045 (diff) | |
download | opie-3b193b852133a82b5c1708b68a7e460c63629768.zip opie-3b193b852133a82b5c1708b68a7e460c63629768.tar.gz opie-3b193b852133a82b5c1708b68a7e460c63629768.tar.bz2 |
UI and code cleanup. Both UI and code is now more consistent. Also removed menus in favor of toolbuttons. (why were they even available as menus in the first place?)
Diffstat (limited to 'core/pim/datebook/datebookweek.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookweek.cpp | 47 |
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 @@ -368,22 +368,12 @@ DateBookWeek::DateBookWeek( bool ap, bool startOnMonday, DateBookDB *newDB, tHide = new QTimer( this ); - 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()); - } @@ -419,6 +409,4 @@ void DateBookWeek::showDay( int day ) void DateBookWeek::setDate( int y, int m, int d ) { - QDate date; - date.setYMD( y, m, d ); setDate(QDate(y, m, d)); } @@ -429,5 +417,5 @@ void DateBookWeek::setDate(QDate date) int w, y; calcWeek( date, w, y, bStartOnMonday ); - header->setDate( y, w ); + header->setDate( date ); } @@ -459,6 +447,5 @@ 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 ); view->moveToHour( startTime ); @@ -469,6 +456,5 @@ 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>: "; str += TimeString::timeString( ev.event().start().time(), ampm, FALSE ); @@ -575,17 +561,4 @@ void DateBookWeek::slotYearChanged( int y ) calcWeek( d, totWeek, throwAway, bStartOnMonday ); } - if ( totWeek != totalWeeks() ) - setTotalWeeks( totWeek ); -} - - -void DateBookWeek::setTotalWeeks( int numWeeks ) -{ - header->spinWeek->setMaxValue( numWeeks ); -} - -int DateBookWeek::totalWeeks() const -{ - return header->spinWeek->maxValue(); } |