summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2005-04-20 10:43:07 (UTC)
committer zautrix <zautrix>2005-04-20 10:43:07 (UTC)
commitf23afbb9c09b4ee0f00af8f04ee4458181792cd0 (patch) (unidiff)
tree807bcaf329d257ec2a0c5c6e3a6afc7ab53a6078 /libkdepim
parent03f7f26ad34f50dd86f335c7c5a25a292d642793 (diff)
downloadkdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.zip
kdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.tar.gz
kdepimpi-f23afbb9c09b4ee0f00af8f04ee4458181792cd0.tar.bz2
fixes
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp41
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.h4
-rw-r--r--libkdepim/kpimglobalprefs.cpp7
-rw-r--r--libkdepim/kpimglobalprefs.h6
-rw-r--r--libkdepim/kprefsdialog.cpp2
-rw-r--r--libkdepim/kprefsdialog.h7
6 files changed, 60 insertions, 7 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
@@ -37,2 +37,3 @@ $Id$
37#include <qbuttongroup.h> 37#include <qbuttongroup.h>
38#include <qcheckbox.h>
38#include <qfile.h> 39#include <qfile.h>
@@ -41,2 +42,3 @@ $Id$
41#include <qregexp.h> 42#include <qregexp.h>
43#include <qspinbox.h>
42 44
@@ -45,2 +47,3 @@ $Id$
45#include <klocale.h> 47#include <klocale.h>
48#include <kglobalsettings.h>
46#include <kdateedit.h> 49#include <kdateedit.h>
@@ -111,3 +114,3 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
111 setupStoreTab(); 114 setupStoreTab();
112 115 setupBackupTab();
113} 116}
@@ -117,2 +120,38 @@ void KDEPIMConfigWidget::showTimeZoneTab()
117} 120}
121void KDEPIMConfigWidget::setupBackupTab()
122{
123 QVBox *colorPage = new QVBox( this );
124 tabWidget->addTab( colorPage, i18n( "Backup" ) );
125 QWidget* topFrame = new QWidget( colorPage );
126 QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
127 KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"),
128 &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame);
129 topLayout->addWidget((QWidget*)sb->checkBox());
130 QWidget* bupFrame = new QWidget( topFrame );
131 topLayout->addWidget((bupFrame));
132 QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) );
133 QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame);
134 sb = addWidBool(i18n("Use standard backup dir"),
135 &(KPimGlobalPrefs::instance()->mBackupEnabled),bupFrame);
136 bupLayout->addWidget((QWidget*)sb->checkBox());
137 mBackupUrl = new KURLRequester( bupFrame );
138 mBackupUrl->setURL( KGlobalSettings::backupDataDir() );
139 QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), mBackupUrl ,SLOT ( setDisabled( bool ) ) );
140 bupLayout->addWidget( mBackupUrl );
141
142
143 QHBox *dummy = new QHBox(bupFrame);
144 new QLabel(i18n("Number of Backups:"),dummy);
145 mBackupNumbersSpin = new QSpinBox(1,21,1,dummy);
146 new QLabel(i18n(" "),dummy);
147 bupLayout->addWidget( dummy );
148
149 dummy = new QHBox(bupFrame);
150 new QLabel(i18n("Make backup every "),dummy);
151 mBackupDayCountSpin = new QSpinBox(1,28,1,dummy);
152 new QLabel(i18n(" days"),dummy);
153 new QLabel(i18n(" "),dummy);
154 bupLayout->addWidget( dummy );
155
156}
118void KDEPIMConfigWidget::setupStoreTab() 157void 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
@@ -81,2 +81,3 @@ class KDEPIMConfigWidget : public KPrefsWidget
81 void setupStoreTab(); 81 void setupStoreTab();
82 void setupBackupTab();
82 KURLRequester* mStoreUrl; 83 KURLRequester* mStoreUrl;
@@ -154,3 +155,4 @@ class KDEPIMConfigWidget : public KPrefsWidget
154 155
155 156 KURLRequester* mBackupUrl;
157 QSpinBox* mBackupDayCountSpin, *mBackupNumbersSpin ;
156 QMap<ExternalAppHandler::Types, QString> mExternalAppsMap; 158 QMap<ExternalAppHandler::Types, QString> mExternalAppsMap;
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 873f0eb..90321b2 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -113,2 +113,9 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
113 113
114 KPrefs::setCurrentGroup( "BackupSettings" );
115 addItemString("BackupDatadir",&mBackupDatadir,KGlobalSettings::backupDataDir());
116 addItemInt( "BackupNumbers", &mBackupNumbers, 3 );
117 addItemInt( "BackupDayCount", &mBackupDayCount, 2 );
118 addItemBool( "BackupUseDefaultDir",&mBackupUseDefaultDir, true );
119 addItemBool( "BackupEnabled",&mBackupEnabled, false );
120
114} 121}
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 36cc25a..94ac8ae 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -142,2 +142,8 @@ class KPimGlobalPrefs : public KPrefs
142 142
143
144 bool mBackupEnabled;
145 QString mBackupDatadir;
146 bool mBackupUseDefaultDir;
147 int mBackupNumbers;
148 int mBackupDayCount;
143}; 149};
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index dd9a602..b6ae775 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -282,3 +282,3 @@ KPrefsDialog::KPrefsDialog(KPrefs *prefs,QWidget *parent,char *name,bool modal)
282// This seems to cause a crash on exit. Investigate later. 282// This seems to cause a crash on exit. Investigate later.
283// mPrefsWids.setAutoDelete(true); 283 mPrefsWids.setAutoDelete(true);
284 284
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index ad13b78..efcb86a 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -48,3 +48,3 @@ class QButtonGroup;
48*/ 48*/
49class KPrefsDialogWid 49class KPrefsDialogWid : public QObject
50{ 50{
@@ -138,5 +138,4 @@ class KPrefsDialogWidTime : public KPrefsDialogWid
138*/ 138*/
139class KPrefsDialogWidColor : public QObject, public KPrefsDialogWid 139class KPrefsDialogWidColor : public KPrefsDialogWid
140{ 140{
141 Q_OBJECT
142 public: 141 public:
@@ -181,3 +180,3 @@ class KPrefsDialogWidColor : public QObject, public KPrefsDialogWid
181*/ 180*/
182class KPrefsDialogWidFont : public QObject, public KPrefsDialogWid 181class KPrefsDialogWidFont : public KPrefsDialogWid
183{ 182{