From b87533f9904c10f24d6b2e8177c00944e3efe15b Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 26 Nov 2025 15:11:22 +0900 Subject: Replace TRUE/FALSE with boolean values true/false - part 4 Manually cherry-picked from commit 4d495175 Signed-off-by: Michele Calgaro --- doc/html/dirview-example.html | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'doc/html/dirview-example.html') diff --git a/doc/html/dirview-example.html b/doc/html/dirview-example.html index 93386e7b0..59487ce6c 100644 --- a/doc/html/dirview-example.html +++ b/doc/html/dirview-example.html @@ -116,7 +116,7 @@ class DirectoryView : public TQListView TQ_OBJECT public: - DirectoryView( TQWidget *parent = 0, const char *name = 0, bool sdo = FALSE ); + DirectoryView( TQWidget *parent = 0, const char *name = 0, bool sdo = false ); bool showDirsOnly() { return dirsOnly; } public slots: @@ -360,12 +360,12 @@ Directory::Directory( TQListView * parent, const TQString s( fullName() ); TQDir thisDir( s ); if ( !thisDir.isReadable() ) { - readable = FALSE; - setExpandable( FALSE ); + readable = false; + setExpandable( false ); return; } - listView()->setUpdatesEnabled( FALSE ); + listView()->setUpdatesEnabled( false ); const TQFileInfoList * files = thisDir.entryInfoList(); if ( files ) { TQFileInfoListIterator it( *files ); @@ -389,7 +389,7 @@ Directory::Directory( TQListView * parent, const } } } - listView()->setUpdatesEnabled( TRUE ); + listView()->setUpdatesEnabled( true ); } TQListViewItem::setOpen( o ); } @@ -397,7 +397,7 @@ Directory::Directory( TQListView * parent, const void Directory::setup() { - setExpandable( TRUE ); + setExpandable( true ); TQListViewItem::setup(); } @@ -434,7 +434,7 @@ TQString Directory::fullName() DirectoryView::DirectoryView( TQWidget *parent, const char *name, bool sdo ) : TQListView( parent, name ), dirsOnly( sdo ), oldCurrent( 0 ), - dropItem( 0 ), mousePressed( FALSE ) + dropItem( 0 ), mousePressed( false ) { autoopen_timer = new TQTimer( this ); if ( !folderLocked ) { @@ -449,8 +449,8 @@ TQString Directory::fullName() connect( this, TQ_SIGNAL( returnPressed( TQListViewItem * ) ), this, TQ_SLOT( slotFolderSelected( TQListViewItem * ) ) ); - setAcceptDrops( TRUE ); - viewport()->setAcceptDrops( TRUE ); + setAcceptDrops( true ); + viewport()->setAcceptDrops( true ); connect( autoopen_timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( openFolder() ) ); @@ -469,7 +469,7 @@ void DirectoryView::openFolder() { autoopen_timer->stop(); if ( dropItem && !dropItem->isOpen() ) { - dropItem->setOpen( TRUE ); + dropItem->setOpen( true ); dropItem->repaint(); } } @@ -504,7 +504,7 @@ static const int autoopenTime = 750; TQPoint vp = contentsToViewport( ( (TQDragMoveEvent*)e )->pos() ); TQListViewItem *i = itemAt( vp ); if ( i ) { - setSelected( i, TRUE ); + setSelected( i, true ); e->accept(); if ( i != dropItem ) { autoopen_timer->stop(); @@ -536,7 +536,7 @@ static const int autoopenTime = 750; dropItem = 0; setCurrentItem( oldCurrent ); - setSelected( oldCurrent, TRUE ); + setSelected( oldCurrent, true ); } void DirectoryView::contentsDropEvent( TQDropEvent *e ) @@ -621,7 +621,7 @@ TQString DirectoryView::fullPath(TQListViewItem* item) treeStepSize() * ( i->depth() + ( rootIsDecorated() ? 1 : 0) ) + itemMargin() || p.x() < header()->cellPos( header()->mapToActual( 0 ) ) ) { presspos = e->pos(); - mousePressed = TRUE; + mousePressed = true; } } } @@ -629,7 +629,7 @@ TQString DirectoryView::fullPath(TQListViewItem* item) void DirectoryView::contentsMouseMoveEvent( TQMouseEvent* e ) { if ( mousePressed && ( presspos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() ) { - mousePressed = FALSE; + mousePressed = false; TQListViewItem *item = itemAt( contentsToViewport(presspos) ); if ( item ) { TQString source = fullPath(item); @@ -646,7 +646,7 @@ TQString DirectoryView::fullPath(TQListViewItem* item) void DirectoryView::contentsMouseReleaseEvent( TQMouseEvent * ) { - mousePressed = FALSE; + mousePressed = false; } void DirectoryView::setDir( const TQString &s ) @@ -654,7 +654,7 @@ void DirectoryView::setDir( const TQ TQListViewItemIterator it( this ); ++it; for ( ; it.current(); ++it ) { - it.current()->setOpen( FALSE ); + it.current()->setOpen( false ); } TQStringList lst( TQStringList::split( "/", s ) ); @@ -663,7 +663,7 @@ void DirectoryView::setDir( const TQ for ( ; it2 != lst.end(); ++it2 ) { while ( item ) { if ( item->text( 0 ) == *it2 ) { - item->setOpen( TRUE ); + item->setOpen( true ); break; } item = item->itemBelow(); @@ -726,12 +726,12 @@ int main( int argc, char ** argv ) ++i; Directory * root = new Directory( &mw, fi->filePath() ); if ( roots->count() <= 1 ) - root->setOpen( TRUE ); // be interesting + root->setOpen( true ); // be interesting } mw.resize( 400, 400 ); mw.setCaption( "TQt Example - Directory Browser" ); - mw.setAllColumnsShowFocus( TRUE ); + mw.setAllColumnsShowFocus( true ); a.setMainWidget( &mw ); mw.show(); -- cgit v1.2.3