summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorulf69 <ulf69>2004-10-01 00:05:54 (UTC)
committer ulf69 <ulf69>2004-10-01 00:05:54 (UTC)
commitc14cd0801a854a6f6cc6abef70510646be50a61c (patch) (side-by-side diff)
tree90b4f29acb017e40ce5f700e2fb83674ad7e58b0 /libkdepim
parent3138ae138248637d901528ee5d6cfc894b0ed7c2 (diff)
downloadkdepimpi-c14cd0801a854a6f6cc6abef70510646be50a61c.zip
kdepimpi-c14cd0801a854a6f6cc6abef70510646be50a61c.tar.gz
kdepimpi-c14cd0801a854a6f6cc6abef70510646be50a61c.tar.bz2
added profile settings for pwmanager
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
@@ -147,4 +147,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1);
++iii;
+ mIncludeInRingPWM = new QCheckBox( i18n("Include in multiple pwmanager sync"), topFrame );
+ topLayout->addMultiCellWidget(mIncludeInRingPWM, iii,iii,0,1);
+ ++iii;
mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
@@ -225,4 +228,5 @@ void KSyncPrefsDialog::setupSyncAlgTab()
lab = new QLabel( i18n("Local file Cal:"), temphb );
lab = new QLabel( i18n("Local file ABook:"), temphb );
+ lab = new QLabel( i18n("Local file PWMgr:"), temphb );
temphb = new QHBox( localFileWidget );
button = new QPushButton( i18n("Choose..."), temphb );
@@ -230,8 +234,11 @@ void KSyncPrefsDialog::setupSyncAlgTab()
button = new QPushButton( i18n("Choose..."), temphb );
connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
+ button = new QPushButton( i18n("Choose..."), temphb );
+ connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
temphb = new QHBox( localFileWidget );
mRemoteFile = new QLineEdit( temphb);
mRemoteFileAB = new QLineEdit( temphb);
+ mRemoteFilePWM = new QLineEdit( temphb);
// *** remote
@@ -242,4 +249,5 @@ void KSyncPrefsDialog::setupSyncAlgTab()
new QLabel( i18n("Calendar:"), temphb);
new QLabel( i18n("AddressBook:"), temphb);
+ new QLabel( i18n("PWManager:"), temphb);
lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget);
@@ -247,4 +255,5 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mRemotePrecommand = new QLineEdit(temphb);
mRemotePrecommandAB = new QLineEdit(temphb);
+ mRemotePrecommandPWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Local temp file:"), remoteFileWidget);
@@ -252,4 +261,5 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mLocalTempFile = new QLineEdit(temphb);
mLocalTempFileAB = new QLineEdit(temphb);
+ mLocalTempFilePWM = new QLineEdit(temphb);
lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget);
@@ -257,4 +267,5 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mRemotePostcommand = new QLineEdit(temphb );
mRemotePostcommandAB = new QLineEdit(temphb );
+ mRemotePostcommandPWM = new QLineEdit(temphb );
lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
@@ -302,5 +313,5 @@ void KSyncPrefsDialog::chooseFileAB()
QString fn = QDir::homeDirPath();
- fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this );
+ fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this );
if ( fn == "" )
return;
@@ -308,4 +319,14 @@ 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 )
{
@@ -342,4 +363,9 @@ void KSyncPrefsDialog::profileChanged( int item )
mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ;
+ mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM());
+ mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM());
+ mLocalTempFilePWM->setText(prof->getLocalTempFilePWM());
+ mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ;
+
mWriteContactToSIM->setChecked( prof->getWriteContactToSIM());
mPhoneDevice->setText(prof->getPhoneDevice());
@@ -353,4 +379,5 @@ void KSyncPrefsDialog::profileChanged( int item )
mIncludeInRing->setChecked( prof->getIncludeInRingSync() );
mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() );
+ mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() );
mWriteBackFuture->setChecked( prof->getWriteBackFuture());
mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() );
@@ -402,4 +429,7 @@ void KSyncPrefsDialog::fillSSH()
mLocalTempFileAB->setText("/tmp/std.vcf" );
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" );
}
void KSyncPrefsDialog::fillFTP()
@@ -411,4 +441,8 @@ void KSyncPrefsDialog::fillFTP()
mLocalTempFileAB->setText("/tmp/std.vcf" );
mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" );
+
+ 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" );
}
@@ -462,4 +496,8 @@ void KSyncPrefsDialog::saveProfile()
prof->setLocalTempFileAB( mLocalTempFileAB->text());
prof->setRemoteFileNameAB( mRemoteFileAB->text() );
+ prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text());
+ prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() );
+ prof->setLocalTempFilePWM( mLocalTempFilePWM->text());
+ prof->setRemoteFileNamePWM( mRemoteFilePWM->text() );
prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() );
prof->setAskForPreferences( mAskForPreferences->isChecked());
@@ -468,4 +506,5 @@ void KSyncPrefsDialog::saveProfile()
prof->setIncludeInRingSync( mIncludeInRing->isChecked() );
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 ;
prof->setSyncPrefs( syncprefs);
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index d4e1559..8094bdd 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -71,4 +71,5 @@ class KSyncPrefsDialog : public KDialog
void chooseFile();
void chooseFileAB();
+ void chooseFilePWM();
void slotOK();
void helpDevice();
@@ -92,4 +93,5 @@ class KSyncPrefsDialog : public KDialog
QCheckBox* mIncludeInRing;
QCheckBox* mIncludeInRingAB;
+ QCheckBox* mIncludeInRingPWM;
void addProfile ( KSyncProfile* );
void insertProfiles();
@@ -110,4 +112,9 @@ class KSyncPrefsDialog : public KDialog
QLineEdit * mLocalTempFileAB;
+ QLineEdit * mRemotePostcommandPWM;
+ QLineEdit * mRemotePrecommandPWM;
+ QLineEdit * mRemoteFilePWM;
+ QLineEdit * mLocalTempFilePWM;
+
QLineEdit * mPhoneDevice;
QLineEdit * mPhoneConnection;
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index c599208..a43ebe2 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -52,4 +52,8 @@ KSyncProfile* KSyncProfile::clone()
myClone->setLocalTempFileAB( mLocalTempFileAB);
myClone->setRemoteFileNameAB( mRemoteFileNameAB );
+ myClone->setPreSyncCommandPWM( mPreSyncCommandPWM );
+ myClone->setPostSyncCommandPWM( mPostSyncCommandPWM );
+ myClone->setLocalTempFilePWM( mLocalTempFilePWM);
+ myClone->setRemoteFileNamePWM( mRemoteFileNamePWM );
myClone->setShowSummaryAfterSync( mShowSummaryAfterSync );
myClone->setAskForPreferences( mAskForPreferences);
@@ -60,4 +64,5 @@ KSyncProfile* KSyncProfile::clone()
myClone->setIncludeInRingSync( mIncludeInRingSync );
myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
+ myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM );
myClone->setSyncPrefs( mSyncPrefs);
myClone->setIsLocalFileSync( mIsLocalFileSync );
@@ -79,5 +84,9 @@ void KSyncProfile::setDefault()
mPostSyncCommandAB = i18n("command for uploading local temp file to remote device");
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;
mAskForPreferences = true;
@@ -88,4 +97,5 @@ void KSyncProfile::setDefault()
mIncludeInRingSync = false;
mIncludeInRingSyncAB = false;
+ mIncludeInRingSyncPWM = false;
mSyncPrefs = SYNC_PREF_ASK;
mIsLocalFileSync = true;
@@ -115,4 +125,9 @@ void KSyncProfile::readConfig(KConfig *config )
mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB );
+ 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 );
mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection );
@@ -121,4 +136,5 @@ void KSyncProfile::readConfig(KConfig *config )
mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync );
mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
+ mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences );
@@ -158,4 +174,9 @@ void KSyncProfile::writeConfig( KConfig * config )
config->writeEntry( "RemoteFileNameAB", mRemoteFileNameAB );
+ config->writeEntry( "PreSyncCommandPWM",mPreSyncCommandPWM );
+ config->writeEntry( "PostSyncCommandPWM", mPostSyncCommandPWM );
+ config->writeEntry( "LocalTempFilePWM", mLocalTempFilePWM );
+ config->writeEntry( "RemoteFileNamePWM", mRemoteFileNamePWM );
+
config->writeEntry( "PhoneDevice", mPhoneDevice );
config->writeEntry( "PhoneConnection", mPhoneConnection );
@@ -164,4 +185,5 @@ void KSyncProfile::writeConfig( KConfig * config )
config->writeEntry( "IncludeInRingSync",mIncludeInRingSync );
config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
+ config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM );
config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
config->writeEntry( "AskForPreferences",mAskForPreferences );
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 0039a4b..a81a9ad 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -64,4 +64,13 @@ class KSyncProfile : public QObject {
QString getRemoteFileNameAB( ) { return mRemoteFileNameAB;}
+ 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;}
QString getPhoneDevice( ) { return mPhoneDevice;}
@@ -93,4 +102,6 @@ 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;}
@@ -111,4 +122,8 @@ class KSyncProfile : public QObject {
QString mLocalTempFileAB;
QString mRemoteFileNameAB;
+ QString mPreSyncCommandPWM;
+ QString mPostSyncCommandPWM;
+ QString mLocalTempFilePWM;
+ QString mRemoteFileNamePWM;
QString mPhoneDevice;
@@ -118,4 +133,5 @@ class KSyncProfile : public QObject {
bool mIncludeInRingSync;
bool mIncludeInRingSyncAB;
+ bool mIncludeInRingSyncPWM;
int mSyncPrefs;
bool mWriteBackFile;