From 2255284b2e80bdc2881ab9106e9afa614a08c140 Mon Sep 17 00:00:00 2001 From: eilers Date: Wed, 13 Nov 2002 14:14:51 +0000 Subject: Added sorted for Contacts.. --- (limited to 'libopie2/opiepim/core') diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp index f868b53..9c9338e 100644 --- a/libopie2/opiepim/core/ocontactaccess.cpp +++ b/libopie2/opiepim/core/ocontactaccess.cpp @@ -21,6 +21,9 @@ * ===================================================================== * History: * $Log$ + * Revision 1.7 2002/11/13 14:14:51 eilers + * Added sorted for Contacts.. + * * Revision 1.6 2002/11/01 15:10:42 eilers * Added regExp-search in database for all fields in a contact. * @@ -137,6 +140,11 @@ bool OContactAccess::hasQuerySettings ( int querySettings ) const { return ( m_backEnd->hasQuerySettings ( querySettings ) ); } +ORecordList OContactAccess::sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const +{ + QArray matchingContacts = m_backEnd -> sorted( ascending, sortOrder, sortFilter, cat ); + return ( ORecordList(matchingContacts, this) ); +} bool OContactAccess::wasChangedExternally()const diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h index b4921d5..961968f 100644 --- a/libopie2/opiepim/core/ocontactaccess.h +++ b/libopie2/opiepim/core/ocontactaccess.h @@ -17,6 +17,9 @@ * ===================================================================== * History: * $Log$ + * Revision 1.5 2002/11/13 14:14:51 eilers + * Added sorted for Contacts.. + * * Revision 1.4 2002/11/01 15:10:42 eilers * Added regExp-search in database for all fields in a contact. * @@ -91,6 +94,14 @@ class OContactAccess: public QObject, public OPimAccessTemplate ORecordList matchRegexp( const QRegExp &r )const; + /** Return all Contacts in a sorted manner. + * @param ascending true: Sorted in acending order. + * @param sortOrder Currently not implemented. Just defined to stay compatible to otodoaccess + * @param sortFilter Currently not implemented. Just defined to stay compatible to otodoaccess + * @param cat Currently not implemented. Just defined to stay compatible to otodoaccess + */ + List sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const; + /** Return all possible settings. * @return All settings provided by the current backend * (i.e.: query_WildCards & query_IgnoreCase) -- cgit v0.9.0.2