summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebook.cpp
Unidiff
Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 0a47bb8..a18a5b4 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -542,48 +542,51 @@ void DateBook::initWeek()
542 //number of the current week. 542 //number of the current week.
543 int yearNumber, totWeeks; 543 int yearNumber, totWeeks;
544 calcWeek( currentDate(), totWeeks, yearNumber, onMonday ); 544 calcWeek( currentDate(), totWeeks, yearNumber, onMonday );
545 545
546 QDate d = QDate( yearNumber, 12, 31 ); 546 QDate d = QDate( yearNumber, 12, 31 );
547 calcWeek( d, totWeeks, yearNumber, onMonday ); 547 calcWeek( d, totWeeks, yearNumber, onMonday );
548 548
549 while ( totWeeks == 1 ) { 549 while ( totWeeks == 1 ) {
550 d = d.addDays( -1 ); 550 d = d.addDays( -1 );
551 calcWeek( d, totWeeks, yearNumber, onMonday ); 551 calcWeek( d, totWeeks, yearNumber, onMonday );
552 } 552 }
553} 553}
554 554
555void DateBook::initWeekLst() { 555void DateBook::initWeekLst() {
556 if ( !weekLstView ) { 556 if ( !weekLstView ) {
557 weekLstView = new DateBookWeekLst( ampm, onMonday, db, views, "weeklst view" ); 557 weekLstView = new DateBookWeekLst( ampm, onMonday, db, views, "weeklst view" );
558 views->addWidget( weekLstView, WEEKLST ); 558 views->addWidget( weekLstView, WEEKLST );
559 559
560 //weekLstView->setStartViewTime( startTime ); 560 //weekLstView->setStartViewTime( startTime );
561 connect( weekLstView, SIGNAL( showDate(int,int,int) ), this, SLOT( showDay(int,int,int) ) ); 561 connect( weekLstView, SIGNAL( showDate(int,int,int) ), this, SLOT( showDay(int,int,int) ) );
562 connect( weekLstView, SIGNAL( addEvent(const QDateTime&,const QDateTime&,const QString&, const QString&) ), 562 connect( weekLstView, SIGNAL( addEvent(const QDateTime&,const QDateTime&,const QString&, const QString&) ),
563 this, SLOT( slotNewEntry(const QDateTime&,const QDateTime&,const QString&, const QString&) ) ); 563 this, SLOT( slotNewEntry(const QDateTime&,const QDateTime&,const QString&, const QString&) ) );
564 connect( this, SIGNAL( newEvent() ), weekLstView, SLOT( redraw() ) ); 564 connect( this, SIGNAL( newEvent() ), weekLstView, SLOT( redraw() ) );
565 connect( weekLstView, SIGNAL( editEvent(const Event&) ), this, SLOT( editEvent(const Event&) ) ); 565 connect( weekLstView, SIGNAL( editEvent(const Event&) ), this, SLOT( editEvent(const Event&) ) );
566 connect( weekLstView, SIGNAL( duplicateEvent( const Event & ) ), this, SLOT( duplicateEvent( const Event & ) ) );
567 connect( weekLstView, SIGNAL( beamEvent(const Event&) ), this, SLOT( beamEvent(const Event&) ) );
568 connect( weekLstView, SIGNAL( removeEvent( const Event & ) ), this, SLOT( removeEvent( const Event & ) ) );
566 } 569 }
567} 570}
568 571
569 572
570void DateBook::initMonth() 573void DateBook::initMonth()
571{ 574{
572 if ( !monthView ) { 575 if ( !monthView ) {
573 monthView = new DateBookMonth( views, "month view", FALSE, db ); 576 monthView = new DateBookMonth( views, "month view", FALSE, db );
574 views->addWidget( monthView, MONTH ); 577 views->addWidget( monthView, MONTH );
575 connect( monthView, SIGNAL( dateClicked(int,int,int) ), this, SLOT( showDay(int,int,int) ) ); 578 connect( monthView, SIGNAL( dateClicked(int,int,int) ), this, SLOT( showDay(int,int,int) ) );
576 connect( this, SIGNAL( newEvent() ), monthView, SLOT( redraw() ) ); 579 connect( this, SIGNAL( newEvent() ), monthView, SLOT( redraw() ) );
577 qApp->processEvents(); 580 qApp->processEvents();
578 } 581 }
579} 582}
580 583
581void DateBook::loadSettings() 584void DateBook::loadSettings()
582{ 585{
583 Config qpeconfig( "qpe" ); 586 Config qpeconfig( "qpe" );
584 qpeconfig.setGroup("Time"); 587 qpeconfig.setGroup("Time");
585 ampm = qpeconfig.readBoolEntry( "AMPM", TRUE ); 588 ampm = qpeconfig.readBoolEntry( "AMPM", TRUE );
586 onMonday = qpeconfig.readBoolEntry( "MONDAY" ); 589 onMonday = qpeconfig.readBoolEntry( "MONDAY" );
587 590
588 Config config("DateBook"); 591 Config config("DateBook");
589 config.setGroup("Main"); 592 config.setGroup("Main");