otodoaccessxml.h
Go to the documentation of this file.00001 #ifndef OPIE_TODO_ACCESS_XML_H
00002 #define OPIE_TODO_ACCESS_XML_H
00003
00004 #include <qasciidict.h>
00005 #include <qmap.h>
00006
00007 #include "otodoaccessbackend.h"
00008
00009 namespace Opie {
00010 class XMLElement;
00011 };
00012
00013 class OTodoAccessXML : public OTodoAccessBackend {
00014 public:
00018 OTodoAccessXML( const QString& appName,
00019 const QString& fileName = QString::null );
00020 ~OTodoAccessXML();
00021
00022 bool load();
00023 bool reload();
00024 bool save();
00025
00026 QArray<int> allRecords()const;
00027 QArray<int> matchRegexp(const QRegExp &r) const;
00028 QArray<int> queryByExample( const OTodo&, int querysettings, const QDateTime& d = QDateTime() );
00029 OTodo find( int uid )const;
00030 void clear();
00031 bool add( const OTodo& );
00032 bool remove( int uid );
00033 void removeAllCompleted();
00034 bool replace( const OTodo& );
00035
00036
00037 QArray<int> effectiveToDos( const QDate& start,
00038 const QDate& end,
00039 bool includeNoDates );
00040 QArray<int> overDue();
00041 QArray<int> sorted( bool asc, int sortOrder,
00042 int sortFilter, int cat );
00043 QBitArray supports()const;
00044 private:
00045 static QBitArray sup();
00046 void todo( QAsciiDict<int>*, OTodo&,const QCString&,const QString& );
00047 QString toString( const OTodo& )const;
00048 QString toString( const QArray<int>& ints ) const;
00049 QMap<int, OTodo> m_events;
00050 QString m_file;
00051 QString m_app;
00052 bool m_opened : 1;
00053 bool m_changed : 1;
00054 class OTodoAccessXMLPrivate;
00055 OTodoAccessXMLPrivate* d;
00056 int m_year, m_month, m_day;
00057
00058 };
00059
00060 #endif
This file is part of the documentation for OPIE Version 1.1.