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

Opie::OPimEvent Class Reference

container for events. More...

#include </home/clem/local/src/opie/libopie2/opiepim/core/opimevent.h>

Inheritance diagram for Opie::OPimEvent:

Inheritance graph
[legend]
Collaboration diagram for Opie::OPimEvent:

Collaboration graph
[legend]
List of all members.

Public Types

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

Public Member Functions

 OPimEvent (int uid=0)
 OPimEvent (const OPimEvent &)
 OPimEvent (const QMap< int, QString > map)
 ~OPimEvent ()
OPimEventoperator= (const OPimEvent &)
QString description () const
void setDescription (const QString &description)
QString location () const
void setLocation (const QString &loc)
bool hasNotifiers () const
OPimNotifyManagernotifiers () const
OPimRecurrence recurrence () const
void setRecurrence (const OPimRecurrence &)
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
QArray< int > children () const
void setChildren (const QArray< int > &)
void addChild (int uid)
void removeChild (int uid)
int parent () const
void setParent (int uid)
virtual Reimplementations bool match (const QRegExp &) const
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
int rtti () const

Static Public Member Functions

static OPimEventsafeCast (const OPimRecord *)
 Cast safely to OPimEvent from OPimRecord.

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 71 of file opimevent.h.


Member Typedef Documentation

typedef QValueList<OPimEvent> Opie::OPimEvent::ValueList
 

Definition at line 74 of file opimevent.h.


Member Enumeration Documentation

enum Opie::OPimEvent::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 79 of file opimevent.h.


Constructor & Destructor Documentation

Opie::OPimEvent::OPimEvent int  uid = 0  ) 
 

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

Definition at line 119 of file opimevent.cpp.

References data.

Opie::OPimEvent::OPimEvent const OPimEvent  ) 
 

copy c'tor

Definition at line 126 of file opimevent.cpp.

References data, and QShared::ref().

Opie::OPimEvent::OPimEvent const QMap< int, QString map  ) 
 

Create OPimEvent, initialized by map

See also:
enum RecordFields

Definition at line 133 of file opimevent.cpp.

References data, and fromMap().

Opie::OPimEvent::~OPimEvent  ) 
 

Definition at line 142 of file opimevent.cpp.

References data, and QShared::deref().


Member Function Documentation

void Opie::OPimEvent::addChild int  uid  ) 
 

Definition at line 749 of file opimevent.cpp.

References changeOrModify(), Opie::OPimEvent::Data::child, and data.

Referenced by fromMap().

void Opie::OPimEvent::changeOrModify  )  [inline, private]
 

Definition at line 524 of file opimevent.cpp.

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

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

QArray< int > Opie::OPimEvent::children  )  const
 

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

Definition at line 731 of file opimevent.cpp.

References Opie::OPimEvent::Data::child, and data.

Referenced by toMap().

QDateTime Opie::OPimEvent::createdDateTime  )  const
 

Definition at line 255 of file opimevent.cpp.

References Opie::OPimEvent::Data::created, and data.

void Opie::OPimEvent::deref  )  [private]
 

Definition at line 558 of file opimevent.cpp.

References data, and QShared::deref().

Referenced by operator=().

QString Opie::OPimEvent::description  )  const
 

Definition at line 166 of file opimevent.cpp.

References data, and Opie::OPimEvent::Data::description.

Referenced by Opie::Internal::OPimEventSortVector::compareItems(), toMap(), toRichText(), and toShortText().

QDateTime Opie::OPimEvent::endDateTime  )  const
 

in current timezone

Definition at line 293 of file opimevent.cpp.

References data, QDateTime::date(), Opie::OPimEvent::Data::end, end, Opie::OPimEvent::Data::isAllDay, QDateTime::isValid(), and Opie::OPimEvent::Data::start.

Referenced by Opie::Internal::OPimEventSortVector::compareItems(), endDateTimeInZone(), DatebookSearch::insertItem(), PIMListView::makeString(), repeat(), toMap(), and toRichText().

QDateTime Opie::OPimEvent::endDateTimeInZone  )  const
 

Definition at line 307 of file opimevent.cpp.

