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

Opie::OPimOccurrence Class Reference

An OPimOccurrence represents a occurence for one day of a OPimRecord. More...

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

Collaboration diagram for Opie::OPimOccurrence:

Collaboration graph
[legend]
List of all members.

Public Types

typedef QValueList< OPimOccurrenceList
enum  Position { MidWay, Start, End, StartEnd }

Public Member Functions

 OPimOccurrence ()
 OPimOccurrence (const OPimOccurrence &)
 Copy constructor.
 ~OPimOccurrence ()
void setPeriod (const QDate &from)
 Set the Occurrence to be All Day on a specified QDate.
void setPeriod (const QDateTime &from, const QDateTime &to)
 Set the period of this Occurrence with a QTime associated (overloaded).
void setPeriod (const QDate &from, const QTime &start, const QTime &end)
 Set the period of this Occurrence with a QTime associated.
bool isAllDay () const
 Is a QTime associated to the OPimOccurrence.
QDate date () const
 Return the QDate where this OPimOccurrence takes place.
QTime startTime () const
 Return the start time of the OPimOccurrence.
QTime endTime () const
QDateTime startDateTime () const
QDateTime endDateTime () const
QString summary () const
QString location () const
QString note () const
int length () const
Position position () const
void setPosition (enum Position &)
Opie::Core::OSharedPointer<
OPimRecord
record () const
OPimEvent toEvent () const
OPimTodo toTodo () const
OPimContact toContact () const
bool operator< (const OPimOccurrence &) const
bool operator<= (const OPimOccurrence &) const
bool operator== (const OPimOccurrence &) const
bool operator!= (const OPimOccurrence &) const
bool operator> (const OPimOccurrence &) const
bool operator>= (const OPimOccurrence &) const
OPimOccurrenceoperator= (const OPimOccurrence &)
 Copy Operator.

Private Member Functions

void deref ()
void changeOrModify ()
 OPimOccurrence (OPimOccurrence::Data *, enum Position)
template<class T>
internalToRecord () const

Private Attributes

QDate m_occurrence
QTime m_start
QTime m_end
bool m_isAllDay: 1
enum Position m_pos
Datadata
Private * d

Friends

class OPimBase

Classes

struct  Data

Detailed Description

An OPimOccurrence represents a occurence for one day of a OPimRecord.

An OPimOccurrence represents the occurrence of one OPimRecord for a period of Time for one day. An occurrence can spawn more then one day and then is splitted into multiple OPimOccurrence. By attributes you can find if a OPimOccurrence is the beginning and end, begin, end or is midway of a multiday occurrence.

Definition at line 55 of file opimoccurrence.h.


Member Typedef Documentation

typedef QValueList<OPimOccurrence> Opie::OPimOccurrence::List
 

Definition at line 58 of file opimoccurrence.h.


Member Enumeration Documentation

enum Opie::OPimOccurrence::Position
 

The position of the OPimOccurrence in a possible MultiDay Occurrence.

Enumeration values:
MidWay 
Start 
End 
StartEnd 

Definition at line 63 of file opimoccurrence.h.


Constructor & Destructor Documentation

Opie::OPimOccurrence::OPimOccurrence  ) 
 

Definition at line 67 of file opimoccurrence.cpp.

References data.

Opie::OPimOccurrence::OPimOccurrence const OPimOccurrence  ) 
 

Copy constructor.

Definition at line 49 of file opimoccurrence.cpp.

References data, m_end, m_isAllDay, m_occurrence, m_pos, m_start, and QShared::ref().

Opie::OPimOccurrence::~OPimOccurrence  ) 
 

Definition at line 74 of file opimoccurrence.cpp.

References deref().

Opie::OPimOccurrence::OPimOccurrence OPimOccurrence::Data ,
enum  Position
[private]
 

Definition at line 41 of file opimoccurrence.cpp.


Member Function Documentation

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

QDate Opie::OPimOccurrence::date  )  const
 

Return the QDate where this OPimOccurrence takes place.

Returns:
the QDate where this OPimOccurrence occurrs.

Definition at line 178 of file opimoccurrence.cpp.

