Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OEvent Class Reference

container for events. More...

#include </home/clem/local/src/opie/noncore/unsupported/libopie/pim/oevent.h>

Inheritance diagram for OEvent:

Inheritance graph
[legend]
Collaboration diagram for OEvent:

Collaboration graph
[legend]
List of all members.

Public Types

typedef QValueList< OEventValueList
enum  RecordFields {
  FUid = Qtopia::UID_ID, FCategories = Qtopia::CATEGORY_ID, FDescription = 0, FLocation,
  FType, FAlarm, FSound, FRType,
  FRWeekdays, FRPosition, FRFreq, FRHasEndDate,
  FREndDate, FRCreated, FRExceptions, FStart,
  FEnd, FNote, FTimeZone, FRecParent,
  FRecChildren
}

Public Member Functions

 OEvent (int uid=0)
 OEvent (const OEvent &)
 OEvent (const QMap< int, QString > map)
 ~OEvent ()
OEventoperator= (const OEvent &)
QString description () const
void setDescription (const QString &description)
QString location () const
void setLocation (const QString &loc)
bool hasNotifiers () const
OPimNotifyManagernotifiers () const
ORecur recurrence () const
void setRecurrence (const ORecur &)
bool hasRecurrence () const
QString note () const
void setNote (const QString &note)
QDateTime createdDateTime () const
void setCreatedDateTime (const QDateTime &dt)
void setStartDateTime (const QDateTime &)
QDateTime startDateTime () const
QDateTime startDateTimeInZone () const
void setEndDateTime (const QDateTime &)
QDateTime endDateTime () const
QDateTime endDateTimeInZone () const
bool isMultipleDay () const
bool isAllDay () const
void setAllDay (bool isAllDay)
void setTimeZone (const QString &timeZone)
QString timeZone () const
virtual bool match (const QRegExp &) const
QArray< int > children () const
void setChildren (const QArray< int > &)
void addChild (int uid)
void removeChild (int uid)
int parent () const
void setParent (int uid)
QString toRichText () const
QString toShortText () const
QString type () const
QMap< int, QStringtoMap () const
void fromMap (const QMap< int, QString > &map)
QString recordField (int) const
bool loadFromStream (QDataStream &)
bool saveToStream (QDataStream &) const

Static Public Member Functions

static int rtti ()

Private Member Functions

void changeOrModify ()
void deref ()

Private Attributes

Datadata
Private * priv

Classes

struct  Data

Detailed Description

container for events.

This is the container for all Events. It encapsules all available information for a single Event

Definition at line 39 of file oevent.h.


Member Typedef Documentation

typedef QValueList<OEvent> OEvent::ValueList
 

Definition at line 41 of file oevent.h.


Member Enumeration Documentation

enum OEvent::RecordFields
 

RecordFields contain possible attributes used in the Results of toMap()..

Enumeration values:
FUid 
FCategories 
FDescription 
FLocation 
FType 
FAlarm 
FSound 
FRType 
FRWeekdays 
FRPosition 
FRFreq 
FRHasEndDate 
FREndDate 
FRCreated 
FRExceptions 
FStart 
FEnd 
FNote 
FTimeZone 
FRecParent 
FRecChildren 

Definition at line 46 of file oevent.h.


Constructor & Destructor Documentation

OEvent::OEvent int  uid = 0  ) 
 

Start with an Empty OEvent. UID == 0 means that it is empty

Definition at line 71 of file oevent.cpp.

References data.

OEvent::OEvent const OEvent  ) 
 

copy c'tor

Definition at line 75 of file oevent.cpp.

References data, and QShared::ref().

OEvent::OEvent const QMap< int, QString map  ) 
 

Create OEvent, initialized by map

See also:
enum RecordFields

Definition at line 81 of file oevent.cpp.

References data, and fromMap().

OEvent::~OEvent  ) 
 

Definition at line 89 of file oevent.cpp.

References data, and QShared::deref().


Member Function Documentation

void OEvent::addChild int  uid  ) 
 

Definition at line 522 of file oevent.cpp.

References changeOrModify(), OEvent::Data::child, and data.

Referenced by fromMap(), and ODateBookAccessBackend_XML::setField().

void OEvent::changeOrModify  )  [inline, private]
 

Definition at line 334 of file oevent.cpp.

References OEvent::Data::child, QShared::count, OEvent::Data::created, data, QShared::deref(), OEvent::Data::description, OEvent::Data::end, OEvent::Data::isAllDay, OEvent::Data::location, OEvent::Data::manager, OEvent::Data::note, OEvent::Data::parent, OEvent::Data::recur, OEvent::Data::start, and OEvent::Data::timezone.

