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

OTodo Class Reference

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

Inheritance diagram for OTodo:

Inheritance graph
[legend]
Collaboration diagram for OTodo:

Collaboration graph
[legend]
List of all members.

Public Types

typedef QValueList< OTodoValueList
enum  RecordFields {
  Uid = Qtopia::UID_ID, Category = Qtopia::CATEGORY_ID, HasDate, Completed,
  Description, Summary, Priority, DateDay,
  DateMonth, DateYear, Progress, CrossReference,
  State, Recurrence, Alarms, Reminders,
  Notifiers, Maintainer, StartDate, CompletedDate
}
enum  TaskPriority {
  VeryHigh = 1, High, Normal, Low,
  VeryLow
}

Public Member Functions

 OTodo (bool completed=false, int priority=Normal, const QStringList &category=QStringList(), const QString &summary=QString::null, const QString &description=QString::null, ushort progress=0, bool hasDate=false, QDate date=QDate::currentDate(), int uid=0)
 OTodo (bool completed, int priority, const QArray< int > &category, const QString &summary=QString::null, const QString &description=QString::null, ushort progress=0, bool hasDate=false, QDate date=QDate::currentDate(), int uid=0)
 OTodo (const OTodo &)
 ~OTodo ()
bool isCompleted () const
bool hasDueDate () const
bool hasStartDate () const
bool hasCompletedDate () const
int priority () const
ushort progress () const
QDate dueDate () const
QDate startDate () const
QDate completedDate () const
bool hasState () const
OPimState state () const
bool hasRecurrence () const
ORecur recurrence () const
bool hasMaintainer () const
OPimMaintainer maintainer () const
QString description () const
QString summary () const
QString toRichText () const
bool hasNotifiers () const
OPimNotifyManagernotifiers ()
const OPimNotifyManagernotifiers () const
QString type () const
QString toShortText () const
QString recordField (int id) const
QMap< int, QStringtoMap () const
void setCompleted (bool completed)
void setHasDueDate (bool hasDate)
void setPriority (int priority)
void setProgress (ushort progress)
void setDueDate (const QDate &date)
void setStartDate (const QDate &date)
void setCompletedDate (const QDate &date)
void setRecurrence (const ORecur &)
void setDescription (const QString &)
void setSummary (const QString &)
void setState (const OPimState &state)
void setMaintainer (const OPimMaintainer &)
bool isOverdue ()
virtual bool match (const QRegExp &r) const
bool operator< (const OTodo &toDoEvent) const
bool operator<= (const OTodo &toDoEvent) const
bool operator!= (const OTodo &toDoEvent) const
bool operator> (const OTodo &toDoEvent) const
bool operator>= (const OTodo &toDoEvent) const
bool operator== (const OTodo &toDoEvent) const
OTodooperator= (const OTodo &toDoEvent)

Static Public Member Functions

static int rtti ()

Private Member Functions

void deref ()
void changeOrModify ()
void copy (OTodoData *src, OTodoData *dest)

Private Attributes

OTodoPrivate * d
OTodoDatadata

Classes

struct  OTodoData

Member Typedef Documentation

typedef QValueList<OTodo> OTodo::ValueList
 

Definition at line 25 of file otodo.h.


Member Enumeration Documentation

enum OTodo::RecordFields
 

Enumeration values:
Uid 
Category 
HasDate 
Completed 
Description 
Summary 
Priority 
DateDay 
DateMonth 
DateYear 
Progress 
CrossReference 
State 
Recurrence 
Alarms 
Reminders 
Notifiers 
Maintainer 
StartDate 
CompletedDate 

Definition at line 26 of file otodo.h.

enum OTodo::TaskPriority
 

Enumeration values:
VeryHigh 
High 
Normal 
Low 
VeryLow 

Definition at line 50 of file otodo.h.


Constructor & Destructor Documentation

