summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abtable.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp4
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()
setPaintingEnabled( FALSE );
resizeRows();
fitColumns();
setPaintingEnabled( TRUE );
}
#if QT_VERSION <= 230
#ifndef SINGLE_APP
void QTable::paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch )
{
// Region of the rect we should draw
QRegion reg( QRect( cx, cy, cw, ch ) );
// Subtract the table from it
reg = reg.subtract( QRect( QPoint( 0, 0 ), tableSize() ) );
// And draw the rectangles (transformed as needed)
QArray<QRect> r = reg.rects();
for (unsigned int i=0; i<r.count(); i++)
p->fillRect( r[i], colorGroup().brush( QColorGroup::Base ) );
}
#endif
#endif
// int AbTable::rowHeight( int ) const
// {
// return 18;
// }
// int AbTable::rowPos( int row ) const
// {
// return 18*row;
// }
// int AbTable::rowAt( int pos ) const
// {
// return QMIN( pos/18, numRows()-1 );
// }
void AbTable::fitColumns()
{
- // qWarning( "void AbTable::fitColumns()" );
- int contentsWidth = visibleWidth() / 2; // :SX Why too low
+ qWarning( "void AbTable::fitColumns()" );
+ int contentsWidth = visibleWidth() / 2;
// Fix to better value
// contentsWidth = 130;
setPaintingEnabled( FALSE );
if ( columnVisible == false ){
showColumn(0);
columnVisible = true;
}
// qWarning("Width: %d", contentsWidth);
setColumnWidth( 0, contentsWidth );
adjustColumn(1);
if ( columnWidth(1) < contentsWidth )
setColumnWidth( 1, contentsWidth );
setPaintingEnabled( TRUE );
}
void AbTable::show()
{
// qWarning( "void AbTable::show()" );
realignTable();
QTable::show();
}
#if 0
void AbTable::setChoiceNames( const QStringList& list)
{
choicenames = list;
if ( choicenames.isEmpty() ) {
// hide pick column
setNumCols( 2 );
} else {
// show pick column
setNumCols( 3 );
setColumnWidth( 2, fontMetrics().width(tr( "Pick" ))+8 );
horizontalHeader()->setLabel( 2, tr( "Pick" ));
}
fitColumns();
}
#endif
void AbTable::itemClicked(int,int col)
{
// qWarning( "AbTable::itemClicked(int, col:%d)", col);
if ( col == 2 ) {