summaryrefslogtreecommitdiff
path: root/libopie/pim/otodoaccessvcal.h
blob: a90ee9c6688e5bcfd2387b65cea3ce6c06145dbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef OPIE_OTODO_ACCESS_VCAL_H
#define OPIE_OTODO_ACCESS_VCAL_H

#include "otodoaccessbackend.h"

class OTodoAccessVCal : public OTodoAccessBackend {
public:
    OTodoAccessVCal(const QString& );
    ~OTodoAccessVCal();

    bool load();
    bool reload();
    bool save();

    QArray<int> allRecords()const;
    QArray<int> queryByExample( const OTodo& t, int sort, const QDateTime& d = QDateTime() );
    QArray<int> effectiveToDos( const QDate& start,
                                const QDate& end,
                                bool includeNoDates );
    QArray<int> overDue();
    QArray<int> sorted( bool asc, int sortOrder, int sortFilter,
                        int cat );
    OTodo find(int uid)const;
    void clear();
    bool add( const OTodo& );
    bool remove( int uid );
    bool replace( const OTodo& );

    void removeAllCompleted();

private:
    bool m_dirty : 1;
    QString m_file;
    QMap<int, OTodo> m_map;
};

#endif