summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/opimaccesstemplate.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/core/opimaccesstemplate.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/opimaccesstemplate.h53
1 files changed, 42 insertions, 11 deletions
diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h
index 2deb92a..073d5f9 100644
--- a/libopie2/opiepim/core/opimaccesstemplate.h
+++ b/libopie2/opiepim/core/opimaccesstemplate.h
@@ -87,21 +87,58 @@ public:
virtual List allRecords()const;
virtual List matchRegexp( const QRegExp &r ) const;
virtual List queryByExample( const T& t, int querySettings, const QDateTime& d = QDateTime() );
virtual T find( UID uid )const;
virtual T find( UID uid, const QArray<int>&,
uint current, typename OTemplateBase<T>::CacheDirection dir = OTemplateBase<T>::Forward )const;
- virtual List sorted( const List&, bool ascending, int sortOrder,
+ //@}
+
+ /**
+ * Get sorted lists..
+ * @see OPimContactAccess, OPimTodoAccess and ODateBookAccess regarding more info for the following params:
+ * @param list of UID's received by allRecords() or others...
+ * @param sortOrder Setting the sort order defined by enum SortOrder
+ * @param ascending Sort in ascending order if true, otherwise descending
+ * @param sortFilter Setting the sort filter defined by enum SortFilter
+ * @param cat number of category.
+ */
+ virtual List sorted( const List& list, bool ascending, int sortOrder,
int sortFilter, int cat )const;
- virtual List sorted( const List&, bool ascending, int sortOrder,
+
+ /**
+ * Get sorted lists..
+ * @see OPimContactAccess, OPimTodoAccess and ODateBookAccess regarding more info for the following params:
+ * @param list of UID's received by allRecords() or others...
+ * @param sortOrder Setting the sort order defined by enum SortOrder
+ * @param ascending Sort in ascending order if true, otherwise descending
+ * @param sortFilter Setting the sort filter defined by enum SortFilter
+ * @param cats List of categories.
+ */
+ virtual List sorted( const List& list, bool ascending, int sortOrder,
int sortFilter, const QArray<UID>& cats )const;
+
+ /**
+ * Get sorted lists..
+ * @see OPimContactAccess, OPimTodoAccess and ODateBookAccess regarding more info for the following params:
+ * @param ascending Sort in ascending order if true, otherwise descending
+ * @param sortOrder Setting the sort order defined by enum SortOrder
+ * @param sortFilter Setting the sort filter defined by enum SortFilter
+ * @param cat number of category.
+ */
virtual List sorted( bool ascending, int sortOrder, int sortFilter, int cat )const;
- virtual List sorted( bool ascending, int sortOrder, int sortOrder,
- const QArray<UID>& cats )const;
- //@}
+ /**
+ * Get sorted lists..
+ * @see OPimContactAccess, OPimTodoAccess and ODateBookAccess regarding more info for the following params:
+ * @param ascending Sort in ascending order if true, otherwise descending
+ * @param sortOrder Setting the sort order defined by enum SortOrder
+ * @param sortFilter Setting the sort filter defined by enum SortFilter
+ * @param cats List of categories.
+ */
+ virtual List sorted( bool ascending, int sortOrder, int sortFilter,
+ const QArray<UID>& cats )const;
/**
* (Re)Implementation
*/
//@{
UIDArray matchRegexpSimple( const QRegExp& r )const;
UIDArray queryByExampleSimple( const OPimRecord*, int, const QDateTime& )const;
@@ -126,13 +163,12 @@ public:
bool remove( const OPimRecord& );
virtual bool replace( const T& t) ;
//@}
void setReadAhead( uint count );
- virtual T cacheFind( int uid )const;
void cache( const T& )const;
void setSaneCacheSize( int );
QArray<UID> records()const;
protected:
/**
@@ -255,17 +291,12 @@ T OPimAccessTemplate<T>::find( UID uid ) const{
T t = m_backEnd->find( uid );
cache( t );
return t;
}
-template <class T>
-T OPimAccessTemplate<T>::cacheFind( int uid ) const
-{
- return m_cache.find( uid );
-}
/**
* read ahead cache find method ;)
*/
template <class T>
T OPimAccessTemplate<T>::find( UID uid, const QArray<int>& ar,