summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/ksyncprefsdialog.cpp41
-rw-r--r--libkdepim/ksyncprefsdialog.h7
-rw-r--r--libkdepim/ksyncprofile.cpp24
-rw-r--r--libkdepim/ksyncprofile.h16
4 files changed, 86 insertions, 2 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index a1eebec..6e6e631 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -148,2 +148,5 @@ void KSyncPrefsDialog::setupSyncAlgTab()
++iii;
+ mIncludeInRingPWM = new QCheckBox( i18n("Include in multiple pwmanager sync"), topFrame );
+ topLayout->addMultiCellWidget(mIncludeInRingPWM, iii,iii,0,1);
+ ++iii;
@@ -226,2 +229,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
lab = new QLabel( i18n("Local file ABook:"), temphb );
+ lab = new QLabel( i18n("Local file PWMgr:"), temphb );
temphb = new QHBox( localFileWidget );
@@ -231,2 +235,4 @@ void KSyncPrefsDialog::setupSyncAlgTab()
connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
+ button = new QPushButton( i18n("Choose..."), temphb );
+ connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
temphb = new QHBox( localFileWidget );
@@ -235,2 +241,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mRemoteFileAB = new QLineEdit( temphb);
+ mRemoteFilePWM = new QLineEdit( temphb);
@@ -243,2 +250,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
new QLabel( i18n("AddressBook:"), temphb);
+ new QLabel( i18n("PWManager:"), temphb);
@@ -248,2 +256,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mRemotePrecommandAB = new QLineEdit(temphb);
+ mRemotePrecommandPWM = new QLineEdit(temphb);
@@ -253,2 +262,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mLocalTempFileAB = new QLineEdit(temphb);
+ mLocalTempFilePWM = new QLineEdit(temphb);
@@ -258,2 +268,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mRemotePostcommandAB = new QLineEdit(temphb );
+ mRemotePostcommandPWM = new QLineEdit(temphb );
@@ -303,3 +314,3 @@ void KSyncPrefsDialog::chooseFileAB()
- fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this );
+ fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this );
if ( fn == "" )
@@ -309,2 +320,12 @@ void KSyncPrefsDialog::chooseFileAB()
+void KSyncPrefsDialog::chooseFilePWM()
+{
+ QString fn = QDir::homeDirPath();
+
+ fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this );
+ if ( fn == "" )
+ return;
+ mRemoteFilePWM->setText( fn );
+}
+
void KSyncPrefsDialog::textChanged( const QString & s )
@@ -343,2 +364,7 @@ void KSyncPrefsDialog::profileChanged( int item )
+ mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM());
+ mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM());
+ mLocalTempFilePWM->setText(prof->getLocalTempFilePWM());
+ mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ;
+
mWriteContactToSIM->setChecked( prof->getWriteContactToSIM());
@@ -354,2 +380,3 @@ void KSyncPrefsDialog::profileChanged( int item )
mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() );
+ mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() );
mWriteBackFuture->setChecked( prof->getWriteBackFuture());
@@ -403,2 +430,5 @@ void KSyncPrefsDialog::fillSSH()
mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" );
+ mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" );
+ mLocalTempFilePWM->setText("/tmp/passwords.pwm" );
+ mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" );
}
@@ -413,2 +443,6 @@ void KSyncPrefsDialog::fillFTP()
+ mRemotePrecommandPWM->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm" );
+ mLocalTempFilePWM->setText("/tmp/passwords.pwm" );
+ mRemotePostcommandPWM->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" );
+
}
@@ -463,2 +497,6 @@ void KSyncPrefsDialog::saveProfile()
prof->setRemoteFileNameAB( mRemoteFileAB->text() );
+ prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text());
+ prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() );
+ prof->setLocalTempFilePWM( mLocalTempFilePWM->text());
+ prof->setRemoteFileNamePWM( mRemoteFilePWM->text() );
prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() );
@@ -469,2 +507,3 @@ void KSyncPrefsDialog::saveProfile()
prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() );
+ prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() );
int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ;
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index d4e1559..8094bdd 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -72,2 +72,3 @@ class KSyncPrefsDialog : public KDialog
void chooseFileAB();
+ void chooseFilePWM();
void slotOK();
@@ -93,2 +94,3 @@ class KSyncPrefsDialog : public KDialog
QCheckBox* mIncludeInRingAB;
+ QCheckBox* mIncludeInRingPWM;
void addProfile ( KSyncProfile* );
@@ -111,2 +113,7 @@ class KSyncPrefsDialog : public KDialog
+ QLineEdit * mRemotePostcommandPWM;
+ QLineEdit * mRemotePrecommandPWM;
+ QLineEdit * mRemoteFilePWM;
+ QLineEdit * mLocalTempFilePWM;
+
QLineEdit * mPhoneDevice;
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index c599208..a43ebe2 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -53,2 +53,6 @@ KSyncProfile* KSyncProfile::clone()
myClone->setRemoteFileNameAB( mRemoteFileNameAB );
+ myClone->setPreSyncCommandPWM( mPreSyncCommandPWM );
+ myClone->setPostSyncCommandPWM( mPostSyncCommandPWM );
+ myClone->setLocalTempFilePWM( mLocalTempFilePWM);
+ myClone->setRemoteFileNamePWM( mRemoteFileNamePWM );
myClone->setShowSummaryAfterSync( mShowSummaryAfterSync );
@@ -61,2 +65,3 @@ KSyncProfile* KSyncProfile::clone()
myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
+ myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM );
myClone->setSyncPrefs( mSyncPrefs);
@@ -80,3 +85,7 @@ void KSyncProfile::setDefault()
mLocalTempFileAB = "/tmp/std.vcf";
- mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf";
+ mRemoteFileNamePWM = "/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";
mShowSummaryAfterSync = true;
@@ -89,2 +98,3 @@ void KSyncProfile::setDefault()
mIncludeInRingSyncAB = false;
+ mIncludeInRingSyncPWM = false;
mSyncPrefs = SYNC_PREF_ASK;
@@ -116,2 +126,7 @@ void KSyncProfile::readConfig(KConfig *config )
+ mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM );
+ mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM );
+ mLocalTempFilePWM = config->readEntry( "LocalTempFilePWM", mLocalTempFilePWM );
+ mRemoteFileNamePWM = config->readEntry( "RemoteFileNamePWM", mRemoteFileNamePWM );
+
mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice );
@@ -122,2 +137,3 @@ void KSyncProfile::readConfig(KConfig *config )
mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
+ mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
@@ -159,2 +175,7 @@ void KSyncProfile::writeConfig( KConfig * config )
+ config->writeEntry( "PreSyncCommandPWM",mPreSyncCommandPWM );
+ config->writeEntry( "PostSyncCommandPWM", mPostSyncCommandPWM );
+ config->writeEntry( "LocalTempFilePWM", mLocalTempFilePWM );
+ config->writeEntry( "RemoteFileNamePWM", mRemoteFileNamePWM );
+
config->writeEntry( "PhoneDevice", mPhoneDevice );
@@ -165,2 +186,3 @@ void KSyncProfile::writeConfig( KConfig * config )
config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
+ config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 0039a4b..a81a9ad 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -65,2 +65,11 @@ class KSyncProfile : public QObject {
+ void setPreSyncCommandPWM( const QString& n ) {mPreSyncCommandPWM = n;}
+ QString getPreSyncCommandPWM( ) { return mPreSyncCommandPWM; }
+ void setPostSyncCommandPWM( const QString& n ) {mPostSyncCommandPWM = n;}
+ QString getPostSyncCommandPWM( ) { return mPostSyncCommandPWM;}
+ void setLocalTempFilePWM( const QString& n ) { mLocalTempFilePWM= n;}
+ QString getLocalTempFilePWM( ) { return mLocalTempFilePWM;}
+ void setRemoteFileNamePWM( const QString& n ) { mRemoteFileNamePWM = n;}
+ QString getRemoteFileNamePWM( ) { return mRemoteFileNamePWM;}
+
void setPhoneDevice( const QString& n ) { mPhoneDevice = n;}
@@ -94,2 +103,4 @@ class KSyncProfile : public QObject {
bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;}
+ void setIncludeInRingSyncPWM( bool b ) {mIncludeInRingSyncPWM = b;}
+ bool getIncludeInRingSyncPWM( ) { return mIncludeInRingSyncPWM;}
void setSyncPrefs( int n ) { mSyncPrefs= n;}
@@ -112,2 +123,6 @@ class KSyncProfile : public QObject {
QString mRemoteFileNameAB;
+ QString mPreSyncCommandPWM;
+ QString mPostSyncCommandPWM;
+ QString mLocalTempFilePWM;
+ QString mRemoteFileNamePWM;
@@ -119,2 +134,3 @@ class KSyncProfile : public QObject {
bool mIncludeInRingSyncAB;
+ bool mIncludeInRingSyncPWM;
int mSyncPrefs;