-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 7 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.h | 1 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.cpp | 4 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.h | 3 |
4 files changed, 14 insertions, 1 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 3df2a3b..7c04f48 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp @@ -137,15 +137,18 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); topLayout->addWidget(lab ,iii,0); topLayout->addWidget(mProfileBox, iii,1); ++iii; - mIncludeInRing = new QCheckBox( i18n("Include in multiple sync"), topFrame ); + mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame ); topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1); ++iii; + mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame ); + topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1); + ++iii; mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); ++iii; QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); topLayout->addMultiCellWidget(gr, iii,iii,0,1); @@ -272,12 +275,13 @@ void KSyncPrefsDialog::profileChanged( int item ) mRemoteFile->setText(prof->getRemoteFileName()) ; mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); mAskForPreferences->setChecked( prof->getAskForPreferences()); mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); mWriteBackFile->setChecked( prof->getWriteBackFile()); mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); + mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); switch ( prof->getSyncPrefs() ) { case 0: loc->setChecked( true); break; case 1: @@ -358,12 +362,13 @@ void KSyncPrefsDialog::saveProfile() prof->setRemoteFileName( mRemoteFile->text() ); prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); prof->setAskForPreferences( mAskForPreferences->isChecked()); prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); prof->setWriteBackFile( mWriteBackFile->isChecked()); prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); + prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; prof->setSyncPrefs( syncprefs); prof->setIsLocalFileSync( mIsLocal->isChecked() ); } } diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h index 90fa286..c663d22 100644 --- a/libkdepim/ksyncprefsdialog.h +++ b/libkdepim/ksyncprefsdialog.h @@ -82,12 +82,13 @@ class KSyncPrefsDialog : public KDialog QStringList mSyncProfileNames; QLineEdit * mMyMachineName; QComboBox * mProfileBox; QRadioButton* mIsLocal; QRadioButton* mIsNotLocal; QCheckBox* mIncludeInRing; + QCheckBox* mIncludeInRingAB; void addProfile ( KSyncProfile* ); void insertProfiles(); void saveProfile(); QButtonGroup* proGr; QRadioButton* loc, *rem, *newest, *ask, *f_loc,* f_rem, *both; diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index d6d8fa3..ea41a85 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp @@ -49,12 +49,13 @@ KSyncProfile* KSyncProfile::clone() myClone->setRemoteFileName( mRemoteFileName ); myClone->setShowSummaryAfterSync( mShowSummaryAfterSync ); myClone->setAskForPreferences( mAskForPreferences); myClone->setWriteBackExisting(mWriteBackExisting ); myClone->setWriteBackFile( mWriteBackFile); myClone->setIncludeInRingSync( mIncludeInRingSync ); + myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); myClone->setSyncPrefs( mSyncPrefs); myClone->setIsLocalFileSync( mIsLocalFileSync ); myClone->setName( "noName" ); return myClone; } @@ -68,24 +69,26 @@ void KSyncProfile::setDefault() mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; mShowSummaryAfterSync = true; mAskForPreferences = true; mWriteBackExisting = false; mWriteBackFile = true; mIncludeInRingSync = false; + mIncludeInRingSyncAB = false; mSyncPrefs = SYNC_PREF_ASK; mIsLocalFileSync = true; } void KSyncProfile::readConfig(KConfig *config ) { config->setGroup("SyncProfiles"); QString prefix = "Profile_"+mName+"_"; //mName = config->readEntry( prefix+ "Name", mName ); mPreSyncCommand = config->readEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); mPostSyncCommand = config->readEntry( prefix+ "PostSyncCommand", mPostSyncCommand ); mIncludeInRingSync = config->readBoolEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync ); + mIncludeInRingSyncAB = config->readBoolEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB ); mLocalTempFile = config->readEntry( prefix+ "LocalTempFile", mLocalTempFile ); mRemoteFileName = config->readEntry( prefix+ "RemoteFileName", mRemoteFileName ); mShowSummaryAfterSync = config->readBoolEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync ); mAskForPreferences = config->readBoolEntry( prefix+ "AskForPreferences",mAskForPreferences ); mWriteBackExisting = config->readBoolEntry( prefix+ "WriteBackExisting",mWriteBackExisting ); mSyncPrefs = config->readNumEntry( prefix+ "SyncPrefs", mSyncPrefs ); @@ -96,12 +99,13 @@ void KSyncProfile::writeConfig( KConfig * config ) config->setGroup("SyncProfiles"); QString prefix = "Profile_"+mName+"_"; // config->writeEntry( prefix+ "Name", mName ); config->writeEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); config->writeEntry( prefix+ "PostSyncCommand", mPostSyncCommand ); config->writeEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync ); + config->writeEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB ); config->writeEntry( prefix+ "LocalTempFile", mLocalTempFile ); config->writeEntry( prefix+ "RemoteFileName", mRemoteFileName ); config->writeEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync ); config->writeEntry( prefix+ "AskForPreferences",mAskForPreferences ); config->writeEntry( prefix+ "WriteBackExisting",mWriteBackExisting ); config->writeEntry( prefix+ "SyncPrefs", mSyncPrefs ); diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h index 3f7f1ac..df1b49e 100644 --- a/libkdepim/ksyncprofile.h +++ b/libkdepim/ksyncprofile.h @@ -76,24 +76,27 @@ class KSyncProfile : public QObject { void setWriteBackExisting( bool b ) { mWriteBackExisting = b;} bool getWriteBackExisting( ) { return mWriteBackExisting;} void setWriteBackFile( bool b ) { mWriteBackFile= b;} bool getWriteBackFile( ) { return mWriteBackFile;} void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;} bool getIncludeInRingSync( ) { return mIncludeInRingSync;} + void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;} + bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;} void setSyncPrefs( int n ) { mSyncPrefs= n;} int getSyncPrefs( ) { return mSyncPrefs;} void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;} bool getIsLocalFileSync( ) { return mIsLocalFileSync;} private: QString mName; QString mPreSyncCommand; QString mPostSyncCommand; QString mLocalTempFile; QString mRemoteFileName; bool mIncludeInRingSync; + bool mIncludeInRingSyncAB; int mSyncPrefs; bool mWriteBackFile; bool mWriteBackExisting; bool mAskForPreferences; bool mShowSummaryAfterSync; bool mIsLocalFileSync; |