diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-01 22:09:14 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-08 09:01:42 +0900 |
| commit | 81ade129093a279e6537db25710583fd2bba9427 (patch) | |
| tree | a210834cbccc8aee2e9de7a8b7f41e1d31e2ced0 /examples/iconview | |
| parent | 35ced32e331ee29fda1642616c803637952f5b22 (diff) | |
| download | tqt-81ade129.tar.gz tqt-81ade129.zip | |
Replace TRUE/FALSE with boolean values true/false - part 2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit c03a4800879ab62692e017e01c825ba12a421ad0)
Diffstat (limited to 'examples/iconview')
| -rw-r--r-- | examples/iconview/main.cpp | 2 | ||||
| -rw-r--r-- | examples/iconview/simple_dd/main.cpp | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/examples/iconview/main.cpp b/examples/iconview/main.cpp index f7ed6eeb8..6f4c8e535 100644 --- a/examples/iconview/main.cpp +++ b/examples/iconview/main.cpp @@ -55,7 +55,7 @@ int main( int argc, char **argv ) for ( unsigned int i = 0; i < 3000; i++ ) { TQIconViewItem *item = new TQIconViewItem( &qiconview, TQString( "Item %1" ).arg( i + 1 ) ); - item->setRenameEnabled( TRUE ); + item->setRenameEnabled( true ); } qiconview.setCaption( "TQt Example - Iconview" ); diff --git a/examples/iconview/simple_dd/main.cpp b/examples/iconview/simple_dd/main.cpp index 16d3b53c5..e638bcdc3 100644 --- a/examples/iconview/simple_dd/main.cpp +++ b/examples/iconview/simple_dd/main.cpp @@ -78,8 +78,8 @@ const char* green_icon[]={ DDListBox::DDListBox( TQWidget * parent, const char * name, WFlags f ) : TQListBox( parent, name, f ) { - setAcceptDrops( TRUE ); - dragging = FALSE; + setAcceptDrops( true ); + dragging = false; } @@ -102,7 +102,7 @@ void DDListBox::dropEvent( TQDropEvent *evt ) void DDListBox::mousePressEvent( TQMouseEvent *evt ) { TQListBox::mousePressEvent( evt ); - dragging = TRUE; + dragging = true; } @@ -111,7 +111,7 @@ void DDListBox::mouseMoveEvent( TQMouseEvent * ) if ( dragging ) { TQDragObject *d = new TQTextDrag( currentText(), this ); d->dragCopy(); // do NOT delete d. - dragging = FALSE; + dragging = false; } } @@ -122,8 +122,8 @@ void DDListBox::mouseMoveEvent( TQMouseEvent * ) bool DDIconViewItem::acceptDrop( const TQMimeSource *mime ) const { if ( mime->provides( "text/plain" ) ) - return TRUE; - return FALSE; + return true; + return false; } @@ -149,7 +149,7 @@ void DDIconView::slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem if ( TQTextDrag::decode( evt, label ) ) { DDIconViewItem *item = new DDIconViewItem( this, label ); - item->setRenameEnabled( TRUE ); + item->setRenameEnabled( true ); } } @@ -175,11 +175,11 @@ int main( int argc, char *argv[] ) // Populate the TQIconView with icons DDIconViewItem *item; item = new DDIconViewItem( iv, "Red", TQPixmap( red_icon ) ); - item->setRenameEnabled( TRUE ); + item->setRenameEnabled( true ); item = new DDIconViewItem( iv, "Green", TQPixmap( green_icon ) ); - item->setRenameEnabled( TRUE ); + item->setRenameEnabled( true ); item = new DDIconViewItem( iv, "Blue", TQPixmap( blue_icon ) ); - item->setRenameEnabled( TRUE ); + item->setRenameEnabled( true ); return app.exec(); } |
