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

ORecur Class Reference

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

Collaboration diagram for ORecur:

Collaboration graph
[legend]
List of all members.

Public Types

typedef QValueList< QDateExceptionList
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  Fields {
  RType = 0, RWeekdays, RPosition, RFreq,
  RHasEndDate, EndDate, Created, Exceptions
}

Public Member Functions

 ORecur ()
 ORecur (const QMap< int, QString > &map)
 ORecur (const ORecur &)
 ~ORecur ()
ORecuroperator= (const ORecur &)
bool operator== (const ORecur &) const
bool doesRecur () const
bool doesRecur (const QDate &)
RepeatType type () const
int frequency () const
int position () const
char days () const
bool hasEndDate () const
QDate start () const
QDate endDate () const
QDateTime createdDateTime () const
bool repeatOnWeekDay (int day) const
bool nextOcurrence (const QDate &FromWhereToStart, QDate &recurDate)
QString service () const
ExceptionListexceptions ()
int repetition () const
void setType (const RepeatType &)
void setFrequency (int freq)
void setPosition (int pos)
void setDays (char c)
void setEndDate (const QDate &dt)
void setStart (const QDate &dt)
void setCreatedDateTime (const QDateTime &)
void setHasEndDate (bool b)
void setRepitition (int)
void setService (const QString &ser)
QMap< int, QStringtoMap () const
void fromMap (const QMap< int, QString > &map)
QString toString () const

Private Member Functions

bool p_nextOccurrence (const QDate &from, QDate &next)
void deref ()
void checkOrModify ()
QString rTypeString () const
QMap< QString, RepeatTyperTypeValueConvertMap () const

Private Attributes

Datadata
ORecurPrivate * d

Classes

struct  Data

Detailed Description

Class to handle Recurrencies..

Definition at line 19 of file orecur.h.


Member Typedef Documentation

typedef QValueList<QDate> ORecur::ExceptionList
 

Definition at line 21 of file orecur.h.


Member Enumeration Documentation

enum ORecur::Days
 

Enumeration values:
MON 
TUE 
WED 
THU 
FRI 
SAT 
SUN 

Definition at line 24 of file orecur.h.

enum ORecur::Fields
 

Enumeration values:
RType 
RWeekdays 
RPosition 
RFreq 
RHasEndDate 
EndDate 
Created 
Exceptions 

Definition at line 26 of file orecur.h.

enum ORecur::RepeatType
 

Enumeration values:
NoRepeat 
Daily 
Weekly 
MonthlyDay 
MonthlyDate 
Yearly 

Definition at line 22 of file orecur.h.


Constructor & Destructor Documentation

ORecur::ORecur  ) 
 

Definition at line 34 of file orecur.cpp.

References data.

Referenced by ORecur().

ORecur::ORecur const QMap< int, QString > &  map  ) 
 

Definition at line 38 of file orecur.cpp.

References fromMap(), and ORecur().

ORecur::ORecur const ORecur  ) 
 

Definition at line 45 of file orecur.cpp.

References data, and QShared::ref().

ORecur::~ORecur  ) 
 

Definition at line 50 of file orecur.cpp.

References data, QShared::deref(), and l.


Member Function Documentation

void ORecur::checkOrModify  )  [inline, private]
 

Definition at line 447 of file orecur.cpp.

References ORecur::Data::app, QShared::count, ORecur::Data::create, data, ORecur::Data::days, QShared::deref(), ORecur::Data::end, ORecur::Data::freq, ORecur::Data::hasEnd, ORecur::Data::list, ORecur::Data::pos, ORecur::Data::rep, ORecur::Data::start, and ORecur::Data::type.

Referenced by setCreatedDateTime(), setDays(), setEndDate(), setFrequency(), setHasEndDate(), setPosition(), setRepitition(), setService(), setStart(), and setType().

QDateTime ORecur::createdDateTime  )  const
 

Definition at line 395 of file orecur.cpp.

References ORecur::Data::create, and data.

char ORecur::days  )  const
 

Definition at line 383 of file orecur.cpp.

References data, and ORecur::Data::days.

Referenced by fromMap(), p_nextOccurrence(), and ORecurranceWidget::setRecurrence().

