author | drw <drw> | 2005-03-07 16:52:17 (UTC) |
---|---|---|
committer | drw <drw> | 2005-03-07 16:52:17 (UTC) |
commit | 5ab00b78b199b1a03d3f27faa8b1dcffd9a86ff7 (patch) (unidiff) | |
tree | bebec7df2d48f82b79a1ff3a98e05791dc444556 /core/pim/datebook/datebook.cpp | |
parent | 61b9d5f646faa5bd84391318f6440bee6cbefcd8 (diff) | |
download | opie-5ab00b78b199b1a03d3f27faa8b1dcffd9a86ff7.zip opie-5ab00b78b199b1a03d3f27faa8b1dcffd9a86ff7.tar.gz opie-5ab00b78b199b1a03d3f27faa8b1dcffd9a86ff7.tar.bz2 |
Use popup menu for edit, duplicate, delete and beam in week list view - patch courtesy of Thomas Schnetzer
Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebook.cpp | 3 |
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 | ||
555 | void DateBook::initWeekLst() { | 555 | void 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 | ||
570 | void DateBook::initMonth() | 573 | void 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 | ||
581 | void DateBook::loadSettings() | 584 | void 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"); |