OTodo::OTodo bool  completed = false,
int  priority = Normal,
const QStringList category = QStringList(),
const QString summary = QString::null,
const QString description = QString::null,
ushort  progress = 0,
bool  hasDate = false,
QDate  date = QDate::currentDate(),
int  uid = 0
 

Definition at line 88 of file otodo.cpp.

References data, OTodo::OTodoData::date, OTodo::OTodoData::desc, OTodo::OTodoData::hasDate, Qtopia::Record::idsFromString(), OTodo::OTodoData::isCompleted, QStringList::join(), OTodo::OTodoData::priority, OTodo::OTodoData::prog, Qtopia::Record::setCategories(), Qtopia::simplifyMultiLineSpace(), and OTodo::OTodoData::sum.

OTodo::OTodo bool  completed,
int  priority,
const QArray< int > &  category,
const QString summary = QString::null,
const QString description = QString::null,
ushort  progress = 0,
bool  hasDate = false,
QDate  date = QDate::currentDate(),
int  uid = 0
 

Definition at line 67 of file otodo.cpp.

References data, OTodo::OTodoData::date, OTodo::OTodoData::desc, OTodo::OTodoData::hasDate, OTodo::OTodoData::isCompleted, OTodo::OTodoData::priority, OTodo::OTodoData::prog, Qtopia::Record::setCategories(), Qtopia::simplifyMultiLineSpace(), and OTodo::OTodoData::sum.

OTodo::OTodo const OTodo  ) 
 

Copy c'tor

Definition at line 52 of file otodo.cpp.

References data, and QShared::ref().

OTodo::~OTodo  ) 
 

destructor

Definition at line 58 of file otodo.cpp.

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


Member Function Documentation

void OTodo::changeOrModify  )  [inline, private]
 

change or modify looks at the ref count and either creates a new QShared Object or it can modify it right in place

Definition at line 471 of file otodo.cpp.

References copy(), QShared::count, data, QShared::deref(), and qWarning().

Referenced by setCompleted(), setCompletedDate(), setDescription(), setDueDate(), setHasDueDate(), setMaintainer(), setPriority(), setProgress(), setRecurrence(), setStartDate(), setState(), and setSummary().

QDate OTodo::completedDate  )  const
 

When was it completed?

Definition at line 159 of file otodo.cpp.

References OTodo::OTodoData::completed, and data.

Referenced by OTodoAccessXML::toString().

void OTodo::copy OTodoData src,
OTodoData dest
[private]
 

Definition at line 485 of file otodo.cpp.

References OTodo::OTodoData::completed, OTodo::OTodoData::date, OTodo::OTodoData::desc, OTodo::OTodoData::extra, OTodo::OTodoData::hasDate, OTodo::OTodoData::isCompleted, OTodo::OTodoData::maintainer, OTodo::OTodoData::notifiers, OTodo::OTodoData::priority, OTodo::OTodoData::prog, OTodo::OTodoData::recur, OTodo::OTodoData::start, OTodo::OTodoData::state, and OTodo::OTodoData::sum.

Referenced by changeOrModify().

void OTodo::deref  )  [private]
 

Definition at line 421 of file otodo.cpp.

References data, and QShared::deref().

Referenced by operator=().

QString OTodo::description  )  const
 

The description of the todo

Definition at line 162 of file otodo.cpp.

References data, and OTodo::OTodoData::desc.

Referenced by OTodoXMLVector::string(), string(), toRichText(), OTodoAccessXML::toString(), and vobjByEvent().

QDate OTodo::dueDate  )  const
 

The due Date

Definition at line 152 of file otodo.cpp.

References data, and OTodo::OTodoData::date.

Referenced by deadline(), OTodoAccessXML::load(), operator<(), operator<=(), operator>(), operator>=(), toRichText(), OTodoAccessXML::toString(), and vobjByEvent().

bool OTodo::hasCompletedDate  )  const
 

Definition at line 137 of file otodo.cpp.

References OTodo::OTodoData::completed, data, and QDate::isValid().

Referenced by OTodoAccessXML::toString().

bool OTodo::hasDueDate  )  const
 

