summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/otodoaccessbackend.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/otodoaccessbackend.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/otodoaccessbackend.cpp30
1 files changed, 28 insertions, 2 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessbackend.cpp b/libopie2/opiepim/backend/otodoaccessbackend.cpp
index 5f86be9..f979976 100644
--- a/libopie2/opiepim/backend/otodoaccessbackend.cpp
+++ b/libopie2/opiepim/backend/otodoaccessbackend.cpp
@@ -21,51 +21,77 @@
: = ...= . :.=-
-. .:....=;==+<; You should have received a copy of the GNU
-_. . . )=. = Library General Public License along with
-- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <opie2/otodoaccessbackend.h>
#include <opie2/private/opimtodosortvector.h>
#include <opie2/otodoaccess.h>
#include <qintdict.h>
namespace Opie {
OPimTodoAccessBackend::OPimTodoAccessBackend()
: OPimAccessBackend<OPimTodo>()
{
}
OPimTodoAccessBackend::~OPimTodoAccessBackend() {
}
-UIDArray OPimTodoAccessBackend::queryByExample( const OPimTodo&, int settings,
- const QDateTime& d)const {
+const uint OPimTodoAccessBackend::querySettings() const
+{
+ return 0;
+}
+
+bool OPimTodoAccessBackend::hasQuerySettings (uint querySettings) const
+{
+ return false;
+}
+
+
+UIDArray OPimTodoAccessBackend::queryByExample( const UIDArray& uidlist, const OPimTodo& query, int settings,
+ const QDateTime& endperiod )const
+{
+ qDebug( "Accessing OPimTodoAccessBackend::queryByExample() which is not implemented!" );
return UIDArray();
+
+// odebug << "Using Unaccelerated OPimContactAccessBackend implementation of queryByExample!" << oendl;
+
+// UIDArray m_currentQuery( uid_array.count() );
+// uint arraycounter = 0;
+
+// for( uint it = 0; it < uid_array.count(); ++it ){
+// /* Search all fields and compare them with query object. Store them into list
+// * if all fields matches.
+// */
+// }
+
+
}
UIDArray OPimTodoAccessBackend::sorted( const UIDArray& events, bool asc,
int sortOrder, int sortFilter,
const QArray<int>& categories )const {
odebug << "Using Unaccelerated TodoList sorted Implementation" << oendl;
Internal::OPimTodoSortVector vector(events.count(), asc,sortOrder );
int item = 0;
bool bCat = sortFilter & OPimTodoAccess::FilterCategory ? true : false;
bool bOnly = sortFilter & OPimTodoAccess::OnlyOverDue ? true : false;
bool comp = sortFilter & OPimTodoAccess::DoNotShowCompleted ? true : false;
bool catPassed = false;
int cat;
for ( uint i = 0; i < events.count(); ++i ) {
OPimTodo todo = find( events[i], events, i, Frontend::Forward );
if ( todo.isEmpty() )
continue;
/* show category */
/* -1 == unfiled */
catPassed = false;
for ( uint cat_nu = 0; cat_nu < categories.count(); ++cat_nu ) {