-rw-r--r-- | korganizer/koprefsdialog.cpp | 3 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 5 | ||||
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.h | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index b4b3b27..393e6e6 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -41,385 +41,386 @@ | |||
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 <kurlrequester.h> | 57 | #include <kurlrequester.h> |
58 | #include <klineedit.h> | 58 | #include <klineedit.h> |
59 | 59 | ||
60 | #if defined(USE_SOLARIS) | 60 | #if defined(USE_SOLARIS) |
61 | #include <sys/param.h> | 61 | #include <sys/param.h> |
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 | #include "kpimglobalprefs.h" |
71 | 71 | ||
72 | 72 | ||
73 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 73 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
74 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 74 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
75 | { | 75 | { |
76 | 76 | ||
77 | setCaption( i18n("Preferences - some settings need a restart (nr)")); | 77 | setCaption( i18n("Preferences - some settings need a restart (nr)")); |
78 | mCategoryDict.setAutoDelete(true); | 78 | mCategoryDict.setAutoDelete(true); |
79 | 79 | ||
80 | KGlobal::locale()->insertCatalogue("timezones"); | 80 | KGlobal::locale()->insertCatalogue("timezones"); |
81 | 81 | ||
82 | setupGlobalTab(); | 82 | setupGlobalTab(); |
83 | setupMainTab(); | 83 | setupMainTab(); |
84 | // setupLocaleTab(); | 84 | // setupLocaleTab(); |
85 | //setupTimeZoneTab(); | 85 | //setupTimeZoneTab(); |
86 | setupTimeTab(); | 86 | setupTimeTab(); |
87 | //setupLocaleDateTab(); | 87 | //setupLocaleDateTab(); |
88 | setupFontsTab(); | 88 | setupFontsTab(); |
89 | setupColorsTab(); | 89 | setupColorsTab(); |
90 | setupViewsTab(); | 90 | setupViewsTab(); |
91 | //setupSyncTab(); | 91 | //setupSyncTab(); |
92 | //setupSyncAlgTab(); | 92 | //setupSyncAlgTab(); |
93 | //setupPrinterTab(); | 93 | //setupPrinterTab(); |
94 | //setupGroupSchedulingTab(); | 94 | //setupGroupSchedulingTab(); |
95 | //setupGroupAutomationTab(); | 95 | //setupGroupAutomationTab(); |
96 | } | 96 | } |
97 | 97 | ||
98 | 98 | ||
99 | KOPrefsDialog::~KOPrefsDialog() | 99 | KOPrefsDialog::~KOPrefsDialog() |
100 | { | 100 | { |
101 | } | 101 | } |
102 | void KOPrefsDialog::setupGlobalTab() | 102 | void KOPrefsDialog::setupGlobalTab() |
103 | { | 103 | { |
104 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 104 | QFrame *topFrame = addPage(i18n("Global"),0,0); |
105 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 105 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); |
106 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 106 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
107 | topLayout->addWidget( kdelibcfg ); | 107 | topLayout->addWidget( kdelibcfg ); |
108 | 108 | ||
109 | 109 | ||
110 | } | 110 | } |
111 | void KOPrefsDialog::setupLocaleDateTab() | 111 | void KOPrefsDialog::setupLocaleDateTab() |
112 | { | 112 | { |
113 | #if 0 | 113 | #if 0 |
114 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 114 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
115 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 115 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
116 | topLayout->setSpacing(spacingHint()); | 116 | topLayout->setSpacing(spacingHint()); |
117 | topLayout->setMargin(marginHint()); | 117 | topLayout->setMargin(marginHint()); |
118 | int iii = 0; | 118 | int iii = 0; |
119 | 119 | ||
120 | 120 | ||
121 | KPrefsDialogWidRadios *syncPrefsGroup = | 121 | KPrefsDialogWidRadios *syncPrefsGroup = |
122 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 122 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
123 | QString format; | 123 | QString format; |
124 | if ( QApplication::desktop()->width() < 480 ) | 124 | if ( QApplication::desktop()->width() < 480 ) |
125 | format = "(%d.%m.%Y)"; | 125 | format = "(%d.%m.%Y)"; |
126 | else | 126 | else |
127 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 127 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
128 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 128 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
129 | if ( QApplication::desktop()->width() < 480 ) | 129 | if ( QApplication::desktop()->width() < 480 ) |
130 | format = "(%m.%d.%Y)"; | 130 | format = "(%m.%d.%Y)"; |
131 | else | 131 | else |
132 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 132 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
133 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 133 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
134 | if ( QApplication::desktop()->width() < 480 ) | 134 | if ( QApplication::desktop()->width() < 480 ) |
135 | format = "(%Y-%m-%d)"; | 135 | format = "(%Y-%m-%d)"; |
136 | else | 136 | else |
137 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 137 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
138 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 138 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
139 | syncPrefsGroup->addRadio(i18n("User defined")); | 139 | syncPrefsGroup->addRadio(i18n("User defined")); |
140 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 140 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
141 | ++iii; | 141 | ++iii; |
142 | ++iii; | 142 | ++iii; |
143 | QLabel * lab; | 143 | QLabel * lab; |
144 | mUserDateFormatLong = new QLineEdit(topFrame); | 144 | mUserDateFormatLong = new QLineEdit(topFrame); |
145 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 145 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
146 | topLayout->addWidget(lab ,iii,0); | 146 | topLayout->addWidget(lab ,iii,0); |
147 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 147 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
148 | ++iii; | 148 | ++iii; |
149 | mUserDateFormatShort = new QLineEdit(topFrame); | 149 | mUserDateFormatShort = new QLineEdit(topFrame); |
150 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 150 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
151 | topLayout->addWidget(lab ,iii,0); | 151 | topLayout->addWidget(lab ,iii,0); |
152 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 152 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
153 | ++iii; | 153 | ++iii; |
154 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 154 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
155 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 155 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
156 | ++iii; | 156 | ++iii; |
157 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 157 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
158 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 158 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
159 | ++iii; | 159 | ++iii; |
160 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 160 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
161 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 161 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
162 | ++iii; | 162 | ++iii; |
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | } | 165 | } |
166 | 166 | ||
167 | void KOPrefsDialog::setupLocaleTab() | 167 | void KOPrefsDialog::setupLocaleTab() |
168 | { | 168 | { |
169 | #if 0 | 169 | #if 0 |
170 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 170 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
171 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 171 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
172 | topLayout->setSpacing(spacingHint()); | 172 | topLayout->setSpacing(spacingHint()); |
173 | topLayout->setMargin(marginHint()); | 173 | topLayout->setMargin(marginHint()); |
174 | int iii = 0; | 174 | int iii = 0; |
175 | KPrefsDialogWidRadios *syncPrefsGroup = | 175 | KPrefsDialogWidRadios *syncPrefsGroup = |
176 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 176 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
177 | syncPrefsGroup->addRadio(i18n("English")); | 177 | syncPrefsGroup->addRadio(i18n("English")); |
178 | syncPrefsGroup->addRadio(i18n("German")); | 178 | syncPrefsGroup->addRadio(i18n("German")); |
179 | syncPrefsGroup->addRadio(i18n("French")); | 179 | syncPrefsGroup->addRadio(i18n("French")); |
180 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 180 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
181 | if ( QApplication::desktop()->width() < 300 ) | 181 | if ( QApplication::desktop()->width() < 300 ) |
182 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 182 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
183 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 183 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
184 | ++iii; | 184 | ++iii; |
185 | 185 | ||
186 | syncPrefsGroup = | 186 | syncPrefsGroup = |
187 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 187 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
188 | if ( QApplication::desktop()->width() > 300 ) | 188 | if ( QApplication::desktop()->width() > 300 ) |
189 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 189 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
190 | syncPrefsGroup->addRadio(i18n("24:00")); | 190 | syncPrefsGroup->addRadio(i18n("24:00")); |
191 | syncPrefsGroup->addRadio(i18n("12:00am")); | 191 | syncPrefsGroup->addRadio(i18n("12:00am")); |
192 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 192 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
193 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 193 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
194 | ++iii; | 194 | ++iii; |
195 | KPrefsDialogWidBool *sb; | 195 | KPrefsDialogWidBool *sb; |
196 | if ( QApplication::desktop()->width() < 300 ) { | 196 | if ( QApplication::desktop()->width() < 300 ) { |
197 | sb = | 197 | sb = |
198 | addWidBool(i18n("Week starts on Sunday"), | 198 | addWidBool(i18n("Week starts on Sunday"), |
199 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 199 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
200 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 200 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
201 | ++iii; | 201 | ++iii; |
202 | sb = | 202 | sb = |
203 | addWidBool(i18n("Use short date in (WN/E) view"), | 203 | addWidBool(i18n("Use short date in (WN/E) view"), |
204 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 204 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
205 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 205 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
206 | } | 206 | } |
207 | else { | 207 | else { |
208 | QWidget * hb = new QWidget( topFrame ); | 208 | QWidget * hb = new QWidget( topFrame ); |
209 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 209 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
210 | sb = | 210 | sb = |
211 | addWidBool(i18n("Week starts on Sunday"), | 211 | addWidBool(i18n("Week starts on Sunday"), |
212 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 212 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
213 | hbLayout->addWidget(sb->checkBox() ); | 213 | hbLayout->addWidget(sb->checkBox() ); |
214 | sb = | 214 | sb = |
215 | addWidBool(i18n("Use short date in (WN/E) view"), | 215 | addWidBool(i18n("Use short date in (WN/E) view"), |
216 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 216 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
217 | hbLayout->addWidget(sb->checkBox() ); | 217 | hbLayout->addWidget(sb->checkBox() ); |
218 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 218 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
219 | 219 | ||
220 | } | 220 | } |
221 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION | 221 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION |
222 | #if 0 | 222 | #if 0 |
223 | ++iii; | 223 | ++iii; |
224 | sb = | 224 | sb = |
225 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 225 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
226 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 226 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
227 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 227 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
228 | #endif | 228 | #endif |
229 | #endif | 229 | #endif |
230 | } | 230 | } |
231 | void KOPrefsDialog::showSyncPage() | 231 | void KOPrefsDialog::showSyncPage() |
232 | { | 232 | { |
233 | showPage ( 2 ) ; | 233 | showPage ( 0 ) ; |
234 | kdelibcfg->showTimeZoneTab() ; | ||
234 | 235 | ||
235 | } | 236 | } |
236 | void KOPrefsDialog::setupSyncAlgTab() | 237 | void KOPrefsDialog::setupSyncAlgTab() |
237 | { | 238 | { |
238 | #if 0 | 239 | #if 0 |
239 | QLabel * lab; | 240 | QLabel * lab; |
240 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 241 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); |
241 | mSetupSyncAlgTab = topFrame; | 242 | mSetupSyncAlgTab = topFrame; |
242 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 243 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
243 | topLayout->setSpacing(spacingHint()); | 244 | topLayout->setSpacing(spacingHint()); |
244 | topLayout->setMargin(marginHint()); | 245 | topLayout->setMargin(marginHint()); |
245 | int iii = 0; | 246 | int iii = 0; |
246 | 247 | ||
247 | KPrefsDialogWidBool *sb = | 248 | KPrefsDialogWidBool *sb = |
248 | addWidBool(i18n("Ask for preferences before syncing"), | 249 | addWidBool(i18n("Ask for preferences before syncing"), |
249 | &(KOPrefs::instance()->mAskForPreferences),topFrame); | 250 | &(KOPrefs::instance()->mAskForPreferences),topFrame); |
250 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 251 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
251 | 252 | ||
252 | ++iii; | 253 | ++iii; |
253 | 254 | ||
254 | KPrefsDialogWidRadios *syncPrefsGroup = | 255 | KPrefsDialogWidRadios *syncPrefsGroup = |
255 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), | 256 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), |
256 | topFrame); | 257 | topFrame); |
257 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 258 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
258 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 259 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
259 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 260 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
260 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 261 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
261 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 262 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
262 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 263 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
263 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 264 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
264 | ++iii; | 265 | ++iii; |
265 | sb = | 266 | sb = |
266 | addWidBool(i18n("Show summary after syncing"), | 267 | addWidBool(i18n("Show summary after syncing"), |
267 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); | 268 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); |
268 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 269 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
269 | 270 | ||
270 | ++iii; | 271 | ++iii; |
271 | #endif | 272 | #endif |
272 | 273 | ||
273 | 274 | ||
274 | 275 | ||
275 | } | 276 | } |
276 | 277 | ||
277 | 278 | ||
278 | void KOPrefsDialog::setupSyncTab() | 279 | void KOPrefsDialog::setupSyncTab() |
279 | { | 280 | { |
280 | #if 0 | 281 | #if 0 |
281 | QLabel * lab; | 282 | QLabel * lab; |
282 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); | 283 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); |
283 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 284 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
284 | topLayout->setSpacing(spacingHint()); | 285 | topLayout->setSpacing(spacingHint()); |
285 | topLayout->setMargin(marginHint()); | 286 | topLayout->setMargin(marginHint()); |
286 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); | 287 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); |
287 | int iii = 0; | 288 | int iii = 0; |
288 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); | 289 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); |
289 | ++iii; | 290 | ++iii; |
290 | 291 | ||
291 | mRemoteIPEdit = new QLineEdit(topFrame); | 292 | mRemoteIPEdit = new QLineEdit(topFrame); |
292 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); | 293 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); |
293 | topLayout->addWidget(lab ,iii,0); | 294 | topLayout->addWidget(lab ,iii,0); |
294 | topLayout->addWidget(mRemoteIPEdit,iii,1); | 295 | topLayout->addWidget(mRemoteIPEdit,iii,1); |
295 | ++iii; | 296 | ++iii; |
296 | mRemoteUser = new QLineEdit(topFrame); | 297 | mRemoteUser = new QLineEdit(topFrame); |
297 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); | 298 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); |
298 | topLayout->addWidget(lab ,iii,0); | 299 | topLayout->addWidget(lab ,iii,0); |
299 | topLayout->addWidget(mRemoteUser, iii,1); | 300 | topLayout->addWidget(mRemoteUser, iii,1); |
300 | ++iii; | 301 | ++iii; |
301 | 302 | ||
302 | mRemoteFile = new QLineEdit(topFrame); | 303 | mRemoteFile = new QLineEdit(topFrame); |
303 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); | 304 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); |
304 | topLayout->addWidget(lab ,iii,0); | 305 | topLayout->addWidget(lab ,iii,0); |
305 | topLayout->addWidget(mRemoteFile,iii,1); | 306 | topLayout->addWidget(mRemoteFile,iii,1); |
306 | ++iii; | 307 | ++iii; |
307 | 308 | ||
308 | mLocalTempFile = new QLineEdit(topFrame); | 309 | mLocalTempFile = new QLineEdit(topFrame); |
309 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); | 310 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); |
310 | topLayout->addWidget(lab ,iii,0); | 311 | topLayout->addWidget(lab ,iii,0); |
311 | topLayout->addWidget(mLocalTempFile,iii,1); | 312 | topLayout->addWidget(mLocalTempFile,iii,1); |
312 | ++iii; | 313 | ++iii; |
313 | 314 | ||
314 | KPrefsDialogWidBool *wb = | 315 | KPrefsDialogWidBool *wb = |
315 | addWidBool(i18n("Write back synced file"), | 316 | addWidBool(i18n("Write back synced file"), |
316 | &(KOPrefs::instance()->mWriteBackFile),topFrame); | 317 | &(KOPrefs::instance()->mWriteBackFile),topFrame); |
317 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 318 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
318 | ++iii; | 319 | ++iii; |
319 | wb = | 320 | wb = |
320 | addWidBool(i18n("Write back existing entries only"), | 321 | addWidBool(i18n("Write back existing entries only"), |
321 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); | 322 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); |
322 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 323 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
323 | ++iii; | 324 | ++iii; |
324 | 325 | ||
325 | #endif | 326 | #endif |
326 | } | 327 | } |
327 | 328 | ||
328 | void KOPrefsDialog::setupMainTab() | 329 | void KOPrefsDialog::setupMainTab() |
329 | { | 330 | { |
330 | QFrame *topFrame = addPage(i18n("General"),0,0); | 331 | QFrame *topFrame = addPage(i18n("General"),0,0); |
331 | // DesktopIcon("identity",KIcon::SizeMedium)); | 332 | // DesktopIcon("identity",KIcon::SizeMedium)); |
332 | 333 | ||
333 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 334 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
334 | topLayout->setSpacing(spacingHint()); | 335 | topLayout->setSpacing(spacingHint()); |
335 | topLayout->setMargin(marginHint()); | 336 | topLayout->setMargin(marginHint()); |
336 | 337 | ||
337 | // KPrefsDialogWidBool *emailControlCenter = | 338 | // KPrefsDialogWidBool *emailControlCenter = |
338 | // addWidBool(i18n("&Use email settings from Control Center"), | 339 | // addWidBool(i18n("&Use email settings from Control Center"), |
339 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 340 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
340 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 341 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
341 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 342 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
342 | // SLOT(toggleEmailSettings(bool))); | 343 | // SLOT(toggleEmailSettings(bool))); |
343 | 344 | ||
344 | mNameEdit = new QLineEdit(topFrame); | 345 | mNameEdit = new QLineEdit(topFrame); |
345 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 346 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
346 | topLayout->addWidget(mNameLabel,0,0); | 347 | topLayout->addWidget(mNameLabel,0,0); |
347 | topLayout->addWidget(mNameEdit,0,1); | 348 | topLayout->addWidget(mNameEdit,0,1); |
348 | 349 | ||
349 | mEmailEdit = new QLineEdit(topFrame); | 350 | mEmailEdit = new QLineEdit(topFrame); |
350 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 351 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
351 | topLayout->addWidget(mEmailLabel,1,0); | 352 | topLayout->addWidget(mEmailLabel,1,0); |
352 | topLayout->addWidget(mEmailEdit,1,1); | 353 | topLayout->addWidget(mEmailEdit,1,1); |
353 | KPrefsDialogWidBool *wb; | 354 | KPrefsDialogWidBool *wb; |
354 | QHBox *dummy; | 355 | QHBox *dummy; |
355 | if ( QApplication::desktop()->width() > 480 ) { | 356 | if ( QApplication::desktop()->width() > 480 ) { |
356 | dummy = new QHBox(topFrame); | 357 | dummy = new QHBox(topFrame); |
357 | } else { | 358 | } else { |
358 | dummy = new QVBox(topFrame); | 359 | dummy = new QVBox(topFrame); |
359 | } | 360 | } |
360 | 361 | ||
361 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); | 362 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); |
362 | addWidBool(i18n("Full menu bar(nr)"), | 363 | addWidBool(i18n("Full menu bar(nr)"), |
363 | &(KOPrefs::instance()->mShowFullMenu),dummy); | 364 | &(KOPrefs::instance()->mShowFullMenu),dummy); |
364 | 365 | ||
365 | 366 | ||
366 | addWidBool(i18n("Mini icons in toolbar(nr)"), | 367 | addWidBool(i18n("Mini icons in toolbar(nr)"), |
367 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); | 368 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); |
368 | 369 | ||
369 | 370 | ||
370 | dummy = new QHBox(topFrame); | 371 | dummy = new QHBox(topFrame); |
371 | new QLabel(i18n("Days in What's Next:"),dummy); | 372 | new QLabel(i18n("Days in What's Next:"),dummy); |
372 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); | 373 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); |
373 | 374 | ||
374 | topLayout->addMultiCellWidget(dummy,3,3,0,1); | 375 | topLayout->addMultiCellWidget(dummy,3,3,0,1); |
375 | 376 | ||
376 | 377 | ||
377 | 378 | ||
378 | dummy = new QHBox(topFrame); | 379 | dummy = new QHBox(topFrame); |
379 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 380 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
380 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 381 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
381 | 382 | ||
382 | topLayout->addMultiCellWidget(dummy,4,4,0,1); | 383 | topLayout->addMultiCellWidget(dummy,4,4,0,1); |
383 | 384 | ||
384 | QHBox *prioBox = new QHBox(topFrame); | 385 | QHBox *prioBox = new QHBox(topFrame); |
385 | // intervalBox->setSpacing(spacingHint()); | 386 | // intervalBox->setSpacing(spacingHint()); |
386 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); | 387 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); |
387 | QString messa = i18n("Show topmost todo prios in What's Next:"); | 388 | QString messa = i18n("Show topmost todo prios in What's Next:"); |
388 | 389 | ||
389 | if ( QApplication::desktop()->width() < 300 ) | 390 | if ( QApplication::desktop()->width() < 300 ) |
390 | messa = i18n("Show topmost todo prios in What's N.:"); | 391 | messa = i18n("Show topmost todo prios in What's N.:"); |
391 | QLabel *prioLabel = new QLabel(messa, prioBox); | 392 | QLabel *prioLabel = new QLabel(messa, prioBox); |
392 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 393 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
393 | if ( QApplication::desktop()->width() < 300 ) | 394 | if ( QApplication::desktop()->width() < 300 ) |
394 | mPrioSpin->setFixedWidth( 40 ); | 395 | mPrioSpin->setFixedWidth( 40 ); |
395 | 396 | ||
396 | // KPrefsDialogWidBool *bcc = | 397 | // KPrefsDialogWidBool *bcc = |
397 | // addWidBool(i18n("Send copy to owner when mailing events"), | 398 | // addWidBool(i18n("Send copy to owner when mailing events"), |
398 | // &(KOPrefs::instance()->mBcc),topFrame); | 399 | // &(KOPrefs::instance()->mBcc),topFrame); |
399 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 400 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
400 | 401 | ||
401 | 402 | ||
402 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 403 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
403 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 404 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
404 | 405 | ||
405 | // addWidBool(i18n("Enable automatic saving of calendar"), | 406 | // addWidBool(i18n("Enable automatic saving of calendar"), |
406 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 407 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
407 | 408 | ||
408 | QHBox *intervalBox = new QHBox(topFrame); | 409 | QHBox *intervalBox = new QHBox(topFrame); |
409 | // intervalBox->setSpacing(spacingHint()); | 410 | // intervalBox->setSpacing(spacingHint()); |
410 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); | 411 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); |
411 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 412 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
412 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 413 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
413 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 414 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
414 | /* | 415 | /* |
415 | QHBox * agendasize = new QHBox ( topFrame ); | 416 | QHBox * agendasize = new QHBox ( topFrame ); |
416 | 417 | ||
417 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 418 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
418 | 419 | ||
419 | 420 | ||
420 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 421 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
421 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 422 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
422 | */ | 423 | */ |
423 | KPrefsDialogWidBool *verticalScreen = | 424 | KPrefsDialogWidBool *verticalScreen = |
424 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 425 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
425 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 426 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 2819ab1..073ab74 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -1,299 +1,302 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KdePim/Pi. | 2 | This file is part of KdePim/Pi. |
3 | Copyright (c) 2004 Ulf Schenk | 3 | Copyright (c) 2004 Ulf Schenk |
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 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qtabwidget.h> | 32 | #include <qtabwidget.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qgroupbox.h> | 34 | #include <qgroupbox.h> |
35 | #include <qlabel.h> | 35 | #include <qlabel.h> |
36 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
37 | #include <qbuttongroup.h> | 37 | #include <qbuttongroup.h> |
38 | #include <qfile.h> | 38 | #include <qfile.h> |
39 | 39 | ||
40 | #include <kdialog.h> | 40 | #include <kdialog.h> |
41 | #include <klocale.h> | 41 | #include <klocale.h> |
42 | #include <kdateedit.h> | 42 | #include <kdateedit.h> |
43 | #include <kglobal.h> | 43 | #include <kglobal.h> |
44 | #include <stdlib.h> | 44 | #include <stdlib.h> |
45 | 45 | ||
46 | /*US | 46 | /*US |
47 | #include <qcheckbox.h> | 47 | #include <qcheckbox.h> |
48 | #include <qframe.h> | 48 | #include <qframe.h> |
49 | #include <qpushbutton.h> | 49 | #include <qpushbutton.h> |
50 | #include <qcombobox.h> | 50 | #include <qcombobox.h> |
51 | #include <qlineedit.h> | 51 | #include <qlineedit.h> |
52 | #include <qlabel.h> | 52 | #include <qlabel.h> |
53 | #include <qfile.h> | 53 | #include <qfile.h> |
54 | 54 | ||
55 | #include <kconfig.h> | 55 | #include <kconfig.h> |
56 | #include <kdebug.h> | 56 | #include <kdebug.h> |
57 | #include <kdialog.h> | 57 | #include <kdialog.h> |
58 | #include <klistview.h> | 58 | #include <klistview.h> |
59 | #include <klocale.h> | 59 | #include <klocale.h> |
60 | #include <kglobal.h> | 60 | #include <kglobal.h> |
61 | #include <kmessagebox.h> | 61 | #include <kmessagebox.h> |
62 | #include <kstandarddirs.h> | 62 | #include <kstandarddirs.h> |
63 | 63 | ||
64 | #ifndef KAB_EMBEDDED | 64 | #ifndef KAB_EMBEDDED |
65 | #include <ktrader.h> | 65 | #include <ktrader.h> |
66 | #else // KAB_EMBEDDED | 66 | #else // KAB_EMBEDDED |
67 | #include <mergewidget.h> | 67 | #include <mergewidget.h> |
68 | #include <distributionlistwidget.h> | 68 | #include <distributionlistwidget.h> |
69 | #endif // KAB_EMBEDDED | 69 | #endif // KAB_EMBEDDED |
70 | 70 | ||
71 | #include "addresseewidget.h" | 71 | #include "addresseewidget.h" |
72 | #include "extensionconfigdialog.h" | 72 | #include "extensionconfigdialog.h" |
73 | #include "extensionwidget.h" | 73 | #include "extensionwidget.h" |
74 | */ | 74 | */ |
75 | 75 | ||
76 | #include "qapplication.h" | 76 | #include "qapplication.h" |
77 | 77 | ||
78 | #include "kpimglobalprefs.h" | 78 | #include "kpimglobalprefs.h" |
79 | 79 | ||
80 | #include "kdepimconfigwidget.h" | 80 | #include "kdepimconfigwidget.h" |
81 | 81 | ||
82 | 82 | ||
83 | KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) | 83 | KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name ) |
84 | : KPrefsWidget(prefs, parent, name ) | 84 | : KPrefsWidget(prefs, parent, name ) |
85 | { | 85 | { |
86 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); | 86 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); |
87 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); | 87 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); |
88 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); | 88 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); |
89 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); | 89 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); |
90 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); | 90 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); |
91 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); | 91 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); |
92 | 92 | ||
93 | 93 | ||
94 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, | 94 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, |
95 | KDialog::spacingHint() ); | 95 | KDialog::spacingHint() ); |
96 | 96 | ||
97 | tabWidget = new QTabWidget( this ); | 97 | tabWidget = new QTabWidget( this ); |
98 | topLayout->addWidget( tabWidget ); | 98 | topLayout->addWidget( tabWidget ); |
99 | 99 | ||
100 | 100 | ||
101 | setupLocaleTab(); | 101 | setupLocaleTab(); |
102 | setupLocaleDateTab(); | 102 | setupLocaleDateTab(); |
103 | setupTimeZoneTab(); | 103 | setupTimeZoneTab(); |
104 | setupExternalAppTab(); | 104 | setupExternalAppTab(); |
105 | 105 | ||
106 | } | 106 | } |
107 | 107 | void KDEPIMConfigWidget::showTimeZoneTab() | |
108 | { | ||
109 | tabWidget->setCurrentPage ( 2 ) ; | ||
110 | } | ||
108 | void KDEPIMConfigWidget::setupExternalAppTab() | 111 | void KDEPIMConfigWidget::setupExternalAppTab() |
109 | { | 112 | { |
110 | QWidget *externalAppsPage = new QWidget( this ); | 113 | QWidget *externalAppsPage = new QWidget( this ); |
111 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), | 114 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), |
112 | KDialog::spacingHintSmall() ); | 115 | KDialog::spacingHintSmall() ); |
113 | 116 | ||
114 | mExternalApps = new QComboBox( externalAppsPage ); | 117 | mExternalApps = new QComboBox( externalAppsPage ); |
115 | 118 | ||
116 | QMap<ExternalAppHandler::Types, QString>::Iterator it; | 119 | QMap<ExternalAppHandler::Types, QString>::Iterator it; |
117 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) | 120 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) |
118 | mExternalApps->insertItem( it.data(), it.key() ); | 121 | mExternalApps->insertItem( it.data(), it.key() ); |
119 | 122 | ||
120 | layout->addWidget( mExternalApps ); | 123 | layout->addWidget( mExternalApps ); |
121 | 124 | ||
122 | connect( mExternalApps, SIGNAL( activated( int ) ), | 125 | connect( mExternalApps, SIGNAL( activated( int ) ), |
123 | this, SLOT (externalapp_changed( int ) ) ); | 126 | this, SLOT (externalapp_changed( int ) ) ); |
124 | 127 | ||
125 | 128 | ||
126 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); | 129 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); |
127 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); | 130 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); |
128 | 131 | ||
129 | 132 | ||
130 | mClient = new QComboBox( mExternalAppGroupBox ); | 133 | mClient = new QComboBox( mExternalAppGroupBox ); |
131 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); | 134 | boxLayout->addMultiCellWidget( mClient, 0, 0, 0, 1 ); |
132 | 135 | ||
133 | connect( mClient, SIGNAL( activated( int ) ), | 136 | connect( mClient, SIGNAL( activated( int ) ), |
134 | this, SLOT (client_changed( int ) ) ); | 137 | this, SLOT (client_changed( int ) ) ); |
135 | 138 | ||
136 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); | 139 | QLabel* lab = new QLabel( i18n("Channel:"), mExternalAppGroupBox); |
137 | boxLayout->addWidget( lab, 1, 0 ); | 140 | boxLayout->addWidget( lab, 1, 0 ); |
138 | mChannel = new QLineEdit(mExternalAppGroupBox); | 141 | mChannel = new QLineEdit(mExternalAppGroupBox); |
139 | mChannel->setReadOnly(true); | 142 | mChannel->setReadOnly(true); |
140 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); | 143 | boxLayout->addMultiCellWidget( mChannel, 2 , 2, 0, 1 ); |
141 | 144 | ||
142 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); | 145 | lab = new QLabel( i18n("Message:"), mExternalAppGroupBox); |
143 | boxLayout->addWidget( lab, 3, 0 ); | 146 | boxLayout->addWidget( lab, 3, 0 ); |
144 | mMessage = new QLineEdit(mExternalAppGroupBox); | 147 | mMessage = new QLineEdit(mExternalAppGroupBox); |
145 | mMessage->setReadOnly(true); | 148 | mMessage->setReadOnly(true); |
146 | boxLayout->addWidget( mMessage , 4, 0); | 149 | boxLayout->addWidget( mMessage , 4, 0); |
147 | 150 | ||
148 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); | 151 | lab = new QLabel( i18n("Parameters:"), mExternalAppGroupBox); |
149 | boxLayout->addWidget( lab, 3, 1 ); | 152 | boxLayout->addWidget( lab, 3, 1 ); |
150 | mParameters = new QLineEdit(mExternalAppGroupBox); | 153 | mParameters = new QLineEdit(mExternalAppGroupBox); |
151 | mParameters->setReadOnly(true); | 154 | mParameters->setReadOnly(true); |
152 | boxLayout->addWidget( mParameters, 4, 1 ); | 155 | boxLayout->addWidget( mParameters, 4, 1 ); |
153 | 156 | ||
154 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); | 157 | lab = new QLabel( i18n("HINT: Delimiter=; Name=%1,Email=%2"), mExternalAppGroupBox); |
155 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); | 158 | boxLayout->addMultiCellWidget( lab, 5, 5, 0, 1 ); |
156 | 159 | ||
157 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); | 160 | lab = new QLabel( i18n("extra Message:"), mExternalAppGroupBox); |
158 | boxLayout->addWidget( lab, 6, 0 ); | 161 | boxLayout->addWidget( lab, 6, 0 ); |
159 | mMessage2 = new QLineEdit(mExternalAppGroupBox); | 162 | mMessage2 = new QLineEdit(mExternalAppGroupBox); |
160 | mMessage2->setReadOnly(true); | 163 | mMessage2->setReadOnly(true); |
161 | boxLayout->addWidget( mMessage2 , 7, 0); | 164 | boxLayout->addWidget( mMessage2 , 7, 0); |
162 | 165 | ||
163 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); | 166 | lab = new QLabel( i18n("extra Parameters:"), mExternalAppGroupBox); |
164 | boxLayout->addWidget( lab, 6, 1 ); | 167 | boxLayout->addWidget( lab, 6, 1 ); |
165 | mParameters2 = new QLineEdit(mExternalAppGroupBox); | 168 | mParameters2 = new QLineEdit(mExternalAppGroupBox); |
166 | mParameters2->setReadOnly(true); | 169 | mParameters2->setReadOnly(true); |
167 | boxLayout->addWidget( mParameters2, 7, 1 ); | 170 | boxLayout->addWidget( mParameters2, 7, 1 ); |
168 | 171 | ||
169 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); | 172 | lab = new QLabel( i18n("HINT: Emails=%1,Attachments=%2"), mExternalAppGroupBox); |
170 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); | 173 | boxLayout->addMultiCellWidget( lab, 8, 8, 0, 1 ); |
171 | 174 | ||
172 | 175 | ||
173 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 176 | connect( mChannel, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
174 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 177 | connect( mMessage, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
175 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 178 | connect( mParameters, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
176 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 179 | connect( mMessage2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
177 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 180 | connect( mParameters2, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
178 | 181 | ||
179 | 182 | ||
180 | layout->addWidget( mExternalAppGroupBox ); | 183 | layout->addWidget( mExternalAppGroupBox ); |
181 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); | 184 | tabWidget->addTab( externalAppsPage, i18n( "External Apps." ) ); |
182 | 185 | ||
183 | } | 186 | } |
184 | 187 | ||
185 | 188 | ||
186 | void KDEPIMConfigWidget::setupLocaleDateTab() | 189 | void KDEPIMConfigWidget::setupLocaleDateTab() |
187 | { | 190 | { |
188 | QWidget *topFrame = new QWidget( this ); | 191 | QWidget *topFrame = new QWidget( this ); |
189 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); | 192 | QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); |
190 | 193 | ||
191 | topLayout->setSpacing(KDialog::spacingHint()); | 194 | topLayout->setSpacing(KDialog::spacingHint()); |
192 | topLayout->setMargin(KDialog::marginHint()); | 195 | topLayout->setMargin(KDialog::marginHint()); |
193 | int iii = 0; | 196 | int iii = 0; |
194 | 197 | ||
195 | 198 | ||
196 | KPrefsWidRadios *syncPrefsGroup = | 199 | KPrefsWidRadios *syncPrefsGroup = |
197 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); | 200 | addWidRadios(i18n("Date Format:"),&(KPimGlobalPrefs::instance()->mPreferredDate),topFrame); |
198 | QString format; | 201 | QString format; |
199 | if ( QApplication::desktop()->width() < 480 ) | 202 | if ( QApplication::desktop()->width() < 480 ) |
200 | format = "(%d.%m.%Y)"; | 203 | format = "(%d.%m.%Y)"; |
201 | else | 204 | else |
202 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 205 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
203 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 206 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
204 | if ( QApplication::desktop()->width() < 480 ) | 207 | if ( QApplication::desktop()->width() < 480 ) |
205 | format = "(%m.%d.%Y)"; | 208 | format = "(%m.%d.%Y)"; |
206 | else | 209 | else |
207 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 210 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
208 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 211 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
209 | if ( QApplication::desktop()->width() < 480 ) | 212 | if ( QApplication::desktop()->width() < 480 ) |
210 | format = "(%Y-%m-%d)"; | 213 | format = "(%Y-%m-%d)"; |
211 | else | 214 | else |
212 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 215 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
213 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 216 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
214 | syncPrefsGroup->addRadio(i18n("User defined")); | 217 | syncPrefsGroup->addRadio(i18n("User defined")); |
215 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 218 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
216 | ++iii; | 219 | ++iii; |
217 | ++iii; | 220 | ++iii; |
218 | QLabel * lab; | 221 | QLabel * lab; |
219 | mUserDateFormatLong = new QLineEdit(topFrame); | 222 | mUserDateFormatLong = new QLineEdit(topFrame); |
220 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 223 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
221 | topLayout->addWidget(lab ,iii,0); | 224 | topLayout->addWidget(lab ,iii,0); |
222 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 225 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
223 | ++iii; | 226 | ++iii; |
224 | mUserDateFormatShort = new QLineEdit(topFrame); | 227 | mUserDateFormatShort = new QLineEdit(topFrame); |
225 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 228 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
226 | topLayout->addWidget(lab ,iii,0); | 229 | topLayout->addWidget(lab ,iii,0); |
227 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 230 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
228 | ++iii; | 231 | ++iii; |
229 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 232 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
230 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 233 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
231 | ++iii; | 234 | ++iii; |
232 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 235 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
233 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 236 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
234 | ++iii; | 237 | ++iii; |
235 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 238 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
236 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 239 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
237 | ++iii; | 240 | ++iii; |
238 | 241 | ||
239 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 242 | connect( mUserDateFormatLong, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
240 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); | 243 | connect( mUserDateFormatShort, SIGNAL( textChanged ( const QString & )), this, SLOT( textChanged ( const QString & )) ); |
241 | 244 | ||
242 | 245 | ||
243 | tabWidget->addTab( topFrame, i18n( "Date Format" ) ); | 246 | tabWidget->addTab( topFrame, i18n( "Date Format" ) ); |
244 | } | 247 | } |
245 | 248 | ||
246 | void KDEPIMConfigWidget::setupLocaleTab() | 249 | void KDEPIMConfigWidget::setupLocaleTab() |
247 | { | 250 | { |
248 | 251 | ||
249 | QWidget *topFrame = new QWidget( this ); | 252 | QWidget *topFrame = new QWidget( this ); |
250 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 253 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
251 | 254 | ||
252 | topLayout->setSpacing(KDialog::spacingHint()); | 255 | topLayout->setSpacing(KDialog::spacingHint()); |
253 | topLayout->setMargin(KDialog::marginHint()); | 256 | topLayout->setMargin(KDialog::marginHint()); |
254 | int iii = 0; | 257 | int iii = 0; |
255 | KPrefsWidRadios *syncPrefsGroup = | 258 | KPrefsWidRadios *syncPrefsGroup = |
256 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); | 259 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); |
257 | syncPrefsGroup->addRadio(i18n("English")); | 260 | syncPrefsGroup->addRadio(i18n("English")); |
258 | syncPrefsGroup->addRadio(i18n("German")); | 261 | syncPrefsGroup->addRadio(i18n("German")); |
259 | syncPrefsGroup->addRadio(i18n("French")); | 262 | syncPrefsGroup->addRadio(i18n("French")); |
260 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 263 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
261 | if ( QApplication::desktop()->width() < 300 ) | 264 | if ( QApplication::desktop()->width() < 300 ) |
262 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 265 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
263 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 266 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
264 | ++iii; | 267 | ++iii; |
265 | 268 | ||
266 | syncPrefsGroup = | 269 | syncPrefsGroup = |
267 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); | 270 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); |
268 | if ( QApplication::desktop()->width() > 300 ) | 271 | if ( QApplication::desktop()->width() > 300 ) |
269 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 272 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
270 | syncPrefsGroup->addRadio(i18n("24:00")); | 273 | syncPrefsGroup->addRadio(i18n("24:00")); |
271 | syncPrefsGroup->addRadio(i18n("12:00am")); | 274 | syncPrefsGroup->addRadio(i18n("12:00am")); |
272 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 275 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
273 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 276 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
274 | ++iii; | 277 | ++iii; |
275 | 278 | ||
276 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), | 279 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), |
277 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); | 280 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); |
278 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 281 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
279 | ++iii; | 282 | ++iii; |
280 | 283 | ||
281 | 284 | ||
282 | tabWidget->addTab( topFrame, i18n( "Locale" ) ); | 285 | tabWidget->addTab( topFrame, i18n( "Locale" ) ); |
283 | 286 | ||
284 | } | 287 | } |
285 | 288 | ||
286 | 289 | ||
287 | void KDEPIMConfigWidget::setupTimeZoneTab() | 290 | void KDEPIMConfigWidget::setupTimeZoneTab() |
288 | { | 291 | { |
289 | QWidget *topFrame = new QWidget( this ); | 292 | QWidget *topFrame = new QWidget( this ); |
290 | QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); | 293 | QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); |
291 | topLayout->setSpacing(KDialog::spacingHint()); | 294 | topLayout->setSpacing(KDialog::spacingHint()); |
292 | topLayout->setMargin(KDialog::marginHint()); | 295 | topLayout->setMargin(KDialog::marginHint()); |
293 | 296 | ||
294 | QHBox *timeZoneBox = new QHBox( topFrame ); | 297 | QHBox *timeZoneBox = new QHBox( topFrame ); |
295 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 298 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
296 | 299 | ||
297 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 300 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
298 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 301 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
299 | if ( QApplication::desktop()->width() < 300 ) { | 302 | if ( QApplication::desktop()->width() < 300 ) { |
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h index 6f26513..619f3d7 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.h +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h | |||
@@ -1,154 +1,155 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KDEPim/Pi. | 2 | This file is part of KDEPim/Pi. |
3 | Copyright (c) 2004 Ulf Schenk | 3 | Copyright (c) 2004 Ulf Schenk |
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 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef KDEPIMCONFIGWIDGET_H | 31 | #ifndef KDEPIMCONFIGWIDGET_H |
32 | #define KDEPIMCONFIGWIDGET_H | 32 | #define KDEPIMCONFIGWIDGET_H |
33 | 33 | ||
34 | #include <kprefswidget.h> | 34 | #include <kprefswidget.h> |
35 | #include <qmap.h> | 35 | #include <qmap.h> |
36 | 36 | ||
37 | #include "externalapphandler.h" | 37 | #include "externalapphandler.h" |
38 | 38 | ||
39 | 39 | ||
40 | class QComboBox; | 40 | class QComboBox; |
41 | class QLineEdit; | 41 | class QLineEdit; |
42 | class KPimGlobalPrefs; | 42 | class KPimGlobalPrefs; |
43 | class QGroupBox; | 43 | class QGroupBox; |
44 | class QTabWidget; | 44 | class QTabWidget; |
45 | class KDateEdit; | 45 | class KDateEdit; |
46 | 46 | ||
47 | class KDEPIMConfigWidget : public KPrefsWidget | 47 | class KDEPIMConfigWidget : public KPrefsWidget |
48 | { | 48 | { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | 50 | ||
51 | public: | 51 | public: |
52 | KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name = 0 ); | 52 | KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, const char *name = 0 ); |
53 | 53 | ||
54 | public slots: | 54 | public slots: |
55 | void textChanged( const QString& text ); | 55 | void textChanged( const QString& text ); |
56 | void showTimeZoneTab(); | ||
56 | 57 | ||
57 | protected: | 58 | protected: |
58 | /** Implement this to read custom configuration widgets. */ | 59 | /** Implement this to read custom configuration widgets. */ |
59 | virtual void usrReadConfig(); | 60 | virtual void usrReadConfig(); |
60 | /** Implement this to write custom configuration widgets. */ | 61 | /** Implement this to write custom configuration widgets. */ |
61 | virtual void usrWriteConfig(); | 62 | virtual void usrWriteConfig(); |
62 | 63 | ||
63 | 64 | ||
64 | private slots: | 65 | private slots: |
65 | // void configureExtension(); | 66 | // void configureExtension(); |
66 | // void selectionChanged( QListViewItem* ); | 67 | // void selectionChanged( QListViewItem* ); |
67 | // void itemClicked( QListViewItem* ); | 68 | // void itemClicked( QListViewItem* ); |
68 | void client_changed( int newClient ); | 69 | void client_changed( int newClient ); |
69 | void externalapp_changed( int newApp ); | 70 | void externalapp_changed( int newApp ); |
70 | 71 | ||
71 | private: | 72 | private: |
72 | void setupExternalAppTab(); | 73 | void setupExternalAppTab(); |
73 | void setupLocaleDateTab(); | 74 | void setupLocaleDateTab(); |
74 | void setupLocaleTab(); | 75 | void setupLocaleTab(); |
75 | void setupTimeZoneTab(); | 76 | void setupTimeZoneTab(); |
76 | 77 | ||
77 | void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); | 78 | void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); |
78 | 79 | ||
79 | 80 | ||
80 | void saveEditFieldSettings(); | 81 | void saveEditFieldSettings(); |
81 | void updateClientWidgets(); | 82 | void updateClientWidgets(); |
82 | 83 | ||
83 | QTabWidget *tabWidget; | 84 | QTabWidget *tabWidget; |
84 | 85 | ||
85 | 86 | ||
86 | QLineEdit* mUserDateFormatShort; | 87 | QLineEdit* mUserDateFormatShort; |
87 | QLineEdit* mUserDateFormatLong; | 88 | QLineEdit* mUserDateFormatLong; |
88 | QComboBox* mTimeZoneCombo; | 89 | QComboBox* mTimeZoneCombo; |
89 | KDateEdit* mStartDateSavingEdit; | 90 | KDateEdit* mStartDateSavingEdit; |
90 | KDateEdit* mEndDateSavingEdit; | 91 | KDateEdit* mEndDateSavingEdit; |
91 | 92 | ||
92 | // void restoreExtensionSettings(); | 93 | // void restoreExtensionSettings(); |
93 | // void saveExtensionSettings(); | 94 | // void saveExtensionSettings(); |
94 | 95 | ||
95 | // KListView *mExtensionView; | 96 | // KListView *mExtensionView; |
96 | 97 | ||
97 | // QCheckBox *mNameParsing; | 98 | // QCheckBox *mNameParsing; |
98 | // QCheckBox *mViewsSingleClickBox; | 99 | // QCheckBox *mViewsSingleClickBox; |
99 | // QPushButton *mConfigureButton; | 100 | // QPushButton *mConfigureButton; |
100 | QComboBox* mExternalApps; | 101 | QComboBox* mExternalApps; |
101 | QGroupBox* mExternalAppGroupBox; | 102 | QGroupBox* mExternalAppGroupBox; |
102 | 103 | ||
103 | 104 | ||
104 | QComboBox* mClient; | 105 | QComboBox* mClient; |
105 | QLineEdit* mChannel; | 106 | QLineEdit* mChannel; |
106 | QLineEdit* mMessage; | 107 | QLineEdit* mMessage; |
107 | QLineEdit* mParameters; | 108 | QLineEdit* mParameters; |
108 | QLineEdit* mMessage2; | 109 | QLineEdit* mMessage2; |
109 | QLineEdit* mParameters2; | 110 | QLineEdit* mParameters2; |
110 | 111 | ||
111 | ExternalAppHandler::Types mCurrentApp; | 112 | ExternalAppHandler::Types mCurrentApp; |
112 | int mCurrentClient; | 113 | int mCurrentClient; |
113 | 114 | ||
114 | 115 | ||
115 | int mEmailClient; | 116 | int mEmailClient; |
116 | QString mEmailOtherChannel; | 117 | QString mEmailOtherChannel; |
117 | QString mEmailOtherMessage; | 118 | QString mEmailOtherMessage; |
118 | QString mEmailOtherMessageParameters; | 119 | QString mEmailOtherMessageParameters; |
119 | QString mEmailOtherMessage2; | 120 | QString mEmailOtherMessage2; |
120 | QString mEmailOtherMessageParameters2; | 121 | QString mEmailOtherMessageParameters2; |
121 | 122 | ||
122 | int mPhoneClient; | 123 | int mPhoneClient; |
123 | QString mPhoneOtherChannel; | 124 | QString mPhoneOtherChannel; |
124 | QString mPhoneOtherMessage; | 125 | QString mPhoneOtherMessage; |
125 | QString mPhoneOtherMessageParameters; | 126 | QString mPhoneOtherMessageParameters; |
126 | 127 | ||
127 | int mFaxClient; | 128 | int mFaxClient; |
128 | QString mFaxOtherChannel; | 129 | QString mFaxOtherChannel; |
129 | QString mFaxOtherMessage; | 130 | QString mFaxOtherMessage; |
130 | QString mFaxOtherMessageParameters; | 131 | QString mFaxOtherMessageParameters; |
131 | 132 | ||
132 | int mSMSClient; | 133 | int mSMSClient; |
133 | QString mSMSOtherChannel; | 134 | QString mSMSOtherChannel; |
134 | QString mSMSOtherMessage; | 135 | QString mSMSOtherMessage; |
135 | QString mSMSOtherMessageParameters; | 136 | QString mSMSOtherMessageParameters; |
136 | 137 | ||
137 | int mPagerClient; | 138 | int mPagerClient; |
138 | QString mPagerOtherChannel; | 139 | QString mPagerOtherChannel; |
139 | QString mPagerOtherMessage; | 140 | QString mPagerOtherMessage; |
140 | QString mPagerOtherMessageParameters; | 141 | QString mPagerOtherMessageParameters; |
141 | 142 | ||
142 | int mSipClient; | 143 | int mSipClient; |
143 | QString mSipOtherChannel; | 144 | QString mSipOtherChannel; |
144 | QString mSipOtherMessage; | 145 | QString mSipOtherMessage; |
145 | QString mSipOtherMessageParameters; | 146 | QString mSipOtherMessageParameters; |
146 | 147 | ||
147 | 148 | ||
148 | 149 | ||
149 | QMap<ExternalAppHandler::Types, QString> mExternalAppsMap; | 150 | QMap<ExternalAppHandler::Types, QString> mExternalAppsMap; |
150 | 151 | ||
151 | // AddresseeWidget *mAddresseeWidget; | 152 | // AddresseeWidget *mAddresseeWidget; |
152 | }; | 153 | }; |
153 | 154 | ||
154 | #endif | 155 | #endif |