Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference

todoaccess.h

This is the verbatim text of the todoaccess.h include file. It is provided only for illustration; the copyright remains with Trolltech.


/**********************************************************************
** Copyright (C) 2000-2005 Trolltech AS.  All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** Licensees holding a valid license agreement from Trolltech or any of its
** authorized distributors may use this file in accordance with
** the License Agreement provided with the Licensed Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
**   information about Trolltech's Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/

#ifndef TODO_ACCESS_H
#define TODO_ACCESS_H

#include <qobject.h>
#include <qtopia/pim/task.h>

class TodoAccessPrivate;

class TaskIO;
class TodoAccess;
class TaskIteratorMachine;

class QTOPIAPIM_EXPORT TodoIterator
{
public:
    // internal constructors
    TodoIterator(const TaskIO &);
    TodoIterator(TaskIteratorMachine *);

    // public constructors.
    TodoIterator(const TodoAccess &);
    TodoIterator(const TodoIterator &);

    TodoIterator &operator=(const TodoIterator &);
    ~TodoIterator();

    bool atFirst() const;
    bool atLast() const;
    const PimTask *toFirst();
    const PimTask *toLast();

    const PimTask *operator++();
    const PimTask *operator*() const;

    const PimTask *current() const;

private:
    TaskIteratorMachine *machine;
};

class QTOPIAPIM_EXPORT TodoAccess : public QObject {
  Q_OBJECT

      friend class TodoIterator;
  public:

  TodoAccess();
  
  ~TodoAccess();

  bool editSupported() const;
  
  void updateTask(const PimTask& task);

  void removeTask(const PimTask& task);
  
  void addTask(const PimTask& task);

  PimTask taskForId(const QUuid &, bool *ok = 0) const;

 signals:
  void todoListUpdated();

 private:
  TaskIO* taskio;
};


#endif


Copyright © 2005 Trolltech Trademarks
Qtopia version 2.2.0