author | eilers <eilers> | 2004-10-12 09:07:04 (UTC) |
---|---|---|
committer | eilers <eilers> | 2004-10-12 09:07:04 (UTC) |
commit | c6cd1497c5e08f68085c27c04277cdb5f720527f (patch) (unidiff) | |
tree | 6aeb5079e5d5046240be7eabca2e859f269ef073 /core/pim/addressbook/abtable.cpp | |
parent | c1be01cafaa3b9f22586c73d14c5eaf0e7c6848d (diff) | |
download | opie-c6cd1497c5e08f68085c27c04277cdb5f720527f.zip opie-c6cd1497c5e08f68085c27c04277cdb5f720527f.tar.gz opie-c6cd1497c5e08f68085c27c04277cdb5f720527f.tar.bz2 |
No functional changes.
Just replaced owarn to odebug where debug output was ment by the developer.
These warnings confusing users if the have any problems..
Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 3fb2214..30d749c 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp | |||
@@ -118,21 +118,21 @@ AbTable::AbTable( const QValueList<int> order, QWidget *parent, const char *name | |||
118 | asc( TRUE ), | 118 | asc( TRUE ), |
119 | intFields( order ), | 119 | intFields( order ), |
120 | enablePainting( true ), | 120 | enablePainting( true ), |
121 | columnVisible( true ), | 121 | columnVisible( true ), |
122 | countNested( 0 ) | 122 | countNested( 0 ) |
123 | { | 123 | { |
124 | //owarn << "C'tor start" << oendl; | 124 | //odebug << "C'tor start" << oendl; |
125 | setSelectionMode( NoSelection ); | 125 | setSelectionMode( NoSelection ); |
126 | init(); | 126 | init(); |
127 | setSorting( TRUE ); | 127 | setSorting( TRUE ); |
128 | connect( this, SIGNAL(clicked(int,int,int,const QPoint&)), | 128 | connect( this, SIGNAL(clicked(int,int,int,const QPoint&)), |
129 | this, SLOT(itemClicked(int,int)) ); | 129 | this, SLOT(itemClicked(int,int)) ); |
130 | 130 | ||
131 | // contactList.clear(); | 131 | // contactList.clear(); |
132 | //owarn << "C'tor end" << oendl; | 132 | //odebug << "C'tor end" << oendl; |
133 | } | 133 | } |
134 | 134 | ||
135 | AbTable::~AbTable() | 135 | AbTable::~AbTable() |
136 | { | 136 | { |
137 | } | 137 | } |
138 | 138 | ||
@@ -148,13 +148,13 @@ void AbTable::init() | |||
148 | verticalHeader()->hide(); | 148 | verticalHeader()->hide(); |
149 | columnVisible = true; | 149 | columnVisible = true; |
150 | } | 150 | } |
151 | 151 | ||
152 | void AbTable::setContacts( const Opie::OPimContactAccess::List& viewList ) | 152 | void AbTable::setContacts( const Opie::OPimContactAccess::List& viewList ) |
153 | { | 153 | { |
154 | owarn << "AbTable::setContacts()" << oendl; | 154 | odebug << "AbTable::setContacts()" << oendl; |
155 | 155 | ||
156 | clear(); | 156 | clear(); |
157 | m_viewList = viewList; | 157 | m_viewList = viewList; |
158 | 158 | ||
159 | setSorting( false ); | 159 | setSorting( false ); |
160 | setPaintingEnabled( FALSE ); | 160 | setPaintingEnabled( FALSE ); |
@@ -180,28 +180,28 @@ void AbTable::setOrderedList( const QValueList<int> ordered ) | |||
180 | intFields = ordered; | 180 | intFields = ordered; |
181 | } | 181 | } |
182 | 182 | ||
183 | 183 | ||
184 | bool AbTable::selectContact( int UID ) | 184 | bool AbTable::selectContact( int UID ) |
185 | { | 185 | { |
186 | owarn << "AbTable::selectContact( " << UID << " )" << oendl; | 186 | odebug << "AbTable::selectContact( " << UID << " )" << oendl; |
187 | int rows = numRows(); | 187 | int rows = numRows(); |
188 | Opie::OPimContact* foundContact = 0l; | 188 | Opie::OPimContact* foundContact = 0l; |
189 | bool found = false; | 189 | bool found = false; |
190 | 190 | ||
191 | setPaintingEnabled( FALSE ); | 191 | setPaintingEnabled( FALSE ); |
192 | owarn << "Search start" << oendl; | 192 | odebug << "Search start" << oendl; |
193 | for ( int r = 0; r < rows; ++r ) { | 193 | for ( int r = 0; r < rows; ++r ) { |
194 | if ( m_viewList.uidAt( r ) == UID ){ | 194 | if ( m_viewList.uidAt( r ) == UID ){ |
195 | ensureCellVisible( r, 0 ); | 195 | ensureCellVisible( r, 0 ); |
196 | setCurrentCell( r, 0 ); | 196 | setCurrentCell( r, 0 ); |
197 | found = true; | 197 | found = true; |
198 | break; | 198 | break; |
199 | } | 199 | } |
200 | } | 200 | } |
201 | owarn << "Search end" << oendl; | 201 | odebug << "Search end" << oendl; |
202 | 202 | ||
203 | if ( !found ){ | 203 | if ( !found ){ |
204 | ensureCellVisible( 0,0 ); | 204 | ensureCellVisible( 0,0 ); |
205 | setCurrentCell( 0, 0 ); | 205 | setCurrentCell( 0, 0 ); |
206 | } | 206 | } |
207 | 207 | ||
@@ -210,13 +210,13 @@ bool AbTable::selectContact( int UID ) | |||
210 | return true; | 210 | return true; |
211 | } | 211 | } |
212 | 212 | ||
213 | #if 0 | 213 | #if 0 |
214 | void AbTable::insertIntoTable( const Opie::OPimContact& cnt, int row ) | 214 | void AbTable::insertIntoTable( const Opie::OPimContact& cnt, int row ) |
215 | { | 215 | { |
216 | owarn << "void AbTable::insertIntoTable( const Opie::OPimContact& cnt, " | 216 | odebug << "void AbTable::insertIntoTable( const Opie::OPimContact& cnt, " |
217 | << row << " )" << oendl; | 217 | << row << " )" << oendl; |
218 | QString strName; | 218 | QString strName; |
219 | ContactItem contactItem; | 219 | ContactItem contactItem; |
220 | 220 | ||
221 | strName = findContactName( cnt ); | 221 | strName = findContactName( cnt ); |
222 | contactItem = findContactContact( cnt, row ); | 222 | contactItem = findContactContact( cnt, row ); |
@@ -280,13 +280,13 @@ int AbTable::currentEntry_UID() | |||
280 | { | 280 | { |
281 | return ( currentEntry().uid() ); | 281 | return ( currentEntry().uid() ); |
282 | } | 282 | } |
283 | 283 | ||
284 | void AbTable::clear() | 284 | void AbTable::clear() |
285 | { | 285 | { |
286 | owarn << "void AbTable::clear()" << oendl; | 286 | odebug << "void AbTable::clear()" << oendl; |
287 | // contactList.clear(); | 287 | // contactList.clear(); |
288 | 288 | ||
289 | setPaintingEnabled( FALSE ); | 289 | setPaintingEnabled( FALSE ); |
290 | for ( int r = 0; r < numRows(); ++r ) { | 290 | for ( int r = 0; r < numRows(); ++r ) { |
291 | for ( int c = 0; c < numCols(); ++c ) { | 291 | for ( int c = 0; c < numCols(); ++c ) { |
292 | if ( cellWidget( r, c ) ) | 292 | if ( cellWidget( r, c ) ) |
@@ -331,36 +331,36 @@ void AbTable::keyPressEvent( QKeyEvent *e ) | |||
331 | { | 331 | { |
332 | char key = toupper( e->ascii() ); | 332 | char key = toupper( e->ascii() ); |
333 | 333 | ||
334 | if ( key >= 'A' && key <= 'Z' ) | 334 | if ( key >= 'A' && key <= 'Z' ) |
335 | moveTo( key ); | 335 | moveTo( key ); |
336 | 336 | ||
337 | // owarn << "Received key .." << oendl; | 337 | // odebug << "Received key .." << oendl; |
338 | switch( e->key() ) { | 338 | switch( e->key() ) { |
339 | case Qt::Key_Space: | 339 | case Qt::Key_Space: |
340 | case Qt::Key_Return: | 340 | case Qt::Key_Return: |
341 | case Qt::Key_Enter: | 341 | case Qt::Key_Enter: |
342 | emit signalSwitch(); | 342 | emit signalSwitch(); |
343 | break; | 343 | break; |
344 | // case Qt::Key_Up: | 344 | // case Qt::Key_Up: |
345 | // owarn << "a" << oendl; | 345 | // odebug << "a" << oendl; |
346 | // emit signalKeyUp(); | 346 | // emit signalKeyUp(); |
347 | // break; | 347 | // break; |
348 | // case Qt::Key_Down: | 348 | // case Qt::Key_Down: |
349 | // owarn << "b" << oendl; | 349 | // odebug << "b" << oendl; |
350 | // emit signalKeyDown(); | 350 | // emit signalKeyDown(); |
351 | // break; | 351 | // break; |
352 | default: | 352 | default: |
353 | QTable::keyPressEvent( e ); | 353 | QTable::keyPressEvent( e ); |
354 | } | 354 | } |
355 | 355 | ||
356 | } | 356 | } |
357 | 357 | ||
358 | void AbTable::moveTo( char c ) | 358 | void AbTable::moveTo( char c ) |
359 | { | 359 | { |
360 | owarn << "void AbTable::moveTo( char c ) NOT IMPLEMENTED !!" << oendl; | 360 | odebug << "void AbTable::moveTo( char c ) NOT IMPLEMENTED !!" << oendl; |
361 | 361 | ||
362 | #if 0 | 362 | #if 0 |
363 | int rows = numRows(); | 363 | int rows = numRows(); |
364 | QString value; | 364 | QString value; |
365 | AbTableItem *abi; | 365 | AbTableItem *abi; |
366 | int r; | 366 | int r; |
@@ -420,13 +420,13 @@ void AbTable::resizeRows() { | |||
420 | */ | 420 | */ |
421 | } | 421 | } |
422 | 422 | ||
423 | 423 | ||
424 | void AbTable::realignTable() | 424 | void AbTable::realignTable() |
425 | { | 425 | { |
426 | //owarn << "void AbTable::realignTable()" << oendl; | 426 | //odebug << "void AbTable::realignTable()" << oendl; |
427 | 427 | ||
428 | setPaintingEnabled( FALSE ); | 428 | setPaintingEnabled( FALSE ); |
429 | 429 | ||
430 | resizeRows(); | 430 | resizeRows(); |
431 | fitColumns(); | 431 | fitColumns(); |
432 | 432 | ||
@@ -470,37 +470,37 @@ void QTable::paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch ) | |||
470 | // } | 470 | // } |
471 | 471 | ||
472 | 472 | ||
473 | 473 | ||
474 | void AbTable::fitColumns() | 474 | void AbTable::fitColumns() |
475 | { | 475 | { |
476 | owarn << "void AbTable::fitColumns()" << oendl; | 476 | odebug << "void AbTable::fitColumns()" << oendl; |
477 | int contentsWidth = visibleWidth() / 2; | 477 | int contentsWidth = visibleWidth() / 2; |
478 | // Fix to better value | 478 | // Fix to better value |
479 | // contentsWidth = 130; | 479 | // contentsWidth = 130; |
480 | 480 | ||
481 | setPaintingEnabled( FALSE ); | 481 | setPaintingEnabled( FALSE ); |
482 | 482 | ||
483 | if ( columnVisible == false ){ | 483 | if ( columnVisible == false ){ |
484 | showColumn(0); | 484 | showColumn(0); |
485 | columnVisible = true; | 485 | columnVisible = true; |
486 | } | 486 | } |
487 | 487 | ||
488 | //owarn << "Width: " << contentsWidth << oendl; | 488 | //odebug << "Width: " << contentsWidth << oendl; |
489 | 489 | ||
490 | setColumnWidth( 0, contentsWidth ); | 490 | setColumnWidth( 0, contentsWidth ); |
491 | adjustColumn(1); | 491 | adjustColumn(1); |
492 | if ( columnWidth(1) < contentsWidth ) | 492 | if ( columnWidth(1) < contentsWidth ) |
493 | setColumnWidth( 1, contentsWidth ); | 493 | setColumnWidth( 1, contentsWidth ); |
494 | 494 | ||
495 | setPaintingEnabled( TRUE ); | 495 | setPaintingEnabled( TRUE ); |
496 | } | 496 | } |
497 | 497 | ||
498 | void AbTable::show() | 498 | void AbTable::show() |
499 | { | 499 | { |
500 | //owarn << "void AbTable::show()" << oendl; | 500 | //odebug << "void AbTable::show()" << oendl; |
501 | realignTable(); | 501 | realignTable(); |
502 | QTable::show(); | 502 | QTable::show(); |
503 | } | 503 | } |
504 | 504 | ||
505 | #if 0 | 505 | #if 0 |
506 | void AbTable::setChoiceNames( const QStringList& list) | 506 | void AbTable::setChoiceNames( const QStringList& list) |
@@ -518,17 +518,17 @@ void AbTable::setChoiceNames( const QStringList& list) | |||
518 | fitColumns(); | 518 | fitColumns(); |
519 | } | 519 | } |
520 | #endif | 520 | #endif |
521 | 521 | ||
522 | void AbTable::itemClicked(int,int col) | 522 | void AbTable::itemClicked(int,int col) |
523 | { | 523 | { |
524 | //owarn << "AbTable::itemClicked(int, col: " << col << ")" << oendl; | 524 | //odebug << "AbTable::itemClicked(int, col: " << col << ")" << oendl; |
525 | if ( col == 2 ) { | 525 | if ( col == 2 ) { |
526 | return; | 526 | return; |
527 | } else { | 527 | } else { |
528 | //owarn << "Emitting signalSwitch()" << oendl; | 528 | //odebug << "Emitting signalSwitch()" << oendl; |
529 | emit signalSwitch(); | 529 | emit signalSwitch(); |
530 | } | 530 | } |
531 | } | 531 | } |
532 | 532 | ||
533 | #if 0 | 533 | #if 0 |
534 | QStringList AbTable::choiceNames() const | 534 | QStringList AbTable::choiceNames() const |
@@ -559,13 +559,13 @@ QStringList AbTable::choiceSelection(int /*index*/) const | |||
559 | return r; | 559 | return r; |
560 | } | 560 | } |
561 | 561 | ||
562 | 562 | ||
563 | void AbTable::updateVisible() | 563 | void AbTable::updateVisible() |
564 | { | 564 | { |
565 | //owarn << "void AbTable::updateVisible()" << oendl; | 565 | //odebug << "void AbTable::updateVisible()" << oendl; |
566 | 566 | ||
567 | int visible, | 567 | int visible, |
568 | totalRows, | 568 | totalRows, |
569 | row, | 569 | row, |
570 | selectedRow = 0; | 570 | selectedRow = 0; |
571 | 571 | ||
@@ -595,13 +595,13 @@ void AbTable::updateVisible() | |||
595 | setPaintingEnabled( TRUE ); | 595 | setPaintingEnabled( TRUE ); |
596 | } | 596 | } |
597 | 597 | ||
598 | 598 | ||
599 | void AbTable::setPaintingEnabled( bool e ) | 599 | void AbTable::setPaintingEnabled( bool e ) |
600 | { | 600 | { |
601 | //owarn << "IN void AbTable::setPaintingEnabled( " << e << " )->Nested: " | 601 | //odebug << "IN void AbTable::setPaintingEnabled( " << e << " )->Nested: " |
602 | // << countNested << oendl; | 602 | // << countNested << oendl; |
603 | 603 | ||
604 | if ( e ) { | 604 | if ( e ) { |
605 | if ( countNested > 0 ) | 605 | if ( countNested > 0 ) |
606 | --countNested; | 606 | --countNested; |
607 | if ( ! countNested ){ | 607 | if ( ! countNested ){ |
@@ -612,29 +612,29 @@ void AbTable::setPaintingEnabled( bool e ) | |||
612 | } | 612 | } |
613 | } else { | 613 | } else { |
614 | ++countNested; | 614 | ++countNested; |
615 | enablePainting = false; | 615 | enablePainting = false; |
616 | setUpdatesEnabled( false ); | 616 | setUpdatesEnabled( false ); |
617 | } | 617 | } |
618 | //owarn << "OUT void AbTable::setPaintingEnabled( " << e << " )->Nested: " | 618 | //odebug << "OUT void AbTable::setPaintingEnabled( " << e << " )->Nested: " |
619 | // << countNested << oendl; | 619 | // << countNested << oendl; |
620 | } | 620 | } |
621 | 621 | ||
622 | void AbTable::viewportPaintEvent( QPaintEvent* e ) { | 622 | void AbTable::viewportPaintEvent( QPaintEvent* e ) { |
623 | //owarn << "void AbTable::viewportPaintEvent( QPaintEvent* e ) -> " | 623 | //odebug << "void AbTable::viewportPaintEvent( QPaintEvent* e ) -> " |
624 | // << enablePainting << oendl; | 624 | // << enablePainting << oendl; |
625 | if ( enablePainting ) | 625 | if ( enablePainting ) |
626 | QTable::viewportPaintEvent( e ); | 626 | QTable::viewportPaintEvent( e ); |
627 | } | 627 | } |
628 | 628 | ||
629 | void AbTable::paintCell(QPainter* p, int row, int col, const QRect& cr, bool ) { | 629 | void AbTable::paintCell(QPainter* p, int row, int col, const QRect& cr, bool ) { |
630 | const QColorGroup &cg = colorGroup(); | 630 | const QColorGroup &cg = colorGroup(); |
631 | 631 | ||
632 | p->save(); | 632 | p->save(); |
633 | 633 | ||
634 | //owarn << "Paint row: " << row << oendl; | 634 | //odebug << "Paint row: " << row << oendl; |
635 | 635 | ||
636 | Opie::OPimContact act_contact = m_viewList[row]; | 636 | Opie::OPimContact act_contact = m_viewList[row]; |
637 | 637 | ||
638 | // Paint alternating background bars | 638 | // Paint alternating background bars |
639 | if ( (row % 2 ) == 0 ) { | 639 | if ( (row % 2 ) == 0 ) { |
640 | p->fillRect( 0, 0, cr.width(), cr.height(), cg.brush( QColorGroup::Base ) ); | 640 | p->fillRect( 0, 0, cr.width(), cr.height(), cg.brush( QColorGroup::Base ) ); |