Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded |

# TodoAccess Class Reference
[qpepim module]

The TodoAccess class provides a safe API for accessing PimTasks. More...

`#include <qtopia/pim/todoaccess.h>`

List of all member functions.

## Public Members

- TodoAccess ()
- ~TodoAccess ()
- bool editSupported () const
- void updateTask ( const PimTask & task )
- void removeTask ( const PimTask & task )
- void addTask ( const PimTask & task )
- PimTask taskForId ( const QUuid & u, bool * ok = 0 ) const

## Signals

- void todoListUpdated ()

## Detailed Description

The TodoAccess class provides a safe API for accessing PimTasks.

TodoAccess provides a safe API for accessing PimTasks stored by Qtopia's Todo application. TodoAccess tries to keep the Todo application in sync with modifications, and alerts the user of the library when modifications have been made by other applications.

See also Qtopia PIM Library.

## Member Function Documentation

### TodoAccess::TodoAccess ()

Constructor.

### TodoAccess::~TodoAccess ()

Cleans up the the Addressbook access.

### void TodoAccess::addTask ( const PimTask & task )

If supported will assign a new unique ID to task and add the task to the pim data.

Adding tasks requires the Tasks service to be available.

If the task is added correctly, an addedTask(int,PimTask) message will be sent to the QPE/PIM channel. The task in this message can be used to determine the assigned ID.

### bool TodoAccess::editSupported () const

Returns TRUE if it is possible to add, remove and update tasks in the pim data. Otherwise returns FALSE.

Adding, removing and tasks contacts requires the Tasks service to be available

### void TodoAccess::removeTask ( const PimTask & task )

If supported will remove task from the pim data;

Removing tasks requires the Tasks service to be available.

### PimTask TodoAccess::taskForId ( const QUuid & u, bool * ok = 0 ) const

If there exists an task with the uid u, return that task. Returns a null task if otherwise.

If ok is non-null, *ok is set to TRUE if the task is found, and FALSE if the task is not found.

### void TodoAccess::todoListUpdated ()`[signal]`

Emitted whenever the todo list is updated.

### void TodoAccess::updateTask ( const PimTask & task )

If supported will update task in the pim data.

Updating tasks requires the Tasks service to be available.

This file is part of the Qtopia platform, copyright © 1995-2004 Trolltech, all rights reserved.