Event Class Reference
The Event class holds the data of a calendar event. More...
#include <event.h>
Inheritance diagram for Event:


Public Types | |
| enum | RepeatType { NoRepeat = -1, Daily, Weekly, MonthlyDay, MonthlyDate, Yearly } |
| enum | Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08, FRI = 0x10, SAT = 0x20, SUN = 0x40 } |
| enum | Type { Normal, AllDay } |
| enum | SoundTypeChoice { Silent, Loud } |
Public Member Functions | |
| Event () | |
| Event (const QMap< int, QString > &map) | |
| virtual | ~Event () |
| QMap< int, QString > | toMap () const |
| bool | operator< (const Event &e1) const |
| bool | operator<= (const Event &e1) const |
| bool | operator!= (const Event &e1) const |
| bool | operator> (const Event &e1) const |
| bool | operator>= (const Event &e1) const |
| bool | operator== (const Event &e) const |
| void | setDescription (const QString &s) |
| const QString & | description () const |
| void | setLocation (const QString &s) |
| const QString & | location () const |
| void | setNotes (const QString &n) |
| const QString & | notes () const |
| void | setType (Type t) |
| Type | type () const |
| void | setAllDay (bool) |
| bool | isAllDay () const |
| void | setStart (const QDateTime &d) |
| void | setStart (time_t time) |
| QDateTime | start (bool actual=FALSE) const |
| time_t | startTime () const |
| void | setEnd (const QDateTime &e) |
| void | setEnd (time_t time) |
| QDateTime | end (bool actual=FALSE) const |
| time_t | endTime () const |
| void | setTimeZone (const QString &) |
| const QString & | timeZone () const |
| void | setAlarm (int minutes, SoundTypeChoice) |
| void | clearAlarm () |
| void | setAlarm (bool b, int minutes, SoundTypeChoice) |
| bool | hasAlarm () const |
| int | alarmDelay () const |
| int | alarmTime () const |
| SoundTypeChoice | alarmSound () const |
| RepeatType | repeatType () const |
| int | frequency () const |
| int | weekOffset () const |
| QDate | repeatTill () const |
| bool | repeatForever () const |
| bool | repeatOnWeekDay (int day) const |
| void | setRepeatType (RepeatType) |
| void | setFrequency (int) |
| void | setRepeatTill (const QDate &) |
| void | setRepeatForever (bool) |
| void | setRepeatOnWeekDay (int day, bool enable) |
| void | setRepeat (bool b, const RepeatPattern &p) |
| void | setRepeat (const RepeatPattern &p) |
| bool | hasRepeat () const |
| const RepeatPattern & | repeatPattern () const |
| RepeatPattern & | repeatPattern () |
| bool | doRepeat () const |
| void | save (QString &buf) |
| bool | match (const QRegExp &r) const |
Static Public Member Functions | |
| void | writeVCalendar (const QString &filename, const QValueList< Event > &events) |
| void | writeVCalendar (const QString &filename, const Event &event) |
| QValueList< Event > | readVCalendar (const QString &filename) |
| int | week (const QDate &date) |
| int | occurrence (const QDate &date) |
| char | day (int dayOfWeek) |
| int | dayOfWeek (char day) |
| int | monthDiff (const QDate &first, const QDate &second) |
Detailed Description
The Event class holds the data of a calendar event.This data includes descriptive data of the event and schedualing information.
Definition at line 41 of file event.h.
Member Enumeration Documentation
|
|
This enum defines how a event will repeat, if at all.
Definition at line 44 of file event.h. Referenced by repeatType(). |
|
|
This enum type defines what kind of sound is made when an alarm occurs for an event. The currently defined types are:
Definition at line 80 of file event.h. Referenced by alarmSound(). |
Constructor & Destructor Documentation
|
|
Creates a new, empty event. Definition at line 323 of file event.cpp. References Event::RepeatPattern::frequency, and Event::RepeatPattern::type. |
|
|
Destroys an event. |
Member Function Documentation
|
||||||||||||
|
Writes the list of events as a set of VCards to the file filename. Definition at line 1250 of file event.cpp. References QValueList::begin(), QValueList::end(), and QString::utf8(). |
|
||||||||||||
|
Writes event as a VCard to the file filename. Definition at line 1278 of file event.cpp. References QString::utf8(). |
|
|
Returns the set of events read as VCards from the file filename. Definition at line 1302 of file event.cpp. References QValueList::append(), and QString::utf8(). |
|
|
Sets the description of the event to s. |
|
|
Returns the description of the event. Definition at line 563 of file event.cpp. Referenced by EffectiveEvent::description(). |
|
|
Sets the location of the event to s. |
|
|
Returns the location of the event. |
|
|
Sets the notes for the event to n. |
|
|
Returns the notes for the event. |
|
|
If allday is TRUE, will set the event to be an all day event. Otherwise sets the event to not be an all day event.
|
|
|
Returns TRUE if the event is an all day event. Otherwise returns FALSE. |
|
|
Sets the start date and time of the first or only occurance of this event to the date and time d. d should be in local time. |
|
|
Returns the start date and time of the first occurance of the event. Definition at line 596 of file event.cpp. References QDateTime::setTime(), and QDateTime::time(). Referenced by weekOffset(). |
|
|
Sets the end date and time of the first or only occurance of this event to the date and time d. d should be in local time. |
|
|
Returns the end date and time of the first occurance of the event. Definition at line 615 of file event.cpp. References QDateTime::setTime(). Referenced by setRepeatForever(). |
|
||||||||||||
|
Sets the alarm delay of the event to delay and the sound type of the alarm to s. Definition at line 250 of file event.h. Referenced by clearAlarm(). |
|
|
Clears the alarm for the event. Definition at line 255 of file event.h. References setAlarm(). |
|
|
Returns the delay in minutes between the alarm for an event and the start of the event. |
|
|
Returns the sound type for the alarm of this event. Definition at line 651 of file event.cpp. References SoundTypeChoice. |
|
|
Returns the repeat pattern type for the event.
Definition at line 278 of file event.h. References RepeatType, and Event::RepeatPattern::type. |
|
|
Returns how often the event repeats.
Definition at line 283 of file event.h. References Event::RepeatPattern::frequency. |
|
|
Returns the number of weeks from the start of the month that this event occurs. Definition at line 288 of file event.h. References QDateTime::date(), and start(). |
|
|
Returns the date that the event will continue to repeat until. If the event repeats forever the value returned is undefined.
Definition at line 295 of file event.h. References Event::RepeatPattern::endDate(). |
|
|
Returns FALSE if there is a date set for the event to continue until. Otherwise returns TRUE. Definition at line 300 of file event.h. References Event::RepeatPattern::hasEndDate. |
|
|
Returns TRUE if the event has a RepeatType of Weekly and is set to occur on day each week. Otherwise returns FALSE.
Definition at line 330 of file event.h. References Event::RepeatPattern::days, and Event::RepeatPattern::type. Referenced by setRepeatOnWeekDay(). |
|
|
Sets the repeat pattern type of the event to t.
Definition at line 305 of file event.h. References Event::RepeatPattern::type. |
|
|
Sets how often the event occurs with in its repeat pattern.
Definition at line 310 of file event.h. References Event::RepeatPattern::frequency. |
|
|
Sets the event to repeat until d. Definition at line 315 of file event.h. References Event::RepeatPattern::hasEndDate, and Event::RepeatPattern::setEndDate(). |
|
|
If enable is TRUE, sets the event to repeat forever. Otherwise sets the event to stop repeating at some date.
Definition at line 321 of file event.h. References end(), Event::RepeatPattern::hasEndDate, and Event::RepeatPattern::setEndDate(). |
|
||||||||||||
|
If enable is TRUE then sets the event to occur on day each week. Otherwise sets the event not to occur on day.
Definition at line 337 of file event.h. References Event::RepeatPattern::days, and repeatOnWeekDay(). |
|
|
Returns TRUE if the event matches the regular expression r. Otherwise returns FALSE. Reimplemented from Qtopia::Record. Definition at line 1331 of file event.cpp. References Event::RepeatPattern::endDateUTC, QString::find(), and Event::RepeatPattern::hasEndDate. |
The documentation for this class was generated from the following files:
