author | ulf69 <ulf69> | 2004-09-21 19:52:42 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-09-21 19:52:42 (UTC) |
commit | 186ee062d9169860fbab1613ca21b956c69296a6 (patch) (unidiff) | |
tree | 62df959e22100e6fc6d3129a19aaa22f7a7beefa | |
parent | 93313aa8d66c01aa0e4562449020af20b5cef0a7 (diff) | |
download | kdepimpi-186ee062d9169860fbab1613ca21b956c69296a6.zip kdepimpi-186ee062d9169860fbab1613ca21b956c69296a6.tar.gz kdepimpi-186ee062d9169860fbab1613ca21b956c69296a6.tar.bz2 |
changed name of prefs edit widgets to distinguish between krefsdialog and the same implementation in kprefswidget
-rw-r--r-- | korganizer/koprefs.h | 25 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 114 | ||||
-rw-r--r-- | korganizer/koprefsdialog.h | 4 |
3 files changed, 74 insertions, 69 deletions
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index a9ac52f..33eda60 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -1,304 +1,309 @@ | |||
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 KOPREFS_H | 23 | #ifndef KOPREFS_H |
24 | #define KOPREFS_H | 24 | #define KOPREFS_H |
25 | 25 | ||
26 | #include <qdict.h> | 26 | #include <qdict.h> |
27 | 27 | ||
28 | #include <libkdepim/kpimprefs.h> | 28 | #include <libkdepim/kpimprefs.h> |
29 | 29 | ||
30 | class KConfig; | 30 | class KConfig; |
31 | class QFont; | 31 | class QFont; |
32 | class QColor; | 32 | class QColor; |
33 | class QStringList; | 33 | class QStringList; |
34 | 34 | ||
35 | class KOPrefs : public KPimPrefs | 35 | class KOPrefs : public KPimPrefs |
36 | { | 36 | { |
37 | public: | 37 | public: |
38 | enum { FormatVCalendar, FormatICalendar }; | 38 | enum { FormatVCalendar, FormatICalendar }; |
39 | enum { MailClientKMail, MailClientSendmail }; | 39 | enum { MailClientKMail, MailClientSendmail }; |
40 | enum { IMIPDummy, IMIPKMail }; | 40 | enum { IMIPDummy, IMIPKMail }; |
41 | enum { IMIPOutbox, IMIPdirectsend }; | 41 | enum { IMIPOutbox, IMIPdirectsend }; |
42 | enum { neverAuto, addressbookAuto, selectedAuto }; | 42 | enum { neverAuto, addressbookAuto, selectedAuto }; |
43 | enum { standardDestination, askDestination }; | 43 | enum { standardDestination, askDestination }; |
44 | 44 | ||
45 | virtual ~KOPrefs(); | 45 | virtual ~KOPrefs(); |
46 | 46 | ||
47 | /** Get instance of KOPrefs. It is made sure that there is only one | 47 | /** Get instance of KOPrefs. It is made sure that there is only one |
48 | instance. */ | 48 | instance. */ |
49 | static KOPrefs *instance(); | 49 | static KOPrefs *instance(); |
50 | 50 | ||
51 | /** Set preferences to default values */ | 51 | /** Set preferences to default values */ |
52 | void usrSetDefaults(); | 52 | void usrSetDefaults(); |
53 | 53 | ||
54 | /** Read preferences from config file */ | 54 | /** Read preferences from config file */ |
55 | void usrReadConfig(); | 55 | void usrReadConfig(); |
56 | 56 | ||
57 | /** Write preferences to config file */ | 57 | /** Write preferences to config file */ |
58 | void usrWriteConfig(); | 58 | void usrWriteConfig(); |
59 | void setCategoryDefaults(); | 59 | void setCategoryDefaults(); |
60 | 60 | ||
61 | protected: | 61 | protected: |
62 | void setTimeZoneIdDefault(); | 62 | void setTimeZoneIdDefault(); |
63 | 63 | ||
64 | /** Fill empty mail fields with default values. */ | 64 | /** Fill empty mail fields with default values. */ |
65 | void fillMailDefaults(); | 65 | void fillMailDefaults(); |
66 | 66 | ||
67 | private: | 67 | private: |
68 | /** Constructor disabled for public. Use instance() to create a KOPrefs | 68 | /** Constructor disabled for public. Use instance() to create a KOPrefs |
69 | object. */ | 69 | object. */ |
70 | KOPrefs(); | 70 | KOPrefs(); |
71 | 71 | ||
72 | static KOPrefs *mInstance; | 72 | static KOPrefs *mInstance; |
73 | QDict<QString> *mLocaleDict; | 73 | QDict<QString> *mLocaleDict; |
74 | QStringList getDefaultList(); | 74 | QStringList getDefaultList(); |
75 | public: | 75 | public: |
76 | // preferences data | 76 | // preferences data |
77 | KConfig* getConfig(); | 77 | KConfig* getConfig(); |
78 | void setFullName(const QString &); | 78 | void setFullName(const QString &); |
79 | QString fullName(); | 79 | QString fullName(); |
80 | void setEmail(const QString &); | 80 | void setEmail(const QString &); |
81 | QString email(); | 81 | QString email(); |
82 | 82 | ||
83 | QString mAdditional; | 83 | QString mAdditional; |
84 | 84 | ||
85 | bool mEmailControlCenter; | 85 | bool mEmailControlCenter; |
86 | 86 | ||
87 | bool mBcc; | 87 | bool mBcc; |
88 | bool mAutoSave; | 88 | bool mAutoSave; |
89 | int mAutoSaveInterval; | 89 | int mAutoSaveInterval; |
90 | bool mConfirm; | 90 | bool mConfirm; |
91 | 91 | ||
92 | bool mEnableGroupScheduling; | 92 | bool mEnableGroupScheduling; |
93 | bool mEnableProjectView; | 93 | bool mEnableProjectView; |
94 | 94 | ||
95 | int mDefaultFormat; | 95 | int mDefaultFormat; |
96 | int mMailClient; | 96 | int mMailClient; |
97 | 97 | ||
98 | QString mTimeZone; | 98 | QString mTimeZone; |
99 | QString mTimeZoneId; | ||
100 | //QString mTimeZoneName; // e.g. +00:04:00 Indian/Mauritius | 99 | //QString mTimeZoneName; // e.g. +00:04:00 Indian/Mauritius |
101 | //int mTimeZoneOffset; // e.g. -240 min | 100 | //int mTimeZoneOffset; // e.g. -240 min |
102 | bool mUseDaylightsaving; | ||
103 | int mDaylightsavingStart; | ||
104 | int mDaylightsavingEnd; | ||
105 | int mStartTime; | 101 | int mStartTime; |
106 | int mDefaultDuration; | 102 | int mDefaultDuration; |
107 | int mAlarmTime; | 103 | int mAlarmTime; |
108 | int mDaylightSavings; | 104 | int mDaylightSavings; |
109 | 105 | ||
110 | int mWorkingHoursStart; | 106 | int mWorkingHoursStart; |
111 | int mWorkingHoursEnd; | 107 | int mWorkingHoursEnd; |
112 | bool mExcludeHolidays; | 108 | bool mExcludeHolidays; |
113 | bool mExcludeSaturdays; | 109 | bool mExcludeSaturdays; |
114 | bool mMarcusBainsShowSeconds; | 110 | bool mMarcusBainsShowSeconds; |
115 | 111 | ||
116 | QFont mTimeBarFont; | 112 | QFont mTimeBarFont; |
117 | QFont mMonthViewFont; | 113 | QFont mMonthViewFont; |
118 | QFont mAgendaViewFont; | 114 | QFont mAgendaViewFont; |
119 | QFont mMarcusBainsFont; | 115 | QFont mMarcusBainsFont; |
120 | QFont mTimeLabelsFont; | 116 | QFont mTimeLabelsFont; |
121 | QFont mTodoViewFont; | 117 | QFont mTodoViewFont; |
122 | QFont mListViewFont; | 118 | QFont mListViewFont; |
123 | QFont mDateNavigatorFont; | 119 | QFont mDateNavigatorFont; |
124 | QFont mEditBoxFont; | 120 | QFont mEditBoxFont; |
125 | QFont mJornalViewFont; | 121 | QFont mJornalViewFont; |
126 | QFont mWhatsNextFont; | 122 | QFont mWhatsNextFont; |
127 | QFont mEventViewFont; | 123 | QFont mEventViewFont; |
128 | 124 | ||
129 | 125 | ||
130 | 126 | ||
131 | 127 | ||
132 | QColor mHolidayColor; | 128 | QColor mHolidayColor; |
133 | QColor mHighlightColor; | 129 | QColor mHighlightColor; |
134 | QColor mEventColor; | 130 | QColor mEventColor; |
135 | QColor mAgendaBgColor; | 131 | QColor mAgendaBgColor; |
136 | QColor mWorkingHoursColor; | 132 | QColor mWorkingHoursColor; |
137 | QColor mTodoDueTodayColor; | 133 | QColor mTodoDueTodayColor; |
138 | QColor mTodoOverdueColor; | 134 | QColor mTodoOverdueColor; |
139 | QColor mMonthViewEvenColor; | 135 | QColor mMonthViewEvenColor; |
140 | QColor mMonthViewOddColor; | 136 | QColor mMonthViewOddColor; |
141 | QColor mMonthViewHolidayColor; | 137 | QColor mMonthViewHolidayColor; |
142 | bool mMonthViewUsesDayColors; | 138 | bool mMonthViewUsesDayColors; |
143 | bool mMonthViewSatSunTog; | 139 | bool mMonthViewSatSunTog; |
144 | QColor mAppColor1; | 140 | QColor mAppColor1; |
145 | QColor mAppColor2; | 141 | QColor mAppColor2; |
146 | bool mUseAppColors; | 142 | bool mUseAppColors; |
147 | 143 | ||
148 | int mDayBegins; | 144 | int mDayBegins; |
149 | int mHourSize; | 145 | int mHourSize; |
150 | int mAllDaySize; | 146 | int mAllDaySize; |
151 | bool mShowFullMenu; | 147 | bool mShowFullMenu; |
152 | bool mDailyRecur; | 148 | bool mDailyRecur; |
153 | bool mWeeklyRecur; | 149 | bool mWeeklyRecur; |
154 | bool mMonthDailyRecur; | 150 | bool mMonthDailyRecur; |
155 | bool mMonthWeeklyRecur; | 151 | bool mMonthWeeklyRecur; |
156 | bool mMonthShowIcons; | 152 | bool mMonthShowIcons; |
157 | bool mMonthShowShort; | 153 | bool mMonthShowShort; |
158 | bool mEnableToolTips; | 154 | bool mEnableToolTips; |
159 | bool mEnableMonthScroll; | 155 | bool mEnableMonthScroll; |
160 | bool mFullViewMonth; | 156 | bool mFullViewMonth; |
161 | bool mMonthViewUsesCategoryColor; | 157 | bool mMonthViewUsesCategoryColor; |
162 | bool mFullViewTodo; | 158 | bool mFullViewTodo; |
163 | bool mShowCompletedTodo; | 159 | bool mShowCompletedTodo; |
164 | bool mMarcusBainsEnabled; | 160 | bool mMarcusBainsEnabled; |
165 | int mNextXDays; | 161 | int mNextXDays; |
166 | int mWhatsNextDays; | 162 | int mWhatsNextDays; |
167 | int mWhatsNextPrios; | 163 | int mWhatsNextPrios; |
168 | bool mEnableQuickTodo; | 164 | bool mEnableQuickTodo; |
169 | bool mLanguageChanged; | 165 | bool mLanguageChanged; |
170 | 166 | ||
171 | bool mCompactDialogs; | 167 | bool mCompactDialogs; |
172 | bool mVerticalScreen; | 168 | bool mVerticalScreen; |
173 | 169 | ||
174 | bool mShowIconNewTodo; | 170 | bool mShowIconNewTodo; |
175 | bool mShowIconNewEvent; | 171 | bool mShowIconNewEvent; |
176 | bool mShowIconSearch; | 172 | bool mShowIconSearch; |
177 | bool mShowIconList; | 173 | bool mShowIconList; |
178 | bool mShowIconDay1; | 174 | bool mShowIconDay1; |
179 | bool mShowIconDay5; | 175 | bool mShowIconDay5; |
180 | bool mShowIconDay7; | 176 | bool mShowIconDay7; |
181 | bool mShowIconMonth; | 177 | bool mShowIconMonth; |
182 | bool mShowIconTodoview; | 178 | bool mShowIconTodoview; |
183 | bool mShowIconBackFast; | 179 | bool mShowIconBackFast; |
184 | bool mShowIconBack; | 180 | bool mShowIconBack; |
185 | bool mShowIconToday; | 181 | bool mShowIconToday; |
186 | bool mShowIconForward; | 182 | bool mShowIconForward; |
187 | bool mShowIconForwardFast; | 183 | bool mShowIconForwardFast; |
188 | bool mShowIconWhatsThis; | 184 | bool mShowIconWhatsThis; |
189 | bool mShowIconNextDays; | 185 | bool mShowIconNextDays; |
190 | bool mShowIconNext; | 186 | bool mShowIconNext; |
191 | bool mShowIconJournal; | 187 | bool mShowIconJournal; |
192 | 188 | ||
193 | bool mShowIconStretch; | 189 | bool mShowIconStretch; |
194 | 190 | ||
195 | bool mToolBarHor; | 191 | bool mToolBarHor; |
196 | bool mToolBarUp; | 192 | bool mToolBarUp; |
197 | bool mToolBarMiniIcons; | 193 | bool mToolBarMiniIcons; |
198 | 194 | ||
199 | bool mAskForQuit; | 195 | bool mAskForQuit; |
200 | bool mUsePassWd; | 196 | bool mUsePassWd; |
201 | bool mWriteBackFile; | 197 | bool mWriteBackFile; |
202 | int mWriteBackInFuture; | 198 | int mWriteBackInFuture; |
203 | bool mAskForPreferences; | 199 | bool mAskForPreferences; |
204 | bool mShowSyncSummary; | 200 | bool mShowSyncSummary; |
205 | bool mShowSyncEvents; | 201 | bool mShowSyncEvents; |
206 | bool mShowTodoInAgenda; | 202 | bool mShowTodoInAgenda; |
207 | bool mWriteBackExistingOnly; | 203 | bool mWriteBackExistingOnly; |
208 | 204 | ||
209 | QString mRemoteIP; | 205 | QString mRemoteIP; |
210 | QString mRemoteUser; | 206 | QString mRemoteUser; |
211 | QString mRemotePassWd; | 207 | QString mRemotePassWd; |
212 | QString mRemoteFile; | 208 | QString mRemoteFile; |
213 | QString mLocalTempFile; | 209 | QString mLocalTempFile; |
214 | QString mPhoneDevice; | 210 | QString mPhoneDevice; |
215 | QString mPhoneConnection; | 211 | QString mPhoneConnection; |
216 | QString mPhoneModel; | 212 | QString mPhoneModel; |
217 | 213 | ||
218 | int mLastSyncTime; | 214 | int mLastSyncTime; |
219 | int mSyncAlgoPrefs; | 215 | int mSyncAlgoPrefs; |
220 | int mRingSyncAlgoPrefs; | 216 | int mRingSyncAlgoPrefs; |
221 | QStringList mSyncProfileNames; | 217 | QStringList mSyncProfileNames; |
222 | QStringList mExternSyncProfiles; | 218 | QStringList mExternSyncProfiles; |
223 | QString mLocalMachineName; | 219 | QString mLocalMachineName; |
224 | void setCategoryColor(QString cat,const QColor & color); | 220 | void setCategoryColor(QString cat,const QColor & color); |
225 | QColor *categoryColor(QString cat); | 221 | QColor *categoryColor(QString cat); |
226 | 222 | ||
227 | QString mArchiveFile; | 223 | QString mArchiveFile; |
228 | QString mHtmlExportFile; | 224 | QString mHtmlExportFile; |
229 | bool mHtmlWithSave; | 225 | bool mHtmlWithSave; |
230 | 226 | ||
231 | QStringList mSelectedPlugins; | 227 | QStringList mSelectedPlugins; |
232 | 228 | ||
233 | QString mLastImportFile; | 229 | QString mLastImportFile; |
234 | QString mLastVcalFile; | 230 | QString mLastVcalFile; |
235 | QString mLastSaveFile; | 231 | QString mLastSaveFile; |
236 | QString mLastLoadFile; | 232 | QString mLastLoadFile; |
237 | QString mLastSyncedLocalFile; | 233 | QString mLastSyncedLocalFile; |
238 | 234 | ||
239 | 235 | ||
240 | QString mDefaultAlarmFile; | 236 | QString mDefaultAlarmFile; |
241 | int mIMIPScheduler; | 237 | int mIMIPScheduler; |
242 | int mIMIPSend; | 238 | int mIMIPSend; |
243 | QStringList mAdditionalMails; | 239 | QStringList mAdditionalMails; |
244 | int mIMIPAutoRefresh; | 240 | int mIMIPAutoRefresh; |
245 | int mIMIPAutoInsertReply; | 241 | int mIMIPAutoInsertReply; |
246 | int mIMIPAutoInsertRequest; | 242 | int mIMIPAutoInsertRequest; |
247 | int mIMIPAutoFreeBusy; | 243 | int mIMIPAutoFreeBusy; |
248 | int mIMIPAutoFreeBusyReply; | 244 | int mIMIPAutoFreeBusyReply; |
249 | 245 | ||
250 | QStringList mTodoTemplates; | 246 | QStringList mTodoTemplates; |
251 | QStringList mEventTemplates; | 247 | QStringList mEventTemplates; |
252 | 248 | ||
253 | int mDestination; | 249 | int mDestination; |
254 | 250 | ||
255 | 251 | ||
256 | bool mEditOnDoubleClick; | 252 | bool mEditOnDoubleClick; |
257 | bool mViewChangeHoldFullscreen; | 253 | bool mViewChangeHoldFullscreen; |
258 | bool mViewChangeHoldNonFullscreen; | 254 | bool mViewChangeHoldNonFullscreen; |
259 | bool mCenterOnCurrentTime; | 255 | bool mCenterOnCurrentTime; |
260 | bool mSetTimeToDayStartAt; | 256 | bool mSetTimeToDayStartAt; |
261 | bool mHighlightCurrentDay; | 257 | bool mHighlightCurrentDay; |
262 | bool mUseHighlightLightColor; | 258 | bool mUseHighlightLightColor; |
263 | bool mListViewMonthTimespan; | 259 | bool mListViewMonthTimespan; |
264 | bool mWNViewShowsParents; | 260 | bool mWNViewShowsParents; |
265 | bool mWNViewShowLocation; | 261 | bool mWNViewShowLocation; |
266 | bool mTodoViewShowsPercentage; | 262 | bool mTodoViewShowsPercentage; |
267 | bool mTodoViewUsesCatColors; | 263 | bool mTodoViewUsesCatColors; |
268 | bool mTodoViewUsesSmallFont; | 264 | bool mTodoViewUsesSmallFont; |
269 | bool mTodoViewUsesForegroundColor; | 265 | bool mTodoViewUsesForegroundColor; |
270 | bool mMonthViewUsesForegroundColor; | 266 | bool mMonthViewUsesForegroundColor; |
271 | 267 | ||
272 | bool mHightlightDateTimeEdit; | 268 | bool mHightlightDateTimeEdit; |
273 | int mPreferredLanguage; | ||
274 | bool mUseQuicksave; | 269 | bool mUseQuicksave; |
275 | int mPreferredTime; | ||
276 | int mPreferredDate; | ||
277 | bool mWeekStartsOnSunday; | ||
278 | bool mShortDateInViewer; | 270 | bool mShortDateInViewer; |
279 | QString mUserDateFormatLong; | ||
280 | QString mUserDateFormatShort; | ||
281 | 271 | ||
282 | QStringList mLocationDefaults; | 272 | QStringList mLocationDefaults; |
283 | QStringList mEventSummaryUser; | 273 | QStringList mEventSummaryUser; |
284 | QStringList mTodoSummaryUser; | 274 | QStringList mTodoSummaryUser; |
285 | 275 | ||
286 | bool mUseInternalAlarmNotification; | 276 | bool mUseInternalAlarmNotification; |
287 | int mAlarmPlayBeeps; | 277 | int mAlarmPlayBeeps; |
288 | int mAlarmSuspendTime; | 278 | int mAlarmSuspendTime; |
289 | int mAlarmSuspendCount; | 279 | int mAlarmSuspendCount; |
290 | int mAlarmBeepInterval; | 280 | int mAlarmBeepInterval; |
291 | 281 | ||
282 | |||
283 | //US I copied the following settings into KPimGlobalPrefs | ||
284 | // that allows us later to easily remove the settings from here. | ||
285 | int mPreferredDate; | ||
286 | QString mUserDateFormatLong; | ||
287 | QString mUserDateFormatShort; | ||
288 | int mPreferredLanguage; | ||
289 | int mPreferredTime; | ||
290 | bool mWeekStartsOnSunday; | ||
291 | QString mTimeZoneId; | ||
292 | bool mUseDaylightsaving; | ||
293 | int mDaylightsavingStart; | ||
294 | int mDaylightsavingEnd; | ||
295 | |||
296 | |||
292 | private: | 297 | private: |
293 | QDict<QColor> mCategoryColors; | 298 | QDict<QColor> mCategoryColors; |
294 | QColor mDefaultCategoryColor; | 299 | QColor mDefaultCategoryColor; |
295 | 300 | ||
296 | QFont mDefaultTimeBarFont; | 301 | QFont mDefaultTimeBarFont; |
297 | QFont mDefaultViewFont; | 302 | QFont mDefaultViewFont; |
298 | QFont mDefaultMonthViewFont; | 303 | QFont mDefaultMonthViewFont; |
299 | 304 | ||
300 | QString mName; | 305 | QString mName; |
301 | QString mEmail; | 306 | QString mEmail; |
302 | }; | 307 | }; |
303 | 308 | ||
304 | #endif | 309 | #endif |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 5ba4817..1c30faa 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -1,1419 +1,1419 @@ | |||
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 <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 | 70 | ||
71 | 71 | ||
72 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 72 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
73 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 73 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
74 | { | 74 | { |
75 | 75 | ||
76 | setCaption( i18n("Preferences - some settings need a restart (nr)")); | 76 | setCaption( i18n("Preferences - some settings need a restart (nr)")); |
77 | mCategoryDict.setAutoDelete(true); | 77 | mCategoryDict.setAutoDelete(true); |
78 | 78 | ||
79 | KGlobal::locale()->insertCatalogue("timezones"); | 79 | KGlobal::locale()->insertCatalogue("timezones"); |
80 | 80 | ||
81 | setupMainTab(); | 81 | setupMainTab(); |
82 | setupLocaleTab(); | 82 | setupLocaleTab(); |
83 | setupTimeZoneTab(); | 83 | setupTimeZoneTab(); |
84 | setupTimeTab(); | 84 | setupTimeTab(); |
85 | setupLocaleDateTab(); | 85 | setupLocaleDateTab(); |
86 | setupFontsTab(); | 86 | setupFontsTab(); |
87 | setupColorsTab(); | 87 | setupColorsTab(); |
88 | setupViewsTab(); | 88 | setupViewsTab(); |
89 | //setupSyncTab(); | 89 | //setupSyncTab(); |
90 | //setupSyncAlgTab(); | 90 | //setupSyncAlgTab(); |
91 | //setupPrinterTab(); | 91 | //setupPrinterTab(); |
92 | //setupGroupSchedulingTab(); | 92 | //setupGroupSchedulingTab(); |
93 | //setupGroupAutomationTab(); | 93 | //setupGroupAutomationTab(); |
94 | } | 94 | } |
95 | 95 | ||
96 | 96 | ||
97 | KOPrefsDialog::~KOPrefsDialog() | 97 | KOPrefsDialog::~KOPrefsDialog() |
98 | { | 98 | { |
99 | } | 99 | } |
100 | 100 | ||
101 | void KOPrefsDialog::setupLocaleDateTab() | 101 | void KOPrefsDialog::setupLocaleDateTab() |
102 | { | 102 | { |
103 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 103 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
104 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 104 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
105 | topLayout->setSpacing(spacingHint()); | 105 | topLayout->setSpacing(spacingHint()); |
106 | topLayout->setMargin(marginHint()); | 106 | topLayout->setMargin(marginHint()); |
107 | int iii = 0; | 107 | int iii = 0; |
108 | 108 | ||
109 | 109 | ||
110 | KPrefsWidRadios *syncPrefsGroup = | 110 | KPrefsDialogWidRadios *syncPrefsGroup = |
111 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 111 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
112 | QString format; | 112 | QString format; |
113 | if ( QApplication::desktop()->width() < 480 ) | 113 | if ( QApplication::desktop()->width() < 480 ) |
114 | format = "(%d.%m.%Y)"; | 114 | format = "(%d.%m.%Y)"; |
115 | else | 115 | else |
116 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 116 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
117 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 117 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
118 | if ( QApplication::desktop()->width() < 480 ) | 118 | if ( QApplication::desktop()->width() < 480 ) |
119 | format = "(%m.%d.%Y)"; | 119 | format = "(%m.%d.%Y)"; |
120 | else | 120 | else |
121 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 121 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
122 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 122 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
123 | if ( QApplication::desktop()->width() < 480 ) | 123 | if ( QApplication::desktop()->width() < 480 ) |
124 | format = "(%Y-%m-%d)"; | 124 | format = "(%Y-%m-%d)"; |
125 | else | 125 | else |
126 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 126 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
127 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 127 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
128 | syncPrefsGroup->addRadio(i18n("User defined")); | 128 | syncPrefsGroup->addRadio(i18n("User defined")); |
129 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 129 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
130 | ++iii; | 130 | ++iii; |
131 | ++iii; | 131 | ++iii; |
132 | QLabel * lab; | 132 | QLabel * lab; |
133 | mUserDateFormatLong = new QLineEdit(topFrame); | 133 | mUserDateFormatLong = new QLineEdit(topFrame); |
134 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 134 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
135 | topLayout->addWidget(lab ,iii,0); | 135 | topLayout->addWidget(lab ,iii,0); |
136 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 136 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
137 | ++iii; | 137 | ++iii; |
138 | mUserDateFormatShort = new QLineEdit(topFrame); | 138 | mUserDateFormatShort = new QLineEdit(topFrame); |
139 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 139 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
140 | topLayout->addWidget(lab ,iii,0); | 140 | topLayout->addWidget(lab ,iii,0); |
141 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 141 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
142 | ++iii; | 142 | ++iii; |
143 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 143 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
144 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 144 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
145 | ++iii; | 145 | ++iii; |
146 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 146 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
147 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 147 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
148 | ++iii; | 148 | ++iii; |
149 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 149 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
150 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 150 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
151 | ++iii; | 151 | ++iii; |
152 | 152 | ||
153 | } | 153 | } |
154 | 154 | ||
155 | void KOPrefsDialog::setupLocaleTab() | 155 | void KOPrefsDialog::setupLocaleTab() |
156 | { | 156 | { |
157 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 157 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
158 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 158 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
159 | topLayout->setSpacing(spacingHint()); | 159 | topLayout->setSpacing(spacingHint()); |
160 | topLayout->setMargin(marginHint()); | 160 | topLayout->setMargin(marginHint()); |
161 | int iii = 0; | 161 | int iii = 0; |
162 | KPrefsWidRadios *syncPrefsGroup = | 162 | KPrefsDialogWidRadios *syncPrefsGroup = |
163 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 163 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
164 | syncPrefsGroup->addRadio(i18n("English")); | 164 | syncPrefsGroup->addRadio(i18n("English")); |
165 | syncPrefsGroup->addRadio(i18n("German")); | 165 | syncPrefsGroup->addRadio(i18n("German")); |
166 | syncPrefsGroup->addRadio(i18n("French")); | 166 | syncPrefsGroup->addRadio(i18n("French")); |
167 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 167 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
168 | if ( QApplication::desktop()->width() < 300 ) | 168 | if ( QApplication::desktop()->width() < 300 ) |
169 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 169 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
170 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 170 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
171 | ++iii; | 171 | ++iii; |
172 | 172 | ||
173 | syncPrefsGroup = | 173 | syncPrefsGroup = |
174 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 174 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
175 | if ( QApplication::desktop()->width() > 300 ) | 175 | if ( QApplication::desktop()->width() > 300 ) |
176 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 176 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
177 | syncPrefsGroup->addRadio(i18n("24:00")); | 177 | syncPrefsGroup->addRadio(i18n("24:00")); |
178 | syncPrefsGroup->addRadio(i18n("12:00am")); | 178 | syncPrefsGroup->addRadio(i18n("12:00am")); |
179 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 179 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
180 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 180 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
181 | ++iii; | 181 | ++iii; |
182 | KPrefsWidBool *sb; | 182 | KPrefsDialogWidBool *sb; |
183 | if ( QApplication::desktop()->width() < 300 ) { | 183 | if ( QApplication::desktop()->width() < 300 ) { |
184 | sb = | 184 | sb = |
185 | addWidBool(i18n("Week starts on Sunday"), | 185 | addWidBool(i18n("Week starts on Sunday"), |
186 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 186 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
187 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 187 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
188 | ++iii; | 188 | ++iii; |
189 | sb = | 189 | sb = |
190 | addWidBool(i18n("Use short date in (WN/E) view"), | 190 | addWidBool(i18n("Use short date in (WN/E) view"), |
191 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 191 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
192 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 192 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
193 | } | 193 | } |
194 | else { | 194 | else { |
195 | QWidget * hb = new QWidget( topFrame ); | 195 | QWidget * hb = new QWidget( topFrame ); |
196 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 196 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
197 | sb = | 197 | sb = |
198 | addWidBool(i18n("Week starts on Sunday"), | 198 | addWidBool(i18n("Week starts on Sunday"), |
199 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 199 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
200 | hbLayout->addWidget(sb->checkBox() ); | 200 | hbLayout->addWidget(sb->checkBox() ); |
201 | sb = | 201 | sb = |
202 | addWidBool(i18n("Use short date in (WN/E) view"), | 202 | addWidBool(i18n("Use short date in (WN/E) view"), |
203 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 203 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
204 | hbLayout->addWidget(sb->checkBox() ); | 204 | hbLayout->addWidget(sb->checkBox() ); |
205 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 205 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
206 | 206 | ||
207 | } | 207 | } |
208 | //#ifndef DESKTOP_VERSION | 208 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION |
209 | #if 0 | 209 | #if 0 |
210 | ++iii; | 210 | ++iii; |
211 | sb = | 211 | sb = |
212 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 212 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
213 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 213 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
214 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 214 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
215 | #endif | 215 | #endif |
216 | } | 216 | } |
217 | void KOPrefsDialog::showSyncPage() | 217 | void KOPrefsDialog::showSyncPage() |
218 | { | 218 | { |
219 | showPage ( 2 ) ; | 219 | showPage ( 2 ) ; |
220 | 220 | ||
221 | } | 221 | } |
222 | void KOPrefsDialog::setupSyncAlgTab() | 222 | void KOPrefsDialog::setupSyncAlgTab() |
223 | { | 223 | { |
224 | #if 0 | 224 | #if 0 |
225 | QLabel * lab; | 225 | QLabel * lab; |
226 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 226 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); |
227 | mSetupSyncAlgTab = topFrame; | 227 | mSetupSyncAlgTab = topFrame; |
228 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 228 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
229 | topLayout->setSpacing(spacingHint()); | 229 | topLayout->setSpacing(spacingHint()); |
230 | topLayout->setMargin(marginHint()); | 230 | topLayout->setMargin(marginHint()); |
231 | int iii = 0; | 231 | int iii = 0; |
232 | 232 | ||
233 | KPrefsWidBool *sb = | 233 | KPrefsDialogWidBool *sb = |
234 | addWidBool(i18n("Ask for preferences before syncing"), | 234 | addWidBool(i18n("Ask for preferences before syncing"), |
235 | &(KOPrefs::instance()->mAskForPreferences),topFrame); | 235 | &(KOPrefs::instance()->mAskForPreferences),topFrame); |
236 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 236 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
237 | 237 | ||
238 | ++iii; | 238 | ++iii; |
239 | 239 | ||
240 | KPrefsWidRadios *syncPrefsGroup = | 240 | KPrefsDialogWidRadios *syncPrefsGroup = |
241 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), | 241 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), |
242 | topFrame); | 242 | topFrame); |
243 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 243 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
244 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 244 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
245 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 245 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
246 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 246 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
247 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 247 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
248 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 248 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
249 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 249 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
250 | ++iii; | 250 | ++iii; |
251 | sb = | 251 | sb = |
252 | addWidBool(i18n("Show summary after syncing"), | 252 | addWidBool(i18n("Show summary after syncing"), |
253 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); | 253 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); |
254 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 254 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
255 | 255 | ||
256 | ++iii; | 256 | ++iii; |
257 | #endif | 257 | #endif |
258 | 258 | ||
259 | 259 | ||
260 | 260 | ||
261 | } | 261 | } |
262 | 262 | ||
263 | 263 | ||
264 | void KOPrefsDialog::setupSyncTab() | 264 | void KOPrefsDialog::setupSyncTab() |
265 | { | 265 | { |
266 | #if 0 | 266 | #if 0 |
267 | QLabel * lab; | 267 | QLabel * lab; |
268 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); | 268 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); |
269 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 269 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
270 | topLayout->setSpacing(spacingHint()); | 270 | topLayout->setSpacing(spacingHint()); |
271 | topLayout->setMargin(marginHint()); | 271 | topLayout->setMargin(marginHint()); |
272 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); | 272 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); |
273 | int iii = 0; | 273 | int iii = 0; |
274 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); | 274 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); |
275 | ++iii; | 275 | ++iii; |
276 | 276 | ||
277 | mRemoteIPEdit = new QLineEdit(topFrame); | 277 | mRemoteIPEdit = new QLineEdit(topFrame); |
278 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); | 278 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); |
279 | topLayout->addWidget(lab ,iii,0); | 279 | topLayout->addWidget(lab ,iii,0); |
280 | topLayout->addWidget(mRemoteIPEdit,iii,1); | 280 | topLayout->addWidget(mRemoteIPEdit,iii,1); |
281 | ++iii; | 281 | ++iii; |
282 | mRemoteUser = new QLineEdit(topFrame); | 282 | mRemoteUser = new QLineEdit(topFrame); |
283 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); | 283 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); |
284 | topLayout->addWidget(lab ,iii,0); | 284 | topLayout->addWidget(lab ,iii,0); |
285 | topLayout->addWidget(mRemoteUser, iii,1); | 285 | topLayout->addWidget(mRemoteUser, iii,1); |
286 | ++iii; | 286 | ++iii; |
287 | 287 | ||
288 | mRemoteFile = new QLineEdit(topFrame); | 288 | mRemoteFile = new QLineEdit(topFrame); |
289 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); | 289 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); |
290 | topLayout->addWidget(lab ,iii,0); | 290 | topLayout->addWidget(lab ,iii,0); |
291 | topLayout->addWidget(mRemoteFile,iii,1); | 291 | topLayout->addWidget(mRemoteFile,iii,1); |
292 | ++iii; | 292 | ++iii; |
293 | 293 | ||
294 | mLocalTempFile = new QLineEdit(topFrame); | 294 | mLocalTempFile = new QLineEdit(topFrame); |
295 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); | 295 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); |
296 | topLayout->addWidget(lab ,iii,0); | 296 | topLayout->addWidget(lab ,iii,0); |
297 | topLayout->addWidget(mLocalTempFile,iii,1); | 297 | topLayout->addWidget(mLocalTempFile,iii,1); |
298 | ++iii; | 298 | ++iii; |
299 | 299 | ||
300 | KPrefsWidBool *wb = | 300 | KPrefsDialogWidBool *wb = |
301 | addWidBool(i18n("Write back synced file"), | 301 | addWidBool(i18n("Write back synced file"), |
302 | &(KOPrefs::instance()->mWriteBackFile),topFrame); | 302 | &(KOPrefs::instance()->mWriteBackFile),topFrame); |
303 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 303 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
304 | ++iii; | 304 | ++iii; |
305 | wb = | 305 | wb = |
306 | addWidBool(i18n("Write back existing entries only"), | 306 | addWidBool(i18n("Write back existing entries only"), |
307 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); | 307 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); |
308 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 308 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
309 | ++iii; | 309 | ++iii; |
310 | 310 | ||
311 | #endif | 311 | #endif |
312 | } | 312 | } |
313 | 313 | ||
314 | void KOPrefsDialog::setupMainTab() | 314 | void KOPrefsDialog::setupMainTab() |
315 | { | 315 | { |
316 | QFrame *topFrame = addPage(i18n("General"),0,0); | 316 | QFrame *topFrame = addPage(i18n("General"),0,0); |
317 | // DesktopIcon("identity",KIcon::SizeMedium)); | 317 | // DesktopIcon("identity",KIcon::SizeMedium)); |
318 | 318 | ||
319 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 319 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
320 | topLayout->setSpacing(spacingHint()); | 320 | topLayout->setSpacing(spacingHint()); |
321 | topLayout->setMargin(marginHint()); | 321 | topLayout->setMargin(marginHint()); |
322 | 322 | ||
323 | // KPrefsWidBool *emailControlCenter = | 323 | // KPrefsDialogWidBool *emailControlCenter = |
324 | // addWidBool(i18n("&Use email settings from Control Center"), | 324 | // addWidBool(i18n("&Use email settings from Control Center"), |
325 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 325 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
326 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 326 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
327 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 327 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
328 | // SLOT(toggleEmailSettings(bool))); | 328 | // SLOT(toggleEmailSettings(bool))); |
329 | 329 | ||
330 | mNameEdit = new QLineEdit(topFrame); | 330 | mNameEdit = new QLineEdit(topFrame); |
331 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 331 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
332 | topLayout->addWidget(mNameLabel,0,0); | 332 | topLayout->addWidget(mNameLabel,0,0); |
333 | topLayout->addWidget(mNameEdit,0,1); | 333 | topLayout->addWidget(mNameEdit,0,1); |
334 | 334 | ||
335 | mEmailEdit = new QLineEdit(topFrame); | 335 | mEmailEdit = new QLineEdit(topFrame); |
336 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 336 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
337 | topLayout->addWidget(mEmailLabel,1,0); | 337 | topLayout->addWidget(mEmailLabel,1,0); |
338 | topLayout->addWidget(mEmailEdit,1,1); | 338 | topLayout->addWidget(mEmailEdit,1,1); |
339 | KPrefsWidBool *wb; | 339 | KPrefsDialogWidBool *wb; |
340 | QHBox *dummy; | 340 | QHBox *dummy; |
341 | if ( QApplication::desktop()->width() > 480 ) { | 341 | if ( QApplication::desktop()->width() > 480 ) { |
342 | dummy = new QHBox(topFrame); | 342 | dummy = new QHBox(topFrame); |
343 | } else { | 343 | } else { |
344 | dummy = new QVBox(topFrame); | 344 | dummy = new QVBox(topFrame); |
345 | } | 345 | } |
346 | 346 | ||
347 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); | 347 | topLayout->addMultiCellWidget(dummy, 2,2,0,1); |
348 | addWidBool(i18n("Full menu bar(nr)"), | 348 | addWidBool(i18n("Full menu bar(nr)"), |
349 | &(KOPrefs::instance()->mShowFullMenu),dummy); | 349 | &(KOPrefs::instance()->mShowFullMenu),dummy); |
350 | 350 | ||
351 | 351 | ||
352 | addWidBool(i18n("Mini icons in toolbar(nr)"), | 352 | addWidBool(i18n("Mini icons in toolbar(nr)"), |
353 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); | 353 | &(KOPrefs::instance()->mToolBarMiniIcons),dummy); |
354 | 354 | ||
355 | 355 | ||
356 | dummy = new QHBox(topFrame); | 356 | dummy = new QHBox(topFrame); |
357 | new QLabel(i18n("Days in What's Next:"),dummy); | 357 | new QLabel(i18n("Days in What's Next:"),dummy); |
358 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); | 358 | mWhatsNextSpin = new QSpinBox(1,14,1,dummy); |
359 | 359 | ||
360 | topLayout->addMultiCellWidget(dummy,3,3,0,1); | 360 | topLayout->addMultiCellWidget(dummy,3,3,0,1); |
361 | 361 | ||
362 | 362 | ||
363 | 363 | ||
364 | dummy = new QHBox(topFrame); | 364 | dummy = new QHBox(topFrame); |
365 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 365 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
366 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 366 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
367 | 367 | ||
368 | topLayout->addMultiCellWidget(dummy,4,4,0,1); | 368 | topLayout->addMultiCellWidget(dummy,4,4,0,1); |
369 | 369 | ||
370 | QHBox *prioBox = new QHBox(topFrame); | 370 | QHBox *prioBox = new QHBox(topFrame); |
371 | // intervalBox->setSpacing(spacingHint()); | 371 | // intervalBox->setSpacing(spacingHint()); |
372 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); | 372 | topLayout->addMultiCellWidget(prioBox,5,5,0,1); |
373 | QString messa = i18n("Show topmost todo prios in What's Next:"); | 373 | QString messa = i18n("Show topmost todo prios in What's Next:"); |
374 | 374 | ||
375 | if ( QApplication::desktop()->width() < 300 ) | 375 | if ( QApplication::desktop()->width() < 300 ) |
376 | messa = i18n("Show topmost todo prios in What's N.:"); | 376 | messa = i18n("Show topmost todo prios in What's N.:"); |
377 | QLabel *prioLabel = new QLabel(messa, prioBox); | 377 | QLabel *prioLabel = new QLabel(messa, prioBox); |
378 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 378 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
379 | if ( QApplication::desktop()->width() < 300 ) | 379 | if ( QApplication::desktop()->width() < 300 ) |
380 | mPrioSpin->setFixedWidth( 40 ); | 380 | mPrioSpin->setFixedWidth( 40 ); |
381 | 381 | ||
382 | // KPrefsWidBool *bcc = | 382 | // KPrefsDialogWidBool *bcc = |
383 | // addWidBool(i18n("Send copy to owner when mailing events"), | 383 | // addWidBool(i18n("Send copy to owner when mailing events"), |
384 | // &(KOPrefs::instance()->mBcc),topFrame); | 384 | // &(KOPrefs::instance()->mBcc),topFrame); |
385 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 385 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
386 | 386 | ||
387 | 387 | ||
388 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 388 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
389 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 389 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
390 | 390 | ||
391 | // addWidBool(i18n("Enable automatic saving of calendar"), | 391 | // addWidBool(i18n("Enable automatic saving of calendar"), |
392 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 392 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
393 | 393 | ||
394 | QHBox *intervalBox = new QHBox(topFrame); | 394 | QHBox *intervalBox = new QHBox(topFrame); |
395 | // intervalBox->setSpacing(spacingHint()); | 395 | // intervalBox->setSpacing(spacingHint()); |
396 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); | 396 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); |
397 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 397 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
398 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 398 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
399 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 399 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
400 | /* | 400 | /* |
401 | QHBox * agendasize = new QHBox ( topFrame ); | 401 | QHBox * agendasize = new QHBox ( topFrame ); |
402 | 402 | ||
403 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 403 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
404 | 404 | ||
405 | 405 | ||
406 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 406 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
407 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 407 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
408 | */ | 408 | */ |
409 | KPrefsWidBool *verticalScreen = | 409 | KPrefsDialogWidBool *verticalScreen = |
410 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 410 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
411 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 411 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
412 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 412 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
413 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); | 413 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); |
414 | 414 | ||
415 | KPrefsWidBool *ask = | 415 | KPrefsDialogWidBool *ask = |
416 | addWidBool(i18n("Ask for quit when closing KO/Pi"), | 416 | addWidBool(i18n("Ask for quit when closing KO/Pi"), |
417 | &(KOPrefs::instance()->mAskForQuit),topFrame); | 417 | &(KOPrefs::instance()->mAskForQuit),topFrame); |
418 | topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); | 418 | topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); |
419 | 419 | ||
420 | 420 | ||
421 | /* | 421 | /* |
422 | KPrefsWidBool *confirmCheck = | 422 | KPrefsDialogWidBool *confirmCheck = |
423 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), | 423 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), |
424 | topFrame); | 424 | topFrame); |
425 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); | 425 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); |
426 | 426 | ||
427 | 427 | ||
428 | mEnableGroupScheduling = | 428 | mEnableGroupScheduling = |
429 | addWidBool(i18n("Enable group scheduling"), | 429 | addWidBool(i18n("Enable group scheduling"), |
430 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); | 430 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); |
431 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); | 431 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); |
432 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), | 432 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), |
433 | SLOT(warningGroupScheduling())); | 433 | SLOT(warningGroupScheduling())); |
434 | 434 | ||
435 | mEnableProjectView = | 435 | mEnableProjectView = |
436 | addWidBool(i18n("Enable project view"), | 436 | addWidBool(i18n("Enable project view"), |
437 | &(KOPrefs::instance()->mEnableProjectView),topFrame); | 437 | &(KOPrefs::instance()->mEnableProjectView),topFrame); |
438 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); | 438 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); |
439 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), | 439 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), |
440 | SLOT(warningProjectView())); | 440 | SLOT(warningProjectView())); |
441 | 441 | ||
442 | // Can't be disabled anymore | 442 | // Can't be disabled anymore |
443 | mEnableGroupScheduling->checkBox()->hide(); | 443 | mEnableGroupScheduling->checkBox()->hide(); |
444 | 444 | ||
445 | // Disable setting, because this feature now becomes stable | 445 | // Disable setting, because this feature now becomes stable |
446 | mEnableProjectView->checkBox()->hide(); | 446 | mEnableProjectView->checkBox()->hide(); |
447 | 447 | ||
448 | KPrefsWidRadios *defaultFormatGroup = | 448 | KPrefsDialogWidRadios *defaultFormatGroup = |
449 | addWidRadios(i18n("Default Calendar Format"), | 449 | addWidRadios(i18n("Default Calendar Format"), |
450 | &(KOPrefs::instance()->mDefaultFormat),topFrame); | 450 | &(KOPrefs::instance()->mDefaultFormat),topFrame); |
451 | defaultFormatGroup->addRadio(i18n("vCalendar")); | 451 | defaultFormatGroup->addRadio(i18n("vCalendar")); |
452 | defaultFormatGroup->addRadio(i18n("iCalendar")); | 452 | defaultFormatGroup->addRadio(i18n("iCalendar")); |
453 | 453 | ||
454 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); | 454 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); |
455 | 455 | ||
456 | // Default format unconditionally is iCalendar | 456 | // Default format unconditionally is iCalendar |
457 | defaultFormatGroup->groupBox()->hide(); | 457 | defaultFormatGroup->groupBox()->hide(); |
458 | 458 | ||
459 | KPrefsWidRadios *mailClientGroup = | 459 | KPrefsDialogWidRadios *mailClientGroup = |
460 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), | 460 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), |
461 | topFrame); | 461 | topFrame); |
462 | mailClientGroup->addRadio(i18n("KMail")); | 462 | mailClientGroup->addRadio(i18n("KMail")); |
463 | mailClientGroup->addRadio(i18n("Sendmail")); | 463 | mailClientGroup->addRadio(i18n("Sendmail")); |
464 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); | 464 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); |
465 | 465 | ||
466 | KPrefsWidBool *htmlsave = | 466 | KPrefsDialogWidBool *htmlsave = |
467 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), | 467 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), |
468 | topFrame); | 468 | topFrame); |
469 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); | 469 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); |
470 | 470 | ||
471 | KPrefsWidRadios *destinationGroup = | 471 | KPrefsDialogWidRadios *destinationGroup = |
472 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), | 472 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), |
473 | topFrame); | 473 | topFrame); |
474 | destinationGroup->addRadio(i18n("be added to the standard resource")); | 474 | destinationGroup->addRadio(i18n("be added to the standard resource")); |
475 | destinationGroup->addRadio(i18n("be asked which resource to use")); | 475 | destinationGroup->addRadio(i18n("be asked which resource to use")); |
476 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); | 476 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); |
477 | 477 | ||
478 | topLayout->setRowStretch(14,1); | 478 | topLayout->setRowStretch(14,1); |
479 | */ | 479 | */ |
480 | } | 480 | } |
481 | 481 | ||
482 | 482 | ||
483 | void KOPrefsDialog::setupTimeTab() | 483 | void KOPrefsDialog::setupTimeTab() |
484 | { | 484 | { |
485 | QFrame *topFrame = addPage(i18n("Time"),0,0); | 485 | QFrame *topFrame = addPage(i18n("Time"),0,0); |
486 | // DesktopIcon("clock",KIcon::SizeMedium)); | 486 | // DesktopIcon("clock",KIcon::SizeMedium)); |
487 | 487 | ||
488 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 488 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
489 | topLayout->setSpacing(spacingHint()); | 489 | topLayout->setSpacing(spacingHint()); |
490 | topLayout->setMargin(marginHint()); | 490 | topLayout->setMargin(marginHint()); |
491 | 491 | ||
492 | QHBox *dummy = new QHBox(topFrame); | 492 | QHBox *dummy = new QHBox(topFrame); |
493 | KPrefsWidTime *dayBegins = | 493 | KPrefsDialogWidTime *dayBegins = |
494 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 494 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
495 | dummy); | 495 | dummy); |
496 | //topLayout->addWidget(dayBegins->label(),2,0); | 496 | //topLayout->addWidget(dayBegins->label(),2,0); |
497 | 497 | ||
498 | //topLayout->addWidget(dayBegins->spinBox(),2,1); | 498 | //topLayout->addWidget(dayBegins->spinBox(),2,1); |
499 | topLayout->addMultiCellWidget(dummy,0,0,0,1); | 499 | topLayout->addMultiCellWidget(dummy,0,0,0,1); |
500 | 500 | ||
501 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), | 501 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), |
502 | topFrame),1,0); | 502 | topFrame),1,0); |
503 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); | 503 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); |
504 | mStartTimeSpin->setSuffix(":00"); | 504 | mStartTimeSpin->setSuffix(":00"); |
505 | topLayout->addWidget(mStartTimeSpin,1,1); | 505 | topLayout->addWidget(mStartTimeSpin,1,1); |
506 | 506 | ||
507 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), | 507 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), |
508 | topFrame),2,0); | 508 | topFrame),2,0); |
509 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); | 509 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); |
510 | mDefaultDurationSpin->setSuffix(":00"); | 510 | mDefaultDurationSpin->setSuffix(":00"); |
511 | topLayout->addWidget(mDefaultDurationSpin,2,1); | 511 | topLayout->addWidget(mDefaultDurationSpin,2,1); |
512 | 512 | ||
513 | QStringList alarmList; | 513 | QStringList alarmList; |
514 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") | 514 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") |
515 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; | 515 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; |
516 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), | 516 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), |
517 | 3,0); | 517 | 3,0); |
518 | mAlarmTimeCombo = new QComboBox(topFrame); | 518 | mAlarmTimeCombo = new QComboBox(topFrame); |
519 | mAlarmTimeCombo->insertStringList(alarmList); | 519 | mAlarmTimeCombo->insertStringList(alarmList); |
520 | topLayout->addWidget(mAlarmTimeCombo,3,1); | 520 | topLayout->addWidget(mAlarmTimeCombo,3,1); |
521 | 521 | ||
522 | 522 | ||
523 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 523 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, |
524 | i18n("Working Hours"), | 524 | i18n("Working Hours"), |
525 | topFrame); | 525 | topFrame); |
526 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); | 526 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); |
527 | workingHoursGroup->layout()->setSpacing( 0 ); | 527 | workingHoursGroup->layout()->setSpacing( 0 ); |
528 | workingHoursGroup->layout()->setMargin( 4 ); | 528 | workingHoursGroup->layout()->setMargin( 4 ); |
529 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 529 | QHBox *workStartBox = new QHBox(workingHoursGroup); |
530 | // workStartBox->setMargin( 0 ); | 530 | // workStartBox->setMargin( 0 ); |
531 | addWidTime(i18n("Daily starting hour:"), | 531 | addWidTime(i18n("Daily starting hour:"), |
532 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 532 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
533 | 533 | ||
534 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 534 | QHBox *workEndBox = new QHBox(workingHoursGroup); |
535 | //workEndBox->setMargin( 0 ); | 535 | //workEndBox->setMargin( 0 ); |
536 | addWidTime(i18n("Daily ending hour:"), | 536 | addWidTime(i18n("Daily ending hour:"), |
537 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 537 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
538 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 538 | QVBox *excludeBox = new QVBox(workingHoursGroup); |
539 | //excludeBox->setMargin( 0 ); | 539 | //excludeBox->setMargin( 0 ); |
540 | addWidBool(i18n("Exclude holidays"), | 540 | addWidBool(i18n("Exclude holidays"), |
541 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); | 541 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); |
542 | 542 | ||
543 | addWidBool(i18n("Exclude Saturdays"), | 543 | addWidBool(i18n("Exclude Saturdays"), |
544 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); | 544 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); |
545 | 545 | ||
546 | // KPrefsWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), | 546 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), |
547 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), | 547 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), |
548 | // topFrame); | 548 | // topFrame); |
549 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); | 549 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); |
550 | 550 | ||
551 | // topLayout->setRowStretch(6,1); | 551 | // topLayout->setRowStretch(6,1); |
552 | } | 552 | } |
553 | 553 | ||
554 | 554 | ||
555 | void KOPrefsDialog::setupViewsTab() | 555 | void KOPrefsDialog::setupViewsTab() |
556 | { | 556 | { |
557 | 557 | ||
558 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 558 | QFrame *topFrame = addPage(i18n("Views"),0,0); |
559 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 559 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
560 | 560 | ||
561 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 561 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); |
562 | topLayout->setSpacing(spacingHint()); | 562 | topLayout->setSpacing(spacingHint()); |
563 | topLayout->setMargin(marginHint()); | 563 | topLayout->setMargin(marginHint()); |
564 | 564 | ||
565 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; | 565 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; |
566 | // topLayout->addLayout(dayBeginsLayout,0,0); | 566 | // topLayout->addLayout(dayBeginsLayout,0,0); |
567 | 567 | ||
568 | // KPrefsWidTime *dayBegins = | 568 | // KPrefsDialogWidTime *dayBegins = |
569 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 569 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
570 | // topFrame); | 570 | // topFrame); |
571 | // dayBeginsLayout->addWidget(dayBegins->label()); | 571 | // dayBeginsLayout->addWidget(dayBegins->label()); |
572 | // dayBeginsLayout->addStretch(1); | 572 | // dayBeginsLayout->addStretch(1); |
573 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); | 573 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); |
574 | 574 | ||
575 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; | 575 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; |
576 | // topLayout->addLayout(nextDaysLayout,1,0); | 576 | // topLayout->addLayout(nextDaysLayout,1,0); |
577 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); | 577 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); |
578 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); | 578 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); |
579 | // nextDaysLayout->addStretch(1); | 579 | // nextDaysLayout->addStretch(1); |
580 | // nextDaysLayout->addWidget(mNextXDaysSpin); | 580 | // nextDaysLayout->addWidget(mNextXDaysSpin); |
581 | 581 | ||
582 | 582 | ||
583 | int ii = 0; | 583 | int ii = 0; |
584 | KPrefsWidBool *dummy = | 584 | KPrefsDialogWidBool *dummy = |
585 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), | 585 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), |
586 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); | 586 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); |
587 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 587 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
588 | 588 | ||
589 | dummy = | 589 | dummy = |
590 | addWidBool(i18n("Highlight current day in agenda"), | 590 | addWidBool(i18n("Highlight current day in agenda"), |
591 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); | 591 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); |
592 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 592 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
593 | 593 | ||
594 | dummy = | 594 | dummy = |
595 | addWidBool(i18n("Use light color for highlight current day"), | 595 | addWidBool(i18n("Use light color for highlight current day"), |
596 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); | 596 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); |
597 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 597 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
598 | 598 | ||
599 | KPrefsWidBool *dailyRecur = | 599 | KPrefsDialogWidBool *dailyRecur = |
600 | addWidBool(i18n("Show events that recur daily in date nav."), | 600 | addWidBool(i18n("Show events that recur daily in date nav."), |
601 | &(KOPrefs::instance()->mDailyRecur),topFrame); | 601 | &(KOPrefs::instance()->mDailyRecur),topFrame); |
602 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 602 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
603 | 603 | ||
604 | KPrefsWidBool *weeklyRecur = | 604 | KPrefsDialogWidBool *weeklyRecur = |
605 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 605 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
606 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 606 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
607 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 607 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |
608 | if ( QApplication::desktop()->width() > 640 ) { | 608 | if ( QApplication::desktop()->width() > 640 ) { |
609 | 609 | ||
610 | KPrefsWidBool *enableToolTips = | 610 | KPrefsDialogWidBool *enableToolTips = |
611 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | 611 | addWidBool(i18n("Enable tooltips displaying summary of ev."), |
612 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | 612 | &(KOPrefs::instance()->mEnableToolTips),topFrame); |
613 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | 613 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); |
614 | 614 | ||
615 | } | 615 | } |
616 | KPrefsWidBool *passwdk = | 616 | KPrefsDialogWidBool *passwdk = |
617 | addWidBool(i18n("Show parent To-Do's in What's Next view"), | 617 | addWidBool(i18n("Show parent To-Do's in What's Next view"), |
618 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | 618 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); |
619 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 619 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
620 | 620 | ||
621 | passwdk = | 621 | passwdk = |
622 | addWidBool(i18n("Show location in What's Next view"), | 622 | addWidBool(i18n("Show location in What's Next view"), |
623 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | 623 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); |
624 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 624 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
625 | 625 | ||
626 | passwdk = | 626 | passwdk = |
627 | addWidBool(i18n("Show Sync Events in WN/Agenda view"), | 627 | addWidBool(i18n("Show Sync Events in WN/Agenda view"), |
628 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 628 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
629 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 629 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
630 | 630 | ||
631 | 631 | ||
632 | KPrefsWidBool *marcusBainsEnabled = | 632 | KPrefsDialogWidBool *marcusBainsEnabled = |
633 | addWidBool(i18n("Show Marcus Bains line"), | 633 | addWidBool(i18n("Show Marcus Bains line"), |
634 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); | 634 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); |
635 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); | 635 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); |
636 | 636 | ||
637 | 637 | ||
638 | // topLayout->addWidget(hourSizeGroup,ii++,0); | 638 | // topLayout->addWidget(hourSizeGroup,ii++,0); |
639 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); | 639 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); |
640 | //topLayout->setRowStretch(11,1); | 640 | //topLayout->setRowStretch(11,1); |
641 | 641 | ||
642 | 642 | ||
643 | 643 | ||
644 | 644 | ||
645 | 645 | ||
646 | 646 | ||
647 | topFrame = addPage(i18n("ViewChange"),0,0); | 647 | topFrame = addPage(i18n("ViewChange"),0,0); |
648 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 648 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
649 | 649 | ||
650 | topLayout = new QGridLayout(topFrame,6,1); | 650 | topLayout = new QGridLayout(topFrame,6,1); |
651 | topLayout->setSpacing(spacingHint()); | 651 | topLayout->setSpacing(spacingHint()); |
652 | topLayout->setMargin(marginHint()); | 652 | topLayout->setMargin(marginHint()); |
653 | ii = 0; | 653 | ii = 0; |
654 | 654 | ||
655 | 655 | ||
656 | dummy = | 656 | dummy = |
657 | addWidBool(i18n("Hold fullscreen on view change"), | 657 | addWidBool(i18n("Hold fullscreen on view change"), |
658 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); | 658 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); |
659 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 659 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
660 | 660 | ||
661 | dummy = | 661 | dummy = |
662 | addWidBool(i18n("Hold non-fullscreen on view change"), | 662 | addWidBool(i18n("Hold non-fullscreen on view change"), |
663 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); | 663 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); |
664 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 664 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
665 | 665 | ||
666 | 666 | ||
667 | KPrefsWidBool *fullViewTodo = | 667 | KPrefsDialogWidBool *fullViewTodo = |
668 | addWidBool(i18n("Event list view uses full window"), | 668 | addWidBool(i18n("Event list view uses full window"), |
669 | &(KOPrefs::instance()->mFullViewTodo),topFrame); | 669 | &(KOPrefs::instance()->mFullViewTodo),topFrame); |
670 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); | 670 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); |
671 | 671 | ||
672 | KPrefsWidBool *fullViewMonth = | 672 | KPrefsDialogWidBool *fullViewMonth = |
673 | addWidBool(i18n("Next days view uses full window"), | 673 | addWidBool(i18n("Next days view uses full window"), |
674 | &(KOPrefs::instance()->mFullViewMonth),topFrame); | 674 | &(KOPrefs::instance()->mFullViewMonth),topFrame); |
675 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); | 675 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); |
676 | 676 | ||
677 | dummy = | 677 | dummy = |
678 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), | 678 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), |
679 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); | 679 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); |
680 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 680 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
681 | 681 | ||
682 | dummy = | 682 | dummy = |
683 | addWidBool(i18n("Set agenda to current time on change"), | 683 | addWidBool(i18n("Set agenda to current time on change"), |
684 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); | 684 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); |
685 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 685 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
686 | 686 | ||
687 | dummy = | 687 | dummy = |
688 | addWidBool(i18n("Listview uses monthly timespan"), | 688 | addWidBool(i18n("Listview uses monthly timespan"), |
689 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); | 689 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); |
690 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 690 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
691 | dummy = | 691 | dummy = |
692 | addWidBool(i18n("Highlight selection in Time Edit"), | 692 | addWidBool(i18n("Highlight selection in Time Edit"), |
693 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); | 693 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); |
694 | topLayout->addWidget( dummy->checkBox(), ii++,0); | 694 | topLayout->addWidget( dummy->checkBox(), ii++,0); |
695 | 695 | ||
696 | 696 | ||
697 | 697 | ||
698 | 698 | ||
699 | 699 | ||
700 | topFrame = addPage(i18n("Month View"),0,0); | 700 | topFrame = addPage(i18n("Month View"),0,0); |
701 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 701 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
702 | 702 | ||
703 | topLayout = new QGridLayout(topFrame,5,1); | 703 | topLayout = new QGridLayout(topFrame,5,1); |
704 | topLayout->setSpacing(spacingHint()); | 704 | topLayout->setSpacing(spacingHint()); |
705 | topLayout->setMargin(marginHint()); | 705 | topLayout->setMargin(marginHint()); |
706 | ii = 0; | 706 | ii = 0; |
707 | QLabel *lab; | 707 | QLabel *lab; |
708 | QHBox *habo = new QHBox( topFrame ); | 708 | QHBox *habo = new QHBox( topFrame ); |
709 | if ( QApplication::desktop()->width() < 320 ) { | 709 | if ( QApplication::desktop()->width() < 320 ) { |
710 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 710 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
711 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 711 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
712 | ii++; | 712 | ii++; |
713 | 713 | ||
714 | } else { | 714 | } else { |
715 | new QLabel ( i18n("Show events that recur "), habo ); | 715 | new QLabel ( i18n("Show events that recur "), habo ); |
716 | 716 | ||
717 | } | 717 | } |
718 | dailyRecur = | 718 | dailyRecur = |
719 | addWidBool(i18n("daily"), | 719 | addWidBool(i18n("daily"), |
720 | &(KOPrefs::instance()->mMonthDailyRecur),habo); | 720 | &(KOPrefs::instance()->mMonthDailyRecur),habo); |
721 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 721 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
722 | 722 | ||
723 | weeklyRecur = | 723 | weeklyRecur = |
724 | addWidBool(i18n("weekly"), | 724 | addWidBool(i18n("weekly"), |
725 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); | 725 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); |
726 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 726 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
727 | ii++; | 727 | ii++; |
728 | 728 | ||
729 | 729 | ||
730 | habo = new QHBox( topFrame ); | 730 | habo = new QHBox( topFrame ); |
731 | if ( QApplication::desktop()->width() < 320 ) { | 731 | if ( QApplication::desktop()->width() < 320 ) { |
732 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 732 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
733 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 733 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
734 | ii++; | 734 | ii++; |
735 | 735 | ||
736 | } else { | 736 | } else { |
737 | new QLabel ( i18n("Show in every cell "), habo ); | 737 | new QLabel ( i18n("Show in every cell "), habo ); |
738 | } | 738 | } |
739 | weeklyRecur = | 739 | weeklyRecur = |
740 | addWidBool(i18n("short month"), | 740 | addWidBool(i18n("short month"), |
741 | &(KOPrefs::instance()->mMonthShowShort),habo); | 741 | &(KOPrefs::instance()->mMonthShowShort),habo); |
742 | weeklyRecur = | 742 | weeklyRecur = |
743 | addWidBool(i18n("icons"), | 743 | addWidBool(i18n("icons"), |
744 | &(KOPrefs::instance()->mMonthShowIcons),habo); | 744 | &(KOPrefs::instance()->mMonthShowIcons),habo); |
745 | 745 | ||
746 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 746 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
747 | ii++; | 747 | ii++; |
748 | #ifdef DESKTOP_VERSION | 748 | #ifdef DESKTOP_VERSION |
749 | KPrefsWidBool *enableMonthScroll = | 749 | KPrefsDialogWidBool *enableMonthScroll = |
750 | addWidBool(i18n("Enable scrollbars in month view cells"), | 750 | addWidBool(i18n("Enable scrollbars in month view cells"), |
751 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); | 751 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); |
752 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); | 752 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); |
753 | #endif | 753 | #endif |
754 | 754 | ||
755 | dummy = | 755 | dummy = |
756 | addWidBool(i18n("Show Sat/Sun together"), | 756 | addWidBool(i18n("Show Sat/Sun together"), |
757 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 757 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
758 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 758 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
759 | 759 | ||
760 | KPrefsWidBool *coloredCategoriesInMonthView = | 760 | KPrefsDialogWidBool *coloredCategoriesInMonthView = |
761 | addWidBool(i18n("Month view uses category colors"), | 761 | addWidBool(i18n("Month view uses category colors"), |
762 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); | 762 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); |
763 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 763 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
764 | 764 | ||
765 | dummy = | 765 | dummy = |
766 | addWidBool(i18n("Categorie colors are applied to text"), | 766 | addWidBool(i18n("Categorie colors are applied to text"), |
767 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 767 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
768 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 768 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
769 | coloredCategoriesInMonthView = | 769 | coloredCategoriesInMonthView = |
770 | addWidBool(i18n("Month view uses day colors"), | 770 | addWidBool(i18n("Month view uses day colors"), |
771 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); | 771 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); |
772 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 772 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
773 | 773 | ||
774 | KPrefsWidColor *holidayColor = | 774 | KPrefsDialogWidColor *holidayColor = |
775 | addWidColor(i18n("Day color odd months"), | 775 | addWidColor(i18n("Day color odd months"), |
776 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); | 776 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); |
777 | topLayout->addWidget(holidayColor->label(),ii,0); | 777 | topLayout->addWidget(holidayColor->label(),ii,0); |
778 | topLayout->addWidget(holidayColor->button(),ii++,1); | 778 | topLayout->addWidget(holidayColor->button(),ii++,1); |
779 | 779 | ||
780 | holidayColor = | 780 | holidayColor = |
781 | addWidColor(i18n("Day color even months"), | 781 | addWidColor(i18n("Day color even months"), |
782 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); | 782 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); |
783 | topLayout->addWidget(holidayColor->label(),ii,0); | 783 | topLayout->addWidget(holidayColor->label(),ii,0); |
784 | topLayout->addWidget(holidayColor->button(),ii++,1); | 784 | topLayout->addWidget(holidayColor->button(),ii++,1); |
785 | 785 | ||
786 | 786 | ||
787 | holidayColor = | 787 | holidayColor = |
788 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 788 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
789 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 789 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
790 | topLayout->addWidget(holidayColor->label(),ii,0); | 790 | topLayout->addWidget(holidayColor->label(),ii,0); |
791 | topLayout->addWidget(holidayColor->button(),ii++,1); | 791 | topLayout->addWidget(holidayColor->button(),ii++,1); |
792 | 792 | ||
793 | // *********************** Todo View | 793 | // *********************** Todo View |
794 | 794 | ||
795 | topFrame = addPage(i18n("Todo View"),0,0); | 795 | topFrame = addPage(i18n("Todo View"),0,0); |
796 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 796 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
797 | 797 | ||
798 | topLayout = new QGridLayout(topFrame,4,1); | 798 | topLayout = new QGridLayout(topFrame,4,1); |
799 | topLayout->setSpacing(spacingHint()); | 799 | topLayout->setSpacing(spacingHint()); |
800 | topLayout->setMargin(marginHint()); | 800 | topLayout->setMargin(marginHint()); |
801 | ii = 0; | 801 | ii = 0; |
802 | 802 | ||
803 | KPrefsWidBool *showCompletedTodo = | 803 | KPrefsDialogWidBool *showCompletedTodo = |
804 | addWidBool(i18n("To-do view shows completed Todos"), | 804 | addWidBool(i18n("To-do view shows completed Todos"), |
805 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); | 805 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); |
806 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); | 806 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); |
807 | dummy = | 807 | dummy = |
808 | addWidBool(i18n("To-do view shows complete as 'xx %'"), | 808 | addWidBool(i18n("To-do view shows complete as 'xx %'"), |
809 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); | 809 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); |
810 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 810 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
811 | 811 | ||
812 | dummy = | 812 | dummy = |
813 | addWidBool(i18n("Small To-do view uses smaller font"), | 813 | addWidBool(i18n("Small To-do view uses smaller font"), |
814 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); | 814 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); |
815 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 815 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
816 | 816 | ||
817 | 817 | ||
818 | 818 | ||
819 | dummy = | 819 | dummy = |
820 | addWidBool(i18n("Todo view uses category colors"), | 820 | addWidBool(i18n("Todo view uses category colors"), |
821 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); | 821 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); |
822 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 822 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
823 | 823 | ||
824 | 824 | ||
825 | QWidget* wid = new QWidget( topFrame ); | 825 | QWidget* wid = new QWidget( topFrame ); |
826 | // Todo due today color | 826 | // Todo due today color |
827 | KPrefsWidColor *todoDueTodayColor = | 827 | KPrefsDialogWidColor *todoDueTodayColor = |
828 | addWidColor(i18n("Todo due today color:"), | 828 | addWidColor(i18n("Todo due today color:"), |
829 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 829 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
830 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 830 | QHBoxLayout *widLayout = new QHBoxLayout(wid); |
831 | widLayout->addWidget( todoDueTodayColor->label() ); | 831 | widLayout->addWidget( todoDueTodayColor->label() ); |
832 | widLayout->addWidget( todoDueTodayColor->button() ); | 832 | widLayout->addWidget( todoDueTodayColor->button() ); |
833 | topLayout->addWidget(wid,ii++,0); | 833 | topLayout->addWidget(wid,ii++,0); |
834 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 834 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
835 | 835 | ||
836 | // Todo overdue color | 836 | // Todo overdue color |
837 | wid = new QWidget( topFrame ); | 837 | wid = new QWidget( topFrame ); |
838 | widLayout = new QHBoxLayout(wid); | 838 | widLayout = new QHBoxLayout(wid); |
839 | KPrefsWidColor *todoOverdueColor = | 839 | KPrefsDialogWidColor *todoOverdueColor = |
840 | addWidColor(i18n("Todo overdue color:"), | 840 | addWidColor(i18n("Todo overdue color:"), |
841 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 841 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
842 | widLayout->addWidget(todoOverdueColor->label()); | 842 | widLayout->addWidget(todoOverdueColor->label()); |
843 | widLayout->addWidget(todoOverdueColor->button()); | 843 | widLayout->addWidget(todoOverdueColor->button()); |
844 | topLayout->addWidget(wid,ii++,0); | 844 | topLayout->addWidget(wid,ii++,0); |
845 | 845 | ||
846 | dummy = | 846 | dummy = |
847 | addWidBool(i18n("Colors are applied to text"), | 847 | addWidBool(i18n("Colors are applied to text"), |
848 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); | 848 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); |
849 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 849 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
850 | 850 | ||
851 | dummy = | 851 | dummy = |
852 | addWidBool(i18n("Allday Agenda view shows todos"), | 852 | addWidBool(i18n("Allday Agenda view shows todos"), |
853 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | 853 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); |
854 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 854 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
855 | 855 | ||
856 | 856 | ||
857 | 857 | ||
858 | 858 | ||
859 | topFrame = addPage(i18n("Alarm"),0,0); | 859 | topFrame = addPage(i18n("Alarm"),0,0); |
860 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 860 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
861 | 861 | ||
862 | topLayout = new QGridLayout(topFrame,2,1); | 862 | topLayout = new QGridLayout(topFrame,2,1); |
863 | topLayout->setSpacing(spacingHint()); | 863 | topLayout->setSpacing(spacingHint()); |
864 | topLayout->setMargin(marginHint()); | 864 | topLayout->setMargin(marginHint()); |
865 | int iii = 0; | 865 | int iii = 0; |
866 | 866 | ||
867 | dummy = | 867 | dummy = |
868 | addWidBool(i18n("Use internal alarm notification"), | 868 | addWidBool(i18n("Use internal alarm notification"), |
869 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); | 869 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); |
870 | topLayout->addWidget(dummy->checkBox(),iii++,0); | 870 | topLayout->addWidget(dummy->checkBox(),iii++,0); |
871 | lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); | 871 | lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); |
872 | 872 | ||
873 | topLayout->addWidget(lab ,iii++,0); | 873 | topLayout->addWidget(lab ,iii++,0); |
874 | #ifndef DESKTOP_VERSION | 874 | #ifndef DESKTOP_VERSION |
875 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 875 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
876 | #else | 876 | #else |
877 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 877 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
878 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 878 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
879 | #endif | 879 | #endif |
880 | 880 | ||
881 | QHBox* dummyBox = new QHBox(topFrame); | 881 | QHBox* dummyBox = new QHBox(topFrame); |
882 | new QLabel(i18n("Play beeps count:"),dummyBox); | 882 | new QLabel(i18n("Play beeps count:"),dummyBox); |
883 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 883 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
884 | topLayout->addWidget(dummyBox,iii++,0); | 884 | topLayout->addWidget(dummyBox,iii++,0); |
885 | 885 | ||
886 | dummyBox = new QHBox(topFrame); | 886 | dummyBox = new QHBox(topFrame); |
887 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); | 887 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); |
888 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); | 888 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); |
889 | topLayout->addWidget(dummyBox,iii++,0); | 889 | topLayout->addWidget(dummyBox,iii++,0); |
890 | 890 | ||
891 | dummyBox = new QHBox(topFrame); | 891 | dummyBox = new QHBox(topFrame); |
892 | new QLabel(i18n("Default suspend time in min:"),dummyBox); | 892 | new QLabel(i18n("Default suspend time in min:"),dummyBox); |
893 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); | 893 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); |
894 | topLayout->addWidget(dummyBox,iii++,0); | 894 | topLayout->addWidget(dummyBox,iii++,0); |
895 | 895 | ||
896 | dummyBox = new QHBox(topFrame); | 896 | dummyBox = new QHBox(topFrame); |
897 | new QLabel(i18n("Auto suspend count:"),dummyBox); | 897 | new QLabel(i18n("Auto suspend count:"),dummyBox); |
898 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); | 898 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); |
899 | topLayout->addWidget(dummyBox,iii++,0); | 899 | topLayout->addWidget(dummyBox,iii++,0); |
900 | 900 | ||
901 | 901 | ||
902 | 902 | ||
903 | 903 | ||
904 | 904 | ||
905 | 905 | ||
906 | 906 | ||
907 | QHBox* hbo = new QHBox ( topFrame ); | 907 | QHBox* hbo = new QHBox ( topFrame ); |
908 | mDefaultAlarmFile = new QLineEdit(hbo); | 908 | mDefaultAlarmFile = new QLineEdit(hbo); |
909 | QPushButton * loadTemplate = new QPushButton(hbo); | 909 | QPushButton * loadTemplate = new QPushButton(hbo); |
910 | QPixmap icon; | 910 | QPixmap icon; |
911 | if ( QApplication::desktop()->width() < 321 ) | 911 | if ( QApplication::desktop()->width() < 321 ) |
912 | icon = SmallIcon("fileimport16"); | 912 | icon = SmallIcon("fileimport16"); |
913 | else | 913 | else |
914 | icon = SmallIcon("fileimport"); | 914 | icon = SmallIcon("fileimport"); |
915 | loadTemplate->setIconSet (icon ) ; | 915 | loadTemplate->setIconSet (icon ) ; |
916 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); | 916 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); |
917 | int size = loadTemplate->sizeHint().height(); | 917 | int size = loadTemplate->sizeHint().height(); |
918 | loadTemplate->setFixedSize( size, size ); | 918 | loadTemplate->setFixedSize( size, size ); |
919 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); | 919 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); |
920 | // topLayout->addWidget(lab ,iii++,0); | 920 | // topLayout->addWidget(lab ,iii++,0); |
921 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); | 921 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); |
922 | topLayout->addWidget(lab ,iii++,0); | 922 | topLayout->addWidget(lab ,iii++,0); |
923 | topLayout->addWidget(hbo,iii++,0); | 923 | topLayout->addWidget(hbo,iii++,0); |
924 | // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); | 924 | // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); |
925 | 925 | ||
926 | // topLayout->addWidget(lab ,iii++,0); | 926 | // topLayout->addWidget(lab ,iii++,0); |
927 | // #ifndef DESKTOP_VERSION | 927 | // #ifndef DESKTOP_VERSION |
928 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 928 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
929 | // #else | 929 | // #else |
930 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 930 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
931 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 931 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
932 | // #endif | 932 | // #endif |
933 | 933 | ||
934 | 934 | ||
935 | } | 935 | } |
936 | 936 | ||
937 | void KOPrefsDialog::selectSoundFile() | 937 | void KOPrefsDialog::selectSoundFile() |
938 | { | 938 | { |
939 | QString fileName = mDefaultAlarmFile->text(); | 939 | QString fileName = mDefaultAlarmFile->text(); |
940 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); | 940 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); |
941 | if ( fileName.length() > 0 ) | 941 | if ( fileName.length() > 0 ) |
942 | mDefaultAlarmFile->setText( fileName ); | 942 | mDefaultAlarmFile->setText( fileName ); |
943 | } | 943 | } |
944 | void KOPrefsDialog::setupFontsTab() | 944 | void KOPrefsDialog::setupFontsTab() |
945 | { | 945 | { |
946 | 946 | ||
947 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 947 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
948 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 948 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
949 | 949 | ||
950 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 950 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
951 | topLayout->setSpacing(1); | 951 | topLayout->setSpacing(1); |
952 | topLayout->setMargin(3); | 952 | topLayout->setMargin(3); |
953 | KPrefsWidFont * tVFont; | 953 | KPrefsDialogWidFont * tVFont; |
954 | int i = 0; | 954 | int i = 0; |
955 | KPrefsWidFont *timeLabelsFont = | 955 | KPrefsDialogWidFont *timeLabelsFont = |
956 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), | 956 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), |
957 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); | 957 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); |
958 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 958 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
959 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 959 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
960 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 960 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
961 | ++i; | 961 | ++i; |
962 | 962 | ||
963 | 963 | ||
964 | timeLabelsFont = | 964 | timeLabelsFont = |
965 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), | 965 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), |
966 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); | 966 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); |
967 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 967 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
968 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 968 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
969 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 969 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
970 | ++i; | 970 | ++i; |
971 | 971 | ||
972 | KPrefsWidFont *timeBarFont = | 972 | KPrefsDialogWidFont *timeBarFont = |
973 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), | 973 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), |
974 | &(KOPrefs::instance()->mTimeBarFont),topFrame); | 974 | &(KOPrefs::instance()->mTimeBarFont),topFrame); |
975 | topLayout->addWidget(timeBarFont->label(),i,0); | 975 | topLayout->addWidget(timeBarFont->label(),i,0); |
976 | topLayout->addWidget(timeBarFont->preview(),i,1); | 976 | topLayout->addWidget(timeBarFont->preview(),i,1); |
977 | topLayout->addWidget(timeBarFont->button(),i,2); | 977 | topLayout->addWidget(timeBarFont->button(),i,2); |
978 | ++i; | 978 | ++i; |
979 | 979 | ||
980 | 980 | ||
981 | KPrefsWidFont *marcusBainsFont = | 981 | KPrefsDialogWidFont *marcusBainsFont = |
982 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), | 982 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), |
983 | &(KOPrefs::instance()->mMarcusBainsFont),topFrame); | 983 | &(KOPrefs::instance()->mMarcusBainsFont),topFrame); |
984 | topLayout->addWidget(marcusBainsFont->label(),i,0); | 984 | topLayout->addWidget(marcusBainsFont->label(),i,0); |
985 | topLayout->addWidget(marcusBainsFont->preview(),i,1); | 985 | topLayout->addWidget(marcusBainsFont->preview(),i,1); |
986 | topLayout->addWidget(marcusBainsFont->button(),i,2); | 986 | topLayout->addWidget(marcusBainsFont->button(),i,2); |
987 | ++i; | 987 | ++i; |
988 | 988 | ||
989 | tVFont = | 989 | tVFont = |
990 | addWidFont(i18n("Summary"),i18n("Event Viewer:"), | 990 | addWidFont(i18n("Summary"),i18n("Event Viewer:"), |
991 | &(KOPrefs::instance()->mEventViewFont),topFrame); | 991 | &(KOPrefs::instance()->mEventViewFont),topFrame); |
992 | topLayout->addWidget(tVFont->label(),i,0); | 992 | topLayout->addWidget(tVFont->label(),i,0); |
993 | topLayout->addWidget(tVFont->preview(),i,1); | 993 | topLayout->addWidget(tVFont->preview(),i,1); |
994 | topLayout->addWidget(tVFont->button(),i,2); | 994 | topLayout->addWidget(tVFont->button(),i,2); |
995 | ++i; | 995 | ++i; |
996 | 996 | ||
997 | 997 | ||
998 | 998 | ||
999 | tVFont = | 999 | tVFont = |
1000 | addWidFont(i18n("Details"),i18n("EditorBox:"), | 1000 | addWidFont(i18n("Details"),i18n("EditorBox:"), |
1001 | &(KOPrefs::instance()->mEditBoxFont),topFrame); | 1001 | &(KOPrefs::instance()->mEditBoxFont),topFrame); |
1002 | topLayout->addWidget(tVFont->label(),i,0); | 1002 | topLayout->addWidget(tVFont->label(),i,0); |
1003 | topLayout->addWidget(tVFont->preview(),i,1); | 1003 | topLayout->addWidget(tVFont->preview(),i,1); |
1004 | topLayout->addWidget(tVFont->button(),i,2); | 1004 | topLayout->addWidget(tVFont->button(),i,2); |
1005 | ++i; | 1005 | ++i; |
1006 | 1006 | ||
1007 | 1007 | ||
1008 | 1008 | ||
1009 | topLayout->setColStretch(1,1); | 1009 | topLayout->setColStretch(1,1); |
1010 | topLayout->setRowStretch(4,1); | 1010 | topLayout->setRowStretch(4,1); |
1011 | 1011 | ||
1012 | 1012 | ||
1013 | i = 0; | 1013 | i = 0; |
1014 | topFrame = addPage(i18n("View Fonts"),0, | 1014 | topFrame = addPage(i18n("View Fonts"),0, |
1015 | DesktopIcon("fonts",KIcon::SizeMedium)); | 1015 | DesktopIcon("fonts",KIcon::SizeMedium)); |
1016 | 1016 | ||
1017 | topLayout = new QGridLayout(topFrame,7,3); | 1017 | topLayout = new QGridLayout(topFrame,7,3); |
1018 | topLayout->setSpacing(1); | 1018 | topLayout->setSpacing(1); |
1019 | topLayout->setMargin(3); | 1019 | topLayout->setMargin(3); |
1020 | 1020 | ||
1021 | tVFont = | 1021 | tVFont = |
1022 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), | 1022 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), |
1023 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); | 1023 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); |
1024 | topLayout->addWidget(tVFont->label(),i,0); | 1024 | topLayout->addWidget(tVFont->label(),i,0); |
1025 | topLayout->addWidget(tVFont->preview(),i,1); | 1025 | topLayout->addWidget(tVFont->preview(),i,1); |
1026 | topLayout->addWidget(tVFont->button(),i,2); | 1026 | topLayout->addWidget(tVFont->button(),i,2); |
1027 | ++i; | 1027 | ++i; |
1028 | KPrefsWidFont *agendaViewFont = | 1028 | KPrefsDialogWidFont *agendaViewFont = |
1029 | addWidFont(i18n("Event text"),i18n("Agenda view:"), | 1029 | addWidFont(i18n("Event text"),i18n("Agenda view:"), |
1030 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); | 1030 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); |
1031 | topLayout->addWidget(agendaViewFont->label(),i,0); | 1031 | topLayout->addWidget(agendaViewFont->label(),i,0); |
1032 | topLayout->addWidget(agendaViewFont->preview(),i,1); | 1032 | topLayout->addWidget(agendaViewFont->preview(),i,1); |
1033 | topLayout->addWidget(agendaViewFont->button(),i,2); | 1033 | topLayout->addWidget(agendaViewFont->button(),i,2); |
1034 | ++i; | 1034 | ++i; |
1035 | 1035 | ||
1036 | 1036 | ||
1037 | KPrefsWidFont *monthViewFont = | 1037 | KPrefsDialogWidFont *monthViewFont = |
1038 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), | 1038 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), |
1039 | i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); | 1039 | i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); |
1040 | topLayout->addWidget(monthViewFont->label(),i,0); | 1040 | topLayout->addWidget(monthViewFont->label(),i,0); |
1041 | topLayout->addWidget(monthViewFont->preview(),i,1); | 1041 | topLayout->addWidget(monthViewFont->preview(),i,1); |
1042 | topLayout->addWidget(monthViewFont->button(),i,2); | 1042 | topLayout->addWidget(monthViewFont->button(),i,2); |
1043 | ++i; | 1043 | ++i; |
1044 | 1044 | ||
1045 | 1045 | ||
1046 | KPrefsWidFont *lVFont = | 1046 | KPrefsDialogWidFont *lVFont = |
1047 | addWidFont(i18n("Event"),i18n("List View:"), | 1047 | addWidFont(i18n("Event"),i18n("List View:"), |
1048 | &(KOPrefs::instance()->mListViewFont),topFrame); | 1048 | &(KOPrefs::instance()->mListViewFont),topFrame); |
1049 | topLayout->addWidget(lVFont->label(),i,0); | 1049 | topLayout->addWidget(lVFont->label(),i,0); |
1050 | topLayout->addWidget(lVFont->preview(),i,1); | 1050 | topLayout->addWidget(lVFont->preview(),i,1); |
1051 | topLayout->addWidget(lVFont->button(),i,2); | 1051 | topLayout->addWidget(lVFont->button(),i,2); |
1052 | ++i; | 1052 | ++i; |
1053 | 1053 | ||
1054 | 1054 | ||
1055 | tVFont = | 1055 | tVFont = |
1056 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), | 1056 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), |
1057 | &(KOPrefs::instance()->mTodoViewFont),topFrame); | 1057 | &(KOPrefs::instance()->mTodoViewFont),topFrame); |
1058 | topLayout->addWidget(tVFont->label(),i,0); | 1058 | topLayout->addWidget(tVFont->label(),i,0); |
1059 | topLayout->addWidget(tVFont->preview(),i,1); | 1059 | topLayout->addWidget(tVFont->preview(),i,1); |
1060 | topLayout->addWidget(tVFont->button(),i,2); | 1060 | topLayout->addWidget(tVFont->button(),i,2); |
1061 | ++i; | 1061 | ++i; |
1062 | 1062 | ||
1063 | 1063 | ||
1064 | tVFont = | 1064 | tVFont = |
1065 | addWidFont(i18n("Today"),i18n("JournalView:"), | 1065 | addWidFont(i18n("Today"),i18n("JournalView:"), |
1066 | &(KOPrefs::instance()->mJornalViewFont),topFrame); | 1066 | &(KOPrefs::instance()->mJornalViewFont),topFrame); |
1067 | topLayout->addWidget(tVFont->label(),i,0); | 1067 | topLayout->addWidget(tVFont->label(),i,0); |
1068 | topLayout->addWidget(tVFont->preview(),i,1); | 1068 | topLayout->addWidget(tVFont->preview(),i,1); |
1069 | topLayout->addWidget(tVFont->button(),i,2); | 1069 | topLayout->addWidget(tVFont->button(),i,2); |
1070 | ++i; | 1070 | ++i; |
1071 | 1071 | ||
1072 | 1072 | ||
1073 | 1073 | ||
1074 | 1074 | ||
1075 | topLayout->setColStretch(1,1); | 1075 | topLayout->setColStretch(1,1); |
1076 | topLayout->setRowStretch(4,1); | 1076 | topLayout->setRowStretch(4,1); |
1077 | 1077 | ||
1078 | 1078 | ||
1079 | 1079 | ||
1080 | 1080 | ||
1081 | } | 1081 | } |
1082 | 1082 | ||
1083 | void KOPrefsDialog::setupColorsTab() | 1083 | void KOPrefsDialog::setupColorsTab() |
1084 | { | 1084 | { |
1085 | QFrame *topFrame = addPage(i18n("Colors"),0,0); | 1085 | QFrame *topFrame = addPage(i18n("Colors"),0,0); |
1086 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1086 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1087 | 1087 | ||
1088 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1088 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1089 | // topLayout->setSpacing(spacingHint()); | 1089 | // topLayout->setSpacing(spacingHint()); |
1090 | // topLayout->setMargin(marginHint()); | 1090 | // topLayout->setMargin(marginHint()); |
1091 | 1091 | ||
1092 | topLayout->setSpacing(2); | 1092 | topLayout->setSpacing(2); |
1093 | topLayout->setMargin(3); | 1093 | topLayout->setMargin(3); |
1094 | 1094 | ||
1095 | int ii = 1; | 1095 | int ii = 1; |
1096 | QGroupBox *categoryGroup ; | 1096 | QGroupBox *categoryGroup ; |
1097 | 1097 | ||
1098 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), | 1098 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), |
1099 | topFrame); | 1099 | topFrame); |
1100 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); | 1100 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); |
1101 | 1101 | ||
1102 | mCategoryCombo = new QComboBox(categoryGroup); | 1102 | mCategoryCombo = new QComboBox(categoryGroup); |
1103 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1103 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1104 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); | 1104 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); |
1105 | 1105 | ||
1106 | mCategoryButton = new KColorButton(categoryGroup); | 1106 | mCategoryButton = new KColorButton(categoryGroup); |
1107 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); | 1107 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); |
1108 | updateCategoryColor(); | 1108 | updateCategoryColor(); |
1109 | 1109 | ||
1110 | 1110 | ||
1111 | // Holiday Color | 1111 | // Holiday Color |
1112 | 1112 | ||
1113 | KPrefsWidColor *holidayColor = | 1113 | KPrefsDialogWidColor *holidayColor = |
1114 | addWidColor(i18n("Holiday color:"), | 1114 | addWidColor(i18n("Holiday color:"), |
1115 | &(KOPrefs::instance()->mHolidayColor),topFrame); | 1115 | &(KOPrefs::instance()->mHolidayColor),topFrame); |
1116 | topLayout->addWidget(holidayColor->label(),ii,0); | 1116 | topLayout->addWidget(holidayColor->label(),ii,0); |
1117 | topLayout->addWidget(holidayColor->button(),ii++,1); | 1117 | topLayout->addWidget(holidayColor->button(),ii++,1); |
1118 | 1118 | ||
1119 | // Highlight Color | 1119 | // Highlight Color |
1120 | KPrefsWidColor *highlightColor = | 1120 | KPrefsDialogWidColor *highlightColor = |
1121 | addWidColor(i18n("Highlight color:"), | 1121 | addWidColor(i18n("Highlight color:"), |
1122 | &(KOPrefs::instance()->mHighlightColor),topFrame); | 1122 | &(KOPrefs::instance()->mHighlightColor),topFrame); |
1123 | topLayout->addWidget(highlightColor->label(),ii,0); | 1123 | topLayout->addWidget(highlightColor->label(),ii,0); |
1124 | topLayout->addWidget(highlightColor->button(),ii++,1); | 1124 | topLayout->addWidget(highlightColor->button(),ii++,1); |
1125 | 1125 | ||
1126 | // Event color | 1126 | // Event color |
1127 | KPrefsWidColor *eventColor = | 1127 | KPrefsDialogWidColor *eventColor = |
1128 | addWidColor(i18n("Default event color:"), | 1128 | addWidColor(i18n("Default event color:"), |
1129 | &(KOPrefs::instance()->mEventColor),topFrame); | 1129 | &(KOPrefs::instance()->mEventColor),topFrame); |
1130 | topLayout->addWidget(eventColor->label(),ii,0); | 1130 | topLayout->addWidget(eventColor->label(),ii,0); |
1131 | topLayout->addWidget(eventColor->button(),ii++,1); | 1131 | topLayout->addWidget(eventColor->button(),ii++,1); |
1132 | 1132 | ||
1133 | // agenda view background color | 1133 | // agenda view background color |
1134 | KPrefsWidColor *agendaBgColor = | 1134 | KPrefsDialogWidColor *agendaBgColor = |
1135 | addWidColor(i18n("Agenda view background color:"), | 1135 | addWidColor(i18n("Agenda view background color:"), |
1136 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); | 1136 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); |
1137 | topLayout->addWidget(agendaBgColor->label(),ii,0); | 1137 | topLayout->addWidget(agendaBgColor->label(),ii,0); |
1138 | topLayout->addWidget(agendaBgColor->button(),ii++,1); | 1138 | topLayout->addWidget(agendaBgColor->button(),ii++,1); |
1139 | 1139 | ||
1140 | // working hours color | 1140 | // working hours color |
1141 | KPrefsWidColor *workingHoursColor = | 1141 | KPrefsDialogWidColor *workingHoursColor = |
1142 | addWidColor(i18n("Working hours color:"), | 1142 | addWidColor(i18n("Working hours color:"), |
1143 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); | 1143 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); |
1144 | topLayout->addWidget(workingHoursColor->label(),ii,0); | 1144 | topLayout->addWidget(workingHoursColor->label(),ii,0); |
1145 | topLayout->addWidget(workingHoursColor->button(),ii++,1); | 1145 | topLayout->addWidget(workingHoursColor->button(),ii++,1); |
1146 | 1146 | ||
1147 | KPrefsWidBool *sb = | 1147 | KPrefsDialogWidBool *sb = |
1148 | addWidBool(i18n("Use colors for application:"), | 1148 | addWidBool(i18n("Use colors for application:"), |
1149 | &(KOPrefs::instance()->mUseAppColors),topFrame); | 1149 | &(KOPrefs::instance()->mUseAppColors),topFrame); |
1150 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); | 1150 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); |
1151 | 1151 | ||
1152 | ii++; | 1152 | ii++; |
1153 | KPrefsWidColor * workingHoursColor1 = | 1153 | KPrefsDialogWidColor * workingHoursColor1 = |
1154 | addWidColor(i18n("Buttons, menus, etc.:"), | 1154 | addWidColor(i18n("Buttons, menus, etc.:"), |
1155 | &(KOPrefs::instance()->mAppColor1),topFrame); | 1155 | &(KOPrefs::instance()->mAppColor1),topFrame); |
1156 | topLayout->addWidget(workingHoursColor1->label(),ii,0); | 1156 | topLayout->addWidget(workingHoursColor1->label(),ii,0); |
1157 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); | 1157 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); |
1158 | 1158 | ||
1159 | KPrefsWidColor * workingHoursColor2 = | 1159 | KPrefsDialogWidColor * workingHoursColor2 = |
1160 | addWidColor(i18n("Frames, labels, etc.:"), | 1160 | addWidColor(i18n("Frames, labels, etc.:"), |
1161 | &(KOPrefs::instance()->mAppColor2),topFrame); | 1161 | &(KOPrefs::instance()->mAppColor2),topFrame); |
1162 | topLayout->addWidget(workingHoursColor2->label(),ii,0); | 1162 | topLayout->addWidget(workingHoursColor2->label(),ii,0); |
1163 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); | 1163 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); |
1164 | 1164 | ||
1165 | 1165 | ||
1166 | 1166 | ||
1167 | } | 1167 | } |
1168 | 1168 | ||
1169 | void KOPrefsDialog::setCategoryColor() | 1169 | void KOPrefsDialog::setCategoryColor() |
1170 | { | 1170 | { |
1171 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); | 1171 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | void KOPrefsDialog::updateCategoryColor() | 1174 | void KOPrefsDialog::updateCategoryColor() |
1175 | { | 1175 | { |
1176 | QString cat = mCategoryCombo->currentText(); | 1176 | QString cat = mCategoryCombo->currentText(); |
1177 | QColor *color = mCategoryDict.find(cat); | 1177 | QColor *color = mCategoryDict.find(cat); |
1178 | if (!color) { | 1178 | if (!color) { |
1179 | color = KOPrefs::instance()->categoryColor(cat); | 1179 | color = KOPrefs::instance()->categoryColor(cat); |
1180 | } | 1180 | } |
1181 | if (color) { | 1181 | if (color) { |
1182 | mCategoryButton->setColor(*color); | 1182 | mCategoryButton->setColor(*color); |
1183 | } | 1183 | } |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | void KOPrefsDialog::setupPrinterTab() | 1186 | void KOPrefsDialog::setupPrinterTab() |
1187 | { | 1187 | { |
1188 | mPrinterTab = addPage(i18n("Printing"),0, | 1188 | mPrinterTab = addPage(i18n("Printing"),0, |
1189 | DesktopIcon("fileprint",KIcon::SizeMedium)); | 1189 | DesktopIcon("fileprint",KIcon::SizeMedium)); |
1190 | 1190 | ||
1191 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); | 1191 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); |
1192 | topLayout->setSpacing(spacingHint()); | 1192 | topLayout->setSpacing(spacingHint()); |
1193 | topLayout->setMargin(marginHint()); | 1193 | topLayout->setMargin(marginHint()); |
1194 | 1194 | ||
1195 | topLayout->setRowStretch(4,1); | 1195 | topLayout->setRowStretch(4,1); |
1196 | } | 1196 | } |
1197 | 1197 | ||
1198 | void KOPrefsDialog::setupGroupSchedulingTab() | 1198 | void KOPrefsDialog::setupGroupSchedulingTab() |
1199 | { | 1199 | { |
1200 | #if 0 | 1200 | #if 0 |
1201 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, | 1201 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, |
1202 | DesktopIcon("personal",KIcon::SizeMedium)); | 1202 | DesktopIcon("personal",KIcon::SizeMedium)); |
1203 | 1203 | ||
1204 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 1204 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
1205 | topLayout->setSpacing(spacingHint()); | 1205 | topLayout->setSpacing(spacingHint()); |
1206 | topLayout->setMargin(marginHint()); | 1206 | topLayout->setMargin(marginHint()); |
1207 | 1207 | ||
1208 | #if 0 | 1208 | #if 0 |
1209 | KPrefsWidRadios *schedulerGroup = | 1209 | KPrefsDialogWidRadios *schedulerGroup = |
1210 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), | 1210 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), |
1211 | topFrame); | 1211 | topFrame); |
1212 | schedulerGroup->addRadio("Dummy"); // Only for debugging | 1212 | schedulerGroup->addRadio("Dummy"); // Only for debugging |
1213 | schedulerGroup->addRadio(i18n("Mail client")); | 1213 | schedulerGroup->addRadio(i18n("Mail client")); |
1214 | 1214 | ||
1215 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); | 1215 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); |
1216 | #endif | 1216 | #endif |
1217 | 1217 | ||
1218 | KPrefsWidRadios *sendGroup = | 1218 | KPrefsDialogWidRadios *sendGroup = |
1219 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), | 1219 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), |
1220 | topFrame); | 1220 | topFrame); |
1221 | sendGroup->addRadio(i18n("Send to outbox")); | 1221 | sendGroup->addRadio(i18n("Send to outbox")); |
1222 | sendGroup->addRadio(i18n("Send directly")); | 1222 | sendGroup->addRadio(i18n("Send directly")); |
1223 | 1223 | ||
1224 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); | 1224 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); |
1225 | 1225 | ||
1226 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); | 1226 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); |
1227 | mAMails = new QListView(topFrame); | 1227 | mAMails = new QListView(topFrame); |
1228 | mAMails->addColumn(i18n("Email"),300); | 1228 | mAMails->addColumn(i18n("Email"),300); |
1229 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); | 1229 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); |
1230 | 1230 | ||
1231 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); | 1231 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); |
1232 | aEmailsEdit = new QLineEdit(topFrame); | 1232 | aEmailsEdit = new QLineEdit(topFrame); |
1233 | aEmailsEdit->setEnabled(false); | 1233 | aEmailsEdit->setEnabled(false); |
1234 | topLayout->addWidget(aEmailsEdit,4,1); | 1234 | topLayout->addWidget(aEmailsEdit,4,1); |
1235 | 1235 | ||
1236 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); | 1236 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); |
1237 | topLayout->addWidget(add,5,0); | 1237 | topLayout->addWidget(add,5,0); |
1238 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); | 1238 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); |
1239 | topLayout->addWidget(del,5,1); | 1239 | topLayout->addWidget(del,5,1); |
1240 | 1240 | ||
1241 | //topLayout->setRowStretch(2,1); | 1241 | //topLayout->setRowStretch(2,1); |
1242 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); | 1242 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); |
1243 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); | 1243 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); |
1244 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); | 1244 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); |
1245 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); | 1245 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); |
1246 | #endif | 1246 | #endif |
1247 | } | 1247 | } |
1248 | 1248 | ||
1249 | void KOPrefsDialog::setupGroupAutomationTab() | 1249 | void KOPrefsDialog::setupGroupAutomationTab() |
1250 | { | 1250 | { |
1251 | return; | 1251 | return; |
1252 | QFrame *topFrame = addPage(i18n("Group Automation"),0, | 1252 | QFrame *topFrame = addPage(i18n("Group Automation"),0, |
1253 | DesktopIcon("personal",KIcon::SizeMedium)); | 1253 | DesktopIcon("personal",KIcon::SizeMedium)); |
1254 | 1254 | ||
1255 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); | 1255 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); |
1256 | topLayout->setSpacing(spacingHint()); | 1256 | topLayout->setSpacing(spacingHint()); |
1257 | topLayout->setMargin(marginHint()); | 1257 | topLayout->setMargin(marginHint()); |
1258 | 1258 | ||
1259 | KPrefsWidRadios *autoRefreshGroup = | 1259 | KPrefsDialogWidRadios *autoRefreshGroup = |
1260 | addWidRadios(i18n("Auto Send Refresh"), | 1260 | addWidRadios(i18n("Auto Send Refresh"), |
1261 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); | 1261 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); |
1262 | autoRefreshGroup->addRadio(i18n("Never")); | 1262 | autoRefreshGroup->addRadio(i18n("Never")); |
1263 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); | 1263 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); |
1264 | //autoRefreshGroup->addRadio(i18n("selected emails")); | 1264 | //autoRefreshGroup->addRadio(i18n("selected emails")); |
1265 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); | 1265 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); |
1266 | 1266 | ||
1267 | KPrefsWidRadios *autoInsertGroup = | 1267 | KPrefsDialogWidRadios *autoInsertGroup = |
1268 | addWidRadios(i18n("Auto Insert IMIP Replies"), | 1268 | addWidRadios(i18n("Auto Insert IMIP Replies"), |
1269 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); | 1269 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); |
1270 | autoInsertGroup->addRadio(i18n("Never")); | 1270 | autoInsertGroup->addRadio(i18n("Never")); |
1271 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); | 1271 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); |
1272 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1272 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1273 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); | 1273 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); |
1274 | 1274 | ||
1275 | KPrefsWidRadios *autoRequestGroup = | 1275 | KPrefsDialogWidRadios *autoRequestGroup = |
1276 | addWidRadios(i18n("Auto Insert IMIP Requests"), | 1276 | addWidRadios(i18n("Auto Insert IMIP Requests"), |
1277 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); | 1277 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); |
1278 | autoRequestGroup->addRadio(i18n("Never")); | 1278 | autoRequestGroup->addRadio(i18n("Never")); |
1279 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); | 1279 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); |
1280 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1280 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1281 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); | 1281 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); |
1282 | 1282 | ||
1283 | KPrefsWidRadios *autoFreeBusyGroup = | 1283 | KPrefsDialogWidRadios *autoFreeBusyGroup = |
1284 | addWidRadios(i18n("Auto Send FreeBusy Information"), | 1284 | addWidRadios(i18n("Auto Send FreeBusy Information"), |
1285 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); | 1285 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); |
1286 | autoFreeBusyGroup->addRadio(i18n("Never")); | 1286 | autoFreeBusyGroup->addRadio(i18n("Never")); |
1287 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); | 1287 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); |
1288 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1288 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1289 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); | 1289 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); |
1290 | 1290 | ||
1291 | KPrefsWidRadios *autoFreeBusyReplyGroup = | 1291 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = |
1292 | addWidRadios(i18n("Auto Save FreeBusy Replies"), | 1292 | addWidRadios(i18n("Auto Save FreeBusy Replies"), |
1293 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); | 1293 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); |
1294 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); | 1294 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); |
1295 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); | 1295 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); |
1296 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1296 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1297 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); | 1297 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); |
1298 | } | 1298 | } |
1299 | 1299 | ||
1300 | void KOPrefsDialog::showPrinterTab() | 1300 | void KOPrefsDialog::showPrinterTab() |
1301 | { | 1301 | { |
1302 | showPage(pageIndex(mPrinterTab)); | 1302 | showPage(pageIndex(mPrinterTab)); |
1303 | } | 1303 | } |
1304 | 1304 | ||
1305 | 1305 | ||
1306 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, | 1306 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, |
1307 | const QStringList *tags) | 1307 | const QStringList *tags) |
1308 | { | 1308 | { |
1309 | if (tags) { | 1309 | if (tags) { |
1310 | int i = tags->findIndex(text); | 1310 | int i = tags->findIndex(text); |
1311 | if (i > 0) combo->setCurrentItem(i); | 1311 | if (i > 0) combo->setCurrentItem(i); |
1312 | } else { | 1312 | } else { |
1313 | for(int i=0;i<combo->count();++i) { | 1313 | for(int i=0;i<combo->count();++i) { |
1314 | if (combo->text(i) == text) { | 1314 | if (combo->text(i) == text) { |
1315 | combo->setCurrentItem(i); | 1315 | combo->setCurrentItem(i); |
1316 | break; | 1316 | break; |
1317 | } | 1317 | } |
1318 | } | 1318 | } |
1319 | } | 1319 | } |
1320 | } | 1320 | } |
1321 | 1321 | ||
1322 | void KOPrefsDialog::usrReadConfig() | 1322 | void KOPrefsDialog::usrReadConfig() |
1323 | { | 1323 | { |
1324 | mNameEdit->setText(KOPrefs::instance()->fullName()); | 1324 | mNameEdit->setText(KOPrefs::instance()->fullName()); |
1325 | mEmailEdit->setText(KOPrefs::instance()->email()); | 1325 | mEmailEdit->setText(KOPrefs::instance()->email()); |
1326 | 1326 | ||
1327 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); | 1327 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); |
1328 | QDate current ( 2001, 1,1); | 1328 | QDate current ( 2001, 1,1); |
1329 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1329 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
1330 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1330 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1331 | setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); | 1331 | setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); |
1332 | //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1332 | //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1333 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); | 1333 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); |
1334 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); | 1334 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); |
1335 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); | 1335 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); |
1336 | // if (KOPrefs::instance()->mAllDaySize > 47 ) | 1336 | // if (KOPrefs::instance()->mAllDaySize > 47 ) |
1337 | // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; | 1337 | // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; |
1338 | //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); | 1338 | //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); |
1339 | 1339 | ||
1340 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); | 1340 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); |
1341 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); | 1341 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); |
1342 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); | 1342 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); |
1343 | // mAMails->clear(); | 1343 | // mAMails->clear(); |
1344 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); | 1344 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); |
1345 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { | 1345 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { |
1346 | // QListViewItem *item = new QListViewItem(mAMails); | 1346 | // QListViewItem *item = new QListViewItem(mAMails); |
1347 | // item->setText(0,*it); | 1347 | // item->setText(0,*it); |
1348 | // mAMails->insertItem(item); | 1348 | // mAMails->insertItem(item); |
1349 | // } | 1349 | // } |
1350 | 1350 | ||
1351 | // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); | 1351 | // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); |
1352 | //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); | 1352 | //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); |
1353 | //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); | 1353 | //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); |
1354 | //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); | 1354 | //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); |
1355 | 1355 | ||
1356 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); | 1356 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); |
1357 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); | 1357 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); |
1358 | QString dummy = KOPrefs::instance()->mUserDateFormatLong; | 1358 | QString dummy = KOPrefs::instance()->mUserDateFormatLong; |
1359 | mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); | 1359 | mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); |
1360 | dummy = KOPrefs::instance()->mUserDateFormatShort; | 1360 | dummy = KOPrefs::instance()->mUserDateFormatShort; |
1361 | mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); | 1361 | mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); |
1362 | updateCategories(); | 1362 | updateCategories(); |
1363 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); | 1363 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); |
1364 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); | 1364 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); |
1365 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); | 1365 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); |
1366 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); | 1366 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); |
1367 | } | 1367 | } |
1368 | 1368 | ||
1369 | 1369 | ||
1370 | void KOPrefsDialog::usrWriteConfig() | 1370 | void KOPrefsDialog::usrWriteConfig() |
1371 | { | 1371 | { |
1372 | 1372 | ||
1373 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); | 1373 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); |
1374 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); | 1374 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); |
1375 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); | 1375 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); |
1376 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); | 1376 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); |
1377 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); | 1377 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); |
1378 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); | 1378 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); |
1379 | 1379 | ||
1380 | KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); | 1380 | KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); |
1381 | KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); | 1381 | KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); |
1382 | KOPrefs::instance()->setFullName(mNameEdit->text()); | 1382 | KOPrefs::instance()->setFullName(mNameEdit->text()); |
1383 | KOPrefs::instance()->setEmail(mEmailEdit->text()); | 1383 | KOPrefs::instance()->setEmail(mEmailEdit->text()); |
1384 | 1384 | ||
1385 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); | 1385 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); |
1386 | 1386 | ||
1387 | KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); | 1387 | KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); |
1388 | QDate date; | 1388 | QDate date; |
1389 | date = mStartDateSavingEdit->date(); | 1389 | date = mStartDateSavingEdit->date(); |
1390 | int sub = 0; | 1390 | int sub = 0; |
1391 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 1391 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
1392 | sub = 1; | 1392 | sub = 1; |
1393 | KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; | 1393 | KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; |
1394 | date = mEndDateSavingEdit->date(); | 1394 | date = mEndDateSavingEdit->date(); |
1395 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 1395 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
1396 | sub = 1; | 1396 | sub = 1; |
1397 | else | 1397 | else |
1398 | sub = 0; | 1398 | sub = 0; |
1399 | KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; | 1399 | KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; |
1400 | // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); | 1400 | // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); |
1401 | 1401 | ||
1402 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); | 1402 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); |
1403 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); | 1403 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); |
1404 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); | 1404 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); |
1405 | 1405 | ||
1406 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); | 1406 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); |
1407 | 1407 | ||
1408 | QDictIterator<QColor> it(mCategoryDict); | 1408 | QDictIterator<QColor> it(mCategoryDict); |
1409 | while (it.current()) { | 1409 | while (it.current()) { |
1410 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); | 1410 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); |
1411 | ++it; | 1411 | ++it; |
1412 | } | 1412 | } |
1413 | 1413 | ||
1414 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); | 1414 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); |
1415 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); | 1415 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); |
1416 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); | 1416 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); |
1417 | 1417 | ||
1418 | KOPrefs::instance()->mAdditionalMails.clear(); | 1418 | KOPrefs::instance()->mAdditionalMails.clear(); |
1419 | // QListViewItem *item; | 1419 | // QListViewItem *item; |
@@ -1453,157 +1453,157 @@ void KOPrefsDialog::warningExperimental(bool on) | |||
1453 | if (on) { | 1453 | if (on) { |
1454 | KMessageBox::information(this,i18n("This is an experimental feature. " | 1454 | KMessageBox::information(this,i18n("This is an experimental feature. " |
1455 | "It may not work, it may do nothing useful and it may cause data loss. " | 1455 | "It may not work, it may do nothing useful and it may cause data loss. " |
1456 | "Use with care.\n" | 1456 | "Use with care.\n" |
1457 | "You have to restart KOrganizer for this setting to take effect.")); | 1457 | "You have to restart KOrganizer for this setting to take effect.")); |
1458 | } else { | 1458 | } else { |
1459 | KMessageBox::information(this, | 1459 | KMessageBox::information(this, |
1460 | i18n("You have to restart KOrganizer for this setting to take effect.")); | 1460 | i18n("You have to restart KOrganizer for this setting to take effect.")); |
1461 | } | 1461 | } |
1462 | } | 1462 | } |
1463 | 1463 | ||
1464 | void KOPrefsDialog::toggleEmailSettings(bool on) | 1464 | void KOPrefsDialog::toggleEmailSettings(bool on) |
1465 | { | 1465 | { |
1466 | if (on) { | 1466 | if (on) { |
1467 | mEmailEdit->setEnabled(false); | 1467 | mEmailEdit->setEnabled(false); |
1468 | mNameEdit->setEnabled(false); | 1468 | mNameEdit->setEnabled(false); |
1469 | mEmailLabel->setEnabled(false); | 1469 | mEmailLabel->setEnabled(false); |
1470 | mNameLabel->setEnabled(false); | 1470 | mNameLabel->setEnabled(false); |
1471 | 1471 | ||
1472 | KEMailSettings settings; | 1472 | KEMailSettings settings; |
1473 | mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); | 1473 | mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); |
1474 | mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); | 1474 | mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); |
1475 | } else { | 1475 | } else { |
1476 | mEmailEdit->setEnabled(true); | 1476 | mEmailEdit->setEnabled(true); |
1477 | mNameEdit->setEnabled(true); | 1477 | mNameEdit->setEnabled(true); |
1478 | mEmailLabel->setEnabled(true); | 1478 | mEmailLabel->setEnabled(true); |
1479 | mNameLabel->setEnabled(true); | 1479 | mNameLabel->setEnabled(true); |
1480 | } | 1480 | } |
1481 | } | 1481 | } |
1482 | 1482 | ||
1483 | void KOPrefsDialog::addItem() | 1483 | void KOPrefsDialog::addItem() |
1484 | { | 1484 | { |
1485 | // aEmailsEdit->setEnabled(true); | 1485 | // aEmailsEdit->setEnabled(true); |
1486 | // QListViewItem *item = new QListViewItem(mAMails); | 1486 | // QListViewItem *item = new QListViewItem(mAMails); |
1487 | // mAMails->insertItem(item); | 1487 | // mAMails->insertItem(item); |
1488 | // mAMails->setSelected(item,true); | 1488 | // mAMails->setSelected(item,true); |
1489 | // aEmailsEdit->setText(i18n("(EmptyEmail)")); | 1489 | // aEmailsEdit->setText(i18n("(EmptyEmail)")); |
1490 | } | 1490 | } |
1491 | 1491 | ||
1492 | void KOPrefsDialog::removeItem() | 1492 | void KOPrefsDialog::removeItem() |
1493 | { | 1493 | { |
1494 | // QListViewItem *item; | 1494 | // QListViewItem *item; |
1495 | // item = mAMails->selectedItem(); | 1495 | // item = mAMails->selectedItem(); |
1496 | // if (!item) return; | 1496 | // if (!item) return; |
1497 | // mAMails->takeItem(item); | 1497 | // mAMails->takeItem(item); |
1498 | // item = mAMails->selectedItem(); | 1498 | // item = mAMails->selectedItem(); |
1499 | // if (!item) { | 1499 | // if (!item) { |
1500 | // aEmailsEdit->setText(""); | 1500 | // aEmailsEdit->setText(""); |
1501 | // aEmailsEdit->setEnabled(false); | 1501 | // aEmailsEdit->setEnabled(false); |
1502 | // } | 1502 | // } |
1503 | // if (mAMails->childCount() == 0) { | 1503 | // if (mAMails->childCount() == 0) { |
1504 | // aEmailsEdit->setEnabled(false); | 1504 | // aEmailsEdit->setEnabled(false); |
1505 | // } | 1505 | // } |
1506 | } | 1506 | } |
1507 | 1507 | ||
1508 | void KOPrefsDialog::updateItem() | 1508 | void KOPrefsDialog::updateItem() |
1509 | { | 1509 | { |
1510 | // QListViewItem *item; | 1510 | // QListViewItem *item; |
1511 | // item = mAMails->selectedItem(); | 1511 | // item = mAMails->selectedItem(); |
1512 | // if (!item) return; | 1512 | // if (!item) return; |
1513 | // item->setText(0,aEmailsEdit->text()); | 1513 | // item->setText(0,aEmailsEdit->text()); |
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | void KOPrefsDialog::updateInput() | 1516 | void KOPrefsDialog::updateInput() |
1517 | { | 1517 | { |
1518 | // QListViewItem *item; | 1518 | // QListViewItem *item; |
1519 | // item = mAMails->selectedItem(); | 1519 | // item = mAMails->selectedItem(); |
1520 | // if (!item) return; | 1520 | // if (!item) return; |
1521 | // aEmailsEdit->setEnabled(true); | 1521 | // aEmailsEdit->setEnabled(true); |
1522 | // aEmailsEdit->setText(item->text(0)); | 1522 | // aEmailsEdit->setText(item->text(0)); |
1523 | } | 1523 | } |
1524 | void KOPrefsDialog::updateTimezoneOffset( int index ) | 1524 | void KOPrefsDialog::updateTimezoneOffset( int index ) |
1525 | { | 1525 | { |
1526 | /* | 1526 | /* |
1527 | qDebug("updateTimezoneOffset %d ", index); | 1527 | qDebug("updateTimezoneOffset %d ", index); |
1528 | if ( index < 24 ) { | 1528 | if ( index < 24 ) { |
1529 | mTimezoneOffsetSpin->setEnabled ( false ); | 1529 | mTimezoneOffsetSpin->setEnabled ( false ); |
1530 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); | 1530 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); |
1531 | 1531 | ||
1532 | 1532 | ||
1533 | } else { | 1533 | } else { |
1534 | if ( index == 24 ) { | 1534 | if ( index == 24 ) { |
1535 | mTimezoneOffsetSpin->setEnabled ( true ); | 1535 | mTimezoneOffsetSpin->setEnabled ( true ); |
1536 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1536 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1537 | 1537 | ||
1538 | } else { | 1538 | } else { |
1539 | mTimezoneOffsetSpin->setEnabled ( false ); | 1539 | mTimezoneOffsetSpin->setEnabled ( false ); |
1540 | mTimezoneOffsetSpin->setValue( 0 ); | 1540 | mTimezoneOffsetSpin->setValue( 0 ); |
1541 | } | 1541 | } |
1542 | } | 1542 | } |
1543 | */ | 1543 | */ |
1544 | } | 1544 | } |
1545 | 1545 | ||
1546 | void KOPrefsDialog::setupTimeZoneTab() | 1546 | void KOPrefsDialog::setupTimeZoneTab() |
1547 | { | 1547 | { |
1548 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); | 1548 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); |
1549 | // DesktopIcon("clock",KIcon::SizeMedium)); | 1549 | // DesktopIcon("clock",KIcon::SizeMedium)); |
1550 | 1550 | ||
1551 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1551 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1552 | topLayout->setSpacing(spacingHint()); | 1552 | topLayout->setSpacing(spacingHint()); |
1553 | topLayout->setMargin(marginHint()); | 1553 | topLayout->setMargin(marginHint()); |
1554 | 1554 | ||
1555 | QHBox *timeZoneBox = new QHBox( topFrame ); | 1555 | QHBox *timeZoneBox = new QHBox( topFrame ); |
1556 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 1556 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
1557 | 1557 | ||
1558 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 1558 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
1559 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 1559 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
1560 | if ( QApplication::desktop()->width() < 300 ) { | 1560 | if ( QApplication::desktop()->width() < 300 ) { |
1561 | mTimeZoneCombo->setMaximumWidth(150); | 1561 | mTimeZoneCombo->setMaximumWidth(150); |
1562 | } | 1562 | } |
1563 | 1563 | ||
1564 | QStringList list; | 1564 | QStringList list; |
1565 | list = KGlobal::locale()->timeZoneList(); | 1565 | list = KGlobal::locale()->timeZoneList(); |
1566 | mTimeZoneCombo->insertStringList(list); | 1566 | mTimeZoneCombo->insertStringList(list); |
1567 | 1567 | ||
1568 | // find the currently set time zone and select it | 1568 | // find the currently set time zone and select it |
1569 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; | 1569 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; |
1570 | int nCurrentlySet = 11; | 1570 | int nCurrentlySet = 11; |
1571 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 1571 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
1572 | { | 1572 | { |
1573 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 1573 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
1574 | { | 1574 | { |
1575 | nCurrentlySet = i; | 1575 | nCurrentlySet = i; |
1576 | break; | 1576 | break; |
1577 | } | 1577 | } |
1578 | } | 1578 | } |
1579 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 1579 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
1580 | int iii = 1; | 1580 | int iii = 1; |
1581 | KPrefsWidBool *sb = | 1581 | KPrefsDialogWidBool *sb = |
1582 | addWidBool(i18n("Timezone has daylight saving"), | 1582 | addWidBool(i18n("Timezone has daylight saving"), |
1583 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); | 1583 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); |
1584 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 1584 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
1585 | ++iii; | 1585 | ++iii; |
1586 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 1586 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
1587 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1587 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1588 | ++iii; | 1588 | ++iii; |
1589 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 1589 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
1590 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1590 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1591 | ++iii; | 1591 | ++iii; |
1592 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 1592 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
1593 | topLayout->addWidget(lab, iii,0); | 1593 | topLayout->addWidget(lab, iii,0); |
1594 | mStartDateSavingEdit = new KDateEdit(topFrame); | 1594 | mStartDateSavingEdit = new KDateEdit(topFrame); |
1595 | topLayout->addWidget(mStartDateSavingEdit, iii,1); | 1595 | topLayout->addWidget(mStartDateSavingEdit, iii,1); |
1596 | ++iii; | 1596 | ++iii; |
1597 | 1597 | ||
1598 | lab = new QLabel( i18n("Daylight end:"), topFrame ); | 1598 | lab = new QLabel( i18n("Daylight end:"), topFrame ); |
1599 | topLayout->addWidget(lab, iii,0); | 1599 | topLayout->addWidget(lab, iii,0); |
1600 | mEndDateSavingEdit = new KDateEdit(topFrame); | 1600 | mEndDateSavingEdit = new KDateEdit(topFrame); |
1601 | topLayout->addWidget(mEndDateSavingEdit, iii,1); | 1601 | topLayout->addWidget(mEndDateSavingEdit, iii,1); |
1602 | ++iii; | 1602 | ++iii; |
1603 | QDate current ( 2001, 1,1); | 1603 | QDate current ( 2001, 1,1); |
1604 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1604 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
1605 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1605 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1606 | 1606 | ||
1607 | 1607 | ||
1608 | } | 1608 | } |
1609 | 1609 | ||
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h index fd651d0..83dc1eb 100644 --- a/korganizer/koprefsdialog.h +++ b/korganizer/koprefsdialog.h | |||
@@ -1,161 +1,161 @@ | |||
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 | 35 | ||
36 | class KColorButton; | 36 | class KColorButton; |
37 | class QSpinBox; | 37 | class QSpinBox; |
38 | class QSlider; | 38 | class QSlider; |
39 | class KURLRequester; | 39 | class KURLRequester; |
40 | class QComboBox; | 40 | class QComboBox; |
41 | class QLineEdit; | 41 | class QLineEdit; |
42 | class QStringList; | 42 | class QStringList; |
43 | 43 | ||
44 | /** Dialog to change the korganizer configuration. | 44 | /** Dialog to change the korganizer configuration. |
45 | */ | 45 | */ |
46 | class KOPrefsDialog : public KPrefsDialog | 46 | class KOPrefsDialog : public KPrefsDialog |
47 | { | 47 | { |
48 | Q_OBJECT | 48 | Q_OBJECT |
49 | public: | 49 | public: |
50 | /** Initialize dialog and pages */ | 50 | /** Initialize dialog and pages */ |
51 | KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false); | 51 | KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false); |
52 | ~KOPrefsDialog(); | 52 | ~KOPrefsDialog(); |
53 | 53 | ||
54 | public slots: | 54 | public slots: |
55 | void showPrinterTab(); | 55 | void showPrinterTab(); |
56 | 56 | ||
57 | /** Update controls for categories */ | 57 | /** Update controls for categories */ |
58 | void updateCategories(); | 58 | void updateCategories(); |
59 | void showSyncPage(); | 59 | void showSyncPage(); |
60 | protected slots: | 60 | protected slots: |
61 | void selectSoundFile(); | 61 | void selectSoundFile(); |
62 | void setCategoryColor(); | 62 | void setCategoryColor(); |
63 | void updateCategoryColor(); | 63 | void updateCategoryColor(); |
64 | void updateTimezoneOffset( int ); | 64 | void updateTimezoneOffset( int ); |
65 | 65 | ||
66 | 66 | ||
67 | void warningExperimental(bool on); | 67 | void warningExperimental(bool on); |
68 | void warningGroupScheduling(); | 68 | void warningGroupScheduling(); |
69 | void warningProjectView(); | 69 | void warningProjectView(); |
70 | 70 | ||
71 | void toggleEmailSettings(bool); | 71 | void toggleEmailSettings(bool); |
72 | 72 | ||
73 | //additional emails | 73 | //additional emails |
74 | void addItem(); | 74 | void addItem(); |
75 | void removeItem(); | 75 | void removeItem(); |
76 | void updateItem(); | 76 | void updateItem(); |
77 | void updateInput(); | 77 | void updateInput(); |
78 | 78 | ||
79 | protected: | 79 | protected: |
80 | void usrReadConfig(); | 80 | void usrReadConfig(); |
81 | void usrWriteConfig(); | 81 | void usrWriteConfig(); |
82 | 82 | ||
83 | void setupMainTab(); | 83 | void setupMainTab(); |
84 | void setupTimeTab(); | 84 | void setupTimeTab(); |
85 | void setupTimeZoneTab(); | 85 | void setupTimeZoneTab(); |
86 | void setupLocaleTab(); | 86 | void setupLocaleTab(); |
87 | void setupLocaleDateTab(); | 87 | void setupLocaleDateTab(); |
88 | void setupFontsTab(); | 88 | void setupFontsTab(); |
89 | void setupColorsTab(); | 89 | void setupColorsTab(); |
90 | void setupViewsTab(); | 90 | void setupViewsTab(); |
91 | void setupDisplayTab(); | 91 | void setupDisplayTab(); |
92 | void setupPrinterTab(); | 92 | void setupPrinterTab(); |
93 | void setupGroupSchedulingTab(); | 93 | void setupGroupSchedulingTab(); |
94 | void setupGroupAutomationTab(); | 94 | void setupGroupAutomationTab(); |
95 | void setupSyncTab(); | 95 | void setupSyncTab(); |
96 | void setupSyncAlgTab(); | 96 | void setupSyncAlgTab(); |
97 | 97 | ||
98 | void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); | 98 | void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); |
99 | 99 | ||
100 | 100 | ||
101 | private: | 101 | private: |
102 | KPrefsWidBool *mEnableGroupScheduling; | 102 | KPrefsDialogWidBool *mEnableGroupScheduling; |
103 | KPrefsWidBool *mEnableProjectView; | 103 | KPrefsDialogWidBool *mEnableProjectView; |
104 | 104 | ||
105 | QFrame *mPrinterTab; | 105 | QFrame *mPrinterTab; |
106 | 106 | ||
107 | QLineEdit *nameEdit; | 107 | QLineEdit *nameEdit; |
108 | QLineEdit *emailEdit; | 108 | QLineEdit *emailEdit; |
109 | 109 | ||
110 | QComboBox *timeCombo; | 110 | QComboBox *timeCombo; |
111 | QComboBox *tzCombo; | 111 | QComboBox *tzCombo; |
112 | 112 | ||
113 | // widgets holding preferences data | 113 | // widgets holding preferences data |
114 | QLineEdit *mNameEdit; | 114 | QLineEdit *mNameEdit; |
115 | QLineEdit *mEmailEdit; | 115 | QLineEdit *mEmailEdit; |
116 | QLabel *mNameLabel; | 116 | QLabel *mNameLabel; |
117 | QLabel *mEmailLabel; | 117 | QLabel *mEmailLabel; |
118 | QLineEdit *mAdditionalEdit; | 118 | QLineEdit *mAdditionalEdit; |
119 | QSpinBox *mAutoSaveIntervalSpin; | 119 | QSpinBox *mAutoSaveIntervalSpin; |
120 | QSpinBox *mPrioSpin; | 120 | QSpinBox *mPrioSpin; |
121 | // QListView *mAMails; | 121 | // QListView *mAMails; |
122 | QLineEdit *aEmailsEdit; | 122 | QLineEdit *aEmailsEdit; |
123 | 123 | ||
124 | QComboBox *mTimeZoneCombo; | 124 | QComboBox *mTimeZoneCombo; |
125 | QStringList tzonenames; | 125 | QStringList tzonenames; |
126 | QSpinBox *mStartTimeSpin; | 126 | QSpinBox *mStartTimeSpin; |
127 | QSpinBox *mDefaultDurationSpin; | 127 | QSpinBox *mDefaultDurationSpin; |
128 | QComboBox *mAlarmTimeCombo; | 128 | QComboBox *mAlarmTimeCombo; |
129 | 129 | ||
130 | QComboBox *mCategoryCombo; | 130 | QComboBox *mCategoryCombo; |
131 | KColorButton *mCategoryButton; | 131 | KColorButton *mCategoryButton; |
132 | QDict<QColor> mCategoryDict; | 132 | QDict<QColor> mCategoryDict; |
133 | 133 | ||
134 | QSlider *mHourSizeSlider; | 134 | QSlider *mHourSizeSlider; |
135 | 135 | ||
136 | QSpinBox *mNextXDaysSpin; | 136 | QSpinBox *mNextXDaysSpin; |
137 | QSpinBox *mWhatsNextSpin; | 137 | QSpinBox *mWhatsNextSpin; |
138 | 138 | ||
139 | QLineEdit * mRemoteIPEdit; | 139 | QLineEdit * mRemoteIPEdit; |
140 | QLineEdit * mRemoteUser; | 140 | QLineEdit * mRemoteUser; |
141 | QLineEdit * mRemotePassWd; | 141 | QLineEdit * mRemotePassWd; |
142 | QLineEdit * mRemoteFile; | 142 | QLineEdit * mRemoteFile; |
143 | QLineEdit * mLocalTempFile; | 143 | QLineEdit * mLocalTempFile; |
144 | QWidget* mSetupSyncAlgTab; | 144 | QWidget* mSetupSyncAlgTab; |
145 | QLineEdit * mUserDateFormatLong; | 145 | QLineEdit * mUserDateFormatLong; |
146 | QLineEdit * mUserDateFormatShort; | 146 | QLineEdit * mUserDateFormatShort; |
147 | 147 | ||
148 | QSpinBox *mTimezoneOffsetSpin; | 148 | QSpinBox *mTimezoneOffsetSpin; |
149 | QSpinBox *mDaylightsavingStart; | 149 | QSpinBox *mDaylightsavingStart; |
150 | QSpinBox *mDaylightsavingEnd; | 150 | QSpinBox *mDaylightsavingEnd; |
151 | KDateEdit* mStartDateSavingEdit; | 151 | KDateEdit* mStartDateSavingEdit; |
152 | KDateEdit* mEndDateSavingEdit; | 152 | KDateEdit* mEndDateSavingEdit; |
153 | QSpinBox * mAlarmPlayBeeps; | 153 | QSpinBox * mAlarmPlayBeeps; |
154 | QSpinBox * mAlarmSuspendTime; | 154 | QSpinBox * mAlarmSuspendTime; |
155 | QSpinBox * mAlarmSuspendCount; | 155 | QSpinBox * mAlarmSuspendCount; |
156 | QSpinBox * mAlarmBeepInterval; | 156 | QSpinBox * mAlarmBeepInterval; |
157 | 157 | ||
158 | QLineEdit * mDefaultAlarmFile; | 158 | QLineEdit * mDefaultAlarmFile; |
159 | }; | 159 | }; |
160 | 160 | ||
161 | #endif | 161 | #endif |