summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abview.cpp
Unidiff
Diffstat (limited to 'core/pim/addressbook/abview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abview.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 93e57ca..7da0992 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -95,28 +95,28 @@ AbView::~AbView()
95 95
96void AbView::setView( Views view ) 96void AbView::setView( Views view )
97{ 97{
98 qWarning("AbView::setView( Views view )"); 98 //qWarning("AbView::setView( Views view )");
99 m_curr_View = view; 99 m_curr_View = view;
100 load(); 100 load();
101} 101}
102 102
103void AbView::addEntry( const OContact &newContact ) 103void AbView::addEntry( const OContact &newContact )
104{ 104{
105 qWarning("abview:AddContact"); 105 //qWarning("abview:AddContact");
106 m_contactdb->add ( newContact ); 106 m_contactdb->add ( newContact );
107 load(); 107 load();
108 108
109} 109}
110void AbView::removeEntry( const int UID ) 110void AbView::removeEntry( const int UID )
111{ 111{
112 qWarning("abview:RemoveContact"); 112 //qWarning("abview:RemoveContact");
113 m_contactdb->remove( UID ); 113 m_contactdb->remove( UID );
114 load(); 114 load();
115} 115}
116 116
117void AbView::replaceEntry( const OContact &contact ) 117void AbView::replaceEntry( const OContact &contact )
118{ 118{
119 qWarning("abview:ReplaceContact"); 119 //qWarning("abview:ReplaceContact");
120 m_contactdb->replace( contact ); 120 m_contactdb->replace( contact );
121 load(); 121 load();
122 122
@@ -140,14 +140,14 @@ OContact AbView::currentEntry()
140 140
141bool AbView::save() 141bool AbView::save()
142{ 142{
143 qWarning("abView:Save data"); 143 //qWarning("abView:Save data");
144 144
145 return m_contactdb->save(); 145 return m_contactdb->save();
146} 146}
147 147
148void AbView::load() 148void AbView::load()
149{ 149{
150 qWarning("abView:Load data"); 150 //qWarning("abView:Load data");
151 151
152 // Letter Search is stopped at this place 152 // Letter Search is stopped at this place
153 emit signalClearLetterPicker(); 153 emit signalClearLetterPicker();
@@ -160,7 +160,7 @@ void AbView::load()
160 clearForCategory(); 160 clearForCategory();
161 } 161 }
162 162
163 qWarning ("Number of contacts: %d", m_list.count()); 163 //qWarning ("Number of contacts: %d", m_list.count());
164 164
165 updateView( true ); 165 updateView( true );
166 166
@@ -168,7 +168,7 @@ void AbView::load()
168 168
169void AbView::reload() 169void AbView::reload()
170{ 170{
171 qWarning( "void AbView::reload()" ); 171 //qWarning( "void AbView::reload()" );
172 172
173 m_contactdb->reload(); 173 m_contactdb->reload();
174 load(); 174 load();
@@ -181,7 +181,7 @@ void AbView::clear()
181 181
182void AbView::setShowByCategory( const QString& cat ) 182void AbView::setShowByCategory( const QString& cat )
183{ 183{
184 qWarning("AbView::setShowCategory( const QString& cat )"); 184 //qWarning("AbView::setShowCategory( const QString& cat )");
185 185
186 int intCat = 0; 186 int intCat = 0;
187 187
@@ -193,7 +193,7 @@ void AbView::setShowByCategory( const QString& cat )
193 193
194 // Just do anything if we really change the category 194 // Just do anything if we really change the category
195 if ( intCat != m_curr_category ){ 195 if ( intCat != m_curr_category ){
196 qWarning ("Categories: Selected %s.. Number: %d", cat.latin1(), m_curr_category); 196 // qWarning ("Categories: Selected %s.. Number: %d", cat.latin1(), m_curr_category);
197 197
198 m_curr_category = intCat; 198 m_curr_category = intCat;
199 emit signalClearLetterPicker(); 199 emit signalClearLetterPicker();
@@ -205,9 +205,9 @@ void AbView::setShowByCategory( const QString& cat )
205 205
206void AbView::setShowToView( Views view ) 206void AbView::setShowToView( Views view )
207{ 207{
208 qWarning("void AbView::setShowToView( View %d )", view); 208 //qWarning("void AbView::setShowToView( View %d )", view);
209 209
210 qWarning ("Change the View (Category is: %d)", m_curr_category); 210 //qWarning ("Change the View (Category is: %d)", m_curr_category);
211 211
212 if ( m_curr_View != view ){ 212 if ( m_curr_View != view ){
213 m_prev_View = m_curr_View; 213 m_prev_View = m_curr_View;
@@ -220,7 +220,7 @@ void AbView::setShowToView( Views view )
220 220
221void AbView::setShowByLetter( char c ) 221void AbView::setShowByLetter( char c )
222{ 222{
223 qWarning("void AbView::setShowByLetter( %c )", c ); 223 //qWarning("void AbView::setShowByLetter( %c )", c );
224 OContact query; 224 OContact query;
225 if ( c == 0 ){ 225 if ( c == 0 ){
226 load(); 226 load();
@@ -254,7 +254,7 @@ QString AbView::showCategory() const
254 254
255void AbView::showPersonal( bool personal ) 255void AbView::showPersonal( bool personal )
256{ 256{
257 qWarning ("void AbView::showPersonal( %d )", personal); 257 //qWarning ("void AbView::showPersonal( %d )", personal);
258 258
259 if ( personal ){ 259 if ( personal ){
260 260
@@ -303,7 +303,7 @@ QStringList AbView::categories()
303void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp, 303void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
304 bool , QString cat ) 304 bool , QString cat )
305{ 305{
306 qWarning( "void AbView::slotDoFind" ); 306 //qWarning( "void AbView::slotDoFind" );
307 307
308 // We reloading the data: Deselect Letterpicker 308 // We reloading the data: Deselect Letterpicker
309 emit signalClearLetterPicker(); 309 emit signalClearLetterPicker();
@@ -317,7 +317,7 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
317 category = mCat.id("Contacts", cat ); 317 category = mCat.id("Contacts", cat );
318 } 318 }
319 319
320 qWarning ("Find in Category %d", category); 320 //qWarning ("Find in Category %d", category);
321 321
322 QRegExp r( str ); 322 QRegExp r( str );
323 r.setCaseSensitive( caseSensitive ); 323 r.setCaseSensitive( caseSensitive );
@@ -326,7 +326,7 @@ void AbView::slotDoFind( const QString &str, bool caseSensitive, bool useRegExp,
326 // Get all matching entries out of the database 326 // Get all matching entries out of the database
327 m_list = m_contactdb->matchRegexp( r ); 327 m_list = m_contactdb->matchRegexp( r );
328 328
329 qWarning( "found: %d", m_list.count() ); 329 //qWarning( "found: %d", m_list.count() );
330 if ( m_list.count() == 0 ){ 330 if ( m_list.count() == 0 ){
331 emit signalNotFound(); 331 emit signalNotFound();
332 return; 332 return;
@@ -349,7 +349,7 @@ void AbView::offSearch()
349} 349}
350 350
351void AbView::slotSwitch(){ 351void AbView::slotSwitch(){
352 qWarning("AbView::slotSwitch()"); 352 //qWarning("AbView::slotSwitch()");
353 353
354 m_prev_View = m_curr_View; 354 m_prev_View = m_curr_View;
355 switch ( (int) m_curr_View ){ 355 switch ( (int) m_curr_View ){
@@ -377,7 +377,7 @@ void AbView::clearForCategory()
377 if ( m_curr_category != -1 ){ 377 if ( m_curr_category != -1 ){
378 for ( it = allList.begin(); it != allList.end(); ++it ){ 378 for ( it = allList.begin(); it != allList.end(); ++it ){
379 if ( !contactCompare( *it, m_curr_category ) ){ 379 if ( !contactCompare( *it, m_curr_category ) ){
380 qWarning("Removing %d", (*it).uid()); 380 // qWarning("Removing %d", (*it).uid());
381 m_list.remove( (*it).uid() ); 381 m_list.remove( (*it).uid() );
382 } 382 }
383 } 383 }
@@ -387,13 +387,13 @@ void AbView::clearForCategory()
387 387
388bool AbView::contactCompare( const OContact &cnt, int category ) 388bool AbView::contactCompare( const OContact &cnt, int category )
389{ 389{
390 qWarning ("bool AbView::contactCompare( const OContact &cnt, %d )", category); 390 //qWarning ("bool AbView::contactCompare( const OContact &cnt, %d )", category);
391 391
392 bool returnMe; 392 bool returnMe;
393 QArray<int> cats; 393 QArray<int> cats;
394 cats = cnt.categories(); 394 cats = cnt.categories();
395 395
396 qWarning ("Number of categories: %d", cats.count() ); 396 //qWarning ("Number of categories: %d", cats.count() );
397 397
398 returnMe = false; 398 returnMe = false;
399 if ( cats.count() == 0 && category == 0 ) 399 if ( cats.count() == 0 && category == 0 )
@@ -402,14 +402,14 @@ bool AbView::contactCompare( const OContact &cnt, int category )
402 else { 402 else {
403 int i; 403 int i;
404 for ( i = 0; i < int(cats.count()); i++ ) { 404 for ( i = 0; i < int(cats.count()); i++ ) {
405 qWarning("Comparing %d with %d",cats[i],category ); 405 // qWarning("Comparing %d with %d",cats[i],category );
406 if ( cats[i] == category ) { 406 if ( cats[i] == category ) {
407 returnMe = true; 407 returnMe = true;
408 break; 408 break;
409 } 409 }
410 } 410 }
411 } 411 }
412 qWarning ("Return: %d", returnMe); 412 //qWarning ("Return: %d", returnMe);
413 return returnMe; 413 return returnMe;
414} 414}
415 415
@@ -422,7 +422,7 @@ void AbView::updateListinViews()
422 422
423void AbView::updateView( bool newdata ) 423void AbView::updateView( bool newdata )
424{ 424{
425 qWarning("AbView::updateView()"); 425 //qWarning("AbView::updateView()");
426 426
427 if ( m_viewStack -> visibleWidget() ){ 427 if ( m_viewStack -> visibleWidget() ){
428 m_viewStack -> visibleWidget() -> clearFocus(); 428 m_viewStack -> visibleWidget() -> clearFocus();