Does this Event have a deadline

Definition at line 130 of file otodo.cpp.

References data, and OTodo::OTodoData::hasDate.

Referenced by deadline(), OTodoAccessXML::load(), operator<(), operator<=(), operator>(), operator>=(), toRichText(), OTodoAccessXML::toString(), and vobjByEvent().

bool OTodo::hasMaintainer  )  const
 

does this OTodo have a maintainer?

Definition at line 187 of file otodo.cpp.

References data, OTodo::OTodoData::maintainer, OPimMaintainer::mode(), and OPimMaintainer::Undefined.

bool OTodo::hasNotifiers  )  const
 

Definition at line 340 of file otodo.cpp.

References data, OPimNotifyManager::isEmpty(), and OTodo::OTodoData::notifiers.

Referenced by OTodoAccessXML::toString().

bool OTodo::hasRecurrence  )  const
 

has recurrence?

Definition at line 178 of file otodo.cpp.

References data, ORecur::doesRecur(), and OTodo::OTodoData::recur.

Referenced by OTodoAccessXML::toString().

bool OTodo::hasStartDate  )  const
 

Definition at line 134 of file otodo.cpp.

References data, QDate::isValid(), and OTodo::OTodoData::start.

Referenced by OTodoAccessXML::toString().

bool OTodo::hasState  )  const
 

does it have a state?

Definition at line 166 of file otodo.cpp.

References data, OPimState::state(), OTodo::OTodoData::state, and OPimState::Undefined.

Referenced by OTodoAccessXML::toString().

bool OTodo::isCompleted  )  const
 

Is this event completed?

Definition at line 126 of file otodo.cpp.

References data, and OTodo::OTodoData::isCompleted.

Referenced by completed(), OTodoAccessXML::toString(), and vobjByEvent().

bool OTodo::isOverdue  ) 
 

Definition at line 258 of file otodo.cpp.

References QDate::currentDate(), data, OTodo::OTodoData::date, OTodo::OTodoData::hasDate, and OTodo::OTodoData::isCompleted.

OPimMaintainer OTodo::maintainer  )  const
 

the Maintainer of this OTodo

Definition at line 192 of file otodo.cpp.

References data, and OTodo::OTodoData::maintainer.

bool OTodo::match const QRegExp r  )  const [virtual]
 

Reimplemented from Qtopia::Record.

Definition at line 109 of file otodo.cpp.

References data, OTodo::OTodoData::date, OTodo::OTodoData::desc, Description, QString::find(), HasDate, OTodo::OTodoData::hasDate, QString::number(), Priority, OTodo::OTodoData::priority, OPimRecord::setLastHitField(), OTodo::OTodoData::sum, Summary, and QDate::toString().

const OPimNotifyManager & OTodo::notifiers  )  const
 

Definition at line 349 of file otodo.cpp.

References data, and OTodo::OTodoData::notifiers.

OPimNotifyManager & OTodo::notifiers  ) 
 

return a reference to our notifiers...

Definition at line 344 of file otodo.cpp.

References data, and OTodo::OTodoData::notifiers.

Referenced by OTodoAccessXML::todo(), OTodoAccessBackendSQL::todo(), and OTodoAccessXML::toString().

bool OTodo::operator!= const OTodo toDoEvent  )  const [inline]
 

Definition at line 280 of file otodo.h.

bool OTodo::operator< const OTodo toDoEvent  )  const
 

Definition at line 356 of file otodo.cpp.

References dueDate(), hasDueDate(), and priority().

bool OTodo::operator<= const OTodo toDoEvent  )  const
 

Definition at line 368 of file otodo.cpp.

References dueDate(), hasDueDate(), and priority().

OTodo & OTodo::operator= const OTodo toDoEvent  ) 
 

Definition at line 430 of file otodo.cpp.

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

bool OTodo::operator== const OTodo toDoEvent  )  const
 

Definition at line 407 of file otodo.cpp.

