author | zautrix <zautrix> | 2004-09-22 02:03:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-22 02:03:15 (UTC) |
commit | 633522024e48efc423155a04b71083a03696211d (patch) (unidiff) | |
tree | c383ee8fa3489351450b948eb83a42b504752131 /korganizer | |
parent | ed2feaa9f7e2064e5b26ff678a25eb79ceae599b (diff) | |
download | kdepimpi-633522024e48efc423155a04b71083a03696211d.zip kdepimpi-633522024e48efc423155a04b71083a03696211d.tar.gz kdepimpi-633522024e48efc423155a04b71083a03696211d.tar.bz2 |
global prefs integrated in kopi amd ompi
-rw-r--r-- | korganizer/koprefsdialog.cpp | 14 | ||||
-rw-r--r-- | korganizer/koprefsdialog.h | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 1c30faa..7dafcd8 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -62,27 +62,29 @@ | |||
62 | 62 | ||
63 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" | 63 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" |
64 | #define INITFILE "/etc/default/init" | 64 | #define INITFILE "/etc/default/init" |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | #include "koprefs.h" | 67 | #include "koprefs.h" |
68 | 68 | ||
69 | #include "koprefsdialog.h" | 69 | #include "koprefsdialog.h" |
70 | #include "kpimglobalprefs.h" | ||
70 | 71 | ||
71 | 72 | ||
72 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 73 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
73 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 74 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
74 | { | 75 | { |
75 | 76 | ||
76 | setCaption( i18n("Preferences - some settings need a restart (nr)")); | 77 | setCaption( i18n("Preferences - some settings need a restart (nr)")); |
77 | mCategoryDict.setAutoDelete(true); | 78 | mCategoryDict.setAutoDelete(true); |
78 | 79 | ||
79 | KGlobal::locale()->insertCatalogue("timezones"); | 80 | KGlobal::locale()->insertCatalogue("timezones"); |
80 | 81 | ||
82 | setupGlobalTab(); | ||
81 | setupMainTab(); | 83 | setupMainTab(); |
82 | setupLocaleTab(); | 84 | setupLocaleTab(); |
83 | setupTimeZoneTab(); | 85 | setupTimeZoneTab(); |
84 | setupTimeTab(); | 86 | setupTimeTab(); |
85 | setupLocaleDateTab(); | 87 | setupLocaleDateTab(); |
86 | setupFontsTab(); | 88 | setupFontsTab(); |
87 | setupColorsTab(); | 89 | setupColorsTab(); |
88 | setupViewsTab(); | 90 | setupViewsTab(); |
@@ -92,17 +94,25 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | |||
92 | //setupGroupSchedulingTab(); | 94 | //setupGroupSchedulingTab(); |
93 | //setupGroupAutomationTab(); | 95 | //setupGroupAutomationTab(); |
94 | } | 96 | } |
95 | 97 | ||
96 | 98 | ||
97 | KOPrefsDialog::~KOPrefsDialog() | 99 | KOPrefsDialog::~KOPrefsDialog() |
98 | { | 100 | { |
99 | } | 101 | } |
100 | 102 | void KOPrefsDialog::setupGlobalTab() | |
103 | { | ||
104 | QFrame *topFrame = addPage(i18n("Global"),0,0); | ||
105 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | ||
106 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | ||
107 | topLayout->addWidget( kdelibcfg ); | ||
108 | |||
109 | |||
110 | } | ||
101 | void KOPrefsDialog::setupLocaleDateTab() | 111 | void KOPrefsDialog::setupLocaleDateTab() |
102 | { | 112 | { |
103 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 113 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
104 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 114 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
105 | topLayout->setSpacing(spacingHint()); | 115 | topLayout->setSpacing(spacingHint()); |
106 | topLayout->setMargin(marginHint()); | 116 | topLayout->setMargin(marginHint()); |
107 | int iii = 0; | 117 | int iii = 0; |
108 | 118 | ||
@@ -1316,16 +1326,17 @@ void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, | |||
1316 | break; | 1326 | break; |
1317 | } | 1327 | } |
1318 | } | 1328 | } |
1319 | } | 1329 | } |
1320 | } | 1330 | } |
1321 | 1331 | ||
1322 | void KOPrefsDialog::usrReadConfig() | 1332 | void KOPrefsDialog::usrReadConfig() |
1323 | { | 1333 | { |
1334 | kdelibcfg->readConfig(); | ||
1324 | mNameEdit->setText(KOPrefs::instance()->fullName()); | 1335 | mNameEdit->setText(KOPrefs::instance()->fullName()); |
1325 | mEmailEdit->setText(KOPrefs::instance()->email()); | 1336 | mEmailEdit->setText(KOPrefs::instance()->email()); |
1326 | 1337 | ||
1327 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); | 1338 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); |
1328 | QDate current ( 2001, 1,1); | 1339 | QDate current ( 2001, 1,1); |
1329 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1340 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
1330 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1341 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1331 | setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); | 1342 | setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); |
@@ -1365,16 +1376,17 @@ void KOPrefsDialog::usrReadConfig() | |||
1365 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); | 1376 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); |
1366 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); | 1377 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); |
1367 | } | 1378 | } |
1368 | 1379 | ||
1369 | 1380 | ||
1370 | void KOPrefsDialog::usrWriteConfig() | 1381 | void KOPrefsDialog::usrWriteConfig() |
1371 | { | 1382 | { |
1372 | 1383 | ||
1384 | kdelibcfg->writeConfig(); | ||
1373 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); | 1385 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); |
1374 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); | 1386 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); |
1375 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); | 1387 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); |
1376 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); | 1388 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); |
1377 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); | 1389 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); |
1378 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); | 1390 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); |
1379 | 1391 | ||
1380 | KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); | 1392 | KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); |
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h index 83dc1eb..e20969a 100644 --- a/korganizer/koprefsdialog.h +++ b/korganizer/koprefsdialog.h | |||
@@ -27,16 +27,17 @@ | |||
27 | #include <qdict.h> | 27 | #include <qdict.h> |
28 | #include <qcolor.h> | 28 | #include <qcolor.h> |
29 | #include <qlistview.h> | 29 | #include <qlistview.h> |
30 | 30 | ||
31 | #include <kdialogbase.h> | 31 | #include <kdialogbase.h> |
32 | 32 | ||
33 | #include <libkdepim/kprefsdialog.h> | 33 | #include <libkdepim/kprefsdialog.h> |
34 | #include <libkdepim/kdateedit.h> | 34 | #include <libkdepim/kdateedit.h> |
35 | #include <kcmconfigs/kdepimconfigwidget.h> | ||
35 | 36 | ||
36 | class KColorButton; | 37 | class KColorButton; |
37 | class QSpinBox; | 38 | class QSpinBox; |
38 | class QSlider; | 39 | class QSlider; |
39 | class KURLRequester; | 40 | class KURLRequester; |
40 | class QComboBox; | 41 | class QComboBox; |
41 | class QLineEdit; | 42 | class QLineEdit; |
42 | class QStringList; | 43 | class QStringList; |
@@ -74,16 +75,17 @@ class KOPrefsDialog : public KPrefsDialog | |||
74 | void addItem(); | 75 | void addItem(); |
75 | void removeItem(); | 76 | void removeItem(); |
76 | void updateItem(); | 77 | void updateItem(); |
77 | void updateInput(); | 78 | void updateInput(); |
78 | 79 | ||
79 | protected: | 80 | protected: |
80 | void usrReadConfig(); | 81 | void usrReadConfig(); |
81 | void usrWriteConfig(); | 82 | void usrWriteConfig(); |
83 | void setupGlobalTab(); | ||
82 | 84 | ||
83 | void setupMainTab(); | 85 | void setupMainTab(); |
84 | void setupTimeTab(); | 86 | void setupTimeTab(); |
85 | void setupTimeZoneTab(); | 87 | void setupTimeZoneTab(); |
86 | void setupLocaleTab(); | 88 | void setupLocaleTab(); |
87 | void setupLocaleDateTab(); | 89 | void setupLocaleDateTab(); |
88 | void setupFontsTab(); | 90 | void setupFontsTab(); |
89 | void setupColorsTab(); | 91 | void setupColorsTab(); |
@@ -94,16 +96,17 @@ class KOPrefsDialog : public KPrefsDialog | |||
94 | void setupGroupAutomationTab(); | 96 | void setupGroupAutomationTab(); |
95 | void setupSyncTab(); | 97 | void setupSyncTab(); |
96 | void setupSyncAlgTab(); | 98 | void setupSyncAlgTab(); |
97 | 99 | ||
98 | void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); | 100 | void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); |
99 | 101 | ||
100 | 102 | ||
101 | private: | 103 | private: |
104 | KDEPIMConfigWidget* kdelibcfg; | ||
102 | KPrefsDialogWidBool *mEnableGroupScheduling; | 105 | KPrefsDialogWidBool *mEnableGroupScheduling; |
103 | KPrefsDialogWidBool *mEnableProjectView; | 106 | KPrefsDialogWidBool *mEnableProjectView; |
104 | 107 | ||
105 | QFrame *mPrinterTab; | 108 | QFrame *mPrinterTab; |
106 | 109 | ||
107 | QLineEdit *nameEdit; | 110 | QLineEdit *nameEdit; |
108 | QLineEdit *emailEdit; | 111 | QLineEdit *emailEdit; |
109 | 112 | ||