21 #ifndef ALARMCALENDAR_H
22 #define ALARMCALENDAR_H
26 #include <libkcal/calendarlocal.h>
42 bool valid() const { return mUrl.isValid(); }
52 KCal::Event::List events();
53 KCal::Event::List eventsWithAlarms( const TQDateTime& from, const TQDateTime& to);
55 void updateEvent( const KAEvent&);
56 bool deleteEvent( const TQString& eventID, bool save = false);
57 void emitEmptyStatus();
58 void purgeAll() { purge(0); }
59 void setPurgeDays( int days);
61 bool isOpen() const { return mOpen; }
62 TQString path() const { return mUrl.prettyURL(); }
63 TQString urlString() const { return mUrl.url(); }
65 static TQString icalProductId();
66 static bool initialiseCalendars();
67 static void terminateCalendars();
68 static AlarmCalendar* activeCalendar() { return mCalendars[ACTIVE]; }
69 static AlarmCalendar* expiredCalendar() { return mCalendars[EXPIRED]; }
70 static AlarmCalendar* displayCalendar() { return mCalendars[DISPLAY]; }
71 static AlarmCalendar* templateCalendar() { return mCalendars[TEMPLATE]; }
72 static AlarmCalendar* activeCalendarOpen() { return calendarOpen(ACTIVE); }
73 static AlarmCalendar* expiredCalendarOpen() { return calendarOpen(EXPIRED); }
74 static AlarmCalendar* displayCalendarOpen() { return calendarOpen(DISPLAY); }
75 static AlarmCalendar* templateCalendarOpen() { return calendarOpen(TEMPLATE); }
76 static bool importAlarms(TQWidget*);
77 static const KCal::Event* getEvent( const TQString& uniqueID);
79 enum CalID { ACTIVE, EXPIRED, DISPLAY, TEMPLATE, NCALS };
84 void emptyStatus( bool empty);
90 AlarmCalendar( const TQString& file, CalID, const TQString& icalFile = TQString(),
91 const TQString& configKey = TQString());
93 bool saveCal( const TQString& newFile = TQString());
94 void purge( int daysToKeep);
95 void startPurgeTimer();
96 static AlarmCalendar* createCalendar(CalID, TDEConfig*, TQString& writePath, const TQString& configKey = TQString());
109 int mPurgeDaysQueued;
represents calendar alarms and events
Provides read and write access to calendar files.
KAEvent corresponds to a KCal::Event instance.
Status The category of an event, indicated by the middle part of its UID.
|