void ORecur::deref  )  [private]
 

Definition at line 56 of file orecur.cpp.

References data, QShared::deref(), and l.

Referenced by operator=().

bool ORecur::doesRecur const QDate  ) 
 

Definition at line 81 of file orecur.cpp.

References QDate::addDays(), nextOcurrence(), and recur().

bool ORecur::doesRecur  )  const
 

Definition at line 74 of file orecur.cpp.

References NoRepeat, and type().

Referenced by OTodo::hasRecurrence(), and OEvent::hasRecurrence().

QDate ORecur::endDate  )  const
 

Definition at line 389 of file orecur.cpp.

References data, and ORecur::Data::end.

Referenced by p_nextOccurrence(), repeat(), and ORecurranceWidget::setRecurrence().

ORecur::ExceptionList & ORecur::exceptions  ) 
 

Definition at line 404 of file orecur.cpp.

References data, and ORecur::Data::list.

int ORecur::frequency  )  const
 

Definition at line 377 of file orecur.cpp.

References data, and ORecur::Data::freq.

Referenced by p_nextOccurrence(), and ORecurranceWidget::setRecurrence().

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

Definition at line 568 of file orecur.cpp.

References Created, data, days(), end, EndDate, Exceptions, OTimeZone::fromUTCDateTime(), list, pos, RFreq, RHasEndDate, RPosition, RType, rTypeValueConvertMap(), RWeekdays, QStringList::split(), type(), and OTimeZone::utc().

Referenced by ORecur(), and OTodoAccessBackendSQL::todo().

bool ORecur::hasEndDate  )  const
 

Definition at line 386 of file orecur.cpp.

References data, and ORecur::Data::hasEnd.

Referenced by p_nextOccurrence(), ORecurranceWidget::recurrence(), repeat(), and ORecurranceWidget::setRecurrence().

bool ORecur::nextOcurrence const QDate FromWhereToStart,
QDate recurDate
 

FromWhereToStart is not included!!!

Definition at line 94 of file orecur.cpp.

References QDate::addDays(), QValueList< T >::contains(), data, ORecur::Data::list, and p_nextOccurrence().

Referenced by doesRecur(), and repeat().

ORecur & ORecur::operator= const ORecur  ) 
 

Definition at line 65 of file orecur.cpp.

References data, deref(), and QShared::ref().

bool ORecur::operator== const ORecur  )  const
 

Definition at line 62 of file orecur.cpp.

bool ORecur::p_nextOccurrence const QDate from,
QDate next
[private]
 

Definition at line 102 of file orecur.cpp.

References Daily, QDate::dayOfWeek(), days(), QDate::daysInMonth(), diff(), endDate(), FALSE, frequency(), hasEndDate(), QDate::isValid(), MonthlyDate, MonthlyDay, start(), TRUE, type(), Weekly, and Yearly.

Referenced by nextOcurrence().

int ORecur::position  )  const
 

Definition at line 380 of file orecur.cpp.

References data, and ORecur::Data::pos.

bool ORecur::repeatOnWeekDay int  day  )  const
 

starting on monday=0, sunday=6 for convience

int ORecur::repetition  )  const
 

the current repetition

Definition at line 398 of file orecur.cpp.

References data, and ORecur::Data::rep.

QString ORecur::rTypeString  )  const [private]
 

Definition at line 493 of file orecur.cpp.

References Daily, data, MonthlyDate, MonthlyDay, ORecur::Data::type, Weekly, and Yearly.

Referenced by toMap().

QMap< QString, ORecur::RepeatType > ORecur::rTypeValueConvertMap  )  const [private]
 

Definition at line 521 of file orecur.cpp.

References Daily, QMap< Key, T >::insert(), MonthlyDate, MonthlyDay, NoRepeat, Weekly, and Yearly.

Referenced by fromMap().

QString ORecur::service  )  const
 

The module this ORecur belongs to

Definition at line 401 of file orecur.cpp.

References ORecur::Data::app, and data.

void ORecur::setCreatedDateTime const QDateTime  ) 
 

Definition at line 427 of file orecur.cpp.

References checkOrModify(), ORecur::Data::create, and data.

Referenced by ODateBookAccessBackend_XML::finalizeRecord().

