summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abview.cpp
authormickeyl <mickeyl>2004-04-04 17:03:27 (UTC)
committer mickeyl <mickeyl>2004-04-04 17:03:27 (UTC)
commitdaef74a7e852855f781765fad7969b6c83e2e9c6 (patch) (unidiff)
treef635b437ba9f6d144c34c5ee58d37954bacc3c6e /core/pim/addressbook/abview.cpp
parent100def2936503dedc8138d738d68b69d5de66766 (diff)
downloadopie-daef74a7e852855f781765fad7969b6c83e2e9c6.zip
opie-daef74a7e852855f781765fad7969b6c83e2e9c6.tar.gz
opie-daef74a7e852855f781765fad7969b6c83e2e9c6.tar.bz2
s/Opie::Core::odebug/odebug/ (same with oerr,owarn,ofatal)
Diffstat (limited to 'core/pim/addressbook/abview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/abview.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 52e5f59..7a5b6d4 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -52,7 +52,7 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ):
52 m_abTable( 0l ), 52 m_abTable( 0l ),
53 m_orderedFields( ordered ) 53 m_orderedFields( ordered )
54{ 54{
55 Opie::Core::owarn << "AbView::c'tor" << oendl; 55 owarn << "AbView::c'tor" << oendl;
56 // Load default database and handle syncing myself.. ! 56 // Load default database and handle syncing myself.. !
57 m_contactdb = new Opie::OPimContactAccess ( "addressbook", 0l, 0l, false ); 57 m_contactdb = new Opie::OPimContactAccess ( "addressbook", 0l, 0l, false );
58 m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available 58 m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available
@@ -100,28 +100,28 @@ AbView::~AbView()
100 100
101void AbView::setView( Views view ) 101void AbView::setView( Views view )
102{ 102{
103 Opie::Core::owarn << "AbView::setView( Views view )" << oendl; 103 owarn << "AbView::setView( Views view )" << oendl;
104 m_curr_View = view; 104 m_curr_View = view;
105 load(); 105 load();
106} 106}
107 107
108void AbView::addEntry( const Opie::OPimContact &newContact ) 108void AbView::addEntry( const Opie::OPimContact &newContact )
109{ 109{
110 Opie::Core::owarn << "AbView::AddContact" << oendl; 110 owarn << "AbView::AddContact" << oendl;
111 m_contactdb->add ( newContact ); 111 m_contactdb->add ( newContact );
112 load(); 112 load();
113 113
114} 114}
115void AbView::removeEntry( const int UID ) 115void AbView::removeEntry( const int UID )
116{ 116{
117 Opie::Core::owarn << "AbView;:RemoveContact" << oendl; 117 owarn << "AbView;:RemoveContact" << oendl;
118 m_contactdb->remove( UID ); 118 m_contactdb->remove( UID );
119 load(); 119 load();
120} 120}
121 121
122void AbView::replaceEntry( const Opie::OPimContact &contact ) 122void AbView::replaceEntry( const Opie::OPimContact &contact )
123{ 123{
124 Opie::Core::owarn << "AbView::ReplaceContact" << oendl; 124 owarn << "AbView::ReplaceContact" << oendl;
125 m_contactdb->replace( contact ); 125 m_contactdb->replace( contact );
126 load(); 126 load();
127 127
@@ -145,14 +145,14 @@ Opie::OPimContact AbView::currentEntry()
145 145
146bool AbView::save() 146bool AbView::save()
147{ 147{
148 //Opie::Core::owarn << "AbView::Save data" << oendl; 148 //owarn << "AbView::Save data" << oendl;
149 149
150 return m_contactdb->save(); 150 return m_contactdb->save();
151} 151}
152 152
153void AbView::load() 153void AbView::load()
154{ 154{
155 Opie::Core::owarn << "AbView::Load data" << oendl; 155 owarn << "AbView::Load data" << oendl;
156 156
157 // Letter Search is stopped at this place 157 // Letter Search is stopped at this place
158 emit signalClearLetterPicker(); 158 emit signalClearLetterPicker();
@@ -166,7 +166,7 @@ void AbView::load()
166 clearForCategory(); 166 clearForCategory();
167 } 167 }
168 168
169 Opie::Core::owarn << "Number of contacts: " << m_list.count() << oendl; 169 owarn << "Number of contacts: " << m_list.count() << oendl;
170 170
171 updateView( true ); 171 updateView( true );
172 172
@@ -174,7 +174,7 @@ void AbView::load()
174 174
175void AbView::reload() 175void AbView::reload()
176{ 176{
177 Opie::Core::owarn << "AbView::::reload()" << oendl; 177 owarn << "AbView::::reload()" << oendl;
178 178
179 m_contactdb->reload(); 179 m_contactdb->reload();
180 load(); 180 load();
@@ -187,7 +187,7 @@ void AbView::clear()
187 187
188void AbView::setShowByCategory( const QString& cat ) 188void AbView::setShowByCategory( const QString& cat )
189{ 189{
190 Opie::Core::owarn << "AbView::setShowCategory( const QString& cat )" << oendl; 190 owarn << "AbView::setShowCategory( const QString& cat )" << oendl;
191 191
192 int intCat = 0; 192 int intCat = 0;
193 193
@@ -199,7 +199,7 @@ void AbView::setShowByCategory( const QString& cat )
199 199
200 // Just do anything if we really change the category 200 // Just do anything if we really change the category
201 if ( intCat != m_curr_category ){ 201 if ( intCat != m_curr_category ){
202 // Opie::Core::owarn << "Categories: Selected " << cat << ".. Number: " 202 // owarn << "Categories: Selected " << cat << ".. Number: "
203 // << m_curr_category << oendl; 203 // << m_curr_category << oendl;
204 204
205 m_curr_category = intCat; 205 m_curr_category = intCat;
@@ -212,10 +212,10 @@ void AbView::setShowByCategory( const QString& cat )
212 212
213void AbView::setShowToView( Views view ) 213void AbView::setShowToView( Views view )
214{ 214{
215 Opie::Core::owarn << "void AbView::setShowToView( View " << view << " )" << oendl; 215 owarn << "void AbView::setShowToView( View " << view << " )" << oendl;
216 216
217 if ( m_curr_View != view ){ 217 if ( m_curr_View != view ){
218 Opie::Core::owarn << "Change the View (Category is: " << m_curr_category << ")" << oendl; 218 owarn << "Change the View (Category is: " << m_curr_category << ")" << oendl;
219 m_prev_View = m_curr_View; 219 m_prev_View = m_curr_View;
220 m_curr_View = view; 220 m_curr_View = view;
221 221
@@ -226,7 +226,7 @@ void AbView::setShowToView( Views view )
226 226
227void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode ) 227void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode )
228{ 228{
229 Opie::Core::owarn << "void AbView::setShowByLetter( " << c << ", " << mode << " )" << oendl; 229 owarn << "void AbView::setShowByLetter( " << c << ", " << mode << " )" << oendl;
230 230
231 assert( mode < AbConfig::LASTELEMENT ); 231 assert( mode < AbConfig::LASTELEMENT );
232 232
@@ -249,7 +249,7 @@ void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode )
249 query.setFileAs( QString("%1*").arg(c) ); 249 query.setFileAs( QString("%1*").arg(c) );
250 break; 250 break;
251 default: 251 default:
252 Opie::Core::owarn << "Unknown Searchmode for AbView::setShowByLetter ! -> " << mode << oendl 252 owarn << "Unknown Searchmode for AbView::setShowByLetter ! -> " << mode << oendl
253 << "I will ignore it.." << oendl; 253 << "I will ignore it.." << oendl;
254 return; 254 return;
255 } 255 }
@@ -279,7 +279,7 @@ QString AbView::showCategory() const
279 279
280void AbView::showPersonal( bool personal ) 280void AbView::showPersonal( bool personal )
281{ 281{
282 Opie::Core::owarn << "void AbView::showPersonal( " << personal << " )" << oendl; 282 owarn << "void AbView::showPersonal( " << personal << " )" << oendl;
283 283
284 if ( personal ){ 284 if ( personal ){
285 285
@@ -335,7 +335,7 @@ QStringList AbView::categories()
335void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, 335void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
336 bool , QString cat ) 336 bool , QString cat )
337{ 337{
338 //Opie::Core::owarn << "void AbView::slotDoFind" << oendl; 338 //owarn << "void AbView::slotDoFind" << oendl;
339 339
340 // We reloading the data: Deselect Letterpicker 340 // We reloading the data: Deselect Letterpicker
341 emit signalClearLetterPicker(); 341 emit signalClearLetterPicker();
@@ -349,7 +349,7 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
349 category = mCat.id("Contacts", cat ); 349 category = mCat.id("Contacts", cat );
350 } 350 }
351 351
352 //Opie::Core::owarn << "Find in Category " << category << oendl; 352 //owarn << "Find in Category " << category << oendl;
353 353
354 QRegExp r( str ); 354 QRegExp r( str );
355 r.setCaseSensitive( caseSensitive ); 355 r.setCaseSensitive( caseSensitive );
@@ -358,7 +358,7 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
358 // Get all matching entries out of the database 358 // Get all matching entries out of the database
359 m_list = m_contactdb->matchRegexp( r ); 359 m_list = m_contactdb->matchRegexp( r );
360 360
361 //Opie::Core::owarn << "Found: " << m_list.count() << oendl; 361 //owarn << "Found: " << m_list.count() << oendl;
362 if ( m_list.count() == 0 ){ 362 if ( m_list.count() == 0 ){
363 emit signalNotFound(); 363 emit signalNotFound();
364 return; 364 return;
@@ -382,16 +382,16 @@ void AbView::offSearch()
382} 382}
383 383
384void AbView::slotSwitch(){ 384void AbView::slotSwitch(){
385 //Opie::Core::owarn << "AbView::slotSwitch()" << oendl; 385 //owarn << "AbView::slotSwitch()" << oendl;
386 386
387 m_prev_View = m_curr_View; 387 m_prev_View = m_curr_View;
388 switch ( (int) m_curr_View ){ 388 switch ( (int) m_curr_View ){
389 case TableView: 389 case TableView:
390 Opie::Core::owarn << "Switching to CardView" << oendl; 390 owarn << "Switching to CardView" << oendl;
391 m_curr_View = CardView; 391 m_curr_View = CardView;
392 break; 392 break;
393 case CardView: 393 case CardView:
394 Opie::Core::owarn << "Switching to TableView" << oendl; 394 owarn << "Switching to TableView" << oendl;
395 m_curr_View = TableView; 395 m_curr_View = TableView;
396 break; 396 break;
397 } 397 }
@@ -410,7 +410,7 @@ void AbView::clearForCategory()
410 if ( m_curr_category != -1 ){ 410 if ( m_curr_category != -1 ){
411 for ( it = allList.begin(); it != allList.end(); ++it ){ 411 for ( it = allList.begin(); it != allList.end(); ++it ){
412 if ( !contactCompare( *it, m_curr_category ) ){ 412 if ( !contactCompare( *it, m_curr_category ) ){
413 //Opie::Core::owarn << "Removing " << (*it).uid() << oendl; 413 //owarn << "Removing " << (*it).uid() << oendl;
414 m_list.remove( (*it).uid() ); 414 m_list.remove( (*it).uid() );
415 } 415 }
416 } 416 }
@@ -420,14 +420,14 @@ void AbView::clearForCategory()
420 420
421bool AbView::contactCompare( const Opie::OPimContact &cnt, int category ) 421bool AbView::contactCompare( const Opie::OPimContact &cnt, int category )
422{ 422{
423 //Opie::Core::owarn << "bool AbView::contactCompare( const Opie::OPimContact &cnt, " 423 //owarn << "bool AbView::contactCompare( const Opie::OPimContact &cnt, "
424 // << category << " )" << oendl; 424 // << category << " )" << oendl;
425 425
426 bool returnMe; 426 bool returnMe;
427 QArray<int> cats; 427 QArray<int> cats;
428 cats = cnt.categories(); 428 cats = cnt.categories();
429 429
430 //Opie::Core::owarn << "Number of categories: " << cats.count() << oendl; 430 //owarn << "Number of categories: " << cats.count() << oendl;
431 431
432 returnMe = false; 432 returnMe = false;
433 if ( cats.count() == 0 && category == 0 ) 433 if ( cats.count() == 0 && category == 0 )
@@ -436,14 +436,14 @@ bool AbView::contactCompare( const Opie::OPimContact &cnt, int category )
436 else { 436 else {
437 int i; 437 int i;
438 for ( i = 0; i < int(cats.count()); i++ ) { 438 for ( i = 0; i < int(cats.count()); i++ ) {
439 //Opie::Core::owarn << "Comparing " << cats[i] << " with " << category << oendl; 439 //owarn << "Comparing " << cats[i] << " with " << category << oendl;
440 if ( cats[i] == category ) { 440 if ( cats[i] == category ) {
441 returnMe = true; 441 returnMe = true;
442 break; 442 break;
443 } 443 }
444 } 444 }
445 } 445 }
446 //Opie::Core::owarn << "Return: " << returnMe << oendl; 446 //owarn << "Return: " << returnMe << oendl;
447 return returnMe; 447 return returnMe;
448} 448}
449 449
@@ -456,7 +456,7 @@ void AbView::updateListinViews()
456 456
457void AbView::updateView( bool newdata ) 457void AbView::updateView( bool newdata )
458{ 458{
459 //Opie::Core::owarn << "AbView::updateView()" << oendl; 459 //owarn << "AbView::updateView()" << oendl;
460 460
461 if ( m_viewStack -> visibleWidget() ){ 461 if ( m_viewStack -> visibleWidget() ){
462 m_viewStack -> visibleWidget() -> clearFocus(); 462 m_viewStack -> visibleWidget() -> clearFocus();