Referenced by addChild(), removeChild(), setAllDay(), setChildren(), setCreatedDateTime(), setDescription(), setEndDateTime(), setLocation(), setNote(), setParent(), setRecurrence(), setStartDateTime(), and setTimeZone().

QArray< int > OEvent::children  )  const
 

For exception to recurrence here is a list of children...

Definition at line 510 of file oevent.cpp.

References OEvent::Data::child, and data.

Referenced by toMap().

QDateTime OEvent::createdDateTime  )  const
 

Definition at line 162 of file oevent.cpp.

References OEvent::Data::created, and data.

void OEvent::deref  )  [private]
 

Definition at line 363 of file oevent.cpp.

References data, and QShared::deref().

Referenced by operator=().

QString OEvent::description  )  const
 

Definition at line 106 of file oevent.cpp.

References data, and OEvent::Data::description.

Referenced by OEffectiveEvent::description(), ODateBookAccessBackend_XML::finalizeRecord(), toMap(), toRichText(), and toShortText().

QDateTime OEvent::endDateTime  )  const
 

in current timezone

Definition at line 185 of file oevent.cpp.

References data, QDateTime::date(), OEvent::Data::end, OEvent::Data::isAllDay, and OEvent::Data::start.

Referenced by OEffectiveEvent::endDate(), endDateTimeInZone(), OEffectiveEvent::OEffectiveEvent(), toMap(), and toRichText().

QDateTime OEvent::endDateTimeInZone  )  const
 

Definition at line 194 of file oevent.cpp.

References OTimeZone::current(), data, OEvent::Data::end, endDateTime(), OEvent::Data::isAllDay, QString::isEmpty(), OEvent::Data::timezone, and OTimeZone::toDateTime().

void OEvent::fromMap const QMap< int, QString > &  map  ) 
 

Definition at line 424 of file oevent.cpp.

References addChild(), alarmTime, QValueList< T >::begin(), ORecur::Created, OTimeZone::current(), QValueList< T >::end(), end, ORecur::EndDate, ORecur::Exceptions, FAlarm, FCategories, FDescription, FEnd, FLocation, FRCreated, FRecChildren, FRecParent, FREndDate, FRExceptions, FRFreq, FRHasEndDate, OTimeZone::fromUTCDateTime(), FRPosition, FRType, FRWeekdays, FSound, FStart, FTimeZone, FType, FUid, Qtopia::Record::idsFromString(), QMap< Key, T >::insert(), isAllDay(), OPimRecord::isEmpty(), list, OPimAlarm::Loud, notifiers(), qWarning(), recur(), ORecur::RFreq, ORecur::RHasEndDate, ORecur::RPosition, ORecur::RType, ORecur::RWeekdays, setAllDay(), Qtopia::Record::setCategories(), setDescription(), setEndDateTime(), setLocation(), setParent(), setRecurrence(), setStartDateTime(), setTimeZone(), OPimRecord::setUid(), OPimAlarm::Silent, QStringList::split(), start, startDateTime(), timeZone(), OTimeZone::toDateTime(), QDateTime::toString(), and OTimeZone::utc().

Referenced by OEvent().

bool OEvent::hasNotifiers  )  const
 

Definition at line 129 of file oevent.cpp.

References OPimNotifyManager::alarms(), data, OEvent::Data::manager, and OPimNotifyManager::reminders().

bool OEvent::hasRecurrence  )  const
 

Definition at line 151 of file oevent.cpp.

References data, ORecur::doesRecur(), and OEvent::Data::recur.

Referenced by OEffectiveEvent::endDate(), ODateBookAccessBackend_XML::finalizeRecord(), OEffectiveEvent::startDate(), and toMap().

bool OEvent::isAllDay  )  const
 

Definition at line 208 of file oevent.cpp.

References data, and OEvent::Data::isAllDay.

Referenced by ODateBookAccessBackend_XML::finalizeRecord(), fromMap(), toMap(), and toRichText().

bool OEvent::isMultipleDay  )  const
 

Definition at line 205 of file oevent.cpp.

References data, QDateTime::date(), OEvent::Data::end, and OEvent::Data::start.

Referenced by toRichText().

bool OEvent::loadFromStream QDataStream  )  [virtual]
 

some marshalling and de marshalling code saves the OPimRecord to and from a DataStream

Reimplemented from OPimRecord.

Definition at line 328 of file oevent.cpp.

QString OEvent::location  )  const
 

Definition at line 117 of file oevent.cpp.

References data, and OEvent::Data::location.

