libopie PIM API Documentation

OTodo Class Reference

#include <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 &)
 Copy c'tor.

 ~OTodo ()
 destructor

bool isCompleted () const
 Is this event completed?

bool hasDueDate () const
 Does this Event have a deadline.

bool hasStartDate () const
bool hasCompletedDate () const
int priority () const
 What is the priority?

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

QDate dueDate () const
 The due Date.

QDate startDate () const
 When did it start?

QDate completedDate () const
 When was it completed?

bool hasState () const
 does it have a state?

OPimState state () const
 What is the state of this OTodo?

bool hasRecurrence () const
 has recurrence?

ORecur recurrence () const
 the recurrance of this

bool hasMaintainer () const
 does this OTodo have a maintainer?

OPimMaintainer maintainer () const
 the Maintainer of this OTodo

QString description () const
 The description of the todo.

QString summary () const
 A small summary of the todo.

QString toRichText () const
 Return this todoevent in a RichText formatted QString.

bool hasNotifiers () const
OPimNotifyManagernotifiers ()
 return a reference to our notifiers...

const OPimNotifyManagernotifiers () const
QString type () const
 reimplementations

QString toShortText () const
 a small one line summary

QString recordField (int id) const
 the name for a recordField

QMap< int, QStringtoMap () const
 toMap puts all data into the map.

void setCompleted (bool completed)
 Set if this Todo is completed.

void setHasDueDate (bool hasDate)
 set if this todo got an end data

void setPriority (int priority)
 Set the priority of the Todo.

void setProgress (ushort progress)
 Set the progress.

void setDueDate (const QDate &date)
 set the end date

void setStartDate (const QDate &date)
 set the start date

void setCompletedDate (const QDate &date)
 set the completed date

void setRecurrence (const ORecur &)
void setDescription (const QString &)
void setSummary (const QString &)
void setState (const OPimState &state)
 set the state of a Todo

void setMaintainer (const OPimMaintainer &)
 set the Maintainer Mode

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

int rtti ()

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 89 of file otodo.cpp.

References Qtopia::Record::idsFromString(), QStringList::join(), Qtopia::Record::setCategories(), and Qtopia::simplifyMultiLineSpace().

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 68 of file otodo.cpp.

References Qtopia::Record::setCategories(), and Qtopia::simplifyMultiLineSpace().

OTodo::OTodo const OTodo  ) 
 

Copy c'tor.

Definition at line 53 of file otodo.cpp.

OTodo::~OTodo  ) 
 

destructor

Definition at line 59 of file otodo.cpp.


Member Function Documentation

bool OTodo::isCompleted  )  const
 

Is this event completed?

Definition at line 127 of file otodo.cpp.

Referenced by completed(), and vobjByEvent().

bool OTodo::hasDueDate  )  const
 

Does this Event have a deadline.

Definition at line 131 of file otodo.cpp.

Referenced by deadline(), OTodoAccessXML::load(), toRichText(), and vobjByEvent().

bool OTodo::hasStartDate  )  const
 

Definition at line 135 of file otodo.cpp.

bool OTodo::hasCompletedDate  )  const
 

Definition at line 138 of file otodo.cpp.

int OTodo::priority  )  const
 

What is the priority?

Definition at line 141 of file otodo.cpp.

Referenced by priority(), toRichText(), and vobjByEvent().

ushort OTodo::progress  )  const
 

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

Definition at line 149 of file otodo.cpp.

Referenced by toRichText().

QDate OTodo::dueDate  )  const
 

The due Date.

Definition at line 153 of file otodo.cpp.

Referenced by deadline(), OTodoAccessXML::load(), toRichText(), and vobjByEvent().

QDate OTodo::startDate  )  const
 

When did it start?

Definition at line 157 of file otodo.cpp.

QDate OTodo::completedDate  )  const
 

When was it completed?

Definition at line 160 of file otodo.cpp.

bool OTodo::hasState  )  const
 

does it have a state?

Definition at line 167 of file otodo.cpp.

OPimState OTodo::state  )  const
 

What is the state of this OTodo?

Definition at line 171 of file otodo.cpp.

bool OTodo::hasRecurrence  )  const
 

has recurrence?

Definition at line 179 of file otodo.cpp.

ORecur OTodo::recurrence  )  const
 

the recurrance of this

Definition at line 183 of file otodo.cpp.

bool OTodo::hasMaintainer  )  const
 

does this OTodo have a maintainer?

Definition at line 188 of file otodo.cpp.

