summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/otodoaccess.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/otodoaccess.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/otodoaccess.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/libopie2/opiepim/core/otodoaccess.h b/libopie2/opiepim/core/otodoaccess.h
index 916923f..e13d277 100644
--- a/libopie2/opiepim/core/otodoaccess.h
+++ b/libopie2/opiepim/core/otodoaccess.h
@@ -1,34 +1,63 @@
1/*
2 This file is part of the Opie Project
3 Copyright (C) The Main Author <main-author@whereever.org>
4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5 .=l.
6 .>+-=
7 _;:, .> :=|. This program is free software; you can
8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
10.="- .-=="i, .._ License as published by the Free Software
11 - . .-<_> .<> Foundation; either version 2 of the License,
12 ._= =} : or (at your option) any later version.
13 .%`+i> _;_.
14 .i_,=:_. -<s. This program is distributed in the hope that
15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16 : .. .:, . . . without even the implied warranty of
17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.= = ; Library General Public License for more
20++= -. .` .: details.
21 : = ...= . :.=-
22 -. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA.
28*/
1#ifndef OPIE_TODO_ACCESS_H 29#ifndef OPIE_TODO_ACCESS_H
2#define OPIE_TODO_ACCESS_H 30#define OPIE_TODO_ACCESS_H
3 31
4#include <qobject.h> 32#include <qobject.h>
5#include <qvaluelist.h> 33#include <qvaluelist.h>
6 34
7#include "otodo.h" 35#include <opie2/otodo.h>
8#include "otodoaccessbackend.h" 36#include <opie2/otodoaccessbackend.h>
9#include "opimaccesstemplate.h" 37#include <opie2/opimaccesstemplate.h>
10 38
39namespace Opie {
11 40
12/** 41/**
13 * OTodoAccess 42 * OTodoAccess
14 * the class to get access to 43 * the class to get access to
15 * the todolist 44 * the todolist
16 */ 45 */
17class OTodoAccess : public QObject, public OPimAccessTemplate<OTodo> { 46class OTodoAccess : public QObject, public OPimAccessTemplate<OTodo> {
18 Q_OBJECT 47 Q_OBJECT
19public: 48public:
20 enum SortOrder { Completed = 0, 49 enum SortOrder { Completed = 0,
21 Priority, 50 Priority,
22 Description, 51 Description,
23 Deadline }; 52 Deadline };
24 enum SortFilter{ Category =1, 53 enum SortFilter{ Category =1,
25 OnlyOverDue= 2, 54 OnlyOverDue= 2,
26 DoNotShowCompleted =4 }; 55 DoNotShowCompleted =4 };
27 /** 56 /**
28 * if you use 0l 57 * if you use 0l
29 * the default resource will be 58 * the default resource will be
30 * picked up 59 * picked up
31 */ 60 */
32 OTodoAccess( OTodoAccessBackend* = 0l, enum Access acc = Random ); 61 OTodoAccess( OTodoAccessBackend* = 0l, enum Access acc = Random );
33 ~OTodoAccess(); 62 ~OTodoAccess();
34 63
@@ -81,25 +110,27 @@ public:
81 */ 110 */
82 QBitArray backendSupport( const QString& backend = QString::null )const; 111 QBitArray backendSupport( const QString& backend = QString::null )const;
83 112
84 /** 113 /**
85 * see above but for a specefic attribute. This method was added for convience 114 * see above but for a specefic attribute. This method was added for convience
86 * @param attr The attribute to be queried for 115 * @param attr The attribute to be queried for
87 * @param backend Will be used in the future when we support multiple backends 116 * @param backend Will be used in the future when we support multiple backends
88 */ 117 */
89 bool backendSupports( int attr, const QString& backend = QString::null )const; 118 bool backendSupports( int attr, const QString& backend = QString::null )const;
90signals: 119signals:
91 /** 120 /**
92 * if the OTodoAccess was changed 121 * if the OTodoAccess was changed
93 */ 122 */
94 void changed( const OTodoAccess* ); 123 void changed( const OTodoAccess* );
95 void changed( const OTodoAccess*, int uid ); 124 void changed( const OTodoAccess*, int uid );
96 void added( const OTodoAccess*, int uid ); 125 void added( const OTodoAccess*, int uid );
97 void removed( const OTodoAccess*, int uid ); 126 void removed( const OTodoAccess*, int uid );
98private: 127private:
99 int m_cat; 128 int m_cat;
100 OTodoAccessBackend* m_todoBackEnd; 129 OTodoAccessBackend* m_todoBackEnd;
101 class OTodoAccessPrivate; 130 class OTodoAccessPrivate;
102 OTodoAccessPrivate* d; 131 OTodoAccessPrivate* d;
103}; 132};
104 133
134}
135
105#endif 136#endif