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

Opie::OPimRecurrence Class Reference

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

Collaboration diagram for Opie::OPimRecurrence:

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

 OPimRecurrence ()
 OPimRecurrence (const QMap< int, QString > &map)
 OPimRecurrence (const OPimRecurrence &)
 ~OPimRecurrence ()
OPimRecurrenceoperator= (const OPimRecurrence &)
bool operator== (const OPimRecurrence &) 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
OPimRecurrencePrivate * d

Classes

struct  Data

Detailed Description

Class to handle Recurrencies..

Definition at line 46 of file opimrecurrence.h.


Member Typedef Documentation

typedef QValueList<QDate> Opie::OPimRecurrence::ExceptionList
 

Definition at line 49 of file opimrecurrence.h.


Member Enumeration Documentation

enum Opie::OPimRecurrence::Days
 

Enumeration values:
MON 
TUE 
WED 
THU 
FRI 
SAT 
SUN 

Definition at line 52 of file opimrecurrence.h.

enum Opie::OPimRecurrence::Fields
 

Enumeration values:
RType 
RWeekdays 
RPosition 
RFreq 
RHasEndDate 
EndDate 
Created 
Exceptions 

Definition at line 54 of file opimrecurrence.h.

enum Opie::OPimRecurrence::RepeatType
 

Enumeration values:
NoRepeat 
Daily 
Weekly 
MonthlyDay 
MonthlyDate 
Yearly 

Definition at line 50 of file opimrecurrence.h.


Constructor & Destructor Documentation

Opie::OPimRecurrence::OPimRecurrence  ) 
 

Definition at line 68 of file opimrecurrence.cpp.

References data.

Opie::OPimRecurrence::OPimRecurrence const QMap< int, QString > &  map  ) 
 

Definition at line 72 of file opimrecurrence.cpp.

References data, and fromMap().

Opie::OPimRecurrence::OPimRecurrence const OPimRecurrence  ) 
 

Definition at line 79 of file opimrecurrence.cpp.

References data, and QShared::ref().

Opie::OPimRecurrence::~OPimRecurrence  ) 
 

Definition at line 86 of file opimrecurrence.cpp.

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


Member Function Documentation

void Opie::OPimRecurrence::checkOrModify  )  [inline, private]
 

Definition at line 541 of file opimrecurrence.cpp.

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

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

QDateTime Opie::OPimRecurrence::createdDateTime  )  const
 

Definition at line 461 of file opimrecurrence.cpp.

References Opie::OPimRecurrence::Data::create, and data.

char Opie::OPimRecurrence::days  )  const
 

Definition at line 441 of file opimrecurrence.cpp.

References data, and Opie::OPimRecurrence::Data::days.

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

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

Definition at line 94 of file opimrecurrence.cpp.

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

Referenced by operator=().

bool Opie::OPimRecurrence::doesRecur const QDate  ) 
 

Definition at line 127 of file opimrecurrence.cpp.

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

bool Opie::OPimRecurrence::doesRecur  )  const
 

Definition at line 118 of file opimrecurrence.cpp.

References NoRepeat, and type().

Referenced by Opie::ODateBookAccessBackend_XML::finalizeRecord(), Opie::OPimTodo::hasRecurrence(), Opie::OPimEvent::hasRecurrence(), and Opie::OPimTodoAccessXML::load().

QDate Opie::OPimRecurrence::endDate  )  const
 

Definition at line 451 of file opimrecurrence.cpp.

References data, and Opie::OPimRecurrence::Data::end.

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

OPimRecurrence::ExceptionList & Opie::OPimRecurrence::exceptions  ) 
 

Definition at line 476 of file opimrecurrence.cpp.

References data, and Opie::OPimRecurrence::Data::list.

int Opie::OPimRecurrence::frequency  )  const
 

Definition at line 431 of file opimrecurrence.cpp.

References data, and Opie::OPimRecurrence::Data::freq.

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

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

Definition at line 664 of file opimrecurrence.cpp.

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

Referenced by OPimRecurrence().

bool Opie::OPimRecurrence::hasEndDate  )  const
 

Definition at line 446 of file opimrecurrence.cpp.

References data, and Opie::OPimRecurrence::Data::hasEnd.

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

bool Opie::OPimRecurrence::nextOcurrence const QDate FromWhereToStart,
QDate recurDate
 

FromWhereToStart is not included!!!

Definition at line 142 of file opimrecurrence.cpp.

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

Referenced by doesRecur(), and repeat().

OPimRecurrence & Opie::OPimRecurrence::operator= const OPimRecurrence  ) 
 

Definition at line 107 of file opimrecurrence.cpp.

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

bool Opie::OPimRecurrence::operator== const OPimRecurrence  )  const
 

Definition at line 102 of file opimrecurrence.cpp.

bool Opie::OPimRecurrence::p_nextOccurrence const QDate from,
QDate next
[private]
 