References m_occurrence.

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

For internal use only.

Definition at line 106 of file opimoccurrence.cpp.

References data, and QShared::deref().

Referenced by operator=(), and ~OPimOccurrence().

QDateTime Opie::OPimOccurrence::endDateTime  )  const
 

Definition at line 201 of file opimoccurrence.cpp.

References m_end, and m_occurrence.

QTime Opie::OPimOccurrence::endTime  )  const
 

Definition at line 193 of file opimoccurrence.cpp.

References m_end.

Referenced by PIMListView::makeString().

template<class Record>
Record Opie::OPimOccurrence::internalToRecord  )  const [private]
 

Definition at line 246 of file opimoccurrence.cpp.

References Opie::OPimOccurrence::Data::backend, data, Opie::OPimBase::record(), Opie::OPimOccurrence::Data::record, and Opie::OPimOccurrence::Data::uid.

bool Opie::OPimOccurrence::isAllDay  )  const
 

Is a QTime associated to the OPimOccurrence.

Returns:
Return true if no QTime is associated

Definition at line 169 of file opimoccurrence.cpp.

References m_isAllDay.

int Opie::OPimOccurrence::length  )  const
 

-1 if no time is associated otherwise the length of the occurrence in hours

Definition at line 223 of file opimoccurrence.cpp.

References QTime::hour(), m_end, m_isAllDay, m_start, and QTime::minute().

QString Opie::OPimOccurrence::location  )  const
 

Definition at line 210 of file opimoccurrence.cpp.

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

QString Opie::OPimOccurrence::note  )  const
 

Definition at line 214 of file opimoccurrence.cpp.

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

bool Opie::OPimOccurrence::operator!= const OPimOccurrence  )  const
 

Definition at line 307 of file opimoccurrence.cpp.

bool Opie::OPimOccurrence::operator< const OPimOccurrence  )  const
 

Definition at line 273 of file opimoccurrence.cpp.

References m_occurrence, and m_start.

bool Opie::OPimOccurrence::operator<= const OPimOccurrence  )  const
 

Definition at line 282 of file opimoccurrence.cpp.

References m_occurrence.

OPimOccurrence & Opie::OPimOccurrence::operator= const OPimOccurrence  ) 
 

Copy Operator.

Definition at line 81 of file opimoccurrence.cpp.

References data, deref(), m_end, m_isAllDay, m_occurrence, m_pos, m_start, and QShared::ref().

bool Opie::OPimOccurrence::operator== const OPimOccurrence  )  const
 

Definition at line 286 of file opimoccurrence.cpp.

References data, Opie::OPimOccurrence::Data::location, m_end, m_isAllDay, m_occurrence, m_start, Opie::OPimOccurrence::Data::note, Opie::OPimOccurrence::Data::summary, and Opie::OPimOccurrence::Data::uid.

bool Opie::OPimOccurrence::operator> const OPimOccurrence  )  const
 

Definition at line 311 of file opimoccurrence.cpp.

bool Opie::OPimOccurrence::operator>= const OPimOccurrence  )  const
 

Definition at line 315 of file opimoccurrence.cpp.

enum OPimOccurrence::Position Opie::OPimOccurrence::position  )  const
 

Definition at line 231 of file opimoccurrence.cpp.

References m_pos.

Opie::Core::OSharedPointer< OPimRecord > Opie::OPimOccurrence::record  )  const
 

Definition at line 240 of file opimoccurrence.cpp.

References Opie::OPimOccurrence::Data::backend, data, Opie::OPimBase::record(), Opie::OPimOccurrence::Data::record, and Opie::OPimOccurrence::Data::uid.

void Opie::OPimOccurrence::setPeriod const QDate from,
const QTime start,
const QTime end
 

Set the period of this Occurrence with a QTime associated.

Parameters:
from The QDate of the Occurrence
start The Start QTime of the Occurrence
end The End QTime of the Occurrence

Definition at line 155 of file opimoccurrence.cpp.

References m_end, m_isAllDay, m_occurrence, and m_start.

