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

Opie::OPimBackendOccurrence Class Reference

Internal representation of an Occurence. More...

#include </home/clem/local/src/opie/libopie2/opiepim/backend/opimbackendoccurrence.h>

Collaboration diagram for Opie::OPimBackendOccurrence:

Collaboration graph
[legend]
List of all members.

Public Types

typedef QValueList< OPimBackendOccurrenceList

Public Member Functions

 OPimBackendOccurrence ()
 OPimBackendOccurrence (const QDate &date, const UID &, const QString &=QString::null)
 The occurence is only on the specefic Day.
 OPimBackendOccurrence (const QDate &date, const QDate &end, const UID &)
 An Occurrence with a start day and end day without time.
 OPimBackendOccurrence (const QDateTime &start, const QDateTime &end, const UID &uid)
 Use Start and End Date with Time.
QDateTime startDateTime () const
 Return the Start Date and Time.
QDateTime endDateTime () const
 Return the Start Date and Time.
UID uid () const
 Return the UID of the Associated OPimRecord.
bool isAllDay () const
 Return if there is a time associated or not.
QString summary () const
QString location () const
QString note () const
void setStartDate (const QDate &)
 Set the Start Date.
void setStartDateTime (const QDateTime &dt)
 Set the Start Date and Time.
void setEndDate (const QDate &)
 This will set the End Date.
void setEndDateTime (const QDateTime &dt)
 Set the End Date and Time of the occurrence.
void setUid (const UID &)
 This method will set the UID of the Record.
void setSummary (const QString &)
 Set a special summary instead of.
void setLocation (const QString &)
void setNote (const QString &)

Private Attributes

QDateTime m_start
QDateTime m_end
UID m_uid
bool m_haveTime: 1
QString m_summary
QString m_note
QString m_location
Private * d

Detailed Description

Internal representation of an Occurence.

This class is used by the Backends to express Occurences for the Period Based Query to the by the Backend represanted Database. In the Frontend this single representation is splitted into per day

See also:
OPimOccurrence 's. OPimBackendOccurrence can be understand as a hint to the Frontend and must contain the

UID, the Start Date and End Date of the Occurence. If you have no time associated to the datetime use the QDate constructors. If OPimRecord::summary() does not describe the Occurrence right you can call setSummary() and then the supplied summary will be used. All Dates and Times are in the local time.

Version:
1.0
Author:
Holger Hans Peter Freyther zecke@handhelds.org

Definition at line 61 of file opimbackendoccurrence.h.


Member Typedef Documentation

typedef QValueList<OPimBackendOccurrence> Opie::OPimBackendOccurrence::List
 

Definition at line 63 of file opimbackendoccurrence.h.


Constructor & Destructor Documentation

Opie::OPimBackendOccurrence::OPimBackendOccurrence  ) 
 

Definition at line 34 of file opimbackendoccurrence.cpp.

Opie::OPimBackendOccurrence::OPimBackendOccurrence const QDate date,
const UID uid,
const QString sum = QString::null
 

The occurence is only on the specefic Day.

If an occurrence is only a day without any time associated use this Constructor.

See also:
timeAssociated() will return false.
Parameters:
date The Date this Occurence takes place
uid The
See also:
UID of the associated OPimRecord
Parameters:
sum The optional summary

Definition at line 47 of file opimbackendoccurrence.cpp.

Opie::OPimBackendOccurrence::OPimBackendOccurrence const QDate date,
const QDate end,
const UID uid
 

An Occurrence with a start day and end day without time.

Overloaded Constructor. Use this if you've a start date and end date but no time. If you need to overwrite the summary use setSummary.

See also:
timeAssociated() will return false.
Parameters:
date The Start Date
end Tne End Date
uid The UID of the associated record
See also:
setSummary

Definition at line 68 of file opimbackendoccurrence.cpp.

Opie::OPimBackendOccurrence::OPimBackendOccurrence const QDateTime date,
const QDateTime end,
const UID uid
 

Use Start and End Date with Time.

Overloaded Constructor to use Dates with Time time associated to it.

See also:
timeAssociated() will return true.
Parameters:
date The Start Date and Time of the occurrence
end The End Date and Time of the occurrence
uid The UID of the
See also:
OPimRecord.

Definition at line 85 of file opimbackendoccurrence.cpp.


Member Function Documentation

QDateTime Opie::OPimBackendOccurrence::endDateTime  )  const
 

Return the Start Date and Time.

Returns:
This will return the end Date and Time. The limitation for Time is the same as in startDateTime
See also:
startDateTime()

Definition at line 111 of file opimbackendoccurrence.cpp.

References m_end.

Referenced by Opie::OPimBase::convertOccurrenceFromBackend(), and Opie::ODateBookAccessBackend::filterOccurrences().

bool Opie::OPimBackendOccurrence::isAllDay  )  const
 

Return if there is a time associated or not.

If a time is present with start and end date this method will return true. There is no direct way to manipulate that attribute. But

See also:
setStartDate and

setStartDateTime will change it.

Returns:
Return true if a time is available with the date

Definition at line 135 of file opimbackendoccurrence.cpp.

References m_haveTime.

Referenced by Opie::OPimBase::convertOccurrenceFromBackend().

QString Opie::OPimBackendOccurrence::location  )  const
 

