summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefs.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /korganizer/koprefs.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'korganizer/koprefs.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koprefs.h299
1 files changed, 299 insertions, 0 deletions
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
new file mode 100644
index 0000000..fe044e6
--- a/dev/null
+++ b/korganizer/koprefs.h
@@ -0,0 +1,299 @@
1/*
2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4
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
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
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
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution.
22*/
23#ifndef KOPREFS_H
24#define KOPREFS_H
25
26#include <qdict.h>
27
28#include <libkdepim/kpimprefs.h>
29
30class KConfig;
31class QFont;
32class QColor;
33class QStringList;
34
35class KOPrefs : public KPimPrefs
36{
37 public:
38 enum { FormatVCalendar, FormatICalendar };
39 enum { MailClientKMail, MailClientSendmail };
40 enum { IMIPDummy, IMIPKMail };
41 enum { IMIPOutbox, IMIPdirectsend };
42 enum { neverAuto, addressbookAuto, selectedAuto };
43 enum { standardDestination, askDestination };
44
45 virtual ~KOPrefs();
46
47 /** Get instance of KOPrefs. It is made sure that there is only one
48 instance. */
49 static KOPrefs *instance();
50
51 /** Set preferences to default values */
52 void usrSetDefaults();
53
54 /** Read preferences from config file */
55 void usrReadConfig();
56
57 /** Write preferences to config file */
58 void usrWriteConfig();
59 void setCategoryDefaults();
60
61 protected:
62 void setTimeZoneIdDefault();
63
64 /** Fill empty mail fields with default values. */
65 void fillMailDefaults();
66
67 private:
68 /** Constructor disabled for public. Use instance() to create a KOPrefs
69 object. */
70 KOPrefs();
71
72 static KOPrefs *mInstance;
73 QDict<QString> *mLocaleDict;
74 QStringList getDefaultList();
75 public:
76 // preferences data
77 KConfig* getConfig();
78 void setFullName(const QString &);
79 QString fullName();
80 void setEmail(const QString &);
81 QString email();
82
83 QString mAdditional;
84
85 bool mEmailControlCenter;
86
87 bool mBcc;
88 bool mAutoSave;
89 int mAutoSaveInterval;
90 bool mConfirm;
91
92 bool mEnableGroupScheduling;
93 bool mEnableProjectView;
94
95 int mDefaultFormat;
96 int mMailClient;
97
98 QString mTimeZone;
99 QString mTimeZoneId;
100 //QString mTimeZoneName; // e.g. +00:04:00 Indian/Mauritius
101 //int mTimeZoneOffset; // e.g. -240 min
102 bool mUseDaylightsaving;
103 int mDaylightsavingStart;
104 int mDaylightsavingEnd;
105 int mStartTime;
106 int mDefaultDuration;
107 int mAlarmTime;
108 int mDaylightSavings;
109
110 int mWorkingHoursStart;
111 int mWorkingHoursEnd;
112 bool mExcludeHolidays;
113 bool mExcludeSaturdays;
114 bool mMarcusBainsShowSeconds;
115
116 QFont mTimeBarFont;
117 QFont mMonthViewFont;
118 QFont mAgendaViewFont;
119 QFont mMarcusBainsFont;
120 QFont mTimeLabelsFont;
121 QFont mTodoViewFont;
122 QFont mListViewFont;
123 QFont mDateNavigatorFont;
124 QFont mEditBoxFont;
125 QFont mJornalViewFont;
126 QFont mWhatsNextFont;
127 QFont mEventViewFont;
128
129
130
131
132 QColor mHolidayColor;
133 QColor mHighlightColor;
134 QColor mEventColor;
135 QColor mAgendaBgColor;
136 QColor mWorkingHoursColor;
137 QColor mTodoDueTodayColor;
138 QColor mTodoOverdueColor;
139 QColor mMonthViewEvenColor;
140 QColor mMonthViewOddColor;
141 QColor mMonthViewHolidayColor;
142 bool mMonthViewUsesDayColors;
143 bool mMonthViewSatSunTog;
144 QColor mAppColor1;
145 QColor mAppColor2;
146 bool mUseAppColors;
147
148 int mDayBegins;
149 int mHourSize;
150 int mAllDaySize;
151 bool mShowFullMenu;
152 bool mDailyRecur;
153 bool mWeeklyRecur;
154 bool mMonthDailyRecur;
155 bool mMonthWeeklyRecur;
156 bool mMonthShowIcons;
157 bool mMonthShowShort;
158 bool mEnableToolTips;
159 bool mEnableMonthScroll;
160 bool mFullViewMonth;
161 bool mMonthViewUsesCategoryColor;
162 bool mFullViewTodo;
163 bool mShowCompletedTodo;
164 bool mMarcusBainsEnabled;
165 int mNextXDays;
166 int mWhatsNextDays;
167 int mWhatsNextPrios;
168 bool mEnableQuickTodo;
169 bool mLanguageChanged;
170
171 bool mCompactDialogs;
172 bool mVerticalScreen;
173
174 bool mShowIconNewTodo;
175 bool mShowIconNewEvent;
176 bool mShowIconSearch;
177 bool mShowIconList;
178 bool mShowIconDay1;
179 bool mShowIconDay5;
180 bool mShowIconDay7;
181 bool mShowIconMonth;
182 bool mShowIconTodoview;
183 bool mShowIconBackFast;
184 bool mShowIconBack;
185 bool mShowIconToday;
186 bool mShowIconForward;
187 bool mShowIconForwardFast;
188 bool mShowIconWhatsThis;
189 bool mShowIconNextDays;
190 bool mShowIconNext;
191 bool mShowIconJournal;
192
193 bool mShowIconStretch;
194
195 bool mToolBarHor;
196 bool mToolBarUp;
197 bool mToolBarMiniIcons;
198
199 bool mAskForQuit;
200 bool mUsePassWd;
201 bool mWriteBackFile;
202 bool mAskForPreferences;
203 bool mShowSyncSummary;
204 bool mShowSyncEvents;
205 bool mShowTodoInAgenda;
206 bool mWriteBackExistingOnly;
207
208 QString mRemoteIP;
209 QString mRemoteUser;
210 QString mRemotePassWd;
211 QString mRemoteFile;
212 QString mLocalTempFile;
213
214 int mLastSyncTime;
215 int mSyncAlgoPrefs;
216 int mRingSyncAlgoPrefs;
217 QStringList mSyncProfileNames;
218 QString mLocalMachineName;
219 void setCategoryColor(QString cat,const QColor & color);
220 QColor *categoryColor(QString cat);
221
222 QString mArchiveFile;
223 QString mHtmlExportFile;
224 bool mHtmlWithSave;
225
226 QStringList mSelectedPlugins;
227
228 QString mLastImportFile;
229 QString mLastVcalFile;
230 QString mLastSaveFile;
231 QString mLastLoadFile;
232 QString mLastSyncedLocalFile;
233
234
235 QString mDefaultAlarmFile;
236 int mIMIPScheduler;
237 int mIMIPSend;
238 QStringList mAdditionalMails;
239 int mIMIPAutoRefresh;
240 int mIMIPAutoInsertReply;
241 int mIMIPAutoInsertRequest;
242 int mIMIPAutoFreeBusy;
243 int mIMIPAutoFreeBusyReply;
244
245 QStringList mTodoTemplates;
246 QStringList mEventTemplates;
247
248 int mDestination;
249
250
251 bool mEditOnDoubleClick;
252 bool mViewChangeHoldFullscreen;
253 bool mViewChangeHoldNonFullscreen;
254 bool mCenterOnCurrentTime;
255 bool mSetTimeToDayStartAt;
256 bool mHighlightCurrentDay;
257 bool mUseHighlightLightColor;
258 bool mListViewMonthTimespan;
259 bool mWNViewShowsParents;
260 bool mWNViewShowLocation;
261 bool mTodoViewShowsPercentage;
262 bool mTodoViewUsesCatColors;
263 bool mTodoViewUsesSmallFont;
264 bool mTodoViewUsesForegroundColor;
265 bool mMonthViewUsesForegroundColor;
266
267 bool mHightlightDateTimeEdit;
268 int mPreferredLanguage;
269 bool mUseQuicksave;
270 int mPreferredTime;
271 int mPreferredDate;
272 bool mWeekStartsOnSunday;
273 bool mShortDateInViewer;
274 QString mUserDateFormatLong;
275 QString mUserDateFormatShort;
276
277 QStringList mLocationDefaults;
278 QStringList mEventSummaryUser;
279 QStringList mTodoSummaryUser;
280
281 bool mUseInternalAlarmNotification;
282 int mAlarmPlayBeeps;
283 int mAlarmSuspendTime;
284 int mAlarmSuspendCount;
285 int mAlarmBeepInterval;
286
287 private:
288 QDict<QColor> mCategoryColors;
289 QColor mDefaultCategoryColor;
290
291 QFont mDefaultTimeBarFont;
292 QFont mDefaultViewFont;
293 QFont mDefaultMonthViewFont;
294
295 QString mName;
296 QString mEmail;
297};
298
299#endif