References data, OTodo::OTodoData::date, OTodo::OTodoData::desc, OTodo::OTodoData::hasDate, OTodo::OTodoData::isCompleted, OTodo::OTodoData::maintainer, Qtopia::Record::operator==(), OTodo::OTodoData::priority, OTodo::OTodoData::prog, and OTodo::OTodoData::sum.

bool OTodo::operator> const OTodo toDoEvent  )  const
 

Definition at line 381 of file otodo.cpp.

References dueDate(), hasDueDate(), and priority().

bool OTodo::operator>= const OTodo toDoEvent  )  const
 

Definition at line 394 of file otodo.cpp.

References dueDate(), hasDueDate(), and priority().

int OTodo::priority  )  const
 

What is the priority?

Definition at line 140 of file otodo.cpp.

References data, and OTodo::OTodoData::priority.

Referenced by operator<(), operator<=(), operator>(), operator>=(), priority(), toRichText(), OTodoAccessXML::toString(), and vobjByEvent().

ushort OTodo::progress  )  const
 

progress as ushort 0, 20, 40, 60, 80 or 100%

Definition at line 148 of file otodo.cpp.

References data, and OTodo::OTodoData::prog.

Referenced by toRichText(), and OTodoAccessXML::toString().

QString OTodo::recordField int  id  )  const [virtual]
 

the name for a recordField

Implements OPimRecord.

Definition at line 513 of file otodo.cpp.

References QString::null.

ORecur OTodo::recurrence  )  const
 

the recurrance of this

Definition at line 182 of file otodo.cpp.

References data, and OTodo::OTodoData::recur.

Referenced by OTodoAccessXML::toString().

int OTodo::rtti  )  [static]
 

Reimplemented from OPimRecord.

Definition at line 517 of file otodo.cpp.

References OPimResolver::TodoList.

void OTodo::setCompleted bool  completed  ) 
 

Set if this Todo is completed

Definition at line 197 of file otodo.cpp.

References changeOrModify(), data, and OTodo::OTodoData::isCompleted.

Referenced by eventByVObj(), and OTodoAccessXML::todo().

void OTodo::setCompletedDate const QDate date  ) 
 

set the completed date

Definition at line 232 of file otodo.cpp.

References changeOrModify(), OTodo::OTodoData::completed, and data.

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

void OTodo::setDescription const QString  ) 
 

Definition at line 207 of file otodo.cpp.

References changeOrModify(), data, OTodo::OTodoData::desc, and Qtopia::simplifyMultiLineSpace().

Referenced by eventByVObj(), and OTodoAccessXML::todo().

void OTodo::setDueDate const QDate date  ) 
 

set the end date

Definition at line 223 of file otodo.cpp.

References changeOrModify(), data, and OTodo::OTodoData::date.

Referenced by eventByVObj(), and OTodoAccessXML::load().

void OTodo::setHasDueDate bool  hasDate  ) 
 

set if this todo got an end data

Definition at line 202 of file otodo.cpp.

References changeOrModify(), data, and OTodo::OTodoData::hasDate.

Referenced by eventByVObj(), and OTodoAccessXML::todo().

void OTodo::setMaintainer const OPimMaintainer  ) 
 

set the Maintainer Mode

Definition at line 250 of file otodo.cpp.

References changeOrModify(), data, and OTodo::OTodoData::maintainer.

void OTodo::setPriority int  priority  ) 
 

Set the priority of the Todo

Definition at line 218 of file otodo.cpp.

References changeOrModify(), data, and OTodo::OTodoData::priority.

Referenced by eventByVObj(), OTodoAccessXML::todo(), and OTodoAccessBackendSQL::todo().

void OTodo::setProgress ushort  progress  ) 
 

Set the progress.

Definition at line 264 of file otodo.cpp.

References changeOrModify(), data, and OTodo::OTodoData::prog.

Referenced by OTodoAccessXML::todo().

void OTodo::setRecurrence const ORecur  ) 
 

Definition at line 243 of file otodo.cpp.

