author | eilers <eilers> | 2004-12-20 14:14:07 (UTC) |
---|---|---|
committer | eilers <eilers> | 2004-12-20 14:14:07 (UTC) |
commit | 18e47153532d016d878f47e0ce11cb1a9716218e (patch) (unidiff) | |
tree | 52eb6c25258fda0b2f295a29809c4603f5e17b0b /libopie2/opiepim/core/opimtemplatebase.h | |
parent | 876e48baa20213d8265041cfac3034fe92cb0590 (diff) | |
download | opie-18e47153532d016d878f47e0ce11cb1a9716218e.zip opie-18e47153532d016d878f47e0ce11cb1a9716218e.tar.gz opie-18e47153532d016d878f47e0ce11cb1a9716218e.tar.bz2 |
Recovery of the following Changes:
* Implement fast and full featured version of sorted() for addressbook
* Implement generic queryByExample for all Addressboook backends. It allows incremental search.
* Update of API Documentation
Diffstat (limited to 'libopie2/opiepim/core/opimtemplatebase.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimtemplatebase.h | 57 |
1 files changed, 38 insertions, 19 deletions
diff --git a/libopie2/opiepim/core/opimtemplatebase.h b/libopie2/opiepim/core/opimtemplatebase.h index b238a68..c8abab4 100644 --- a/libopie2/opiepim/core/opimtemplatebase.h +++ b/libopie2/opiepim/core/opimtemplatebase.h | |||
@@ -77,53 +77,72 @@ struct OPimBase { | |||
77 | virtual bool load() = 0; | 77 | virtual bool load() = 0; |
78 | virtual bool save() = 0; | 78 | virtual bool save() = 0; |
79 | //@} | 79 | //@} |
80 | 80 | ||
81 | //@{ | 81 | //@{ |
82 | virtual QArray<UID> records()const = 0; | 82 | virtual QArray<UID> records()const = 0; |
83 | //@} | ||
83 | 84 | ||
84 | /** Constants for query. | 85 | /** Constants for query. |
85 | * Use this constants to set the query parameters. | 86 | * Use this constants to set the query parameters. |
86 | * Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes ! | 87 | * Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes ! |
87 | * @see queryByExample() | 88 | * @see queryByExample() |
88 | */ | 89 | */ |
89 | enum QuerySettings { | 90 | enum QuerySettings { |
90 | WildCards = 0x0001, /** Use Wildcards */ | 91 | /** Use Wildcards */ |
91 | IgnoreCase = 0x0002, /** Ignore the Case */ | 92 | WildCards = 0x0001, |
92 | RegExp = 0x0004, /** Do a Regular Expression match */ | 93 | /** Ignore the Case */ |
93 | ExactMatch = 0x0008, /** It needs to exactly match */ | 94 | IgnoreCase = 0x0002, |
94 | MatchOne = 0x0010, /** Only one Entry must match */ | 95 | /** Do a Regular Expression match */ |
95 | DateDiff = 0x0020, /** Find all entries from today until given date */ | 96 | RegExp = 0x0004, |
96 | DateYear = 0x0040, /** The year matches */ | 97 | /** It needs to exactly match */ |
97 | DateMonth = 0x0080, /** The month matches */ | 98 | ExactMatch = 0x0008, |
98 | DateDay = 0x0100, /** The day matches */ | 99 | /** Only one Entry must match */ |
99 | LastItem = 0xffff /** the last possible name */ | 100 | MatchOne = 0x0010, |
101 | /** Find all entries from today until given date */ | ||
102 | DateDiff = 0x0020, | ||
103 | /** The year matches */ | ||
104 | DateYear = 0x0040, | ||
105 | /** The month matches */ | ||
106 | DateMonth = 0x0080, | ||
107 | /** The day matches */ | ||
108 | DateDay = 0x0100, | ||
109 | /** The last possible name matches */ | ||
110 | LastItem = 0xffff | ||
100 | }; | 111 | }; |
101 | 112 | ||
102 | /** | 113 | /** |
103 | * Common Attributes for the Sort Order | 114 | * Common Attributes for the Sort Order |
104 | */ | 115 | */ |
105 | enum SortOrderBase { | 116 | enum SortOrderBase { |
106 | SortSummary = 0, /** Sort by a Summary of the records */ | 117 | /** Sort by a Summary of the records */ |
107 | SortByCategory = 1, /** Sort by Category */ | 118 | SortSummary = 0, |
108 | SortByDate = 2, /** Sort by Date */ | 119 | /** Sort by Category */ |
109 | SortCustom = 10, /** The First available sort number for the OPimAccessTemplates */ | 120 | SortByCategory = 1, |
110 | LastSortOrderBase = 0xffff /** make this enum 16bit large */ | 121 | /** Sort by Date */ |
122 | SortByDate = 2, | ||
123 | /** The First available sort number for the OPimAccessTemplates */ | ||
124 | SortCustom = 10, | ||
125 | /** make this enum 16bit large */ | ||
126 | LastSortOrderBase = 0xffff | ||
111 | }; | 127 | }; |
112 | 128 | ||
113 | /** | 129 | /** |
114 | * Sort with the help of the \sa sorted function | 130 | * Sort a list of Items with the help of the sorted() function. |
115 | * a list of Items. | ||
116 | * The Item you provide in SortOrder will be used | 131 | * The Item you provide in SortOrder will be used |
117 | * for sorting. | 132 | * for sorting. |
118 | * | 133 | * |
119 | * @see sorted | 134 | * @see OPimAccessTemplate<>::sorted() |
120 | */ | 135 | */ |
121 | enum SortFilterBase { | 136 | enum SortFilterBase { |
137 | /** Do not filter anything. */ | ||
138 | FilterOff = 0, | ||
139 | /** Use given Categories for filter */ | ||
122 | FilterCategory = 1, | 140 | FilterCategory = 1, |
123 | FilterCustom = 1024, | 141 | /** The first available custom filter defined in the specialized frontends */ |
142 | FilterCustom = 1024, | ||
124 | LastSortFilterBase = 0xffffffff | 143 | LastSortFilterBase = 0xffffffff |
125 | }; | 144 | }; |
126 | 145 | ||
127 | virtual UIDArray matchRegexpSimple( const QRegExp& r )const = 0; | 146 | virtual UIDArray matchRegexpSimple( const QRegExp& r )const = 0; |
128 | virtual UIDArray queryByExampleSimple( const OPimRecord*, int settings, | 147 | virtual UIDArray queryByExampleSimple( const OPimRecord*, int settings, |
129 | const QDateTime& d = QDateTime() )const = 0; | 148 | const QDateTime& d = QDateTime() )const = 0; |