Definition at line 146 of file opimbackendoccurrence.cpp.

References m_location.

Referenced by Opie::OPimBase::convertOccurrenceFromBackend().

QString Opie::OPimBackendOccurrence::note  )  const
 

Definition at line 150 of file opimbackendoccurrence.cpp.

References m_note.

Referenced by Opie::OPimBase::convertOccurrenceFromBackend().

void Opie::OPimBackendOccurrence::setEndDate const QDate end  ) 
 

This will set the End Date.

This method will set the End Date. The timeAssociated attribute will not be changed.

Parameters:
end The End Date to be set

Definition at line 192 of file opimbackendoccurrence.cpp.

References m_end.

void Opie::OPimBackendOccurrence::setEndDateTime const QDateTime dt  ) 
 

Set the End Date and Time of the occurrence.

This will set the End Date and Time but will not change the timeAssociated attribute.

Parameters:
dt The End Date and Time to be set.

Definition at line 204 of file opimbackendoccurrence.cpp.

References m_end.

void Opie::OPimBackendOccurrence::setLocation const QString  ) 
 

Definition at line 233 of file opimbackendoccurrence.cpp.

References m_location.

void Opie::OPimBackendOccurrence::setNote const QString  ) 
 

Definition at line 237 of file opimbackendoccurrence.cpp.

References m_note.

void Opie::OPimBackendOccurrence::setStartDate const QDate start  ) 
 

Set the Start Date.

This method will set the start date and internally will mark this occurrence to have no time associated to both start and end date. A call to timeAssociated will return false after using this method.

Parameters:
start The Start Date

Definition at line 166 of file opimbackendoccurrence.cpp.

References m_haveTime, and m_start.

void Opie::OPimBackendOccurrence::setStartDateTime const QDateTime dt  ) 
 

Set the Start Date and Time.

Set the Start Date and Time. After this call

See also:
timeAssociated will return true.
Parameters:
dt The Start Date and Time to be set

Definition at line 179 of file opimbackendoccurrence.cpp.

References m_haveTime, and m_start.

void Opie::OPimBackendOccurrence::setSummary const QString str  ) 
 

Set a special summary instead of.

See also:
OPimRecord::summary()
If
See also:
OPimRecord::summary() doesn't describe the occurrence reason you can set a custom summary for the Occurrence.
Parameters:
str The to be set Summary

Definition at line 229 of file opimbackendoccurrence.cpp.

References m_summary.

Referenced by Opie::OPimTodoAccessBackend::occurrences().

void Opie::OPimBackendOccurrence::setUid const UID uid  ) 
 

This method will set the UID of the Record.

Set the UID of the OPimRecord to be associated with this OPimRecurrence.

Parameters:
uid The UID of the associated OPimRecord to be set

Definition at line 216 of file opimbackendoccurrence.cpp.

References m_uid.

QDateTime Opie::OPimBackendOccurrence::startDateTime  )  const
 

Return the Start Date and Time.

Returns:
This method will return the start Date and Time. Time is only valid if
See also:
timeAssociated() is true.

Definition at line 99 of file opimbackendoccurrence.cpp.

References m_start.

Referenced by Opie::OPimBase::convertOccurrenceFromBackend(), and Opie::ODateBookAccessBackend::filterOccurrences().

QString Opie::OPimBackendOccurrence::summary  )  const
 

Returns:
The special summary that will overwrite OPimRecord::summary

Definition at line 142 of file opimbackendoccurrence.cpp.

References m_summary.

Referenced by Opie::OPimBase::convertOccurrenceFromBackend().

UID Opie::OPimBackendOccurrence::uid  )  const
 

Return the UID of the Associated OPimRecord.

Returns:
the associated OPimRecord

Definition at line 120 of file opimbackendoccurrence.cpp.

References m_uid.

Referenced by Opie::OPimBase::convertOccurrenceFromBackend().


Member Data Documentation

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

Definition at line 103 of file opimbackendoccurrence.h.

QDateTime Opie::OPimBackendOccurrence::m_end [private]
 

Definition at line 98 of file opimbackendoccurrence.h.

Referenced by endDateTime(), setEndDate(), and setEndDateTime().

bool Opie::OPimBackendOccurrence::m_haveTime [private]
 

Definition at line 100 of file opimbackendoccurrence.h.

Referenced by isAllDay(), setStartDate(), and setStartDateTime().

QString Opie::OPimBackendOccurrence::m_location [private]
 

Definition at line 101 of file opimbackendoccurrence.h.

Referenced by location(), and setLocation().

QString Opie::OPimBackendOccurrence::m_note [private]
 

Definition at line 101 of file opimbackendoccurrence.h.

Referenced by note(), and setNote().

QDateTime Opie::OPimBackendOccurrence::m_start [private]
 

Definition at line 98 of file opimbackendoccurrence.h.

Referenced by setStartDate(), setStartDateTime(), and startDateTime().

QString Opie::OPimBackendOccurrence::m_summary [private]
 

Definition at line 101 of file opimbackendoccurrence.h.

Referenced by setSummary(), and summary().

UID Opie::OPimBackendOccurrence::m_uid [private]
 

Definition at line 99 of file opimbackendoccurrence.h.

Referenced by setUid(), and uid().


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