OPimMaintainer OTodo::maintainer  )  const
 

the Maintainer of this OTodo

Definition at line 193 of file otodo.cpp.

QString OTodo::description  )  const
 

The description of the todo.

Definition at line 163 of file otodo.cpp.

Referenced by string(), toRichText(), and vobjByEvent().

QString OTodo::summary  )  const
 

A small summary of the todo.

Definition at line 145 of file otodo.cpp.

Referenced by string(), toRichText(), toShortText(), and vobjByEvent().

QString OTodo::toRichText  )  const [virtual]
 

Return this todoevent in a RichText formatted QString.

Returns a richt text string

Implements OPimRecord.

Definition at line 276 of file otodo.cpp.

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

bool OTodo::hasNotifiers  )  const
 

Definition at line 341 of file otodo.cpp.

OPimNotifyManager & OTodo::notifiers  ) 
 

return a reference to our notifiers...

Definition at line 345 of file otodo.cpp.

const OPimNotifyManager & OTodo::notifiers  )  const
 

Definition at line 350 of file otodo.cpp.

QString OTodo::type  )  const [virtual]
 

reimplementations

Implements OPimRecord.

Definition at line 511 of file otodo.cpp.

References QString::fromLatin1().

QString OTodo::toShortText  )  const [virtual]
 

a small one line summary

Implements OPimRecord.

Definition at line 270 of file otodo.cpp.

References summary().

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

the name for a recordField

Implements OPimRecord.

Definition at line 514 of file otodo.cpp.

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 444 of file otodo.cpp.

References Qtopia::Record::categories(), Category, Completed, DateDay, DateMonth, DateYear, Description, HasDate, Qtopia::Record::idsToString(), QMap::insert(), Priority, Progress, Summary, Qtopia::Record::uid(), and Uid.

void OTodo::setCompleted bool  completed  ) 
 

Set if this Todo is completed.

Definition at line 198 of file otodo.cpp.

Referenced by eventByVObj().

void OTodo::setHasDueDate bool  hasDate  ) 
 

set if this todo got an end data

Definition at line 203 of file otodo.cpp.

Referenced by eventByVObj().

void OTodo::setPriority int  priority  ) 
 

Set the priority of the Todo.

Definition at line 219 of file otodo.cpp.

Referenced by eventByVObj().

void OTodo::setProgress ushort  progress  ) 
 

Set the progress.

Definition at line 265 of file otodo.cpp.

void OTodo::setDueDate const QDate date  ) 
 

set the end date

Definition at line 224 of file otodo.cpp.

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

void OTodo::setStartDate const QDate date  ) 
 

set the start date

Definition at line 229 of file otodo.cpp.

void OTodo::setCompletedDate const QDate date  ) 
 

set the completed date

Definition at line 233 of file otodo.cpp.

void OTodo::setRecurrence const ORecur  ) 
 

Definition at line 244 of file otodo.cpp.

Referenced by OTodoAccessXML::load().

void OTodo::setDescription const QString  ) 
 

Definition at line 208 of file otodo.cpp.

References Qtopia::simplifyMultiLineSpace().

Referenced by eventByVObj().

void OTodo::setSummary const QString  ) 
 

Definition at line 214 of file otodo.cpp.

Referenced by eventByVObj().

void OTodo::setState const OPimState state  ) 
 

set the state of a Todo

Parameters:
state State what the todo should take

Definition at line 237 of file otodo.cpp.

void OTodo::setMaintainer const OPimMaintainer  ) 
 

set the Maintainer Mode

Definition at line 251 of file otodo.cpp.

bool OTodo::isOverdue  ) 
 

Definition at line 259 of file otodo.cpp.

References QDate::currentDate().

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

Reimplemented from Qtopia::Record.

Definition at line 110 of file otodo.cpp.

References QString::number().

bool OTodo::operator< const OTodo toDoEvent  )  const
 

Definition at line 357 of file otodo.cpp.

References priority().

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

Definition at line 369 of file otodo.cpp.

References priority().

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 382 of file otodo.cpp.

References priority().

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

Definition at line 395 of file otodo.cpp.

References priority().

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

Definition at line 408 of file otodo.cpp.

References Qtopia::Record::operator==().

OTodo & OTodo::operator= const OTodo toDoEvent  ) 
 

Definition at line 431 of file otodo.cpp.

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

int OTodo::rtti  )  [static]
 

Reimplemented from OPimRecord.

Definition at line 518 of file otodo.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for OPIE Version 1.1.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:26:28 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001