From a2277b6bc715464e83882b90c2a058139b8a6b54 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 23 Jun 2011 01:42:07 +0000 Subject: TQt4 port kdeutils This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdf/listview.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'kdf/listview.cpp') diff --git a/kdf/listview.cpp b/kdf/listview.cpp index 0334101..fc2dde6 100644 --- a/kdf/listview.cpp +++ b/kdf/listview.cpp @@ -20,7 +20,7 @@ // // 1999-11-28 Espen Sand // The purpose of this class is: -// 1) Easily set minimum number of visible items and to adjust the sizeHint() +// 1) Easily set minimum number of visible items and to adjust the tqsizeHint() // 2) Provide a pixmap collection // @@ -34,8 +34,8 @@ template class TQDict; -CListView::CListView( TQWidget *parent, const char *name, int visibleItem ) - :KListView( parent, name ), mVisibleItem(QMAX( 1, visibleItem )) +CListView::CListView( TQWidget *tqparent, const char *name, int visibleItem ) + :KListView( tqparent, name ), mVisibleItem(TQMAX( 1, visibleItem )) { setVisibleItem(visibleItem); mPixDict.setAutoDelete(true); @@ -43,23 +43,23 @@ CListView::CListView( TQWidget *parent, const char *name, int visibleItem ) void CListView::setVisibleItem( int visibleItem, bool updateSize ) { - mVisibleItem = QMAX( 1, visibleItem ); + mVisibleItem = TQMAX( 1, visibleItem ); if( updateSize == true ) { - TQSize s = sizeHint(); - setMinimumSize( s.width() + verticalScrollBar()->sizeHint().width() + + TQSize s = tqsizeHint(); + setMinimumSize( s.width() + verticalScrollBar()->tqsizeHint().width() + lineWidth() * 2, s.height() ); } } -TQSize CListView::sizeHint( void ) const +TQSize CListView::tqsizeHint( void ) const { - TQSize s = TQListView::sizeHint(); + TQSize s = TQListView::tqsizeHint(); int h = fontMetrics().height() + 2*itemMargin(); if( h % 2 > 0 ) { h++; } - s.setHeight( h*mVisibleItem + lineWidth()*2 + header()->sizeHint().height()); + s.setHeight( h*mVisibleItem + lineWidth()*2 + header()->tqsizeHint().height()); return( s ); } @@ -76,12 +76,12 @@ const TQPixmap &CListView::icon( const TQString &iconName, bool drawBorder ) { // // 2000-01-23 Espen Sand - // Careful here: If the mask has not been defined we can - // not use TQPixmap::mask() because it returns 0 => segfault + // Careful here: If the tqmask has not been defined we can + // not use TQPixmap::tqmask() because it returns 0 => segfault // - if( pix->mask() != 0 ) + if( pix->tqmask() != 0 ) { - TQBitmap *bm = new TQBitmap(*(pix->mask())); + TQBitmap *bm = new TQBitmap(*(pix->tqmask())); if( bm != 0 ) { TQPainter qp(bm); @@ -99,7 +99,7 @@ const TQPixmap &CListView::icon( const TQString &iconName, bool drawBorder ) } } - mPixDict.replace( iconName, pix ); + mPixDict.tqreplace( iconName, pix ); } return( *pix ); -- cgit v1.2.1