author | eilers <eilers> | 2003-09-29 07:48:56 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-09-29 07:48:56 (UTC) |
commit | 9883c4ba419d93e101991a3337ba1ac5de3273c8 (patch) (unidiff) | |
tree | ecb5d96884914a8578f040d4b558f8697b3d60f5 /core/pim/addressbook/abtable.cpp | |
parent | 93b76e67cf954eab09091996a790301369d77a88 (diff) | |
download | opie-9883c4ba419d93e101991a3337ba1ac5de3273c8.zip opie-9883c4ba419d93e101991a3337ba1ac5de3273c8.tar.gz opie-9883c4ba419d93e101991a3337ba1ac5de3273c8.tar.bz2 |
ocontactfields is now moved to libopie/pim
Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 4705c78..70330c7 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp | |||
@@ -438,98 +438,98 @@ void AbTable::realignTable() | |||
438 | setPaintingEnabled( FALSE ); | 438 | setPaintingEnabled( FALSE ); |
439 | 439 | ||
440 | resizeRows(); | 440 | resizeRows(); |
441 | fitColumns(); | 441 | fitColumns(); |
442 | 442 | ||
443 | setPaintingEnabled( TRUE ); | 443 | setPaintingEnabled( TRUE ); |
444 | 444 | ||
445 | } | 445 | } |
446 | 446 | ||
447 | 447 | ||
448 | 448 | ||
449 | 449 | ||
450 | #if QT_VERSION <= 230 | 450 | #if QT_VERSION <= 230 |
451 | #ifndef SINGLE_APP | 451 | #ifndef SINGLE_APP |
452 | void QTable::paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch ) | 452 | void QTable::paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch ) |
453 | { | 453 | { |
454 | // Region of the rect we should draw | 454 | // Region of the rect we should draw |
455 | QRegion reg( QRect( cx, cy, cw, ch ) ); | 455 | QRegion reg( QRect( cx, cy, cw, ch ) ); |
456 | // Subtract the table from it | 456 | // Subtract the table from it |
457 | reg = reg.subtract( QRect( QPoint( 0, 0 ), tableSize() ) ); | 457 | reg = reg.subtract( QRect( QPoint( 0, 0 ), tableSize() ) ); |
458 | // And draw the rectangles (transformed as needed) | 458 | // And draw the rectangles (transformed as needed) |
459 | QArray<QRect> r = reg.rects(); | 459 | QArray<QRect> r = reg.rects(); |
460 | for (unsigned int i=0; i<r.count(); i++) | 460 | for (unsigned int i=0; i<r.count(); i++) |
461 | p->fillRect( r[i], colorGroup().brush( QColorGroup::Base ) ); | 461 | p->fillRect( r[i], colorGroup().brush( QColorGroup::Base ) ); |
462 | } | 462 | } |
463 | #endif | 463 | #endif |
464 | #endif | 464 | #endif |
465 | 465 | ||
466 | 466 | ||
467 | // int AbTable::rowHeight( int ) const | 467 | // int AbTable::rowHeight( int ) const |
468 | // { | 468 | // { |
469 | // return 18; | 469 | // return 18; |
470 | // } | 470 | // } |
471 | 471 | ||
472 | // int AbTable::rowPos( int row ) const | 472 | // int AbTable::rowPos( int row ) const |
473 | // { | 473 | // { |
474 | // return 18*row; | 474 | // return 18*row; |
475 | // } | 475 | // } |
476 | 476 | ||
477 | // int AbTable::rowAt( int pos ) const | 477 | // int AbTable::rowAt( int pos ) const |
478 | // { | 478 | // { |
479 | // return QMIN( pos/18, numRows()-1 ); | 479 | // return QMIN( pos/18, numRows()-1 ); |
480 | // } | 480 | // } |
481 | 481 | ||
482 | 482 | ||
483 | 483 | ||
484 | void AbTable::fitColumns() | 484 | void AbTable::fitColumns() |
485 | { | 485 | { |
486 | //qWarning( "void AbTable::fitColumns()" ); | 486 | qWarning( "void AbTable::fitColumns()" ); |
487 | int contentsWidth = visibleWidth() / 2; // :SX Why too low | 487 | int contentsWidth = visibleWidth() / 2; |
488 | // Fix to better value | 488 | // Fix to better value |
489 | // contentsWidth = 130; | 489 | // contentsWidth = 130; |
490 | 490 | ||
491 | setPaintingEnabled( FALSE ); | 491 | setPaintingEnabled( FALSE ); |
492 | 492 | ||
493 | if ( columnVisible == false ){ | 493 | if ( columnVisible == false ){ |
494 | showColumn(0); | 494 | showColumn(0); |
495 | columnVisible = true; | 495 | columnVisible = true; |
496 | } | 496 | } |
497 | 497 | ||
498 | //qWarning("Width: %d", contentsWidth); | 498 | //qWarning("Width: %d", contentsWidth); |
499 | 499 | ||
500 | setColumnWidth( 0, contentsWidth ); | 500 | setColumnWidth( 0, contentsWidth ); |
501 | adjustColumn(1); | 501 | adjustColumn(1); |
502 | if ( columnWidth(1) < contentsWidth ) | 502 | if ( columnWidth(1) < contentsWidth ) |
503 | setColumnWidth( 1, contentsWidth ); | 503 | setColumnWidth( 1, contentsWidth ); |
504 | 504 | ||
505 | setPaintingEnabled( TRUE ); | 505 | setPaintingEnabled( TRUE ); |
506 | } | 506 | } |
507 | 507 | ||
508 | void AbTable::show() | 508 | void AbTable::show() |
509 | { | 509 | { |
510 | //qWarning( "void AbTable::show()" ); | 510 | //qWarning( "void AbTable::show()" ); |
511 | realignTable(); | 511 | realignTable(); |
512 | QTable::show(); | 512 | QTable::show(); |
513 | } | 513 | } |
514 | 514 | ||
515 | #if 0 | 515 | #if 0 |
516 | void AbTable::setChoiceNames( const QStringList& list) | 516 | void AbTable::setChoiceNames( const QStringList& list) |
517 | { | 517 | { |
518 | choicenames = list; | 518 | choicenames = list; |
519 | if ( choicenames.isEmpty() ) { | 519 | if ( choicenames.isEmpty() ) { |
520 | // hide pick column | 520 | // hide pick column |
521 | setNumCols( 2 ); | 521 | setNumCols( 2 ); |
522 | } else { | 522 | } else { |
523 | // show pick column | 523 | // show pick column |
524 | setNumCols( 3 ); | 524 | setNumCols( 3 ); |
525 | setColumnWidth( 2, fontMetrics().width(tr( "Pick" ))+8 ); | 525 | setColumnWidth( 2, fontMetrics().width(tr( "Pick" ))+8 ); |
526 | horizontalHeader()->setLabel( 2, tr( "Pick" )); | 526 | horizontalHeader()->setLabel( 2, tr( "Pick" )); |
527 | } | 527 | } |
528 | fitColumns(); | 528 | fitColumns(); |
529 | } | 529 | } |
530 | #endif | 530 | #endif |
531 | 531 | ||
532 | void AbTable::itemClicked(int,int col) | 532 | void AbTable::itemClicked(int,int col) |
533 | { | 533 | { |
534 | //qWarning( "AbTable::itemClicked(int, col:%d)", col); | 534 | //qWarning( "AbTable::itemClicked(int, col:%d)", col); |
535 | if ( col == 2 ) { | 535 | if ( col == 2 ) { |