summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2005-12-02 08:13:06 (UTC)
committer zautrix <zautrix>2005-12-02 08:13:06 (UTC)
commit467b2e451511d201bfe9bef946728e5488d38e0a (patch) (side-by-side diff)
tree6b43abf2003cfd80f69de9477ffa035df247db4b /libkdepim
parent042f35a481acf6c4e711e98184abb6c9f6542429 (diff)
downloadkdepimpi-467b2e451511d201bfe9bef946728e5488d38e0a.zip
kdepimpi-467b2e451511d201bfe9bef946728e5488d38e0a.tar.gz
kdepimpi-467b2e451511d201bfe9bef946728e5488d38e0a.tar.bz2
more sync
Diffstat (limited to 'libkdepim') (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()
//++iii;
- QHGroupBox* gb3 = new QHGroupBox( i18n("Time period"), topFrame);
+ QVGroupBox* gb3 = new QVGroupBox( i18n("Time period"), topFrame);
connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) );
- new QLabel( i18n("From ") , gb3 );
- mWriteBackPastWeeks= new QSpinBox(1,104, 1, gb3);
- new QLabel( i18n(" weeks in the past to ") , gb3 );
- mWriteBackFutureWeeks= new QSpinBox(1,104, 1, gb3);
- new QLabel( i18n(" weeks in the future ") , gb3 );
+
+ new QLabel( i18n("From ") , gb3 );
+ QHBox * tf1 = new QHBox ( gb3 );
+ mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 );
+ mWriteBackPastWeeks->setMaximumWidth( 100 );
+ new QLabel( i18n(" weeks in the past to ") ,tf1 );
+ QHBox * tf2 = new QHBox ( gb3 );
+ mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2);
+ mWriteBackFutureWeeks->setMaximumWidth( 100 );
+ new QLabel( i18n(" weeks in the future ") , tf2 );
//topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1);
@@ -380,2 +385,3 @@ void KSyncPrefsDialog::setupSyncAlgTab()
mResTableKopi->setLeftMargin( 80 );
+ mResTableKapi->setLeftMargin( 80 );
}
@@ -389,3 +395,2 @@ void KSyncPrefsDialog::readResources()
mResourcesKopi.clear();
- mResourcesKapi.clear();
KConfig fc(locateLocal("config","kopicalendarrc"));
@@ -405,2 +410,25 @@ void KSyncPrefsDialog::readResources()
}
+
+ mResourcesKapi.clear();
+
+ KConfig conf ( locateLocal("config", "kabcrc") );
+
+ conf.setGroup( "General" );
+
+ QStringList keys = conf.readListEntry( "ResourceKeys" );
+ //keys += conf->readListEntry( "PassiveResourceKeys" );
+
+ //QString standardKey = mConfig->readEntry( "Standard" );
+
+ for ( QStringList::Iterator it = keys.begin(); it != keys.end(); ++it ) {
+ conf.setGroup("Resource_"+ (*it) );
+ QString name = conf.readEntry( "ResourceName" );
+ mResourcesKapi.append( name );
+ }
+ mResTableKapi->setNumRows( mResourcesKapi.count() );
+ for ( i = 0;i < mResourcesKopi.count(); ++i ) {
+ mResTableKapi->verticalHeader ()->setLabel( i, mResourcesKapi[i] );
+ }
+
+
}
@@ -483,3 +511,6 @@ void KSyncPrefsDialog::chooseFilePWM()
}
-
+void KSyncPrefsDialog::updateMyCaption()
+{
+ setCaption( mProfileBox->currentText() + " : " +i18n("Synchronization Preferences"));
+}
void KSyncPrefsDialog::textChanged( const QString & s )
@@ -500,2 +531,3 @@ void KSyncPrefsDialog::textChanged( const QString & s )
mSyncProfileNames[mProfileBox-> currentItem ()] = s;
+ updateMyCaption();
}
@@ -614,2 +646,3 @@ void KSyncPrefsDialog::profileChanged( int item )
kindChanged( prof->getIsLocalFileSync() );
+ updateMyCaption();
}
@@ -754,2 +787,3 @@ void KSyncPrefsDialog::saveProfile()
prof->setFilterOutAB ( mFilterOutAB ->currentText ());
+ mProfileBox->setFocus();
if ( mIsPiSpecific->isChecked() ) {
@@ -762,2 +796,7 @@ void KSyncPrefsDialog::saveProfile()
prof->setResSpecKopi( res.join(":"));
+ res = mResourcesKapi;
+ for ( i = 0;i < mResourcesKapi.count(); ++i ) {
+ res.append( mResTableKapi->text( i, 0 ));
+ }
+ prof->setResSpecKapi( res.join(":"));
}
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
private:
+ void updateMyCaption();
int currentSelection;