author | eilers <eilers> | 2003-05-11 12:53:01 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-05-11 12:53:01 (UTC) |
commit | c24cd890fe8219dcfc740c2e234d2427965d5831 (patch) (unidiff) | |
tree | 826600681c77e14a11e36d5c96e3baa50567aa3f | |
parent | 597215b1c9e92df95ace33306d93b6c20df8b8c7 (diff) | |
download | opie-c24cd890fe8219dcfc740c2e234d2427965d5831.zip opie-c24cd890fe8219dcfc740c2e234d2427965d5831.tar.gz opie-c24cd890fe8219dcfc740c2e234d2427965d5831.tar.bz2 |
Just internal renaming.. Will not affect anything..
-rw-r--r-- | core/pim/addressbook/abconfig.cpp | 2 | ||||
-rw-r--r-- | core/pim/addressbook/abconfig.h | 2 | ||||
-rw-r--r-- | core/pim/addressbook/abview.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/core/pim/addressbook/abconfig.cpp b/core/pim/addressbook/abconfig.cpp index 4a0875b..a3fd222 100644 --- a/core/pim/addressbook/abconfig.cpp +++ b/core/pim/addressbook/abconfig.cpp | |||
@@ -87,97 +87,97 @@ void AbConfig::setUseQtMail( bool v ) | |||
87 | m_changed = true; | 87 | m_changed = true; |
88 | } | 88 | } |
89 | void AbConfig::setUseOpieMail( bool v ) | 89 | void AbConfig::setUseOpieMail( bool v ) |
90 | { | 90 | { |
91 | m_useOpieMail = v; | 91 | m_useOpieMail = v; |
92 | m_changed = true; | 92 | m_changed = true; |
93 | } | 93 | } |
94 | void AbConfig::setFontSize( int v ) | 94 | void AbConfig::setFontSize( int v ) |
95 | { | 95 | { |
96 | m_fontSize = v; | 96 | m_fontSize = v; |
97 | m_changed = true; | 97 | m_changed = true; |
98 | } | 98 | } |
99 | 99 | ||
100 | void AbConfig::setOrderList( const QValueList<int>& list ) | 100 | void AbConfig::setOrderList( const QValueList<int>& list ) |
101 | { | 101 | { |
102 | m_ordered = list; | 102 | m_ordered = list; |
103 | m_changed = true; | 103 | m_changed = true; |
104 | } | 104 | } |
105 | 105 | ||
106 | void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock v ) | 106 | void AbConfig::setToolBarDock( const QMainWindow::ToolBarDock v ) |
107 | { | 107 | { |
108 | m_barPos = v; | 108 | m_barPos = v; |
109 | m_changed = true; | 109 | m_changed = true; |
110 | } | 110 | } |
111 | 111 | ||
112 | void AbConfig::setFixedBars( const bool fixed ) | 112 | void AbConfig::setFixedBars( const bool fixed ) |
113 | { | 113 | { |
114 | m_fixedBars = fixed; | 114 | m_fixedBars = fixed; |
115 | m_changed = true; | 115 | m_changed = true; |
116 | } | 116 | } |
117 | 117 | ||
118 | void AbConfig::setLetterPickerSearch( const AbConfig::LPSearchMode mode ) | 118 | void AbConfig::setLetterPickerSearch( const AbConfig::LPSearchMode mode ) |
119 | { | 119 | { |
120 | m_lpSearchMode = mode; | 120 | m_lpSearchMode = mode; |
121 | m_changed = true; | 121 | m_changed = true; |
122 | } | 122 | } |
123 | 123 | ||
124 | void AbConfig::load() | 124 | void AbConfig::load() |
125 | { | 125 | { |
126 | // Read Config settings | 126 | // Read Config settings |
127 | Config cfg("AddressBook"); | 127 | Config cfg("AddressBook"); |
128 | 128 | ||
129 | cfg.setGroup("Font"); | 129 | cfg.setGroup("Font"); |
130 | m_fontSize = cfg.readNumEntry( "fontSize", 1 ); | 130 | m_fontSize = cfg.readNumEntry( "fontSize", 1 ); |
131 | 131 | ||
132 | cfg.setGroup("Search"); | 132 | cfg.setGroup("Search"); |
133 | m_useRegExp = cfg.readBoolEntry( "useRegExp", false ); | 133 | m_useRegExp = cfg.readBoolEntry( "useRegExp", false ); |
134 | m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive", false ); | 134 | m_beCaseSensitive = cfg.readBoolEntry( "caseSensitive", false ); |
135 | m_lpSearchMode = cfg.readNumEntry( "lpSearchMode", FullName ); | 135 | m_lpSearchMode = cfg.readNumEntry( "lpSearchMode", FileAs ); |
136 | 136 | ||
137 | cfg.setGroup("Mail"); | 137 | cfg.setGroup("Mail"); |
138 | m_useQtMail = cfg.readBoolEntry( "useQtMail", true ); | 138 | m_useQtMail = cfg.readBoolEntry( "useQtMail", true ); |
139 | m_useOpieMail=cfg.readBoolEntry( "useOpieMail" ); | 139 | m_useOpieMail=cfg.readBoolEntry( "useOpieMail" ); |
140 | 140 | ||
141 | cfg.setGroup("ContactOrder"); | 141 | cfg.setGroup("ContactOrder"); |
142 | int ID = 0; | 142 | int ID = 0; |
143 | int i = 0; | 143 | int i = 0; |
144 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); | 144 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); |
145 | while ( ID != 0 ){ | 145 | while ( ID != 0 ){ |
146 | m_ordered.append( ID ); | 146 | m_ordered.append( ID ); |
147 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); | 147 | ID = cfg.readNumEntry( "ContactID_"+QString::number(i++), 0 ); |
148 | } | 148 | } |
149 | 149 | ||
150 | // If no contact order is defined, we set the default | 150 | // If no contact order is defined, we set the default |
151 | if ( m_ordered.count() == 0 ) { | 151 | if ( m_ordered.count() == 0 ) { |
152 | m_ordered.append( Qtopia::DefaultEmail ); | 152 | m_ordered.append( Qtopia::DefaultEmail ); |
153 | m_ordered.append( Qtopia::HomePhone); | 153 | m_ordered.append( Qtopia::HomePhone); |
154 | m_ordered.append( Qtopia::HomeMobile); | 154 | m_ordered.append( Qtopia::HomeMobile); |
155 | m_ordered.append( Qtopia::BusinessPhone); | 155 | m_ordered.append( Qtopia::BusinessPhone); |
156 | } | 156 | } |
157 | 157 | ||
158 | cfg.setGroup("ToolBar"); | 158 | cfg.setGroup("ToolBar"); |
159 | m_barPos = cfg.readNumEntry( "Position", QMainWindow::Top ); | 159 | m_barPos = cfg.readNumEntry( "Position", QMainWindow::Top ); |
160 | m_fixedBars= cfg.readBoolEntry( "fixedBars", true ); | 160 | m_fixedBars= cfg.readBoolEntry( "fixedBars", true ); |
161 | 161 | ||
162 | m_changed = false; | 162 | m_changed = false; |
163 | } | 163 | } |
164 | 164 | ||
165 | void AbConfig::save() | 165 | void AbConfig::save() |
166 | { | 166 | { |
167 | if ( m_changed ){ | 167 | if ( m_changed ){ |
168 | Config cfg("AddressBook"); | 168 | Config cfg("AddressBook"); |
169 | cfg.setGroup("Font"); | 169 | cfg.setGroup("Font"); |
170 | cfg.writeEntry("fontSize", m_fontSize); | 170 | cfg.writeEntry("fontSize", m_fontSize); |
171 | 171 | ||
172 | cfg.setGroup("Search"); | 172 | cfg.setGroup("Search"); |
173 | cfg.writeEntry("useRegExp", m_useRegExp); | 173 | cfg.writeEntry("useRegExp", m_useRegExp); |
174 | cfg.writeEntry("caseSensitive", m_beCaseSensitive); | 174 | cfg.writeEntry("caseSensitive", m_beCaseSensitive); |
175 | cfg.writeEntry("lpSearchMode", m_lpSearchMode ); | 175 | cfg.writeEntry("lpSearchMode", m_lpSearchMode ); |
176 | 176 | ||
177 | cfg.setGroup("Mail"); | 177 | cfg.setGroup("Mail"); |
178 | cfg.writeEntry( "useQtMail", m_useQtMail ); | 178 | cfg.writeEntry( "useQtMail", m_useQtMail ); |
179 | cfg.writeEntry( "useOpieMail", m_useOpieMail); | 179 | cfg.writeEntry( "useOpieMail", m_useOpieMail); |
180 | 180 | ||
181 | cfg.setGroup("ContactOrder"); | 181 | cfg.setGroup("ContactOrder"); |
182 | cfg.clearGroup(); | 182 | cfg.clearGroup(); |
183 | for ( uint i = 0; i < m_ordered.count(); i++ ){ | 183 | for ( uint i = 0; i < m_ordered.count(); i++ ){ |
diff --git a/core/pim/addressbook/abconfig.h b/core/pim/addressbook/abconfig.h index 93764f2..c312179 100644 --- a/core/pim/addressbook/abconfig.h +++ b/core/pim/addressbook/abconfig.h | |||
@@ -1,60 +1,60 @@ | |||
1 | #ifndef _ABCONFIG_H_ | 1 | #ifndef _ABCONFIG_H_ |
2 | #define _ABCONFIG_H_ | 2 | #define _ABCONFIG_H_ |
3 | 3 | ||
4 | #include <qstringlist.h> | 4 | #include <qstringlist.h> |
5 | #include <qmainwindow.h> | 5 | #include <qmainwindow.h> |
6 | 6 | ||
7 | class AbConfig | 7 | class AbConfig |
8 | { | 8 | { |
9 | public: | 9 | public: |
10 | enum LPSearchMode{ | 10 | enum LPSearchMode{ |
11 | LastName = 0, | 11 | LastName = 0, |
12 | FullName, | 12 | FileAs, |
13 | LASTELEMENT | 13 | LASTELEMENT |
14 | }; | 14 | }; |
15 | 15 | ||
16 | 16 | ||
17 | 17 | ||
18 | AbConfig(); | 18 | AbConfig(); |
19 | ~AbConfig(); | 19 | ~AbConfig(); |
20 | 20 | ||
21 | // Search Settings | 21 | // Search Settings |
22 | bool useRegExp() const; | 22 | bool useRegExp() const; |
23 | bool useWildCards() const; | 23 | bool useWildCards() const; |
24 | bool beCaseSensitive() const; | 24 | bool beCaseSensitive() const; |
25 | bool useQtMail() const; | 25 | bool useQtMail() const; |
26 | bool useOpieMail() const; | 26 | bool useOpieMail() const; |
27 | int fontSize() const; | 27 | int fontSize() const; |
28 | QValueList<int> orderList() const; | 28 | QValueList<int> orderList() const; |
29 | QMainWindow::ToolBarDock getToolBarPos() const; | 29 | QMainWindow::ToolBarDock getToolBarPos() const; |
30 | bool fixedBars() const; | 30 | bool fixedBars() const; |
31 | LPSearchMode letterPickerSearch() const; | 31 | LPSearchMode letterPickerSearch() const; |
32 | 32 | ||
33 | void setUseRegExp( bool v ); | 33 | void setUseRegExp( bool v ); |
34 | void setUseWildCards( bool v ); | 34 | void setUseWildCards( bool v ); |
35 | void setBeCaseSensitive( bool v ); | 35 | void setBeCaseSensitive( bool v ); |
36 | void setUseQtMail( bool v ); | 36 | void setUseQtMail( bool v ); |
37 | void setUseOpieMail( bool v ); | 37 | void setUseOpieMail( bool v ); |
38 | void setFontSize( int v ); | 38 | void setFontSize( int v ); |
39 | void setOrderList( const QValueList<int>& list ); | 39 | void setOrderList( const QValueList<int>& list ); |
40 | void setToolBarDock( const QMainWindow::ToolBarDock v ); | 40 | void setToolBarDock( const QMainWindow::ToolBarDock v ); |
41 | void setFixedBars( const bool fixed ); | 41 | void setFixedBars( const bool fixed ); |
42 | void setLetterPickerSearch( const LPSearchMode mode ); | 42 | void setLetterPickerSearch( const LPSearchMode mode ); |
43 | 43 | ||
44 | void operator= ( const AbConfig& cnf ); | 44 | void operator= ( const AbConfig& cnf ); |
45 | 45 | ||
46 | void load(); | 46 | void load(); |
47 | void save(); | 47 | void save(); |
48 | 48 | ||
49 | protected: | 49 | protected: |
50 | /* virtual void itemUp(); */ | 50 | /* virtual void itemUp(); */ |
51 | /* virtual void itemDown(); */ | 51 | /* virtual void itemDown(); */ |
52 | 52 | ||
53 | QStringList contFields; | 53 | QStringList contFields; |
54 | 54 | ||
55 | bool m_useQtMail; | 55 | bool m_useQtMail; |
56 | bool m_useOpieMail; | 56 | bool m_useOpieMail; |
57 | bool m_useRegExp; | 57 | bool m_useRegExp; |
58 | bool m_beCaseSensitive; | 58 | bool m_beCaseSensitive; |
59 | int m_fontSize; | 59 | int m_fontSize; |
60 | QValueList<int> m_ordered; | 60 | QValueList<int> m_ordered; |
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp index 664bd3f..477f85b 100644 --- a/core/pim/addressbook/abview.cpp +++ b/core/pim/addressbook/abview.cpp | |||
@@ -196,97 +196,97 @@ void AbView::setShowByCategory( const QString& cat ) | |||
196 | // Just do anything if we really change the category | 196 | // Just do anything if we really change the category |
197 | if ( intCat != m_curr_category ){ | 197 | if ( intCat != m_curr_category ){ |
198 | // qWarning ("Categories: Selected %s.. Number: %d", cat.latin1(), m_curr_category); | 198 | // qWarning ("Categories: Selected %s.. Number: %d", cat.latin1(), m_curr_category); |
199 | 199 | ||
200 | m_curr_category = intCat; | 200 | m_curr_category = intCat; |
201 | emit signalClearLetterPicker(); | 201 | emit signalClearLetterPicker(); |
202 | 202 | ||
203 | load(); | 203 | load(); |
204 | } | 204 | } |
205 | 205 | ||
206 | } | 206 | } |
207 | 207 | ||
208 | void AbView::setShowToView( Views view ) | 208 | void AbView::setShowToView( Views view ) |
209 | { | 209 | { |
210 | //qWarning("void AbView::setShowToView( View %d )", view); | 210 | //qWarning("void AbView::setShowToView( View %d )", view); |
211 | 211 | ||
212 | //qWarning ("Change the View (Category is: %d)", m_curr_category); | 212 | //qWarning ("Change the View (Category is: %d)", m_curr_category); |
213 | 213 | ||
214 | if ( m_curr_View != view ){ | 214 | if ( m_curr_View != view ){ |
215 | m_prev_View = m_curr_View; | 215 | m_prev_View = m_curr_View; |
216 | m_curr_View = view; | 216 | m_curr_View = view; |
217 | 217 | ||
218 | updateView(); | 218 | updateView(); |
219 | } | 219 | } |
220 | 220 | ||
221 | } | 221 | } |
222 | 222 | ||
223 | void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode ) | 223 | void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode ) |
224 | { | 224 | { |
225 | qWarning("void AbView::setShowByLetter( %c, %d )", c, mode ); | 225 | qWarning("void AbView::setShowByLetter( %c, %d )", c, mode ); |
226 | 226 | ||
227 | assert( mode < AbConfig::LASTELEMENT ); | 227 | assert( mode < AbConfig::LASTELEMENT ); |
228 | 228 | ||
229 | OContact query; | 229 | OContact query; |
230 | if ( c == 0 ){ | 230 | if ( c == 0 ){ |
231 | load(); | 231 | load(); |
232 | return; | 232 | return; |
233 | }else{ | 233 | }else{ |
234 | // If the current Backend is unable to solve the query, we will | 234 | // If the current Backend is unable to solve the query, we will |
235 | // ignore the request .. | 235 | // ignore the request .. |
236 | if ( ! m_contactdb->hasQuerySettings( OContactAccess::WildCards | OContactAccess::IgnoreCase ) ){ | 236 | if ( ! m_contactdb->hasQuerySettings( OContactAccess::WildCards | OContactAccess::IgnoreCase ) ){ |
237 | return; | 237 | return; |
238 | } | 238 | } |
239 | 239 | ||
240 | switch( mode ){ | 240 | switch( mode ){ |
241 | case AbConfig::LastName: | 241 | case AbConfig::LastName: |
242 | query.setLastName( QString("%1*").arg(c) ); | 242 | query.setLastName( QString("%1*").arg(c) ); |
243 | break; | 243 | break; |
244 | case AbConfig::FullName: | 244 | case AbConfig::FileAs: |
245 | query.setFileAs( QString("%1*").arg(c) ); | 245 | query.setFileAs( QString("%1*").arg(c) ); |
246 | break; | 246 | break; |
247 | default: | 247 | default: |
248 | qWarning( "Unknown Searchmode for AbView::setShowByLetter ! -> %d", mode ); | 248 | qWarning( "Unknown Searchmode for AbView::setShowByLetter ! -> %d", mode ); |
249 | qWarning( "I will ignore it.." ); | 249 | qWarning( "I will ignore it.." ); |
250 | return; | 250 | return; |
251 | } | 251 | } |
252 | m_list = m_contactdb->queryByExample( query, OContactAccess::WildCards | OContactAccess::IgnoreCase ); | 252 | m_list = m_contactdb->queryByExample( query, OContactAccess::WildCards | OContactAccess::IgnoreCase ); |
253 | clearForCategory(); | 253 | clearForCategory(); |
254 | m_curr_Contact = 0; | 254 | m_curr_Contact = 0; |
255 | } | 255 | } |
256 | updateView( true ); | 256 | updateView( true ); |
257 | } | 257 | } |
258 | 258 | ||
259 | void AbView::setListOrder( const QValueList<int>& ordered ) | 259 | void AbView::setListOrder( const QValueList<int>& ordered ) |
260 | { | 260 | { |
261 | m_orderedFields = ordered; | 261 | m_orderedFields = ordered; |
262 | if ( m_abTable ){ | 262 | if ( m_abTable ){ |
263 | m_abTable->setOrderedList( ordered ); | 263 | m_abTable->setOrderedList( ordered ); |
264 | m_abTable->refresh(); | 264 | m_abTable->refresh(); |
265 | } | 265 | } |
266 | updateView(); | 266 | updateView(); |
267 | } | 267 | } |
268 | 268 | ||
269 | 269 | ||
270 | QString AbView::showCategory() const | 270 | QString AbView::showCategory() const |
271 | { | 271 | { |
272 | return mCat.label( "Contacts", m_curr_category ); | 272 | return mCat.label( "Contacts", m_curr_category ); |
273 | } | 273 | } |
274 | 274 | ||
275 | void AbView::showPersonal( bool personal ) | 275 | void AbView::showPersonal( bool personal ) |
276 | { | 276 | { |
277 | //qWarning ("void AbView::showPersonal( %d )", personal); | 277 | //qWarning ("void AbView::showPersonal( %d )", personal); |
278 | 278 | ||
279 | if ( personal ){ | 279 | if ( personal ){ |
280 | 280 | ||
281 | if ( m_inPersonal ) | 281 | if ( m_inPersonal ) |
282 | return; | 282 | return; |
283 | 283 | ||
284 | // Now switch to vCard Backend and load data. | 284 | // Now switch to vCard Backend and load data. |
285 | // The current default backend will be stored | 285 | // The current default backend will be stored |
286 | // to avoid unneeded load/stores. | 286 | // to avoid unneeded load/stores. |
287 | m_storedDB = m_contactdb; | 287 | m_storedDB = m_contactdb; |
288 | 288 | ||
289 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, | 289 | OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, |
290 | addressbookPersonalVCardName() ); | 290 | addressbookPersonalVCardName() ); |
291 | m_contactdb = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 291 | m_contactdb = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
292 | 292 | ||