author | zautrix <zautrix> | 2004-09-22 01:13:09 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-22 01:13:09 (UTC) |
commit | ed2feaa9f7e2064e5b26ff678a25eb79ceae599b (patch) (side-by-side diff) | |
tree | bd698d689aa16ce8c52c5060402d9560f95a713e /libkdepim | |
parent | 01572248367c63119514d15d7401a5b2b83349a0 (diff) | |
download | kdepimpi-ed2feaa9f7e2064e5b26ff678a25eb79ceae599b.zip kdepimpi-ed2feaa9f7e2064e5b26ff678a25eb79ceae599b.tar.gz kdepimpi-ed2feaa9f7e2064e5b26ff678a25eb79ceae599b.tar.bz2 |
Sync dialog fixes
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 6 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.h | 1 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.cpp | 23 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.h | 15 |
4 files changed, 17 insertions, 28 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 857ceac..a1eebec 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp @@ -194,7 +194,8 @@ void KSyncPrefsDialog::setupSyncAlgTab() phoneWidget = new QVBox( topFrame); topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); - ++iii; + ++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); @@ -340,6 +341,7 @@ void KSyncPrefsDialog::profileChanged( int item ) mLocalTempFileAB->setText(prof->getLocalTempFileAB()); mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ; + mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); mPhoneDevice->setText(prof->getPhoneDevice()); mPhoneConnection->setText(prof->getPhoneConnection()); mPhoneModel->setText(prof->getPhoneModel()); @@ -471,6 +473,8 @@ void KSyncPrefsDialog::saveProfile() prof->setIsPhoneSync( mIsPhone->isChecked() ); prof->setWriteBackFuture(mWriteBackFuture->isChecked()); prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); + + prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); prof->setPhoneDevice( mPhoneDevice->text() ); prof->setPhoneConnection( mPhoneConnection->text() ); prof->setPhoneModel( mPhoneModel->text() ); diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h index 3060e78..d4e1559 100644 --- a/libkdepim/ksyncprefsdialog.h +++ b/libkdepim/ksyncprefsdialog.h @@ -123,6 +123,7 @@ class KSyncPrefsDialog : public KDialog QCheckBox* mWriteBackExisting; QCheckBox* mAskForPreferences; QCheckBox* mShowSummaryAfterSync; + QCheckBox* mWriteContactToSIM; }; #endif diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index e7c35fb..c599208 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp @@ -1,5 +1,5 @@ /* - This file is part of KOrganizer. + This file is part of KDE-Pim/Pi. Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org> This library is free software; you can redistribute it and/or @@ -62,6 +62,7 @@ KSyncProfile* KSyncProfile::clone() myClone->setSyncPrefs( mSyncPrefs); myClone->setIsLocalFileSync( mIsLocalFileSync ); myClone->setIsPhoneSync( mIsPhoneSync ); + myClone->setWriteContactToSIM( mWriteContactToSIM ); myClone->setName( "noName" ); //myClone->setIdentifier( "noID" ); return myClone; @@ -90,6 +91,7 @@ void KSyncProfile::setDefault() mIsLocalFileSync = true; mName = "noName"; mIsPhoneSync = false; + mWriteContactToSIM = false; mPhoneDevice = "/dev/ircomm"; mPhoneConnection = "irda"; mPhoneModel = "6310i"; @@ -122,6 +124,8 @@ void KSyncProfile::readConfig(KConfig *config ) 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 ); @@ -163,24 +167,11 @@ void KSyncProfile::writeConfig( KConfig * config ) 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 ); } -/* -class KPrefsItemInt : public KPrefsItem { - public: - KPrefsItemInt(const QString &group,const QString &name,int *,int defaultValue=0); - virtual ~KPrefsItemInt() {} - - void setDefault(); - void readConfig(KConfig *); - void writeConfig(KConfig *); - - private: - int *mReference; - int mDefault; -}; -*/ diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h index a0cfb71..0039a4b 100644 --- a/libkdepim/ksyncprofile.h +++ b/libkdepim/ksyncprofile.h @@ -1,5 +1,5 @@ /* - This file is part of KOrganizer. + This file is part of KDE-Pim/Pi. Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org> This library is free software; you can redistribute it and/or @@ -33,17 +33,7 @@ class KConfig; -/** - @short Class for storing a preferences setting - @author Cornelius Schumacher - @see KPref - This class represents one preferences setting as used by @ref KPrefs. - Subclasses of KPrefsItem implement storage functions for a certain type of - setting. Normally you don't have to use this class directly. Use the special - addItem() functions of KPrefs instead. If you subclass this class you will - have to register instances with the function KPrefs::addItem(). -*/ class KSyncProfile : public QObject { public: KSyncProfile(); @@ -96,6 +86,8 @@ class KSyncProfile : public QObject { bool getWriteBackFuture( ) { return mWriteBackFuture;} void setWriteBackFile( bool b ) { mWriteBackFile= b;} bool getWriteBackFile( ) { return mWriteBackFile;} + void setWriteContactToSIM( bool b ) { mWriteContactToSIM= b;} + bool getWriteContactToSIM( ) { return mWriteContactToSIM;} void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;} bool getIncludeInRingSync( ) { return mIncludeInRingSync;} void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;} @@ -134,6 +126,7 @@ class KSyncProfile : public QObject { bool mShowSummaryAfterSync; bool mIsLocalFileSync; bool mIsPhoneSync; + bool mWriteContactToSIM; }; #endif |