Qtopia library API Documentation

Task Class Reference

The Task class holds the data of a todo entry. More...

Inheritance diagram for Task:

Inheritance graph
[legend]
Collaboration diagram for Task:

Collaboration graph
[legend]
List of all members.

Public Types

enum  PriorityValue {
  VeryHigh = 1, High, Normal, Low,
  VeryLow
}

Public Member Functions

 Task ()
 Task (const QMap< int, QString > &fromMap)
 ~Task ()
QMap< int, QStringtoMap () const
void setPriority (int priority)
int priority () const
void setDescription (const QString &description)
const QStringdescription () const
void setDueDate (const QDate &date)
void clearDueDate ()
void setDueDate (const QDate &date, bool hasDue)
void setHasDueDate (bool b)
const QDatedueDate () const
bool hasDueDate () const
void setCompleted (bool b)
bool isCompleted () const
void save (QString &buf) const
bool match (const QRegExp &r) const

Static Public Member Functions

void writeVCalendar (const QString &filename, const QValueList< Task > &tasks)
void writeVCalendar (const QString &filename, const Task &task)
QValueList< TaskreadVCalendar (const QString &filename)

Detailed Description

The Task class holds the data of a todo entry.

This data includes the priority of the task, a description, an optional due date, and whether the task is completed or not.

Definition at line 30 of file task.h.


Constructor & Destructor Documentation

Task::Task  ) 
 

Creates a new, empty task.

Definition at line 50 of file task.cpp.

Task::~Task  ) 
 

Destroys a task.

Definition at line 162 of file task.cpp.


Member Function Documentation

void Task::writeVCalendar const QString filename,
const QValueList< Task > &  tasks
[static]
 

Writes the list of tasks as a set of VCards to the file filename.

Definition at line 343 of file task.cpp.

References QValueList::begin(), QValueList::end(), and QString::utf8().

void Task::writeVCalendar const QString filename,
const Task task
[static]
 

Writes task as a VCard to the file filename.

Definition at line 364 of file task.cpp.

References QString::utf8().

QValueList< Task > Task::readVCalendar const QString filename  )  [static]
 

Returns the set of tasks read as VCards from the file filename.

Definition at line 382 of file task.cpp.

References QValueList::append(), and QString::utf8().

void Task::setPriority int  priority  )  [inline]
 

Sets the priority of the task to priority.

Definition at line 45 of file task.h.

int Task::priority  )  const [inline]
 

Returns the priority of the task.

Definition at line 46 of file task.h.

void Task::setDescription const QString description  )  [inline]
 

Sets the description of the task to description.

Definition at line 52 of file task.h.

const QString & Task::description  )  const [inline]
 

Returns the description of the task.

Definition at line 54 of file task.h.

void Task::setDueDate const QDate date  )  [inline]
 

Sets the due date of the task to date.

Definition at line 90 of file task.h.

References QDate::isValid().

void Task::clearDueDate  )  [inline]
 

Clears the due date of the task.

Definition at line 91 of file task.h.

const QDate & Task::dueDate  )  const [inline]
 

Returns the due date of the task.

Definition at line 64 of file task.h.

bool Task::hasDueDate  )  const [inline]
 

Returns TRUE if there is a due date set for the task. Otherwise returns FALSE.

Definition at line 65 of file task.h.

void Task::setCompleted bool  b  )  [inline]
 

If b is TRUE marks the task as completed. Otherwise marks the task as uncompleted.

Definition at line 67 of file task.h.

bool Task::isCompleted  )  const [inline]
 

Returns TRUE if the task is completed. Otherwise returns FALSE.

Definition at line 68 of file task.h.

bool Task::match const QRegExp regexp  )  const [virtual]
 

Returns TRUE if the task matches the regular expressions regexp. Otherwise returns FALSE.

Reimplemented from Qtopia::Record.

Definition at line 239 of file task.cpp.

References QString::find(), match(), QString::number(), and QDate::toString().

Referenced by match().


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