-rw-r--r-- | korganizer/koprefs.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 864cf1b..7d71cbd 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -21,31 +21,56 @@ | |||
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 | 26 | ||
27 | #include <libkdepim/kpimprefs.h> | 27 | #include <libkdepim/kpimprefs.h> |
28 | #include <qdict.h> | 28 | #include <qdict.h> |
29 | #include <qdir.h> | ||
30 | #include <qobject.h> | ||
29 | 31 | ||
30 | class KConfig; | 32 | class KConfig; |
31 | class QFont; | 33 | class QFont; |
32 | class QColor; | 34 | class QColor; |
33 | class QStringList; | 35 | class QStringList; |
34 | 36 | ||
35 | #define VIEW_WN_VIEW 1 | 37 | #define VIEW_WN_VIEW 1 |
36 | #define VIEW_NX_VIEW 2 | 38 | #define VIEW_NX_VIEW 2 |
37 | #define VIEW_J_VIEW 3 | 39 | #define VIEW_J_VIEW 3 |
38 | #define VIEW_A_VIEW 4 | 40 | #define VIEW_A_VIEW 4 |
39 | #define VIEW_ML_VIEW 5 | 41 | #define VIEW_ML_VIEW 5 |
40 | #define VIEW_M_VIEW 6 | 42 | #define VIEW_M_VIEW 6 |
41 | #define VIEW_L_VIEW 7 | 43 | #define VIEW_L_VIEW 7 |
42 | #define VIEW_T_VIEW 8 | 44 | #define VIEW_T_VIEW 8 |
43 | 45 | ||
46 | class KopiCalendarFile : public QObject | ||
47 | { | ||
48 | public: | ||
49 | KopiCalendarFile( ) : QObject( ) | ||
50 | { | ||
51 | isStandard = false; | ||
52 | isEnabled = true; | ||
53 | isAlarmEnabled = true; | ||
54 | isReadOnly = false; | ||
55 | mName = "Calendar"; | ||
56 | mFileName = QDir::homeDirPath() + "/icalfile.ics"; | ||
57 | mCalNumber = 0; | ||
58 | mDefaultColor = Qt::red; | ||
59 | } | ||
60 | bool isStandard; | ||
61 | bool isEnabled; | ||
62 | bool isAlarmEnabled; | ||
63 | bool isReadOnly; | ||
64 | QString mName; | ||
65 | QString mFileName; | ||
66 | int mCalNumber; | ||
67 | QColor mDefaultColor; | ||
68 | }; | ||
44 | class KOPrefs : public KPimPrefs | 69 | class KOPrefs : public KPimPrefs |
45 | { | 70 | { |
46 | public: | 71 | public: |
47 | enum { FormatVCalendar, FormatICalendar }; | 72 | enum { FormatVCalendar, FormatICalendar }; |
48 | enum { MailClientKMail, MailClientSendmail }; | 73 | enum { MailClientKMail, MailClientSendmail }; |
49 | enum { IMIPDummy, IMIPKMail }; | 74 | enum { IMIPDummy, IMIPKMail }; |
50 | enum { IMIPOutbox, IMIPdirectsend }; | 75 | enum { IMIPOutbox, IMIPdirectsend }; |
51 | enum { neverAuto, addressbookAuto, selectedAuto }; | 76 | enum { neverAuto, addressbookAuto, selectedAuto }; |
@@ -62,17 +87,19 @@ class KOPrefs : public KPimPrefs | |||
62 | 87 | ||
63 | /** Read preferences from config file */ | 88 | /** Read preferences from config file */ |
64 | void usrReadConfig(); | 89 | void usrReadConfig(); |
65 | 90 | ||
66 | /** Write preferences to config file */ | 91 | /** Write preferences to config file */ |
67 | void usrWriteConfig(); | 92 | void usrWriteConfig(); |
68 | void setCategoryDefaults(); | 93 | void setCategoryDefaults(); |
69 | void setAllDefaults(); | 94 | void setAllDefaults(); |
70 | 95 | KopiCalendarFile * getNewCalendar(); | |
96 | void deleteCalendar( int ); | ||
97 | QColor defaultColor( int ) const; | ||
71 | protected: | 98 | protected: |
72 | void setTimeZoneIdDefault(); | 99 | void setTimeZoneIdDefault(); |
73 | 100 | ||
74 | /** Fill empty mail fields with default values. */ | 101 | /** Fill empty mail fields with default values. */ |
75 | void fillMailDefaults(); | 102 | void fillMailDefaults(); |
76 | 103 | ||
77 | private: | 104 | private: |
78 | /** Constructor disabled for public. Use instance() to create a KOPrefs | 105 | /** Constructor disabled for public. Use instance() to create a KOPrefs |
@@ -300,19 +327,22 @@ class KOPrefs : public KPimPrefs | |||
300 | bool mEVshowDetails; | 327 | bool mEVshowDetails; |
301 | bool mEVshowCreated; | 328 | bool mEVshowCreated; |
302 | bool mEVshowChanged; | 329 | bool mEVshowChanged; |
303 | bool mWTshowDetails; | 330 | bool mWTshowDetails; |
304 | bool mWTshowCreated; | 331 | bool mWTshowCreated; |
305 | bool mWTshowChanged; | 332 | bool mWTshowChanged; |
306 | 333 | ||
307 | int mCurrentDisplayedView; | 334 | int mCurrentDisplayedView; |
335 | QPtrList<KopiCalendarFile> mCalendars; | ||
336 | int mNextAvailableCalendar; | ||
308 | 337 | ||
309 | private: | 338 | private: |
310 | QDict<QColor> mCategoryColors; | 339 | QDict<QColor> mCategoryColors; |
340 | QArray<KopiCalendarFile*> mDefCalColors; | ||
311 | QColor mDefaultCategoryColor; | 341 | QColor mDefaultCategoryColor; |
312 | 342 | ||
313 | QFont mDefaultTimeBarFont; | 343 | QFont mDefaultTimeBarFont; |
314 | QFont mDefaultViewFont; | 344 | QFont mDefaultViewFont; |
315 | QFont mDefaultMonthViewFont; | 345 | QFont mDefaultMonthViewFont; |
316 | 346 | ||
317 | QString mName; | 347 | QString mName; |
318 | QString mEmail; | 348 | QString mEmail; |