summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-12-02 08:13:06 (UTC)
committer zautrix <zautrix>2005-12-02 08:13:06 (UTC)
commit467b2e451511d201bfe9bef946728e5488d38e0a (patch) (unidiff)
tree6b43abf2003cfd80f69de9477ffa035df247db4b
parent042f35a481acf6c4e711e98184abb6c9f6542429 (diff)
downloadkdepimpi-467b2e451511d201bfe9bef946728e5488d38e0a.zip
kdepimpi-467b2e451511d201bfe9bef946728e5488d38e0a.tar.gz
kdepimpi-467b2e451511d201bfe9bef946728e5488d38e0a.tar.bz2
more sync
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprefsdialog.cpp55
-rw-r--r--libkdepim/ksyncprefsdialog.h1
2 files changed, 48 insertions, 8 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index b097277..6f46d19 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -223,9 +223,14 @@ void KSyncPrefsDialog::setupSyncAlgTab()
223 //++iii; 223 //++iii;
224 QHGroupBox* gb3 = new QHGroupBox( i18n("Time period"), topFrame); 224 QVGroupBox* gb3 = new QVGroupBox( i18n("Time period"), topFrame);
225 connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) ); 225 connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) );
226 new QLabel( i18n("From ") , gb3 ); 226
227 mWriteBackPastWeeks= new QSpinBox(1,104, 1, gb3); 227 new QLabel( i18n("From ") , gb3 );
228 new QLabel( i18n(" weeks in the past to ") , gb3 ); 228 QHBox * tf1 = new QHBox ( gb3 );
229 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, gb3); 229 mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 );
230 new QLabel( i18n(" weeks in the future ") , gb3 ); 230 mWriteBackPastWeeks->setMaximumWidth( 100 );
231 new QLabel( i18n(" weeks in the past to ") ,tf1 );
232 QHBox * tf2 = new QHBox ( gb3 );
233 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2);
234 mWriteBackFutureWeeks->setMaximumWidth( 100 );
235 new QLabel( i18n(" weeks in the future ") , tf2 );
231 //topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); 236 //topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1);
@@ -380,2 +385,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
380 mResTableKopi->setLeftMargin( 80 ); 385 mResTableKopi->setLeftMargin( 80 );
386 mResTableKapi->setLeftMargin( 80 );
381 } 387 }
@@ -389,3 +395,2 @@ void KSyncPrefsDialog::readResources()
389 mResourcesKopi.clear(); 395 mResourcesKopi.clear();
390 mResourcesKapi.clear();
391 KConfig fc(locateLocal("config","kopicalendarrc")); 396 KConfig fc(locateLocal("config","kopicalendarrc"));
@@ -405,2 +410,25 @@ void KSyncPrefsDialog::readResources()
405 } 410 }
411
412 mResourcesKapi.clear();
413
414 KConfig conf ( locateLocal("config", "kabcrc") );
415
416 conf.setGroup( "General" );
417
418 QStringList keys = conf.readListEntry( "ResourceKeys" );
419 //keys += conf->readListEntry( "PassiveResourceKeys" );
420
421 //QString standardKey = mConfig->readEntry( "Standard" );
422
423 for ( QStringList::Iterator it = keys.begin(); it != keys.end(); ++it ) {
424 conf.setGroup("Resource_"+ (*it) );
425 QString name = conf.readEntry( "ResourceName" );
426 mResourcesKapi.append( name );
427 }
428 mResTableKapi->setNumRows( mResourcesKapi.count() );
429 for ( i = 0;i < mResourcesKopi.count(); ++i ) {
430 mResTableKapi->verticalHeader ()->setLabel( i, mResourcesKapi[i] );
431 }
432
433
406} 434}
@@ -483,3 +511,6 @@ void KSyncPrefsDialog::chooseFilePWM()
483} 511}
484 512void KSyncPrefsDialog::updateMyCaption()
513{
514 setCaption( mProfileBox->currentText() + " : " +i18n("Synchronization Preferences"));
515}
485void KSyncPrefsDialog::textChanged( const QString & s ) 516void KSyncPrefsDialog::textChanged( const QString & s )
@@ -500,2 +531,3 @@ void KSyncPrefsDialog::textChanged( const QString & s )
500 mSyncProfileNames[mProfileBox-> currentItem ()] = s; 531 mSyncProfileNames[mProfileBox-> currentItem ()] = s;
532 updateMyCaption();
501} 533}
@@ -614,2 +646,3 @@ void KSyncPrefsDialog::profileChanged( int item )
614 kindChanged( prof->getIsLocalFileSync() ); 646 kindChanged( prof->getIsLocalFileSync() );
647 updateMyCaption();
615} 648}
@@ -754,2 +787,3 @@ void KSyncPrefsDialog::saveProfile()
754 prof->setFilterOutAB ( mFilterOutAB ->currentText ()); 787 prof->setFilterOutAB ( mFilterOutAB ->currentText ());
788 mProfileBox->setFocus();
755 if ( mIsPiSpecific->isChecked() ) { 789 if ( mIsPiSpecific->isChecked() ) {
@@ -762,2 +796,7 @@ void KSyncPrefsDialog::saveProfile()
762 prof->setResSpecKopi( res.join(":")); 796 prof->setResSpecKopi( res.join(":"));
797 res = mResourcesKapi;
798 for ( i = 0;i < mResourcesKapi.count(); ++i ) {
799 res.append( mResTableKapi->text( i, 0 ));
800 }
801 prof->setResSpecKapi( res.join(":"));
763 } 802 }
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index e8a9709..d8c02de 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -86,2 +86,3 @@ class KSyncPrefsDialog : public KDialog
86 private: 86 private:
87 void updateMyCaption();
87 int currentSelection; 88 int currentSelection;