-rw-r--r-- | libkcal/calendar.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 4a3223c..06a911c 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h | |||
@@ -21,96 +21,97 @@ | |||
21 | 21 | ||
22 | #ifndef CALENDAR_H | 22 | #ifndef CALENDAR_H |
23 | #define CALENDAR_H | 23 | #define CALENDAR_H |
24 | 24 | ||
25 | #include <qobject.h> | 25 | #include <qobject.h> |
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | #include <qdatetime.h> | 27 | #include <qdatetime.h> |
28 | #include <qptrlist.h> | 28 | #include <qptrlist.h> |
29 | #include <qdict.h> | 29 | #include <qdict.h> |
30 | 30 | ||
31 | #include "customproperties.h" | 31 | #include "customproperties.h" |
32 | #include "event.h" | 32 | #include "event.h" |
33 | #include "todo.h" | 33 | #include "todo.h" |
34 | #include "journal.h" | 34 | #include "journal.h" |
35 | 35 | ||
36 | #define _TIME_ZONE "-0500" /* hardcoded, overridden in config file. */ | 36 | #define _TIME_ZONE "-0500" /* hardcoded, overridden in config file. */ |
37 | 37 | ||
38 | class KConfig; | 38 | class KConfig; |
39 | 39 | ||
40 | namespace KCal { | 40 | namespace KCal { |
41 | 41 | ||
42 | class CalFilter; | 42 | class CalFilter; |
43 | 43 | ||
44 | /** | 44 | /** |
45 | This is the main "calendar" object class for KOrganizer. It holds | 45 | This is the main "calendar" object class for KOrganizer. It holds |
46 | information like all appointments/events, user information, etc. etc. | 46 | information like all appointments/events, user information, etc. etc. |
47 | one calendar is associated with each CalendarView (@see calendarview.h). | 47 | one calendar is associated with each CalendarView (@see calendarview.h). |
48 | This is an abstract base class defining the interface to a calendar. It is | 48 | This is an abstract base class defining the interface to a calendar. It is |
49 | implemented by subclasses like @see CalendarLocal, which use different | 49 | implemented by subclasses like @see CalendarLocal, which use different |
50 | methods to store and access the data. | 50 | methods to store and access the data. |
51 | 51 | ||
52 | Ownership of events etc. is handled by the following policy: As soon as an | 52 | Ownership of events etc. is handled by the following policy: As soon as an |
53 | event (or any other subclass of IncidenceBase) object is added to the | 53 | event (or any other subclass of IncidenceBase) object is added to the |
54 | Calendar by addEvent() it is owned by the Calendar object. The Calendar takes | 54 | Calendar by addEvent() it is owned by the Calendar object. The Calendar takes |
55 | care of deleting it. All Events returned by the query functions are returned | 55 | care of deleting it. All Events returned by the query functions are returned |
56 | as pointers, that means all changes to the returned events are immediately | 56 | as pointers, that means all changes to the returned events are immediately |
57 | visible in the Calendar. You shouldn't delete any Event object you get from | 57 | visible in the Calendar. You shouldn't delete any Event object you get from |
58 | Calendar. | 58 | Calendar. |
59 | */ | 59 | */ |
60 | class Calendar : public QObject, public CustomProperties, | 60 | class Calendar : public QObject, public CustomProperties, |
61 | public IncidenceBase::Observer | 61 | public IncidenceBase::Observer |
62 | { | 62 | { |
63 | Q_OBJECT | 63 | Q_OBJECT |
64 | public: | 64 | public: |
65 | Calendar(); | 65 | Calendar(); |
66 | Calendar(const QString &timeZoneId); | 66 | Calendar(const QString &timeZoneId); |
67 | virtual ~Calendar(); | 67 | virtual ~Calendar(); |
68 | void deleteIncidence(Incidence *in); | 68 | void deleteIncidence(Incidence *in); |
69 | void resetTempSyncStat(); | ||
69 | /** | 70 | /** |
70 | Clears out the current calendar, freeing all used memory etc. | 71 | Clears out the current calendar, freeing all used memory etc. |
71 | */ | 72 | */ |
72 | virtual void close() = 0; | 73 | virtual void close() = 0; |
73 | 74 | ||
74 | /** | 75 | /** |
75 | Sync changes in memory to persistant storage. | 76 | Sync changes in memory to persistant storage. |
76 | */ | 77 | */ |
77 | virtual void save() = 0; | 78 | virtual void save() = 0; |
78 | virtual QPtrList<Event> getExternLastSyncEvents() = 0; | 79 | virtual QPtrList<Event> getExternLastSyncEvents() = 0; |
79 | virtual bool isSaving() { return false; } | 80 | virtual bool isSaving() { return false; } |
80 | 81 | ||
81 | /** | 82 | /** |
82 | Return the owner of the calendar's full name. | 83 | Return the owner of the calendar's full name. |
83 | */ | 84 | */ |
84 | const QString &getOwner() const; | 85 | const QString &getOwner() const; |
85 | /** | 86 | /** |
86 | Set the owner of the calendar. Should be owner's full name. | 87 | Set the owner of the calendar. Should be owner's full name. |
87 | */ | 88 | */ |
88 | void setOwner( const QString &os ); | 89 | void setOwner( const QString &os ); |
89 | /** | 90 | /** |
90 | Return the email address of the calendar owner. | 91 | Return the email address of the calendar owner. |
91 | */ | 92 | */ |
92 | const QString &getEmail(); | 93 | const QString &getEmail(); |
93 | /** | 94 | /** |
94 | Set the email address of the calendar owner. | 95 | Set the email address of the calendar owner. |
95 | */ | 96 | */ |
96 | void setEmail( const QString & ); | 97 | void setEmail( const QString & ); |
97 | 98 | ||
98 | /** | 99 | /** |
99 | Set time zone from a timezone string (e.g. -2:00) | 100 | Set time zone from a timezone string (e.g. -2:00) |
100 | */ | 101 | */ |
101 | void setTimeZone( const QString &tz ); | 102 | void setTimeZone( const QString &tz ); |
102 | /** | 103 | /** |
103 | Set time zone from a minutes value (e.g. -60) | 104 | Set time zone from a minutes value (e.g. -60) |
104 | */ | 105 | */ |
105 | void setTimeZone( int tz ); | 106 | void setTimeZone( int tz ); |
106 | /** | 107 | /** |
107 | Return time zone as offest in minutes. | 108 | Return time zone as offest in minutes. |
108 | */ | 109 | */ |
109 | int getTimeZone() const; | 110 | int getTimeZone() const; |
110 | /** | 111 | /** |
111 | Compute an ISO 8601 format string from the time zone. | 112 | Compute an ISO 8601 format string from the time zone. |
112 | */ | 113 | */ |
113 | QString getTimeZoneStr() const; | 114 | QString getTimeZoneStr() const; |
114 | /** | 115 | /** |
115 | Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal | 116 | Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal |
116 | values). | 117 | values). |