Referenced by OEffectiveEvent::location(), toMap(), and toRichText().

bool OEvent::match const QRegExp  )  const [virtual]
 

Reimplemented from Qtopia::Record.

Definition at line 224 of file oevent.cpp.

References data, Qtopia::DatebookDescription, OEvent::Data::description, OEvent::Data::end, Qtopia::EndDateTime, Qtopia::Location, OEvent::Data::location, QRegExp::match(), Qtopia::Note, OEvent::Data::note, OPimRecord::setLastHitField(), OEvent::Data::start, Qtopia::StartDateTime, and QDateTime::toString().

QString OEvent::note  )  const
 

Definition at line 155 of file oevent.cpp.

References data, and OEvent::Data::note.

Referenced by OEffectiveEvent::note(), toMap(), and toRichText().

OPimNotifyManager & OEvent::notifiers  )  const
 

Definition at line 120 of file oevent.cpp.

References data, and OEvent::Data::manager.

Referenced by ODateBookAccessBackend_XML::finalizeRecord(), fromMap(), and toMap().

OEvent & OEvent::operator= const OEvent  ) 
 

Definition at line 95 of file oevent.cpp.

References data, deref(), and OPimRecord::operator=().

int OEvent::parent  )  const
 

return the parent OEvent

Definition at line 503 of file oevent.cpp.

References data, and OEvent::Data::parent.

Referenced by toMap().

QString OEvent::recordField int   )  const [virtual]
 

the name for a recordField

Implements OPimRecord.

Definition at line 322 of file oevent.cpp.

References QString::null.

ORecur OEvent::recurrence  )  const
 

Definition at line 138 of file oevent.cpp.

References data, and OEvent::Data::recur.

Referenced by toMap().

void OEvent::removeChild int  uid  ) 
 

Definition at line 533 of file oevent.cpp.

References changeOrModify(), OEvent::Data::child, data, and i.

int OEvent::rtti  )  [static]
 

Reimplemented from OPimRecord.

Definition at line 325 of file oevent.cpp.

References OPimResolver::DateBook.

bool OEvent::saveToStream QDataStream  )  const [virtual]
 

UIDs

Categories

Reimplemented from OPimRecord.

Definition at line 331 of file oevent.cpp.

void OEvent::setAllDay bool  isAllDay  ) 
 

Definition at line 211 of file oevent.cpp.

References changeOrModify(), data, OEvent::Data::isAllDay, and OEvent::Data::timezone.

Referenced by fromMap(), and ODateBookAccessBackend_XML::setField().

void OEvent::setChildren const QArray< int > &   ) 
 

Definition at line 515 of file oevent.cpp.

References changeOrModify(), OEvent::Data::child, and data.

void OEvent::setCreatedDateTime const QDateTime dt  ) 
 

Definition at line 165 of file oevent.cpp.

References changeOrModify(), OEvent::Data::created, and data.

void OEvent::setDescription const QString description  ) 
 

Definition at line 109 of file oevent.cpp.

References changeOrModify(), data, and OEvent::Data::description.

Referenced by fromMap(), and ODateBookAccessBackend_XML::setField().

void OEvent::setEndDateTime const QDateTime  ) 
 

in current timezone

Definition at line 201 of file oevent.cpp.

References changeOrModify(), data, and OEvent::Data::end.

Referenced by ODateBookAccessBackend_XML::finalizeRecord(), and fromMap().

void OEvent::setLocation const QString loc  ) 
 

Definition at line 113 of file oevent.cpp.

References changeOrModify(), data, and OEvent::Data::location.

Referenced by fromMap(), and ODateBookAccessBackend_XML::setField().

void OEvent::setNote const QString note  ) 
 

Definition at line 158 of file oevent.cpp.

References changeOrModify(), data, and OEvent::Data::note.

Referenced by ODateBookAccessBackend_XML::setField().

void OEvent::setParent int  uid  ) 
 

Definition at line 506 of file oevent.cpp.

References changeOrModify(), data, and OEvent::Data::parent.

Referenced by fromMap(), and ODateBookAccessBackend_XML::setField().

void OEvent::setRecurrence const ORecur  ) 
 

Definition at line 144 of file oevent.cpp.

References changeOrModify(), data, and OEvent::Data::recur.

Referenced by ODateBookAccessBackend_XML::finalizeRecord(), and fromMap().

void OEvent::setStartDateTime const QDateTime  ) 
 

set the date to dt. dt is the QDateTime in localtime

Definition at line 181 of file oevent.cpp.

References changeOrModify(), data, and OEvent::Data::start.