References Opie::OPimTimeZone::current(), data, Opie::OPimEvent::Data::end, endDateTime(), Opie::OPimEvent::Data::isAllDay, QString::isEmpty(), Opie::OPimEvent::Data::timezone, and Opie::OPimTimeZone::toDateTime().

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

Definition at line 632 of file opimevent.cpp.

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

Referenced by OPimEvent().

bool Opie::OPimEvent::hasNotifiers  )  const
 

Definition at line 204 of file opimevent.cpp.

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

bool Opie::OPimEvent::hasRecurrence  )  const
 

Definition at line 235 of file opimevent.cpp.

References data, Opie::OPimRecurrence::doesRecur(), and Opie::OPimEvent::Data::recur.

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

bool Opie::OPimEvent::isAllDay  )  const
 

Definition at line 330 of file opimevent.cpp.

References data, and Opie::OPimEvent::Data::isAllDay.

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

bool Opie::OPimEvent::isMultipleDay  )  const
 

Definition at line 324 of file opimevent.cpp.

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

Referenced by toRichText().

bool Opie::OPimEvent::loadFromStream QDataStream  )  [virtual]
 

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

Reimplemented from Opie::OPimRecord.

Definition at line 512 of file opimevent.cpp.

QString Opie::OPimEvent::location  )  const
 

Definition at line 186 of file opimevent.cpp.

References data, and Opie::OPimEvent::Data::location.

Referenced by Opie::Internal::OPimEventSortVector::compareItems(), toMap(), and toRichText().

bool Opie::OPimEvent::match const QRegExp  )  const [virtual]
 

Reimplemented from Qtopia::Record.

Definition at line 357 of file opimevent.cpp.

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

QString Opie::OPimEvent::note  )  const
 

Definition at line 242 of file opimevent.cpp.

References data, and Opie::OPimEvent::Data::note.

Referenced by Opie::Internal::OPimEventSortVector::compareItems(), toMap(), and toRichText().

OPimNotifyManager & Opie::OPimEvent::notifiers  )  const
 

Definition at line 192 of file opimevent.cpp.

References data, and Opie::OPimEvent::Data::manager.

Referenced by Opie::Internal::OPimEventSortVector::compareItems(), Opie::ODateBookAccessBackend_XML::finalizeRecord(), fromMap(), and toMap().

OPimEvent & Opie::OPimEvent::operator= const OPimEvent  ) 
 

Definition at line 152 of file opimevent.cpp.

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

int Opie::OPimEvent::parent  )  const
 

return the parent OPimEvent

Definition at line 718 of file opimevent.cpp.

References data, and Opie::OPimEvent::Data::parent.

Referenced by toMap().

QString Opie::OPimEvent::recordField int   )  const [virtual]
 

the name for a recordField

Implements Opie::OPimRecord.

Definition at line 481 of file opimevent.cpp.

References QString::null.

OPimRecurrence Opie::OPimEvent::recurrence  )  const
 

Definition at line 216 of file opimevent.cpp.

References data, and Opie::OPimEvent::Data::recur.

Referenced by DatebookSearch::insertItem(), and toMap().

void Opie::OPimEvent::removeChild int  uid  ) 
 

Definition at line 766 of file opimevent.cpp.

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

int Opie::OPimEvent::rtti  )  const [virtual]
 

Reimplemented from Opie::OPimRecord.

Definition at line 487 of file opimevent.cpp.

References Opie::OPimResolver::DateBook.

OPimEvent * Opie::OPimEvent::safeCast const OPimRecord rec  )  [static]
 

Cast safely to OPimEvent from OPimRecord.

Safely cast from OPimRecord to OPimEvent. If the OPimRecord is not of type OPimEvent Null will be returned.

Parameters:
rec The OPimRecord to be casted to OPimEvent
See also:
OPimTodo::safeCast
Returns:
OPimEvent or Null Pointer

Definition at line 504 of file opimevent.cpp.

References Opie::OPimResolver::DateBook, l, and Opie::OPimRecord::rtti().

bool Opie::OPimEvent::saveToStream QDataStream  )  const [virtual]
 

UIDs

Categories

Reimplemented from Opie::OPimRecord.

Definition at line 518 of file opimevent.cpp.

void Opie::OPimEvent::setAllDay bool  isAllDay  ) 
 

Definition at line 336 of file opimevent.cpp.

References changeOrModify(), data, and Opie::OPimEvent::Data::isAllDay.

