summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp19
-rw-r--r--korganizer/calendarview.h2
-rw-r--r--korganizer/koprefs.cpp10
-rw-r--r--korganizer/koprefs.h1
4 files changed, 28 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 31e103d..8965d3b 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1949,65 +1949,64 @@ bool CalendarView::syncCalendar(QString filename, int mode)
1949{ 1949{
1950 //qDebug("syncCalendar %s ", filename.latin1()); 1950 //qDebug("syncCalendar %s ", filename.latin1());
1951 mGlobalSyncMode = SYNC_MODE_NORMAL; 1951 mGlobalSyncMode = SYNC_MODE_NORMAL;
1952 CalendarLocal* calendar = new CalendarLocal(); 1952 CalendarLocal* calendar = new CalendarLocal();
1953 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 1953 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1954 FileStorage* storage = new FileStorage( calendar ); 1954 FileStorage* storage = new FileStorage( calendar );
1955 bool syncOK = false; 1955 bool syncOK = false;
1956 storage->setFileName( filename ); 1956 storage->setFileName( filename );
1957 // qDebug("loading ... "); 1957 // qDebug("loading ... ");
1958 if ( storage->load() ) { 1958 if ( storage->load() ) {
1959 getEventViewerDialog()->setSyncMode( true ); 1959 getEventViewerDialog()->setSyncMode( true );
1960 syncOK = synchronizeCalendar( mCalendar, calendar, mode ); 1960 syncOK = synchronizeCalendar( mCalendar, calendar, mode );
1961 getEventViewerDialog()->setSyncMode( false ); 1961 getEventViewerDialog()->setSyncMode( false );
1962 if ( syncOK ) { 1962 if ( syncOK ) {
1963 if ( mSyncManager->mWriteBackFile ) 1963 if ( mSyncManager->mWriteBackFile )
1964 { 1964 {
1965 storage->setSaveFormat( new ICalFormat() ); 1965 storage->setSaveFormat( new ICalFormat() );
1966 storage->save(); 1966 storage->save();
1967 } 1967 }
1968 } 1968 }
1969 setModified( true ); 1969 setModified( true );
1970 } 1970 }
1971 delete storage; 1971 delete storage;
1972 delete calendar; 1972 delete calendar;
1973 if ( syncOK ) 1973 if ( syncOK )
1974 updateView(); 1974 updateView();
1975 return syncOK; 1975 return syncOK;
1976} 1976}
1977 1977
1978void CalendarView::syncExternal( int mode ) 1978void CalendarView::syncExternal( int mode )
1979{ 1979{
1980 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 1980 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
1981
1982 qApp->processEvents(); 1981 qApp->processEvents();
1983 CalendarLocal* calendar = new CalendarLocal(); 1982 CalendarLocal* calendar = new CalendarLocal();
1984 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 1983 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1985 bool syncOK = false; 1984 bool syncOK = false;
1986 bool loadSuccess = false; 1985 bool loadSuccess = false;
1987 PhoneFormat* phoneFormat = 0; 1986 PhoneFormat* phoneFormat = 0;
1988 emit tempDisableBR(true); 1987 emit tempDisableBR(true);
1989#ifndef DESKTOP_VERSION 1988#ifndef DESKTOP_VERSION
1990 SharpFormat* sharpFormat = 0; 1989 SharpFormat* sharpFormat = 0;
1991 if ( mode == 0 ) { // sharp 1990 if ( mode == 0 ) { // sharp
1992 sharpFormat = new SharpFormat () ; 1991 sharpFormat = new SharpFormat () ;
1993 loadSuccess = sharpFormat->load( calendar, mCalendar ); 1992 loadSuccess = sharpFormat->load( calendar, mCalendar );
1994 1993
1995 } else 1994 } else
1996#endif 1995#endif
1997 if ( mode == 1 ) { // phone 1996 if ( mode == 1 ) { // phone
1998 phoneFormat = new PhoneFormat (mCurrentSyncDevice, 1997 phoneFormat = new PhoneFormat (mCurrentSyncDevice,
1999 mSyncManager->mPhoneDevice, 1998 mSyncManager->mPhoneDevice,
2000 mSyncManager->mPhoneConnection, 1999 mSyncManager->mPhoneConnection,
2001 mSyncManager->mPhoneModel); 2000 mSyncManager->mPhoneModel);
2002 loadSuccess = phoneFormat->load( calendar,mCalendar); 2001 loadSuccess = phoneFormat->load( calendar,mCalendar);
2003 2002
2004 } else { 2003 } else {
2005 emit tempDisableBR(false); 2004 emit tempDisableBR(false);
2006 return; 2005 return;
2007 } 2006 }
2008 if ( loadSuccess ) { 2007 if ( loadSuccess ) {
2009 getEventViewerDialog()->setSyncMode( true ); 2008 getEventViewerDialog()->setSyncMode( true );
2010 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); 2009 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs );
2011 getEventViewerDialog()->setSyncMode( false ); 2010 getEventViewerDialog()->setSyncMode( false );
2012 qApp->processEvents(); 2011 qApp->processEvents();
2013 if ( syncOK ) { 2012 if ( syncOK ) {
@@ -5005,75 +5004,89 @@ void CalendarView::purgeCompleted()
5005 5004
5006 if (result == KMessageBox::Continue) { 5005 if (result == KMessageBox::Continue) {
5007 5006
5008 QPtrList<Todo> todoCal; 5007 QPtrList<Todo> todoCal;
5009 QPtrList<Todo> rootTodos; 5008 QPtrList<Todo> rootTodos;
5010 //QPtrList<Incidence> rel; 5009 //QPtrList<Incidence> rel;
5011 Todo *aTodo; 5010 Todo *aTodo;
5012 todoCal = calendar()->todos(); 5011 todoCal = calendar()->todos();
5013 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { 5012 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) {
5014 if ( !aTodo->relatedTo() ) 5013 if ( !aTodo->relatedTo() )
5015 rootTodos.append( aTodo ); 5014 rootTodos.append( aTodo );
5016 } 5015 }
5017 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { 5016 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) {
5018 removeCompletedSubTodos( aTodo ); 5017 removeCompletedSubTodos( aTodo );
5019 } 5018 }
5020 5019
5021 updateView(); 5020 updateView();
5022 } 5021 }
5023} 5022}
5024 5023
5025void CalendarView::slotCalendarChanged() 5024void CalendarView::slotCalendarChanged()
5026{ 5025{
5027 ; 5026 ;
5028} 5027}
5029 5028
5030void CalendarView::keyPressEvent ( QKeyEvent *e) 5029void CalendarView::keyPressEvent ( QKeyEvent *e)
5031{ 5030{
5032 //qDebug("CalendarView::keyPressEvent "); 5031 //qDebug("CalendarView::keyPressEvent ");
5033 e->ignore(); 5032 e->ignore();
5034} 5033}
5035 5034
5036 5035
5037bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) 5036bool CalendarView::sync(KSyncManager* manager, QString filename, int mode,QString resource)
5038{ 5037{
5039 5038
5040 if ( manager != mSyncManager) 5039 if ( manager != mSyncManager)
5041 qDebug("KO: Internal error-1. SyncManager mismatch "); 5040 qDebug("KO: Internal error-1. SyncManager mismatch ");
5042 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { 5041 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) {
5043 qDebug("KO: SyncKDE request detected!"); 5042 qDebug("KO: SyncKDE request detected!");
5044 } 5043 }
5045 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 5044 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
5046 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 5045 mCurrentSyncName = mSyncManager->getCurrentSyncName();
5047 return syncCalendar( filename, mode ); 5046 if ( !resource.isEmpty() ) {
5047 int exclusiveSyncResource = KOPrefs::instance()->getFuzzyCalendarID( resource );
5048 qDebug( "KO: Sync request for resource: %s", resource.latin1() );
5049
5050 if ( !exclusiveSyncResource ) {
5051 qDebug( "KO: Requested sync resource not found: %s", resource.latin1() );
5052 return false;
5053 }
5054 mCalendar->setDefaultCalendar( exclusiveSyncResource );
5055 mCalendar->setDefaultCalendarEnabledOnly();
5056 }
5057 bool result = syncCalendar( filename, mode );
5058 if ( !resource.isEmpty() )
5059 restoreCalendarSettings();
5060 return result;
5048} 5061}
5049bool CalendarView::syncExternal(KSyncManager* manager, QString resource) 5062bool CalendarView::syncExternal(KSyncManager* manager, QString resource)
5050{ 5063{
5051 //mSyncManager = manager; 5064 //mSyncManager = manager;
5052 if ( manager != mSyncManager) 5065 if ( manager != mSyncManager)
5053 qDebug("KO: Internal error-2. SyncManager mismatch "); 5066 qDebug("KO: Internal error-2. SyncManager mismatch ");
5054 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 5067 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
5055 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 5068 mCurrentSyncName = mSyncManager->getCurrentSyncName();
5056 if ( resource == "sharp" ) 5069 if ( resource == "sharp" )
5057 syncExternal( 0 ); 5070 syncExternal( 0 );
5058 if ( resource == "phone" ) 5071 if ( resource == "phone" )
5059 syncExternal( 1 ); 5072 syncExternal( 1 );
5060 // pending setmodified 5073 // pending setmodified
5061 return true; 5074 return true;
5062} 5075}
5063void CalendarView::setSyncManager(KSyncManager* manager) 5076void CalendarView::setSyncManager(KSyncManager* manager)
5064{ 5077{
5065 mSyncManager = manager; 5078 mSyncManager = manager;
5066} 5079}
5067 5080
5068void CalendarView::removeSyncInfo( QString syncProfile) 5081void CalendarView::removeSyncInfo( QString syncProfile)
5069{ 5082{
5070 qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); 5083 qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1());
5071 mCalendar->removeSyncInfo( syncProfile ); 5084 mCalendar->removeSyncInfo( syncProfile );
5072 5085
5073} 5086}
5074 5087
5075void CalendarView::undo_delete() 5088void CalendarView::undo_delete()
5076{ 5089{
5077 //qDebug("undo_delete() "); 5090 //qDebug("undo_delete() ");
5078 Incidence* undo = mCalendar->undoIncidence(); 5091 Incidence* undo = mCalendar->undoIncidence();
5079 if ( !undo ) { 5092 if ( !undo ) {
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 80f7ed4..f85b6a3 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -489,65 +489,65 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
489 void showDatePicker() ; 489 void showDatePicker() ;
490 void showDatePickerPopup() ; 490 void showDatePickerPopup() ;
491 void moveIncidence(Incidence *) ; 491 void moveIncidence(Incidence *) ;
492 void beamIncidence(Incidence *) ; 492 void beamIncidence(Incidence *) ;
493 void beamCalendar() ; 493 void beamCalendar() ;
494 void beamFilteredCalendar() ; 494 void beamFilteredCalendar() ;
495 void beamIncidenceList(QPtrList<Incidence>) ; 495 void beamIncidenceList(QPtrList<Incidence>) ;
496 void manageCategories(); 496 void manageCategories();
497 void editCategories(); 497 void editCategories();
498 int addCategories(); 498 int addCategories();
499 void removeCategories(); 499 void removeCategories();
500 void setSyncDevice( QString ); 500 void setSyncDevice( QString );
501 void setSyncName( QString ); 501 void setSyncName( QString );
502 void showDay( QDate ); 502 void showDay( QDate );
503 void undo_delete(); 503 void undo_delete();
504 protected slots: 504 protected slots:
505 void resetFocus(); 505 void resetFocus();
506 void scrollBarValue(int); 506 void scrollBarValue(int);
507 void slotViewerClosed(); 507 void slotViewerClosed();
508 void timerAlarm(); 508 void timerAlarm();
509 void suspendAlarm(); 509 void suspendAlarm();
510 void beamDone( Ir *ir ); 510 void beamDone( Ir *ir );
511 /** Select a view or adapt the current view to display the specified dates. */ 511 /** Select a view or adapt the current view to display the specified dates. */
512 void showDates( const KCal::DateList & ); 512 void showDates( const KCal::DateList & );
513 void selectWeekNum ( int ); 513 void selectWeekNum ( int );
514 void checkConflictForEvent(); 514 void checkConflictForEvent();
515 515
516 public: 516 public:
517 void createRunningDate4Todo( Todo * runT, QDateTime start , QDateTime end, int secLenRunning, int secLenPausing,int dayInterval ); 517 void createRunningDate4Todo( Todo * runT, QDateTime start , QDateTime end, int secLenRunning, int secLenPausing,int dayInterval );
518 // show a standard warning 518 // show a standard warning
519 // returns KMsgBox::yesNoCancel() 519 // returns KMsgBox::yesNoCancel()
520 int msgCalModified(); 520 int msgCalModified();
521 virtual bool sync(KSyncManager* manager, QString filename, int mode); 521 virtual bool sync(KSyncManager* manager, QString filename, int mode, QString resource);
522 522
523 virtual bool syncExternal(KSyncManager* manager, QString resource); 523 virtual bool syncExternal(KSyncManager* manager, QString resource);
524 virtual void removeSyncInfo( QString syncProfile); 524 virtual void removeSyncInfo( QString syncProfile);
525 void setSyncManager(KSyncManager* manager); 525 void setSyncManager(KSyncManager* manager);
526 void setLoadedFileVersion(QDateTime); 526 void setLoadedFileVersion(QDateTime);
527 bool checkFileVersion(QString fn); 527 bool checkFileVersion(QString fn);
528 bool checkAllFileVersions(); 528 bool checkAllFileVersions();
529 bool checkFileChanged(QString fn); 529 bool checkFileChanged(QString fn);
530 Event* getLastSyncEvent(); 530 Event* getLastSyncEvent();
531 /** Adapt navigation units correpsonding to step size of navigation of the 531 /** Adapt navigation units correpsonding to step size of navigation of the
532 * current view. 532 * current view.
533 */ 533 */
534 void adaptNavigationUnits(); 534 void adaptNavigationUnits();
535 bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); 535 bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode );
536 int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); 536 int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false );
537 //Attendee* getYourAttendee(Event *event); 537 //Attendee* getYourAttendee(Event *event);
538 void setBlockShowDates( bool b ) { mBlockShowDates = b ;} 538 void setBlockShowDates( bool b ) { mBlockShowDates = b ;}
539 void setScrollBarStep(int val ); 539 void setScrollBarStep(int val );
540 540
541 protected: 541 protected:
542 Event *mConflictingEvent; 542 Event *mConflictingEvent;
543 void schedule(Scheduler::Method, Incidence *incidence = 0); 543 void schedule(Scheduler::Method, Incidence *incidence = 0);
544 544
545 // returns KMsgBox::OKCandel() 545 // returns KMsgBox::OKCandel()
546 int msgItemDelete(const QString name); 546 int msgItemDelete(const QString name);
547 void showEventEditor(); 547 void showEventEditor();
548 void showTodoEditor(); 548 void showTodoEditor();
549 Todo *selectedTodo(); 549 Todo *selectedTodo();
550 private: 550 private:
551#ifdef DESKTOP_VERSION 551#ifdef DESKTOP_VERSION
552 QScrollBar * mDateScrollBar; 552 QScrollBar * mDateScrollBar;
553#endif 553#endif
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 1b0e5f4..31ef338 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -499,64 +499,74 @@ KopiCalendarFile * KOPrefs::getNewCalendar()
499 kkf->mCalNumber = mNextAvailableCalendar; 499 kkf->mCalNumber = mNextAvailableCalendar;
500 mDefCalColors.resize( mNextAvailableCalendar ); 500 mDefCalColors.resize( mNextAvailableCalendar );
501 mDefCalColors[mNextAvailableCalendar-1] = kkf; 501 mDefCalColors[mNextAvailableCalendar-1] = kkf;
502 ++mNextAvailableCalendar; 502 ++mNextAvailableCalendar;
503 kkf->mDefaultColor = mEventColor; 503 kkf->mDefaultColor = mEventColor;
504 kkf->mName = i18n("New Calendar"); 504 kkf->mName = i18n("New Calendar");
505 mCalendars.append( kkf ); 505 mCalendars.append( kkf );
506 return kkf; 506 return kkf;
507} 507}
508void KOPrefs::deleteCalendar( int num ) 508void KOPrefs::deleteCalendar( int num )
509{ 509{
510 KopiCalendarFile * kkf = mCalendars.first(); 510 KopiCalendarFile * kkf = mCalendars.first();
511 while ( kkf ) { 511 while ( kkf ) {
512 if ( kkf->mCalNumber == num ) { 512 if ( kkf->mCalNumber == num ) {
513 qDebug("KOPrefs::deleteCalendar %d ", num ); 513 qDebug("KOPrefs::deleteCalendar %d ", num );
514 mCalendars.remove( kkf ); 514 mCalendars.remove( kkf );
515 delete kkf; 515 delete kkf;
516 return; 516 return;
517 } 517 }
518 kkf = mCalendars.next(); 518 kkf = mCalendars.next();
519 } 519 }
520} 520}
521int KOPrefs::getCalendarID( const QString & name ) 521int KOPrefs::getCalendarID( const QString & name )
522{ 522{
523 KopiCalendarFile * kkf = mCalendars.first(); 523 KopiCalendarFile * kkf = mCalendars.first();
524 while ( kkf ) { 524 while ( kkf ) {
525 if ( name == kkf->mName) 525 if ( name == kkf->mName)
526 return kkf->mCalNumber; 526 return kkf->mCalNumber;
527 kkf = mCalendars.next(); 527 kkf = mCalendars.next();
528 } 528 }
529 return 1; 529 return 1;
530} 530}
531int KOPrefs::getFuzzyCalendarID( const QString & name )
532{
533 KopiCalendarFile * kkf = mCalendars.first();
534 while ( kkf ) {
535 if ( name.lower() == kkf->mName.lower())
536 return kkf->mCalNumber;
537 kkf = mCalendars.next();
538 }
539 return 0;
540}
531QString KOPrefs::calName( int calNum) const 541QString KOPrefs::calName( int calNum) const
532{ 542{
533 return (mDefCalColors[calNum-1])->mName; 543 return (mDefCalColors[calNum-1])->mName;
534} 544}
535QColor KOPrefs::defaultColor( int calNum ) const 545QColor KOPrefs::defaultColor( int calNum ) const
536{ 546{
537 if ( calNum == 1 ) return mEventColor; 547 if ( calNum == 1 ) return mEventColor;
538 return (mDefCalColors[calNum-1])->mDefaultColor; 548 return (mDefCalColors[calNum-1])->mDefaultColor;
539} 549}
540void KOPrefs::usrWriteConfig() 550void KOPrefs::usrWriteConfig()
541{ 551{
542 config()->setGroup("General"); 552 config()->setGroup("General");
543 config()->writeEntry("Custom Categories",mCustomCategories); 553 config()->writeEntry("Custom Categories",mCustomCategories);
544 554
545 config()->setGroup("Personal Settings"); 555 config()->setGroup("Personal Settings");
546 config()->writeEntry("user_name",mName); 556 config()->writeEntry("user_name",mName);
547 config()->writeEntry("user_email",mEmail); 557 config()->writeEntry("user_email",mEmail);
548 558
549 config()->setGroup("Category Colors"); 559 config()->setGroup("Category Colors");
550 QDictIterator<QColor> it(mCategoryColors); 560 QDictIterator<QColor> it(mCategoryColors);
551 while (it.current()) { 561 while (it.current()) {
552 config()->writeEntry(it.currentKey(),*(it.current())); 562 config()->writeEntry(it.currentKey(),*(it.current()));
553 ++it; 563 ++it;
554 } 564 }
555 KConfig fc (locateLocal("config","kopicalendarrc")); 565 KConfig fc (locateLocal("config","kopicalendarrc"));
556 fc.setGroup("CC"); 566 fc.setGroup("CC");
557 fc.deleteGroup( "CC"); 567 fc.deleteGroup( "CC");
558 fc.setGroup("CC"); 568 fc.setGroup("CC");
559 fc.writeEntry("NumberCalendars",mCalendars.count()); 569 fc.writeEntry("NumberCalendars",mCalendars.count());
560 int numCal = 1; 570 int numCal = 1;
561 int writeCal = 0; 571 int writeCal = 0;
562 while ( numCal < mNextAvailableCalendar ) { 572 while ( numCal < mNextAvailableCalendar ) {
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index bac8010..70da096 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -76,64 +76,65 @@ class KopiCalendarFile : public QObject
76class KOPrefs : public KPimPrefs 76class KOPrefs : public KPimPrefs
77{ 77{
78 public: 78 public:
79 enum { FormatVCalendar, FormatICalendar }; 79 enum { FormatVCalendar, FormatICalendar };
80 enum { MailClientKMail, MailClientSendmail }; 80 enum { MailClientKMail, MailClientSendmail };
81 enum { IMIPDummy, IMIPKMail }; 81 enum { IMIPDummy, IMIPKMail };
82 enum { IMIPOutbox, IMIPdirectsend }; 82 enum { IMIPOutbox, IMIPdirectsend };
83 enum { neverAuto, addressbookAuto, selectedAuto }; 83 enum { neverAuto, addressbookAuto, selectedAuto };
84 enum { standardDestination, askDestination }; 84 enum { standardDestination, askDestination };
85 85
86 virtual ~KOPrefs(); 86 virtual ~KOPrefs();
87 87
88 /** Get instance of KOPrefs. It is made sure that there is only one 88 /** Get instance of KOPrefs. It is made sure that there is only one
89 instance. */ 89 instance. */
90 static KOPrefs *instance(); 90 static KOPrefs *instance();
91 91
92 /** Set preferences to default values */ 92 /** Set preferences to default values */
93 void usrSetDefaults(); 93 void usrSetDefaults();
94 94
95 /** Read preferences from config file */ 95 /** Read preferences from config file */
96 void usrReadConfig(); 96 void usrReadConfig();
97 97
98 /** Write preferences to config file */ 98 /** Write preferences to config file */
99 void usrWriteConfig(); 99 void usrWriteConfig();
100 void setCategoryDefaults(); 100 void setCategoryDefaults();
101 void setAllDefaults(); 101 void setAllDefaults();
102 KopiCalendarFile * getNewCalendar(); 102 KopiCalendarFile * getNewCalendar();
103 KopiCalendarFile * getCalendar( int ); 103 KopiCalendarFile * getCalendar( int );
104 void deleteCalendar( int ); 104 void deleteCalendar( int );
105 QColor defaultColor( int ) const; 105 QColor defaultColor( int ) const;
106 QString calName( int ) const; 106 QString calName( int ) const;
107 int getCalendarID( const QString & name ); 107 int getCalendarID( const QString & name );
108 int getFuzzyCalendarID( const QString & name );
108 protected: 109 protected:
109 void setTimeZoneIdDefault(); 110 void setTimeZoneIdDefault();
110 111
111 /** Fill empty mail fields with default values. */ 112 /** Fill empty mail fields with default values. */
112 void fillMailDefaults(); 113 void fillMailDefaults();
113 114
114 private: 115 private:
115 /** Constructor disabled for public. Use instance() to create a KOPrefs 116 /** Constructor disabled for public. Use instance() to create a KOPrefs
116 object. */ 117 object. */
117 KOPrefs(); 118 KOPrefs();
118 119
119 static KOPrefs *mInstance; 120 static KOPrefs *mInstance;
120 QStringList getDefaultList(); 121 QStringList getDefaultList();
121 QStringList getLocationDefaultList(); 122 QStringList getLocationDefaultList();
122 public: 123 public:
123 // preferences data 124 // preferences data
124 KConfig* getConfig(); 125 KConfig* getConfig();
125 void setFullName(const QString &); 126 void setFullName(const QString &);
126 QString fullName(); 127 QString fullName();
127 void setEmail(const QString &); 128 void setEmail(const QString &);
128 QString email(); 129 QString email();
129 130
130 QString mAdditional; 131 QString mAdditional;
131 132
132 bool mEmailControlCenter; 133 bool mEmailControlCenter;
133 134
134 bool mBcc; 135 bool mBcc;
135 bool mAutoSave; 136 bool mAutoSave;
136 int mAutoSaveInterval; 137 int mAutoSaveInterval;
137 bool mConfirm; 138 bool mConfirm;
138 139
139 bool mEnableGroupScheduling; 140 bool mEnableGroupScheduling;