author | zautrix <zautrix> | 2004-10-04 21:21:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-04 21:21:00 (UTC) |
commit | f53ef630b9299ceae666e64da8ce022813795ed6 (patch) (side-by-side diff) | |
tree | 26dc94a83f42c2174195817c505c34941246d2e3 | |
parent | dfc6d084410456037bf6f26f741e7b938085de88 (diff) | |
download | kdepimpi-f53ef630b9299ceae666e64da8ce022813795ed6.zip kdepimpi-f53ef630b9299ceae666e64da8ce022813795ed6.tar.gz kdepimpi-f53ef630b9299ceae666e64da8ce022813795ed6.tar.bz2 |
added option to sync config dialog
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 70 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.h | 15 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.cpp | 49 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.h | 37 |
4 files changed, 169 insertions, 2 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 28aac45..f05c846 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp @@ -181,28 +181,30 @@ void KSyncPrefsDialog::setupSyncAlgTab() topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); ++iii; topLayout->addMultiCellWidget(new QLabel( i18n("---- Max. weeks in future: ") , topFrame ), iii,iii,0,0); mWriteBackFutureWeeks= new QSpinBox(1,104, 1, topFrame); topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); ++iii; proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); gr = proGr; topLayout->addMultiCellWidget(gr, iii,iii,0,1); ++iii; mIsLocal = new QRadioButton ( i18n("Local file"), gr ); + mIsPi = new QRadioButton ( i18n("Quick Pi-Sync"), gr ); + connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); - connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); + connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); phoneWidget = new QVBox( topFrame); topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); ++iii; mWriteContactToSIM= new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); QHBox* temphb = new QHBox( phoneWidget ); new QLabel( i18n("I/O device: "), temphb ); mPhoneDevice = new QLineEdit( temphb); button = new QPushButton( i18n("Help..."), temphb ); connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); @@ -267,27 +269,58 @@ void KSyncPrefsDialog::setupSyncAlgTab() temphb = new QHBox( remoteFileWidget ); mRemotePostcommand = new QLineEdit(temphb ); mRemotePostcommandAB = new QLineEdit(temphb ); mRemotePostcommandPWM = new QLineEdit(temphb ); lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); temphb = new QHBox( remoteFileWidget ); button = new QPushButton( i18n("ssh/scp"), temphb ); connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); button = new QPushButton( i18n("ftp"), temphb ); connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); - + + // *** pi-sync + piWidget = new QVBox( topFrame); + topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); + ++iii; + temphb = new QHBox( piWidget ); + new QLabel( i18n("Calendar:"), temphb); + new QLabel( i18n("AddressBook:"), temphb); + new QLabel( i18n("PWManager:"), temphb); + + lab = new QLabel( i18n("Password for remote access:"), piWidget); + temphb = new QHBox( piWidget ); + mRemotePw = new QLineEdit(temphb); + mRemotePwAB = new QLineEdit(temphb); + mRemotePwPWM = new QLineEdit(temphb); + + lab = new QLabel( i18n("Remote IP address:"), piWidget); + temphb = new QHBox( piWidget ); + mRemoteIP = new QLineEdit(temphb); + mRemoteIPAB = new QLineEdit(temphb); + mRemoteIPPWM = new QLineEdit(temphb); + + lab = new QLabel( i18n("Remote port number:"), piWidget); + temphb = new QHBox( piWidget ); + mRemotePort = new QLineEdit(temphb); + mRemotePortAB = new QLineEdit(temphb); + mRemotePortPWM = new QLineEdit(temphb); } + + + + + void KSyncPrefsDialog::slotOK() { if ( mMyMachineName->text() == "undefined" ) { KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error")); return; } int i; for (i = 0; i < mSyncProfileNames.count(); ++ i) { if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); return; } @@ -344,24 +377,37 @@ void KSyncPrefsDialog::textChanged( const QString & s ) mProfileBox->changeItem ( s, mProfileBox-> currentItem () ) ; KSyncProfile* prof = mSyncProfiles.at(mProfileBox-> currentItem ()) ; prof->setName( s ); mSyncProfileNames[mProfileBox-> currentItem ()] = s; } void KSyncPrefsDialog::profileChanged( int item ) { //qDebug("KSyncPrefsDialog::profileChanged before %d, count %d ", item, mProfileBox->count() ); KSyncProfile* prof; saveProfile(); currentSelection = item; prof = mSyncProfiles.at(item) ; + + mRemotePw->setText(prof->getRemotePw()); + mRemoteIP->setText(prof->getRemoteIP()); + mRemotePort->setText(prof->getRemotePort()); + + mRemotePwAB->setText(prof->getRemotePwAB()); + mRemoteIPAB->setText(prof->getRemoteIPAB()); + mRemotePortAB->setText(prof->getRemotePortAB()); + + mRemotePwPWM->setText(prof->getRemotePwPWM()); + mRemoteIPPWM->setText(prof->getRemoteIPPWM()); + mRemotePortPWM->setText(prof->getRemotePortPWM()); + mRemotePrecommand->setText(prof->getPreSyncCommand()); mRemotePostcommand->setText(prof->getPostSyncCommand()); mLocalTempFile->setText(prof->getLocalTempFile()); mRemoteFile->setText(prof->getRemoteFileName()) ; mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); mLocalTempFileAB->setText(prof->getLocalTempFileAB()); mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ; mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM()); mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM()); @@ -407,24 +453,25 @@ void KSyncPrefsDialog::profileChanged( int item ) break; default: break; } mIsLocal->setChecked(prof->getIsLocalFileSync()) ; mIsPhone->setChecked(prof->getIsPhoneSync()) ; mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() ); proGr->setEnabled( item > 2 ); if ( item < 3 ) { localFileWidget->hide(); remoteFileWidget->hide(); phoneWidget->hide(); + piWidget->hide(); } else kindChanged( prof->getIsLocalFileSync() ); } void KSyncPrefsDialog::fillSSH() { mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); mLocalTempFile->setText("/tmp/mycalendar.ics" ); mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); mLocalTempFileAB->setText("/tmp/std.vcf" ); @@ -457,46 +504,65 @@ void KSyncPrefsDialog::kindChanged( bool b ) if ( mIsNotLocal->isChecked () ) remoteFileWidget->show(); else remoteFileWidget->hide(); if ( mIsPhone->isChecked () ) { phoneWidget->show(); } else { phoneWidget->hide(); } + if ( mIsPi->isChecked () ) { + piWidget->show(); + } + else { + piWidget->hide(); + } } void KSyncPrefsDialog::deleteProfile() { //qDebug("KSyncPrefsDialog::deleteProfile() "); if ( currentSelection >= 0 ) { if ( currentSelection < 3 ) { KMessageBox::error(this,i18n("This profil cannot be deleted!\n"),i18n("KO/Pi config error")); return; } KSyncProfile* temp = mSyncProfiles.at(currentSelection); mSyncProfiles.remove( temp ); mSyncProfileNames.remove( mSyncProfileNames.at( currentSelection )); insertProfiles(); } } void KSyncPrefsDialog::saveProfile() { KSyncProfile* prof; if ( currentSelection >= 0 ) { prof = mSyncProfiles.at(currentSelection) ; + + prof->setRemotePw( mRemotePw->text()); + prof->setRemoteIP( mRemoteIP->text()); + prof->setRemotePort( mRemotePort->text()); + + prof->setRemotePwAB( mRemotePwAB->text()); + prof->setRemoteIPAB( mRemoteIPAB->text()); + prof->setRemotePortAB( mRemotePortAB->text()); + + prof->setRemotePwPWM( mRemotePwPWM->text()); + prof->setRemoteIPPWM( mRemoteIPPWM->text()); + prof->setRemotePortPWM( mRemotePortPWM->text()); + prof->setPreSyncCommand( mRemotePrecommand->text()); prof->setPostSyncCommand( mRemotePostcommand->text() ); prof->setLocalTempFile( mLocalTempFile->text()); prof->setRemoteFileName( mRemoteFile->text() ); prof->setPreSyncCommandAB( mRemotePrecommandAB->text()); prof->setPostSyncCommandAB( mRemotePostcommandAB->text() ); prof->setLocalTempFileAB( mLocalTempFileAB->text()); prof->setRemoteFileNameAB( mRemoteFileAB->text() ); prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h index 8094bdd..d3f8f4c 100644 --- a/libkdepim/ksyncprefsdialog.h +++ b/libkdepim/ksyncprefsdialog.h @@ -81,24 +81,25 @@ class KSyncPrefsDialog : public KDialog void setupSyncAlgTab(); private: int currentSelection; QPtrList<KSyncProfile> mSyncProfiles; QStringList mSyncProfileNames; QLineEdit * mMyMachineName; QComboBox * mProfileBox; QRadioButton* mIsLocal; QRadioButton* mIsNotLocal; QRadioButton* mIsPhone; + QRadioButton* mIsPi; QCheckBox* mIncludeInRing; QCheckBox* mIncludeInRingAB; QCheckBox* mIncludeInRingPWM; void addProfile ( KSyncProfile* ); void insertProfiles(); void saveProfile(); QButtonGroup* proGr; QRadioButton* loc, *rem, *newest, *ask, *f_loc,* f_rem, *both; QLineEdit * mRemotePostcommand; @@ -107,30 +108,44 @@ class KSyncPrefsDialog : public KDialog QLineEdit * mLocalTempFile; QLineEdit * mRemotePostcommandAB; QLineEdit * mRemotePrecommandAB; QLineEdit * mRemoteFileAB; QLineEdit * mLocalTempFileAB; QLineEdit * mRemotePostcommandPWM; QLineEdit * mRemotePrecommandPWM; QLineEdit * mRemoteFilePWM; QLineEdit * mLocalTempFilePWM; + + QLineEdit * mRemotePw; + QLineEdit * mRemoteIP; + QLineEdit * mRemotePort; + + QLineEdit * mRemotePwAB; + QLineEdit * mRemoteIPAB; + QLineEdit * mRemotePortAB; + + QLineEdit * mRemotePwPWM; + QLineEdit * mRemoteIPPWM; + QLineEdit * mRemotePortPWM; + QLineEdit * mPhoneDevice; QLineEdit * mPhoneConnection; QLineEdit * mPhoneModel; QWidget* mSetupSyncAlgTab; QVBox* localFileWidget; QVBox* remoteFileWidget; QVBox* phoneWidget; + QVBox* piWidget; QCheckBox* mWriteBackFile; QCheckBox* mWriteBackFuture; QSpinBox* mWriteBackFutureWeeks; QCheckBox* mWriteBackExisting; QCheckBox* mAskForPreferences; QCheckBox* mShowSummaryAfterSync; QCheckBox* mWriteContactToSIM; }; #endif diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index 2bf4e6c..76dfe00 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp @@ -34,95 +34,130 @@ KSyncProfile::KSyncProfile(): QObject () { setDefault(); } KSyncProfile::~KSyncProfile() { } KSyncProfile* KSyncProfile::clone() { KSyncProfile* myClone = new KSyncProfile(); + myClone->setRemotePw(mRemotePw); + myClone->setRemoteIP(mRemoteIP); + myClone->setRemotePort(mRemotePort); + myClone->setRemotePwAB(mRemotePwAB); + myClone->setRemoteIPAB(mRemoteIPAB); + myClone->setRemotePortAB(mRemotePortAB); + myClone->setRemotePwPWM(mRemotePwPWM); + myClone->setRemoteIPPWM(mRemoteIPPWM); + myClone->setRemotePortPWM (mRemotePortPWM); myClone->setPreSyncCommand( mPreSyncCommand ); myClone->setPostSyncCommand( mPostSyncCommand ); myClone->setLocalTempFile( mLocalTempFile); myClone->setRemoteFileName( mRemoteFileName ); myClone->setPreSyncCommandAB( mPreSyncCommandAB ); myClone->setPostSyncCommandAB( mPostSyncCommandAB ); myClone->setLocalTempFileAB( mLocalTempFileAB); myClone->setRemoteFileNameAB( mRemoteFileNameAB ); myClone->setPreSyncCommandPWM( mPreSyncCommandPWM ); myClone->setPostSyncCommandPWM( mPostSyncCommandPWM ); myClone->setLocalTempFilePWM( mLocalTempFilePWM); myClone->setRemoteFileNamePWM( mRemoteFileNamePWM ); myClone->setShowSummaryAfterSync( mShowSummaryAfterSync ); myClone->setAskForPreferences( mAskForPreferences); myClone->setWriteBackExisting(mWriteBackExisting ); myClone->setWriteBackFile( mWriteBackFile); myClone->setWriteBackFuture( mWriteBackFuture ); myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); myClone->setIncludeInRingSync( mIncludeInRingSync ); myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM ); myClone->setSyncPrefs( mSyncPrefs); myClone->setIsLocalFileSync( mIsLocalFileSync ); myClone->setIsPhoneSync( mIsPhoneSync ); + myClone->setIsPiSync( mIsPiSync ); myClone->setWriteContactToSIM( mWriteContactToSIM ); myClone->setName( "noName" ); //myClone->setIdentifier( "noID" ); return myClone; } void KSyncProfile::setDefault() { mPreSyncCommand = i18n("command for downloading remote file to local device"); mPostSyncCommand = i18n("command for uploading local temp file to remote device"); mLocalTempFile = "/tmp/mycalendar.ics"; mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; mPreSyncCommandAB = i18n("command for downloading remote file to local device"); mPostSyncCommandAB = i18n("command for uploading local temp file to remote device"); mLocalTempFileAB = "/tmp/std.vcf"; mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf"; mPreSyncCommandPWM = i18n("command for downloading remote file to local device"); mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device"); mLocalTempFilePWM = "/tmp/passwords.pwm"; mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm"; + + mRemotePw = "abc"; + mRemoteIP = "192.168.0.99"; + mRemotePort = "9197"; + + mRemotePwAB = "abc"; + mRemoteIPAB = "192.168.0.99"; + mRemotePortAB = "9198"; + + mRemotePwPWM = "abc"; + mRemoteIPPWM = "192.168.0.99"; + mRemotePortPWM = "9199"; + mShowSummaryAfterSync = true; mAskForPreferences = true; mWriteBackExisting = false; mWriteBackFuture = false; mWriteBackFutureWeeks = 12; mWriteBackFile = true; mIncludeInRingSync = false; mIncludeInRingSyncAB = false; mIncludeInRingSyncPWM = false; mSyncPrefs = SYNC_PREF_ASK; mIsLocalFileSync = true; mName = "noName"; mIsPhoneSync = false; + mIsPiSync = false; mWriteContactToSIM = false; mPhoneDevice = "/dev/ircomm"; mPhoneConnection = "irda"; mPhoneModel = "6310i"; } void KSyncProfile::readConfig(KConfig *config ) { if (config) { config->setGroup( mName ); mName = config->readEntry( "Name", mName ); + + mRemotePw = config->readEntry( "RemotePw",mRemotePw ); + mRemoteIP = config->readEntry( "RemoteIP",mRemoteIP ); + mRemotePort = config->readEntry( "RemotePort", mRemotePort ); + mRemotePwAB = config->readEntry( "RemotePwAB", mRemotePwAB ); + mRemoteIPAB = config->readEntry( "RemoteIPAB", mRemoteIPAB ); + mRemotePortAB = config->readEntry( "RemotePortAB", mRemotePortAB ); + mRemotePwPWM = config->readEntry( "RemotePwPWM", mRemotePwPWM ); + mRemoteIPPWM = config->readEntry( "RemoteIPPWM", mRemoteIPPWM ); + mRemotePortPWM = config->readEntry( "RemotePortPWM", mRemotePortPWM ); + mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand ); mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand ); mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile ); mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName ); mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB ); mPostSyncCommandAB = config->readEntry( "PostSyncCommandAB", mPostSyncCommandAB ); mLocalTempFileAB = config->readEntry( "LocalTempFileAB", mLocalTempFileAB ); mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB ); mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); @@ -137,40 +172,53 @@ void KSyncProfile::readConfig(KConfig *config ) mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences ); mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting ); mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile ); mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM ); mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs ); mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks ); mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync ); mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync ); + mIsPiSync= config->readBoolEntry( "IsPiSync", mIsPiSync ); } else { setDefault(); } } void KSyncProfile::deleteConfig(KConfig *config ) { config->deleteGroup( mName ); } void KSyncProfile::writeConfig( KConfig * config ) { config->setGroup(mName); + config->writeEntry( "RemotePw", mRemotePw); + config->writeEntry( "RemoteIP", mRemoteIP); + config->writeEntry( "RemotePort", mRemotePort); + + config->writeEntry( "RemotePwAB", mRemotePwAB); + config->writeEntry( "RemoteIPAB", mRemoteIPAB); + config->writeEntry( "RemotePortAB", mRemotePortAB); + + config->writeEntry( "RemotePwPWM", mRemotePwPWM); + config->writeEntry( "RemoteIPPWM", mRemoteIPPWM); + config->writeEntry( "RemotePortPWM", mRemotePortPWM); + config->writeEntry( "Name", mName ); config->writeEntry( "PreSyncCommand",mPreSyncCommand ); config->writeEntry( "PostSyncCommand", mPostSyncCommand ); config->writeEntry( "LocalTempFile", mLocalTempFile ); config->writeEntry( "RemoteFileName", mRemoteFileName ); config->writeEntry( "PreSyncCommandAB",mPreSyncCommandAB ); config->writeEntry( "PostSyncCommandAB", mPostSyncCommandAB ); config->writeEntry( "LocalTempFileAB", mLocalTempFileAB ); config->writeEntry( "RemoteFileNameAB", mRemoteFileNameAB ); config->writeEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); @@ -186,14 +234,15 @@ void KSyncProfile::writeConfig( KConfig * config ) config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); config->writeEntry( "AskForPreferences",mAskForPreferences ); config->writeEntry( "WriteBackExisting",mWriteBackExisting ); config->writeEntry( "WriteBackFuture",mWriteBackFuture ); config->writeEntry( "WriteBackFile",mWriteBackFile ); config->writeEntry( "WriteContactToSIM",mWriteContactToSIM ); config->writeEntry( "SyncPrefs", mSyncPrefs ); config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks); config->writeEntry( "IsLocalFileSync", mIsLocalFileSync ); config->writeEntry( "IsPhoneSync", mIsPhoneSync ); + config->writeEntry( "IsPiSync", mIsPiSync ); } diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h index a81a9ad..6a68bd7 100644 --- a/libkdepim/ksyncprofile.h +++ b/libkdepim/ksyncprofile.h @@ -36,24 +36,45 @@ class KConfig; class KSyncProfile : public QObject { public: KSyncProfile(); ~KSyncProfile() ; KSyncProfile* clone(); void setDefault(); void readConfig(KConfig *); void writeConfig(KConfig *); void deleteConfig(KConfig *); + void setRemotePw( const QString& n ) {mRemotePw = n;} + QString getRemotePw( ) { return mRemotePw; } + void setRemotePwAB( const QString& n ) {mRemotePwAB = n;} + QString getRemotePwAB( ) { return mRemotePwAB; } + void setRemotePwPWM( const QString& n ) {mRemotePwPWM = n;} + QString getRemotePwPWM( ) { return mRemotePwPWM; } + + void setRemoteIP( const QString& n ) {mRemoteIP = n;} + QString getRemoteIP( ) { return mRemoteIP; } + void setRemoteIPAB( const QString& n ) {mRemoteIPAB = n;} + QString getRemoteIPAB( ) { return mRemoteIPAB; } + void setRemoteIPPWM( const QString& n ) {mRemoteIPPWM = n;} + QString getRemoteIPPWM( ) { return mRemoteIPPWM; } + + void setRemotePort( const QString& n ) {mRemotePort = n;} + QString getRemotePort( ) { return mRemotePort; } + void setRemotePortAB( const QString& n ) {mRemotePortAB = n;} + QString getRemotePortAB( ) { return mRemotePortAB; } + void setRemotePortPWM( const QString& n ) {mRemotePortPWM = n;} + QString getRemotePortPWM( ) { return mRemotePortPWM; } + void setPreSyncCommand( const QString& n ) {mPreSyncCommand = n;} QString getPreSyncCommand( ) { return mPreSyncCommand; } void setPostSyncCommand( const QString& n ) {mPostSyncCommand = n;} QString getPostSyncCommand( ) { return mPostSyncCommand;} void setLocalTempFile( const QString& n ) { mLocalTempFile= n;} QString getLocalTempFile( ) { return mLocalTempFile;} void setRemoteFileName( const QString& n ) { mRemoteFileName = n;} QString getRemoteFileName( ) { return mRemoteFileName;} void setPreSyncCommandAB( const QString& n ) {mPreSyncCommandAB = n;} QString getPreSyncCommandAB( ) { return mPreSyncCommandAB; } void setPostSyncCommandAB( const QString& n ) {mPostSyncCommandAB = n;} @@ -102,47 +123,63 @@ class KSyncProfile : public QObject { void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;} bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;} void setIncludeInRingSyncPWM( bool b ) {mIncludeInRingSyncPWM = b;} bool getIncludeInRingSyncPWM( ) { return mIncludeInRingSyncPWM;} void setSyncPrefs( int n ) { mSyncPrefs= n;} int getSyncPrefs( ) { return mSyncPrefs;} void setWriteBackFutureWeeks( int n ) { mWriteBackFutureWeeks= n;} int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;} void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;} bool getIsLocalFileSync( ) { return mIsLocalFileSync;} void setIsPhoneSync( bool b ) { mIsPhoneSync= b;} bool getIsPhoneSync( ) { return mIsPhoneSync;} + void setIsPiSync( bool b ) { mIsPiSync= b;} + bool getIsPiSync( ) { return mIsPiSync;} private: QString mName; QString mPreSyncCommand; QString mPostSyncCommand; QString mLocalTempFile; QString mRemoteFileName; QString mPreSyncCommandAB; QString mPostSyncCommandAB; QString mLocalTempFileAB; QString mRemoteFileNameAB; QString mPreSyncCommandPWM; QString mPostSyncCommandPWM; QString mLocalTempFilePWM; QString mRemoteFileNamePWM; + QString mRemotePw; + QString mRemoteIP; + QString mRemotePort; + + QString mRemotePwAB; + QString mRemoteIPAB; + QString mRemotePortAB; + + QString mRemotePwPWM; + QString mRemoteIPPWM; + QString mRemotePortPWM; + QString mPhoneDevice; QString mPhoneConnection; QString mPhoneModel; bool mIncludeInRingSync; bool mIncludeInRingSyncAB; bool mIncludeInRingSyncPWM; int mSyncPrefs; bool mWriteBackFile; bool mWriteBackExisting; bool mWriteBackFuture; int mWriteBackFutureWeeks; bool mAskForPreferences; bool mShowSummaryAfterSync; bool mIsLocalFileSync; bool mIsPhoneSync; bool mWriteContactToSIM; + + bool mIsPiSync; }; #endif |