-rw-r--r-- | korganizer/koprefs.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 03df59b..c74b0ef 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -2,291 +2,282 @@ | |||
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; | ||
99 | //QString mTimeZoneName; // e.g. +00:04:00 Indian/Mauritius | ||
100 | //int mTimeZoneOffset; // e.g. -240 min | ||
101 | int mStartTime; | 98 | int mStartTime; |
102 | int mDefaultDuration; | 99 | int mDefaultDuration; |
103 | int mAlarmTime; | 100 | int mAlarmTime; |
104 | int mDaylightSavings; | ||
105 | 101 | ||
106 | int mWorkingHoursStart; | 102 | int mWorkingHoursStart; |
107 | int mWorkingHoursEnd; | 103 | int mWorkingHoursEnd; |
108 | bool mExcludeHolidays; | 104 | bool mExcludeHolidays; |
109 | bool mExcludeSaturdays; | 105 | bool mExcludeSaturdays; |
110 | bool mMarcusBainsShowSeconds; | 106 | bool mMarcusBainsShowSeconds; |
111 | 107 | ||
112 | QFont mTimeBarFont; | 108 | QFont mTimeBarFont; |
113 | QFont mMonthViewFont; | 109 | QFont mMonthViewFont; |
114 | QFont mAgendaViewFont; | 110 | QFont mAgendaViewFont; |
115 | QFont mMarcusBainsFont; | 111 | QFont mMarcusBainsFont; |
116 | QFont mTimeLabelsFont; | 112 | QFont mTimeLabelsFont; |
117 | QFont mTodoViewFont; | 113 | QFont mTodoViewFont; |
118 | QFont mListViewFont; | 114 | QFont mListViewFont; |
119 | QFont mDateNavigatorFont; | 115 | QFont mDateNavigatorFont; |
120 | QFont mEditBoxFont; | 116 | QFont mEditBoxFont; |
121 | QFont mJornalViewFont; | 117 | QFont mJornalViewFont; |
122 | QFont mWhatsNextFont; | 118 | QFont mWhatsNextFont; |
123 | QFont mEventViewFont; | 119 | QFont mEventViewFont; |
124 | 120 | ||
125 | 121 | ||
126 | 122 | ||
127 | 123 | ||
128 | QColor mHolidayColor; | 124 | QColor mHolidayColor; |
129 | QColor mHighlightColor; | 125 | QColor mHighlightColor; |
130 | QColor mEventColor; | 126 | QColor mEventColor; |
131 | QColor mAgendaBgColor; | 127 | QColor mAgendaBgColor; |
132 | QColor mWorkingHoursColor; | 128 | QColor mWorkingHoursColor; |
133 | QColor mTodoDueTodayColor; | 129 | QColor mTodoDueTodayColor; |
134 | QColor mTodoOverdueColor; | 130 | QColor mTodoOverdueColor; |
135 | QColor mMonthViewEvenColor; | 131 | QColor mMonthViewEvenColor; |
136 | QColor mMonthViewOddColor; | 132 | QColor mMonthViewOddColor; |
137 | QColor mMonthViewHolidayColor; | 133 | QColor mMonthViewHolidayColor; |
138 | bool mMonthViewUsesDayColors; | 134 | bool mMonthViewUsesDayColors; |
139 | bool mMonthViewSatSunTog; | 135 | bool mMonthViewSatSunTog; |
140 | QColor mAppColor1; | 136 | QColor mAppColor1; |
141 | QColor mAppColor2; | 137 | QColor mAppColor2; |
142 | bool mUseAppColors; | 138 | bool mUseAppColors; |
143 | 139 | ||
144 | int mDayBegins; | 140 | int mDayBegins; |
145 | int mHourSize; | 141 | int mHourSize; |
146 | int mAllDaySize; | 142 | int mAllDaySize; |
147 | bool mShowFullMenu; | 143 | bool mShowFullMenu; |
148 | bool mDailyRecur; | 144 | bool mDailyRecur; |
149 | bool mWeeklyRecur; | 145 | bool mWeeklyRecur; |
150 | bool mMonthDailyRecur; | 146 | bool mMonthDailyRecur; |
151 | bool mMonthWeeklyRecur; | 147 | bool mMonthWeeklyRecur; |
152 | bool mMonthShowIcons; | 148 | bool mMonthShowIcons; |
153 | bool mMonthShowShort; | 149 | bool mMonthShowShort; |
154 | bool mEnableToolTips; | 150 | bool mEnableToolTips; |
155 | bool mEnableMonthScroll; | 151 | bool mEnableMonthScroll; |
156 | bool mFullViewMonth; | 152 | bool mFullViewMonth; |
157 | bool mMonthViewUsesCategoryColor; | 153 | bool mMonthViewUsesCategoryColor; |
158 | bool mFullViewTodo; | 154 | bool mFullViewTodo; |
159 | bool mShowCompletedTodo; | 155 | bool mShowCompletedTodo; |
160 | bool mMarcusBainsEnabled; | 156 | bool mMarcusBainsEnabled; |
161 | int mNextXDays; | 157 | int mNextXDays; |
162 | int mWhatsNextDays; | 158 | int mWhatsNextDays; |
163 | int mWhatsNextPrios; | 159 | int mWhatsNextPrios; |
164 | bool mEnableQuickTodo; | 160 | bool mEnableQuickTodo; |
165 | bool mLanguageChanged; | 161 | bool mLanguageChanged; |
166 | 162 | ||
167 | bool mCompactDialogs; | 163 | bool mCompactDialogs; |
168 | bool mVerticalScreen; | 164 | bool mVerticalScreen; |
169 | 165 | ||
170 | bool mShowIconNewTodo; | 166 | bool mShowIconNewTodo; |
171 | bool mShowIconNewEvent; | 167 | bool mShowIconNewEvent; |
172 | bool mShowIconSearch; | 168 | bool mShowIconSearch; |
173 | bool mShowIconList; | 169 | bool mShowIconList; |
174 | bool mShowIconDay1; | 170 | bool mShowIconDay1; |
175 | bool mShowIconDay5; | 171 | bool mShowIconDay5; |
176 | bool mShowIconDay7; | 172 | bool mShowIconDay7; |
177 | bool mShowIconMonth; | 173 | bool mShowIconMonth; |
178 | bool mShowIconTodoview; | 174 | bool mShowIconTodoview; |
179 | bool mShowIconBackFast; | 175 | bool mShowIconBackFast; |
180 | bool mShowIconBack; | 176 | bool mShowIconBack; |
181 | bool mShowIconToday; | 177 | bool mShowIconToday; |
182 | bool mShowIconForward; | 178 | bool mShowIconForward; |
183 | bool mShowIconForwardFast; | 179 | bool mShowIconForwardFast; |
184 | bool mShowIconWhatsThis; | 180 | bool mShowIconWhatsThis; |
185 | bool mShowIconNextDays; | 181 | bool mShowIconNextDays; |
186 | bool mShowIconNext; | 182 | bool mShowIconNext; |
187 | bool mShowIconJournal; | 183 | bool mShowIconJournal; |
188 | 184 | ||
189 | bool mShowIconStretch; | 185 | bool mShowIconStretch; |
190 | 186 | ||
191 | bool mToolBarHor; | 187 | bool mToolBarHor; |
192 | bool mToolBarUp; | 188 | bool mToolBarUp; |
193 | bool mToolBarMiniIcons; | 189 | bool mToolBarMiniIcons; |
194 | 190 | ||
195 | bool mAskForQuit; | 191 | bool mAskForQuit; |
196 | bool mUsePassWd; | 192 | bool mUsePassWd; |
197 | bool mShowSyncEvents; | 193 | bool mShowSyncEvents; |
198 | bool mShowTodoInAgenda; | 194 | bool mShowTodoInAgenda; |
199 | 195 | ||
200 | int mLastSyncTime; | 196 | int mLastSyncTime; |
201 | void setCategoryColor(QString cat,const QColor & color); | 197 | void setCategoryColor(QString cat,const QColor & color); |
202 | QColor *categoryColor(QString cat); | 198 | QColor *categoryColor(QString cat); |
203 | 199 | ||
204 | QString mArchiveFile; | 200 | QString mArchiveFile; |
205 | QString mHtmlExportFile; | 201 | QString mHtmlExportFile; |
206 | bool mHtmlWithSave; | 202 | bool mHtmlWithSave; |
207 | 203 | ||
208 | QStringList mSelectedPlugins; | 204 | QStringList mSelectedPlugins; |
209 | 205 | ||
210 | QString mLastImportFile; | 206 | QString mLastImportFile; |
211 | QString mLastVcalFile; | 207 | QString mLastVcalFile; |
212 | QString mLastSaveFile; | 208 | QString mLastSaveFile; |
213 | QString mLastLoadFile; | 209 | QString mLastLoadFile; |
214 | 210 | ||
215 | 211 | ||
216 | QString mDefaultAlarmFile; | 212 | QString mDefaultAlarmFile; |
217 | int mIMIPScheduler; | 213 | int mIMIPScheduler; |
218 | int mIMIPSend; | 214 | int mIMIPSend; |
219 | QStringList mAdditionalMails; | 215 | QStringList mAdditionalMails; |
220 | int mIMIPAutoRefresh; | 216 | int mIMIPAutoRefresh; |
221 | int mIMIPAutoInsertReply; | 217 | int mIMIPAutoInsertReply; |
222 | int mIMIPAutoInsertRequest; | 218 | int mIMIPAutoInsertRequest; |
223 | int mIMIPAutoFreeBusy; | 219 | int mIMIPAutoFreeBusy; |
224 | int mIMIPAutoFreeBusyReply; | 220 | int mIMIPAutoFreeBusyReply; |
225 | 221 | ||
226 | QStringList mTodoTemplates; | 222 | QStringList mTodoTemplates; |
227 | QStringList mEventTemplates; | 223 | QStringList mEventTemplates; |
228 | 224 | ||
229 | int mDestination; | 225 | int mDestination; |
230 | 226 | ||
231 | 227 | ||
232 | bool mEditOnDoubleClick; | 228 | bool mEditOnDoubleClick; |
233 | bool mViewChangeHoldFullscreen; | 229 | bool mViewChangeHoldFullscreen; |
234 | bool mViewChangeHoldNonFullscreen; | 230 | bool mViewChangeHoldNonFullscreen; |
235 | bool mCenterOnCurrentTime; | 231 | bool mCenterOnCurrentTime; |
236 | bool mSetTimeToDayStartAt; | 232 | bool mSetTimeToDayStartAt; |
237 | bool mHighlightCurrentDay; | 233 | bool mHighlightCurrentDay; |
238 | bool mUseHighlightLightColor; | 234 | bool mUseHighlightLightColor; |
239 | bool mListViewMonthTimespan; | 235 | bool mListViewMonthTimespan; |
240 | bool mWNViewShowsParents; | 236 | bool mWNViewShowsParents; |
241 | bool mWNViewShowLocation; | 237 | bool mWNViewShowLocation; |
242 | bool mTodoViewShowsPercentage; | 238 | bool mTodoViewShowsPercentage; |
243 | bool mTodoViewUsesCatColors; | 239 | bool mTodoViewUsesCatColors; |
244 | bool mTodoViewUsesSmallFont; | 240 | bool mTodoViewUsesSmallFont; |
245 | bool mTodoViewUsesForegroundColor; | 241 | bool mTodoViewUsesForegroundColor; |
246 | bool mMonthViewUsesForegroundColor; | 242 | bool mMonthViewUsesForegroundColor; |
247 | 243 | ||
248 | bool mHightlightDateTimeEdit; | 244 | bool mHightlightDateTimeEdit; |
249 | bool mShortDateInViewer; | 245 | bool mShortDateInViewer; |
250 | 246 | ||
251 | QStringList mLocationDefaults; | 247 | QStringList mLocationDefaults; |
252 | QStringList mEventSummaryUser; | 248 | QStringList mEventSummaryUser; |
253 | QStringList mTodoSummaryUser; | 249 | QStringList mTodoSummaryUser; |
254 | 250 | ||
255 | bool mUseInternalAlarmNotification; | 251 | bool mUseInternalAlarmNotification; |
256 | int mAlarmPlayBeeps; | 252 | int mAlarmPlayBeeps; |
257 | int mAlarmSuspendTime; | 253 | int mAlarmSuspendTime; |
258 | int mAlarmSuspendCount; | 254 | int mAlarmSuspendCount; |
259 | int mAlarmBeepInterval; | 255 | int mAlarmBeepInterval; |
260 | 256 | ||
261 | 257 | ||
262 | QString mActiveSyncPort; | 258 | QString mActiveSyncPort; |
263 | QString mActiveSyncIP; | 259 | QString mActiveSyncIP; |
264 | 260 | ||
265 | 261 | ||
266 | //US I copied the following settings into KPimGlobalPrefs | 262 | //US I copied the following settings into KPimGlobalPrefs |
267 | // that allows us later to easily remove the settings from here. | 263 | // that allows us later to easily remove the settings from here. |
268 | int mPreferredDate; | 264 | int mPreferredDate; |
269 | QString mUserDateFormatLong; | 265 | QString mUserDateFormatLong; |
270 | QString mUserDateFormatShort; | 266 | QString mUserDateFormatShort; |
271 | int mPreferredLanguage; | 267 | int mPreferredLanguage; |
272 | int mPreferredTime; | 268 | int mPreferredTime; |
273 | bool mWeekStartsOnSunday; | 269 | bool mWeekStartsOnSunday; |
274 | QString mTimeZoneId; | ||
275 | bool mUseDaylightsaving; | ||
276 | int mDaylightsavingStart; | ||
277 | int mDaylightsavingEnd; | ||
278 | |||
279 | 270 | ||
280 | private: | 271 | private: |
281 | QDict<QColor> mCategoryColors; | 272 | QDict<QColor> mCategoryColors; |
282 | QColor mDefaultCategoryColor; | 273 | QColor mDefaultCategoryColor; |
283 | 274 | ||
284 | QFont mDefaultTimeBarFont; | 275 | QFont mDefaultTimeBarFont; |
285 | QFont mDefaultViewFont; | 276 | QFont mDefaultViewFont; |
286 | QFont mDefaultMonthViewFont; | 277 | QFont mDefaultMonthViewFont; |
287 | 278 | ||
288 | QString mName; | 279 | QString mName; |
289 | QString mEmail; | 280 | QString mEmail; |
290 | }; | 281 | }; |
291 | 282 | ||
292 | #endif | 283 | #endif |