Definition at line 152 of file opimrecurrence.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 Opie::OPimRecurrence::position  )  const
 

Definition at line 436 of file opimrecurrence.cpp.

References data, and Opie::OPimRecurrence::Data::pos.

bool Opie::OPimRecurrence::repeatOnWeekDay int  day  )  const
 

starting on monday=0, sunday=6 for convience

int Opie::OPimRecurrence::repetition  )  const
 

the current repetition

Definition at line 466 of file opimrecurrence.cpp.

References data, and Opie::OPimRecurrence::Data::rep.

QString Opie::OPimRecurrence::rTypeString  )  const [private]
 

Definition at line 589 of file opimrecurrence.cpp.

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

Referenced by toMap().

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

Definition at line 617 of file opimrecurrence.cpp.

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

Referenced by fromMap().

QString Opie::OPimRecurrence::service  )  const
 

The module this OPimRecurrence belongs to

Definition at line 471 of file opimrecurrence.cpp.

References Opie::OPimRecurrence::Data::app, and data.

void Opie::OPimRecurrence::setCreatedDateTime const QDateTime  ) 
 

Definition at line 511 of file opimrecurrence.cpp.

References checkOrModify(), Opie::OPimRecurrence::Data::create, and data.

Referenced by Opie::ODateBookAccessBackend_XML::finalizeRecord().

void Opie::OPimRecurrence::setDays char  c  ) 
 

Definition at line 499 of file opimrecurrence.cpp.

References checkOrModify(), data, and Opie::OPimRecurrence::Data::days.

Referenced by OPimRecurrenceWidget::recurrence().

void Opie::OPimRecurrence::setEndDate const QDate dt  ) 
 

Definition at line 505 of file opimrecurrence.cpp.

References checkOrModify(), data, and Opie::OPimRecurrence::Data::end.

Referenced by Opie::ODateBookAccessBackend_XML::finalizeRecord(), Opie::OPimTodoAccessXML::load(), OPimRecurrenceWidget::recurrence(), and repeat().

void Opie::OPimRecurrence::setFrequency int  freq  ) 
 

Definition at line 487 of file opimrecurrence.cpp.

References checkOrModify(), data, and Opie::OPimRecurrence::Data::freq.

Referenced by OPimRecurrenceWidget::recurrence().

void Opie::OPimRecurrence::setHasEndDate bool  b  ) 
 

Definition at line 517 of file opimrecurrence.cpp.

References checkOrModify(), data, and Opie::OPimRecurrence::Data::hasEnd.

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

void Opie::OPimRecurrence::setPosition int  pos  ) 
 

Definition at line 493 of file opimrecurrence.cpp.

References checkOrModify(), data, and Opie::OPimRecurrence::Data::pos.

Referenced by OPimRecurrenceWidget::recurrence().

void Opie::OPimRecurrence::setRepitition int   ) 
 

Definition at line 523 of file opimrecurrence.cpp.

References checkOrModify(), data, and Opie::OPimRecurrence::Data::rep.

void Opie::OPimRecurrence::setService const QString ser  ) 
 

Definition at line 529 of file opimrecurrence.cpp.

References Opie::OPimRecurrence::Data::app, checkOrModify(), and data.

void Opie::OPimRecurrence::setStart const QDate dt  ) 
 

Definition at line 535 of file opimrecurrence.cpp.

References checkOrModify(), data, and Opie::OPimRecurrence::Data::start.

Referenced by Opie::ODateBookAccessBackend_XML::finalizeRecord(), and Opie::OPimTodoAccessXML::load().

void Opie::OPimRecurrence::setType const RepeatType  ) 
 

Definition at line 481 of file opimrecurrence.cpp.

References checkOrModify(), data, and Opie::OPimRecurrence::Data::type.

Referenced by OPimRecurrenceWidget::recurrence().

QDate Opie::OPimRecurrence::start  )  const
 

Definition at line 456 of file opimrecurrence.cpp.

References data, and Opie::OPimRecurrence::Data::start.

Referenced by p_nextOccurrence().

QMap< int, QString > Opie::OPimRecurrence::toMap  )  const
 

Definition at line 632 of file opimrecurrence.cpp.

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

Referenced by Opie::OPimEvent::toMap(), and toString().

QString Opie::OPimRecurrence::toString  )  const
 

Definition at line 561 of file opimrecurrence.cpp.

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

OPimRecurrence::RepeatType Opie::OPimRecurrence::type  )  const
 

Definition at line 426 of file opimrecurrence.cpp.

References data, and Opie::OPimRecurrence::Data::type.

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


Member Data Documentation

OPimRecurrencePrivate* Opie::OPimRecurrence::d [private]
 

Definition at line 132 of file opimrecurrence.h.

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

Definition at line 130 of file opimrecurrence.h.

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


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