author | zecke <zecke> | 2002-09-22 22:21:51 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-22 22:21:51 (UTC) |
commit | e49230a12104b718c46a34c81b6c0e608c9d40be (patch) (unidiff) | |
tree | 4ef2e58c366a8cf7c4abe04838e255b38613fbcb /libopie/pim/otodoaccessxml.h | |
parent | 3049d9418b882283814ca71baa98420b2a6745db (diff) | |
download | opie-e49230a12104b718c46a34c81b6c0e608c9d40be.zip opie-e49230a12104b718c46a34c81b6c0e608c9d40be.tar.gz opie-e49230a12104b718c46a34c81b6c0e608c9d40be.tar.bz2 |
Add XML resources for todolist and compile fixes for RecordList
Diffstat (limited to 'libopie/pim/otodoaccessxml.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/otodoaccessxml.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/libopie/pim/otodoaccessxml.h b/libopie/pim/otodoaccessxml.h new file mode 100644 index 0000000..be9109d --- a/dev/null +++ b/libopie/pim/otodoaccessxml.h | |||
@@ -0,0 +1,53 @@ | |||
1 | #ifndef OPIE_TODO_ACCESS_XML_H | ||
2 | #define OPIE_TODO_ACCESS_XML_H | ||
3 | |||
4 | #include <qasciidict.h> | ||
5 | #include <qmap.h> | ||
6 | |||
7 | #include "otodoaccessbackend.h" | ||
8 | |||
9 | namespace Opie { | ||
10 | class XMLElement; | ||
11 | }; | ||
12 | |||
13 | class OTodoAccessXML : public OTodoAccessBackend { | ||
14 | public: | ||
15 | /** | ||
16 | * fileName if Empty we will use the default path | ||
17 | */ | ||
18 | OTodoAccessXML( const QString& appName, | ||
19 | const QString& fileName = QString::null ); | ||
20 | ~OTodoAccessXML(); | ||
21 | |||
22 | bool load(); | ||
23 | bool reload(); | ||
24 | bool save(); | ||
25 | |||
26 | QArray<int> allRecords()const; | ||
27 | QArray<int> queryByExample( const OTodo&, int sort ); | ||
28 | OTodo find( int uid )const; | ||
29 | void clear(); | ||
30 | bool add( const OTodo& ); | ||
31 | bool remove( int uid ); | ||
32 | bool replace( const OTodo& ); | ||
33 | |||
34 | /* our functions */ | ||
35 | QArray<int> effectiveToDos( const QDate& start, | ||
36 | const QDate& end, | ||
37 | bool includeNoDates ); | ||
38 | QArray<int> overDue(); | ||
39 | private: | ||
40 | OTodo todo( QAsciiDict<int>*, Opie::XMLElement* )const; | ||
41 | QString toString( const OTodo& )const; | ||
42 | QString toString( const QArray<int>& ints ) const; | ||
43 | QMap<int, OTodo> m_events; | ||
44 | QString m_file; | ||
45 | QString m_app; | ||
46 | bool m_opened : 1; | ||
47 | bool m_changed : 1; | ||
48 | class OTodoAccessXMLPrivate; | ||
49 | OTodoAccessXMLPrivate* d; | ||
50 | |||
51 | }; | ||
52 | |||
53 | #endif | ||