-rw-r--r-- | korganizer/calendarview.cpp | 76 | ||||
-rw-r--r-- | korganizer/calendarview.h | 5 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 27 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 3 | ||||
-rw-r--r-- | libkcal/calendar.h | 2 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 14 | ||||
-rw-r--r-- | libkcal/calendarlocal.h | 2 |
8 files changed, 87 insertions, 43 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index cfc6b10..9160e1d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -841,88 +841,114 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b | |||
841 | break; | 841 | break; |
842 | 842 | ||
843 | default: | 843 | default: |
844 | // SYNC_PREF_TAKE_BOTH not implemented | 844 | // SYNC_PREF_TAKE_BOTH not implemented |
845 | break; | 845 | break; |
846 | } | 846 | } |
847 | return 0; | 847 | return 0; |
848 | } | 848 | } |
849 | Event* CalendarView::getLastSyncEvent() | 849 | Event* CalendarView::getLastSyncEvent() |
850 | { | 850 | { |
851 | Event* lse; | 851 | Event* lse; |
852 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); | 852 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); |
853 | lse = mCalendar->event( "last-syncEvent-device-"+mCurrentSyncDevice ); | 853 | lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); |
854 | if (!lse) { | 854 | if (!lse) { |
855 | lse = new Event(); | 855 | lse = new Event(); |
856 | lse->setUid( "last-syncEvent-device-"+mCurrentSyncDevice ); | 856 | lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); |
857 | lse->setSummary(mCurrentSyncDevice + i18n(" - sync event")); | 857 | QString sum = ""; |
858 | if ( KOPrefs::instance()->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) | ||
859 | sum = "E: "; | ||
860 | lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); | ||
858 | lse->setDtStart( mLastCalendarSync ); | 861 | lse->setDtStart( mLastCalendarSync ); |
859 | lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); | 862 | lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); |
860 | lse->setCategories( i18n("SyncEvent") ); | 863 | lse->setCategories( i18n("SyncEvent") ); |
861 | lse->setReadOnly( true ); | 864 | lse->setReadOnly( true ); |
862 | mCalendar->addEvent( lse ); | 865 | mCalendar->addEvent( lse ); |
863 | } | 866 | } |
864 | 867 | ||
865 | return lse; | 868 | return lse; |
866 | 869 | ||
867 | } | 870 | } |
868 | void CalendarView::checkSharpEvent( Event* lastSync, Incidence* toDelete ) | 871 | void CalendarView::setupExternSyncProfiles() |
869 | { | 872 | { |
870 | if ( ! lastSync ) | 873 | Event* lse; |
871 | return; | 874 | mExternLastSyncEvent.clear(); |
872 | if ( toDelete->zaurusId() < 0 ) | 875 | int i; |
876 | for ( i = 0; i < KOPrefs::instance()->mExternSyncProfiles.count(); ++i ) { | ||
877 | lse = mCalendar->event( "last-syncEvent-"+ KOPrefs::instance()->mExternSyncProfiles[i] ); | ||
878 | if ( lse ) | ||
879 | mExternLastSyncEvent.append( lse ); | ||
880 | else | ||
881 | qDebug("Last Sync event not found for %s ", KOPrefs::instance()->mExternSyncProfiles[i].latin1()); | ||
882 | } | ||
883 | |||
884 | } | ||
885 | // we check, if the to delete event has a id for a profile | ||
886 | // if yes, we set this id in the profile to delete | ||
887 | void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) | ||
888 | { | ||
889 | if ( ! lastSync.count() == 0 ) | ||
873 | return; | 890 | return; |
874 | if ( toDelete->type() == "Journal" ) | 891 | if ( toDelete->type() == "Journal" ) |
875 | return; | 892 | return; |
876 | QString des = lastSync->description(); | 893 | |
877 | QString pref = "e"; | 894 | Event* eve = lastSync.first(); |
878 | if ( toDelete->type() == "Todo" ) | 895 | |
879 | pref = "t"; | 896 | while ( eve ) { |
880 | des += pref+ QString::number ( toDelete->zaurusId() ) + ","; | 897 | int id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name |
881 | lastSync->setReadOnly( false ); | 898 | if ( id >= 0 ) { |
882 | lastSync->setDescription( des ); | 899 | QString des = eve->description(); |
883 | lastSync->setReadOnly( true ); | 900 | QString pref = "e"; |
901 | if ( toDelete->type() == "Todo" ) | ||
902 | pref = "t"; | ||
903 | des += pref+ QString::number ( id ) + ","; | ||
904 | eve->setReadOnly( false ); | ||
905 | eve->setDescription( des ); | ||
906 | eve->setReadOnly( true ); | ||
907 | } | ||
908 | eve = lastSync.next(); | ||
909 | } | ||
884 | 910 | ||
885 | } | 911 | } |
886 | bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) | 912 | bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) |
887 | { | 913 | { |
888 | bool syncOK = true; | 914 | bool syncOK = true; |
889 | int addedEvent = 0; | 915 | int addedEvent = 0; |
890 | int addedEventR = 0; | 916 | int addedEventR = 0; |
891 | int deletedEventR = 0; | 917 | int deletedEventR = 0; |
892 | int deletedEventL = 0; | 918 | int deletedEventL = 0; |
893 | int changedLocal = 0; | 919 | int changedLocal = 0; |
894 | int changedRemote = 0; | 920 | int changedRemote = 0; |
895 | //QPtrList<Event> el = local->rawEvents(); | 921 | //QPtrList<Event> el = local->rawEvents(); |
896 | Event* eventR; | 922 | Event* eventR; |
897 | QString uid; | 923 | QString uid; |
898 | int take; | 924 | int take; |
899 | Event* eventL; | 925 | Event* eventL; |
900 | Event* eventRSync; | 926 | Event* eventRSync; |
901 | Event* eventLSync; | 927 | Event* eventLSync; |
902 | Event* eventRSyncSharp = remote->event( "last-syncEvent-device-Sharp-DTM"); | 928 | QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); |
903 | Event* eventLSyncSharp = local->event( "last-syncEvent-device-Sharp-DTM"); | 929 | QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); |
904 | bool fullDateRange = false; | 930 | bool fullDateRange = false; |
905 | mLastCalendarSync = QDateTime::currentDateTime(); | 931 | mLastCalendarSync = QDateTime::currentDateTime(); |
906 | QDateTime modifiedCalendar = mLastCalendarSync;; | 932 | QDateTime modifiedCalendar = mLastCalendarSync;; |
907 | eventR = remote->event("last-syncEvent-device-"+mCurrentSyncName ); | 933 | eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); |
908 | if ( eventR ) { | 934 | if ( eventR ) { |
909 | eventRSync = (Event*) eventR->clone(); | 935 | eventRSync = (Event*) eventR->clone(); |
910 | remote->deleteEvent(eventR ); | 936 | remote->deleteEvent(eventR ); |
911 | 937 | ||
912 | } else { | 938 | } else { |
913 | fullDateRange = true; | 939 | fullDateRange = true; |
914 | eventRSync = new Event(); | 940 | eventRSync = new Event(); |
915 | eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); | 941 | eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); |
916 | eventRSync->setUid("last-syncEvent-device-"+mCurrentSyncName ); | 942 | eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); |
917 | eventRSync->setDtStart( mLastCalendarSync ); | 943 | eventRSync->setDtStart( mLastCalendarSync ); |
918 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); | 944 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); |
919 | eventRSync->setCategories( i18n("SyncEvent") ); | 945 | eventRSync->setCategories( i18n("SyncEvent") ); |
920 | } | 946 | } |
921 | eventLSync = getLastSyncEvent(); | 947 | eventLSync = getLastSyncEvent(); |
922 | if ( eventLSync->dtStart() == mLastCalendarSync ) | 948 | if ( eventLSync->dtStart() == mLastCalendarSync ) |
923 | fullDateRange = true; | 949 | fullDateRange = true; |
924 | 950 | ||
925 | if ( ! fullDateRange ) { | 951 | if ( ! fullDateRange ) { |
926 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { | 952 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { |
927 | 953 | ||
928 | // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); | 954 | // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); |
@@ -956,25 +982,25 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
956 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 982 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
957 | bar.show(); | 983 | bar.show(); |
958 | int modulo = (er.count()/10)+1; | 984 | int modulo = (er.count()/10)+1; |
959 | int incCounter = 0; | 985 | int incCounter = 0; |
960 | while ( inR ) { | 986 | while ( inR ) { |
961 | if ( ! bar.isVisible() ) | 987 | if ( ! bar.isVisible() ) |
962 | return false; | 988 | return false; |
963 | if ( incCounter % modulo == 0 ) | 989 | if ( incCounter % modulo == 0 ) |
964 | bar.setProgress( incCounter ); | 990 | bar.setProgress( incCounter ); |
965 | ++incCounter; | 991 | ++incCounter; |
966 | uid = inR->uid(); | 992 | uid = inR->uid(); |
967 | bool skipIncidence = false; | 993 | bool skipIncidence = false; |
968 | if ( uid.left(21) == QString("last-syncEvent-device") ) | 994 | if ( uid.left(15) == QString("last-syncEvent-") ) |
969 | skipIncidence = true; | 995 | skipIncidence = true; |
970 | 996 | ||
971 | qApp->processEvents(); | 997 | qApp->processEvents(); |
972 | if ( !skipIncidence ) { | 998 | if ( !skipIncidence ) { |
973 | inL = local->incidence( uid ); | 999 | inL = local->incidence( uid ); |
974 | if ( inL ) { // maybe conflict - same uid in both calendars | 1000 | if ( inL ) { // maybe conflict - same uid in both calendars |
975 | int maxrev = inL->revision(); | 1001 | int maxrev = inL->revision(); |
976 | if ( maxrev < inR->revision() ) | 1002 | if ( maxrev < inR->revision() ) |
977 | maxrev = inR->revision(); | 1003 | maxrev = inR->revision(); |
978 | if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { | 1004 | if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { |
979 | //qDebug("take %d %s ", take, inL->summary().latin1()); | 1005 | //qDebug("take %d %s ", take, inL->summary().latin1()); |
980 | if ( take == 3 ) | 1006 | if ( take == 3 ) |
@@ -1006,25 +1032,25 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1006 | ++deletedEventR; | 1032 | ++deletedEventR; |
1007 | } else { | 1033 | } else { |
1008 | inR->setLastModified( modifiedCalendar ); | 1034 | inR->setLastModified( modifiedCalendar ); |
1009 | local->addIncidence( inR->clone() ); | 1035 | local->addIncidence( inR->clone() ); |
1010 | ++addedEvent; | 1036 | ++addedEvent; |
1011 | } | 1037 | } |
1012 | } else { | 1038 | } else { |
1013 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { | 1039 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { |
1014 | inR->setLastModified( modifiedCalendar ); | 1040 | inR->setLastModified( modifiedCalendar ); |
1015 | local->addIncidence( inR->clone() ); | 1041 | local->addIncidence( inR->clone() ); |
1016 | ++addedEvent; | 1042 | ++addedEvent; |
1017 | } else { | 1043 | } else { |
1018 | checkSharpEvent(eventRSyncSharp, inR); | 1044 | checkExternSyncEvent(eventRSyncSharp, inR); |
1019 | remote->deleteIncidence( inR ); | 1045 | remote->deleteIncidence( inR ); |
1020 | ++deletedEventR; | 1046 | ++deletedEventR; |
1021 | } | 1047 | } |
1022 | } | 1048 | } |
1023 | } | 1049 | } |
1024 | } | 1050 | } |
1025 | inR = er.next(); | 1051 | inR = er.next(); |
1026 | } | 1052 | } |
1027 | QPtrList<Incidence> el = local->rawIncidences(); | 1053 | QPtrList<Incidence> el = local->rawIncidences(); |
1028 | inL = el.first(); | 1054 | inL = el.first(); |
1029 | modulo = (el.count()/10)+1; | 1055 | modulo = (el.count()/10)+1; |
1030 | bar.setCaption (i18n("Add / remove events") ); | 1056 | bar.setCaption (i18n("Add / remove events") ); |
@@ -1033,46 +1059,46 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1033 | incCounter = 0; | 1059 | incCounter = 0; |
1034 | 1060 | ||
1035 | while ( inL ) { | 1061 | while ( inL ) { |
1036 | 1062 | ||
1037 | qApp->processEvents(); | 1063 | qApp->processEvents(); |
1038 | if ( ! bar.isVisible() ) | 1064 | if ( ! bar.isVisible() ) |
1039 | return false; | 1065 | return false; |
1040 | if ( incCounter % modulo == 0 ) | 1066 | if ( incCounter % modulo == 0 ) |
1041 | bar.setProgress( incCounter ); | 1067 | bar.setProgress( incCounter ); |
1042 | ++incCounter; | 1068 | ++incCounter; |
1043 | uid = inL->uid(); | 1069 | uid = inL->uid(); |
1044 | bool skipIncidence = false; | 1070 | bool skipIncidence = false; |
1045 | if ( uid.left(21) == QString("last-syncEvent-device") ) | 1071 | if ( uid.left(15) == QString("last-syncEvent-") ) |
1046 | skipIncidence = true; | 1072 | skipIncidence = true; |
1047 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->type() == "Journal" ) | 1073 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->type() == "Journal" ) |
1048 | skipIncidence = true; | 1074 | skipIncidence = true; |
1049 | if ( !skipIncidence ) { | 1075 | if ( !skipIncidence ) { |
1050 | inR = remote->incidence( uid ); | 1076 | inR = remote->incidence( uid ); |
1051 | if ( ! inR ) { | 1077 | if ( ! inR ) { |
1052 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1078 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1053 | if ( inL->zaurusId() >= 0 && mode != 4 ) { | 1079 | if ( inL->zaurusId() >= 0 && mode != 4 ) { |
1054 | local->deleteIncidence( inL ); | 1080 | local->deleteIncidence( inL ); |
1055 | ++deletedEventL; | 1081 | ++deletedEventL; |
1056 | } else { | 1082 | } else { |
1057 | if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) { | 1083 | if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) { |
1058 | inL->setZaurusId( -1 ); | 1084 | inL->setZaurusId( -1 ); |
1059 | ++addedEventR; | 1085 | ++addedEventR; |
1060 | inL->setLastModified( modifiedCalendar ); | 1086 | inL->setLastModified( modifiedCalendar ); |
1061 | remote->addIncidence( inL->clone() ); | 1087 | remote->addIncidence( inL->clone() ); |
1062 | } | 1088 | } |
1063 | } | 1089 | } |
1064 | } else { | 1090 | } else { |
1065 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { | 1091 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { |
1066 | checkSharpEvent(eventLSyncSharp, inL); | 1092 | checkExternSyncEvent(eventLSyncSharp, inL); |
1067 | local->deleteIncidence( inL ); | 1093 | local->deleteIncidence( inL ); |
1068 | ++deletedEventL; | 1094 | ++deletedEventL; |
1069 | } else { | 1095 | } else { |
1070 | if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) { | 1096 | if ( ! KOPrefs::instance()->mWriteBackExistingOnly ) { |
1071 | ++addedEventR; | 1097 | ++addedEventR; |
1072 | inL->setLastModified( modifiedCalendar ); | 1098 | inL->setLastModified( modifiedCalendar ); |
1073 | remote->addIncidence( inL->clone() ); | 1099 | remote->addIncidence( inL->clone() ); |
1074 | } | 1100 | } |
1075 | } | 1101 | } |
1076 | } | 1102 | } |
1077 | } | 1103 | } |
1078 | } | 1104 | } |
@@ -1333,25 +1359,25 @@ bool CalendarView::importQtopia( const QString &categories, | |||
1333 | 1359 | ||
1334 | 1360 | ||
1335 | #endif | 1361 | #endif |
1336 | 1362 | ||
1337 | } | 1363 | } |
1338 | 1364 | ||
1339 | void CalendarView::setSyncEventsReadOnly() | 1365 | void CalendarView::setSyncEventsReadOnly() |
1340 | { | 1366 | { |
1341 | Event * ev; | 1367 | Event * ev; |
1342 | QPtrList<Event> eL = mCalendar->rawEvents(); | 1368 | QPtrList<Event> eL = mCalendar->rawEvents(); |
1343 | ev = eL.first(); | 1369 | ev = eL.first(); |
1344 | while ( ev ) { | 1370 | while ( ev ) { |
1345 | if ( ev->uid().left(21) == QString("last-syncEvent-device") ) | 1371 | if ( ev->uid().left(15) == QString("last-syncEvent-") ) |
1346 | ev->setReadOnly( true ); | 1372 | ev->setReadOnly( true ); |
1347 | ev = eL.next(); | 1373 | ev = eL.next(); |
1348 | } | 1374 | } |
1349 | } | 1375 | } |
1350 | bool CalendarView::openCalendar(QString filename, bool merge) | 1376 | bool CalendarView::openCalendar(QString filename, bool merge) |
1351 | { | 1377 | { |
1352 | 1378 | ||
1353 | if (filename.isEmpty()) { | 1379 | if (filename.isEmpty()) { |
1354 | return false; | 1380 | return false; |
1355 | } | 1381 | } |
1356 | 1382 | ||
1357 | if (!QFile::exists(filename)) { | 1383 | if (!QFile::exists(filename)) { |
@@ -1797,25 +1823,25 @@ void CalendarView::eventToBeDeleted(Event *) | |||
1797 | 1823 | ||
1798 | void CalendarView::eventDeleted() | 1824 | void CalendarView::eventDeleted() |
1799 | { | 1825 | { |
1800 | changeEventDisplay(0,KOGlobals::EVENTDELETED); | 1826 | changeEventDisplay(0,KOGlobals::EVENTDELETED); |
1801 | } | 1827 | } |
1802 | void CalendarView::changeTodoDisplay(Todo *which, int action) | 1828 | void CalendarView::changeTodoDisplay(Todo *which, int action) |
1803 | { | 1829 | { |
1804 | changeIncidenceDisplay((Incidence *)which, action); | 1830 | changeIncidenceDisplay((Incidence *)which, action); |
1805 | } | 1831 | } |
1806 | void CalendarView::checkZaurusId( int id, bool todo ) | 1832 | void CalendarView::checkZaurusId( int id, bool todo ) |
1807 | { | 1833 | { |
1808 | if ( id >= 0 ) { | 1834 | if ( id >= 0 ) { |
1809 | Incidence* lse = mCalendar->event( "last-syncEvent-device-Sharp-DTM"); | 1835 | Incidence* lse = mCalendar->event( "last-syncEvent-Sharp-DTM"); |
1810 | if ( lse ) { | 1836 | if ( lse ) { |
1811 | QString des = lse->description(); | 1837 | QString des = lse->description(); |
1812 | QString pref = "e"; | 1838 | QString pref = "e"; |
1813 | if ( todo ) | 1839 | if ( todo ) |
1814 | pref = "t"; | 1840 | pref = "t"; |
1815 | des += pref+ QString::number ( id ) + ","; | 1841 | des += pref+ QString::number ( id ) + ","; |
1816 | lse->setReadOnly( false ); | 1842 | lse->setReadOnly( false ); |
1817 | lse->setDescription( des ); | 1843 | lse->setDescription( des ); |
1818 | lse->setReadOnly( true ); | 1844 | lse->setReadOnly( true ); |
1819 | } | 1845 | } |
1820 | } | 1846 | } |
1821 | } | 1847 | } |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 8aa5e1c..557554f 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -104,24 +104,25 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
104 | 104 | ||
105 | QWidgetStack *viewStack(); | 105 | QWidgetStack *viewStack(); |
106 | QWidget *leftFrame(); | 106 | QWidget *leftFrame(); |
107 | NavigatorBar *navigatorBar(); | 107 | NavigatorBar *navigatorBar(); |
108 | 108 | ||
109 | DateNavigator *dateNavigator(); | 109 | DateNavigator *dateNavigator(); |
110 | KDateNavigator *dateNavigatorWidget(); | 110 | KDateNavigator *dateNavigatorWidget(); |
111 | 111 | ||
112 | void addView(KOrg::BaseView *); | 112 | void addView(KOrg::BaseView *); |
113 | void showView(KOrg::BaseView *); | 113 | void showView(KOrg::BaseView *); |
114 | KOEventViewerDialog* getEventViewerDialog(); | 114 | KOEventViewerDialog* getEventViewerDialog(); |
115 | Incidence *currentSelection(); | 115 | Incidence *currentSelection(); |
116 | void setupExternSyncProfiles(); | ||
116 | 117 | ||
117 | signals: | 118 | signals: |
118 | /** This todo has been modified */ | 119 | /** This todo has been modified */ |
119 | void todoModified(Todo *, int); | 120 | void todoModified(Todo *, int); |
120 | 121 | ||
121 | /** when change is made to options dialog, the topwidget will catch this | 122 | /** when change is made to options dialog, the topwidget will catch this |
122 | * and emit this signal which notifies all widgets which have registered | 123 | * and emit this signal which notifies all widgets which have registered |
123 | * for notification to update their settings. */ | 124 | * for notification to update their settings. */ |
124 | void configChanged(); | 125 | void configChanged(); |
125 | /** emitted when the topwidget is closing down, so that any attached | 126 | /** emitted when the topwidget is closing down, so that any attached |
126 | child windows can also close. */ | 127 | child windows can also close. */ |
127 | void closingDown(); | 128 | void closingDown(); |
@@ -472,25 +473,25 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
472 | private: | 473 | private: |
473 | AlarmDialog * mAlarmDialog; | 474 | AlarmDialog * mAlarmDialog; |
474 | QString mAlarmNotification; | 475 | QString mAlarmNotification; |
475 | QString mSuspendAlarmNotification; | 476 | QString mSuspendAlarmNotification; |
476 | QTimer* mSuspendTimer; | 477 | QTimer* mSuspendTimer; |
477 | QTimer* mAlarmTimer; | 478 | QTimer* mAlarmTimer; |
478 | QTimer* mRecheckAlarmTimer; | 479 | QTimer* mRecheckAlarmTimer; |
479 | void computeAlarm( QString ); | 480 | void computeAlarm( QString ); |
480 | void startAlarm( QString, QString ); | 481 | void startAlarm( QString, QString ); |
481 | void setSyncEventsReadOnly(); | 482 | void setSyncEventsReadOnly(); |
482 | 483 | ||
483 | QDateTime loadedFileVersion; | 484 | QDateTime loadedFileVersion; |
484 | void checkSharpEvent( Event* lastSync, Incidence* toDelete ); | 485 | void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); |
485 | void checkZaurusId( int id, bool todo = false ); | 486 | void checkZaurusId( int id, bool todo = false ); |
486 | int mGlobalSyncMode; | 487 | int mGlobalSyncMode; |
487 | QString mCurrentSyncDevice; | 488 | QString mCurrentSyncDevice; |
488 | QString mCurrentSyncName; | 489 | QString mCurrentSyncName; |
489 | KOBeamPrefs* beamDialog; | 490 | KOBeamPrefs* beamDialog; |
490 | void init(); | 491 | void init(); |
491 | int mDatePickerMode; | 492 | int mDatePickerMode; |
492 | bool mFlagEditDescription; | 493 | bool mFlagEditDescription; |
493 | QDateTime mLastCalendarSync; | 494 | QDateTime mLastCalendarSync; |
494 | void createPrinter(); | 495 | void createPrinter(); |
495 | 496 | ||
496 | void calendarModified( bool, Calendar * ); | 497 | void calendarModified( bool, Calendar * ); |
@@ -525,25 +526,25 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
525 | KODialogManager *mDialogManager; | 526 | KODialogManager *mDialogManager; |
526 | 527 | ||
527 | // Calendar filters | 528 | // Calendar filters |
528 | QPtrList<CalFilter> mFilters; | 529 | QPtrList<CalFilter> mFilters; |
529 | 530 | ||
530 | // various housekeeping variables. | 531 | // various housekeeping variables. |
531 | bool mModified; // flag indicating if calendar is modified | 532 | bool mModified; // flag indicating if calendar is modified |
532 | bool mReadOnly; // flag indicating if calendar is read-only | 533 | bool mReadOnly; // flag indicating if calendar is read-only |
533 | QDate mSaveSingleDate; | 534 | QDate mSaveSingleDate; |
534 | 535 | ||
535 | Incidence *mSelectedIncidence; | 536 | Incidence *mSelectedIncidence; |
536 | Incidence *mMoveIncidence; | 537 | Incidence *mMoveIncidence; |
537 | 538 | QPtrList<Event> mExternLastSyncEvent; | |
538 | KOTodoView *mTodoList; | 539 | KOTodoView *mTodoList; |
539 | KOEventEditor * mEventEditor; | 540 | KOEventEditor * mEventEditor; |
540 | KOTodoEditor * mTodoEditor; | 541 | KOTodoEditor * mTodoEditor; |
541 | KOEventViewerDialog * mEventViewerDialog; | 542 | KOEventViewerDialog * mEventViewerDialog; |
542 | void keyPressEvent ( QKeyEvent *e) ; | 543 | void keyPressEvent ( QKeyEvent *e) ; |
543 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; | 544 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; |
544 | }; | 545 | }; |
545 | 546 | ||
546 | 547 | ||
547 | class CalendarViewVisitor : public Incidence::Visitor | 548 | class CalendarViewVisitor : public Incidence::Visitor |
548 | { | 549 | { |
549 | public: | 550 | public: |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 3ba5ab2..f3231ff 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -168,49 +168,50 @@ KOPrefs::KOPrefs() : | |||
168 | addItemFont("MonthView Font",&mMonthViewFont); | 168 | addItemFont("MonthView Font",&mMonthViewFont); |
169 | addItemFont("AgendaView Font",&mAgendaViewFont); | 169 | addItemFont("AgendaView Font",&mAgendaViewFont); |
170 | addItemFont("MarcusBains Font",&mMarcusBainsFont); | 170 | addItemFont("MarcusBains Font",&mMarcusBainsFont); |
171 | addItemFont("TimeLabels Font",&mTimeLabelsFont); | 171 | addItemFont("TimeLabels Font",&mTimeLabelsFont); |
172 | addItemFont("TodoView Font",&mTodoViewFont); | 172 | addItemFont("TodoView Font",&mTodoViewFont); |
173 | addItemFont("ListView Font",&mListViewFont); | 173 | addItemFont("ListView Font",&mListViewFont); |
174 | addItemFont("DateNavigator Font",&mDateNavigatorFont); | 174 | addItemFont("DateNavigator Font",&mDateNavigatorFont); |
175 | addItemFont("EditBox Font",&mEditBoxFont); | 175 | addItemFont("EditBox Font",&mEditBoxFont); |
176 | addItemFont("JournalView Font",&mJornalViewFont); | 176 | addItemFont("JournalView Font",&mJornalViewFont); |
177 | addItemFont("WhatsNextView Font",&mWhatsNextFont); | 177 | addItemFont("WhatsNextView Font",&mWhatsNextFont); |
178 | addItemFont("EventView Font",&mEventViewFont); | 178 | addItemFont("EventView Font",&mEventViewFont); |
179 | 179 | ||
180 | KPrefs::setCurrentGroup("SyncProfiles"); | 180 | // KPrefs::setCurrentGroup("SyncProfiles"); |
181 | addItemString("LocalMachineName",&mLocalMachineName, "undefined"); | 181 | // addItemString("LocalMachineName",&mLocalMachineName, "undefined"); |
182 | addItemStringList("SyncProfileNames",&mSyncProfileNames); | 182 | // addItemStringList("SyncProfileNames",&mSyncProfileNames); |
183 | // addItemStringList("ExternSyncProfiles",&mExternSyncProfileNames); | ||
183 | 184 | ||
184 | KPrefs::setCurrentGroup("RemoteSyncing"); | 185 | KPrefs::setCurrentGroup("RemoteSyncing"); |
185 | addItemBool("UsePasswd",&mUsePassWd,false); | 186 | // addItemBool("UsePasswd",&mUsePassWd,false); |
186 | addItemBool("WriteBackFile",&mWriteBackFile,true); | 187 | // addItemBool("WriteBackFile",&mWriteBackFile,true); |
187 | addItemBool("WriteBackExistingOnly",&mWriteBackExistingOnly,false); | 188 | // addItemBool("WriteBackExistingOnly",&mWriteBackExistingOnly,false); |
188 | addItemBool("AskForPreferences",&mAskForPreferences,true); | 189 | // addItemBool("AskForPreferences",&mAskForPreferences,true); |
189 | addItemBool("ShowSyncSummary",&mShowSyncSummary,true); | 190 | // addItemBool("ShowSyncSummary",&mShowSyncSummary,true); |
190 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); | 191 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); |
191 | addItemInt("LastSyncTime",&mLastSyncTime,0); | 192 | addItemInt("LastSyncTime",&mLastSyncTime,0); |
192 | addItemInt("SyncAlgoPrefs",&mSyncAlgoPrefs,3); | 193 | addItemInt("SyncAlgoPrefs",&mSyncAlgoPrefs,3); |
193 | addItemInt("RingSyncAlgoPrefs",&mRingSyncAlgoPrefs,3); | 194 | addItemInt("RingSyncAlgoPrefs",&mRingSyncAlgoPrefs,3); |
194 | 195 | ||
195 | #ifdef _WIN32_ | 196 | #ifdef _WIN32_ |
196 | QString hdp= locateLocal("data","korganizer")+"\\\\"; | 197 | QString hdp= locateLocal("data","korganizer")+"\\\\"; |
197 | #else | 198 | #else |
198 | QString hdp= locateLocal("data","korganizer")+"/"; | 199 | QString hdp= locateLocal("data","korganizer")+"/"; |
199 | #endif | 200 | #endif |
200 | addItemString("RemoteIP",&mRemoteIP, "192.168.0.65"); | 201 | // addItemString("RemoteIP",&mRemoteIP, "192.168.0.65"); |
201 | addItemString("RemoteUser",&mRemoteUser, "zaurus"); | 202 | // addItemString("RemoteUser",&mRemoteUser, "zaurus"); |
202 | addItemString("RemotePassWd",&mRemotePassWd, ""); | 203 | // addItemString("RemotePassWd",&mRemotePassWd, ""); |
203 | addItemString("RemoteFile", &mRemoteFile, hdp+"mycalendar.ics"); | 204 | // addItemString("RemoteFile", &mRemoteFile, hdp+"mycalendar.ics"); |
204 | addItemString("LocalTempFile",&mLocalTempFile, "/tmp/tempsyncfile.ics" ); | 205 | // addItemString("LocalTempFile",&mLocalTempFile, "/tmp/tempsyncfile.ics" ); |
205 | 206 | ||
206 | 207 | ||
207 | KPrefs::setCurrentGroup("LoadSaveFileNames"); | 208 | KPrefs::setCurrentGroup("LoadSaveFileNames"); |
208 | 209 | ||
209 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); | 210 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); |
210 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); | 211 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); |
211 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); | 212 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); |
212 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); | 213 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); |
213 | addItemString("LastSyncedLocalFile", &mLastSyncedLocalFile ,hdp +"lastsync.ics" ); | 214 | addItemString("LastSyncedLocalFile", &mLastSyncedLocalFile ,hdp +"lastsync.ics" ); |
214 | 215 | ||
215 | 216 | ||
216 | KPrefs::setCurrentGroup("Locale"); | 217 | KPrefs::setCurrentGroup("Locale"); |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index fe044e6..424fa98 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -206,24 +206,25 @@ class KOPrefs : public KPimPrefs | |||
206 | bool mWriteBackExistingOnly; | 206 | bool mWriteBackExistingOnly; |
207 | 207 | ||
208 | QString mRemoteIP; | 208 | QString mRemoteIP; |
209 | QString mRemoteUser; | 209 | QString mRemoteUser; |
210 | QString mRemotePassWd; | 210 | QString mRemotePassWd; |
211 | QString mRemoteFile; | 211 | QString mRemoteFile; |
212 | QString mLocalTempFile; | 212 | QString mLocalTempFile; |
213 | 213 | ||
214 | int mLastSyncTime; | 214 | int mLastSyncTime; |
215 | int mSyncAlgoPrefs; | 215 | int mSyncAlgoPrefs; |
216 | int mRingSyncAlgoPrefs; | 216 | int mRingSyncAlgoPrefs; |
217 | QStringList mSyncProfileNames; | 217 | QStringList mSyncProfileNames; |
218 | QStringList mExternSyncProfiles; | ||
218 | QString mLocalMachineName; | 219 | QString mLocalMachineName; |
219 | void setCategoryColor(QString cat,const QColor & color); | 220 | void setCategoryColor(QString cat,const QColor & color); |
220 | QColor *categoryColor(QString cat); | 221 | QColor *categoryColor(QString cat); |
221 | 222 | ||
222 | QString mArchiveFile; | 223 | QString mArchiveFile; |
223 | QString mHtmlExportFile; | 224 | QString mHtmlExportFile; |
224 | bool mHtmlWithSave; | 225 | bool mHtmlWithSave; |
225 | 226 | ||
226 | QStringList mSelectedPlugins; | 227 | QStringList mSelectedPlugins; |
227 | 228 | ||
228 | QString mLastImportFile; | 229 | QString mLastImportFile; |
229 | QString mLastVcalFile; | 230 | QString mLastVcalFile; |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 44b1264..6020a46 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -827,39 +827,42 @@ void MainWindow::fillSyncMenu() | |||
827 | prof << i18n("Sharp_DTM"); | 827 | prof << i18n("Sharp_DTM"); |
828 | prof << i18n("Local_file"); | 828 | prof << i18n("Local_file"); |
829 | prof << i18n("Last_file"); | 829 | prof << i18n("Last_file"); |
830 | KSyncProfile* temp = new KSyncProfile (); | 830 | KSyncProfile* temp = new KSyncProfile (); |
831 | temp->setName( prof[0] ); | 831 | temp->setName( prof[0] ); |
832 | temp->writeConfig(&config); | 832 | temp->writeConfig(&config); |
833 | temp->setName( prof[1] ); | 833 | temp->setName( prof[1] ); |
834 | temp->writeConfig(&config); | 834 | temp->writeConfig(&config); |
835 | temp->setName( prof[2] ); | 835 | temp->setName( prof[2] ); |
836 | temp->writeConfig(&config); | 836 | temp->writeConfig(&config); |
837 | config.setGroup("General"); | 837 | config.setGroup("General"); |
838 | config.writeEntry("SyncProfileNames",prof); | 838 | config.writeEntry("SyncProfileNames",prof); |
839 | config.writeEntry("ExternSyncProfiles","Sharp_DTM"); | ||
839 | config.sync(); | 840 | config.sync(); |
840 | delete temp; | 841 | delete temp; |
841 | } | 842 | } |
843 | KOPrefs::instance()->mExternSyncProfiles = config.readListEntry("ExternSyncProfiles"); | ||
842 | KOPrefs::instance()->mSyncProfileNames = prof; | 844 | KOPrefs::instance()->mSyncProfileNames = prof; |
843 | int i; | 845 | int i; |
844 | for ( i = 0; i < prof.count(); ++i ) { | 846 | for ( i = 0; i < prof.count(); ++i ) { |
845 | 847 | ||
846 | syncMenu->insertItem( prof[i], 1000+i ); | 848 | syncMenu->insertItem( prof[i], 1000+i ); |
847 | if ( i == 2 ) | 849 | if ( i == 2 ) |
848 | syncMenu->insertSeparator(); | 850 | syncMenu->insertSeparator(); |
849 | } | 851 | } |
850 | QDir app_dir; | 852 | QDir app_dir; |
851 | if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { | 853 | if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { |
852 | syncMenu->setItemEnabled( false , 1000 ); | 854 | syncMenu->setItemEnabled( false , 1000 ); |
853 | } | 855 | } |
856 | mView->setupExternSyncProfiles(); | ||
854 | } | 857 | } |
855 | 858 | ||
856 | int MainWindow::ringSync() | 859 | int MainWindow::ringSync() |
857 | { | 860 | { |
858 | int syncedProfiles = 0; | 861 | int syncedProfiles = 0; |
859 | int i; | 862 | int i; |
860 | QTime timer; | 863 | QTime timer; |
861 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); | 864 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); |
862 | QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames; | 865 | QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames; |
863 | KSyncProfile* temp = new KSyncProfile (); | 866 | KSyncProfile* temp = new KSyncProfile (); |
864 | KOPrefs::instance()->mAskForPreferences = false; | 867 | KOPrefs::instance()->mAskForPreferences = false; |
865 | for ( i = 0; i < syncProfileNames.count(); ++i ) { | 868 | for ( i = 0; i < syncProfileNames.count(); ++i ) { |
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 7d23619..df5bbcf 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h | |||
@@ -66,25 +66,25 @@ public: | |||
66 | Calendar(const QString &timeZoneId); | 66 | Calendar(const QString &timeZoneId); |
67 | virtual ~Calendar(); | 67 | virtual ~Calendar(); |
68 | void deleteIncidence(Incidence *in); | 68 | void deleteIncidence(Incidence *in); |
69 | /** | 69 | /** |
70 | Clears out the current calendar, freeing all used memory etc. | 70 | Clears out the current calendar, freeing all used memory etc. |
71 | */ | 71 | */ |
72 | virtual void close() = 0; | 72 | virtual void close() = 0; |
73 | 73 | ||
74 | /** | 74 | /** |
75 | Sync changes in memory to persistant storage. | 75 | Sync changes in memory to persistant storage. |
76 | */ | 76 | */ |
77 | virtual void save() = 0; | 77 | virtual void save() = 0; |
78 | 78 | virtual QPtrList<Event> getExternLastSyncEvents() = 0; | |
79 | virtual bool isSaving() { return false; } | 79 | virtual bool isSaving() { return false; } |
80 | 80 | ||
81 | /** | 81 | /** |
82 | Return the owner of the calendar's full name. | 82 | Return the owner of the calendar's full name. |
83 | */ | 83 | */ |
84 | const QString &getOwner() const; | 84 | const QString &getOwner() const; |
85 | /** | 85 | /** |
86 | Set the owner of the calendar. Should be owner's full name. | 86 | Set the owner of the calendar. Should be owner's full name. |
87 | */ | 87 | */ |
88 | void setOwner( const QString &os ); | 88 | void setOwner( const QString &os ); |
89 | /** | 89 | /** |
90 | Return the email address of the calendar owner. | 90 | Return the email address of the calendar owner. |
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 3c572f0..09ce9f0 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -213,24 +213,37 @@ QPtrList<Todo> CalendarLocal::rawTodos() | |||
213 | return mTodoList; | 213 | return mTodoList; |
214 | } | 214 | } |
215 | Todo *CalendarLocal::todo( int id ) | 215 | Todo *CalendarLocal::todo( int id ) |
216 | { | 216 | { |
217 | Todo *todo; | 217 | Todo *todo; |
218 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { | 218 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { |
219 | if ( todo->zaurusId() == id ) return todo; | 219 | if ( todo->zaurusId() == id ) return todo; |
220 | } | 220 | } |
221 | 221 | ||
222 | return 0; | 222 | return 0; |
223 | } | 223 | } |
224 | 224 | ||
225 | QPtrList<Event> CalendarLocal::getExternLastSyncEvents() | ||
226 | { | ||
227 | QPtrList<Event> el; | ||
228 | Event *todo; | ||
229 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { | ||
230 | if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) | ||
231 | if ( todo->summary().left(3) == "E: " ) | ||
232 | el.append( todo ); | ||
233 | } | ||
234 | |||
235 | return el; | ||
236 | |||
237 | } | ||
225 | Event *CalendarLocal::event( int id ) | 238 | Event *CalendarLocal::event( int id ) |
226 | { | 239 | { |
227 | Event *todo; | 240 | Event *todo; |
228 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { | 241 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { |
229 | if ( todo->zaurusId() == id ) return todo; | 242 | if ( todo->zaurusId() == id ) return todo; |
230 | } | 243 | } |
231 | 244 | ||
232 | return 0; | 245 | return 0; |
233 | } | 246 | } |
234 | Todo *CalendarLocal::todo( const QString &uid ) | 247 | Todo *CalendarLocal::todo( const QString &uid ) |
235 | { | 248 | { |
236 | Todo *todo; | 249 | Todo *todo; |
@@ -311,25 +324,24 @@ QString CalendarLocal:: getAlarmNotification() | |||
311 | Alarm* alarm = mNextAlarmIncidence->alarms().first(); | 324 | Alarm* alarm = mNextAlarmIncidence->alarms().first(); |
312 | if ( alarm->type() == Alarm::Procedure ) { | 325 | if ( alarm->type() == Alarm::Procedure ) { |
313 | ret = "proc_alarm" + alarm->programFile()+"+++"; | 326 | ret = "proc_alarm" + alarm->programFile()+"+++"; |
314 | } else { | 327 | } else { |
315 | ret = "audio_alarm" +alarm->audioFile() +"+++"; | 328 | ret = "audio_alarm" +alarm->audioFile() +"+++"; |
316 | } | 329 | } |
317 | ret += "cal_alarm"+ mNextSummary.left( 25 ); | 330 | ret += "cal_alarm"+ mNextSummary.left( 25 ); |
318 | if ( mNextSummary.length() > 25 ) | 331 | if ( mNextSummary.length() > 25 ) |
319 | ret += "\n" + mNextSummary.mid(25, 25 ); | 332 | ret += "\n" + mNextSummary.mid(25, 25 ); |
320 | ret+= "\n"+mNextAlarmEventDateTimeString; | 333 | ret+= "\n"+mNextAlarmEventDateTimeString; |
321 | return ret; | 334 | return ret; |
322 | } | 335 | } |
323 | |||
324 | void CalendarLocal::registerAlarm() | 336 | void CalendarLocal::registerAlarm() |
325 | { | 337 | { |
326 | mLastAlarmNotificationString = getAlarmNotification(); | 338 | mLastAlarmNotificationString = getAlarmNotification(); |
327 | // qDebug("++ register Alarm %s %s",mNextAlarmDateTime.toString().latin1(), mLastAlarmNotificationString.latin1() ); | 339 | // qDebug("++ register Alarm %s %s",mNextAlarmDateTime.toString().latin1(), mLastAlarmNotificationString.latin1() ); |
328 | emit addAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); | 340 | emit addAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); |
329 | // #ifndef DESKTOP_VERSION | 341 | // #ifndef DESKTOP_VERSION |
330 | // AlarmServer::addAlarm ( mNextAlarmDateTime,"koalarm", mLastAlarmNotificationString.latin1() ); | 342 | // AlarmServer::addAlarm ( mNextAlarmDateTime,"koalarm", mLastAlarmNotificationString.latin1() ); |
331 | // #endif | 343 | // #endif |
332 | } | 344 | } |
333 | void CalendarLocal::deRegisterAlarm() | 345 | void CalendarLocal::deRegisterAlarm() |
334 | { | 346 | { |
335 | if ( mLastAlarmNotificationString.isNull() ) | 347 | if ( mLastAlarmNotificationString.isNull() ) |
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index a2e50e3..3257198 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h | |||
@@ -76,25 +76,25 @@ class CalendarLocal : public Calendar | |||
76 | Deletes an event from this calendar. | 76 | Deletes an event from this calendar. |
77 | */ | 77 | */ |
78 | void deleteEvent( Event *event ); | 78 | void deleteEvent( Event *event ); |
79 | 79 | ||
80 | /** | 80 | /** |
81 | Retrieves an event on the basis of the unique string ID. | 81 | Retrieves an event on the basis of the unique string ID. |
82 | */ | 82 | */ |
83 | Event *event( const QString &uid ); | 83 | Event *event( const QString &uid ); |
84 | /** | 84 | /** |
85 | Return unfiltered list of all events in calendar. | 85 | Return unfiltered list of all events in calendar. |
86 | */ | 86 | */ |
87 | QPtrList<Event> rawEvents(); | 87 | QPtrList<Event> rawEvents(); |
88 | 88 | QPtrList<Event> getExternLastSyncEvents(); | |
89 | /** | 89 | /** |
90 | Add a todo to the todolist. | 90 | Add a todo to the todolist. |
91 | */ | 91 | */ |
92 | bool addTodo( Todo *todo ); | 92 | bool addTodo( Todo *todo ); |
93 | bool addTodoNoDup( Todo *todo ); | 93 | bool addTodoNoDup( Todo *todo ); |
94 | /** | 94 | /** |
95 | Remove a todo from the todolist. | 95 | Remove a todo from the todolist. |
96 | */ | 96 | */ |
97 | void deleteTodo( Todo * ); | 97 | void deleteTodo( Todo * ); |
98 | /** | 98 | /** |
99 | Searches todolist for an event with this unique string identifier, | 99 | Searches todolist for an event with this unique string identifier, |
100 | returns a pointer or null. | 100 | returns a pointer or null. |