summaryrefslogtreecommitdiffabout
path: root/kmicromail
Unidiff
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/kmicromailE.pro4
-rw-r--r--kmicromail/koprefsdialog.cpp18
-rw-r--r--kmicromail/koprefsdialog.h3
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
@@ -1,70 +1,70 @@
1CONFIG += qt warn_on 1CONFIG += qt warn_on
2 TEMPLATE= app 2 TEMPLATE= app
3HEADERS = defines.h \ 3HEADERS = defines.h \
4 editaccounts.h \ 4 editaccounts.h \
5 composemail.h \ 5 composemail.h \
6 accountview.h \ 6 accountview.h \
7 accountitem.h \ 7 accountitem.h \
8 mainwindow.h \ 8 mainwindow.h \
9 viewmail.h \ 9 viewmail.h \
10 viewmailbase.h \ 10 viewmailbase.h \
11 opiemail.h \ 11 opiemail.h \
12 mailistviewitem.h \ 12 mailistviewitem.h \
13 settingsdialog.h \ 13 settingsdialog.h \
14 statuswidget.h \ 14 statuswidget.h \
15 newmaildir.h \ 15 newmaildir.h \
16 selectstore.h \ 16 selectstore.h \
17 selectsmtp.h \ 17 selectsmtp.h \
18 nntpgroups.h \ 18 nntpgroups.h \
19 koprefs.h \ 19 koprefs.h \
20 koprefsdialog.h \ 20 koprefsdialog.h \
21 nntpgroupsdlg.h 21 nntpgroupsdlg.h
22 22
23SOURCES = main.cpp \ 23SOURCES = main.cpp \
24 opiemail.cpp \ 24 opiemail.cpp \
25 mainwindow.cpp \ 25 mainwindow.cpp \
26 accountview.cpp \ 26 accountview.cpp \
27 accountitem.cpp \ 27 accountitem.cpp \
28 composemail.cpp \ 28 composemail.cpp \
29 editaccounts.cpp \ 29 editaccounts.cpp \
30 viewmail.cpp \ 30 viewmail.cpp \
31 viewmailbase.cpp \ 31 viewmailbase.cpp \
32 mailistviewitem.cpp \ 32 mailistviewitem.cpp \
33 settingsdialog.cpp \ 33 settingsdialog.cpp \
34 statuswidget.cpp \ 34 statuswidget.cpp \
35 newmaildir.cpp \ 35 newmaildir.cpp \
36 selectstore.cpp \ 36 selectstore.cpp \
37 selectsmtp.cpp \ 37 selectsmtp.cpp \
38 nntpgroups.cpp \ 38 nntpgroups.cpp \
39 koprefs.cpp\ 39 koprefs.cpp\
40 koprefsdialog.cpp\ 40 koprefsdialog.cpp\
41 nntpgroupsdlg.cpp 41 nntpgroupsdlg.cpp
42 42
43INTERFACES = editaccountsui.ui \ 43INTERFACES = editaccountsui.ui \
44 selectmailtypeui.ui \ 44 selectmailtypeui.ui \
45 imapconfigui.ui \ 45 imapconfigui.ui \
46 pop3configui.ui \ 46 pop3configui.ui \
47 nntpconfigui.ui \ 47 nntpconfigui.ui \
48 smtpconfigui.ui \ 48 smtpconfigui.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
57INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore libetpan/include $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include 57INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore libetpan/include $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include
58LIBS += -L$(QPEDIR)/lib -lkmicromailwrapper -lqpe -lkmicrolibetpan -lmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lmicrokde -lmicroqtcompat -lmicrokabc -lmicrokcal -lmicrokdepim 58LIBS += -L$(QPEDIR)/lib -lkmicromailwrapper -lqpe -lkmicrolibetpan -lmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lmicroqtcompat -lmicrokdepim
59LIBS += $(QTOPIALIB) 59LIBS += $(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#
65OBJECTS_DIR = obj/$(PLATFORM) 65OBJECTS_DIR = obj/$(PLATFORM)
66MOC_DIR = moc/$(PLATFORM) 66MOC_DIR = moc/$(PLATFORM)
67DESTDIR=$(QPEDIR)/bin 67DESTDIR=$(QPEDIR)/bin
68TARGET = ompi 68TARGET = ompi
69 69
70 70
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 7d7bd2a..598d12f 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -1,288 +1,300 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qgroupbox.h> 26#include <qgroupbox.h>
27#include <qbuttongroup.h> 27#include <qbuttongroup.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qfont.h> 29#include <qfont.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qtextstream.h> 32#include <qtextstream.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qvbox.h> 34#include <qvbox.h>
35#include <qhbox.h> 35#include <qhbox.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <qstrlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44 44
45#include <kcolorbutton.h> 45#include <kcolorbutton.h>
46#include <kdebug.h> 46#include <kdebug.h>
47#include <klocale.h> 47#include <klocale.h>
48#include <kglobal.h> 48#include <kglobal.h>
49#include <kfontdialog.h> 49#include <kfontdialog.h>
50#include <kfiledialog.h> 50#include <kfiledialog.h>
51#include <kmessagebox.h> 51#include <kmessagebox.h>
52#include <kcolordialog.h> 52#include <kcolordialog.h>
53#include <kiconloader.h> 53#include <kiconloader.h>
54#include <kemailsettings.h> 54#include <kemailsettings.h>
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
65KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 66KOPrefsDialog::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();
78 setupLocaleTab(); 80 setupLocaleTab();
79 setupTimeZoneTab(); 81 setupTimeZoneTab();
80 setupTimeTab(); 82 setupTimeTab();
81 setupLocaleDateTab(); 83 setupLocaleDateTab();
82 setupFontsTab(); 84 setupFontsTab();
83 setupColorsTab(); 85 setupColorsTab();
84 setupViewsTab(); 86 setupViewsTab();
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
94KOPrefsDialog::~KOPrefsDialog() 97KOPrefsDialog::~KOPrefsDialog()
95{ 98{
96} 99}
97 100void 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}
98void KOPrefsDialog::setupMainTab() 109void 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
106 117
107 mNameEdit = new QLineEdit(topFrame); 118 mNameEdit = new QLineEdit(topFrame);
108 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 119 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
109 topLayout->addWidget(mNameLabel,0,0); 120 topLayout->addWidget(mNameLabel,0,0);
110 topLayout->addWidget(mNameEdit,0,1); 121 topLayout->addWidget(mNameEdit,0,1);
111 122
112 mEmailEdit = new QLineEdit(topFrame); 123 mEmailEdit = new QLineEdit(topFrame);
113 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 124 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
114 topLayout->addWidget(mEmailLabel,1,0); 125 topLayout->addWidget(mEmailLabel,1,0);
115 topLayout->addWidget(mEmailEdit,1,1); 126 topLayout->addWidget(mEmailEdit,1,1);
116 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); 127 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame);
117 topLayout->addMultiCellWidget(lab,2,2,0,1); 128 topLayout->addMultiCellWidget(lab,2,2,0,1);
118 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), 129 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"),
119 &(KOPrefs::instance()->mUseKapi),topFrame); 130 &(KOPrefs::instance()->mUseKapi),topFrame);
120 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); 131 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1);
121} 132}
122 133
123void KOPrefsDialog::setupMailTab() 134void KOPrefsDialog::setupMailTab()
124{ 135{
125 QFrame *topFrame = addPage(i18n("Mail"),0,0); 136 QFrame *topFrame = addPage(i18n("Mail"),0,0);
126 137
127 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 138 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
128 topLayout->setSpacing(spacingHint()); 139 topLayout->setSpacing(spacingHint());
129 topLayout->setMargin(marginHint()); 140 topLayout->setMargin(marginHint());
130 141
131 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), 142 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"),
132 &(KOPrefs::instance()->mViewAsHtml),topFrame); 143 &(KOPrefs::instance()->mViewAsHtml),topFrame);
133 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); 144 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1);
134 145
135 146
136 ttt = addWidBool(i18n("Send mails later"), 147 ttt = addWidBool(i18n("Send mails later"),
137 &(KOPrefs::instance()->mSendLater),topFrame); 148 &(KOPrefs::instance()->mSendLater),topFrame);
138 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); 149 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1);
139 150
140 151
141} 152}
142void KOPrefsDialog::setupFontsTab() 153void KOPrefsDialog::setupFontsTab()
143{ 154{
144 155
145 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 156 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
146 // DesktopIcon("fonts",KIcon::SizeMedium)); 157 // DesktopIcon("fonts",KIcon::SizeMedium));
147 158
148 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 159 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
149 topLayout->setSpacing(1); 160 topLayout->setSpacing(1);
150 topLayout->setMargin(3); 161 topLayout->setMargin(3);
151 KPrefsDialogWidFont * tVFont; 162 KPrefsDialogWidFont * tVFont;
152 int i = 0; 163 int i = 0;
153 KPrefsDialogWidFont *timeLabelsFont = 164 KPrefsDialogWidFont *timeLabelsFont =
154 addWidFont(i18n("OK"),i18n("Application(nr)"), 165 addWidFont(i18n("OK"),i18n("Application(nr)"),
155 &(KOPrefs::instance()->mAppFont),topFrame); 166 &(KOPrefs::instance()->mAppFont),topFrame);
156 topLayout->addWidget(timeLabelsFont->label(),i,0); 167 topLayout->addWidget(timeLabelsFont->label(),i,0);
157 topLayout->addWidget(timeLabelsFont->preview(),i,1); 168 topLayout->addWidget(timeLabelsFont->preview(),i,1);
158 topLayout->addWidget(timeLabelsFont->button(),i,2); 169 topLayout->addWidget(timeLabelsFont->button(),i,2);
159 ++i; 170 ++i;
160 171
161 172
162 timeLabelsFont = 173 timeLabelsFont =
163 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), 174 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"),
164 &(KOPrefs::instance()->mComposeFont),topFrame); 175 &(KOPrefs::instance()->mComposeFont),topFrame);
165 topLayout->addWidget(timeLabelsFont->label(),i,0); 176 topLayout->addWidget(timeLabelsFont->label(),i,0);
166 topLayout->addWidget(timeLabelsFont->preview(),i,1); 177 topLayout->addWidget(timeLabelsFont->preview(),i,1);
167 topLayout->addWidget(timeLabelsFont->button(),i,2); 178 topLayout->addWidget(timeLabelsFont->button(),i,2);
168 ++i; 179 ++i;
169 180
170 KPrefsDialogWidFont *timeBarFont = 181 KPrefsDialogWidFont *timeBarFont =
171 addWidFont(i18n("Hello"),i18n("Read mail:"), 182 addWidFont(i18n("Hello"),i18n("Read mail:"),
172 &(KOPrefs::instance()->mReadFont),topFrame); 183 &(KOPrefs::instance()->mReadFont),topFrame);
173 topLayout->addWidget(timeBarFont->label(),i,0); 184 topLayout->addWidget(timeBarFont->label(),i,0);
174 topLayout->addWidget(timeBarFont->preview(),i,1); 185 topLayout->addWidget(timeBarFont->preview(),i,1);
175 topLayout->addWidget(timeBarFont->button(),i,2); 186 topLayout->addWidget(timeBarFont->button(),i,2);
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}
182void KOPrefsDialog::usrReadConfig() 193void 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}
188void KOPrefsDialog::usrWriteConfig() 200void 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
198void KOPrefsDialog::setupLocaleDateTab() 210void KOPrefsDialog::setupLocaleDateTab()
199{ 211{
200QFrame *topFrame = addPage(i18n("Date Format"),0,0); 212QFrame *topFrame = addPage(i18n("Date Format"),0,0);
201 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 213 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
202 topLayout->setSpacing(spacingHint()); 214 topLayout->setSpacing(spacingHint());
203 topLayout->setMargin(marginHint()); 215 topLayout->setMargin(marginHint());
204 int iii = 0; 216 int iii = 0;
205 217
206 218
207 KPrefsWidRadios *syncPrefsGroup = 219 KPrefsWidRadios *syncPrefsGroup =
208 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 220 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
209 QString format; 221 QString format;
210 if ( QApplication::desktop()->width() < 480 ) 222 if ( QApplication::desktop()->width() < 480 )
211 format = "(%d.%m.%Y)"; 223 format = "(%d.%m.%Y)";
212 else 224 else
213 format = "(%d.%m.%Y|%A %d %B %Y)"; 225 format = "(%d.%m.%Y|%A %d %B %Y)";
214 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 226 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
215 if ( QApplication::desktop()->width() < 480 ) 227 if ( QApplication::desktop()->width() < 480 )
216 format = "(%m.%d.%Y)"; 228 format = "(%m.%d.%Y)";
217 else 229 else
218 format = "(%m.%d.%Y|%A %B %d %Y)"; 230 format = "(%m.%d.%Y|%A %B %d %Y)";
219 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 231 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
220 if ( QApplication::desktop()->width() < 480 ) 232 if ( QApplication::desktop()->width() < 480 )
221 format = "(%Y-%m-%d)"; 233 format = "(%Y-%m-%d)";
222 else 234 else
223 format = "(%Y-%m-%d|%A %Y %B %d)"; 235 format = "(%Y-%m-%d|%A %Y %B %d)";
224 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 236 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
225 syncPrefsGroup->addRadio(i18n("User defined")); 237 syncPrefsGroup->addRadio(i18n("User defined"));
226 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 238 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
227 ++iii; 239 ++iii;
228 ++iii; 240 ++iii;
229 QLabel * lab; 241 QLabel * lab;
230 mUserDateFormatLong = new QLineEdit(topFrame); 242 mUserDateFormatLong = new QLineEdit(topFrame);
231 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 243 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
232 topLayout->addWidget(lab ,iii,0); 244 topLayout->addWidget(lab ,iii,0);
233 topLayout->addWidget(mUserDateFormatLong,iii,1); 245 topLayout->addWidget(mUserDateFormatLong,iii,1);
234 ++iii; 246 ++iii;
235 mUserDateFormatShort = new QLineEdit(topFrame); 247 mUserDateFormatShort = new QLineEdit(topFrame);
236 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 248 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
237 topLayout->addWidget(lab ,iii,0); 249 topLayout->addWidget(lab ,iii,0);
238 topLayout->addWidget(mUserDateFormatShort,iii,1); 250 topLayout->addWidget(mUserDateFormatShort,iii,1);
239 ++iii; 251 ++iii;
240 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 252 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
241 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 253 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
242 ++iii; 254 ++iii;
243 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 255 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
244 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 256 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
245 ++iii; 257 ++iii;
246 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 258 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
247 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 259 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
248 ++iii; 260 ++iii;
249 261
250} 262}
251 263
252void KOPrefsDialog::setupLocaleTab() 264void KOPrefsDialog::setupLocaleTab()
253{ 265{
254 QFrame *topFrame = addPage(i18n("Locale"),0,0); 266 QFrame *topFrame = addPage(i18n("Locale"),0,0);
255 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 267 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
256 topLayout->setSpacing(spacingHint()); 268 topLayout->setSpacing(spacingHint());
257 topLayout->setMargin(marginHint()); 269 topLayout->setMargin(marginHint());
258 int iii = 0; 270 int iii = 0;
259 KPrefsWidRadios *syncPrefsGroup = 271 KPrefsWidRadios *syncPrefsGroup =
260 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); 272 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
261 syncPrefsGroup->addRadio(i18n("English")); 273 syncPrefsGroup->addRadio(i18n("English"));
262 syncPrefsGroup->addRadio(i18n("German")); 274 syncPrefsGroup->addRadio(i18n("German"));
263 syncPrefsGroup->addRadio(i18n("French")); 275 syncPrefsGroup->addRadio(i18n("French"));
264 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 276 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
265 if ( QApplication::desktop()->width() < 300 ) 277 if ( QApplication::desktop()->width() < 300 )
266 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 278 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
267 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 279 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
268 ++iii; 280 ++iii;
269 281
270 syncPrefsGroup = 282 syncPrefsGroup =
271 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); 283 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame);
272 if ( QApplication::desktop()->width() > 300 ) 284 if ( QApplication::desktop()->width() > 300 )
273 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 285 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
274 syncPrefsGroup->addRadio(i18n("24:00")); 286 syncPrefsGroup->addRadio(i18n("24:00"));
275 syncPrefsGroup->addRadio(i18n("12:00am")); 287 syncPrefsGroup->addRadio(i18n("12:00am"));
276 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 288 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
277 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 289 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
278 ++iii; 290 ++iii;
279 KPrefsDialogWidBool *sb; 291 KPrefsDialogWidBool *sb;
280 if ( QApplication::desktop()->width() < 300 ) { 292 if ( QApplication::desktop()->width() < 300 ) {
281 sb = 293 sb =
282 addWidBool(i18n("Week starts on Sunday"), 294 addWidBool(i18n("Week starts on Sunday"),
283 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); 295 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame);
284 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 296 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
285 ++iii; 297 ++iii;
286 sb = 298 sb =
287 addWidBool(i18n("Use short date in (WN/E) view"), 299 addWidBool(i18n("Use short date in (WN/E) view"),
288 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 300 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h
index 4b6bd4b..615574b 100644
--- a/kmicromail/koprefsdialog.h
+++ b/kmicromail/koprefsdialog.h
@@ -1,157 +1,160 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef _KOPREFSDIALOG_H 23#ifndef _KOPREFSDIALOG_H
24#define _KOPREFSDIALOG_H 24#define _KOPREFSDIALOG_H
25 25
26#include <qframe.h> 26#include <qframe.h>
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
36class KColorButton; 37class KColorButton;
37class QSpinBox; 38class QSpinBox;
38class QSlider; 39class QSlider;
39class KURLRequester; 40class KURLRequester;
40class QComboBox; 41class QComboBox;
41class QLineEdit; 42class QLineEdit;
42class QStringList; 43class QStringList;
43 44
44/** Dialog to change the korganizer configuration. 45/** Dialog to change the korganizer configuration.
45 */ 46 */
46class KOPrefsDialog : public KPrefsDialog 47class KOPrefsDialog : public KPrefsDialog
47{ 48{
48 Q_OBJECT 49 Q_OBJECT
49 public: 50 public:
50 /** Initialize dialog and pages */ 51 /** Initialize dialog and pages */
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
54protected: 55protected:
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();
70 73
71 74
72 void updateCategories(); 75 void updateCategories();
73 void showSyncPage(); 76 void showSyncPage();
74 protected slots: 77 protected slots:
75 void selectSoundFile(); 78 void selectSoundFile();
76 void setCategoryColor(); 79 void setCategoryColor();
77 void updateCategoryColor(); 80 void updateCategoryColor();
78 void updateTimezoneOffset( int ); 81 void updateTimezoneOffset( int );
79 82
80 83
81 void warningExperimental(bool on); 84 void warningExperimental(bool on);
82 void warningGroupScheduling(); 85 void warningGroupScheduling();
83 void warningProjectView(); 86 void warningProjectView();
84 87
85 void toggleEmailSettings(bool); 88 void toggleEmailSettings(bool);
86 89
87 //additional emails 90 //additional emails
88 void addItem(); 91 void addItem();
89 void removeItem(); 92 void removeItem();
90 void updateItem(); 93 void updateItem();
91 void updateInput(); 94 void updateInput();
92*/ 95*/
93 protected: 96 protected:
94 void usrReadConfig(); 97 void usrReadConfig();
95 void usrWriteConfig(); 98 void usrWriteConfig();
96 99
97 void setupMainTab(); 100 void setupMainTab();
98 void setupTimeTab(); 101 void setupTimeTab();
99 void setupTimeZoneTab(); 102 void setupTimeZoneTab();
100 void setupLocaleTab(); 103 void setupLocaleTab();
101 void setupLocaleDateTab(); 104 void setupLocaleDateTab();
102 void setupFontsTab(); 105 void setupFontsTab();
103 void setupColorsTab(); 106 void setupColorsTab();
104 void setupViewsTab(); 107 void setupViewsTab();
105 void setupDisplayTab(); 108 void setupDisplayTab();
106 void setupPrinterTab(); 109 void setupPrinterTab();
107 void setupGroupSchedulingTab(); 110 void setupGroupSchedulingTab();
108 void setupGroupAutomationTab(); 111 void setupGroupAutomationTab();
109 void setupSyncTab(); 112 void setupSyncTab();
110 void setupSyncAlgTab(); 113 void setupSyncAlgTab();
111 114
112 void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); 115 void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0);
113 116
114 117
115 private: 118 private:
116 KPrefsWidBool *mEnableGroupScheduling; 119 KPrefsWidBool *mEnableGroupScheduling;
117 KPrefsWidBool *mEnableProjectView; 120 KPrefsWidBool *mEnableProjectView;
118 121
119 QFrame *mPrinterTab; 122 QFrame *mPrinterTab;
120 123
121 QLineEdit *nameEdit; 124 QLineEdit *nameEdit;
122 QLineEdit *emailEdit; 125 QLineEdit *emailEdit;
123 126
124 QComboBox *timeCombo; 127 QComboBox *timeCombo;
125 QComboBox *tzCombo; 128 QComboBox *tzCombo;
126 129
127 // widgets holding preferences data 130 // widgets holding preferences data
128 QLineEdit *mNameEdit; 131 QLineEdit *mNameEdit;
129 QLineEdit *mEmailEdit; 132 QLineEdit *mEmailEdit;
130 QLabel *mNameLabel; 133 QLabel *mNameLabel;
131 QLabel *mEmailLabel; 134 QLabel *mEmailLabel;
132 QLineEdit *mAdditionalEdit; 135 QLineEdit *mAdditionalEdit;
133 QSpinBox *mAutoSaveIntervalSpin; 136 QSpinBox *mAutoSaveIntervalSpin;
134 QSpinBox *mPrioSpin; 137 QSpinBox *mPrioSpin;
135 // QListView *mAMails; 138 // QListView *mAMails;
136 QLineEdit *aEmailsEdit; 139 QLineEdit *aEmailsEdit;
137 140
138 QComboBox *mTimeZoneCombo; 141 QComboBox *mTimeZoneCombo;
139 QStringList tzonenames; 142 QStringList tzonenames;
140 QSpinBox *mStartTimeSpin; 143 QSpinBox *mStartTimeSpin;
141 QSpinBox *mDefaultDurationSpin; 144 QSpinBox *mDefaultDurationSpin;
142 QComboBox *mAlarmTimeCombo; 145 QComboBox *mAlarmTimeCombo;
143 146
144 QComboBox *mCategoryCombo; 147 QComboBox *mCategoryCombo;
145 KColorButton *mCategoryButton; 148 KColorButton *mCategoryButton;
146 QDict<QColor> mCategoryDict; 149 QDict<QColor> mCategoryDict;
147 150
148 QSlider *mHourSizeSlider; 151 QSlider *mHourSizeSlider;
149 152
150 QSpinBox *mNextXDaysSpin; 153 QSpinBox *mNextXDaysSpin;
151 QSpinBox *mWhatsNextSpin; 154 QSpinBox *mWhatsNextSpin;
152 155
153 QLineEdit * mRemoteIPEdit; 156 QLineEdit * mRemoteIPEdit;
154 QLineEdit * mRemoteUser; 157 QLineEdit * mRemoteUser;
155 QLineEdit * mRemotePassWd; 158 QLineEdit * mRemotePassWd;
156 QLineEdit * mRemoteFile; 159 QLineEdit * mRemoteFile;
157 QLineEdit * mLocalTempFile; 160 QLineEdit * mLocalTempFile;