summaryrefslogtreecommitdiff
authorumopapisdn <umopapisdn>2003-03-24 10:10:47 (UTC)
committer umopapisdn <umopapisdn>2003-03-24 10:10:47 (UTC)
commit38d8d91e11c191f89429f4a3da8c1ada84b2a885 (patch) (unidiff)
tree13d58b8748b10903f5ac0194beaaedf8db23b570
parent4ddc90a51f8a4d248ece9a86d01ef636fe8c95e2 (diff)
downloadopie-38d8d91e11c191f89429f4a3da8c1ada84b2a885.zip
opie-38d8d91e11c191f89429f4a3da8c1ada84b2a885.tar.gz
opie-38d8d91e11c191f89429f4a3da8c1ada84b2a885.tar.bz2
*** empty log message ***
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 47be523..3e18374 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -552,100 +552,100 @@ void DateBook::initDay()
552 connect( dayView, SIGNAL( duplicateEvent( const Event & ) ), 552 connect( dayView, SIGNAL( duplicateEvent( const Event & ) ),
553 this, SLOT( duplicateEvent( const Event & ) ) ); 553 this, SLOT( duplicateEvent( const Event & ) ) );
554 connect( dayView, SIGNAL( beamEvent( const Event & ) ), 554 connect( dayView, SIGNAL( beamEvent( const Event & ) ),
555 this, SLOT( beamEvent( const Event & ) ) ); 555 this, SLOT( beamEvent( const Event & ) ) );
556 connect( dayView, SIGNAL(sigNewEvent(const QString &)), 556 connect( dayView, SIGNAL(sigNewEvent(const QString &)),
557 this, SLOT(slotNewEventFromKey(const QString &)) ); 557 this, SLOT(slotNewEventFromKey(const QString &)) );
558 } 558 }
559} 559}
560 560
561void DateBook::initWeek() 561void DateBook::initWeek()
562{ 562{
563 if ( !weekView ) { 563 if ( !weekView ) {
564 weekView = new DateBookWeek( ampm, onMonday, db, views, "week view" ); 564 weekView = new DateBookWeek( ampm, onMonday, db, views, "week view" );
565 weekView->setStartViewTime( startTime ); 565 weekView->setStartViewTime( startTime );
566 views->addWidget( weekView, WEEK ); 566 views->addWidget( weekView, WEEK );
567 connect( weekView, SIGNAL( showDate( int, int, int ) ), 567 connect( weekView, SIGNAL( showDate( int, int, int ) ),
568 this, SLOT( showDay( int, int, int ) ) ); 568 this, SLOT( showDay( int, int, int ) ) );
569 connect( this, SIGNAL( newEvent() ), 569 connect( this, SIGNAL( newEvent() ),
570 weekView, SLOT( redraw() ) ); 570 weekView, SLOT( redraw() ) );
571 } 571 }
572 //But also get it right: the year that we display can be different 572 //But also get it right: the year that we display can be different
573 //from the year of the current date. So, first find the year 573 //from the year of the current date. So, first find the year
574 //number of the current week. 574 //number of the current week.
575 575
576 int yearNumber, totWeeks; 576 int yearNumber, totWeeks;
577 calcWeek( currentDate(), totWeeks, yearNumber, onMonday ); 577 calcWeek( currentDate(), totWeeks, yearNumber, onMonday );
578 578
579 QDate d = QDate( yearNumber, 12, 31 ); 579 QDate d = QDate( yearNumber, 12, 31 );
580 calcWeek( d, totWeeks, yearNumber, onMonday ); 580 calcWeek( d, totWeeks, yearNumber, onMonday );
581 581
582 while ( totWeeks == 1 ) { 582 while ( totWeeks == 1 ) {
583 d = d.addDays( -1 ); 583 d = d.addDays( -1 );
584 calcWeek( d, totWeeks, yearNumber, onMonday ); 584 calcWeek( d, totWeeks, yearNumber, onMonday );
585 } 585 }
586 if ( totWeeks != weekView->totalWeeks() ) 586 if ( totWeeks != weekView->totalWeeks() )
587 weekView->setTotalWeeks( totWeeks ); 587 weekView->setTotalWeeks( totWeeks );
588} 588}
589void DateBook::initWeekLst() { 589void DateBook::initWeekLst() {
590 if ( !weekLstView ) { 590 if ( !weekLstView ) {
591 weekLstView = new DateBookWeekLst( ampm, onMonday, db, 591 weekLstView = new DateBookWeekLst( ampm, onMonday, db,
592 views, "weeklst view" ); 592 views, "weeklst view" );
593 views->addWidget( weekLstView, WEEKLST ); 593 views->addWidget( weekLstView, WEEKLST );
594 594
595 //weekLstView->setStartViewTime( startTime ); 595 //weekLstView->setStartViewTime( startTime );
596 connect( weekLstView, SIGNAL( showDate( int, int, int ) ), 596 connect( weekLstView, SIGNAL( showDate( int, int, int ) ),
597 this, SLOT( showDay( int, int, int ) ) ); 597 this, SLOT( showDay( int, int, int ) ) );
598 connect( weekLstView, SIGNAL( addEvent( const QDateTime &, 598 connect( weekLstView, SIGNAL( addEvent( const QDateTime &,
599 const QDateTime &, 599 const QDateTime &,
600 const QString & ) ), 600 const QString & , const QString &) ),
601 this, SLOT( slotNewEntry( const QDateTime &, 601 this, SLOT( slotNewEntry( const QDateTime &,
602 const QDateTime &, 602 const QDateTime &,
603 const QString & ) ) ); 603 const QString & , const QString &) ) );
604 connect( this, SIGNAL( newEvent() ), 604 connect( this, SIGNAL( newEvent() ),
605 weekLstView, SLOT( redraw() ) ); 605 weekLstView, SLOT( redraw() ) );
606 connect( weekLstView, SIGNAL( editEvent( const Event & ) ), 606 connect( weekLstView, SIGNAL( editEvent( const Event & ) ),
607 this, SLOT( editEvent( const Event & ) ) ); 607 this, SLOT( editEvent( const Event & ) ) );
608 } 608 }
609} 609}
610 610
611 611
612void DateBook::initMonth() 612void DateBook::initMonth()
613{ 613{
614 if ( !monthView ) { 614 if ( !monthView ) {
615 monthView = new DateBookMonth( views, "month view", FALSE, db ); 615 monthView = new DateBookMonth( views, "month view", FALSE, db );
616 views->addWidget( monthView, MONTH ); 616 views->addWidget( monthView, MONTH );
617 connect( monthView, SIGNAL( dateClicked( int, int, int ) ), 617 connect( monthView, SIGNAL( dateClicked( int, int, int ) ),
618 this, SLOT( showDay( int, int, int ) ) ); 618 this, SLOT( showDay( int, int, int ) ) );
619 connect( this, SIGNAL( newEvent() ), 619 connect( this, SIGNAL( newEvent() ),
620 monthView, SLOT( redraw() ) ); 620 monthView, SLOT( redraw() ) );
621 qApp->processEvents(); 621 qApp->processEvents();
622 } 622 }
623} 623}
624 624
625void DateBook::loadSettings() 625void DateBook::loadSettings()
626{ 626{
627 { 627 {
628 Config config( "qpe" ); 628 Config config( "qpe" );
629 config.setGroup("Time"); 629 config.setGroup("Time");
630 ampm = config.readBoolEntry( "AMPM", TRUE ); 630 ampm = config.readBoolEntry( "AMPM", TRUE );
631 onMonday = config.readBoolEntry( "MONDAY" ); 631 onMonday = config.readBoolEntry( "MONDAY" );
632 } 632 }
633 633
634 { 634 {
635 Config config("DateBook"); 635 Config config("DateBook");
636 config.setGroup("Main"); 636 config.setGroup("Main");
637 startTime = config.readNumEntry("startviewtime", 8); 637 startTime = config.readNumEntry("startviewtime", 8);
638 aPreset = config.readBoolEntry("alarmpreset"); 638 aPreset = config.readBoolEntry("alarmpreset");
639 presetTime = config.readNumEntry("presettime"); 639 presetTime = config.readNumEntry("presettime");
640 bJumpToCurTime = config.readBoolEntry("jumptocurtime"); 640 bJumpToCurTime = config.readBoolEntry("jumptocurtime");
641 rowStyle = config.readNumEntry("rowstyle"); 641 rowStyle = config.readNumEntry("rowstyle");
642 } 642 }
643} 643}
644 644
645void DateBook::saveSettings() 645void DateBook::saveSettings()
646{ 646{
647 Config config( "qpe" ); 647 Config config( "qpe" );
648 Config configDB( "DateBook" ); 648 Config configDB( "DateBook" );
649 configDB.setGroup( "Main" ); 649 configDB.setGroup( "Main" );
650 configDB.writeEntry("startviewtime",startTime); 650 configDB.writeEntry("startviewtime",startTime);
651 configDB.writeEntry("alarmpreset",aPreset); 651 configDB.writeEntry("alarmpreset",aPreset);