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 /kmicromail | |
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-- | kmicromail/kmicromailE.pro | 4 | ||||
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 18 | ||||
-rw-r--r-- | kmicromail/koprefsdialog.h | 3 |
3 files changed, 20 insertions, 5 deletions
diff --git a/kmicromail/kmicromailE.pro b/kmicromail/kmicromailE.pro index 0d6cf86..75ba92f 100644 --- a/kmicromail/kmicromailE.pro +++ b/kmicromail/kmicromailE.pro | |||
@@ -49,18 +49,18 @@ INTERFACES = editaccountsui.ui \ | |||
49 | composemailui.ui \ | 49 | composemailui.ui \ |
50 | settingsdialogui.ui \ | 50 | settingsdialogui.ui \ |
51 | statuswidgetui.ui \ | 51 | statuswidgetui.ui \ |
52 | newmaildirui.ui \ | 52 | newmaildirui.ui \ |
53 | selectstoreui.ui \ | 53 | selectstoreui.ui \ |
54 | nntpgroupsui.ui | 54 | nntpgroupsui.ui |
55 | 55 | ||
56 | 56 | ||
57 | INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore libetpan/include $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include | 57 | INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore libetpan/include $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include |
58 | LIBS += -L$(QPEDIR)/lib -lkmicromailwrapper -lqpe -lkmicrolibetpan -lmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lmicrokde -lmicroqtcompat -lmicrokabc -lmicrokcal -lmicrokdepim | 58 | LIBS += -L$(QPEDIR)/lib -lkmicromailwrapper -lqpe -lkmicrolibetpan -lmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lmicroqtcompat -lmicrokdepim |
59 | LIBS += $(QTOPIALIB) | 59 | LIBS += $(QTOPIALIB) |
60 | #LIBS += -lqtopia | 60 | #LIBS += -lqtopia |
61 | #next line for Zaurus only | 61 | #next line for Zaurus only |
62 | #LIBS += -luuid | 62 | #LIBS += -luuid |
63 | 63 | ||
64 | # | 64 | # |
65 | OBJECTS_DIR = obj/$(PLATFORM) | 65 | OBJECTS_DIR = obj/$(PLATFORM) |
66 | MOC_DIR = moc/$(PLATFORM) | 66 | MOC_DIR = moc/$(PLATFORM) |
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 7d7bd2a..598d12f 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp | |||
@@ -55,23 +55,25 @@ | |||
55 | #include <kstandarddirs.h> | 55 | #include <kstandarddirs.h> |
56 | 56 | ||
57 | #include <klineedit.h> | 57 | #include <klineedit.h> |
58 | 58 | ||
59 | 59 | ||
60 | #include "koprefs.h" | 60 | #include "koprefs.h" |
61 | 61 | ||
62 | #include "koprefsdialog.h" | 62 | #include "koprefsdialog.h" |
63 | //#include <kprefswidget.h> | ||
63 | 64 | ||
64 | 65 | ||
65 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 66 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
66 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 67 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
67 | { | 68 | { |
68 | 69 | ||
69 | setCaption( i18n("Settings - some need a restart (nr)")); | 70 | setCaption( i18n("Settings - some need a restart (nr)")); |
71 | setupGlobalTab(); | ||
70 | setupMainTab(); | 72 | setupMainTab(); |
71 | setupMailTab();; | 73 | setupMailTab();; |
72 | setupFontsTab(); | 74 | setupFontsTab(); |
73 | readConfig(); | 75 | readConfig(); |
74 | 76 | ||
75 | #if 0 | 77 | #if 0 |
76 | 78 | ||
77 | setupMainTab(); | 79 | setupMainTab(); |
@@ -85,21 +87,30 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | |||
85 | //setupSyncTab(); | 87 | //setupSyncTab(); |
86 | //setupSyncAlgTab(); | 88 | //setupSyncAlgTab(); |
87 | //setupPrinterTab(); | 89 | //setupPrinterTab(); |
88 | //setupGroupSchedulingTab(); | 90 | //setupGroupSchedulingTab(); |
89 | //setupGroupAutomationTab(); | 91 | //setupGroupAutomationTab(); |
90 | #endif | 92 | #endif |
91 | } | 93 | } |
92 | 94 | ||
95 | #include "kpimglobalprefs.h" | ||
93 | 96 | ||
94 | KOPrefsDialog::~KOPrefsDialog() | 97 | KOPrefsDialog::~KOPrefsDialog() |
95 | { | 98 | { |
96 | } | 99 | } |
97 | 100 | void KOPrefsDialog::setupGlobalTab() | |
101 | { | ||
102 | QFrame *topFrame = addPage(i18n("Global"),0,0); | ||
103 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | ||
104 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | ||
105 | topLayout->addWidget( kdelibcfg ); | ||
106 | |||
107 | |||
108 | } | ||
98 | void KOPrefsDialog::setupMainTab() | 109 | void KOPrefsDialog::setupMainTab() |
99 | { | 110 | { |
100 | QFrame *topFrame = addPage(i18n("General"),0,0); | 111 | QFrame *topFrame = addPage(i18n("General"),0,0); |
101 | 112 | ||
102 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 113 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
103 | topLayout->setSpacing(spacingHint()); | 114 | topLayout->setSpacing(spacingHint()); |
104 | topLayout->setMargin(marginHint()); | 115 | topLayout->setMargin(marginHint()); |
105 | 116 | ||
@@ -176,25 +187,26 @@ void KOPrefsDialog::setupFontsTab() | |||
176 | ++i; | 187 | ++i; |
177 | 188 | ||
178 | topLayout->setColStretch(1,1); | 189 | topLayout->setColStretch(1,1); |
179 | topLayout->setRowStretch(4,1); | 190 | topLayout->setRowStretch(4,1); |
180 | 191 | ||
181 | } | 192 | } |
182 | void KOPrefsDialog::usrReadConfig() | 193 | void KOPrefsDialog::usrReadConfig() |
183 | { | 194 | { |
184 | qDebug("read "); | 195 | |
185 | mNameEdit->setText(KOPrefs::instance()->mName); | 196 | mNameEdit->setText(KOPrefs::instance()->mName); |
186 | mEmailEdit->setText(KOPrefs::instance()->mEmail); | 197 | mEmailEdit->setText(KOPrefs::instance()->mEmail); |
198 | kdelibcfg->readConfig(); | ||
187 | } | 199 | } |
188 | void KOPrefsDialog::usrWriteConfig() | 200 | void KOPrefsDialog::usrWriteConfig() |
189 | { | 201 | { |
190 | qDebug("write "); | ||
191 | KOPrefs::instance()->mName = mNameEdit->text(); | 202 | KOPrefs::instance()->mName = mNameEdit->text(); |
192 | KOPrefs::instance()->mEmail = mEmailEdit->text(); | 203 | KOPrefs::instance()->mEmail = mEmailEdit->text(); |
204 | kdelibcfg->writeConfig(); | ||
193 | 205 | ||
194 | 206 | ||
195 | } | 207 | } |
196 | 208 | ||
197 | #if 0 | 209 | #if 0 |
198 | void KOPrefsDialog::setupLocaleDateTab() | 210 | void KOPrefsDialog::setupLocaleDateTab() |
199 | { | 211 | { |
200 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 212 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h index 4b6bd4b..615574b 100644 --- a/kmicromail/koprefsdialog.h +++ b/kmicromail/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; |
@@ -51,19 +52,21 @@ class KOPrefsDialog : public KPrefsDialog | |||
51 | KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false); | 52 | KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false); |
52 | ~KOPrefsDialog(); | 53 | ~KOPrefsDialog(); |
53 | 54 | ||
54 | protected: | 55 | protected: |
55 | void usrReadConfig(); | 56 | void usrReadConfig(); |
56 | void usrWriteConfig(); | 57 | void usrWriteConfig(); |
57 | 58 | ||
58 | void setupMainTab(); | 59 | void setupMainTab(); |
60 | void setupGlobalTab(); | ||
59 | void setupMailTab(); | 61 | void setupMailTab(); |
60 | void setupFontsTab(); | 62 | void setupFontsTab(); |
61 | private: | 63 | private: |
64 | KDEPIMConfigWidget* kdelibcfg; | ||
62 | QLineEdit *mNameEdit; | 65 | QLineEdit *mNameEdit; |
63 | QLineEdit *mEmailEdit; | 66 | QLineEdit *mEmailEdit; |
64 | QLabel *mNameLabel; | 67 | QLabel *mNameLabel; |
65 | QLabel *mEmailLabel; | 68 | QLabel *mEmailLabel; |
66 | #if 0 | 69 | #if 0 |
67 | /* | 70 | /* |
68 | public slots: | 71 | public slots: |
69 | void showPrinterTab(); | 72 | void showPrinterTab(); |