summaryrefslogtreecommitdiffabout
path: root/libkdepim/kcmconfigs
authorzautrix <zautrix>2005-04-20 10:43:07 (UTC)
committer zautrix <zautrix>2005-04-20 10:43:07 (UTC)
commitf23afbb9c09b4ee0f00af8f04ee4458181792cd0 (patch) (side-by-side diff)
tree807bcaf329d257ec2a0c5c6e3a6afc7ab53a6078 /libkdepim/kcmconfigs
parent03f7f26ad34f50dd86f335c7c5a25a292d642793 (diff)
downloadkdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.zip
kdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.tar.gz
kdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.tar.bz2
fixes
Diffstat (limited to 'libkdepim/kcmconfigs') (more/less context) (ignore 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
@@ -26,32 +26,35 @@ Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$Id$
*/
#include <qlayout.h>
#include <qtabwidget.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#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>
#include <stdlib.h>
/*US
#include <qcheckbox.h>
#include <qframe.h>
#include <qpushbutton.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qfile.h>
@@ -100,30 +103,66 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
QVBoxLayout *topLayout = new QVBoxLayout( this, 0,
KDialog::spacingHint() );
tabWidget = new QTabWidget( this );
topLayout->addWidget( tabWidget );
setupLocaleTab();
setupLocaleDateTab();
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 );
tabWidget->addTab( colorPage, i18n( "Colors" ) );
QWidget* cw = new QWidget( colorPage );
KPrefsWidColor *holidayColor =
addWidColor(i18n("Alternating background of list views"),
&(KPimGlobalPrefs::instance()->mAlternateColor),cw);
QHBoxLayout *topLayout = new QHBoxLayout(cw);
topLayout->addWidget(holidayColor->label());
topLayout->addWidget( (QWidget* )holidayColor->button());
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
@@ -70,24 +70,25 @@ class KDEPIMConfigWidget : public KPrefsWidget
void client_changed( int newClient );
void externalapp_changed( int newApp );
void saveStoreSettings();
void setStandardStore();
void setLocalStore();
private:
void setupExternalAppTab();
void setupLocaleDateTab();
void setupLocaleTab();
void setupTimeZoneTab();
void setupStoreTab();
+ void setupBackupTab();
KURLRequester* mStoreUrl;
void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0);
void saveEditFieldSettings();
void updateClientWidgets();
QTabWidget *tabWidget;
QLineEdit* mUserDateFormatShort;
@@ -143,19 +144,20 @@ class KDEPIMConfigWidget : public KPrefsWidget
int mPagerClient;
QString mPagerOtherChannel;
QString mPagerOtherMessage;
QString mPagerOtherMessageParameters;
int mSipClient;
QString mSipOtherChannel;
QString mSipOtherMessage;
QString mSipOtherMessageParameters;
-
+ KURLRequester* mBackupUrl;
+ QSpinBox* mBackupDayCountSpin, *mBackupNumbersSpin ;
QMap<ExternalAppHandler::Types, QString> mExternalAppsMap;
// AddresseeWidget *mAddresseeWidget;
};
#endif