-rw-r--r-- | korganizer/calendarview.cpp | 11 | ||||
-rw-r--r-- | korganizer/filteredit_base.cpp | 73 | ||||
-rw-r--r-- | korganizer/filteredit_base.h | 18 | ||||
-rw-r--r-- | korganizer/filteredit_base.ui | 123 | ||||
-rw-r--r-- | korganizer/korganizer.pro | 4 |
5 files changed, 156 insertions, 73 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 378c7d4..8258c74 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -615,768 +615,779 @@ void CalendarView::computeAlarm( QString msg ) | |||
615 | } | 615 | } |
616 | 616 | ||
617 | void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString ¬i ) | 617 | void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString ¬i ) |
618 | { | 618 | { |
619 | //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); | 619 | //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); |
620 | 620 | ||
621 | mSuspendAlarmNotification = noti; | 621 | mSuspendAlarmNotification = noti; |
622 | int ms = QDateTime::currentDateTime().secsTo( qdt )*1000; | 622 | int ms = QDateTime::currentDateTime().secsTo( qdt )*1000; |
623 | //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000); | 623 | //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000); |
624 | mSuspendTimer->start( ms , true ); | 624 | mSuspendTimer->start( ms , true ); |
625 | 625 | ||
626 | } | 626 | } |
627 | 627 | ||
628 | void CalendarView::addAlarm(const QDateTime &qdt, const QString ¬i ) | 628 | void CalendarView::addAlarm(const QDateTime &qdt, const QString ¬i ) |
629 | { | 629 | { |
630 | //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); | 630 | //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); |
631 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { | 631 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { |
632 | #ifndef DESKTOP_VERSION | 632 | #ifndef DESKTOP_VERSION |
633 | AlarmServer::addAlarm ( qdt,"koalarm", noti.latin1() ); | 633 | AlarmServer::addAlarm ( qdt,"koalarm", noti.latin1() ); |
634 | #endif | 634 | #endif |
635 | return; | 635 | return; |
636 | } | 636 | } |
637 | int maxSec; | 637 | int maxSec; |
638 | //maxSec = 5; //testing only | 638 | //maxSec = 5; //testing only |
639 | maxSec = 86400+3600; // one day+1hour | 639 | maxSec = 86400+3600; // one day+1hour |
640 | mAlarmNotification = noti; | 640 | mAlarmNotification = noti; |
641 | int sec = QDateTime::currentDateTime().secsTo( qdt ); | 641 | int sec = QDateTime::currentDateTime().secsTo( qdt ); |
642 | if ( sec > maxSec ) { | 642 | if ( sec > maxSec ) { |
643 | mRecheckAlarmTimer->start( maxSec * 1000 ); | 643 | mRecheckAlarmTimer->start( maxSec * 1000 ); |
644 | // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec ); | 644 | // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec ); |
645 | return; | 645 | return; |
646 | } else { | 646 | } else { |
647 | mRecheckAlarmTimer->stop(); | 647 | mRecheckAlarmTimer->stop(); |
648 | } | 648 | } |
649 | //qDebug("Alarm timer started with secs: %d ", sec); | 649 | //qDebug("Alarm timer started with secs: %d ", sec); |
650 | mAlarmTimer->start( sec *1000 , true ); | 650 | mAlarmTimer->start( sec *1000 , true ); |
651 | 651 | ||
652 | } | 652 | } |
653 | // called by mRecheckAlarmTimer to get next alarm | 653 | // called by mRecheckAlarmTimer to get next alarm |
654 | // we need this, because a QTimer has only a max range of 25 days | 654 | // we need this, because a QTimer has only a max range of 25 days |
655 | void CalendarView::recheckTimerAlarm() | 655 | void CalendarView::recheckTimerAlarm() |
656 | { | 656 | { |
657 | mAlarmTimer->stop(); | 657 | mAlarmTimer->stop(); |
658 | mRecheckAlarmTimer->stop(); | 658 | mRecheckAlarmTimer->stop(); |
659 | mCalendar->checkAlarmForIncidence( 0, true ); | 659 | mCalendar->checkAlarmForIncidence( 0, true ); |
660 | } | 660 | } |
661 | void CalendarView::removeAlarm(const QDateTime &qdt, const QString ¬i ) | 661 | void CalendarView::removeAlarm(const QDateTime &qdt, const QString ¬i ) |
662 | { | 662 | { |
663 | //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); | 663 | //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); |
664 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { | 664 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { |
665 | #ifndef DESKTOP_VERSION | 665 | #ifndef DESKTOP_VERSION |
666 | AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.latin1() ); | 666 | AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.latin1() ); |
667 | #endif | 667 | #endif |
668 | return; | 668 | return; |
669 | } | 669 | } |
670 | mAlarmTimer->stop(); | 670 | mAlarmTimer->stop(); |
671 | } | 671 | } |
672 | void CalendarView::selectWeekNum ( int num ) | 672 | void CalendarView::selectWeekNum ( int num ) |
673 | { | 673 | { |
674 | dateNavigator()->selectWeek( num ); | 674 | dateNavigator()->selectWeek( num ); |
675 | mViewManager->showWeekView(); | 675 | mViewManager->showWeekView(); |
676 | } | 676 | } |
677 | KOViewManager *CalendarView::viewManager() | 677 | KOViewManager *CalendarView::viewManager() |
678 | { | 678 | { |
679 | return mViewManager; | 679 | return mViewManager; |
680 | } | 680 | } |
681 | 681 | ||
682 | KODialogManager *CalendarView::dialogManager() | 682 | KODialogManager *CalendarView::dialogManager() |
683 | { | 683 | { |
684 | return mDialogManager; | 684 | return mDialogManager; |
685 | } | 685 | } |
686 | 686 | ||
687 | QDate CalendarView::startDate() | 687 | QDate CalendarView::startDate() |
688 | { | 688 | { |
689 | DateList dates = mNavigator->selectedDates(); | 689 | DateList dates = mNavigator->selectedDates(); |
690 | 690 | ||
691 | return dates.first(); | 691 | return dates.first(); |
692 | } | 692 | } |
693 | 693 | ||
694 | QDate CalendarView::endDate() | 694 | QDate CalendarView::endDate() |
695 | { | 695 | { |
696 | DateList dates = mNavigator->selectedDates(); | 696 | DateList dates = mNavigator->selectedDates(); |
697 | 697 | ||
698 | return dates.last(); | 698 | return dates.last(); |
699 | } | 699 | } |
700 | 700 | ||
701 | 701 | ||
702 | void CalendarView::createPrinter() | 702 | void CalendarView::createPrinter() |
703 | { | 703 | { |
704 | #ifndef KORG_NOPRINTER | 704 | #ifndef KORG_NOPRINTER |
705 | if (!mCalPrinter) { | 705 | if (!mCalPrinter) { |
706 | mCalPrinter = new CalPrinter(this, mCalendar); | 706 | mCalPrinter = new CalPrinter(this, mCalendar); |
707 | connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig())); | 707 | connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig())); |
708 | } | 708 | } |
709 | #endif | 709 | #endif |
710 | } | 710 | } |
711 | 711 | ||
712 | 712 | ||
713 | //KOPrefs::instance()->mWriteBackFile | 713 | //KOPrefs::instance()->mWriteBackFile |
714 | //KOPrefs::instance()->mWriteBackExistingOnly | 714 | //KOPrefs::instance()->mWriteBackExistingOnly |
715 | 715 | ||
716 | // 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 716 | // 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
717 | // 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 717 | // 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
718 | // 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 718 | // 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
719 | // 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 719 | // 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
720 | // 4 syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 720 | // 4 syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
721 | // 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 721 | // 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
722 | 722 | ||
723 | int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full ) | 723 | int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full ) |
724 | { | 724 | { |
725 | 725 | ||
726 | // 0 equal | 726 | // 0 equal |
727 | // 1 take local | 727 | // 1 take local |
728 | // 2 take remote | 728 | // 2 take remote |
729 | // 3 cancel | 729 | // 3 cancel |
730 | QDateTime lastSync = mLastCalendarSync; | 730 | QDateTime lastSync = mLastCalendarSync; |
731 | QDateTime localMod = local->lastModified(); | 731 | QDateTime localMod = local->lastModified(); |
732 | QDateTime remoteMod = remote->lastModified(); | 732 | QDateTime remoteMod = remote->lastModified(); |
733 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 733 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
734 | bool remCh, locCh; | 734 | bool remCh, locCh; |
735 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); | 735 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); |
736 | //if ( remCh ) | 736 | //if ( remCh ) |
737 | //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); | 737 | //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); |
738 | locCh = ( localMod > mLastCalendarSync ); | 738 | locCh = ( localMod > mLastCalendarSync ); |
739 | if ( !remCh && ! locCh ) { | 739 | if ( !remCh && ! locCh ) { |
740 | //qDebug("both not changed "); | 740 | //qDebug("both not changed "); |
741 | lastSync = localMod.addDays(1); | 741 | lastSync = localMod.addDays(1); |
742 | if ( mode <= SYNC_PREF_ASK ) | 742 | if ( mode <= SYNC_PREF_ASK ) |
743 | return 0; | 743 | return 0; |
744 | } else { | 744 | } else { |
745 | if ( locCh ) { | 745 | if ( locCh ) { |
746 | //qDebug("loc changed %d %s %s", local->revision() , localMod.toString().latin1(), mLastCalendarSync.toString().latin1()); | 746 | //qDebug("loc changed %d %s %s", local->revision() , localMod.toString().latin1(), mLastCalendarSync.toString().latin1()); |
747 | lastSync = localMod.addDays( -1 ); | 747 | lastSync = localMod.addDays( -1 ); |
748 | if ( !remCh ) | 748 | if ( !remCh ) |
749 | remoteMod = ( lastSync.addDays( -1 ) ); | 749 | remoteMod = ( lastSync.addDays( -1 ) ); |
750 | } else { | 750 | } else { |
751 | //qDebug(" not loc changed "); | 751 | //qDebug(" not loc changed "); |
752 | lastSync = localMod.addDays( 1 ); | 752 | lastSync = localMod.addDays( 1 ); |
753 | if ( remCh ) | 753 | if ( remCh ) |
754 | remoteMod =( lastSync.addDays( 1 ) ); | 754 | remoteMod =( lastSync.addDays( 1 ) ); |
755 | 755 | ||
756 | } | 756 | } |
757 | } | 757 | } |
758 | full = true; | 758 | full = true; |
759 | if ( mode < SYNC_PREF_ASK ) | 759 | if ( mode < SYNC_PREF_ASK ) |
760 | mode = SYNC_PREF_ASK; | 760 | mode = SYNC_PREF_ASK; |
761 | } else { | 761 | } else { |
762 | if ( localMod == remoteMod ) | 762 | if ( localMod == remoteMod ) |
763 | // if ( local->revision() == remote->revision() ) | 763 | // if ( local->revision() == remote->revision() ) |
764 | return 0; | 764 | return 0; |
765 | 765 | ||
766 | } | 766 | } |
767 | // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); | 767 | // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); |
768 | 768 | ||
769 | //qDebug("%s %d %s %d", localMod.toString().latin1() , local->revision(), remoteMod.toString().latin1(), remote->revision()); | 769 | //qDebug("%s %d %s %d", localMod.toString().latin1() , local->revision(), remoteMod.toString().latin1(), remote->revision()); |
770 | //qDebug("%d %d %d %d ", localMod.time().second(), localMod.time().msec(), remoteMod.time().second(), remoteMod.time().msec() ); | 770 | //qDebug("%d %d %d %d ", localMod.time().second(), localMod.time().msec(), remoteMod.time().second(), remoteMod.time().msec() ); |
771 | //full = true; //debug only | 771 | //full = true; //debug only |
772 | if ( full ) { | 772 | if ( full ) { |
773 | bool equ = false; | 773 | bool equ = false; |
774 | if ( local->type() == "Event" ) { | 774 | if ( local->type() == "Event" ) { |
775 | equ = (*((Event*) local) == *((Event*) remote)); | 775 | equ = (*((Event*) local) == *((Event*) remote)); |
776 | } | 776 | } |
777 | else if ( local->type() =="Todo" ) | 777 | else if ( local->type() =="Todo" ) |
778 | equ = (*((Todo*) local) == (*(Todo*) remote)); | 778 | equ = (*((Todo*) local) == (*(Todo*) remote)); |
779 | else if ( local->type() =="Journal" ) | 779 | else if ( local->type() =="Journal" ) |
780 | equ = (*((Journal*) local) == *((Journal*) remote)); | 780 | equ = (*((Journal*) local) == *((Journal*) remote)); |
781 | if ( equ ) { | 781 | if ( equ ) { |
782 | //qDebug("equal "); | 782 | //qDebug("equal "); |
783 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 783 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
784 | local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); | 784 | local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); |
785 | } | 785 | } |
786 | if ( mode < SYNC_PREF_FORCE_LOCAL ) | 786 | if ( mode < SYNC_PREF_FORCE_LOCAL ) |
787 | return 0; | 787 | return 0; |
788 | 788 | ||
789 | }//else //debug only | 789 | }//else //debug only |
790 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); | 790 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); |
791 | } | 791 | } |
792 | int result; | 792 | int result; |
793 | bool localIsNew; | 793 | bool localIsNew; |
794 | //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , localMod.toString().latin1() , remoteMod.toString().latin1() ); | 794 | //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , localMod.toString().latin1() , remoteMod.toString().latin1() ); |
795 | 795 | ||
796 | if ( full && mode < SYNC_PREF_NEWEST ) | 796 | if ( full && mode < SYNC_PREF_NEWEST ) |
797 | mode = SYNC_PREF_ASK; | 797 | mode = SYNC_PREF_ASK; |
798 | 798 | ||
799 | switch( mode ) { | 799 | switch( mode ) { |
800 | case SYNC_PREF_LOCAL: | 800 | case SYNC_PREF_LOCAL: |
801 | if ( lastSync > remoteMod ) | 801 | if ( lastSync > remoteMod ) |
802 | return 1; | 802 | return 1; |
803 | if ( lastSync > localMod ) | 803 | if ( lastSync > localMod ) |
804 | return 2; | 804 | return 2; |
805 | return 1; | 805 | return 1; |
806 | break; | 806 | break; |
807 | case SYNC_PREF_REMOTE: | 807 | case SYNC_PREF_REMOTE: |
808 | if ( lastSync > remoteMod ) | 808 | if ( lastSync > remoteMod ) |
809 | return 1; | 809 | return 1; |
810 | if ( lastSync > localMod ) | 810 | if ( lastSync > localMod ) |
811 | return 2; | 811 | return 2; |
812 | return 2; | 812 | return 2; |
813 | break; | 813 | break; |
814 | case SYNC_PREF_NEWEST: | 814 | case SYNC_PREF_NEWEST: |
815 | if ( localMod > remoteMod ) | 815 | if ( localMod > remoteMod ) |
816 | return 1; | 816 | return 1; |
817 | else | 817 | else |
818 | return 2; | 818 | return 2; |
819 | break; | 819 | break; |
820 | case SYNC_PREF_ASK: | 820 | case SYNC_PREF_ASK: |
821 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 821 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
822 | if ( lastSync > remoteMod ) | 822 | if ( lastSync > remoteMod ) |
823 | return 1; | 823 | return 1; |
824 | if ( lastSync > localMod ) | 824 | if ( lastSync > localMod ) |
825 | return 2; | 825 | return 2; |
826 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 826 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
827 | localIsNew = localMod >= remoteMod; | 827 | localIsNew = localMod >= remoteMod; |
828 | if ( localIsNew ) | 828 | if ( localIsNew ) |
829 | getEventViewerDialog()->setColorMode( 1 ); | 829 | getEventViewerDialog()->setColorMode( 1 ); |
830 | else | 830 | else |
831 | getEventViewerDialog()->setColorMode( 2 ); | 831 | getEventViewerDialog()->setColorMode( 2 ); |
832 | getEventViewerDialog()->setIncidence(local); | 832 | getEventViewerDialog()->setIncidence(local); |
833 | if ( localIsNew ) | 833 | if ( localIsNew ) |
834 | getEventViewerDialog()->setColorMode( 2 ); | 834 | getEventViewerDialog()->setColorMode( 2 ); |
835 | else | 835 | else |
836 | getEventViewerDialog()->setColorMode( 1 ); | 836 | getEventViewerDialog()->setColorMode( 1 ); |
837 | getEventViewerDialog()->addIncidence(remote); | 837 | getEventViewerDialog()->addIncidence(remote); |
838 | getEventViewerDialog()->setColorMode( 0 ); | 838 | getEventViewerDialog()->setColorMode( 0 ); |
839 | //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() ); | 839 | //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() ); |
840 | getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!")); | 840 | getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!")); |
841 | getEventViewerDialog()->showMe(); | 841 | getEventViewerDialog()->showMe(); |
842 | result = getEventViewerDialog()->executeS( localIsNew ); | 842 | result = getEventViewerDialog()->executeS( localIsNew ); |
843 | return result; | 843 | return result; |
844 | 844 | ||
845 | break; | 845 | break; |
846 | case SYNC_PREF_FORCE_LOCAL: | 846 | case SYNC_PREF_FORCE_LOCAL: |
847 | return 1; | 847 | return 1; |
848 | break; | 848 | break; |
849 | case SYNC_PREF_FORCE_REMOTE: | 849 | case SYNC_PREF_FORCE_REMOTE: |
850 | return 2; | 850 | return 2; |
851 | break; | 851 | break; |
852 | 852 | ||
853 | default: | 853 | default: |
854 | // SYNC_PREF_TAKE_BOTH not implemented | 854 | // SYNC_PREF_TAKE_BOTH not implemented |
855 | break; | 855 | break; |
856 | } | 856 | } |
857 | return 0; | 857 | return 0; |
858 | } | 858 | } |
859 | Event* CalendarView::getLastSyncEvent() | 859 | Event* CalendarView::getLastSyncEvent() |
860 | { | 860 | { |
861 | Event* lse; | 861 | Event* lse; |
862 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); | 862 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); |
863 | lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); | 863 | lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); |
864 | if (!lse) { | 864 | if (!lse) { |
865 | lse = new Event(); | 865 | lse = new Event(); |
866 | lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); | 866 | lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); |
867 | QString sum = ""; | 867 | QString sum = ""; |
868 | if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) | 868 | if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) |
869 | sum = "E: "; | 869 | sum = "E: "; |
870 | lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); | 870 | lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); |
871 | lse->setDtStart( mLastCalendarSync ); | 871 | lse->setDtStart( mLastCalendarSync ); |
872 | lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); | 872 | lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); |
873 | lse->setCategories( i18n("SyncEvent") ); | 873 | lse->setCategories( i18n("SyncEvent") ); |
874 | lse->setReadOnly( true ); | 874 | lse->setReadOnly( true ); |
875 | mCalendar->addEvent( lse ); | 875 | mCalendar->addEvent( lse ); |
876 | } | 876 | } |
877 | 877 | ||
878 | return lse; | 878 | return lse; |
879 | 879 | ||
880 | } | 880 | } |
881 | 881 | ||
882 | // we check, if the to delete event has a id for a profile | 882 | // we check, if the to delete event has a id for a profile |
883 | // if yes, we set this id in the profile to delete | 883 | // if yes, we set this id in the profile to delete |
884 | void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) | 884 | void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) |
885 | { | 885 | { |
886 | if ( lastSync.count() == 0 ) { | 886 | if ( lastSync.count() == 0 ) { |
887 | //qDebug(" lastSync.count() == 0"); | 887 | //qDebug(" lastSync.count() == 0"); |
888 | return; | 888 | return; |
889 | } | 889 | } |
890 | if ( toDelete->type() == "Journal" ) | 890 | if ( toDelete->type() == "Journal" ) |
891 | return; | 891 | return; |
892 | 892 | ||
893 | Event* eve = lastSync.first(); | 893 | Event* eve = lastSync.first(); |
894 | 894 | ||
895 | while ( eve ) { | 895 | while ( eve ) { |
896 | QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name | 896 | QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name |
897 | if ( !id.isEmpty() ) { | 897 | if ( !id.isEmpty() ) { |
898 | QString des = eve->description(); | 898 | QString des = eve->description(); |
899 | QString pref = "e"; | 899 | QString pref = "e"; |
900 | if ( toDelete->type() == "Todo" ) | 900 | if ( toDelete->type() == "Todo" ) |
901 | pref = "t"; | 901 | pref = "t"; |
902 | des += pref+ id + ","; | 902 | des += pref+ id + ","; |
903 | eve->setReadOnly( false ); | 903 | eve->setReadOnly( false ); |
904 | eve->setDescription( des ); | 904 | eve->setDescription( des ); |
905 | //qDebug("setdes %s ", des.latin1()); | 905 | //qDebug("setdes %s ", des.latin1()); |
906 | eve->setReadOnly( true ); | 906 | eve->setReadOnly( true ); |
907 | } | 907 | } |
908 | eve = lastSync.next(); | 908 | eve = lastSync.next(); |
909 | } | 909 | } |
910 | 910 | ||
911 | } | 911 | } |
912 | void CalendarView::checkExternalId( Incidence * inc ) | 912 | void CalendarView::checkExternalId( Incidence * inc ) |
913 | { | 913 | { |
914 | QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; | 914 | QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; |
915 | checkExternSyncEvent( lastSync, inc ); | 915 | checkExternSyncEvent( lastSync, inc ); |
916 | 916 | ||
917 | } | 917 | } |
918 | bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) | 918 | bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) |
919 | { | 919 | { |
920 | bool syncOK = true; | 920 | bool syncOK = true; |
921 | int addedEvent = 0; | 921 | int addedEvent = 0; |
922 | int addedEventR = 0; | 922 | int addedEventR = 0; |
923 | int deletedEventR = 0; | 923 | int deletedEventR = 0; |
924 | int deletedEventL = 0; | 924 | int deletedEventL = 0; |
925 | int changedLocal = 0; | 925 | int changedLocal = 0; |
926 | int changedRemote = 0; | 926 | int changedRemote = 0; |
927 | //QPtrList<Event> el = local->rawEvents(); | 927 | //QPtrList<Event> el = local->rawEvents(); |
928 | Event* eventR; | 928 | Event* eventR; |
929 | QString uid; | 929 | QString uid; |
930 | int take; | 930 | int take; |
931 | Event* eventL; | 931 | Event* eventL; |
932 | Event* eventRSync; | 932 | Event* eventRSync; |
933 | Event* eventLSync; | 933 | Event* eventLSync; |
934 | QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); | 934 | QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); |
935 | QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); | 935 | QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); |
936 | bool fullDateRange = false; | 936 | bool fullDateRange = false; |
937 | local->resetTempSyncStat(); | 937 | local->resetTempSyncStat(); |
938 | mLastCalendarSync = QDateTime::currentDateTime(); | 938 | mLastCalendarSync = QDateTime::currentDateTime(); |
939 | if ( mSyncManager->syncWithDesktop() ) { | 939 | if ( mSyncManager->syncWithDesktop() ) { |
940 | remote->resetPilotStat(1); | 940 | remote->resetPilotStat(1); |
941 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { | 941 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { |
942 | mLastCalendarSync = KSyncManager::mRequestedSyncEvent; | 942 | mLastCalendarSync = KSyncManager::mRequestedSyncEvent; |
943 | qDebug("using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); | 943 | qDebug("using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); |
944 | } else { | 944 | } else { |
945 | qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); | 945 | qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); |
946 | } | 946 | } |
947 | } | 947 | } |
948 | QDateTime modifiedCalendar = mLastCalendarSync; | 948 | QDateTime modifiedCalendar = mLastCalendarSync; |
949 | eventLSync = getLastSyncEvent(); | 949 | eventLSync = getLastSyncEvent(); |
950 | eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); | 950 | eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); |
951 | if ( eventR ) { | 951 | if ( eventR ) { |
952 | eventRSync = (Event*) eventR->clone(); | 952 | eventRSync = (Event*) eventR->clone(); |
953 | remote->deleteEvent(eventR ); | 953 | remote->deleteEvent(eventR ); |
954 | 954 | ||
955 | } else { | 955 | } else { |
956 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { | 956 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { |
957 | eventRSync = (Event*)eventLSync->clone(); | 957 | eventRSync = (Event*)eventLSync->clone(); |
958 | } else { | 958 | } else { |
959 | fullDateRange = true; | 959 | fullDateRange = true; |
960 | eventRSync = new Event(); | 960 | eventRSync = new Event(); |
961 | eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); | 961 | eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); |
962 | eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); | 962 | eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); |
963 | eventRSync->setDtStart( mLastCalendarSync ); | 963 | eventRSync->setDtStart( mLastCalendarSync ); |
964 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); | 964 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); |
965 | eventRSync->setCategories( i18n("SyncEvent") ); | 965 | eventRSync->setCategories( i18n("SyncEvent") ); |
966 | } | 966 | } |
967 | } | 967 | } |
968 | if ( eventLSync->dtStart() == mLastCalendarSync ) | 968 | if ( eventLSync->dtStart() == mLastCalendarSync ) |
969 | fullDateRange = true; | 969 | fullDateRange = true; |
970 | 970 | ||
971 | if ( ! fullDateRange ) { | 971 | if ( ! fullDateRange ) { |
972 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { | 972 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { |
973 | 973 | ||
974 | // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); | 974 | // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); |
975 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); | 975 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); |
976 | fullDateRange = true; | 976 | fullDateRange = true; |
977 | } | 977 | } |
978 | } | 978 | } |
979 | if ( mSyncManager->syncWithDesktop() ) { | 979 | if ( mSyncManager->syncWithDesktop() ) { |
980 | fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); | 980 | fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); |
981 | } | 981 | } |
982 | if ( fullDateRange ) | 982 | if ( fullDateRange ) |
983 | mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); | 983 | mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); |
984 | else | 984 | else |
985 | mLastCalendarSync = eventLSync->dtStart(); | 985 | mLastCalendarSync = eventLSync->dtStart(); |
986 | // for resyncing if own file has changed | 986 | // for resyncing if own file has changed |
987 | if ( mCurrentSyncDevice == "deleteaftersync" ) { | 987 | if ( mCurrentSyncDevice == "deleteaftersync" ) { |
988 | mLastCalendarSync = loadedFileVersion; | 988 | mLastCalendarSync = loadedFileVersion; |
989 | //qDebug("setting mLastCalendarSync "); | 989 | //qDebug("setting mLastCalendarSync "); |
990 | } | 990 | } |
991 | //qDebug("*************************** "); | 991 | //qDebug("*************************** "); |
992 | qDebug("mLastCalendarSync %s full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); | 992 | qDebug("mLastCalendarSync %s full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); |
993 | QPtrList<Incidence> er = remote->rawIncidences(); | 993 | QPtrList<Incidence> er = remote->rawIncidences(); |
994 | Incidence* inR = er.first(); | 994 | Incidence* inR = er.first(); |
995 | Incidence* inL; | 995 | Incidence* inL; |
996 | QProgressBar bar( er.count(),0 ); | 996 | QProgressBar bar( er.count(),0 ); |
997 | bar.setCaption (i18n("Syncing - close to abort!") ); | 997 | bar.setCaption (i18n("Syncing - close to abort!") ); |
998 | 998 | ||
999 | // ************** setting up filter ************* | ||
1000 | CalFilter *filterIN = 0; | ||
1001 | CalFilter *filterOUT = 0; | ||
1002 | CalFilter *filter = mFilters.first(); | ||
1003 | while(filter) { | ||
1004 | if ( filter->name() == mSyncManager->mFilterInCal ) | ||
1005 | filterIN = filter; | ||
1006 | if ( filter->name() == mSyncManager->mFilterOutCal ) | ||
1007 | filterOUT = filter; | ||
1008 | filter = mFilters.next(); | ||
1009 | } | ||
999 | int w = 300; | 1010 | int w = 300; |
1000 | if ( QApplication::desktop()->width() < 320 ) | 1011 | if ( QApplication::desktop()->width() < 320 ) |
1001 | w = 220; | 1012 | w = 220; |
1002 | int h = bar.sizeHint().height() ; | 1013 | int h = bar.sizeHint().height() ; |
1003 | int dw = QApplication::desktop()->width(); | 1014 | int dw = QApplication::desktop()->width(); |
1004 | int dh = QApplication::desktop()->height(); | 1015 | int dh = QApplication::desktop()->height(); |
1005 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1016 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1006 | bar.show(); | 1017 | bar.show(); |
1007 | int modulo = (er.count()/10)+1; | 1018 | int modulo = (er.count()/10)+1; |
1008 | int incCounter = 0; | 1019 | int incCounter = 0; |
1009 | while ( inR ) { | 1020 | while ( inR ) { |
1010 | if ( ! bar.isVisible() ) | 1021 | if ( ! bar.isVisible() ) |
1011 | return false; | 1022 | return false; |
1012 | if ( incCounter % modulo == 0 ) | 1023 | if ( incCounter % modulo == 0 ) |
1013 | bar.setProgress( incCounter ); | 1024 | bar.setProgress( incCounter ); |
1014 | ++incCounter; | 1025 | ++incCounter; |
1015 | uid = inR->uid(); | 1026 | uid = inR->uid(); |
1016 | bool skipIncidence = false; | 1027 | bool skipIncidence = false; |
1017 | if ( uid.left(15) == QString("last-syncEvent-") ) | 1028 | if ( uid.left(15) == QString("last-syncEvent-") ) |
1018 | skipIncidence = true; | 1029 | skipIncidence = true; |
1019 | QString idS; | 1030 | QString idS; |
1020 | qApp->processEvents(); | 1031 | qApp->processEvents(); |
1021 | if ( !skipIncidence ) { | 1032 | if ( !skipIncidence ) { |
1022 | inL = local->incidence( uid ); | 1033 | inL = local->incidence( uid ); |
1023 | if ( inL ) { // maybe conflict - same uid in both calendars | 1034 | if ( inL ) { // maybe conflict - same uid in both calendars |
1024 | if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { | 1035 | if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { |
1025 | //qDebug("take %d %s ", take, inL->summary().latin1()); | 1036 | //qDebug("take %d %s ", take, inL->summary().latin1()); |
1026 | if ( take == 3 ) | 1037 | if ( take == 3 ) |
1027 | return false; | 1038 | return false; |
1028 | if ( take == 1 ) {// take local ********************** | 1039 | if ( take == 1 ) {// take local ********************** |
1029 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) | 1040 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) |
1030 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1041 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1031 | else | 1042 | else |
1032 | idS = inR->IDStr(); | 1043 | idS = inR->IDStr(); |
1033 | remote->deleteIncidence( inR ); | 1044 | remote->deleteIncidence( inR ); |
1034 | inR = inL->clone(); | 1045 | inR = inL->clone(); |
1035 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1046 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1036 | if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) | 1047 | if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) |
1037 | inR->setIDStr( idS ); | 1048 | inR->setIDStr( idS ); |
1038 | remote->addIncidence( inR ); | 1049 | remote->addIncidence( inR ); |
1039 | if ( mSyncManager->syncWithDesktop() ) | 1050 | if ( mSyncManager->syncWithDesktop() ) |
1040 | inR->setPilotId( 2 ); | 1051 | inR->setPilotId( 2 ); |
1041 | ++changedRemote; | 1052 | ++changedRemote; |
1042 | } else {// take remote ********************** | 1053 | } else {// take remote ********************** |
1043 | idS = inL->IDStr(); | 1054 | idS = inL->IDStr(); |
1044 | int pid = inL->pilotId(); | 1055 | int pid = inL->pilotId(); |
1045 | local->deleteIncidence( inL ); | 1056 | local->deleteIncidence( inL ); |
1046 | inL = inR->clone(); | 1057 | inL = inR->clone(); |
1047 | if ( mSyncManager->syncWithDesktop() ) | 1058 | if ( mSyncManager->syncWithDesktop() ) |
1048 | inL->setPilotId( pid ); | 1059 | inL->setPilotId( pid ); |
1049 | inL->setIDStr( idS ); | 1060 | inL->setIDStr( idS ); |
1050 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1061 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1051 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1062 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1052 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); | 1063 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); |
1053 | } | 1064 | } |
1054 | local->addIncidence( inL ); | 1065 | local->addIncidence( inL ); |
1055 | ++changedLocal; | 1066 | ++changedLocal; |
1056 | } | 1067 | } |
1057 | } | 1068 | } |
1058 | } else { // no conflict ********** add or delete remote | 1069 | } else { // no conflict ********** add or delete remote |
1059 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1070 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1060 | QString des = eventLSync->description(); | 1071 | QString des = eventLSync->description(); |
1061 | QString pref = "e"; | 1072 | QString pref = "e"; |
1062 | if ( inR->type() == "Todo" ) | 1073 | if ( inR->type() == "Todo" ) |
1063 | pref = "t"; | 1074 | pref = "t"; |
1064 | if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it | 1075 | if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it |
1065 | inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); | 1076 | inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); |
1066 | //remote->deleteIncidence( inR ); | 1077 | //remote->deleteIncidence( inR ); |
1067 | ++deletedEventR; | 1078 | ++deletedEventR; |
1068 | } else { | 1079 | } else { |
1069 | inR->setLastModified( modifiedCalendar ); | 1080 | inR->setLastModified( modifiedCalendar ); |
1070 | inL = inR->clone(); | 1081 | inL = inR->clone(); |
1071 | inL->setIDStr( ":" ); | 1082 | inL->setIDStr( ":" ); |
1072 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1083 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1073 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); | 1084 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); |
1074 | local->addIncidence( inL ); | 1085 | local->addIncidence( inL ); |
1075 | ++addedEvent; | 1086 | ++addedEvent; |
1076 | } | 1087 | } |
1077 | } else { | 1088 | } else { |
1078 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { | 1089 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { |
1079 | inR->setLastModified( modifiedCalendar ); | 1090 | inR->setLastModified( modifiedCalendar ); |
1080 | inL = inR->clone(); | 1091 | inL = inR->clone(); |
1081 | inL->setIDStr( ":" ); | 1092 | inL->setIDStr( ":" ); |
1082 | local->addIncidence( inL ); | 1093 | local->addIncidence( inL ); |
1083 | ++addedEvent; | 1094 | ++addedEvent; |
1084 | } else { | 1095 | } else { |
1085 | checkExternSyncEvent(eventRSyncSharp, inR); | 1096 | checkExternSyncEvent(eventRSyncSharp, inR); |
1086 | remote->deleteIncidence( inR ); | 1097 | remote->deleteIncidence( inR ); |
1087 | ++deletedEventR; | 1098 | ++deletedEventR; |
1088 | } | 1099 | } |
1089 | } | 1100 | } |
1090 | } | 1101 | } |
1091 | } | 1102 | } |
1092 | inR = er.next(); | 1103 | inR = er.next(); |
1093 | } | 1104 | } |
1094 | QPtrList<Incidence> el = local->rawIncidences(); | 1105 | QPtrList<Incidence> el = local->rawIncidences(); |
1095 | inL = el.first(); | 1106 | inL = el.first(); |
1096 | modulo = (el.count()/10)+1; | 1107 | modulo = (el.count()/10)+1; |
1097 | bar.setCaption (i18n("Add / remove events") ); | 1108 | bar.setCaption (i18n("Add / remove events") ); |
1098 | bar.setTotalSteps ( el.count() ) ; | 1109 | bar.setTotalSteps ( el.count() ) ; |
1099 | bar.show(); | 1110 | bar.show(); |
1100 | incCounter = 0; | 1111 | incCounter = 0; |
1101 | 1112 | ||
1102 | while ( inL ) { | 1113 | while ( inL ) { |
1103 | 1114 | ||
1104 | qApp->processEvents(); | 1115 | qApp->processEvents(); |
1105 | if ( ! bar.isVisible() ) | 1116 | if ( ! bar.isVisible() ) |
1106 | return false; | 1117 | return false; |
1107 | if ( incCounter % modulo == 0 ) | 1118 | if ( incCounter % modulo == 0 ) |
1108 | bar.setProgress( incCounter ); | 1119 | bar.setProgress( incCounter ); |
1109 | ++incCounter; | 1120 | ++incCounter; |
1110 | uid = inL->uid(); | 1121 | uid = inL->uid(); |
1111 | bool skipIncidence = false; | 1122 | bool skipIncidence = false; |
1112 | if ( uid.left(15) == QString("last-syncEvent-") ) | 1123 | if ( uid.left(15) == QString("last-syncEvent-") ) |
1113 | skipIncidence = true; | 1124 | skipIncidence = true; |
1114 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->type() == "Journal" ) | 1125 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->type() == "Journal" ) |
1115 | skipIncidence = true; | 1126 | skipIncidence = true; |
1116 | if ( !skipIncidence ) { | 1127 | if ( !skipIncidence ) { |
1117 | inR = remote->incidence( uid ); | 1128 | inR = remote->incidence( uid ); |
1118 | if ( ! inR ) { // no conflict ********** add or delete local | 1129 | if ( ! inR ) { // no conflict ********** add or delete local |
1119 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1130 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1120 | if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { | 1131 | if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { |
1121 | checkExternSyncEvent(eventLSyncSharp, inL); | 1132 | checkExternSyncEvent(eventLSyncSharp, inL); |
1122 | local->deleteIncidence( inL ); | 1133 | local->deleteIncidence( inL ); |
1123 | ++deletedEventL; | 1134 | ++deletedEventL; |
1124 | } else { | 1135 | } else { |
1125 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1136 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1126 | inL->removeID(mCurrentSyncDevice ); | 1137 | inL->removeID(mCurrentSyncDevice ); |
1127 | ++addedEventR; | 1138 | ++addedEventR; |
1128 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); | 1139 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); |
1129 | inL->setLastModified( modifiedCalendar ); | 1140 | inL->setLastModified( modifiedCalendar ); |
1130 | inR = inL->clone(); | 1141 | inR = inL->clone(); |
1131 | inR->setIDStr( ":" ); | 1142 | inR->setIDStr( ":" ); |
1132 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1143 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1133 | remote->addIncidence( inR ); | 1144 | remote->addIncidence( inR ); |
1134 | } | 1145 | } |
1135 | } | 1146 | } |
1136 | } else { | 1147 | } else { |
1137 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { | 1148 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { |
1138 | checkExternSyncEvent(eventLSyncSharp, inL); | 1149 | checkExternSyncEvent(eventLSyncSharp, inL); |
1139 | local->deleteIncidence( inL ); | 1150 | local->deleteIncidence( inL ); |
1140 | ++deletedEventL; | 1151 | ++deletedEventL; |
1141 | } else { | 1152 | } else { |
1142 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1153 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1143 | ++addedEventR; | 1154 | ++addedEventR; |
1144 | inL->setLastModified( modifiedCalendar ); | 1155 | inL->setLastModified( modifiedCalendar ); |
1145 | inR = inL->clone(); | 1156 | inR = inL->clone(); |
1146 | inR->setIDStr( ":" ); | 1157 | inR->setIDStr( ":" ); |
1147 | remote->addIncidence( inR ); | 1158 | remote->addIncidence( inR ); |
1148 | } | 1159 | } |
1149 | } | 1160 | } |
1150 | } | 1161 | } |
1151 | } | 1162 | } |
1152 | } | 1163 | } |
1153 | inL = el.next(); | 1164 | inL = el.next(); |
1154 | } | 1165 | } |
1155 | int delFut = 0; | 1166 | int delFut = 0; |
1156 | int remRem = 0; | 1167 | int remRem = 0; |
1157 | if ( mSyncManager->mWriteBackInFuture ) { | 1168 | if ( mSyncManager->mWriteBackInFuture ) { |
1158 | er = remote->rawIncidences(); | 1169 | er = remote->rawIncidences(); |
1159 | remRem = er.count(); | 1170 | remRem = er.count(); |
1160 | inR = er.first(); | 1171 | inR = er.first(); |
1161 | QDateTime dt; | 1172 | QDateTime dt; |
1162 | QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); | 1173 | QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); |
1163 | QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); | 1174 | QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); |
1164 | while ( inR ) { | 1175 | while ( inR ) { |
1165 | if ( inR->type() == "Todo" ) { | 1176 | if ( inR->type() == "Todo" ) { |
1166 | Todo * t = (Todo*)inR; | 1177 | Todo * t = (Todo*)inR; |
1167 | if ( t->hasDueDate() ) | 1178 | if ( t->hasDueDate() ) |
1168 | dt = t->dtDue(); | 1179 | dt = t->dtDue(); |
1169 | else | 1180 | else |
1170 | dt = cur.addSecs( 62 ); | 1181 | dt = cur.addSecs( 62 ); |
1171 | } | 1182 | } |
1172 | else if (inR->type() == "Event" ) { | 1183 | else if (inR->type() == "Event" ) { |
1173 | bool ok; | 1184 | bool ok; |
1174 | dt = inR->getNextOccurence( cur, &ok ); | 1185 | dt = inR->getNextOccurence( cur, &ok ); |
1175 | if ( !ok ) | 1186 | if ( !ok ) |
1176 | dt = cur.addSecs( -62 ); | 1187 | dt = cur.addSecs( -62 ); |
1177 | } | 1188 | } |
1178 | else | 1189 | else |
1179 | dt = inR->dtStart(); | 1190 | dt = inR->dtStart(); |
1180 | if ( dt < cur || dt > end ) { | 1191 | if ( dt < cur || dt > end ) { |
1181 | remote->deleteIncidence( inR ); | 1192 | remote->deleteIncidence( inR ); |
1182 | ++delFut; | 1193 | ++delFut; |
1183 | } | 1194 | } |
1184 | inR = er.next(); | 1195 | inR = er.next(); |
1185 | } | 1196 | } |
1186 | } | 1197 | } |
1187 | bar.hide(); | 1198 | bar.hide(); |
1188 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); | 1199 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); |
1189 | eventLSync->setReadOnly( false ); | 1200 | eventLSync->setReadOnly( false ); |
1190 | eventLSync->setDtStart( mLastCalendarSync ); | 1201 | eventLSync->setDtStart( mLastCalendarSync ); |
1191 | eventRSync->setDtStart( mLastCalendarSync ); | 1202 | eventRSync->setDtStart( mLastCalendarSync ); |
1192 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1203 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1193 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1204 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1194 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; | 1205 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; |
1195 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); | 1206 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); |
1196 | eventLSync->setReadOnly( true ); | 1207 | eventLSync->setReadOnly( true ); |
1197 | qDebug("********** %d %d ", mGlobalSyncMode == SYNC_MODE_NORMAL, mSyncManager->syncWithDesktop() ); | 1208 | qDebug("********** %d %d ", mGlobalSyncMode == SYNC_MODE_NORMAL, mSyncManager->syncWithDesktop() ); |
1198 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... | 1209 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... |
1199 | remote->addEvent( eventRSync ); | 1210 | remote->addEvent( eventRSync ); |
1200 | else | 1211 | else |
1201 | delete eventRSync; | 1212 | delete eventRSync; |
1202 | QString mes; | 1213 | QString mes; |
1203 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR ); | 1214 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR ); |
1204 | QString delmess; | 1215 | QString delmess; |
1205 | if ( delFut ) { | 1216 | if ( delFut ) { |
1206 | delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are more\nthan %d weeks in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInPast,mSyncManager->mWriteBackInFuture, remRem-delFut); | 1217 | delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are more\nthan %d weeks in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInPast,mSyncManager->mWriteBackInFuture, remRem-delFut); |
1207 | mes += delmess; | 1218 | mes += delmess; |
1208 | } | 1219 | } |
1209 | mes = i18n("Local calendar changed!\n") +mes; | 1220 | mes = i18n("Local calendar changed!\n") +mes; |
1210 | mCalendar->checkAlarmForIncidence( 0, true ); | 1221 | mCalendar->checkAlarmForIncidence( 0, true ); |
1211 | qDebug( mes ); | 1222 | qDebug( mes ); |
1212 | if ( mSyncManager->mShowSyncSummary ) { | 1223 | if ( mSyncManager->mShowSyncSummary ) { |
1213 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, | 1224 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, |
1214 | i18n("KO/Pi Synchronization"),i18n("Write back"))) { | 1225 | i18n("KO/Pi Synchronization"),i18n("Write back"))) { |
1215 | qDebug("cancelled "); | 1226 | qDebug("cancelled "); |
1216 | return false; | 1227 | return false; |
1217 | } | 1228 | } |
1218 | } | 1229 | } |
1219 | return syncOK; | 1230 | return syncOK; |
1220 | } | 1231 | } |
1221 | 1232 | ||
1222 | void CalendarView::setSyncDevice( QString s ) | 1233 | void CalendarView::setSyncDevice( QString s ) |
1223 | { | 1234 | { |
1224 | mCurrentSyncDevice= s; | 1235 | mCurrentSyncDevice= s; |
1225 | } | 1236 | } |
1226 | void CalendarView::setSyncName( QString s ) | 1237 | void CalendarView::setSyncName( QString s ) |
1227 | { | 1238 | { |
1228 | mCurrentSyncName= s; | 1239 | mCurrentSyncName= s; |
1229 | } | 1240 | } |
1230 | bool CalendarView::syncCalendar(QString filename, int mode) | 1241 | bool CalendarView::syncCalendar(QString filename, int mode) |
1231 | { | 1242 | { |
1232 | //qDebug("syncCalendar %s ", filename.latin1()); | 1243 | //qDebug("syncCalendar %s ", filename.latin1()); |
1233 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 1244 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
1234 | CalendarLocal* calendar = new CalendarLocal(); | 1245 | CalendarLocal* calendar = new CalendarLocal(); |
1235 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1246 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1236 | FileStorage* storage = new FileStorage( calendar ); | 1247 | FileStorage* storage = new FileStorage( calendar ); |
1237 | bool syncOK = false; | 1248 | bool syncOK = false; |
1238 | storage->setFileName( filename ); | 1249 | storage->setFileName( filename ); |
1239 | // qDebug("loading ... "); | 1250 | // qDebug("loading ... "); |
1240 | if ( storage->load() ) { | 1251 | if ( storage->load() ) { |
1241 | getEventViewerDialog()->setSyncMode( true ); | 1252 | getEventViewerDialog()->setSyncMode( true ); |
1242 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); | 1253 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); |
1243 | getEventViewerDialog()->setSyncMode( false ); | 1254 | getEventViewerDialog()->setSyncMode( false ); |
1244 | if ( syncOK ) { | 1255 | if ( syncOK ) { |
1245 | if ( mSyncManager->mWriteBackFile ) | 1256 | if ( mSyncManager->mWriteBackFile ) |
1246 | { | 1257 | { |
1247 | storage->setSaveFormat( new ICalFormat() ); | 1258 | storage->setSaveFormat( new ICalFormat() ); |
1248 | storage->save(); | 1259 | storage->save(); |
1249 | } | 1260 | } |
1250 | } | 1261 | } |
1251 | setModified( true ); | 1262 | setModified( true ); |
1252 | } | 1263 | } |
1253 | delete storage; | 1264 | delete storage; |
1254 | delete calendar; | 1265 | delete calendar; |
1255 | if ( syncOK ) | 1266 | if ( syncOK ) |
1256 | updateView(); | 1267 | updateView(); |
1257 | return syncOK; | 1268 | return syncOK; |
1258 | } | 1269 | } |
1259 | 1270 | ||
1260 | void CalendarView::syncExternal( int mode ) | 1271 | void CalendarView::syncExternal( int mode ) |
1261 | { | 1272 | { |
1262 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 1273 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
1263 | 1274 | ||
1264 | qApp->processEvents(); | 1275 | qApp->processEvents(); |
1265 | CalendarLocal* calendar = new CalendarLocal(); | 1276 | CalendarLocal* calendar = new CalendarLocal(); |
1266 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1277 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1267 | bool syncOK = false; | 1278 | bool syncOK = false; |
1268 | bool loadSuccess = false; | 1279 | bool loadSuccess = false; |
1269 | PhoneFormat* phoneFormat = 0; | 1280 | PhoneFormat* phoneFormat = 0; |
1270 | emit tempDisableBR(true); | 1281 | emit tempDisableBR(true); |
1271 | #ifndef DESKTOP_VERSION | 1282 | #ifndef DESKTOP_VERSION |
1272 | SharpFormat* sharpFormat = 0; | 1283 | SharpFormat* sharpFormat = 0; |
1273 | if ( mode == 0 ) { // sharp | 1284 | if ( mode == 0 ) { // sharp |
1274 | sharpFormat = new SharpFormat () ; | 1285 | sharpFormat = new SharpFormat () ; |
1275 | loadSuccess = sharpFormat->load( calendar, mCalendar ); | 1286 | loadSuccess = sharpFormat->load( calendar, mCalendar ); |
1276 | 1287 | ||
1277 | } else | 1288 | } else |
1278 | #endif | 1289 | #endif |
1279 | if ( mode == 1 ) { // phone | 1290 | if ( mode == 1 ) { // phone |
1280 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, | 1291 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, |
1281 | mSyncManager->mPhoneDevice, | 1292 | mSyncManager->mPhoneDevice, |
1282 | mSyncManager->mPhoneConnection, | 1293 | mSyncManager->mPhoneConnection, |
1283 | mSyncManager->mPhoneModel); | 1294 | mSyncManager->mPhoneModel); |
1284 | loadSuccess = phoneFormat->load( calendar,mCalendar); | 1295 | loadSuccess = phoneFormat->load( calendar,mCalendar); |
1285 | 1296 | ||
1286 | } else { | 1297 | } else { |
1287 | emit tempDisableBR(false); | 1298 | emit tempDisableBR(false); |
1288 | return; | 1299 | return; |
1289 | } | 1300 | } |
1290 | if ( loadSuccess ) { | 1301 | if ( loadSuccess ) { |
1291 | getEventViewerDialog()->setSyncMode( true ); | 1302 | getEventViewerDialog()->setSyncMode( true ); |
1292 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); | 1303 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); |
1293 | getEventViewerDialog()->setSyncMode( false ); | 1304 | getEventViewerDialog()->setSyncMode( false ); |
1294 | qApp->processEvents(); | 1305 | qApp->processEvents(); |
1295 | if ( syncOK ) { | 1306 | if ( syncOK ) { |
1296 | if ( mSyncManager->mWriteBackFile ) | 1307 | if ( mSyncManager->mWriteBackFile ) |
1297 | { | 1308 | { |
1298 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); | 1309 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); |
1299 | Incidence* inc = iL.first(); | 1310 | Incidence* inc = iL.first(); |
1300 | if ( phoneFormat ) { | 1311 | if ( phoneFormat ) { |
1301 | while ( inc ) { | 1312 | while ( inc ) { |
1302 | inc->removeID(mCurrentSyncDevice); | 1313 | inc->removeID(mCurrentSyncDevice); |
1303 | inc = iL.next(); | 1314 | inc = iL.next(); |
1304 | } | 1315 | } |
1305 | } | 1316 | } |
1306 | #ifndef DESKTOP_VERSION | 1317 | #ifndef DESKTOP_VERSION |
1307 | if ( sharpFormat ) | 1318 | if ( sharpFormat ) |
1308 | sharpFormat->save(calendar); | 1319 | sharpFormat->save(calendar); |
1309 | #endif | 1320 | #endif |
1310 | if ( phoneFormat ) | 1321 | if ( phoneFormat ) |
1311 | phoneFormat->save(calendar); | 1322 | phoneFormat->save(calendar); |
1312 | iL = calendar->rawIncidences(); | 1323 | iL = calendar->rawIncidences(); |
1313 | inc = iL.first(); | 1324 | inc = iL.first(); |
1314 | Incidence* loc; | 1325 | Incidence* loc; |
1315 | while ( inc ) { | 1326 | while ( inc ) { |
1316 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { | 1327 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { |
1317 | loc = mCalendar->incidence(inc->uid() ); | 1328 | loc = mCalendar->incidence(inc->uid() ); |
1318 | if ( loc ) { | 1329 | if ( loc ) { |
1319 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); | 1330 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); |
1320 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); | 1331 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); |
1321 | } | 1332 | } |
1322 | } | 1333 | } |
1323 | inc = iL.next(); | 1334 | inc = iL.next(); |
1324 | } | 1335 | } |
1325 | Incidence* lse = getLastSyncEvent(); | 1336 | Incidence* lse = getLastSyncEvent(); |
1326 | if ( lse ) { | 1337 | if ( lse ) { |
1327 | lse->setReadOnly( false ); | 1338 | lse->setReadOnly( false ); |
1328 | lse->setDescription( "" ); | 1339 | lse->setDescription( "" ); |
1329 | lse->setReadOnly( true ); | 1340 | lse->setReadOnly( true ); |
1330 | } | 1341 | } |
1331 | } | 1342 | } |
1332 | } else { | 1343 | } else { |
1333 | topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); | 1344 | topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); |
1334 | } | 1345 | } |
1335 | setModified( true ); | 1346 | setModified( true ); |
1336 | } else { | 1347 | } else { |
1337 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; | 1348 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; |
1338 | QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), | 1349 | QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), |
1339 | question, i18n("Ok")) ; | 1350 | question, i18n("Ok")) ; |
1340 | 1351 | ||
1341 | } | 1352 | } |
1342 | delete calendar; | 1353 | delete calendar; |
1343 | updateView(); | 1354 | updateView(); |
1344 | emit tempDisableBR(false); | 1355 | emit tempDisableBR(false); |
1345 | return ;//syncOK; | 1356 | return ;//syncOK; |
1346 | 1357 | ||
1347 | } | 1358 | } |
1348 | 1359 | ||
1349 | bool CalendarView::importBday() | 1360 | bool CalendarView::importBday() |
1350 | { | 1361 | { |
1351 | #ifndef KORG_NOKABC | 1362 | #ifndef KORG_NOKABC |
1352 | 1363 | ||
1353 | #ifdef DESKTOP_VERSION | 1364 | #ifdef DESKTOP_VERSION |
1354 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 1365 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
1355 | KABC::AddressBook::Iterator it; | 1366 | KABC::AddressBook::Iterator it; |
1356 | int count = 0; | 1367 | int count = 0; |
1357 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 1368 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
1358 | ++count; | 1369 | ++count; |
1359 | } | 1370 | } |
1360 | QProgressBar bar(count,0 ); | 1371 | QProgressBar bar(count,0 ); |
1361 | int w = 300; | 1372 | int w = 300; |
1362 | if ( QApplication::desktop()->width() < 320 ) | 1373 | if ( QApplication::desktop()->width() < 320 ) |
1363 | w = 220; | 1374 | w = 220; |
1364 | int h = bar.sizeHint().height() ; | 1375 | int h = bar.sizeHint().height() ; |
1365 | int dw = QApplication::desktop()->width(); | 1376 | int dw = QApplication::desktop()->width(); |
1366 | int dh = QApplication::desktop()->height(); | 1377 | int dh = QApplication::desktop()->height(); |
1367 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1378 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1368 | bar.show(); | 1379 | bar.show(); |
1369 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); | 1380 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); |
1370 | qApp->processEvents(); | 1381 | qApp->processEvents(); |
1371 | count = 0; | 1382 | count = 0; |
1372 | int addCount = 0; | 1383 | int addCount = 0; |
1373 | KCal::Attendee* a = 0; | 1384 | KCal::Attendee* a = 0; |
1374 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 1385 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
1375 | if ( ! bar.isVisible() ) | 1386 | if ( ! bar.isVisible() ) |
1376 | return false; | 1387 | return false; |
1377 | bar.setProgress( count++ ); | 1388 | bar.setProgress( count++ ); |
1378 | qApp->processEvents(); | 1389 | qApp->processEvents(); |
1379 | //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); | 1390 | //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); |
1380 | if ( (*it).birthday().date().isValid() ){ | 1391 | if ( (*it).birthday().date().isValid() ){ |
1381 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; | 1392 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; |
1382 | if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) | 1393 | if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) |
diff --git a/korganizer/filteredit_base.cpp b/korganizer/filteredit_base.cpp index 21a0954..e724da4 100644 --- a/korganizer/filteredit_base.cpp +++ b/korganizer/filteredit_base.cpp | |||
@@ -1,128 +1,145 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** Form implementation generated from reading ui file 'filteredit_base.ui' | 2 | ** Form implementation generated from reading ui file 'filteredit_base.ui' |
3 | ** | 3 | ** |
4 | ** Created: Di Mai 4 15:30:31 2004 | 4 | ** Created: So Jan 16 11:23:21 2005 |
5 | ** by: The User Interface Compiler ($Id$) | 5 | ** by: The User Interface Compiler ($Id$) |
6 | ** | 6 | ** |
7 | ** WARNING! All changes made in this file will be lost! | 7 | ** WARNING! All changes made in this file will be lost! |
8 | ****************************************************************************/ | 8 | ****************************************************************************/ |
9 | 9 | ||
10 | #include "filteredit_base.h" | 10 | #include "filteredit_base.h" |
11 | 11 | ||
12 | #include <qvariant.h> | 12 | #include <qvariant.h> |
13 | #include <qpushbutton.h> | 13 | #include <qpushbutton.h> |
14 | #include <qframe.h> | 14 | #include <qframe.h> |
15 | #include <qbuttongroup.h> | 15 | #include <qbuttongroup.h> |
16 | #include <qradiobutton.h> | 16 | #include <qradiobutton.h> |
17 | #include <qlistbox.h> | 17 | #include <qlistbox.h> |
18 | #include <qlabel.h> | 18 | #include <qlabel.h> |
19 | #include <qcheckbox.h> | 19 | #include <qcheckbox.h> |
20 | #include <qlayout.h> | 20 | #include <qlayout.h> |
21 | #include <qtooltip.h> | 21 | #include <qtooltip.h> |
22 | #include <qwhatsthis.h> | 22 | #include <qwhatsthis.h> |
23 | #include "filteredit_base.ui.h" | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * Constructs a FilterEdit_base as a child of 'parent', with the | 26 | * Constructs a FilterEdit_base as a child of 'parent', with the |
26 | * name 'name' and widget flags set to 'f'. | 27 | * name 'name' and widget flags set to 'f'. |
27 | */ | 28 | */ |
28 | FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) | 29 | FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) |
29 | : QWidget( parent, name, fl ) | 30 | : QWidget( parent, name, fl ) |
30 | { | 31 | { |
31 | if ( !name ) | 32 | if ( !name ) |
32 | setName( "FilterEdit_base" ); | 33 | setName( "FilterEdit_base" ); |
33 | FilterEdit_baseLayout = new QVBoxLayout( this, 0, 0, "FilterEdit_baseLayout"); | 34 | FilterEdit_baseLayout = new QVBoxLayout( this, 0, 0, "FilterEdit_baseLayout"); |
34 | 35 | ||
35 | mCriteriaFrame = new QFrame( this, "mCriteriaFrame" ); | 36 | mCriteriaFrame = new QFrame( this, "mCriteriaFrame" ); |
36 | mCriteriaFrame->setFrameShape( QFrame::StyledPanel ); | 37 | mCriteriaFrame->setFrameShape( QFrame::StyledPanel ); |
37 | mCriteriaFrame->setFrameShadow( QFrame::Raised ); | 38 | mCriteriaFrame->setFrameShadow( QFrame::Raised ); |
38 | mCriteriaFrameLayout = new QGridLayout( mCriteriaFrame, 1, 1, 3, 2, "mCriteriaFrameLayout"); | 39 | mCriteriaFrameLayout = new QVBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout"); |
39 | 40 | ||
40 | ButtonGroup1 = new QButtonGroup( mCriteriaFrame, "ButtonGroup1" ); | 41 | ButtonGroup1 = new QButtonGroup( mCriteriaFrame, "ButtonGroup1" ); |
41 | ButtonGroup1->setColumnLayout(0, Qt::Vertical ); | 42 | ButtonGroup1->setColumnLayout(0, Qt::Vertical ); |
42 | ButtonGroup1->layout()->setSpacing( 6 ); | 43 | ButtonGroup1->layout()->setSpacing( 6 ); |
43 | ButtonGroup1->layout()->setMargin( 11 ); | 44 | ButtonGroup1->layout()->setMargin( 6 ); |
44 | ButtonGroup1Layout = new QVBoxLayout( ButtonGroup1->layout() ); | 45 | ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() ); |
45 | ButtonGroup1Layout->setAlignment( Qt::AlignTop ); | 46 | ButtonGroup1Layout->setAlignment( Qt::AlignTop ); |
46 | 47 | ||
48 | layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); | ||
49 | |||
47 | mCatShowCheck = new QRadioButton( ButtonGroup1, "mCatShowCheck" ); | 50 | mCatShowCheck = new QRadioButton( ButtonGroup1, "mCatShowCheck" ); |
48 | ButtonGroup1Layout->addWidget( mCatShowCheck ); | 51 | layout4->addWidget( mCatShowCheck ); |
49 | 52 | ||
50 | mCatHideCheck = new QRadioButton( ButtonGroup1, "mCatHideCheck" ); | 53 | mCatHideCheck = new QRadioButton( ButtonGroup1, "mCatHideCheck" ); |
51 | ButtonGroup1Layout->addWidget( mCatHideCheck ); | 54 | layout4->addWidget( mCatHideCheck ); |
52 | |||
53 | mCatList = new QListBox( ButtonGroup1, "mCatList" ); | ||
54 | ButtonGroup1Layout->addWidget( mCatList ); | ||
55 | 55 | ||
56 | mCatEditButton = new QPushButton( ButtonGroup1, "mCatEditButton" ); | 56 | mCatEditButton = new QPushButton( ButtonGroup1, "mCatEditButton" ); |
57 | ButtonGroup1Layout->addWidget( mCatEditButton ); | 57 | layout4->addWidget( mCatEditButton ); |
58 | 58 | ||
59 | mCriteriaFrameLayout->addWidget( ButtonGroup1, 0, 0 ); | 59 | ButtonGroup1Layout->addLayout( layout4, 0, 0 ); |
60 | 60 | ||
61 | layout1 = new QHBoxLayout( 0, 0, 0, "layout1"); | 61 | mCatList = new QListBox( ButtonGroup1, "mCatList" ); |
62 | |||
63 | ButtonGroup1Layout->addWidget( mCatList, 1, 0 ); | ||
64 | mCriteriaFrameLayout->addWidget( ButtonGroup1 ); | ||
65 | |||
66 | layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); | ||
62 | 67 | ||
63 | textLabel1 = new QLabel( mCriteriaFrame, "textLabel1" ); | 68 | textLabel1 = new QLabel( mCriteriaFrame, "textLabel1" ); |
64 | layout1->addWidget( textLabel1 ); | 69 | layout7->addWidget( textLabel1 ); |
65 | 70 | ||
66 | mRecurringCheck = new QCheckBox( mCriteriaFrame, "mRecurringCheck" ); | 71 | mRecurringCheck = new QCheckBox( mCriteriaFrame, "mRecurringCheck" ); |
67 | layout1->addWidget( mRecurringCheck ); | 72 | layout7->addWidget( mRecurringCheck ); |
68 | 73 | ||
69 | mCompletedCheck = new QCheckBox( mCriteriaFrame, "mCompletedCheck" ); | 74 | mCompletedCheck = new QCheckBox( mCriteriaFrame, "mCompletedCheck" ); |
70 | layout1->addWidget( mCompletedCheck ); | 75 | layout7->addWidget( mCompletedCheck ); |
76 | mCriteriaFrameLayout->addLayout( layout7 ); | ||
77 | |||
78 | layout9 = new QHBoxLayout( 0, 0, 6, "layout9"); | ||
71 | 79 | ||
72 | mCriteriaFrameLayout->addLayout( layout1, 1, 0 ); | 80 | textLabel1_2 = new QLabel( mCriteriaFrame, "textLabel1_2" ); |
81 | layout9->addWidget( textLabel1_2 ); | ||
82 | |||
83 | mEventCheck = new QCheckBox( mCriteriaFrame, "mEventCheck" ); | ||
84 | layout9->addWidget( mEventCheck ); | ||
85 | |||
86 | mTodoCheck = new QCheckBox( mCriteriaFrame, "mTodoCheck" ); | ||
87 | layout9->addWidget( mTodoCheck ); | ||
88 | |||
89 | mJournalCheck = new QCheckBox( mCriteriaFrame, "mJournalCheck" ); | ||
90 | layout9->addWidget( mJournalCheck ); | ||
91 | mCriteriaFrameLayout->addLayout( layout9 ); | ||
73 | 92 | ||
74 | layout2 = new QHBoxLayout( 0, 0, 0, "layout2"); | 93 | layout2 = new QHBoxLayout( 0, 0, 0, "layout2"); |
75 | 94 | ||
76 | textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" ); | 95 | textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" ); |
77 | layout2->addWidget( textLabel2 ); | 96 | layout2->addWidget( textLabel2 ); |
78 | 97 | ||
79 | mPublicCheck = new QCheckBox( mCriteriaFrame, "mPublicCheck" ); | 98 | mPublicCheck = new QCheckBox( mCriteriaFrame, "mPublicCheck" ); |
80 | layout2->addWidget( mPublicCheck ); | 99 | layout2->addWidget( mPublicCheck ); |
81 | 100 | ||
82 | mPrivateCheck = new QCheckBox( mCriteriaFrame, "mPrivateCheck" ); | 101 | mPrivateCheck = new QCheckBox( mCriteriaFrame, "mPrivateCheck" ); |
83 | layout2->addWidget( mPrivateCheck ); | 102 | layout2->addWidget( mPrivateCheck ); |
84 | 103 | ||
85 | mConfidentialCheck = new QCheckBox( mCriteriaFrame, "mConfidentialCheck" ); | 104 | mConfidentialCheck = new QCheckBox( mCriteriaFrame, "mConfidentialCheck" ); |
86 | mConfidentialCheck->setChecked( FALSE ); | 105 | mConfidentialCheck->setChecked( FALSE ); |
87 | layout2->addWidget( mConfidentialCheck ); | 106 | layout2->addWidget( mConfidentialCheck ); |
88 | 107 | mCriteriaFrameLayout->addLayout( layout2 ); | |
89 | mCriteriaFrameLayout->addLayout( layout2, 2, 0 ); | ||
90 | FilterEdit_baseLayout->addWidget( mCriteriaFrame ); | 108 | FilterEdit_baseLayout->addWidget( mCriteriaFrame ); |
91 | languageChange(); | 109 | languageChange(); |
92 | resize( QSize(284, 241).expandedTo(minimumSizeHint()) ); | 110 | resize( QSize(351, 275).expandedTo(minimumSizeHint()) ); |
93 | clearWState( WState_Polished ); | 111 | clearWState( WState_Polished ); |
94 | } | 112 | } |
95 | 113 | ||
96 | /* | 114 | /* |
97 | * Destroys the object and frees any allocated resources | 115 | * Destroys the object and frees any allocated resources |
98 | */ | 116 | */ |
99 | FilterEdit_base::~FilterEdit_base() | 117 | FilterEdit_base::~FilterEdit_base() |
100 | { | 118 | { |
101 | // no need to delete child widgets, Qt does it all for us | 119 | // no need to delete child widgets, Qt does it all for us |
102 | } | 120 | } |
103 | 121 | ||
104 | /* | 122 | /* |
105 | * Sets the strings of the subwidgets using the current | 123 | * Sets the strings of the subwidgets using the current |
106 | * language. | 124 | * language. |
107 | */ | 125 | */ |
108 | void FilterEdit_base::languageChange() | 126 | void FilterEdit_base::languageChange() |
109 | { | 127 | { |
110 | setCaption( tr( "FilterEditor" ) ); | 128 | setCaption( tr( "FilterEditor" ) ); |
111 | ButtonGroup1->setTitle( tr( "Categories" ) ); | 129 | ButtonGroup1->setTitle( tr( "Categories" ) ); |
112 | mCatShowCheck->setText( tr( "Show only selected" ) ); | 130 | mCatShowCheck->setText( tr( "Include" ) ); |
113 | mCatHideCheck->setText( tr( "Show all but selected" ) ); | 131 | mCatHideCheck->setText( tr( "Exclude" ) ); |
114 | mCatEditButton->setText( tr( "Edit Selection..." ) ); | 132 | mCatEditButton->setText( tr( "Edit Selection..." ) ); |
115 | textLabel1->setText( tr( "Hide" ) ); | 133 | textLabel1->setText( tr( "Exclude" ) ); |
116 | mRecurringCheck->setText( tr( "recurring events" ) ); | 134 | mRecurringCheck->setText( tr( "recurring events" ) ); |
117 | mCompletedCheck->setText( tr( "completed to-dos" ) ); | 135 | mCompletedCheck->setText( tr( "completed to-dos" ) ); |
118 | textLabel2->setText( tr( "Show" ) ); | 136 | textLabel1_2->setText( tr( "Exclude" ) ); |
137 | mEventCheck->setText( tr( "events" ) ); | ||
138 | mTodoCheck->setText( tr( "todos" ) ); | ||
139 | mJournalCheck->setText( tr( "journals" ) ); | ||
140 | textLabel2->setText( tr( "Include" ) ); | ||
119 | mPublicCheck->setText( tr( "public" ) ); | 141 | mPublicCheck->setText( tr( "public" ) ); |
120 | mPrivateCheck->setText( tr( "private" ) ); | 142 | mPrivateCheck->setText( tr( "private" ) ); |
121 | mConfidentialCheck->setText( tr( "confidential" ) ); | 143 | mConfidentialCheck->setText( tr( "confidential" ) ); |
122 | } | 144 | } |
123 | 145 | ||
124 | void FilterEdit_base::updateFilter() | ||
125 | { | ||
126 | qWarning( "FilterEdit_base::updateFilter(): Not implemented yet" ); | ||
127 | } | ||
128 | |||
diff --git a/korganizer/filteredit_base.h b/korganizer/filteredit_base.h index 664598a..0c2988a 100644 --- a/korganizer/filteredit_base.h +++ b/korganizer/filteredit_base.h | |||
@@ -1,66 +1,72 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** Form interface generated from reading ui file 'filteredit_base.ui' | 2 | ** Form interface generated from reading ui file 'filteredit_base.ui' |
3 | ** | 3 | ** |
4 | ** Created: Di Mai 4 15:24:50 2004 | 4 | ** Created: So Jan 16 11:23:21 2005 |
5 | ** by: The User Interface Compiler ($Id$) | 5 | ** by: The User Interface Compiler ($Id$) |
6 | ** | 6 | ** |
7 | ** WARNING! All changes made in this file will be lost! | 7 | ** WARNING! All changes made in this file will be lost! |
8 | ****************************************************************************/ | 8 | ****************************************************************************/ |
9 | 9 | ||
10 | #ifndef FILTEREDIT_BASE_H | 10 | #ifndef FILTEREDIT_BASE_H |
11 | #define FILTEREDIT_BASE_H | 11 | #define FILTEREDIT_BASE_H |
12 | 12 | ||
13 | #include <qvariant.h> | 13 | #include <qvariant.h> |
14 | #include <qwidget.h> | 14 | #include <qwidget.h> |
15 | 15 | ||
16 | class QVBoxLayout; | 16 | class QVBoxLayout; |
17 | class QHBoxLayout; | 17 | class QHBoxLayout; |
18 | class QGridLayout; | 18 | class QGridLayout; |
19 | class QSpacerItem; | 19 | class QSpacerItem; |
20 | class QFrame; | 20 | class QFrame; |
21 | class QButtonGroup; | 21 | class QButtonGroup; |
22 | class QRadioButton; | 22 | class QRadioButton; |
23 | class QPushButton; | ||
23 | class QListBox; | 24 | class QListBox; |
24 | class QListBoxItem; | 25 | class QListBoxItem; |
25 | class QPushButton; | ||
26 | class QLabel; | 26 | class QLabel; |
27 | class QCheckBox; | 27 | class QCheckBox; |
28 | 28 | ||
29 | class FilterEdit_base : public QWidget | 29 | class FilterEdit_base : public QWidget |
30 | { | 30 | { |
31 | Q_OBJECT | 31 | Q_OBJECT |
32 | 32 | ||
33 | public: | 33 | public: |
34 | FilterEdit_base( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 34 | FilterEdit_base( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
35 | ~FilterEdit_base(); | 35 | ~FilterEdit_base(); |
36 | 36 | ||
37 | QFrame* mCriteriaFrame; | 37 | QFrame* mCriteriaFrame; |
38 | QButtonGroup* ButtonGroup1; | 38 | QButtonGroup* ButtonGroup1; |
39 | QRadioButton* mCatShowCheck; | 39 | QRadioButton* mCatShowCheck; |
40 | QRadioButton* mCatHideCheck; | 40 | QRadioButton* mCatHideCheck; |
41 | QListBox* mCatList; | ||
42 | QPushButton* mCatEditButton; | 41 | QPushButton* mCatEditButton; |
42 | QListBox* mCatList; | ||
43 | QLabel* textLabel1; | 43 | QLabel* textLabel1; |
44 | QCheckBox* mRecurringCheck; | 44 | QCheckBox* mRecurringCheck; |
45 | QCheckBox* mCompletedCheck; | 45 | QCheckBox* mCompletedCheck; |
46 | QLabel* textLabel1_2; | ||
47 | QCheckBox* mEventCheck; | ||
48 | QCheckBox* mTodoCheck; | ||
49 | QCheckBox* mJournalCheck; | ||
46 | QLabel* textLabel2; | 50 | QLabel* textLabel2; |
47 | QCheckBox* mPublicCheck; | 51 | QCheckBox* mPublicCheck; |
48 | QCheckBox* mPrivateCheck; | 52 | QCheckBox* mPrivateCheck; |
49 | QCheckBox* mConfidentialCheck; | 53 | QCheckBox* mConfidentialCheck; |
50 | 54 | ||
51 | public slots: | 55 | public slots: |
52 | virtual void updateFilter(); | 56 | virtual void updateFilter(); |
53 | 57 | ||
54 | protected: | 58 | protected: |
55 | QVBoxLayout* FilterEdit_baseLayout; | 59 | QVBoxLayout* FilterEdit_baseLayout; |
56 | QGridLayout* mCriteriaFrameLayout; | 60 | QVBoxLayout* mCriteriaFrameLayout; |
57 | QVBoxLayout* ButtonGroup1Layout; | 61 | QGridLayout* ButtonGroup1Layout; |
58 | QHBoxLayout* layout1; | 62 | QHBoxLayout* layout4; |
63 | QHBoxLayout* layout7; | ||
64 | QHBoxLayout* layout9; | ||
59 | QHBoxLayout* layout2; | 65 | QHBoxLayout* layout2; |
60 | 66 | ||
61 | protected slots: | 67 | protected slots: |
62 | virtual void languageChange(); | 68 | virtual void languageChange(); |
63 | 69 | ||
64 | }; | 70 | }; |
65 | 71 | ||
66 | #endif // FILTEREDIT_BASE_H | 72 | #endif // FILTEREDIT_BASE_H |
diff --git a/korganizer/filteredit_base.ui b/korganizer/filteredit_base.ui index b7cbb59..2436f57 100644 --- a/korganizer/filteredit_base.ui +++ b/korganizer/filteredit_base.ui | |||
@@ -1,201 +1,250 @@ | |||
1 | <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> | 1 | <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> |
2 | <class>FilterEdit_base</class> | 2 | <class>FilterEdit_base</class> |
3 | <widget class="QWidget"> | 3 | <widget class="QWidget"> |
4 | <property name="name"> | 4 | <property name="name"> |
5 | <cstring>FilterEdit_base</cstring> | 5 | <cstring>FilterEdit_base</cstring> |
6 | </property> | 6 | </property> |
7 | <property name="geometry"> | 7 | <property name="geometry"> |
8 | <rect> | 8 | <rect> |
9 | <x>0</x> | 9 | <x>0</x> |
10 | <y>0</y> | 10 | <y>0</y> |
11 | <width>284</width> | 11 | <width>351</width> |
12 | <height>241</height> | 12 | <height>275</height> |
13 | </rect> | 13 | </rect> |
14 | </property> | 14 | </property> |
15 | <property name="caption"> | 15 | <property name="caption"> |
16 | <string>FilterEditor</string> | 16 | <string>FilterEditor</string> |
17 | </property> | 17 | </property> |
18 | <property name="layoutMargin" stdset="0"> | 18 | <property name="layoutMargin" stdset="0"> |
19 | </property> | 19 | </property> |
20 | <property name="layoutSpacing" stdset="0"> | 20 | <property name="layoutSpacing" stdset="0"> |
21 | </property> | 21 | </property> |
22 | <vbox> | 22 | <vbox> |
23 | <property name="name"> | 23 | <property name="name"> |
24 | <cstring>unnamed</cstring> | 24 | <cstring>unnamed</cstring> |
25 | </property> | 25 | </property> |
26 | <property name="margin"> | 26 | <property name="margin"> |
27 | <number>0</number> | 27 | <number>0</number> |
28 | </property> | 28 | </property> |
29 | <property name="spacing"> | 29 | <property name="spacing"> |
30 | <number>0</number> | 30 | <number>0</number> |
31 | </property> | 31 | </property> |
32 | <widget class="QFrame"> | 32 | <widget class="QFrame"> |
33 | <property name="name"> | 33 | <property name="name"> |
34 | <cstring>mCriteriaFrame</cstring> | 34 | <cstring>mCriteriaFrame</cstring> |
35 | </property> | 35 | </property> |
36 | <property name="frameShape"> | 36 | <property name="frameShape"> |
37 | <enum>StyledPanel</enum> | 37 | <enum>StyledPanel</enum> |
38 | </property> | 38 | </property> |
39 | <property name="frameShadow"> | 39 | <property name="frameShadow"> |
40 | <enum>Raised</enum> | 40 | <enum>Raised</enum> |
41 | </property> | 41 | </property> |
42 | <property name="layoutMargin" stdset="0"> | 42 | <property name="layoutMargin" stdset="0"> |
43 | </property> | 43 | </property> |
44 | <grid> | 44 | <vbox> |
45 | <property name="name"> | 45 | <property name="name"> |
46 | <cstring>unnamed</cstring> | 46 | <cstring>unnamed</cstring> |
47 | </property> | 47 | </property> |
48 | <property name="margin"> | 48 | <property name="margin"> |
49 | <number>3</number> | 49 | <number>3</number> |
50 | </property> | 50 | </property> |
51 | <property name="spacing"> | 51 | <property name="spacing"> |
52 | <number>2</number> | 52 | <number>2</number> |
53 | </property> | 53 | </property> |
54 | <widget class="QButtonGroup" row="0" column="0"> | 54 | <widget class="QButtonGroup"> |
55 | <property name="name"> | 55 | <property name="name"> |
56 | <cstring>ButtonGroup1</cstring> | 56 | <cstring>ButtonGroup1</cstring> |
57 | </property> | 57 | </property> |
58 | <property name="title"> | 58 | <property name="title"> |
59 | <string>Categories</string> | 59 | <string>Categories</string> |
60 | </property> | 60 | </property> |
61 | <vbox> | 61 | <grid> |
62 | <property name="name"> | 62 | <property name="name"> |
63 | <cstring>unnamed</cstring> | 63 | <cstring>unnamed</cstring> |
64 | </property> | 64 | </property> |
65 | <property name="margin"> | 65 | <property name="margin"> |
66 | <number>11</number> | 66 | <number>6</number> |
67 | </property> | 67 | </property> |
68 | <property name="spacing"> | 68 | <property name="spacing"> |
69 | <number>6</number> | 69 | <number>6</number> |
70 | </property> | 70 | </property> |
71 | <widget class="QRadioButton"> | 71 | <widget class="QLayoutWidget" row="0" column="0"> |
72 | <property name="name"> | 72 | <property name="name"> |
73 | <cstring>mCatShowCheck</cstring> | 73 | <cstring>layout4</cstring> |
74 | </property> | 74 | </property> |
75 | <property name="text"> | 75 | <hbox> |
76 | <string>Show only selected</string> | 76 | <property name="name"> |
77 | <cstring>unnamed</cstring> | ||
78 | </property> | ||
79 | <widget class="QRadioButton"> | ||
80 | <property name="name"> | ||
81 | <cstring>mCatShowCheck</cstring> | ||
82 | </property> | ||
83 | <property name="text"> | ||
84 | <string>Include</string> | ||
85 | </property> | ||
86 | </widget> | ||
87 | <widget class="QRadioButton"> | ||
88 | <property name="name"> | ||
89 | <cstring>mCatHideCheck</cstring> | ||
90 | </property> | ||
91 | <property name="text"> | ||
92 | <string>Exclude</string> | ||
93 | </property> | ||
94 | </widget> | ||
95 | <widget class="QPushButton"> | ||
96 | <property name="name"> | ||
97 | <cstring>mCatEditButton</cstring> | ||
98 | </property> | ||
99 | <property name="text"> | ||
100 | <string>Edit Selection...</string> | ||
101 | </property> | ||
102 | </widget> | ||
103 | </hbox> | ||
104 | </widget> | ||
105 | <widget class="QListBox" row="1" column="0"> | ||
106 | <property name="name"> | ||
107 | <cstring>mCatList</cstring> | ||
77 | </property> | 108 | </property> |
78 | </widget> | 109 | </widget> |
79 | <widget class="QRadioButton"> | 110 | </grid> |
111 | </widget> | ||
112 | <widget class="QLayoutWidget"> | ||
113 | <property name="name"> | ||
114 | <cstring>layout7</cstring> | ||
115 | </property> | ||
116 | <hbox> | ||
117 | <property name="name"> | ||
118 | <cstring>unnamed</cstring> | ||
119 | </property> | ||
120 | <widget class="QLabel"> | ||
80 | <property name="name"> | 121 | <property name="name"> |
81 | <cstring>mCatHideCheck</cstring> | 122 | <cstring>textLabel1</cstring> |
82 | </property> | 123 | </property> |
83 | <property name="text"> | 124 | <property name="text"> |
84 | <string>Show all but selected</string> | 125 | <string>Exclude</string> |
85 | </property> | 126 | </property> |
86 | </widget> | 127 | </widget> |
87 | <widget class="QListBox"> | 128 | <widget class="QCheckBox"> |
88 | <property name="name"> | 129 | <property name="name"> |
89 | <cstring>mCatList</cstring> | 130 | <cstring>mRecurringCheck</cstring> |
131 | </property> | ||
132 | <property name="text"> | ||
133 | <string>recurring events</string> | ||
90 | </property> | 134 | </property> |
91 | </widget> | 135 | </widget> |
92 | <widget class="QPushButton"> | 136 | <widget class="QCheckBox"> |
93 | <property name="name"> | 137 | <property name="name"> |
94 | <cstring>mCatEditButton</cstring> | 138 | <cstring>mCompletedCheck</cstring> |
95 | </property> | 139 | </property> |
96 | <property name="text"> | 140 | <property name="text"> |
97 | <string>Edit Selection...</string> | 141 | <string>completed to-dos</string> |
98 | </property> | 142 | </property> |
99 | </widget> | 143 | </widget> |
100 | </vbox> | 144 | </hbox> |
101 | </widget> | 145 | </widget> |
102 | <widget class="QLayoutWidget" row="1" column="0"> | 146 | <widget class="QLayoutWidget"> |
103 | <property name="name"> | 147 | <property name="name"> |
104 | <cstring>layout1</cstring> | 148 | <cstring>layout9</cstring> |
105 | </property> | 149 | </property> |
106 | <hbox> | 150 | <hbox> |
107 | <property name="name"> | 151 | <property name="name"> |
108 | <cstring>unnamed</cstring> | 152 | <cstring>unnamed</cstring> |
109 | </property> | 153 | </property> |
110 | <property name="margin"> | ||
111 | <number>0</number> | ||
112 | </property> | ||
113 | <property name="spacing"> | ||
114 | <number>0</number> | ||
115 | </property> | ||
116 | <widget class="QLabel"> | 154 | <widget class="QLabel"> |
117 | <property name="name"> | 155 | <property name="name"> |
118 | <cstring>textLabel1</cstring> | 156 | <cstring>textLabel1_2</cstring> |
119 | </property> | 157 | </property> |
120 | <property name="text"> | 158 | <property name="text"> |
121 | <string>Hide</string> | 159 | <string>Exclude</string> |
122 | </property> | 160 | </property> |
123 | </widget> | 161 | </widget> |
124 | <widget class="QCheckBox"> | 162 | <widget class="QCheckBox"> |
125 | <property name="name"> | 163 | <property name="name"> |
126 | <cstring>mRecurringCheck</cstring> | 164 | <cstring>mEventCheck</cstring> |
127 | </property> | 165 | </property> |
128 | <property name="text"> | 166 | <property name="text"> |
129 | <string>recurring events</string> | 167 | <string>events</string> |
130 | </property> | 168 | </property> |
131 | </widget> | 169 | </widget> |
132 | <widget class="QCheckBox"> | 170 | <widget class="QCheckBox"> |
133 | <property name="name"> | 171 | <property name="name"> |
134 | <cstring>mCompletedCheck</cstring> | 172 | <cstring>mTodoCheck</cstring> |
135 | </property> | 173 | </property> |
136 | <property name="text"> | 174 | <property name="text"> |
137 | <string>completed to-dos</string> | 175 | <string>todos</string> |
176 | </property> | ||
177 | </widget> | ||
178 | <widget class="QCheckBox"> | ||
179 | <property name="name"> | ||
180 | <cstring>mJournalCheck</cstring> | ||
181 | </property> | ||
182 | <property name="text"> | ||
183 | <string>journals</string> | ||
138 | </property> | 184 | </property> |
139 | </widget> | 185 | </widget> |
140 | </hbox> | 186 | </hbox> |
141 | </widget> | 187 | </widget> |
142 | <widget class="QLayoutWidget" row="2" column="0"> | 188 | <widget class="QLayoutWidget"> |
143 | <property name="name"> | 189 | <property name="name"> |
144 | <cstring>layout2</cstring> | 190 | <cstring>layout2</cstring> |
145 | </property> | 191 | </property> |
146 | <hbox> | 192 | <hbox> |
147 | <property name="name"> | 193 | <property name="name"> |
148 | <cstring>unnamed</cstring> | 194 | <cstring>unnamed</cstring> |
149 | </property> | 195 | </property> |
150 | <property name="margin"> | 196 | <property name="margin"> |
151 | <number>0</number> | 197 | <number>0</number> |
152 | </property> | 198 | </property> |
153 | <property name="spacing"> | 199 | <property name="spacing"> |
154 | <number>0</number> | 200 | <number>0</number> |
155 | </property> | 201 | </property> |
156 | <widget class="QLabel"> | 202 | <widget class="QLabel"> |
157 | <property name="name"> | 203 | <property name="name"> |
158 | <cstring>textLabel2</cstring> | 204 | <cstring>textLabel2</cstring> |
159 | </property> | 205 | </property> |
160 | <property name="text"> | 206 | <property name="text"> |
161 | <string>Show</string> | 207 | <string>Include</string> |
162 | </property> | 208 | </property> |
163 | </widget> | 209 | </widget> |
164 | <widget class="QCheckBox"> | 210 | <widget class="QCheckBox"> |
165 | <property name="name"> | 211 | <property name="name"> |
166 | <cstring>mPublicCheck</cstring> | 212 | <cstring>mPublicCheck</cstring> |
167 | </property> | 213 | </property> |
168 | <property name="text"> | 214 | <property name="text"> |
169 | <string>public</string> | 215 | <string>public</string> |
170 | </property> | 216 | </property> |
171 | </widget> | 217 | </widget> |
172 | <widget class="QCheckBox"> | 218 | <widget class="QCheckBox"> |
173 | <property name="name"> | 219 | <property name="name"> |
174 | <cstring>mPrivateCheck</cstring> | 220 | <cstring>mPrivateCheck</cstring> |
175 | </property> | 221 | </property> |
176 | <property name="text"> | 222 | <property name="text"> |
177 | <string>private</string> | 223 | <string>private</string> |
178 | </property> | 224 | </property> |
179 | </widget> | 225 | </widget> |
180 | <widget class="QCheckBox"> | 226 | <widget class="QCheckBox"> |
181 | <property name="name"> | 227 | <property name="name"> |
182 | <cstring>mConfidentialCheck</cstring> | 228 | <cstring>mConfidentialCheck</cstring> |
183 | </property> | 229 | </property> |
184 | <property name="text"> | 230 | <property name="text"> |
185 | <string>confidential</string> | 231 | <string>confidential</string> |
186 | </property> | 232 | </property> |
187 | <property name="checked"> | 233 | <property name="checked"> |
188 | <bool>false</bool> | 234 | <bool>false</bool> |
189 | </property> | 235 | </property> |
190 | </widget> | 236 | </widget> |
191 | </hbox> | 237 | </hbox> |
192 | </widget> | 238 | </widget> |
193 | </grid> | 239 | </vbox> |
194 | </widget> | 240 | </widget> |
195 | </vbox> | 241 | </vbox> |
196 | </widget> | 242 | </widget> |
243 | <includes> | ||
244 | <include location="local" impldecl="in implementation">filteredit_base.ui.h</include> | ||
245 | </includes> | ||
197 | <slots> | 246 | <slots> |
198 | <slot>updateFilter()</slot> | 247 | <slot>updateFilter()</slot> |
199 | </slots> | 248 | </slots> |
200 | <layoutdefaults spacing="6" margin="11"/> | 249 | <layoutdefaults spacing="6" margin="11"/> |
201 | </UI> | 250 | </UI> |
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro index 2816c6e..628d84e 100644 --- a/korganizer/korganizer.pro +++ b/korganizer/korganizer.pro | |||
@@ -1,193 +1,193 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on | 2 | CONFIG = qt warn_on |
3 | TARGET = kopi | 3 | TARGET = kopi |
4 | OBJECTS_DIR = _obj/ | 4 | OBJECTS_DIR = _obj/ |
5 | MOC_DIR = _moc | 5 | MOC_DIR = _moc |
6 | DESTDIR= ../bin | 6 | DESTDIR= ../bin |
7 | 7 | ||
8 | include( ../variables.pri ) | 8 | include( ../variables.pri ) |
9 | 9 | ||
10 | INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim | 10 | INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim |
11 | #../qtcompat | 11 | #../qtcompat |
12 | DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL | 12 | DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL |
13 | DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER | 13 | DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER |
14 | #KORG_NOPRINTER KORG_NOKABC | 14 | #KORG_NOPRINTER KORG_NOKABC |
15 | DEFINES += KORG_NOLVALTERNATION | 15 | DEFINES += KORG_NOLVALTERNATION |
16 | DEFINES += DESKTOP_VERSION | 16 | DEFINES += DESKTOP_VERSION |
17 | unix : { | 17 | unix : { |
18 | LIBS += ../bin/libmicrokdepim.so | 18 | LIBS += ../bin/libmicrokdepim.so |
19 | LIBS += ../bin/libmicrokcal.so | 19 | LIBS += ../bin/libmicrokcal.so |
20 | LIBS += ../bin/libmicrokde.so | 20 | LIBS += ../bin/libmicrokde.so |
21 | LIBS += ../bin/libmicrokabc.so | 21 | LIBS += ../bin/libmicrokabc.so |
22 | #LIBS += -lbluetooth | 22 | #LIBS += -lbluetooth |
23 | #LIBS += -lsdp | 23 | #LIBS += -lsdp |
24 | 24 | ||
25 | #LIBS += -lldap | 25 | #LIBS += -lldap |
26 | OBJECTS_DIR = obj/unix | 26 | OBJECTS_DIR = obj/unix |
27 | MOC_DIR = moc/unix | 27 | MOC_DIR = moc/unix |
28 | } | 28 | } |
29 | win32: { | 29 | win32: { |
30 | RC_FILE = winicons.rc | 30 | RC_FILE = winicons.rc |
31 | DEFINES += _WIN32_ | 31 | DEFINES += _WIN32_ |
32 | LIBS += ../bin/microkdepim.lib | 32 | LIBS += ../bin/microkdepim.lib |
33 | LIBS += ../bin/microkcal.lib | 33 | LIBS += ../bin/microkcal.lib |
34 | LIBS += ../bin/microkde.lib | 34 | LIBS += ../bin/microkde.lib |
35 | LIBS += ../bin/microkabc.lib | 35 | LIBS += ../bin/microkabc.lib |
36 | LIBS += ../libical/lib/ical.lib | 36 | LIBS += ../libical/lib/ical.lib |
37 | LIBS += ../libical/lib/icalss.lib | 37 | LIBS += ../libical/lib/icalss.lib |
38 | #LIBS += atls.lib | 38 | #LIBS += atls.lib |
39 | LIBS += mfc71u.lib | 39 | LIBS += mfc71u.lib |
40 | QMAKE_LINK += /NODEFAULTLIB:LIBC | 40 | QMAKE_LINK += /NODEFAULTLIB:LIBC |
41 | #QMAKE_LINK += /NODEFAULTLIB:MSVCRT | 41 | #QMAKE_LINK += /NODEFAULTLIB:MSVCRT |
42 | #QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib | 42 | #QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib |
43 | OBJECTS_DIR = obj/win | 43 | OBJECTS_DIR = obj/win |
44 | MOC_DIR = moc/win | 44 | MOC_DIR = moc/win |
45 | } | 45 | } |
46 | 46 | ||
47 | 47 | ||
48 | INTERFACES = kofilterview_base.ui | 48 | INTERFACES = kofilterview_base.ui |
49 | # filteredit_base.ui | 49 | # filteredit_base.ui |
50 | 50 | ||
51 | # kdateedit.h \ | 51 | # kdateedit.h \ |
52 | 52 | ||
53 | HEADERS = \ | 53 | HEADERS = \ |
54 | filteredit_base.h \ | 54 | filteredit_base.h \ |
55 | alarmclient.h \ | 55 | alarmclient.h \ |
56 | calendarview.h \ | 56 | calendarview.h \ |
57 | customlistviewitem.h \ | 57 | customlistviewitem.h \ |
58 | datenavigator.h \ | 58 | datenavigator.h \ |
59 | docprefs.h \ | 59 | docprefs.h \ |
60 | filtereditdialog.h \ | 60 | filtereditdialog.h \ |
61 | incomingdialog.h \ | 61 | incomingdialog.h \ |
62 | incomingdialog_base.h \ | 62 | incomingdialog_base.h \ |
63 | interfaces/korganizer/baseview.h \ | 63 | interfaces/korganizer/baseview.h \ |
64 | interfaces/korganizer/calendarviewbase.h \ | 64 | interfaces/korganizer/calendarviewbase.h \ |
65 | journalentry.h \ | 65 | journalentry.h \ |
66 | kdatenavigator.h \ | 66 | kdatenavigator.h \ |
67 | koagenda.h \ | 67 | koagenda.h \ |
68 | koagendaitem.h \ | 68 | koagendaitem.h \ |
69 | koagendaview.h \ | 69 | koagendaview.h \ |
70 | kocounterdialog.h \ | 70 | kocounterdialog.h \ |
71 | kodaymatrix.h \ | 71 | kodaymatrix.h \ |
72 | kodialogmanager.h \ | 72 | kodialogmanager.h \ |
73 | koeditordetails.h \ | 73 | koeditordetails.h \ |
74 | koeditorgeneral.h \ | 74 | koeditorgeneral.h \ |
75 | koeditorgeneralevent.h \ | 75 | koeditorgeneralevent.h \ |
76 | koeditorgeneraltodo.h \ | 76 | koeditorgeneraltodo.h \ |
77 | koeditorrecurrence.h \ | 77 | koeditorrecurrence.h \ |
78 | koeventeditor.h \ | 78 | koeventeditor.h \ |
79 | koeventpopupmenu.h \ | 79 | koeventpopupmenu.h \ |
80 | koeventview.h \ | 80 | koeventview.h \ |
81 | koeventviewer.h \ | 81 | koeventviewer.h \ |
82 | koeventviewerdialog.h \ | 82 | koeventviewerdialog.h \ |
83 | kofilterview.h \ | 83 | kofilterview.h \ |
84 | koglobals.h \ | 84 | koglobals.h \ |
85 | koincidenceeditor.h \ | 85 | koincidenceeditor.h \ |
86 | kojournalview.h \ | 86 | kojournalview.h \ |
87 | kolistview.h \ | 87 | kolistview.h \ |
88 | kolocationbox.h \ | 88 | kolocationbox.h \ |
89 | komonthview.h \ | 89 | komonthview.h \ |
90 | koprefs.h \ | 90 | koprefs.h \ |
91 | koprefsdialog.h \ | 91 | koprefsdialog.h \ |
92 | kotimespanview.h \ | 92 | kotimespanview.h \ |
93 | kotodoeditor.h \ | 93 | kotodoeditor.h \ |
94 | kotodoview.h \ | 94 | kotodoview.h \ |
95 | kotodoviewitem.h \ | 95 | kotodoviewitem.h \ |
96 | koviewmanager.h \ | 96 | koviewmanager.h \ |
97 | kowhatsnextview.h \ | 97 | kowhatsnextview.h \ |
98 | ktimeedit.h \ | 98 | ktimeedit.h \ |
99 | lineview.h \ | 99 | lineview.h \ |
100 | mainwindow.h \ | 100 | mainwindow.h \ |
101 | navigatorbar.h \ | 101 | navigatorbar.h \ |
102 | outgoingdialog.h \ | 102 | outgoingdialog.h \ |
103 | outgoingdialog_base.h \ | 103 | outgoingdialog_base.h \ |
104 | publishdialog.h \ | 104 | publishdialog.h \ |
105 | publishdialog_base.h \ | 105 | publishdialog_base.h \ |
106 | savetemplatedialog.h \ | 106 | savetemplatedialog.h \ |
107 | searchdialog.h \ | 107 | searchdialog.h \ |
108 | simplealarmclient.h \ | 108 | simplealarmclient.h \ |
109 | statusdialog.h \ | 109 | statusdialog.h \ |
110 | timeline.h \ | 110 | timeline.h \ |
111 | timespanview.h \ | 111 | timespanview.h \ |
112 | version.h \ | 112 | version.h \ |
113 | ../kalarmd/alarmdialog.h \ | 113 | ../kalarmd/alarmdialog.h \ |
114 | 114 | ||
115 | 115 | ||
116 | SOURCES = \ | 116 | SOURCES = \ |
117 | filteredit_base.cpp \ | 117 | filteredit_base.cpp \ |
118 | calendarview.cpp \ | 118 | calendarview.cpp \ |
119 | datenavigator.cpp \ | 119 | datenavigator.cpp \ |
120 | docprefs.cpp \ | 120 | docprefs.cpp \ |
121 | filtereditdialog.cpp \ | 121 | filtereditdialog.cpp \ |
122 | incomingdialog.cpp \ | 122 | incomingdialog.cpp \ |
123 | incomingdialog_base.cpp \ | 123 | incomingdialog_base.cpp \ |
124 | journalentry.cpp \ | 124 | journalentry.cpp \ |
125 | kdatenavigator.cpp \ | 125 | kdatenavigator.cpp \ |
126 | koagenda.cpp \ | 126 | koagenda.cpp \ |
127 | koagendaitem.cpp \ | 127 | koagendaitem.cpp \ |
128 | koagendaview.cpp \ | 128 | koagendaview.cpp \ |
129 | kocounterdialog.cpp \ | 129 | kocounterdialog.cpp \ |
130 | kodaymatrix.cpp \ | 130 | kodaymatrix.cpp \ |
131 | kodialogmanager.cpp \ | 131 | kodialogmanager.cpp \ |
132 | koeditordetails.cpp \ | 132 | koeditordetails.cpp \ |
133 | koeditorgeneral.cpp \ | 133 | koeditorgeneral.cpp \ |
134 | koeditorgeneralevent.cpp \ | 134 | koeditorgeneralevent.cpp \ |
135 | koeditorgeneraltodo.cpp \ | 135 | koeditorgeneraltodo.cpp \ |
136 | koeditorrecurrence.cpp \ | 136 | koeditorrecurrence.cpp \ |
137 | koeventeditor.cpp \ | 137 | koeventeditor.cpp \ |
138 | koeventpopupmenu.cpp \ | 138 | koeventpopupmenu.cpp \ |
139 | koeventview.cpp \ | 139 | koeventview.cpp \ |
140 | koeventviewer.cpp \ | 140 | koeventviewer.cpp \ |
141 | koeventviewerdialog.cpp \ | 141 | koeventviewerdialog.cpp \ |
142 | kofilterview.cpp \ | 142 | kofilterview.cpp \ |
143 | koglobals.cpp \ | 143 | koglobals.cpp \ |
144 | koincidenceeditor.cpp \ | 144 | koincidenceeditor.cpp \ |
145 | kojournalview.cpp \ | 145 | kojournalview.cpp \ |
146 | kolistview.cpp \ | 146 | kolistview.cpp \ |
147 | kolocationbox.cpp \ | 147 | kolocationbox.cpp \ |
148 | komonthview.cpp \ | 148 | komonthview.cpp \ |
149 | koprefs.cpp \ | 149 | koprefs.cpp \ |
150 | koprefsdialog.cpp \ | 150 | koprefsdialog.cpp \ |
151 | kotimespanview.cpp \ | 151 | kotimespanview.cpp \ |
152 | kotodoeditor.cpp \ | 152 | kotodoeditor.cpp \ |
153 | kotodoview.cpp \ | 153 | kotodoview.cpp \ |
154 | kotodoviewitem.cpp \ | 154 | kotodoviewitem.cpp \ |
155 | koviewmanager.cpp \ | 155 | koviewmanager.cpp \ |
156 | kowhatsnextview.cpp \ | 156 | kowhatsnextview.cpp \ |
157 | ktimeedit.cpp \ | 157 | ktimeedit.cpp \ |
158 | lineview.cpp \ | 158 | lineview.cpp \ |
159 | main.cpp \ | 159 | main.cpp \ |
160 | mainwindow.cpp \ | 160 | mainwindow.cpp \ |
161 | navigatorbar.cpp \ | 161 | navigatorbar.cpp \ |
162 | outgoingdialog.cpp \ | 162 | outgoingdialog.cpp \ |
163 | outgoingdialog_base.cpp \ | 163 | outgoingdialog_base.cpp \ |
164 | publishdialog.cpp \ | 164 | publishdialog.cpp \ |
165 | publishdialog_base.cpp \ | 165 | publishdialog_base.cpp \ |
166 | savetemplatedialog.cpp \ | 166 | savetemplatedialog.cpp \ |
167 | searchdialog.cpp \ | 167 | searchdialog.cpp \ |
168 | simplealarmclient.cpp \ | 168 | simplealarmclient.cpp \ |
169 | statusdialog.cpp \ | 169 | statusdialog.cpp \ |
170 | timeline.cpp \ | 170 | timeline.cpp \ |
171 | timespanview.cpp \ | 171 | timespanview.cpp \ |
172 | ../kalarmd/alarmdialog.cpp | 172 | ../kalarmd/alarmdialog.cpp |
173 | 173 | ||
174 | HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h | 174 | HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h |
175 | INTERFACES += calprintdayconfig_base.ui \ | 175 | INTERFACES += calprintdayconfig_base.ui \ |
176 | calprintmonthconfig_base.ui \ | 176 | calprintmonthconfig_base.ui \ |
177 | calprinttodoconfig_base.ui \ | 177 | calprinttodoconfig_base.ui \ |
178 | calprintweekconfig_base.ui | 178 | calprintweekconfig_base.ui |
179 | SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp | 179 | SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp |
180 | 180 | ||
181 | 181 | ||
182 | 182 | ||
183 | win32: { | 183 | win32: { |
184 | HEADERS += ../outport/msoutl9.h \ | 184 | HEADERS += ../outport/msoutl9.h \ |
185 | koimportoldialog.h | 185 | koimportoldialog.h |
186 | 186 | ||
187 | 187 | ||
188 | SOURCES += ../outport/msoutl9.cpp \ | 188 | SOURCES += ../outport/msoutl9.cpp \ |
189 | koimportoldialog.cpp | 189 | koimportoldialog.cpp |
190 | 190 | ||
191 | 191 | ||
192 | } | 192 | } |
193 | 193 | ||