summaryrefslogtreecommitdiffabout
path: root/libkdepim
Unidiff
Diffstat (limited to 'libkdepim') (more/less context) (ignore 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()
148 ++iii; 148 ++iii;
149 mIncludeInRingPWM = new QCheckBox( i18n("Include in multiple pwmanager sync"), topFrame );
150 topLayout->addMultiCellWidget(mIncludeInRingPWM, iii,iii,0,1);
151 ++iii;
149 152
@@ -226,2 +229,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
226 lab = new QLabel( i18n("Local file ABook:"), temphb ); 229 lab = new QLabel( i18n("Local file ABook:"), temphb );
230 lab = new QLabel( i18n("Local file PWMgr:"), temphb );
227 temphb = new QHBox( localFileWidget ); 231 temphb = new QHBox( localFileWidget );
@@ -231,2 +235,4 @@ void KSyncPrefsDialog::setupSyncAlgTab()
231 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); 235 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
236 button = new QPushButton( i18n("Choose..."), temphb );
237 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
232 temphb = new QHBox( localFileWidget ); 238 temphb = new QHBox( localFileWidget );
@@ -235,2 +241,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
235 mRemoteFileAB = new QLineEdit( temphb); 241 mRemoteFileAB = new QLineEdit( temphb);
242 mRemoteFilePWM = new QLineEdit( temphb);
236 243
@@ -243,2 +250,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
243 new QLabel( i18n("AddressBook:"), temphb); 250 new QLabel( i18n("AddressBook:"), temphb);
251 new QLabel( i18n("PWManager:"), temphb);
244 252
@@ -248,2 +256,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
248 mRemotePrecommandAB = new QLineEdit(temphb); 256 mRemotePrecommandAB = new QLineEdit(temphb);
257 mRemotePrecommandPWM = new QLineEdit(temphb);
249 258
@@ -253,2 +262,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
253 mLocalTempFileAB = new QLineEdit(temphb); 262 mLocalTempFileAB = new QLineEdit(temphb);
263 mLocalTempFilePWM = new QLineEdit(temphb);
254 264
@@ -258,2 +268,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
258 mRemotePostcommandAB = new QLineEdit(temphb ); 268 mRemotePostcommandAB = new QLineEdit(temphb );
269 mRemotePostcommandPWM = new QLineEdit(temphb );
259 270
@@ -303,3 +314,3 @@ void KSyncPrefsDialog::chooseFileAB()
303 314
304 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this ); 315 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this );
305 if ( fn == "" ) 316 if ( fn == "" )
@@ -309,2 +320,12 @@ void KSyncPrefsDialog::chooseFileAB()
309 320
321void KSyncPrefsDialog::chooseFilePWM()
322{
323 QString fn = QDir::homeDirPath();
324
325 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this );
326 if ( fn == "" )
327 return;
328 mRemoteFilePWM->setText( fn );
329}
330
310void KSyncPrefsDialog::textChanged( const QString & s ) 331void KSyncPrefsDialog::textChanged( const QString & s )
@@ -343,2 +364,7 @@ void KSyncPrefsDialog::profileChanged( int item )
343 364
365 mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM());
366 mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM());
367 mLocalTempFilePWM->setText(prof->getLocalTempFilePWM());
368 mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ;
369
344 mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); 370 mWriteContactToSIM->setChecked( prof->getWriteContactToSIM());
@@ -354,2 +380,3 @@ void KSyncPrefsDialog::profileChanged( int item )
354 mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); 380 mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() );
381 mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() );
355 mWriteBackFuture->setChecked( prof->getWriteBackFuture()); 382 mWriteBackFuture->setChecked( prof->getWriteBackFuture());
@@ -403,2 +430,5 @@ void KSyncPrefsDialog::fillSSH()
403 mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" ); 430 mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" );
431 mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" );
432 mLocalTempFilePWM->setText("/tmp/passwords.pwm" );
433 mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" );
404} 434}
@@ -412,2 +442,6 @@ void KSyncPrefsDialog::fillFTP()
412 mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); 442 mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" );
443
444 mRemotePrecommandPWM->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm" );
445 mLocalTempFilePWM->setText("/tmp/passwords.pwm" );
446 mRemotePostcommandPWM->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" );
413 447
@@ -463,2 +497,6 @@ void KSyncPrefsDialog::saveProfile()
463 prof->setRemoteFileNameAB( mRemoteFileAB->text() ); 497 prof->setRemoteFileNameAB( mRemoteFileAB->text() );
498 prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text());
499 prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() );
500 prof->setLocalTempFilePWM( mLocalTempFilePWM->text());
501 prof->setRemoteFileNamePWM( mRemoteFilePWM->text() );
464 prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); 502 prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() );
@@ -469,2 +507,3 @@ void KSyncPrefsDialog::saveProfile()
469 prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); 507 prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() );
508 prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() );
470 int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; 509 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
72 void chooseFileAB(); 72 void chooseFileAB();
73 void chooseFilePWM();
73 void slotOK(); 74 void slotOK();
@@ -93,2 +94,3 @@ class KSyncPrefsDialog : public KDialog
93 QCheckBox* mIncludeInRingAB; 94 QCheckBox* mIncludeInRingAB;
95 QCheckBox* mIncludeInRingPWM;
94 void addProfile ( KSyncProfile* ); 96 void addProfile ( KSyncProfile* );
@@ -111,2 +113,7 @@ class KSyncPrefsDialog : public KDialog
111 113
114 QLineEdit * mRemotePostcommandPWM;
115 QLineEdit * mRemotePrecommandPWM;
116 QLineEdit * mRemoteFilePWM;
117 QLineEdit * mLocalTempFilePWM;
118
112 QLineEdit * mPhoneDevice; 119 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()
53 myClone->setRemoteFileNameAB( mRemoteFileNameAB ); 53 myClone->setRemoteFileNameAB( mRemoteFileNameAB );
54 myClone->setPreSyncCommandPWM( mPreSyncCommandPWM );
55 myClone->setPostSyncCommandPWM( mPostSyncCommandPWM );
56 myClone->setLocalTempFilePWM( mLocalTempFilePWM);
57 myClone->setRemoteFileNamePWM( mRemoteFileNamePWM );
54 myClone->setShowSummaryAfterSync( mShowSummaryAfterSync ); 58 myClone->setShowSummaryAfterSync( mShowSummaryAfterSync );
@@ -61,2 +65,3 @@ KSyncProfile* KSyncProfile::clone()
61 myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); 65 myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
66 myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM );
62 myClone->setSyncPrefs( mSyncPrefs); 67 myClone->setSyncPrefs( mSyncPrefs);
@@ -80,3 +85,7 @@ void KSyncProfile::setDefault()
80 mLocalTempFileAB = "/tmp/std.vcf"; 85 mLocalTempFileAB = "/tmp/std.vcf";
81 mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf"; 86 mRemoteFileNamePWM = "/home/polo/kdepim/apps/kabc/localfile.vcf";
87 mPreSyncCommandPWM = i18n("command for downloading remote file to local device");
88 mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device");
89 mLocalTempFilePWM = "/tmp/passwords.pwm";
90 mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm";
82 mShowSummaryAfterSync = true; 91 mShowSummaryAfterSync = true;
@@ -89,2 +98,3 @@ void KSyncProfile::setDefault()
89 mIncludeInRingSyncAB = false; 98 mIncludeInRingSyncAB = false;
99 mIncludeInRingSyncPWM = false;
90 mSyncPrefs = SYNC_PREF_ASK; 100 mSyncPrefs = SYNC_PREF_ASK;
@@ -116,2 +126,7 @@ void KSyncProfile::readConfig(KConfig *config )
116 126
127 mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM );
128 mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM );
129 mLocalTempFilePWM = config->readEntry( "LocalTempFilePWM", mLocalTempFilePWM );
130 mRemoteFileNamePWM = config->readEntry( "RemoteFileNamePWM", mRemoteFileNamePWM );
131
117 mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice ); 132 mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice );
@@ -122,2 +137,3 @@ void KSyncProfile::readConfig(KConfig *config )
122 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); 137 mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
138 mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
123 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); 139 mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
@@ -159,2 +175,7 @@ void KSyncProfile::writeConfig( KConfig * config )
159 175
176 config->writeEntry( "PreSyncCommandPWM",mPreSyncCommandPWM );
177 config->writeEntry( "PostSyncCommandPWM", mPostSyncCommandPWM );
178 config->writeEntry( "LocalTempFilePWM", mLocalTempFilePWM );
179 config->writeEntry( "RemoteFileNamePWM", mRemoteFileNamePWM );
180
160 config->writeEntry( "PhoneDevice", mPhoneDevice ); 181 config->writeEntry( "PhoneDevice", mPhoneDevice );
@@ -165,2 +186,3 @@ void KSyncProfile::writeConfig( KConfig * config )
165 config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); 186 config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
187 config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
166 config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); 188 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 {
65 65
66 void setPreSyncCommandPWM( const QString& n ) {mPreSyncCommandPWM = n;}
67 QString getPreSyncCommandPWM( ) { return mPreSyncCommandPWM; }
68 void setPostSyncCommandPWM( const QString& n ) {mPostSyncCommandPWM = n;}
69 QString getPostSyncCommandPWM( ) { return mPostSyncCommandPWM;}
70 void setLocalTempFilePWM( const QString& n ) { mLocalTempFilePWM= n;}
71 QString getLocalTempFilePWM( ) { return mLocalTempFilePWM;}
72 void setRemoteFileNamePWM( const QString& n ) { mRemoteFileNamePWM = n;}
73 QString getRemoteFileNamePWM( ) { return mRemoteFileNamePWM;}
74
66 void setPhoneDevice( const QString& n ) { mPhoneDevice = n;} 75 void setPhoneDevice( const QString& n ) { mPhoneDevice = n;}
@@ -94,2 +103,4 @@ class KSyncProfile : public QObject {
94 bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;} 103 bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;}
104 void setIncludeInRingSyncPWM( bool b ) {mIncludeInRingSyncPWM = b;}
105 bool getIncludeInRingSyncPWM( ) { return mIncludeInRingSyncPWM;}
95 void setSyncPrefs( int n ) { mSyncPrefs= n;} 106 void setSyncPrefs( int n ) { mSyncPrefs= n;}
@@ -112,2 +123,6 @@ class KSyncProfile : public QObject {
112 QString mRemoteFileNameAB; 123 QString mRemoteFileNameAB;
124 QString mPreSyncCommandPWM;
125 QString mPostSyncCommandPWM;
126 QString mLocalTempFilePWM;
127 QString mRemoteFileNamePWM;
113 128
@@ -119,2 +134,3 @@ class KSyncProfile : public QObject {
119 bool mIncludeInRingSyncAB; 134 bool mIncludeInRingSyncAB;
135 bool mIncludeInRingSyncPWM;
120 int mSyncPrefs; 136 int mSyncPrefs;