void Opie::OPimOccurrence::setPeriod const QDateTime from,
const QDateTime to
 

Set the period of this Occurrence with a QTime associated (overloaded).

Set the period of time for this Occurrence. Each Ocurrence is limited to one day. Using this Method will make

See also:
isAllDay() return false. If
from and to are on two different days the QDate of the
from QDateTime will be used.
Parameters:
from The Start Date Time of the Occurrence
to The End Date Time of the Occurrence

Definition at line 141 of file opimoccurrence.cpp.

References QDateTime::date(), m_end, m_isAllDay, m_occurrence, m_start, and QDateTime::time().

void Opie::OPimOccurrence::setPeriod const QDate from  ) 
 

Set the Occurrence to be All Day on a specified QDate.

If no QTime is associated to a OPimOccurrence use this Method to set the Period of this Occurrence. When using this Method later calls to

See also:
isAllDay() will return true. The Occurrence will be set to occurr on
from.
Parameters:
from The Day this OPimOccurrence occurs

Definition at line 124 of file opimoccurrence.cpp.

References m_end, m_isAllDay, m_occurrence, and m_start.

Referenced by Opie::setPeriod().

void Opie::OPimOccurrence::setPosition enum Position  ) 
 

Definition at line 235 of file opimoccurrence.cpp.

References m_pos.

QDateTime Opie::OPimOccurrence::startDateTime  )  const
 

Definition at line 197 of file opimoccurrence.cpp.

References m_occurrence, and m_start.

QTime Opie::OPimOccurrence::startTime  )  const
 

Return the start time of the OPimOccurrence.

Returns:
Return the Start Time of the OPimOccurrence. It is invalid if
See also:
isAllDay() returns true.

Definition at line 189 of file opimoccurrence.cpp.

References m_start.

Referenced by PIMListView::makeString().

QString Opie::OPimOccurrence::summary  )  const
 

Definition at line 206 of file opimoccurrence.cpp.

References data, and Opie::OPimOccurrence::Data::summary.

Referenced by PIMListView::makeString().

OPimContact Opie::OPimOccurrence::toContact  )  const
 

Definition at line 269 of file opimoccurrence.cpp.

OPimEvent Opie::OPimOccurrence::toEvent  )  const
 

Definition at line 261 of file opimoccurrence.cpp.

Referenced by PIMListView::makeString().

OPimTodo Opie::OPimOccurrence::toTodo  )  const
 

Definition at line 265 of file opimoccurrence.cpp.


Friends And Related Function Documentation

friend class OPimBase [friend]
 

Definition at line 56 of file opimoccurrence.h.


Member Data Documentation

Private* Opie::OPimOccurrence::d [private]
 

Definition at line 134 of file opimoccurrence.h.

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

Definition at line 131 of file opimoccurrence.h.

Referenced by deref(), internalToRecord(), location(), note(), operator=(), operator==(), OPimOccurrence(), record(), and summary().

QTime Opie::OPimOccurrence::m_end [private]
 

Definition at line 123 of file opimoccurrence.h.

Referenced by endDateTime(), endTime(), length(), operator=(), operator==(), OPimOccurrence(), and setPeriod().

bool Opie::OPimOccurrence::m_isAllDay [private]
 

Definition at line 124 of file opimoccurrence.h.

Referenced by isAllDay(), length(), operator=(), operator==(), OPimOccurrence(), and setPeriod().

QDate Opie::OPimOccurrence::m_occurrence [private]
 

Definition at line 122 of file opimoccurrence.h.

Referenced by date(), endDateTime(), operator<(), operator<=(), operator=(), operator==(), OPimOccurrence(), setPeriod(), and startDateTime().

enum Position Opie::OPimOccurrence::m_pos [private]
 

Definition at line 125 of file opimoccurrence.h.

Referenced by operator=(), OPimOccurrence(), position(), and setPosition().

QTime Opie::OPimOccurrence::m_start [private]
 

Definition at line 123 of file opimoccurrence.h.

Referenced by length(), operator<(), operator=(), operator==(), OPimOccurrence(), setPeriod(), startDateTime(), and startTime().


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