Diffstat (limited to 'noncore/unsupported/libopie/pim/otodoaccessxml.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/libopie/pim/otodoaccessxml.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/noncore/unsupported/libopie/pim/otodoaccessxml.h b/noncore/unsupported/libopie/pim/otodoaccessxml.h new file mode 100644 index 0000000..e4850a1 --- a/dev/null +++ b/noncore/unsupported/libopie/pim/otodoaccessxml.h | |||
@@ -0,0 +1,60 @@ | |||
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> matchRegexp(const QRegExp &r) const; | ||
28 | QArray<int> queryByExample( const OTodo&, int querysettings, const QDateTime& d = QDateTime() ); | ||
29 | OTodo find( int uid )const; | ||
30 | void clear(); | ||
31 | bool add( const OTodo& ); | ||
32 | bool remove( int uid ); | ||
33 | void removeAllCompleted(); | ||
34 | bool replace( const OTodo& ); | ||
35 | |||
36 | /* our functions */ | ||
37 | QArray<int> effectiveToDos( const QDate& start, | ||
38 | const QDate& end, | ||
39 | bool includeNoDates ); | ||
40 | QArray<int> overDue(); | ||
41 | QArray<int> sorted( bool asc, int sortOrder, | ||
42 | int sortFilter, int cat ); | ||
43 | QBitArray supports()const; | ||
44 | private: | ||
45 | static QBitArray sup(); | ||
46 | void todo( QAsciiDict<int>*, OTodo&,const QCString&,const QString& ); | ||
47 | QString toString( const OTodo& )const; | ||
48 | QString toString( const QArray<int>& ints ) const; | ||
49 | QMap<int, OTodo> m_events; | ||
50 | QString m_file; | ||
51 | QString m_app; | ||
52 | bool m_opened : 1; | ||
53 | bool m_changed : 1; | ||
54 | class OTodoAccessXMLPrivate; | ||
55 | OTodoAccessXMLPrivate* d; | ||
56 | int m_year, m_month, m_day; | ||
57 | |||
58 | }; | ||
59 | |||
60 | #endif | ||