Referenced by fromMap().

void Opie::OPimEvent::setChildren const QArray< int > &   ) 
 

Definition at line 739 of file opimevent.cpp.

References changeOrModify(), Opie::OPimEvent::Data::child, and data.

void Opie::OPimEvent::setCreatedDateTime const QDateTime dt  ) 
 

Definition at line 261 of file opimevent.cpp.

References changeOrModify(), Opie::OPimEvent::Data::created, and data.

void Opie::OPimEvent::setDescription const QString description  ) 
 

Definition at line 172 of file opimevent.cpp.

References changeOrModify(), data, and Opie::OPimEvent::Data::description.

Referenced by fromMap().

void Opie::OPimEvent::setEndDateTime const QDateTime  ) 
 

in current timezone

Definition at line 317 of file opimevent.cpp.

References changeOrModify(), data, and Opie::OPimEvent::Data::end.

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

void Opie::OPimEvent::setLocation const QString loc  ) 
 

Definition at line 179 of file opimevent.cpp.

References changeOrModify(), data, and Opie::OPimEvent::Data::location.

Referenced by fromMap().

void Opie::OPimEvent::setNote const QString note  ) 
 

Definition at line 248 of file opimevent.cpp.

References changeOrModify(), data, and Opie::OPimEvent::Data::note.

Referenced by fromMap().

void Opie::OPimEvent::setParent int  uid  ) 
 

Definition at line 724 of file opimevent.cpp.

References changeOrModify(), data, and Opie::OPimEvent::Data::parent.

Referenced by fromMap().

void Opie::OPimEvent::setRecurrence const OPimRecurrence  ) 
 

Definition at line 225 of file opimevent.cpp.

References changeOrModify(), data, and Opie::OPimEvent::Data::recur.

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

void Opie::OPimEvent::setStartDateTime const QDateTime  ) 
 

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

Definition at line 286 of file opimevent.cpp.

References changeOrModify(), data, and Opie::OPimEvent::Data::start.

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

void Opie::OPimEvent::setTimeZone const QString timeZone  ) 
 

Definition at line 343 of file opimevent.cpp.

References changeOrModify(), data, and Opie::OPimEvent::Data::timezone.

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

QDateTime Opie::OPimEvent::startDateTime  )  const
 

returns the datetime in the local timeZone

Definition at line 268 of file opimevent.cpp.

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

Referenced by EventItem::action(), Opie::Internal::OPimEventSortVector::compareItems(), Opie::ODateBookAccessBackend_XML::finalizeRecord(), fromMap(), PIMListView::makeString(), repeat(), startDateTimeInZone(), toMap(), toRichText(), and toShortText().

QDateTime Opie::OPimEvent::startDateTimeInZone  )  const
 

returns the start datetime in the current zone

Definition at line 276 of file opimevent.cpp.

References Opie::OPimTimeZone::current(), data, Opie::OPimEvent::Data::isAllDay, QString::isEmpty(), Opie::OPimEvent::Data::start, startDateTime(), Opie::OPimEvent::Data::timezone, and Opie::OPimTimeZone::toDateTime().

QString Opie::OPimEvent::timeZone  )  const
 

Definition at line 350 of file opimevent.cpp.

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

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

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

converts the internal structure to a map

Implements Opie::OPimRecord.

Definition at line 571 of file opimevent.cpp.

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

QString Opie::OPimEvent::toRichText  )  const [virtual]
 

toRichText summary

Implements Opie::OPimRecord.

Definition at line 388 of file opimevent.cpp.

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

Referenced by EventItem::toRichText().

QString Opie::OPimEvent::toShortText  )  const [virtual]
 

a small one line summary

Implements Opie::OPimRecord.

Definition at line 457 of file opimevent.cpp.

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

Referenced by EventItem::EventItem().

QString Opie::OPimEvent::type  )  const [virtual]
 

the name of the Record

Implements Opie::OPimRecord.

Definition at line 475 of file opimevent.cpp.

References QString::fromLatin1().


Member Data Documentation

Data* Opie::OPimEvent::data [private]
 

Definition at line 216 of file opimevent.h.

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

Private* Opie::OPimEvent::priv [private]
 

Definition at line 218 of file opimevent.h.


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