Referenced by ODateBookAccessBackend_XML::finalizeRecord(), and fromMap().

void OEvent::setTimeZone const QString timeZone  ) 
 

Definition at line 216 of file oevent.cpp.

References changeOrModify(), data, and OEvent::Data::timezone.

Referenced by ODateBookAccessBackend_XML::finalizeRecord(), fromMap(), and ODateBookAccessBackend_XML::setField().

QDateTime OEvent::startDateTime  )  const
 

returns the datetime in the local timeZone

Definition at line 169 of file oevent.cpp.

References data, QDateTime::date(), OEvent::Data::isAllDay, and OEvent::Data::start.

Referenced by ODateBookAccessBackend_XML::finalizeRecord(), fromMap(), OEffectiveEvent::OEffectiveEvent(), OEffectiveEvent::startDate(), startDateTimeInZone(), toMap(), toRichText(), and toShortText().

QDateTime OEvent::startDateTimeInZone  )  const
 

returns the start datetime in the current zone

Definition at line 174 of file oevent.cpp.

References OTimeZone::current(), data, OEvent::Data::isAllDay, QString::isEmpty(), OEvent::Data::start, startDateTime(), OEvent::Data::timezone, and OTimeZone::toDateTime().

QString OEvent::timeZone  )  const
 

Definition at line 220 of file oevent.cpp.

References data, QString::fromLatin1(), OEvent::Data::isAllDay, and OEvent::Data::timezone.

Referenced by ODateBookAccessBackend_XML::finalizeRecord(), fromMap(), and toMap().

QMap< int, QString > OEvent::toMap  )  const [virtual]
 

converts the internal structure to a map

Implements OPimRecord.

Definition at line 374 of file oevent.cpp.

References buf, Qtopia::Record::categories(), children(), ORecur::Created, OTimeZone::current(), OPimNotify::dateTime(), description(), ORecur::EndDate, endDateTime(), Qtopia::escapeString(), ORecur::Exceptions, FAlarm, FCategories, FDescription, FEnd, FLocation, FNote, FRCreated, FRecChildren, FRecParent, FREndDate, FRExceptions, FRFreq, FRHasEndDate, OTimeZone::fromUTCDateTime(), FRPosition, FRType, FRWeekdays, FSound, FStart, FTimeZone, FType, FUid, hasRecurrence(), i, Qtopia::Record::idsToString(), QMap< Key, T >::insert(), isAllDay(), OPimRecord::isEmpty(), location(), OPimAlarm::Loud, note(), notifiers(), QString::number(), parent(), recur(), recurrence(), ORecur::RFreq, ORecur::RHasEndDate, ORecur::RPosition, ORecur::RType, ORecur::RWeekdays, OPimAlarm::sound(), startDateTime(), timeZone(), OTimeZone::toDateTime(), ORecur::toMap(), Qtopia::Record::uid(), and OTimeZone::utc().

Referenced by ODateBookAccessBackend_SQL::add().

QString OEvent::toRichText  )  const [virtual]
 

toRichText summary

Implements OPimRecord.

Definition at line 247 of file oevent.cpp.

References OPimRecord::categoryNames(), description(), endDateTime(), Qtopia::escapeString(), isAllDay(), OPimRecord::isEmpty(), isMultipleDay(), location(), note(), KateCommands::replace(), startDateTime(), text, and tr.

Referenced by Datebook::TextShow::show().

QString OEvent::toShortText  )  const [virtual]
 

a small one line summary

Implements OPimRecord.

Definition at line 304 of file oevent.cpp.

References description(), QString::number(), startDateTime(), and text.

QString OEvent::type  )  const [virtual]
 

the name of the Record

Implements OPimRecord.

Definition at line 319 of file oevent.cpp.

References QString::fromLatin1().


Member Data Documentation

Data* OEvent::data [private]
 

Definition at line 168 of file oevent.h.

Referenced by addChild(), changeOrModify(), children(), createdDateTime(), deref(), description(), endDateTime(), endDateTimeInZone(), hasNotifiers(), hasRecurrence(), isAllDay(), isMultipleDay(), location(), match(), note(), notifiers(), OEvent(), operator=(), parent(), recurrence(), removeChild(), setAllDay(), setChildren(), setCreatedDateTime(), setDescription(), setEndDateTime(), setLocation(), setNote(), setParent(), setRecurrence(), setStartDateTime(), setTimeZone(), startDateTime(), startDateTimeInZone(), timeZone(), and ~OEvent().

Private* OEvent::priv [private]
 

Definition at line 170 of file oevent.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:42:28 2005 for OPIE by  doxygen 1.4.2