Diffstat (limited to 'libopie2/opiepim/backend/otodoaccesssql.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/otodoaccesssql.h | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/libopie2/opiepim/backend/otodoaccesssql.h b/libopie2/opiepim/backend/otodoaccesssql.h index 415f791..0ba8f3a 100644 --- a/libopie2/opiepim/backend/otodoaccesssql.h +++ b/libopie2/opiepim/backend/otodoaccesssql.h | |||
@@ -48,46 +48,41 @@ public: | |||
48 | OPimTodoAccessBackendSQL( const QString& file ); | 48 | OPimTodoAccessBackendSQL( const QString& file ); |
49 | ~OPimTodoAccessBackendSQL(); | 49 | ~OPimTodoAccessBackendSQL(); |
50 | 50 | ||
51 | bool load(); | 51 | bool load(); |
52 | bool reload(); | 52 | bool reload(); |
53 | bool save(); | 53 | bool save(); |
54 | QArray<int> allRecords()const; | 54 | QArray<UID> allRecords()const; |
55 | 55 | ||
56 | QArray<int> queryByExample( const OPimTodo& t, int settings, const QDateTime& d = QDateTime() ); | 56 | QArray<UID> queryByExample( const OPimTodo& t, int settings, const QDateTime& d = QDateTime() ); |
57 | OPimTodo find(int uid)const; | 57 | OPimTodo find(UID uid)const; |
58 | OPimTodo find(int uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const; | 58 | OPimTodo find(UID uid, const QArray<int>&, uint cur, Frontend::CacheDirection )const; |
59 | void clear(); | 59 | void clear(); |
60 | bool add( const OPimTodo& t ); | 60 | bool add( const OPimTodo& t ); |
61 | bool remove( int uid ); | 61 | bool remove( UID uid ); |
62 | bool replace( const OPimTodo& t ); | 62 | bool replace( const OPimTodo& t ); |
63 | 63 | ||
64 | QArray<int> overDue(); | 64 | QArray<UID> overDue()const; |
65 | QArray<int> effectiveToDos( const QDate& start, | 65 | QArray<UID> effectiveToDos( const QDate& start, |
66 | const QDate& end, bool includeNoDates ); | 66 | const QDate& end, bool includeNoDates )const; |
67 | QArray<int> sorted(bool asc, int sortOrder, int sortFilter, int cat ); | 67 | QArray<UID> matchRegexp( const QRegExp &r ) const; |
68 | |||
69 | QBitArray supports()const; | ||
70 | QArray<int> matchRegexp( const QRegExp &r ) const; | ||
71 | void removeAllCompleted(); | 68 | void removeAllCompleted(); |
72 | 69 | ||
73 | 70 | ||
74 | private: | 71 | private: |
75 | void update()const; | 72 | void update()const; |
76 | void fillDict(); | ||
77 | inline bool date( QDate& date, const QString& )const; | 73 | inline bool date( QDate& date, const QString& )const; |
78 | inline OPimTodo parseResultAndCache( int uid, const Opie::DB::OSQLResult& )const; | 74 | inline OPimTodo parseResultAndCache( UID uid, const Opie::DB::OSQLResult& )const; |
79 | inline OPimTodo todo( Opie::DB::OSQLResultItem& )const; | 75 | inline OPimTodo parse( Opie::DB::OSQLResultItem& )const; |
80 | inline QArray<int> uids( const Opie::DB::OSQLResult& )const; | 76 | inline QArray<UID> uids( const Opie::DB::OSQLResult& )const; |
81 | OPimTodo todo( int uid )const; | 77 | OPimTodo todo( UID uid )const; |
82 | QBitArray sup() const; | 78 | QMap<QString, QString> requestCustom( UID uid ) const; |
83 | QMap<QString, QString> requestCustom( int uid ) const; | ||
84 | 79 | ||
85 | // QAsciiDict<int> m_dict; | 80 | // QAsciiDict<int> m_dict; |
86 | Opie::DB::OSQLDriver* m_driver; | 81 | Opie::DB::OSQLDriver* m_driver; |
87 | QArray<int> m_uids; | 82 | QArray<UID> m_uids; |
88 | bool m_dirty : 1; | 83 | bool m_dirty : 1; |
89 | }; | 84 | }; |
90 | 85 | ||
91 | } | 86 | } |
92 | 87 | ||
93 | #endif | 88 | #endif |