summaryrefslogtreecommitdiffabout
path: root/libkdepim/kcmconfigs
Side-by-side diff
Diffstat (limited to 'libkdepim/kcmconfigs') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp41
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.h4
2 files changed, 43 insertions, 2 deletions
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
@@ -36,12 +36,15 @@ $Id$
#include <qlineedit.h>
#include <qbuttongroup.h>
+#include <qcheckbox.h>
#include <qfile.h>
#include <qvbox.h>
#include <qdir.h>
#include <qregexp.h>
+#include <qspinbox.h>
#include <kdialog.h>
#include <kprefsdialog.h>
#include <klocale.h>
+#include <kglobalsettings.h>
#include <kdateedit.h>
#include <kglobal.h>
@@ -110,5 +113,5 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
setupExternalAppTab();
setupStoreTab();
-
+ setupBackupTab();
}
void KDEPIMConfigWidget::showTimeZoneTab()
@@ -116,4 +119,40 @@ 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()
{
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
@@ -80,4 +80,5 @@ class KDEPIMConfigWidget : public KPrefsWidget
void setupTimeZoneTab();
void setupStoreTab();
+ void setupBackupTab();
KURLRequester* mStoreUrl;
@@ -153,5 +154,6 @@ class KDEPIMConfigWidget : public KPrefsWidget
-
+ KURLRequester* mBackupUrl;
+ QSpinBox* mBackupDayCountSpin, *mBackupNumbersSpin ;
QMap<ExternalAppHandler::Types, QString> mExternalAppsMap;