author | eilers <eilers> | 2002-11-01 15:10:42 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-11-01 15:10:42 (UTC) |
commit | 28b70b2b7f8fa03ba0991fb73dccf7b46e5c3d1f (patch) (unidiff) | |
tree | d5ead4aa63aed345ce406c7857ba1ec7813272db /libopie2/opiepim/core | |
parent | a098735b8749ead08c658792cc31f95e73045107 (diff) | |
download | opie-28b70b2b7f8fa03ba0991fb73dccf7b46e5c3d1f.zip opie-28b70b2b7f8fa03ba0991fb73dccf7b46e5c3d1f.tar.gz opie-28b70b2b7f8fa03ba0991fb73dccf7b46e5c3d1f.tar.bz2 |
Added regExp-search in database for all fields in a contact.
-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.cpp | 8 | ||||
-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.h | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp index 2ca0283..f868b53 100644 --- a/libopie2/opiepim/core/ocontactaccess.cpp +++ b/libopie2/opiepim/core/ocontactaccess.cpp | |||
@@ -21,6 +21,9 @@ | |||
21 | * ===================================================================== | 21 | * ===================================================================== |
22 | * History: | 22 | * History: |
23 | * $Log$ | 23 | * $Log$ |
24 | * Revision 1.6 2002/11/01 15:10:42 eilers | ||
25 | * Added regExp-search in database for all fields in a contact. | ||
26 | * | ||
24 | * Revision 1.5 2002/10/16 10:52:40 eilers | 27 | * Revision 1.5 2002/10/16 10:52:40 eilers |
25 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) | 28 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) |
26 | * | 29 | * |
@@ -120,6 +123,11 @@ bool OContactAccess::save () | |||
120 | return true; | 123 | return true; |
121 | } | 124 | } |
122 | 125 | ||
126 | ORecordList<OContact> OContactAccess::matchRegexp( const QRegExp &r ) const{ | ||
127 | QArray<int> matchingContacts = m_backEnd -> matchRegexp( r ); | ||
128 | return ( ORecordList<OContact>(matchingContacts, this) ); | ||
129 | } | ||
130 | |||
123 | const uint OContactAccess::querySettings() | 131 | const uint OContactAccess::querySettings() |
124 | { | 132 | { |
125 | return ( m_backEnd->querySettings() ); | 133 | return ( m_backEnd->querySettings() ); |
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h index da9c942..b4921d5 100644 --- a/libopie2/opiepim/core/ocontactaccess.h +++ b/libopie2/opiepim/core/ocontactaccess.h | |||
@@ -17,6 +17,9 @@ | |||
17 | * ===================================================================== | 17 | * ===================================================================== |
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.4 2002/11/01 15:10:42 eilers | ||
21 | * Added regExp-search in database for all fields in a contact. | ||
22 | * | ||
20 | * Revision 1.3 2002/10/16 10:52:40 eilers | 23 | * Revision 1.3 2002/10/16 10:52:40 eilers |
21 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) | 24 | * Added some docu to the interface and now using the cache infrastucture by zecke.. :) |
22 | * | 25 | * |
@@ -48,6 +51,7 @@ | |||
48 | /** Class to access the contacts database. | 51 | /** Class to access the contacts database. |
49 | * This is just a frontend for the real database handling which is | 52 | * This is just a frontend for the real database handling which is |
50 | * done by the backend. | 53 | * done by the backend. |
54 | * @see OPimAccessTemplate | ||
51 | */ | 55 | */ |
52 | class OContactAccess: public QObject, public OPimAccessTemplate<OContact> | 56 | class OContactAccess: public QObject, public OPimAccessTemplate<OContact> |
53 | { | 57 | { |
@@ -81,8 +85,12 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact> | |||
81 | IgnoreCase = 0x0002, | 85 | IgnoreCase = 0x0002, |
82 | RegExp = 0x0004, | 86 | RegExp = 0x0004, |
83 | ExactMatch = 0x0008, | 87 | ExactMatch = 0x0008, |
88 | MatchOne = 0x0010 // Only one Entry must match | ||
84 | }; | 89 | }; |
85 | 90 | ||
91 | |||
92 | ORecordList<OContact> matchRegexp( const QRegExp &r )const; | ||
93 | |||
86 | /** Return all possible settings. | 94 | /** Return all possible settings. |
87 | * @return All settings provided by the current backend | 95 | * @return All settings provided by the current backend |
88 | * (i.e.: query_WildCards & query_IgnoreCase) | 96 | * (i.e.: query_WildCards & query_IgnoreCase) |