From f23afbb9c09b4ee0f00af8f04ee4458181792cd0 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 20 Apr 2005 10:43:07 +0000 Subject: fixes --- (limited to 'libkdepim/kcmconfigs') diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 753d90a..fbfbc45 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp @@ -35,14 +35,17 @@ $Id$ #include #include #include +#include #include #include #include #include +#include #include #include #include +#include #include #include #include @@ -109,12 +112,48 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, setupTimeZoneTab(); setupExternalAppTab(); setupStoreTab(); - + setupBackupTab(); } void KDEPIMConfigWidget::showTimeZoneTab() { tabWidget->setCurrentPage ( 3 ) ; } +void KDEPIMConfigWidget::setupBackupTab() +{ + QVBox *colorPage = new QVBox( this ); + tabWidget->addTab( colorPage, i18n( "Backup" ) ); + QWidget* topFrame = new QWidget( colorPage ); + QVBoxLayout *topLayout = new QVBoxLayout(topFrame); + KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"), + &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame); + topLayout->addWidget((QWidget*)sb->checkBox()); + QWidget* bupFrame = new QWidget( topFrame ); + topLayout->addWidget((bupFrame)); + QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); + QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); + sb = addWidBool(i18n("Use standard backup dir"), + &(KPimGlobalPrefs::instance()->mBackupEnabled),bupFrame); + bupLayout->addWidget((QWidget*)sb->checkBox()); + mBackupUrl = new KURLRequester( bupFrame ); + mBackupUrl->setURL( KGlobalSettings::backupDataDir() ); + QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) ); + bupLayout->addWidget( mBackupUrl ); + + + QHBox *dummy = new QHBox(bupFrame); + new QLabel(i18n("Number of Backups:"),dummy); + mBackupNumbersSpin = new QSpinBox(1,21,1,dummy); + new QLabel(i18n(" "),dummy); + bupLayout->addWidget( dummy ); + + dummy = new QHBox(bupFrame); + new QLabel(i18n("Make backup every "),dummy); + mBackupDayCountSpin = new QSpinBox(1,28,1,dummy); + new QLabel(i18n(" days"),dummy); + new QLabel(i18n(" "),dummy); + bupLayout->addWidget( dummy ); + +} void KDEPIMConfigWidget::setupStoreTab() { QVBox *colorPage = new QVBox( this ); diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h index 984e4e0..c0b92a9 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.h +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h @@ -79,6 +79,7 @@ class KDEPIMConfigWidget : public KPrefsWidget void setupLocaleTab(); void setupTimeZoneTab(); void setupStoreTab(); + void setupBackupTab(); KURLRequester* mStoreUrl; void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); @@ -152,7 +153,8 @@ class KDEPIMConfigWidget : public KPrefsWidget QString mSipOtherMessageParameters; - + KURLRequester* mBackupUrl; + QSpinBox* mBackupDayCountSpin, *mBackupNumbersSpin ; QMap mExternalAppsMap; // AddresseeWidget *mAddresseeWidget; -- cgit v0.9.0.2