#include </home/clem/local/src/opie/library/backend/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 | |
| static void | writeVCalendar (const QString &filename, const QValueList< Event > &events) |
| static void | writeVCalendar (const QString &filename, const Event &event) |
| static QValueList< Event > | readVCalendar (const QString &filename) |
| static int | week (const QDate &date) |
| static int | occurrence (const QDate &date) |
| static char | day (int dayOfWeek) |
| static int | dayOfWeek (char day) |
| static int | monthDiff (const QDate &first, const QDate &second) |
Private Member Functions | |
| Qtopia::UidGen & | uidGen () |
Private Attributes | |
| QString | descript |
| QString | locat |
| QString | categ |
| Type | typ: 4 |
| bool | startTimeDirty: 1 |
| bool | endTimeDirty: 1 |
| time_t | startUTC |
| time_t | endUTC |
| QString | tz |
| bool | hAlarm |
| bool | hRepeat |
| int | aMinutes |
| SoundTypeChoice | aSound |
| RepeatPattern | pattern |
| QString | note |
| int | mRid |
| int | mRinfo |
| EventPrivate * | d |
Static Private Attributes | |
| static Qtopia::UidGen | sUidGen |
Classes | |
| struct | RepeatPattern |
This data includes descriptive data of the event and schedualing information.
Definition at line 41 of file event.h.
|
|
For internal use only.
|
|
|
This enum defines how a event will repeat, if at all.
|
|
|
This enum type defines what kind of sound is made when an alarm occurs for an event. The currently defined types are:
|
|
|
For internal use only.
|
|
|
Creates a new, empty event. Definition at line 323 of file event.cpp. References aMinutes, aSound, endUTC, FALSE, Event::RepeatPattern::frequency, hAlarm, hRepeat, NoRepeat, Normal, pattern, Silent, startUTC, typ, and Event::RepeatPattern::type. |
|
|
|
Destroys an event. |
|
|
Returns the delay in minutes between the alarm for an event and the start of the event. Definition at line 260 of file event.h. References alarmTime(). |
|
|
Returns the sound type for the alarm of this event. Definition at line 651 of file event.cpp. References aSound. Referenced by createVObject(), DateEntry::DateEntry(), and toMap(). |
|
|
For internal use only.
Definition at line 643 of file event.cpp. References aMinutes. Referenced by alarmDelay(), createVObject(), DateEntry::DateEntry(), nextAlarm(), and toMap(). |
|
|
Clears the alarm for the event. Definition at line 255 of file event.h. References FALSE, setAlarm(), and Silent. |
|
|
For internal use only.
Definition at line 157 of file event.h. Referenced by DateBookDB::loadFile(), and weekOffset(). |
|
|
For internal use only.
|
|
|
Returns the description of the event. Definition at line 563 of file event.cpp. References descript. Referenced by createVObject(), DateEntry::DateEntry(), EffectiveEvent::description(), DatebookEventDesc::disp_event(), DateBook::editEvent(), DateBook::removeEvent(), and toMap(). |
|
|
For internal use only.
Definition at line 142 of file event.h. Referenced by hasRepeat(), and match(). |
|
|
Returns the end date and time of the first occurance of the event. Definition at line 615 of file event.cpp. References AllDay, endUTC, TimeConversion::fromUTC(), QDateTime::setTime(), and typ. Referenced by DateBook::checkEvent(), createVObject(), DateEntry::DateEntry(), EffectiveEvent::EffectiveEvent(), EffectiveEvent::endDate(), setRepeatForever(), and toMap(). |
|
|
For internal use only.
|
|
|
Returns how often the event repeats.
Definition at line 283 of file event.h. References repeatPattern(). Referenced by toMap(). |
|
|
For internal use only.
Definition at line 635 of file event.cpp. References hAlarm. Referenced by DateBookDB::addJFEvent(), createVObject(), DateEntry::DateEntry(), DateBookDB::removeJFEvent(), and toMap(). |
|
|
For internal use only.
Definition at line 659 of file event.cpp. References doRepeat(). Referenced by DateBookDB::addJFEvent(), DateEntry::DateEntry(), EffectiveEvent::endDate(), nextAlarm(), DayItemMonth::paint(), DateBookDB::removeJFEvent(), and EffectiveEvent::startDate(). |
|
|
Returns TRUE if the event is an all day event. Otherwise returns FALSE. Definition at line 273 of file event.h. References AllDay, and type(). Referenced by DayItemMonth::paint(). |
|
|
Returns the location of the event. Definition at line 571 of file event.cpp. References locat. Referenced by createVObject(), DateEntry::DateEntry(), DatebookEventDesc::disp_event(), EffectiveEvent::location(), and toMap(). |
|
|
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 descript, doRepeat(), Event::RepeatPattern::endDateUTC, endUTC, QString::find(), TimeConversion::fromUTC(), Event::RepeatPattern::hasEndDate, locat, note, pattern, startUTC, and tz. |
|
||||||||||||
|
For internal use only.
Definition at line 412 of file event.cpp. References QDate::month(), and QDate::year(). |
|
|
Returns the notes for the event. Definition at line 683 of file event.cpp. References note. Referenced by DateEntry::DateEntry(), DatebookEventDesc::disp_event(), DateBook::editEvent(), EffectiveEvent::notes(), and toMap(). |
|
|
For internal use only.
Definition at line 388 of file event.cpp. References QDate::day(). |
|
|
For internal use only.
|
|
|
For internal use only.
|
|
|
For internal use only.
|
|
|
For internal use only.
Definition at line 691 of file event.cpp. References aMinutes, aSound, categ, descript, endUTC, hAlarm, hRepeat, locat, note, pattern, startUTC, TRUE, typ, tz, and Qtopia::Record::uid(). |
|
|
For internal use only.
|
|
|
For internal use only.
|
|
|
Returns the set of events read as VCards from the file filename. Definition at line 1302 of file event.cpp. References QValueList< T >::append(), events(), name, o, parseVObject(), t, QString::utf8(), VCCalProp, and VCEventProp. Referenced by DateBook::setDocument(). |
|
|
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 repeatPattern(). |
|
|
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, FALSE, pattern, Event::RepeatPattern::type, and Weekly. Referenced by setRepeatOnWeekDay(). |
|
|
For internal use only.
Definition at line 675 of file event.cpp. References pattern. |
|
|
For internal use only.
Definition at line 667 of file event.cpp. References pattern. Referenced by DateEntry::DateEntry(), frequency(), DateBookDB::getEffectiveEvents(), DateBookDB::getEvents(), nextOccurance(), DateBookDB::removeRepeat(), repeatForever(), repeatTill(), repeatType(), and toMap(). |
|
|
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 repeatPattern(). |
|
|
Returns the repeat pattern type for the event.
Definition at line 278 of file event.h. References repeatPattern(). |
|
|
For internal use only. Appends the contact information to buf. Definition at line 714 of file event.cpp. References aMinutes, aSound, Qtopia::Record::categories(), Qtopia::Record::customToXml(), descript, endUTC, Qtopia::escapeString(), hAlarm, hRepeat, Qtopia::Record::idsToString(), QString::isEmpty(), locat, Loud, Normal, note, QString::number(), pattern, startUTC, typ, Qtopia::Record::uid(), and write(). Referenced by DateBookDB::saveJournalEntry(). |
|
||||||||||||||||
|
For internal use only.
|
|
||||||||||||
|
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. References TRUE. Referenced by clearAlarm(), Event(), DateEntry::event(), DateBookDB::loadFile(), and parseVObject(). |
|
|
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.
Definition at line 265 of file event.h. References AllDay, Normal, and setType(). Referenced by DatebookAlldayDisp::DatebookAlldayDisp(), NationalHoliday::events(), ChrisHoliday::events(), and Birthday::events(). |
|
|
Sets the description of the event to s. Definition at line 465 of file event.cpp. References descript. Referenced by DatebookAlldayDisp::DatebookAlldayDisp(), Event(), DateEntry::event(), NationalHoliday::events(), ChrisHoliday::events(), Birthday::events(), DateBookDB::loadFile(), parseVObject(), DateBook::slotNewEntry(), and DateBookDayViewQuickLineEdit::slotReturnPressed(). |
|
|
For internal use only.
Definition at line 520 of file event.cpp. References endUTC. |
|
|
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. Definition at line 512 of file event.cpp. References endUTC, and TimeConversion::toUTC(). Referenced by DatebookAlldayDisp::beam_single_event(), DateBookDayViewQuickLineEdit::DateBookDayViewQuickLineEdit(), Event(), DateEntry::event(), Birthday::events(), DateBookDB::getEvents(), DateBookDB::getNonRepeatingEvents(), DateBookDB::loadFile(), DateBookDayWidget::mousePressEvent(), parseVObject(), and DateBook::slotNewEntry(). |
|
|
Sets how often the event occurs with in its repeat pattern.
Definition at line 310 of file event.h. References Event::RepeatPattern::frequency, and pattern. |
|
|
Sets the location of the event to s. Definition at line 473 of file event.cpp. References locat. Referenced by Event(), DateEntry::event(), DateBook::insertEvent(), DateBookDB::loadFile(), parseVObject(), and DateBook::slotNewEntry(). |
|
|
Sets the notes for the event to n. Definition at line 555 of file event.cpp. References note. Referenced by Event(), DateEntry::event(), DateBookDB::loadFile(), and parseVObject(). |
|
|
For internal use only.
Definition at line 457 of file event.cpp. References NoRepeat, and setRepeat(). |
|
||||||||||||
|
For internal use only.
Definition at line 546 of file event.cpp. References hRepeat, and pattern. Referenced by Event(), DateEntry::event(), DateBookDB::getEffectiveEvents(), DateBookDB::getEvents(), DateBookDB::loadFile(), and setRepeat(). |
|
|
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, pattern, 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, pattern, and repeatOnWeekDay(). |
|
|
Sets the event to repeat until d. Definition at line 315 of file event.h. References Event::RepeatPattern::hasEndDate, pattern, Event::RepeatPattern::setEndDate(), and TRUE. |
|
|
Sets the repeat pattern type of the event to t.
Definition at line 305 of file event.h. References pattern, and Event::RepeatPattern::type. |
|
|
For internal use only.
Definition at line 503 of file event.cpp. References startUTC. |
|
|
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. Definition at line 495 of file event.cpp. References startUTC, and TimeConversion::toUTC(). Referenced by DatebookAlldayDisp::beam_single_event(), DateBookDayViewQuickLineEdit::DateBookDayViewQuickLineEdit(), Event(), DateEntry::event(), NationalHoliday::events(), ChrisHoliday::events(), Birthday::events(), DateBookDB::getEvents(), DateBookDB::getNonRepeatingEvents(), DateBookDB::loadFile(), DateBookDayWidget::mousePressEvent(), parseVObject(), DateBook::slotDoFind(), and DateBook::slotNewEntry(). |
|
|
For internal use only.
Definition at line 528 of file event.cpp. References tz. Referenced by Event(), and parseVObject(). |
|
|
For internal use only.
Definition at line 486 of file event.cpp. References typ. Referenced by Event(), DateEntry::event(), DateBookDB::loadFile(), parseVObject(), and setAllDay(). |
|
|
Returns the start date and time of the first occurance of the event. Definition at line 596 of file event.cpp. References AllDay, TimeConversion::fromUTC(), QTime::setHMS(), QDateTime::setTime(), startUTC, t, QDateTime::time(), and typ. Referenced by DateBook::checkEvent(), createVObject(), DateEntry::DateEntry(), EffectiveEvent::EffectiveEvent(), DateBookDB::loadFile(), nextAlarm(), nextOccurance(), operator<(), operator<=(), operator>(), operator>=(), parseVObject(), DateBook::slotDoFind(), EffectiveEvent::startDate(), toMap(), and weekOffset(). |
|
|
For internal use only.
|
|
|
For internal use only.
Definition at line 627 of file event.cpp. References tz. Referenced by createVObject(), and toMap(). |
|
|
|
For internal use only.
Definition at line 584 of file event.cpp. References typ. Referenced by createVObject(), DateEntry::DateEntry(), DateEntry::event(), isAllDay(), and toMap(). |
|
|
Implements Qtopia::Record. |
|
|
For internal use only.
Definition at line 371 of file event.cpp. References QDate::day(), QDate::dayOfWeek(), QDate::month(), and QDate::year(). |
|
|
Returns the number of weeks from the start of the month that this event occurs. |
|
||||||||||||
|
Writes event as a VCard to the file filename. Definition at line 1278 of file event.cpp. References createVObject(), QFileDirect::directHandle(), f, IO_WriteOnly, QFile::open(), qWarning(), QString::utf8(), and writeVObject(). |
|
||||||||||||
|
Writes the list of events as a set of VCards to the file filename. Definition at line 1250 of file event.cpp. References QValueList< T >::begin(), createVObject(), QFileDirect::directHandle(), QValueList< T >::end(), f, IO_WriteOnly, QFile::open(), qWarning(), and writeVObject(). Referenced by DateBook::beamEvent(). |
|
|
Definition at line 175 of file event.h. Referenced by alarmTime(), Event(), operator==(), save(), and setAlarm(). |
|
|
Definition at line 176 of file event.h. Referenced by alarmSound(), Event(), operator==(), save(), and setAlarm(). |
|
|
Definition at line 168 of file event.h. Referenced by operator==(). |
|
|
Reimplemented from Qtopia::Record. |
|
|
Definition at line 168 of file event.h. Referenced by description(), match(), operator==(), save(), and setDescription(). |
|
|
|
|
|
Definition at line 172 of file event.h. Referenced by end(), Event(), match(), operator==(), save(), and setEnd(). |
|
|
Definition at line 174 of file event.h. Referenced by Event(), hasAlarm(), operator==(), save(), and setAlarm(). |
|
|
Definition at line 174 of file event.h. Referenced by Event(), operator==(), save(), and setRepeat(). |
|
|
Definition at line 168 of file event.h. Referenced by location(), match(), operator==(), save(), and setLocation(). |
|
|
|
|
|
|
|
|
Definition at line 178 of file event.h. Referenced by match(), notes(), operator==(), save(), and setNotes(). |
|
|
Definition at line 177 of file event.h. Referenced by Event(), match(), operator==(), repeatOnWeekDay(), repeatPattern(), save(), setFrequency(), setRepeat(), setRepeatForever(), setRepeatOnWeekDay(), setRepeatTill(), and setRepeatType(). |
|
|
|
|
|
Definition at line 172 of file event.h. Referenced by Event(), match(), operator==(), save(), setStart(), and start(). |
|
|
|
|
|
Definition at line 169 of file event.h. Referenced by end(), Event(), operator==(), save(), setType(), start(), and type(). |
|
|
Definition at line 173 of file event.h. Referenced by match(), operator==(), setTimeZone(), and timeZone(). |
1.4.2