References changeOrModify(), data, and OTodo::OTodoData::recur.

Referenced by OTodoAccessXML::load(), and OTodoAccessBackendSQL::todo().

void OTodo::setStartDate const QDate date  ) 
 

set the start date

Definition at line 228 of file otodo.cpp.

References changeOrModify(), data, and OTodo::OTodoData::start.

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

void OTodo::setState const OPimState state  ) 
 

set the state of a Todo

Parameters:
state State what the todo should take

Definition at line 236 of file otodo.cpp.

References changeOrModify(), data, and OTodo::OTodoData::state.

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

void OTodo::setSummary const QString  ) 
 

Definition at line 213 of file otodo.cpp.

References changeOrModify(), data, and OTodo::OTodoData::sum.

Referenced by eventByVObj(), and OTodoAccessXML::todo().

QDate OTodo::startDate  )  const
 

When did it start?

Definition at line 156 of file otodo.cpp.

References data, and OTodo::OTodoData::start.

Referenced by OTodoAccessXML::toString().

OPimState OTodo::state  )  const
 

What is the state of this OTodo?

Definition at line 170 of file otodo.cpp.

References data, and OTodo::OTodoData::state.

Referenced by OTodoAccessXML::toString().

QString OTodo::summary  )  const
 

A small summary of the todo

Definition at line 144 of file otodo.cpp.

References data, and OTodo::OTodoData::sum.

Referenced by OTodoXMLVector::string(), string(), toRichText(), toShortText(), OTodoAccessXML::toString(), and vobjByEvent().

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

toMap puts all data into the map. int relates to ToDoEvent RecordFields enum

Implements OPimRecord.

Definition at line 443 of file otodo.cpp.

References Qtopia::Record::categories(), Completed, data, OTodo::OTodoData::date, DateDay, DateMonth, DateYear, QDate::day(), OTodo::OTodoData::desc, Description, OTodo::OTodoData::hasDate, HasDate, Qtopia::Record::idsToString(), QMap< Key, T >::insert(), OTodo::OTodoData::isCompleted, QDate::month(), QString::number(), OTodo::OTodoData::priority, Priority, OTodo::OTodoData::prog, Progress, OTodo::OTodoData::sum, Summary, Qtopia::Record::uid(), Uid, and QDate::year().

QString OTodo::toRichText  )  const [virtual]
 

Return this todoevent in a RichText formatted QString

Implements OPimRecord.

Definition at line 275 of file otodo.cpp.

References OPimRecord::categoryNames(), QDate::currentDate(), description(), dueDate(), Qtopia::escapeString(), hasDueDate(), OPimRecord::isEmpty(), QString::number(), off, priority(), progress(), summary(), text, QDate::toString(), and tr.

QString OTodo::toShortText  )  const [virtual]
 

a small one line summary

Implements OPimRecord.

Definition at line 269 of file otodo.cpp.

References summary().

QString OTodo::type  )  const [virtual]
 

reimplementations

Implements OPimRecord.

Definition at line 510 of file otodo.cpp.

References QString::fromLatin1().


Member Data Documentation

OTodoPrivate* OTodo::d [private]
 

Reimplemented from OPimRecord.

Definition at line 276 of file otodo.h.

OTodoData* OTodo::data [private]
 

Definition at line 277 of file otodo.h.

Referenced by changeOrModify(), completedDate(), deref(), description(), dueDate(), hasCompletedDate(), hasDueDate(), hasMaintainer(), hasNotifiers(), hasRecurrence(), hasStartDate(), hasState(), isCompleted(), isOverdue(), maintainer(), match(), notifiers(), operator=(), operator==(), OTodo(), priority(), progress(), recurrence(), setCompleted(), setCompletedDate(), setDescription(), setDueDate(), setHasDueDate(), setMaintainer(), setPriority(), setProgress(), setRecurrence(), setStartDate(), setState(), setSummary(), startDate(), state(), summary(), toMap(), and ~OTodo().


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