void ORecur::setDays char  c  ) 
 

Definition at line 419 of file orecur.cpp.

References checkOrModify(), data, and ORecur::Data::days.

Referenced by ORecurranceWidget::recurrence().

void ORecur::setEndDate const QDate dt  ) 
 

Definition at line 423 of file orecur.cpp.

References checkOrModify(), data, and ORecur::Data::end.

Referenced by ODateBookAccessBackend_XML::finalizeRecord(), OTodoAccessXML::load(), ORecurranceWidget::recurrence(), and repeat().

void ORecur::setFrequency int  freq  ) 
 

Definition at line 411 of file orecur.cpp.

References checkOrModify(), data, and ORecur::Data::freq.

Referenced by ORecurranceWidget::recurrence().

void ORecur::setHasEndDate bool  b  ) 
 

Definition at line 431 of file orecur.cpp.

References checkOrModify(), data, and ORecur::Data::hasEnd.

Referenced by ORecurranceWidget::recurrence(), and repeat().

void ORecur::setPosition int  pos  ) 
 

Definition at line 415 of file orecur.cpp.

References checkOrModify(), data, and ORecur::Data::pos.

Referenced by ORecurranceWidget::recurrence().

void ORecur::setRepitition int   ) 
 

Definition at line 435 of file orecur.cpp.

References checkOrModify(), data, and ORecur::Data::rep.

void ORecur::setService const QString ser  ) 
 

Definition at line 439 of file orecur.cpp.

References ORecur::Data::app, checkOrModify(), and data.

void ORecur::setStart const QDate dt  ) 
 

Definition at line 443 of file orecur.cpp.

References checkOrModify(), data, and ORecur::Data::start.

Referenced by ODateBookAccessBackend_XML::finalizeRecord(), and OTodoAccessXML::load().

void ORecur::setType const RepeatType  ) 
 

Definition at line 407 of file orecur.cpp.

References checkOrModify(), data, and ORecur::Data::type.

Referenced by ORecurranceWidget::recurrence().

QDate ORecur::start  )  const
 

Definition at line 392 of file orecur.cpp.

References data, and ORecur::Data::start.

Referenced by p_nextOccurrence().

QMap< int, QString > ORecur::toMap  )  const
 

Definition at line 536 of file orecur.cpp.

References QValueList< T >::begin(), ORecur::Data::create, Created, data, QDate::day(), ORecur::Data::days, QValueList< T >::end(), ORecur::Data::end, EndDate, Exceptions, ORecur::Data::freq, ORecur::Data::hasEnd, QMap< Key, T >::insert(), QValueList< T >::isEmpty(), list, ORecur::Data::list, QDate::month(), QString::number(), ORecur::Data::pos, RFreq, RHasEndDate, RPosition, RType, rTypeString(), RWeekdays, OTimeZone::utc(), and QDate::year().

Referenced by OEvent::toMap(), and toString().

QString ORecur::toString  )  const
 

Definition at line 465 of file orecur.cpp.

References buf, Created, data, ORecur::Data::days, EndDate, Exceptions, ORecur::Data::hasEnd, QValueList< T >::isEmpty(), ORecur::Data::list, ORecur::Data::pos, RFreq, RHasEndDate, RPosition, RType, RWeekdays, and toMap().

ORecur::RepeatType ORecur::type  )  const
 

Definition at line 374 of file orecur.cpp.

References data, and ORecur::Data::type.

Referenced by doesRecur(), fromMap(), p_nextOccurrence(), and ORecurranceWidget::setRecurrence().


Member Data Documentation

ORecurPrivate* ORecur::d [private]
 

Definition at line 103 of file orecur.h.

Data* ORecur::data [private]
 

Definition at line 101 of file orecur.h.

Referenced by checkOrModify(), createdDateTime(), days(), deref(), endDate(), exceptions(), frequency(), fromMap(), hasEndDate(), nextOcurrence(), operator=(), ORecur(), position(), repetition(), rTypeString(), service(), setCreatedDateTime(), setDays(), setEndDate(), setFrequency(), setHasEndDate(), setPosition(), setRepitition(), setService(), setStart(), setType(), start(), toMap(), toString(), type(), and ~ORecur().


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