#include </home/clem/local/src/opie/libopie2/opiepim/core/opimaccesstemplate.h>
Inheritance diagram for Opie::OPimAccessTemplate< T >:


Public Types | |
| typedef OPimRecordList< T > | List |
| typedef OPimAccessBackend< T > | BackEnd |
| typedef OPimCache< T > | Cache |
| enum | Access { Random = 0, SortedAccess } |
Public Member Functions | |
| OPimAccessTemplate (BackEnd *end) | |
| virtual | ~OPimAccessTemplate () |
| bool | load () |
| virtual bool | reload () |
| bool | save () |
| void | clear () |
| bool | wasChangedExternally () const |
| virtual List | allRecords () const |
| virtual List | matchRegexp (const QRegExp &r) const |
| const uint | querySettings () |
| bool | hasQuerySettings (int querySettings) const |
| virtual List | queryByExample (const T &query, int querySettings, const QDateTime &startperiod=QDateTime()) |
| virtual List | queryByExample (const OPimRecord *query, int querySettings, const QDateTime &startperiod=QDateTime()) |
| virtual List | queryByExample (const OPimAccessTemplate::List &uidlist, const T &query, int querySettings, const QDateTime &startperiod=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 &list, bool ascending, int sortOrder, int sortFilter, int cat) const |
| virtual List | sorted (const List &list, bool ascending, int sortOrder, int sortFilter, const QArray< UID > &cats) const |
| virtual List | sorted (bool ascending, int sortOrder, int sortFilter, int cat) const |
| virtual List | sorted (bool ascending, int sortOrder, int sortFilter, const QArray< UID > &cats) const |
| UIDArray | matchRegexpSimple (const QRegExp &r) const |
| UIDArray | queryByExampleSimple (const OPimRecord *, int, const QDateTime &) const |
| UIDArray | sortedSimple (const UIDArray &, bool asc, int sortOrder, int sortFilter, int cat) const |
| UIDArray | sortedSimple (const UIDArray &, bool asc, int sortOrder, int sortFilter, const QArray< int > &) const |
| UIDArray | sortedSimple (bool ascending, int sortOrder, int sortFilter, int cat) const |
| UIDArray | sortedSimple (bool ascending, int sortOrder, int sortFilter, const QArray< int > &) const |
| OPimOccurrence::List | occurrences (const QDate &start, const QDate &end) const |
| OPimOccurrence::List | occurrences (const QDateTime &dt) const |
| virtual bool | add (const T &t) |
| bool | add (const OPimRecord &) |
| bool | add (const OPimRecord *) |
| virtual bool | remove (const T &t) |
| bool | remove (UID uid) |
| bool | remove (const OPimRecord &) |
| virtual bool | replace (const T &t) |
| void | setReadAhead (uint count) |
| void | cache (const T &) const |
| void | setSaneCacheSize (int) |
| QArray< UID > | records () const |
Protected Member Functions | |
| void | invalidateCache () |
| void | setBackEnd (BackEnd *end) |
| BackEnd * | backEnd () |
Protected Attributes | |
| BackEnd * | m_backEnd |
| Cache | m_cache |
Private Attributes | |
| OPimAccessTemplatePrivate * | d |
Definition at line 58 of file opimaccesstemplate.h.
|
|||||
|
Definition at line 68 of file opimaccesstemplate.h. |
|
|||||
|
Definition at line 69 of file opimaccesstemplate.h. |
|
|||||
|
Definition at line 67 of file opimaccesstemplate.h. |
|
|||||
|
Definition at line 63 of file opimaccesstemplate.h. |
|
||||||||||
|
c'tor BackEnd enum Access a small hint on how to handle the backend Definition at line 253 of file opimaccesstemplate.h. References Opie::OPimAccessBackend< T >::setFrontend(). |
|
|||||||||
|
Definition at line 260 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd. |
|
||||||||||
|
Add an Opie PimRecord. Info: Take this if you are working with OPimRecords and you need to add it into any database. But take care that the accessing database is compatible to the real type of OPimRecord !! Otherwise this access will be rejected ! Implements Opie::OPimBase. Definition at line 446 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::add(), oendl, owarn, Opie::OPimBase::rtti(), and t. |
|
||||||||||
|
Implements Opie::OPimBase. Definition at line 427 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::add(), oendl, owarn, and t. |
|
||||||||||
|
add T to the backend
Definition at line 421 of file opimaccesstemplate.h. References Opie::OPimAccessBackend< T >::add(), Opie::OPimAccessTemplate< T >::cache(), and Opie::OPimAccessTemplate< T >::m_backEnd. Referenced by Opie::OPimAccessTemplate< T >::add(), AbView::addEntry(), AddressbookWindow::exportvCard(), Todo::TemplateManager::save(), and AddressbookWindow::slotItemBeam(). |
|
|||||||||
|
return a List of records you can iterate over them Definition at line 301 of file opimaccesstemplate.h. References Opie::OPimAccessBackend< T >::allRecords(), and Opie::OPimAccessTemplate< T >::m_backEnd. Referenced by Todo::TemplateManager::load(), AddressbookWindow::setDocument(), Today::setOwnerField(), and AddressbookWindow::slotItemBeam(). |
|
|||||||||
|
returns the backend Definition at line 502 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd. |
|
||||||||||
|
Put element into Cache Implements Opie::OTemplateBase< T >. Definition at line 522 of file opimaccesstemplate.h. Referenced by Opie::OPimAccessTemplate< T >::add(), and Opie::OPimAccessTemplate< T >::find(). |
|
|||||||||
|
clears the backend and invalidates the backend Implements Opie::OPimBase. Definition at line 409 of file opimaccesstemplate.h. References Opie::OPimAccessBackend< T >::clear(), Opie::OPimAccessTemplate< T >::invalidateCache(), and Opie::OPimAccessTemplate< T >::m_backEnd. Referenced by Todo::TemplateManager::save(). |
|
||||||||||||||||||||||||
|
read ahead cache find method ;) Definition at line 389 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::cache(), Opie::OPimCache< T >::contains(), Opie::OPimAccessBackend< T >::find(), Opie::OPimCache< T >::find(), Opie::OPimAccessTemplate< T >::m_backEnd, Opie::OPimAccessTemplate< T >::m_cache, and t. |
|
||||||||||
|
||||||||||
|
Check whether settings are correct for queryByExample().
Definition at line 332 of file opimaccesstemplate.h. References Opie::OPimAccessBackend< T >::hasQuerySettings(), and Opie::OPimAccessTemplate< T >::m_backEnd. Referenced by Birthday::_entries(), Birthday::entries(), AddressBookPluginWidget::getAddress(), and AbView::setShowByLetter(). |
|
|||||||||
|
invalidate the cache Definition at line 498 of file opimaccesstemplate.h. References Opie::OPimCache< T >::invalidate(), and Opie::OPimAccessTemplate< T >::m_cache. Referenced by Opie::OPimAccessTemplate< T >::clear(), Opie::OPimAccessTemplate< T >::load(), and Opie::OPimAccessTemplate< T >::reload(). |
|
|||||||||
|
load from the backend Implements Opie::OPimBase. Definition at line 268 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::invalidateCache(), Opie::OPimAccessBackend< T >::load(), and Opie::OPimAccessTemplate< T >::m_backEnd. Referenced by Todo::TemplateManager::load(), TodoSearch::load(), DatebookSearch::load(), Todo::TemplateManager::save(), Today::setOwnerField(), MainWindow::slotDesktopReceive(), MainWindow::slotLoad(), and TodolistPluginWidget::TodolistPluginWidget(). |
|
||||||||||
|
return a List of records that match the regex Definition at line 312 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::matchRegexp(). Referenced by TodoSearch::search(), DatebookSearch::search(), AdressSearch::search(), and AbView::slotDoFind(). |
|
||||||||||
|
(Re)Implementation Implements Opie::OPimBase. Definition at line 593 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::matchRegexp(). |
|
||||||||||
|
Implements Opie::OPimBase. Definition at line 585 of file opimaccesstemplate.h. References Opie::OPimBase::convertOccurrenceFromBackend(), Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::occurrences(). |
|
||||||||||||||||
|
Implements Opie::OPimBase. Definition at line 575 of file opimaccesstemplate.h. References Opie::OPimBase::convertOccurrenceFromBackend(), Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::occurrences(). Referenced by MainWindow::slotLoadForDay(). |
|
||||||||||||||||||||||||
|
Incremental query by example search interface. Providing incremental search, this one provides the feature to search in a list of records which may be returned by an other search. "Query by Example" provides a very powerful search engine. Use the query object (this may be a contact, a todo or databook event) as a search mask which is converted into a query regarding the querySettings. If a time period is needed (as for OpimBase::DateDiff), you have to use the date/time in the query object and the startperiod (the last parameter).
Definition at line 364 of file opimaccesstemplate.h. References list, Opie::OPimAccessTemplate< T >::m_backEnd, Opie::OPimAccessBackend< T >::queryByExample(), and Opie::OPimRecordList< T >::uids(). |
|
||||||||||||||||||||
|
Generic query by example search interface. This is a special version which handles generic OPimRecord types. They are converted automatically into the right datatype. "Query by Example" provides a very powerful search engine. Use the query object (this may be a contact, a todo or databook event) as a search mask which is converted into a query regarding the querySettings. If a time period is needed (as for OpimBase::DateDiff), you have to use the date/time in the query object and the startperiod (the last parameter).
Definition at line 348 of file opimaccesstemplate.h. References list, Opie::OPimAccessTemplate< T >::m_backEnd, oendl, owarn, Opie::OPimAccessBackend< T >::queryByExample(), and Opie::OPimRecord::rtti(). |
|
||||||||||||||||||||
|
Query by example search interface. "Query by Example" provides a very powerful search engine. Use the query object (this may be a contact, a todo or databook event) as a search mask which is converted into a query regarding the querySettings. If a time period is needed (as for OpimBase::DateDiff), you have to use the date/time in the query object and the startperiod (the last parameter).
Definition at line 339 of file opimaccesstemplate.h. References list, Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::queryByExample(). Referenced by Birthday::_entries(), Birthday::entries(), AddressBookPluginWidget::getAddress(), and AbView::setShowByLetter(). |
|
||||||||||||||||||||
|
Implements Opie::OPimBase. Definition at line 598 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::queryByExample(). |
|
|||||||||
|
Return all possible settings for queryByExample().
Definition at line 327 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::querySettings(). |
|
|||||||||
|
find the OPimRecord uid Implements Opie::OPimBase. Definition at line 322 of file opimaccesstemplate.h. References Opie::OPimAccessBackend< T >::allRecords(), and Opie::OPimAccessTemplate< T >::m_backEnd. |
|
|||||||||
|
Reload database. You should execute this function if the external database was changed. This function will load the external database and afterwards rejoin the local changes. Therefore the local database will be set consistent. Definition at line 280 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::invalidateCache(), Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::reload(). Referenced by TodolistPluginWidget::refresh(), AddressBookPluginWidget::refresh(), TodolistPluginWidget::reinitialize(), and AbView::reload(). |
|
||||||||||
|
Implements Opie::OPimBase. Definition at line 479 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::remove(). |
|
||||||||||
|
remove the OPimRecord with uid
Definition at line 474 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, Opie::OPimAccessTemplate< T >::m_cache, Opie::OPimAccessBackend< T >::remove(), and Opie::OPimCache< T >::remove(). |
|
||||||||||
|
remove T from the backend
Definition at line 464 of file opimaccesstemplate.h. Referenced by Opie::OPimAccessTemplate< T >::remove(), and AbView::removeEntry(). |
|
||||||||||
|
replace T from backend
Definition at line 489 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, Opie::OPimAccessTemplate< T >::m_cache, Opie::OPimAccessBackend< T >::replace(), and Opie::OPimCache< T >::replace(). Referenced by AbView::replaceEntry(). |
|
|||||||||
|
Save contacts database. Save is more a "commit". After calling this function, all changes are public available.
Implements Opie::OPimBase. Reimplemented in Opie::OPimContactAccess. Definition at line 291 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::save(). Referenced by Todo::TemplateManager::save(). |
|
||||||||||
|
Definition at line 516 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::setFrontend(). |
|
||||||||||
|
Definition at line 531 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::setReadAhead(). |
|
||||||||||
|
Implements Opie::OTemplateBase< T >. Definition at line 527 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_cache, and Opie::OPimCache< T >::setSize(). |
|
||||||||||||||||||||||||
|
Get sorted lists..
Definition at line 567 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::sorted(). |
|
||||||||||||||||||||||||
|
Get sorted lists..
Definition at line 557 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::sorted(). |
|
||||||||||||||||||||||||||||
|
Get sorted lists..
Definition at line 548 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, Opie::OPimAccessBackend< T >::sorted(), and Opie::OPimRecordList< T >::uids(). |
|
||||||||||||||||||||||||||||
|
Get sorted lists..
Definition at line 537 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::sorted(). Referenced by AddressPicker::AddressPicker(), AddressBookPluginWidget::getAddress(), TodolistPluginWidget::getTodo(), AbView::load(), and AbView::setShowByLetter(). |
|
||||||||||||||||||||||||
|
Definition at line 633 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::sorted(). |
|
||||||||||||||||||||||||
|
Implements Opie::OPimBase. Definition at line 623 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::sorted(). |
|
||||||||||||||||||||||||||||
|
Definition at line 615 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::sorted(). |
|
||||||||||||||||||||||||||||
|
Implements Opie::OPimBase. Definition at line 605 of file opimaccesstemplate.h. References Opie::OPimAccessTemplate< T >::m_backEnd, and Opie::OPimAccessBackend< T >::sorted(). |
|
|||||||||
|
if the resource was changed externally You should use the signal handling instead of polling possible changes ! zecke: Do you implement a signal for otodoaccess ? Reimplemented in Opie::OPimContactAccess. Definition at line 512 of file opimaccesstemplate.h. |
|
|||||
|
Reimplemented from Opie::OTemplateBase< T >. Reimplemented in Opie::OPimContactAccess, Opie::ODateBookAccess, and Opie::OPimTodoAccess. Definition at line 244 of file opimaccesstemplate.h. |
|
|||||
|
|||||
1.4.2