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 | |
| 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')
167 files changed, 935 insertions, 938 deletions
diff --git a/examples/aclock/main.cpp b/examples/aclock/main.cpp index 0331d790e..0ca3edae5 100644 --- a/examples/aclock/main.cpp +++ b/examples/aclock/main.cpp @@ -16,7 +16,7 @@ int main( int argc, char **argv ) TQApplication a( argc, argv ); AnalogClock *clock = new AnalogClock; if ( argc == 2 && strcmp( argv[1], "-transparent" ) == 0 ) - clock->setAutoMask( TRUE ); + clock->setAutoMask( true ); clock->resize( 100, 100 ); a.setMainWidget( clock ); clock->setCaption("TQt Example - Analog Clock"); diff --git a/examples/action/application.cpp b/examples/action/application.cpp index ecd70cdd0..ffde54348 100644 --- a/examples/action/application.cpp +++ b/examples/action/application.cpp @@ -178,7 +178,7 @@ void ApplicationWindow::load( const TQString &fileName ) TQTextStream ts( &f ); e->setText( ts.read() ); - e->setModified( FALSE ); + e->setModified( false ); setCaption( fileName ); statusBar()->message( "Loaded document " + fileName, 2000 ); } @@ -203,7 +203,7 @@ void ApplicationWindow::save() t << text; f.close(); - e->setModified( FALSE ); + e->setModified( false ); setCaption( filename ); @@ -226,7 +226,7 @@ void ApplicationWindow::saveAs() void ApplicationWindow::print() { - printer->setFullPage( TRUE ); + printer->setFullPage( true ); if ( printer->setup(this) ) { // printer dialog statusBar()->message( "Printing..." ); TQPainter p; @@ -257,7 +257,7 @@ void ApplicationWindow::print() break; printer->newPage(); page++; - } while (TRUE); + } while (true); statusBar()->message( "Printing completed", 2000 ); } else { diff --git a/examples/action/toggleaction/toggleaction.cpp b/examples/action/toggleaction/toggleaction.cpp index 5da1a685c..dcb39f51e 100644 --- a/examples/action/toggleaction/toggleaction.cpp +++ b/examples/action/toggleaction/toggleaction.cpp @@ -13,7 +13,7 @@ int main( int argc, char **argv ) TQToolBar * toolbar = new TQToolBar( window ); TQAction * labelonoffaction = new TQAction( window, "labelonoff" ); - labelonoffaction->setToggleAction( TRUE ); + labelonoffaction->setToggleAction( true ); labelonoffaction->setText( "labels on/off" ); labelonoffaction->setAccel( TQt::ALT+TQt::Key_L ); diff --git a/examples/addressbook/centralwidget.cpp b/examples/addressbook/centralwidget.cpp index 82a2c81ae..a8eabc746 100644 --- a/examples/addressbook/centralwidget.cpp +++ b/examples/addressbook/centralwidget.cpp @@ -175,11 +175,11 @@ void ABCentralWidget::setupTabWidget() grid2->addWidget( find, 1, 4 ); connect( find, TQ_SIGNAL( clicked() ), this, TQ_SLOT( findEntries() ) ); - cFirstName->setChecked( TRUE ); - sFirstName->setEnabled( TRUE ); - sLastName->setEnabled( FALSE ); - sAddress->setEnabled( FALSE ); - sEMail->setEnabled( FALSE ); + cFirstName->setChecked( true ); + sFirstName->setEnabled( true ); + sLastName->setEnabled( false ); + sAddress->setEnabled( false ); + sEMail->setEnabled( false ); tabWidget->addTab( search, "&Search" ); @@ -199,7 +199,7 @@ void ABCentralWidget::setupListView() connect( listView, TQ_SIGNAL( clicked( TQListViewItem* ) ), this, TQ_SLOT( itemSelected( TQListViewItem* ) ) ); mainGrid->addWidget( listView, 1, 0 ); - listView->setAllColumnsShowFocus( TRUE ); + listView->setAllColumnsShowFocus( true ); } void ABCentralWidget::addEntry() @@ -245,7 +245,7 @@ void ABCentralWidget::itemSelected( TQListViewItem *item ) { if ( !item ) return; - item->setSelected( TRUE ); + item->setSelected( true ); item->repaint(); iFirstName->setText( item->text( 0 ) ); @@ -259,11 +259,11 @@ void ABCentralWidget::toggleFirstName() sFirstName->setText( "" ); if ( cFirstName->isChecked() ) { - sFirstName->setEnabled( TRUE ); + sFirstName->setEnabled( true ); sFirstName->setFocus(); } else - sFirstName->setEnabled( FALSE ); + sFirstName->setEnabled( false ); } void ABCentralWidget::toggleLastName() @@ -271,11 +271,11 @@ void ABCentralWidget::toggleLastName() sLastName->setText( "" ); if ( cLastName->isChecked() ) { - sLastName->setEnabled( TRUE ); + sLastName->setEnabled( true ); sLastName->setFocus(); } else - sLastName->setEnabled( FALSE ); + sLastName->setEnabled( false ); } void ABCentralWidget::toggleAddress() @@ -283,11 +283,11 @@ void ABCentralWidget::toggleAddress() sAddress->setText( "" ); if ( cAddress->isChecked() ) { - sAddress->setEnabled( TRUE ); + sAddress->setEnabled( true ); sAddress->setFocus(); } else - sAddress->setEnabled( FALSE ); + sAddress->setEnabled( false ); } void ABCentralWidget::toggleEMail() @@ -295,11 +295,11 @@ void ABCentralWidget::toggleEMail() sEMail->setText( "" ); if ( cEMail->isChecked() ) { - sEMail->setEnabled( TRUE ); + sEMail->setEnabled( true ); sEMail->setFocus(); } else - sEMail->setEnabled( FALSE ); + sEMail->setEnabled( false ); } void ABCentralWidget::findEntries() @@ -315,37 +315,37 @@ void ABCentralWidget::findEntries() TQListViewItemIterator it( listView ); for ( ; it.current(); ++it ) { - bool select = TRUE; + bool select = true; if ( cFirstName->isChecked() ) { if ( select && it.current()->text( 0 ).contains( sFirstName->text() ) ) - select = TRUE; + select = true; else - select = FALSE; + select = false; } if ( cLastName->isChecked() ) { if ( select && it.current()->text( 1 ).contains( sLastName->text() ) ) - select = TRUE; + select = true; else - select = FALSE; + select = false; } if ( cAddress->isChecked() ) { if ( select && it.current()->text( 2 ).contains( sAddress->text() ) ) - select = TRUE; + select = true; else - select = FALSE; + select = false; } if ( cEMail->isChecked() ) { if ( select && it.current()->text( 3 ).contains( sEMail->text() ) ) - select = TRUE; + select = true; else - select = FALSE; + select = false; } if ( select ) - it.current()->setSelected( TRUE ); + it.current()->setSelected( true ); else - it.current()->setSelected( FALSE ); + it.current()->setSelected( false ); it.current()->repaint(); } } diff --git a/examples/application/application.cpp b/examples/application/application.cpp index 455bcc425..245ed4ea9 100644 --- a/examples/application/application.cpp +++ b/examples/application/application.cpp @@ -166,7 +166,7 @@ void ApplicationWindow::load( const TQString &fileName ) TQTextStream ts( &f ); e->setText( ts.read() ); - e->setModified( FALSE ); + e->setModified( false ); setCaption( fileName ); statusBar()->message( "Loaded document " + fileName, 2000 ); } @@ -191,7 +191,7 @@ void ApplicationWindow::save() t << text; f.close(); - e->setModified( FALSE ); + e->setModified( false ); setCaption( filename ); @@ -214,7 +214,7 @@ void ApplicationWindow::saveAs() void ApplicationWindow::print() { - printer->setFullPage( TRUE ); + printer->setFullPage( true ); if ( printer->setup(this) ) { // printer dialog statusBar()->message( "Printing..." ); TQPainter p; @@ -245,7 +245,7 @@ void ApplicationWindow::print() break; printer->newPage(); page++; - } while (TRUE); + } while (true); statusBar()->message( "Printing completed", 2000 ); } else { diff --git a/examples/biff/biff.cpp b/examples/biff/biff.cpp index 4bc592d0a..50f4eb636 100644 --- a/examples/biff/biff.cpp +++ b/examples/biff/biff.cpp @@ -40,7 +40,7 @@ Biff::Biff( TQWidget *parent, const char *name ) hasNewMail.loadFromData( hasmail_bmp_data, hasmail_bmp_len ); noNewMail.loadFromData( nomail_bmp_data, nomail_bmp_len ); - gotMail = FALSE; + gotMail = false; lastModified = fi.lastModified(); } @@ -54,7 +54,7 @@ void Biff::timerEvent( TQTimerEvent * ) if ( gotMail ) lastModified = fi.lastModified(); gotMail = newState; - repaint( FALSE ); + repaint( false ); } } diff --git a/examples/buttongroups/buttongroups.cpp b/examples/buttongroups/buttongroups.cpp index 2ae71486b..a33a69b4a 100644 --- a/examples/buttongroups/buttongroups.cpp +++ b/examples/buttongroups/buttongroups.cpp @@ -36,11 +36,11 @@ ButtonsGroups::ButtonsGroups( TQWidget *parent, const char *name ) // Create an exclusive button group TQButtonGroup *bgrp1 = new TQButtonGroup( 1, TQGroupBox::Horizontal, "Button Group 1 (exclusive)", this); box1->addWidget( bgrp1 ); - bgrp1->setExclusive( TRUE ); + bgrp1->setExclusive( true ); // insert 3 radiobuttons TQRadioButton *rb11 = new TQRadioButton( "&Radiobutton 1", bgrp1 ); - rb11->setChecked( TRUE ); + rb11->setChecked( true ); (void)new TQRadioButton( "R&adiobutton 2", bgrp1 ); (void)new TQRadioButton( "Ra&diobutton 3", bgrp1 ); @@ -49,32 +49,32 @@ ButtonsGroups::ButtonsGroups( TQWidget *parent, const char *name ) // Create a non-exclusive buttongroup TQButtonGroup *bgrp2 = new TQButtonGroup( 1, TQGroupBox::Horizontal, "Button Group 2 (non-exclusive)", this ); box1->addWidget( bgrp2 ); - bgrp2->setExclusive( FALSE ); + bgrp2->setExclusive( false ); // insert 3 checkboxes (void)new TQCheckBox( "&Checkbox 1", bgrp2 ); TQCheckBox *cb12 = new TQCheckBox( "C&heckbox 2", bgrp2 ); - cb12->setChecked( TRUE ); + cb12->setChecked( true ); TQCheckBox *cb13 = new TQCheckBox( "Triple &State Button", bgrp2 ); - cb13->setTristate( TRUE ); - cb13->setChecked( TRUE ); + cb13->setTristate( true ); + cb13->setChecked( true ); // ------------ third group // create a buttongroup which is exclusive for radiobuttons and non-exclusive for all other buttons TQButtonGroup *bgrp3 = new TQButtonGroup( 1, TQGroupBox::Horizontal, "Button Group 3 (Radiobutton-exclusive)", this ); box2->addWidget( bgrp3 ); - bgrp3->setRadioButtonExclusive( TRUE ); + bgrp3->setRadioButtonExclusive( true ); // insert three radiobuttons rb21 = new TQRadioButton( "Rad&iobutton 1", bgrp3 ); rb22 = new TQRadioButton( "Radi&obutton 2", bgrp3 ); rb23 = new TQRadioButton( "Radio&button 3", bgrp3 ); - rb23->setChecked( TRUE ); + rb23->setChecked( true ); // insert a checkbox... state = new TQCheckBox( "E&nable Radiobuttons", bgrp3 ); - state->setChecked( TRUE ); + state->setChecked( true ); // ...and connect its TQ_SIGNAL clicked() with the TQ_SLOT slotChangeGrp3State() connect( state, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotChangeGrp3State() ) ); @@ -89,12 +89,12 @@ ButtonsGroups::ButtonsGroups( TQWidget *parent, const char *name ) // now make the second one a toggle button TQPushButton *tb2 = new TQPushButton( "&Toggle Button", bgrp4, "toggle" ); - tb2->setToggleButton( TRUE ); - tb2->setOn( TRUE ); + tb2->setToggleButton( true ); + tb2->setOn( true ); // ... and make the third one a flat button TQPushButton *tb3 = new TQPushButton( "&Flat Button", bgrp4, "flat" ); - tb3->setFlat(TRUE); + tb3->setFlat(true); // .. and the fourth a button with a menu TQPushButton *tb4 = new TQPushButton( "Popup Button", bgrp4, "popup" ); diff --git a/examples/canvas/blendshadow.cpp b/examples/canvas/blendshadow.cpp index d2f761db0..ce635de04 100644 --- a/examples/canvas/blendshadow.cpp +++ b/examples/canvas/blendshadow.cpp @@ -38,7 +38,7 @@ int main( int*, char**) int h = image.height(); TQImage img( w+dx, h+dy, 32 ); - img.setAlphaBuffer( TRUE ); + img.setAlphaBuffer( true ); for ( int y = 0; y < h+dy; y++ ) { for ( int x = 0; x < w+dx; x++ ) { diff --git a/examples/canvas/canvas.cpp b/examples/canvas/canvas.cpp index bd6589490..5c125d160 100644 --- a/examples/canvas/canvas.cpp +++ b/examples/canvas/canvas.cpp @@ -77,7 +77,7 @@ bool ImageItem::hit( const TQPoint &p ) const int ix = p.x()-int(x()); int iy = p.y()-int(y()); if ( !image.valid( ix , iy ) ) - return FALSE; + return false; TQRgb pixel = image.pixel( ix, iy ); return tqAlpha( pixel ) != 0; } @@ -213,7 +213,7 @@ BouncyLogo::BouncyLogo(TQCanvas* canvas) : } bouncyLogoCount++; setSequence(logoarr); - setAnimated(TRUE); + setAnimated(true); initPos(); } @@ -270,7 +270,7 @@ void BouncyLogo::advance(int stage) vy = -vy; for (int bounce=0; bounce<4; bounce++) { - TQCanvasItemList l=collisions(FALSE); + TQCanvasItemList l=collisions(false); for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { TQCanvasItem *hit = *it; if ( hit->rtti()==logo_rtti && hit->collidesWith(this) ) { @@ -362,14 +362,14 @@ Main::Main(TQCanvas& c, TQWidget* parent, const char* name, WFlags f) : options = new TQPopupMenu( menu ); dbf_id = options->insertItem("Double buffer", this, TQ_SLOT(toggleDoubleBuffer())); - options->setItemChecked(dbf_id, TRUE); + options->setItemChecked(dbf_id, true); menu->insertItem("&Options",options); menu->insertSeparator(); TQPopupMenu* help = new TQPopupMenu( menu ); help->insertItem("&About", this, TQ_SLOT(help()), Key_F1); - help->setItemChecked(dbf_id, TRUE); + help->setItemChecked(dbf_id, true); menu->insertItem("&Help",help); statusBar(); @@ -441,7 +441,7 @@ void Main::help() "<li> Press ALT-L for some lines." "<li> Drag the objects around." "<li> Read the code!" - "</ul>", TQMessageBox::Information, 1, 0, 0, this, 0, FALSE ); + "</ul>", TQMessageBox::Information, 1, 0, 0, this, 0, false ); about->setButtonText( 1, "Dismiss" ); about->show(); } @@ -536,7 +536,7 @@ void Main::print() if ( !printer ) printer = new TQPrinter; if ( printer->setup(this) ) { TQPainter pp(printer); - canvas.drawArea(TQRect(0,0,canvas.width(),canvas.height()),&pp,FALSE); + canvas.drawArea(TQRect(0,0,canvas.width(),canvas.height()),&pp,false); } } @@ -703,7 +703,7 @@ void Main::addMesh() #ifndef TQT_NO_PROGRESSDIALOG TQProgressDialog progress( "Creating mesh...", "Abort", rows, - this, "progress", TRUE ); + this, "progress", true ); #endif TQMemArray<NodeItem*> lastRow(cols); diff --git a/examples/canvas/makeimg.cpp b/examples/canvas/makeimg.cpp index d8c4c1928..9640161e3 100644 --- a/examples/canvas/makeimg.cpp +++ b/examples/canvas/makeimg.cpp @@ -35,7 +35,7 @@ int main( int*, char**) img = new TQImage( "in.png" ); int w,h; int y; - img->setAlphaBuffer( TRUE ); + img->setAlphaBuffer( true ); *img = img->convertDepth( 32 ); w = img->width(); h = img->height(); @@ -72,7 +72,7 @@ int main( int*, char**) h = img->height(); TQImage *img2 = new TQImage( w, h, 32 ); - img2->setAlphaBuffer( TRUE ); + img2->setAlphaBuffer( true ); for ( y = 0; y < h; y++ ) { for ( int x = 0; x < w; x++ ) { TQRgb shader = img->pixel( x, y ); diff --git a/examples/chart/canvasview.cpp b/examples/chart/canvasview.cpp index 7fe852def..ecec56982 100644 --- a/examples/chart/canvasview.cpp +++ b/examples/chart/canvasview.cpp @@ -40,7 +40,7 @@ void CanvasView::contentsMouseMoveEvent( TQMouseEvent *e ) m_movingItem->moveBy( offset.x(), offset.y() ); m_pos = e->pos(); ChartForm *form = (ChartForm*)parent(); - form->setChanged( TRUE ); + form->setChanged( true ); int chartType = form->chartType(); CanvasText *item = (CanvasText*)m_movingItem; int i = item->index(); diff --git a/examples/chart/chartform.cpp b/examples/chart/chartform.cpp index 483003754..16a6848d4 100644 --- a/examples/chart/chartform.cpp +++ b/examples/chart/chartform.cpp @@ -95,23 +95,23 @@ ChartForm::ChartForm( const TQString& filename ) TQActionGroup *chartGroup = new TQActionGroup( this ); // Connected later - chartGroup->setExclusive( TRUE ); + chartGroup->setExclusive( true ); optionsPieChartAction = new TQAction( "Pie Chart", TQPixmap( options_piechart ), "&Pie Chart", CTRL+Key_I, chartGroup, "pie chart" ); - optionsPieChartAction->setToggleAction( TRUE ); + optionsPieChartAction->setToggleAction( true ); optionsHorizontalBarChartAction = new TQAction( "Horizontal Bar Chart", TQPixmap( options_horizontalbarchart ), "&Horizontal Bar Chart", CTRL+Key_H, chartGroup, "horizontal bar chart" ); - optionsHorizontalBarChartAction->setToggleAction( TRUE ); + optionsHorizontalBarChartAction->setToggleAction( true ); optionsVerticalBarChartAction = new TQAction( "Vertical Bar Chart", TQPixmap( options_verticalbarchart ), "&Vertical Bar Chart", CTRL+Key_V, chartGroup, "Vertical bar chart" ); - optionsVerticalBarChartAction->setToggleAction( TRUE ); + optionsVerticalBarChartAction->setToggleAction( true ); optionsSetFontAction = new TQAction( @@ -252,7 +252,7 @@ void ChartForm::init() { setCaption( "Chart" ); m_filename = TQString::null; - m_changed = FALSE; + m_changed = false; m_elements[0] = Element( Element::INVALID, red ); m_elements[1] = Element( Element::INVALID, cyan ); @@ -392,13 +392,13 @@ bool ChartForm::okToClear() break; case 1: // Cancel default: - return FALSE; + return false; case 2: // Abandon break; } } - return TRUE; + return true; } @@ -424,7 +424,7 @@ void ChartForm::optionsSetData() { SetDataForm *setDataForm = new SetDataForm( &m_elements, m_decimalPlaces, this ); if ( setDataForm->exec() ) { - m_changed = TRUE; + m_changed = true; drawElements(); } delete setDataForm; @@ -436,13 +436,13 @@ void ChartForm::setChartType( ChartType chartType ) m_chartType = chartType; switch ( m_chartType ) { case PIE: - optionsPieChartAction->setOn( TRUE ); + optionsPieChartAction->setOn( true ); break; case VERTICAL_BAR: - optionsVerticalBarChartAction->setOn( TRUE ); + optionsVerticalBarChartAction->setOn( true ); break; case HORIZONTAL_BAR: - optionsHorizontalBarChartAction->setOn( TRUE ); + optionsHorizontalBarChartAction->setOn( true ); break; } } @@ -482,13 +482,13 @@ void ChartForm::optionsSetOptions() optionsForm->setFont( m_font ); switch ( m_addValues ) { case NO: - optionsForm->noRadioButton->setChecked( TRUE ); + optionsForm->noRadioButton->setChecked( true ); break; case YES: - optionsForm->yesRadioButton->setChecked( TRUE ); + optionsForm->yesRadioButton->setChecked( true ); break; case AS_PERCENTAGE: - optionsForm->asPercentageRadioButton->setChecked( TRUE ); + optionsForm->asPercentageRadioButton->setChecked( true ); break; } optionsForm->decimalPlacesSpinBox->setValue( m_decimalPlaces ); diff --git a/examples/chart/chartform.h b/examples/chart/chartform.h index 926bd69be..b843a8ac5 100644 --- a/examples/chart/chartform.h +++ b/examples/chart/chartform.h @@ -29,7 +29,7 @@ public: ~ChartForm(); int chartType() { return m_chartType; } - void setChanged( bool changed = TRUE ) { m_changed = changed; } + void setChanged( bool changed = true ) { m_changed = changed; } void drawElements(); TQPopupMenu *optionsMenu; // Why public? See canvasview.cpp diff --git a/examples/chart/chartform_files.cpp b/examples/chart/chartform_files.cpp index b9a5c4f17..27a9427c2 100644 --- a/examples/chart/chartform_files.cpp +++ b/examples/chart/chartform_files.cpp @@ -52,7 +52,7 @@ void ChartForm::load( const TQString& filename ) updateRecentFiles( filename ); drawElements(); - m_changed = FALSE; + m_changed = false; } @@ -78,7 +78,7 @@ void ChartForm::fileSave() setCaption( TQString( "Chart -- %1" ).arg( m_filename ) ); statusBar()->message( TQString( "Saved \'%1\'" ).arg( m_filename ), 2000 ); - m_changed = FALSE; + m_changed = false; } @@ -104,7 +104,7 @@ void ChartForm::filePrint() if ( m_printer->setup() ) { TQPainter painter( m_printer ); m_canvas->drawArea( TQRect( 0, 0, m_canvas->width(), m_canvas->height() ), - &painter, FALSE ); + &painter, false ); if ( !m_printer->outputFileName().isEmpty() ) statusBar()->message( TQString( "Printed \'%1\'" ). arg( m_printer->outputFileName() ), 2000 ); diff --git a/examples/chart/optionsform.cpp b/examples/chart/optionsform.cpp index 543783c30..c236c767c 100644 --- a/examples/chart/optionsform.cpp +++ b/examples/chart/optionsform.cpp @@ -30,7 +30,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name, chartTypeTextLabel = new TQLabel( "&Chart Type", this ); chartTypeLayout->addWidget( chartTypeTextLabel ); - chartTypeComboBox = new TQComboBox( FALSE, this ); + chartTypeComboBox = new TQComboBox( false, this ); chartTypeComboBox->insertItem( TQPixmap( options_piechart ), "Pie Chart" ); chartTypeComboBox->insertItem( TQPixmap( options_verticalbarchart ), "Vertical Bar Chart" ); @@ -66,7 +66,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name, addValuesButtonGroupLayout->setAlignment( TQt::AlignTop ); noRadioButton = new TQRadioButton( "&No", addValuesButtonGroup ); - noRadioButton->setChecked( TRUE ); + noRadioButton->setChecked( true ); addValuesButtonGroupLayout->addWidget( noRadioButton ); yesRadioButton = new TQRadioButton( "&Yes", addValuesButtonGroup ); @@ -97,7 +97,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name, buttonsLayout->addItem( spacer ); okPushButton = new TQPushButton( "OK", this ); - okPushButton->setDefault( TRUE ); + okPushButton->setDefault( true ); buttonsLayout->addWidget( okPushButton ); cancelPushButton = new TQPushButton( "Cancel", this ); diff --git a/examples/chart/optionsform.h b/examples/chart/optionsform.h index 8277ad376..bf747418a 100644 --- a/examples/chart/optionsform.h +++ b/examples/chart/optionsform.h @@ -20,7 +20,7 @@ class OptionsForm : public TQDialog TQ_OBJECT public: OptionsForm( TQWidget* parent = 0, const char* name = "options form", - bool modal = FALSE, WFlags f = 0 ); + bool modal = false, WFlags f = 0 ); ~OptionsForm() {} TQFont font() const { return m_font; } diff --git a/examples/chart/setdataform.cpp b/examples/chart/setdataform.cpp index 7de1e2b06..09dc1e3cd 100644 --- a/examples/chart/setdataform.cpp +++ b/examples/chart/setdataform.cpp @@ -43,9 +43,9 @@ SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces, table = new TQTable( this, "data table" ); table->setNumCols( 5 ); table->setNumRows( ChartForm::MAX_ELEMENTS ); - table->setColumnReadOnly( 1, TRUE ); - table->setColumnReadOnly( 2, TRUE ); - table->setColumnReadOnly( 4, TRUE ); + table->setColumnReadOnly( 1, true ); + table->setColumnReadOnly( 2, true ); + table->setColumnReadOnly( 4, true ); table->setColumnWidth( 0, 80 ); table->setColumnWidth( 1, 60 ); // Columns 1 and 4 must be equal table->setColumnWidth( 2, 60 ); @@ -63,7 +63,7 @@ SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces, colorPushButton = new TQPushButton( this, "color button" ); colorPushButton->setText( "&Color..." ); - colorPushButton->setEnabled( FALSE ); + colorPushButton->setEnabled( false ); buttonBox->addWidget( colorPushButton ); TQSpacerItem *spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, @@ -72,7 +72,7 @@ SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces, okPushButton = new TQPushButton( this, "ok button" ); okPushButton->setText( "OK" ); - okPushButton->setDefault( TRUE ); + okPushButton->setDefault( true ); buttonBox->addWidget( okPushButton ); cancelPushButton = new TQPushButton( this, "cancel button" ); diff --git a/examples/chart/setdataform.h b/examples/chart/setdataform.h index 7759f6158..760df4561 100644 --- a/examples/chart/setdataform.h +++ b/examples/chart/setdataform.h @@ -17,7 +17,7 @@ class SetDataForm: public TQDialog public: SetDataForm( ElementVector *elements, int decimalPlaces, TQWidget *parent = 0, const char *name = "set data form", - bool modal = TRUE, WFlags f = 0 ); + bool modal = true, WFlags f = 0 ); ~SetDataForm() {} public slots: diff --git a/examples/checklists/checklists.cpp b/examples/checklists/checklists.cpp index a75043ed4..116196981 100644 --- a/examples/checklists/checklists.cpp +++ b/examples/checklists/checklists.cpp @@ -40,7 +40,7 @@ CheckLists::CheckLists( TQWidget *parent, const char *name ) lv1 = new TQListView( this ); vbox1->addWidget( lv1 ); lv1->addColumn( "Items" ); - lv1->setRootIsDecorated( TRUE ); + lv1->setRootIsDecorated( true ); // create a list with 4 ListViewItems which will be parent items of other ListViewItems TQValueList<TQListViewItem *> parentList; @@ -54,7 +54,7 @@ CheckLists::CheckLists( TQWidget *parent, const char *name ) unsigned int num = 1; // go through the list of parent items... for ( TQValueList<TQListViewItem*>::Iterator it = parentList.begin(); it != parentList.end(); - ( *it )->setOpen( TRUE ), ++it, num++ ) { + ( *it )->setOpen( true ), ++it, num++ ) { item = *it; // ...and create 5 checkable child ListViewItems for each parent item for ( unsigned int i = 1; i <= 5; i++ ) @@ -83,7 +83,7 @@ CheckLists::CheckLists( TQWidget *parent, const char *name ) lv2 = new TQListView( this ); vbox2->addWidget( lv2 ); lv2->addColumn( "Items" ); - lv2->setRootIsDecorated( TRUE ); + lv2->setRootIsDecorated( true ); // another widget needed for layouting only tmp = new TQVBoxLayout( lay ); @@ -121,7 +121,7 @@ void CheckLists::copy1to2() // Insert first a controller Item into the second ListView. Always if Radio-ListViewItems // are inserted into a Listview, the parent item of these MUST be a controller Item! TQCheckListItem *item = new TQCheckListItem( lv2, "Controller", TQCheckListItem::Controller ); - item->setOpen( TRUE ); + item->setOpen( true ); // iterate through the first ListView... for ( ; it.current(); ++it ) @@ -133,7 +133,7 @@ void CheckLists::copy1to2() (void)new TQCheckListItem( item, it.current()->text( 0 ), TQCheckListItem::RadioButton ); if ( item->firstChild() ) - ( ( TQCheckListItem* )item->firstChild() )->setOn( TRUE ); + ( ( TQCheckListItem* )item->firstChild() )->setOn( true ); } /* diff --git a/examples/cursor/cursor.cpp b/examples/cursor/cursor.cpp index 77e77ad77..f15ebc6d9 100644 --- a/examples/cursor/cursor.cpp +++ b/examples/cursor/cursor.cpp @@ -118,8 +118,8 @@ CursorView::CursorView() // construct view - TQBitmap cb( cb_width, cb_height, cb_bits, TRUE ); - TQBitmap cm( cm_width, cm_height, cm_bits, TRUE ); + TQBitmap cb( cb_width, cb_height, cb_bits, true ); + TQBitmap cm( cm_width, cm_height, cm_bits, true ); TQCursor custom( cb, cm ); // create bitmap cursor label = new TQLabel( this ); // create the big label diff --git a/examples/customlayout/border.cpp b/examples/customlayout/border.cpp index 533b3b635..9e08c41c0 100644 --- a/examples/customlayout/border.cpp +++ b/examples/customlayout/border.cpp @@ -92,13 +92,13 @@ void BorderLayout::addWidget( TQWidget *widget, Position pos ) void BorderLayout::add( TQLayoutItem *item, Position pos ) { list.append( new BorderLayoutStruct( item, pos ) ); - sizeDirty = TRUE; msizeDirty = TRUE; + sizeDirty = true; msizeDirty = true; calcSize( SizeHint ); calcSize( Minimum ); } bool BorderLayout::hasHeightForWidth() const { - return FALSE; + return false; } TQSize BorderLayout::sizeHint() const @@ -215,10 +215,10 @@ void BorderLayout::calcSize( SizeType st ) } if ( st == Minimum ) { - msizeDirty = FALSE; + msizeDirty = false; mcached = TQSize( w, h ); } else { - sizeDirty = FALSE; + sizeDirty = false; cached = TQSize( w, h ); } diff --git a/examples/customlayout/border.h b/examples/customlayout/border.h index 98788aa61..05d62d9e3 100644 --- a/examples/customlayout/border.h +++ b/examples/customlayout/border.h @@ -59,17 +59,17 @@ public: BorderLayout( TQWidget *parent, int border = 0, int autoBorder = -1, const char *name = 0 ) : TQLayout( parent, border, autoBorder, name ), cached( 0, 0 ), mcached( 0, 0 ), - sizeDirty( TRUE ), msizeDirty( TRUE ) + sizeDirty( true ), msizeDirty( true ) {} BorderLayout( TQLayout* parent, int autoBorder = -1, const char *name = 0 ) : TQLayout( parent, autoBorder, name ), cached( 0, 0 ), mcached( 0, 0 ), - sizeDirty( TRUE ), msizeDirty( TRUE ) + sizeDirty( true ), msizeDirty( true ) {} BorderLayout( int autoBorder = -1, const char *name = 0 ) : TQLayout( autoBorder, name ), cached( 0, 0 ), mcached( 0, 0 ), - sizeDirty( TRUE ), msizeDirty( TRUE ) + sizeDirty( true ), msizeDirty( true ) {} ~BorderLayout(); @@ -92,7 +92,7 @@ protected: void setGeometry( const TQRect &rect ); private: - void doLayout( const TQRect &rect, bool testonly = FALSE ); + void doLayout( const TQRect &rect, bool testonly = false ); void calcSize( SizeType st ); TQPtrList<BorderLayoutStruct> list; diff --git a/examples/customlayout/flow.cpp b/examples/customlayout/flow.cpp index af1fdf5fe..9b5e5bc4d 100644 --- a/examples/customlayout/flow.cpp +++ b/examples/customlayout/flow.cpp @@ -57,7 +57,7 @@ int SimpleFlow::heightForWidth( int w ) const if ( cached_width != w ) { //Not all C++ compilers support "mutable" yet: SimpleFlow * mthis = (SimpleFlow*)this; - int h = mthis->doLayout( TQRect(0,0,w,0), TRUE ); + int h = mthis->doLayout( TQRect(0,0,w,0), true ); mthis->cached_hfw = h; mthis->cached_width = w; return h; @@ -72,7 +72,7 @@ void SimpleFlow::addItem( TQLayoutItem *item) bool SimpleFlow::hasHeightForWidth() const { - return TRUE; + return true; } TQSize SimpleFlow::sizeHint() const diff --git a/examples/customlayout/flow.h b/examples/customlayout/flow.h index 5b5421cdf..f0bdde821 100644 --- a/examples/customlayout/flow.h +++ b/examples/customlayout/flow.h @@ -45,7 +45,7 @@ protected: void setGeometry( const TQRect& ); private: - int doLayout( const TQRect&, bool testonly = FALSE ); + int doLayout( const TQRect&, bool testonly = false ); TQPtrList<TQLayoutItem> list; int cached_width; int cached_hfw; diff --git a/examples/dclock/dclock.cpp b/examples/dclock/dclock.cpp index 8de9352d6..7e395a994 100644 --- a/examples/dclock/dclock.cpp +++ b/examples/dclock/dclock.cpp @@ -18,7 +18,7 @@ DigitalClock::DigitalClock( TQWidget *parent, const char *name ) : TQLCDNumber( parent, name ) { - showingColon = FALSE; + showingColon = false; setFrameStyle( TQFrame::Panel | TQFrame::Raised ); setLineWidth( 2 ); // set frame line width showTime(); // display the current time diff --git a/examples/demo/display.cpp b/examples/demo/display.cpp index 7cc6a44af..aab99598a 100644 --- a/examples/demo/display.cpp +++ b/examples/demo/display.cpp @@ -156,7 +156,7 @@ DisplayWidget::DisplayWidget( TQWidget *parent, const char *name ) TQHBoxLayout *hbox = new TQHBoxLayout( vbox ); screen = new Screen( this ); dial = new TQDial( this ); - dial->setNotchesVisible( TRUE ); + dial->setNotchesVisible( true ); dial->setRange( -10, 10 ); dial->setValue( 1 ); screen->setStep( dial->value() ); diff --git a/examples/demo/dnd/dnd.cpp b/examples/demo/dnd/dnd.cpp index f03c918df..7fbac7b9d 100644 --- a/examples/demo/dnd/dnd.cpp +++ b/examples/demo/dnd/dnd.cpp @@ -91,7 +91,7 @@ DnDDemo::DnDDemo( TQWidget* parent, const char* name ) IconItem item = it.data(); TQIconViewItem *iitem = new IconViewItem( iconView, item.name(), *item.pixmap(), it.key() ); - iitem->setRenameEnabled( TRUE ); + iitem->setRenameEnabled( true ); TQListViewItem *litem = new ListViewItem( listView, item.name(), it.key() ); litem->setPixmap( 0, *item.pixmap() ); } diff --git a/examples/demo/dnd/iconview.cpp b/examples/demo/dnd/iconview.cpp index 89cac969a..16269ce5c 100644 --- a/examples/demo/dnd/iconview.cpp +++ b/examples/demo/dnd/iconview.cpp @@ -36,7 +36,7 @@ void IconView::slotNewItem( TQDropEvent *e, const TQValueList<TQIconDragItem>& ) if ( TQTextDrag::decode( e, tag ) ) { IconItem item = ((DnDDemo*) parentWidget())->findItem( tag ); IconViewItem *iitem = new IconViewItem( this, item.name(), *item.pixmap(), tag ); - iitem->setRenameEnabled( TRUE ); + iitem->setRenameEnabled( true ); } e->acceptAction(); } diff --git a/examples/demo/dnd/listview.cpp b/examples/demo/dnd/listview.cpp index 0cb86d2c4..836d04453 100644 --- a/examples/demo/dnd/listview.cpp +++ b/examples/demo/dnd/listview.cpp @@ -6,9 +6,9 @@ ListView::ListView( TQWidget* parent, const char* name ) : TQListView( parent, name ) { - setAcceptDrops( TRUE ); - setSorting( -1, FALSE ); - dragging = FALSE; + setAcceptDrops( true ); + setSorting( -1, false ); + dragging = false; } ListView::~ListView() @@ -40,7 +40,7 @@ void ListView::dropEvent( TQDropEvent *e ) void ListView::contentsMousePressEvent( TQMouseEvent *e ) { TQListView::contentsMousePressEvent( e ); - dragging = TRUE; + dragging = true; pressPos = e->pos(); } @@ -60,13 +60,13 @@ void ListView::contentsMouseMoveEvent( TQMouseEvent *e ) drg->setPixmap(*p); drg->setSubtype( "dragdemotag" ); drg->dragCopy(); - dragging = FALSE; + dragging = false; } } void ListView::contentsMouseReleaseEvent( TQMouseEvent *e ) { TQListView::contentsMouseReleaseEvent( e ); - dragging = FALSE; + dragging = false; } diff --git a/examples/demo/dnd/styledbutton.cpp b/examples/demo/dnd/styledbutton.cpp index 690a1054a..d87109708 100644 --- a/examples/demo/dnd/styledbutton.cpp +++ b/examples/demo/dnd/styledbutton.cpp @@ -44,10 +44,10 @@ #include <ntqstyle.h> StyledButton::StyledButton(TQWidget* parent, const char* name) - : TQButton( parent, name ), pix( 0 ), spix( 0 ), edit( ColorEditor ), s( 0 ), mousePressed( FALSE ) + : TQButton( parent, name ), pix( 0 ), spix( 0 ), edit( ColorEditor ), s( 0 ), mousePressed( false ) { setMinimumSize( minimumSizeHint() ); - setAcceptDrops( TRUE ); + setAcceptDrops( true ); connect( this, TQ_SIGNAL(clicked()), TQ_SLOT(onEditor())); } @@ -222,7 +222,7 @@ void StyledButton::onEditor() void StyledButton::mousePressEvent(TQMouseEvent* e) { TQButton::mousePressEvent(e); - mousePressed = TRUE; + mousePressed = true; pressPos = e->pos(); } @@ -241,7 +241,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e) p.drawRect( 0, 0, pix.width(), pix.height() ); p.end(); drg->setPixmap( pix ); - mousePressed = FALSE; + mousePressed = false; drg->dragCopy(); } else if ( edit == PixmapEditor && pix && !pix->isNull() ) { @@ -249,7 +249,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e) TQImageDrag *drg = new TQImageDrag( img, this ); if(spix) drg->setPixmap( *spix ); - mousePressed = FALSE; + mousePressed = false; drg->dragCopy(); } } diff --git a/examples/demo/frame.cpp b/examples/demo/frame.cpp index a263b8b1a..d9ab42dd9 100644 --- a/examples/demo/frame.cpp +++ b/examples/demo/frame.cpp @@ -38,16 +38,16 @@ Frame::Frame( TQWidget *parent, const char *name ) TQAccel::stringToKey( tr( "Ctrl+Q" ) ) ); TQPopupMenu *styleMenu = new TQPopupMenu( this, "style" ); - styleMenu->setCheckable( TRUE ); + styleMenu->setCheckable( true ); TQActionGroup *ag = new TQActionGroup( this, 0 ); - ag->setExclusive( TRUE ); + ag->setExclusive( true ); TQSignalMapper *styleMapper = new TQSignalMapper( this ); connect( styleMapper, TQ_SIGNAL( mapped( const TQString& ) ), this, TQ_SLOT( setStyle( const TQString& ) ) ); TQStringList list = TQStyleFactory::keys(); list.sort(); - TQDict<int> stylesDict( 17, FALSE ); + TQDict<int> stylesDict( 17, false ); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { TQString style = *it; TQString styleAccel = style; @@ -82,11 +82,11 @@ void Frame::setCategories( const TQPtrList<CategoryInterface> &l ) { categories = l; TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setVerticalStretchable( TRUE ); + dw->setResizeEnabled( true ); + dw->setVerticalStretchable( true ); addDockWindow( dw, DockLeft ); - setDockEnabled( dw, DockTop, FALSE ); - setDockEnabled( dw, DockBottom, FALSE ); + setDockEnabled( dw, DockTop, false ); + setDockEnabled( dw, DockBottom, false ); dw->setCloseMode( TQDockWindow::Always ); toolBox = new TQToolBox( dw ); @@ -113,9 +113,9 @@ TQWidget *Frame::createCategoryPage( CategoryInterface *c ) b->setBackgroundMode(PaletteBase); b->setTextLabel( c->categoryName( i ) ); b->setIconSet( c->categoryIcon( i ) ); - b->setAutoRaise( TRUE ); + b->setAutoRaise( true ); b->setTextPosition( TQToolButton::Right ); - b->setUsesTextLabel( TRUE ); + b->setUsesTextLabel( true ); g->insert( b, i + c->categoryOffset() ); connect( g, TQ_SIGNAL( clicked( int ) ), c, TQ_SLOT( setCurrentCategory( int ) ) ); } diff --git a/examples/demo/graph.cpp b/examples/demo/graph.cpp index 257609f13..4632f71b8 100644 --- a/examples/demo/graph.cpp +++ b/examples/demo/graph.cpp @@ -259,7 +259,7 @@ public: BouncyText::BouncyText( const TQString& text, TQFont f, TQCanvas* canvas) : TQCanvasText(text, f, canvas) { - setAnimated(TRUE); + setAnimated(true); initPos(); } @@ -421,7 +421,7 @@ void FigureEditor::initialize() NodeItem *prev = 0; for ( int c = 0; c < cols; c++ ) { NodeItem *ni = new NodeItem( graph ); - ni->setAnimated( TRUE ); + ni->setAnimated( true ); nodecount++; ni->move(rand()%(graph->canvas->width()-ni->width()),rand()%(graph->canvas->height()-ni->height())); diff --git a/examples/demo/i18n/i18n.cpp b/examples/demo/i18n/i18n.cpp index 4458e18bd..e86696066 100644 --- a/examples/demo/i18n/i18n.cpp +++ b/examples/demo/i18n/i18n.cpp @@ -19,7 +19,7 @@ static int windowIdNumber = 5000; -static bool firstShow = TRUE; +static bool firstShow = true; I18nDemo::I18nDemo(TQWidget *parent, const char *name) @@ -88,7 +88,7 @@ void I18nDemo::initMenuBar() windowMenu = new TQPopupMenu(this); connect(windowMenu, TQ_SIGNAL(activated(int)), TQ_SLOT(windowSlot(int))); - windowMenu->setCheckable(TRUE); + windowMenu->setCheckable(true); actionClose->addTo(windowMenu); actionCloseAll->addTo(windowMenu); @@ -145,7 +145,7 @@ void I18nDemo::newSlot(int id) wrapper->show(); windowMenu->insertItem(wrapper->caption(), wrapper->id); - windowMenu->setItemChecked(wrapper->id, TRUE); + windowMenu->setItemChecked(wrapper->id, true); lastwrapper = wrapper; windowIdNumber++; @@ -174,7 +174,7 @@ void I18nDemo::windowActivated(TQWidget *w) { if (lastwrapper) { tqApp->removeTranslator(&lastwrapper->translator); - windowMenu->setItemChecked(lastwrapper->id, FALSE); + windowMenu->setItemChecked(lastwrapper->id, false); } if (! w) { @@ -184,7 +184,7 @@ void I18nDemo::windowActivated(TQWidget *w) Wrapper *wrapper = (Wrapper *) w; - windowMenu->setItemChecked(wrapper->id, TRUE); + windowMenu->setItemChecked(wrapper->id, true); lastwrapper = wrapper; } @@ -200,7 +200,7 @@ void I18nDemo::closeAllSlot() { TQWidget *w; while ((w = workspace->activeWindow())) - w->close(TRUE); + w->close(true); } @@ -233,7 +233,7 @@ void I18nDemo::showEvent(TQShowEvent *) { if (firstShow) { newSlot(1); - firstShow = FALSE; + firstShow = false; return; } diff --git a/examples/demo/main.cpp b/examples/demo/main.cpp index d2d86ec3e..25f8889d4 100644 --- a/examples/demo/main.cpp +++ b/examples/demo/main.cpp @@ -70,7 +70,7 @@ static void qdemo_set_caption( CategoryInterface *c, int i ) class WidgetCategory : public CategoryInterface { public: - WidgetCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + WidgetCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "Widgets"; } TQIconSet icon() const { return TQPixmap( widgeticon ); } @@ -95,7 +95,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new WidgetsBase( stack ), categoryOffset() + 0 ); stack->addWidget( new DnDDemo( stack ), categoryOffset() + 1 ); } @@ -111,7 +111,7 @@ private: class DatabaseCategory : public CategoryInterface { public: - DatabaseCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + DatabaseCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "Database"; } TQIconSet icon() const { return TQPixmap( dbicon ); } @@ -133,7 +133,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new SqlEx( stack ), categoryOffset() + 0 ); } @@ -149,7 +149,7 @@ private: class CanvasCategory : public CategoryInterface { public: - CanvasCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + CanvasCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "2D Graphics"; } TQIconSet icon() const { return TQPixmap( twodicon ); } @@ -174,7 +174,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new GraphWidget( stack ), categoryOffset() + 0 ); stack->addWidget( new DisplayWidget( stack ), categoryOffset() + 1 ); } @@ -191,7 +191,7 @@ private: class OpenGLCategory : public CategoryInterface { public: - OpenGLCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + OpenGLCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "3D Graphics"; } TQIconSet icon() const { return TQPixmap( threedicon ); } @@ -219,7 +219,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new GLWorkspace( stack ), categoryOffset() + 0 ); stack->addWidget( new GLLandscapeViewer( stack ), categoryOffset() + 1 ); stack->addWidget( new GLInfoText( stack ), categoryOffset() + 2 ); @@ -235,7 +235,7 @@ private: class TextCategory : public CategoryInterface { public: - TextCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + TextCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "Text Drawing/Editing"; } TQIconSet icon() const { return TQPixmap( texticon ); } @@ -260,7 +260,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; TextEdit *te = new TextEdit( stack ); te->load( "textdrawing/example.html" ); stack->addWidget( te, categoryOffset() + 0 ); @@ -278,7 +278,7 @@ private: class I18NCategory : public CategoryInterface { public: - I18NCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + I18NCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "Internationalization"; } TQIconSet icon() const { return TQPixmap( internicon ); } @@ -300,7 +300,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new I18nDemo( stack ), categoryOffset() + 0 ); } int categoryOffset() const { return 100000; } @@ -314,7 +314,7 @@ private: class GameCategory : public CategoryInterface { public: - GameCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {} + GameCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {} TQString name() const { return "Game"; } TQIconSet icon() const { return TQPixmap( joyicon ); } @@ -336,7 +336,7 @@ public: void create() { if ( created ) return; - created = TRUE; + created = true; stack->addWidget( new KAstTopLevel( stack ), categoryOffset() + 0 ); } int categoryOffset() const { return 1000000; } diff --git a/examples/demo/opengl/fbm.h b/examples/demo/opengl/fbm.h index 474cd3c2d..423e44c5c 100644 --- a/examples/demo/opengl/fbm.h +++ b/examples/demo/opengl/fbm.h @@ -17,9 +17,6 @@ extern "C" { #endif -#define TRUE 1 -#define FALSE 0 - typedef struct { double x; double y; diff --git a/examples/demo/opengl/glbox.cpp b/examples/demo/opengl/glbox.cpp index f065888b5..5250d49e4 100644 --- a/examples/demo/opengl/glbox.cpp +++ b/examples/demo/opengl/glbox.cpp @@ -68,7 +68,7 @@ void GLBox::paintGL() glVertex3f( 0.98, 0.98, 0.98 ); } glEnd(); - renderText( 1.0, 1.0, 1.0, "Wirebox", TQFont( "helvetica", 12, TQFont::Bold, TRUE ) ); + renderText( 1.0, 1.0, 1.0, "Wirebox", TQFont( "helvetica", 12, TQFont::Bold, true ) ); } diff --git a/examples/demo/opengl/glcontrolwidget.cpp b/examples/demo/opengl/glcontrolwidget.cpp index b0d490e78..c6cc474af 100644 --- a/examples/demo/opengl/glcontrolwidget.cpp +++ b/examples/demo/opengl/glcontrolwidget.cpp @@ -7,7 +7,7 @@ GLControlWidget::GLControlWidget( TQWidget *parent, const char *name, TQGLWidget *share, WFlags f ) : TQGLWidget( parent, name, share, f ), - xRot(0),yRot(0),zRot(0),xTrans(0),yTrans(0),zTrans(-10.0),scale(5.0), animation(TRUE), wasAnimated(FALSE), delay( 50 ) + xRot(0),yRot(0),zRot(0),xTrans(0),yTrans(0),zTrans(-10.0),scale(5.0), animation(true), wasAnimated(false), delay( 50 ) { setCursor( pointingHandCursor ); timer = new TQTimer( this ); @@ -189,7 +189,7 @@ void GLControlWidget::setAnimationDelay( int ms ) timer->stop(); delay = ms; if ( animation ) { - wasAnimated = TRUE; + wasAnimated = true; timer->start( delay ); } } diff --git a/examples/demo/opengl/glgear.cpp b/examples/demo/opengl/glgear.cpp index 07c5f3694..6f3d4f0e7 100644 --- a/examples/demo/opengl/glgear.cpp +++ b/examples/demo/opengl/glgear.cpp @@ -258,7 +258,7 @@ void GLGear::paintGL() glVertex3f( 2.98, 2.98, 2.98 ); } glEnd(); - renderText( 3.0, 3.0, 3.0, "Gears", TQFont( "helvetica", 12, TQFont::Bold, TRUE ) ); + renderText( 3.0, 3.0, 3.0, "Gears", TQFont( "helvetica", 12, TQFont::Bold, true ) ); glPopMatrix(); glPopAttrib(); } diff --git a/examples/demo/opengl/gllandscape.cpp b/examples/demo/opengl/gllandscape.cpp index 2906a5c84..8e570f2f6 100644 --- a/examples/demo/opengl/gllandscape.cpp +++ b/examples/demo/opengl/gllandscape.cpp @@ -18,8 +18,8 @@ GLLandscape::GLLandscape( TQWidget * parent, const char * name ) : TQGLWidget( parent, name ) { - mouseButtonDown = FALSE; - animationRunning = FALSE; + mouseButtonDown = false; + animationRunning = false; oldX = oldY = oldZ = 0.0; landscape = 0; vertexNormals = 0; @@ -308,7 +308,7 @@ void GLLandscape::createGrid( int size ) size++; gridSize = size; gridHalf = gridSize / 2; - initFractals = TRUE; + initFractals = true; landscape = new double*[gridSize]; normals = new gridNormals*[gridSize]; vertexNormals = new avgNormals*[gridSize]; @@ -425,7 +425,7 @@ void GLLandscape::fractalize() p.x = p.y = p.z = 0; // Initialise fbm routine if ( initFractals ) { - initFractals = FALSE; + initFractals = false; value = fBm( p, roughness, 2.0, 8.0, 1 ); } @@ -650,13 +650,13 @@ void GLLandscape::setLandscape( int state ) void GLLandscape::mousePressEvent( TQMouseEvent *e ) { oldPos = e->pos(); - mouseButtonDown = TRUE; + mouseButtonDown = true; } void GLLandscape::mouseReleaseEvent( TQMouseEvent *e ) { oldPos = e->pos(); - mouseButtonDown = FALSE; + mouseButtonDown = false; } void GLLandscape::mouseMoveEvent( TQMouseEvent *e ) @@ -742,10 +742,10 @@ void GLLandscape::toggleWaveAnimation( bool state ) { if (state) { animTimer = startTimer(20); - animationRunning = TRUE; + animationRunning = true; } else { killTimer(animTimer); - animationRunning = FALSE; + animationRunning = false; } } diff --git a/examples/demo/opengl/gltexobj.cpp b/examples/demo/opengl/gltexobj.cpp index 117917e38..207dd3018 100644 --- a/examples/demo/opengl/gltexobj.cpp +++ b/examples/demo/opengl/gltexobj.cpp @@ -63,7 +63,7 @@ void GLTexobj::paintGL() glVertex3f( 0.98f, 0.98f, 0.98f ); } glEnd(); - renderText( 1.0, 1.0, 1.0, "Can", TQFont( "helvetica", 12, TQFont::Bold, TRUE ) ); + renderText( 1.0, 1.0, 1.0, "Can", TQFont( "helvetica", 12, TQFont::Bold, true ) ); glPopAttrib(); glPopMatrix(); } diff --git a/examples/demo/opengl/glworkspace.cpp b/examples/demo/opengl/glworkspace.cpp index 8d7541fcb..867ef1d70 100644 --- a/examples/demo/opengl/glworkspace.cpp +++ b/examples/demo/opengl/glworkspace.cpp @@ -46,8 +46,8 @@ void GLWorkspace::setupSceneActions() TQActionGroup *newGroup = new TQActionGroup( this ); newGroup->setMenuText( tr( "&New" ) ); newGroup->setText( tr( "New" ) ); - newGroup->setUsesDropDown( TRUE ); - newGroup->setExclusive( FALSE ); + newGroup->setUsesDropDown( true ); + newGroup->setExclusive( false ); newGroup->setIconSet( TQPixmap( "textdrawing/filenew.png" ) ); a = new TQAction( tr( "Wirebox" ), TQPixmap( "opengl/wirebox.xpm" ), tr( "&Wirebox" ), 0, newGroup ); connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( newWirebox() ) ); @@ -64,8 +64,8 @@ void GLWorkspace::setupSceneActions() TQActionGroup *printGroup = new TQActionGroup( this ); printGroup->setMenuText( tr( "&Print" ) ); printGroup->setText( tr( "Print" ) ); - printGroup->setUsesDropDown( TRUE ); - printGroup->setExclusive( FALSE ); + printGroup->setUsesDropDown( true ); + printGroup->setExclusive( false ); printGroup->setIconSet( TQPixmap( "textdrawing/print.png" ) ); TQAction *da = new TQAction( tr( "Window Size" ), TQPixmap( "textdrawing/print.png" ), tr( "&Window Size" ), CTRL + Key_P, printGroup ); connect( da, TQ_SIGNAL( activated() ), this, TQ_SLOT( filePrintWindowRes() ) ); @@ -148,10 +148,10 @@ void GLWorkspace::filePrint( int x, int y ) img.invertPixels(); } if ( view.checkMirror->isChecked() ) { - img = img.mirror( TRUE, FALSE ); + img = img.mirror( true, false ); } if ( view.checkFlip->isChecked() ) { - img = img.mirror( FALSE, TRUE ); + img = img.mirror( false, true ); } if ( view.checkLeft->isEnabled() && view.checkLeft->isChecked() ) { } @@ -196,13 +196,13 @@ bool GLWorkspace::filePrintSetup() if ( !printer ) printer = new TQPrinter; if ( printer->setup() ) { - return TRUE; + return true; } else { if ( newPrinter ) { delete printer; printer = 0; } - return FALSE; + return false; } } diff --git a/examples/demo/opengl/printpreview.ui.h b/examples/demo/opengl/printpreview.ui.h index fd19c2c4b..d0cc91d20 100644 --- a/examples/demo/opengl/printpreview.ui.h +++ b/examples/demo/opengl/printpreview.ui.h @@ -24,10 +24,10 @@ void PrintPreview::updatePreview() img.invertPixels(); } if ( checkMirror->isChecked() ) { - img = img.mirror( TRUE, FALSE ); + img = img.mirror( true, false ); } if ( checkFlip->isChecked() ) { - img = img.mirror( FALSE, TRUE ); + img = img.mirror( false, true ); } if ( checkLeft->isEnabled() && checkLeft->isChecked() ) { } diff --git a/examples/demo/qasteroids/ledmeter.cpp b/examples/demo/qasteroids/ledmeter.cpp index 5329d7ca8..bfc5e2487 100644 --- a/examples/demo/qasteroids/ledmeter.cpp +++ b/examples/demo/qasteroids/ledmeter.cpp @@ -9,7 +9,7 @@ KALedMeter::KALedMeter( TQWidget *parent ) : TQFrame( parent ) { - mCRanges.setAutoDelete( TRUE ); + mCRanges.setAutoDelete( true ); mRange = 100; mCount = 20; mCurrentCount = 0; diff --git a/examples/demo/qasteroids/toplevel.cpp b/examples/demo/qasteroids/toplevel.cpp index c2a22ea14..16ac3ef6c 100644 --- a/examples/demo/qasteroids/toplevel.cpp +++ b/examples/demo/qasteroids/toplevel.cpp @@ -234,7 +234,7 @@ KAstTopLevel::KAstTopLevel( TQWidget *parent, const char *name ) hbd->addWidget( powerMeter ); shipsRemain = 3; - showHiscores = FALSE; + showHiscores = false; actions.insert( TQt::Key_Up, Thrust ); actions.insert( TQt::Key_Left, RotateLeft ); @@ -271,31 +271,31 @@ void KAstTopLevel::keyPressEvent( TQKeyEvent *event ) switch ( a ) { case RotateLeft: - view->rotateLeft( TRUE ); + view->rotateLeft( true ); break; case RotateRight: - view->rotateRight( TRUE ); + view->rotateRight( true ); break; case Thrust: - view->thrust( TRUE ); + view->thrust( true ); break; case Shoot: - view->shoot( TRUE ); + view->shoot( true ); break; case Shield: - view->setShield( TRUE ); + view->setShield( true ); break; case Teleport: - view->teleport( TRUE ); + view->teleport( true ); break; case Brake: - view->brake( TRUE ); + view->brake( true ); break; default: @@ -318,38 +318,38 @@ void KAstTopLevel::keyReleaseEvent( TQKeyEvent *event ) switch ( a ) { case RotateLeft: - view->rotateLeft( FALSE ); + view->rotateLeft( false ); break; case RotateRight: - view->rotateRight( FALSE ); + view->rotateRight( false ); break; case Thrust: - view->thrust( FALSE ); + view->thrust( false ); break; case Shoot: - view->shoot( FALSE ); + view->shoot( false ); break; case Brake: - view->brake( FALSE ); + view->brake( false ); break; case Shield: - view->setShield( FALSE ); + view->setShield( false ); break; case Teleport: - view->teleport( FALSE ); + view->teleport( false ); break; case Launch: if ( waitShip ) { view->newShip(); - waitShip = FALSE; + waitShip = false; view->hideText(); } else @@ -365,11 +365,11 @@ void KAstTopLevel::keyReleaseEvent( TQKeyEvent *event ) /* case Pause: { - view->pause( TRUE ); + view->pause( true ); TQMessageBox::information( this, tr("KAsteroids is paused"), tr("Paused") ); - view->pause( FALSE ); + view->pause( false ); } break; */ @@ -384,14 +384,14 @@ void KAstTopLevel::keyReleaseEvent( TQKeyEvent *event ) void KAstTopLevel::showEvent( TQShowEvent *e ) { TQMainWindow::showEvent( e ); - view->pause( FALSE ); + view->pause( false ); view->setFocus(); } void KAstTopLevel::hideEvent( TQHideEvent *e ) { TQMainWindow::hideEvent( e ); - view->pause( TRUE ); + view->pause( true ); } void KAstTopLevel::slotNewGame() @@ -407,9 +407,9 @@ void KAstTopLevel::slotNewGame() view->addRocks( levels[0].nrocks ); // view->showText( tr( "Press L to launch." ), yellow ); view->newShip(); - waitShip = FALSE; + waitShip = false; view->hideText(); - isPaused = FALSE; + isPaused = false; } void KAstTopLevel::slotShipKilled() @@ -421,7 +421,7 @@ void KAstTopLevel::slotShipKilled() if ( shipsRemain ) { - waitShip = TRUE; + waitShip = true; view->showText( tr( "Ship Destroyed. Press L to launch."), yellow ); } else @@ -481,7 +481,7 @@ void KAstTopLevel::doStats() .arg(r); */ - view->showText( "Game Over. Press N for a new game.", yellow, FALSE ); + view->showText( "Game Over. Press N for a new game.", yellow, false ); } void KAstTopLevel::slotUpdateVitals() diff --git a/examples/demo/qasteroids/view.cpp b/examples/demo/qasteroids/view.cpp index 9e673a386..0bb243698 100644 --- a/examples/demo/qasteroids/view.cpp +++ b/examples/demo/qasteroids/view.cpp @@ -72,11 +72,11 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name ) view.setVScrollBarMode( TQScrollView::AlwaysOff ); view.setHScrollBarMode( TQScrollView::AlwaysOff ); view.viewport()->setFocusProxy( this ); - rocks.setAutoDelete( TRUE ); - missiles.setAutoDelete( TRUE ); - bits.setAutoDelete( TRUE ); - powerups.setAutoDelete( TRUE ); - exhaust.setAutoDelete( TRUE ); + rocks.setAutoDelete( true ); + missiles.setAutoDelete( true ); + bits.setAutoDelete( true ); + powerups.setAutoDelete( true ); + exhaust.setAutoDelete( true ); field.setBackgroundColor( black ); TQPixmap pm( IMG_BACKGROUND ); @@ -87,7 +87,7 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name ) textSprite->setFont( font ); shield = 0; - shieldOn = FALSE; + shieldOn = false; refreshRate = REFRESH_DELAY; initialized = readSprites(); @@ -97,10 +97,10 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name ) mTimerId = -1; shipPower = MAX_POWER_LEVEL; - vitalsChanged = TRUE; - can_destroy_powerups = FALSE; + vitalsChanged = true; + can_destroy_powerups = false; - mPaused = TRUE; + mPaused = true; if ( !initialized ) { textSprite->setText( tr("Error: Cannot read sprite images") ); @@ -135,7 +135,7 @@ void KAsteroidsView::reset() rockSpeed = 1.0; powerupSpeed = 1.0; mFrameNum = 0; - mPaused = FALSE; + mPaused = false; ship->hide(); shield->hide(); @@ -156,7 +156,7 @@ void KAsteroidsView::newGame() if ( shieldOn ) { shield->hide(); - shieldOn = FALSE; + shieldOn = false; } reset(); if ( mTimerId < 0 ) @@ -196,13 +196,13 @@ void KAsteroidsView::newShip() shipDx = 0; shipDy = 0; shipAngle = 0; - rotateL = FALSE; - rotateR = FALSE; - thrustShip = FALSE; - shootShip = FALSE; - brakeShip = FALSE; - teleportShip = FALSE; - shieldOn = TRUE; + rotateL = false; + rotateR = false; + thrustShip = false; + shootShip = false; + brakeShip = false; + teleportShip = false; + shieldOn = true; shootDelay = 0; shipPower = MAX_POWER_LEVEL; rotateRate = ROTATE_RATE; @@ -215,7 +215,7 @@ void KAsteroidsView::newShip() ship->show(); shield->show(); mShieldCount = 1; // just in case the ship appears on a rock. - shieldTimer->start( 1000, TRUE ); + shieldTimer->start( 1000, true ); } void KAsteroidsView::setShield( bool s ) @@ -238,9 +238,9 @@ void KAsteroidsView::brake( bool b ) { if ( brakeShip && !b ) { - rotateL = FALSE; - rotateR = FALSE; - thrustShip = FALSE; + rotateL = false; + rotateR = false; + thrustShip = false; rotateRate = ROTATE_RATE; } @@ -261,7 +261,7 @@ bool KAsteroidsView::readSprites() new TQCanvasPixmapArray( sprites_prefix + kas_animations[i].path, kas_animations[i].frames ); if ( !anim->isValid() ) - return FALSE; + return false; animation.insert( kas_animations[i].id, anim ); i++; } @@ -402,7 +402,7 @@ void KAsteroidsView::timerEvent( TQTimerEvent * ) if ( vitalsChanged && !(mFrameNum % 10) ) { emit updateVitals(); - vitalsChanged = FALSE; + vitalsChanged = false; } mFrameNum++; @@ -521,14 +521,14 @@ void KAsteroidsView::reducePower( int val ) if ( shipPower <= 0 ) { shipPower = 0; - thrustShip = FALSE; + thrustShip = false; if ( shieldOn ) { - shieldOn = FALSE; + shieldOn = false; shield->hide(); } } - vitalsChanged = TRUE; + vitalsChanged = true; } void KAsteroidsView::addExhaust( double x, double y, double dx, @@ -565,7 +565,7 @@ void KAsteroidsView::processMissiles() wrapSprite( missile ); - TQCanvasItemList hits = missile->collisions( TRUE ); + TQCanvasItemList hits = missile->collisions( true ); TQCanvasItemList::Iterator hit; for ( hit = hits.begin(); hit != hits.end(); ++hit ) { @@ -598,7 +598,7 @@ void KAsteroidsView::processShip() shield->setFrame( (shield->frame()+1) % shield->frameCount() ); shield->move( ship->x() - 9, ship->y() - 9 ); - TQCanvasItemList hits = shield->collisions( TRUE ); + TQCanvasItemList hits = shield->collisions( true ); TQCanvasItemList::Iterator it; for ( it = hits.begin(); it != hits.end(); ++it ) { @@ -623,7 +623,7 @@ void KAsteroidsView::processShip() if ( factor > mShieldCount ) { // shield not strong enough - shieldOn = FALSE; + shieldOn = false; break; } rockHit( *it ); @@ -636,7 +636,7 @@ void KAsteroidsView::processShip() if ( !shieldOn ) { shield->hide(); - TQCanvasItemList hits = ship->collisions( TRUE ); + TQCanvasItemList hits = ship->collisions( true ); TQCanvasItemList::Iterator it; for ( it = hits.begin(); it != hits.end(); ++it ) { @@ -688,16 +688,16 @@ void KAsteroidsView::processShip() if ( brakeShip ) { - thrustShip = FALSE; - rotateL = FALSE; - rotateR = FALSE; + thrustShip = false; + rotateL = false; + rotateR = false; rotateRate = ROTATE_RATE; if ( fabs(shipDx) < 2.5 && fabs(shipDy) < 2.5 ) { shipDx = 0.0; shipDy = 0.0; ship->setVelocity( shipDx, shipDy ); - brakeShip = FALSE; + brakeShip = false; } else { @@ -713,9 +713,9 @@ void KAsteroidsView::processShip() if ( fdiff > 0.08 ) { if ( angleDiff > 0 ) - rotateL = TRUE; + rotateL = true; else if ( angleDiff < 0 ) - rotateR = TRUE; + rotateR = true; if ( fdiff > 0.6 ) rotateRate = mBrakeCount + 1; else if ( fdiff > 0.4 ) @@ -728,7 +728,7 @@ void KAsteroidsView::processShip() } else if ( fabs(shipDx) > 1 || fabs(shipDy) > 1 ) { - thrustShip = TRUE; + thrustShip = true; // we'll make braking a bit faster shipDx += cosangle/6 * (mBrakeCount - 1); shipDy += sinangle/6 * (mBrakeCount - 1); @@ -791,7 +791,7 @@ void KAsteroidsView::processShip() ship->move( xra, yra ); } - vitalsChanged = TRUE; + vitalsChanged = true; } } @@ -821,7 +821,7 @@ void KAsteroidsView::processPowerups() wrapSprite( pup ); - TQCanvasItemList hits = pup->collisions( TRUE ); + TQCanvasItemList hits = pup->collisions( true ); TQCanvasItemList::Iterator it; for ( it = hits.begin(); it != hits.end(); ++it ) { @@ -852,7 +852,7 @@ void KAsteroidsView::processPowerups() } powerups.removeRef( pup ); - vitalsChanged = TRUE; + vitalsChanged = true; } else if ( (*it) == shield ) { @@ -876,7 +876,7 @@ void KAsteroidsView::hideShield() { shield->hide(); mShieldCount = 0; - shieldOn = FALSE; + shieldOn = false; } double KAsteroidsView::randDouble() @@ -893,10 +893,10 @@ int KAsteroidsView::randInt( int range ) void KAsteroidsView::showEvent( TQShowEvent *e ) { #if defined( QT_LICENSE_PROFESSIONAL ) - static bool wasThere = FALSE; + static bool wasThere = false; if ( !wasThere ) { - wasThere = TRUE; + wasThere = true; TQMessageBox::information( this, tr("TQCanvas demo"), tr("This game has been implemented using the TQCanvas class.\n" "The TQCanvas class is not part of the Professional Edition. Please \n" diff --git a/examples/demo/qasteroids/view.h b/examples/demo/qasteroids/view.h index 35b360ab0..0d30b1c10 100644 --- a/examples/demo/qasteroids/view.h +++ b/examples/demo/qasteroids/view.h @@ -41,7 +41,7 @@ public: void brake( bool b ); void pause( bool p); - void showText( const TQString &text, const TQColor &color, bool scroll=TRUE ); + void showText( const TQString &text, const TQColor &color, bool scroll=true ); void hideText(); int shots() const { return shotsFired; } diff --git a/examples/demo/qthumbwheel.cpp b/examples/demo/qthumbwheel.cpp index 984aa1f43..07fbf31b9 100644 --- a/examples/demo/qthumbwheel.cpp +++ b/examples/demo/qthumbwheel.cpp @@ -70,8 +70,8 @@ TQThumbWheel::~TQThumbWheel() void TQThumbWheel::init() { - track = TRUE; - mousePressed = FALSE; + track = true; + mousePressed = false; pressedAt = -1; rat = 1.0; setFrameStyle( WinPanel | Sunken ); @@ -106,7 +106,7 @@ void TQThumbWheel::setValue( int value ) void TQThumbWheel::valueChange() { - repaint( FALSE ); + repaint( false ); emit valueChanged(value()); } @@ -166,7 +166,7 @@ void TQThumbWheel::keyPressEvent( TQKeyEvent *e ) void TQThumbWheel::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == LeftButton ) { - mousePressed = TRUE; + mousePressed = true; pressedAt = valueFromPosition( e->pos() ); } } diff --git a/examples/demo/sql/sqlex.ui.h b/examples/demo/sql/sqlex.ui.h index aa97dfe47..345a2e2dc 100644 --- a/examples/demo/sql/sqlex.ui.h +++ b/examples/demo/sql/sqlex.ui.h @@ -33,8 +33,8 @@ void SqlEx::init() { hsplit->setResizeMode( lv, TQSplitter::KeepSize ); vsplit->setResizeMode( gb, TQSplitter::KeepSize ); - submitBtn->setEnabled( FALSE ); - conDiag = new ConnectDialog( this, "Connection Dialog", TRUE ); + submitBtn->setEnabled( false ); + conDiag = new ConnectDialog( this, "Connection Dialog", true ); } void SqlEx::dbConnect() @@ -84,15 +84,15 @@ void SqlEx::dbConnect() } lv->insertItem( lvi ); } - submitBtn->setEnabled( TRUE ); + submitBtn->setEnabled( true ); } void SqlEx::execQuery() { // use a custom cursor to populate the data table - TQSqlSelectCursor* cursor = new TQSqlSelectCursor( te->text(), TQSqlDatabase::database( "SqlEx", TRUE ) ); + TQSqlSelectCursor* cursor = new TQSqlSelectCursor( te->text(), TQSqlDatabase::database( "SqlEx", true ) ); if ( cursor->isSelect() ) { - dt->setSqlCursor( cursor, TRUE, TRUE ); + dt->setSqlCursor( cursor, true, true ); dt->setSort( TQStringList() ); dt->refresh( TQDataTable::RefreshAll ); TQString txt( "Query OK" ); @@ -118,8 +118,8 @@ void SqlEx::showTable( TQListViewItem * item ) } // populate the data table - TQSqlCursor* cursor = new TQSqlCursor( i->text( 0 ), TRUE, TQSqlDatabase::database( "SqlEx", TRUE ) ); - dt->setSqlCursor( cursor, TRUE, TRUE ); + TQSqlCursor* cursor = new TQSqlCursor( i->text( 0 ), true, TQSqlDatabase::database( "SqlEx", true ) ); + dt->setSqlCursor( cursor, true, true ); dt->setSort( cursor->primaryIndex() ); dt->refresh( TQDataTable::RefreshAll ); lbl->setText( "Displaying table " + i->text( 0 ) ); diff --git a/examples/demo/textdrawing/example.html b/examples/demo/textdrawing/example.html index eca9d9210..c20fe8116 100644 --- a/examples/demo/textdrawing/example.html +++ b/examples/demo/textdrawing/example.html @@ -138,7 +138,7 @@ constructor. <p>See also <a href="#1f406e">setAlignment</a>(). <h3 class="fn">bool <a name="75b2a1"></a>TQLabel::autoResize () const</h3> <p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of TQt. We strongly advise against using it in new code.<p> -<p>Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing +<p>Returns true if auto-resizing is enabled, or false if auto-resizing is disabled. <p>Auto-resizing is disabled by default. <p>See also <a href="#c0e104">setAutoResize</a>(). @@ -187,7 +187,7 @@ returns 0. <p>The <em>alignment</em> must be a bitwise OR of <a href="ntqt.html#AlignmentFlags">TQt::AlignmentFlags</a> values. The <code>WordBreak, ExpandTabs, SingleLine</code> and <code>ShowPrefix</code> flags apply only if the label contains a plain text, and are otherwise ignored. The <code>DontClip</code> flag is always ignored. -<p>If the label has a buddy, the <code>ShowPrefix</code> flag is forced to TRUE. +<p>If the label has a buddy, the <code>ShowPrefix</code> flag is forced to true. <p>The default alignment is <code>AlignLeft | AlignVCenter | ExpandTabs</code> if the label doesn't have a buddy and <code>AlignLeft | AlignVCenter | ExpandTabs | ShowPrefix </code> if @@ -204,7 +204,7 @@ the label has a buddy. <p>Reimplemented from <a href="ntqwidget.html#c7a335">TQWidget.</a> <h3 class="fn">void <a name="c0e104"></a>TQLabel::setAutoResize ( bool enable ) <code>[virtual]</code></h3> <p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of TQt. We strongly advise against using it in new code.<p> -Enables auto-resizing if <em>enable</em> is TRUE, or disables it if <em>enable</em> is FALSE. +Enables auto-resizing if <em>enable</em> is true, or disables it if <em>enable</em> is false. <p>When auto-resizing is enabled, the label will resize itself to fit the contents whenever the contents change. The top left corner is not moved. This is useful for TQLabel widgets that are not managed by @@ -279,7 +279,7 @@ the label. Any previous content is cleared. <p>The label resizes itself if auto-resizing is enabled. <p>See also <a href="#101ecb">pixmap</a>() and <a href="#191701">setBuddy</a>(). <h3 class="fn">void <a name="e9e3cf"></a>TQLabel::setScaledContents ( bool enable )</h3> -<p>When called with <em>enable</em> == TRUE, and the label shows a pixmap, +<p>When called with <em>enable</em> == true, and the label shows a pixmap, it will scale the pixmap to fill available space. <p>See also <a href="#7e1f73">hasScaledContents</a>(). <h3 class="fn">void <a name="dffb43"></a>TQLabel::setText ( const <a href="ntqstring.html">TQString</a> & text ) <code>[virtual slot]</code></h3> diff --git a/examples/demo/textdrawing/helpwindow.cpp b/examples/demo/textdrawing/helpwindow.cpp index 01bb90add..98ead9a8a 100644 --- a/examples/demo/textdrawing/helpwindow.cpp +++ b/examples/demo/textdrawing/helpwindow.cpp @@ -100,8 +100,8 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, menuBar()->insertItem( tr( "History" ), hist ); menuBar()->insertItem( tr( "Bookmarks" ), bookm ); - menuBar()->setItemEnabled( forwardId, FALSE); - menuBar()->setItemEnabled( backwardId, FALSE); + menuBar()->setItemEnabled( forwardId, false); + menuBar()->setItemEnabled( backwardId, false); connect( browser, TQ_SIGNAL( backwardAvailable( bool ) ), this, TQ_SLOT( setBackwardAvailable( bool ) ) ); connect( browser, TQ_SIGNAL( forwardAvailable( bool ) ), @@ -114,21 +114,21 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, button = new TQToolButton( icon_back, tr("Backward"), "", browser, TQ_SLOT(backward()), toolbar ); connect( browser, TQ_SIGNAL( backwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) ); - button->setEnabled( FALSE ); + button->setEnabled( false ); button = new TQToolButton( icon_forward, tr("Forward"), "", browser, TQ_SLOT(forward()), toolbar ); connect( browser, TQ_SIGNAL( forwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) ); - button->setEnabled( FALSE ); + button->setEnabled( false ); button = new TQToolButton( icon_home, tr("Home"), "", browser, TQ_SLOT(home()), toolbar ); toolbar->addSeparator(); - pathCombo = new TQComboBox( TRUE, toolbar ); + pathCombo = new TQComboBox( true, toolbar ); connect( pathCombo, TQ_SIGNAL( activated( const TQString & ) ), this, TQ_SLOT( pathSelected( const TQString & ) ) ); toolbar->setStretchableWidget( pathCombo ); - setRightJustification( TRUE ); - setDockEnabled( DockLeft, FALSE ); - setDockEnabled( DockRight, FALSE ); + setRightJustification( true ); + setDockEnabled( DockLeft, false ); + setDockEnabled( DockRight, false ); pathCombo->insertItem( home_ ); @@ -156,11 +156,11 @@ void HelpWindow::textChanged() selectedURL = caption(); if ( !selectedURL.isEmpty() && pathCombo ) { - bool exists = FALSE; + bool exists = false; int i; for ( i = 0; i < pathCombo->count(); ++i ) { if ( pathCombo->text( i ) == selectedURL ) { - exists = TRUE; + exists = true; break; } } @@ -232,7 +232,7 @@ void HelpWindow::print() { #ifndef TQT_NO_PRINTER TQPrinter printer; - printer.setFullPage(TRUE); + printer.setFullPage(true); if ( printer.setup() ) { TQPainter p( &printer ); TQPaintDeviceMetrics metrics(p.device()); @@ -275,7 +275,7 @@ void HelpWindow::print() break; printer.newPage(); page++; - } while (TRUE); + } while (true); } #endif } @@ -284,10 +284,10 @@ void HelpWindow::pathSelected( const TQString &_path ) { browser->setSource( _path ); TQMap<int, TQString>::Iterator it = mHistory.begin(); - bool exists = FALSE; + bool exists = false; for ( ; it != mHistory.end(); ++it ) { if ( *it == _path ) { - exists = TRUE; + exists = true; break; } } diff --git a/examples/demo/textdrawing/textedit.cpp b/examples/demo/textdrawing/textedit.cpp index 5e203ed16..dc722e35d 100644 --- a/examples/demo/textdrawing/textedit.cpp +++ b/examples/demo/textdrawing/textedit.cpp @@ -110,7 +110,7 @@ void TextEdit::setupTextActions() TQPopupMenu *menu = new TQPopupMenu( this ); menuBar()->insertItem( tr( "For&mat" ), menu ); - comboStyle = new TQComboBox( FALSE, tb ); + comboStyle = new TQComboBox( false, tb ); comboStyle->insertItem( tr("Standard") ); comboStyle->insertItem( tr("Bullet List (Disc)") ); comboStyle->insertItem( tr("Bullet List (Circle)") ); @@ -121,14 +121,14 @@ void TextEdit::setupTextActions() connect( comboStyle, TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( textStyle( int ) ) ); - comboFont = new TQComboBox( TRUE, tb ); + comboFont = new TQComboBox( true, tb ); TQFontDatabase db; comboFont->insertStringList( db.families() ); connect( comboFont, TQ_SIGNAL( activated( const TQString & ) ), this, TQ_SLOT( textFamily( const TQString & ) ) ); comboFont->lineEdit()->setText( TQApplication::font().family() ); - comboSize = new TQComboBox( TRUE, tb ); + comboSize = new TQComboBox( true, tb ); TQValueList<int> sizes = db.standardSizes(); TQValueList<int>::Iterator it = sizes.begin(); for ( ; it != sizes.end(); ++it ) @@ -141,39 +141,39 @@ void TextEdit::setupTextActions() connect( actionTextBold, TQ_SIGNAL( activated() ), this, TQ_SLOT( textBold() ) ); actionTextBold->addTo( tb ); actionTextBold->addTo( menu ); - actionTextBold->setToggleAction( TRUE ); + actionTextBold->setToggleAction( true ); actionTextItalic = new TQAction( tr( "Italic" ), TQPixmap( "textdrawing/textitalic.png" ), tr( "&Italic" ), CTRL + Key_I, this, "textItalic" ); connect( actionTextItalic, TQ_SIGNAL( activated() ), this, TQ_SLOT( textItalic() ) ); actionTextItalic->addTo( tb ); actionTextItalic->addTo( menu ); - actionTextItalic->setToggleAction( TRUE ); + actionTextItalic->setToggleAction( true ); actionTextUnderline = new TQAction( tr( "Underline" ), TQPixmap( "textdrawing/textunderline.png" ), tr( "&Underline" ), CTRL + Key_U, this, "textUnderline" ); connect( actionTextUnderline, TQ_SIGNAL( activated() ), this, TQ_SLOT( textUnderline() ) ); actionTextUnderline->addTo( tb ); actionTextUnderline->addTo( menu ); - actionTextUnderline->setToggleAction( TRUE ); + actionTextUnderline->setToggleAction( true ); menu->insertSeparator(); TQActionGroup *grp = new TQActionGroup( this ); - grp->setExclusive( TRUE ); + grp->setExclusive( true ); connect( grp, TQ_SIGNAL( selected( TQAction* ) ), this, TQ_SLOT( textAlign( TQAction* ) ) ); actionAlignLeft = new TQAction( tr( "Left" ), TQPixmap( "textdrawing/textleft.png" ), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" ); actionAlignLeft->addTo( tb ); actionAlignLeft->addTo( menu ); - actionAlignLeft->setToggleAction( TRUE ); + actionAlignLeft->setToggleAction( true ); actionAlignCenter = new TQAction( tr( "Center" ), TQPixmap( "textdrawing/textcenter.png" ), tr( "C&enter" ), CTRL + Key_M, grp, "textCenter" ); actionAlignCenter->addTo( tb ); actionAlignCenter->addTo( menu ); - actionAlignCenter->setToggleAction( TRUE ); + actionAlignCenter->setToggleAction( true ); actionAlignRight = new TQAction( tr( "Right" ), TQPixmap( "textdrawing/textright.png" ), tr( "&Right" ), CTRL + Key_R, grp, "textRight" ); actionAlignRight->addTo( tb ); actionAlignRight->addTo( menu ); - actionAlignRight->setToggleAction( TRUE ); + actionAlignRight->setToggleAction( true ); actionAlignJustify = new TQAction( tr( "Justify" ), TQPixmap( "textdrawing/textjustify.png" ), tr( "&Justify" ), CTRL + Key_J, grp, "textjustify" ); actionAlignJustify->addTo( tb ); actionAlignJustify->addTo( menu ); - actionAlignJustify->setToggleAction( TRUE ); + actionAlignJustify->setToggleAction( true ); menu->insertSeparator(); @@ -273,7 +273,7 @@ void TextEdit::filePrint() return; #ifndef TQT_NO_PRINTER TQPrinter printer; - printer.setFullPage(TRUE); + printer.setFullPage(true); TQPaintDeviceMetrics screen( this ); printer.setResolution( screen.logicalDpiY() ); if ( printer.setup( this ) ) { @@ -302,7 +302,7 @@ void TextEdit::filePrint() break; printer.newPage(); page++; - } while (TRUE); + } while (true); } #endif } @@ -458,13 +458,13 @@ void TextEdit::colorChanged( const TQColor &c ) void TextEdit::alignmentChanged( int a ) { if ( ( a == AlignAuto ) || ( a & AlignLeft )) - actionAlignLeft->setOn( TRUE ); + actionAlignLeft->setOn( true ); else if ( ( a & AlignHCenter ) ) - actionAlignCenter->setOn( TRUE ); + actionAlignCenter->setOn( true ); else if ( ( a & AlignRight ) ) - actionAlignRight->setOn( TRUE ); + actionAlignRight->setOn( true ); else if ( ( a & AlignJustify ) ) - actionAlignJustify->setOn( TRUE ); + actionAlignJustify->setOn( true ); } void TextEdit::editorChanged( TQWidget * ) diff --git a/examples/demo/widgets/widgetsbase.ui.h b/examples/demo/widgets/widgetsbase.ui.h index e50ea1bae..eb366ae89 100644 --- a/examples/demo/widgets/widgetsbase.ui.h +++ b/examples/demo/widgets/widgetsbase.ui.h @@ -13,14 +13,14 @@ void WidgetsBase::destroy() void WidgetsBase::resetColors() { - groupBox->setPalette( palette(), FALSE ); + groupBox->setPalette( palette(), false ); TQObjectList *chldn = groupBox->queryList(); if ( chldn ) { for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) { if(obj->isWidgetType()) { TQWidget *w = (TQWidget *)obj; if(!w->isTopLevel()) - w->setPalette(palette(), FALSE); + w->setPalette(palette(), false); } } } @@ -28,14 +28,14 @@ void WidgetsBase::resetColors() void WidgetsBase::setColor( const TQString & color ) { - groupBox->setPalette( TQColor( color ), FALSE ); + groupBox->setPalette( TQColor( color ), false ); TQObjectList *chldn = groupBox->queryList(); if ( chldn ) { for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) { if(obj->isWidgetType()) { TQWidget *w = (TQWidget *)obj; if(!w->isTopLevel()) - w->setPalette(TQColor(color), FALSE); + w->setPalette(TQColor(color), false); } } } @@ -53,7 +53,7 @@ void WidgetsBase::updateClock() void WidgetsBase::updateColorTest( const TQString & color ) { - colorTest->setPalette( TQColor( color ), TRUE); + colorTest->setPalette( TQColor( color ), true); } void WidgetsBase::updateDateTimeString() diff --git a/examples/demo/widgets/widgetsbase_pro.ui.h b/examples/demo/widgets/widgetsbase_pro.ui.h index af6b656e4..c356c969c 100644 --- a/examples/demo/widgets/widgetsbase_pro.ui.h +++ b/examples/demo/widgets/widgetsbase_pro.ui.h @@ -13,13 +13,13 @@ void WidgetsBase::destroy() void WidgetsBase::resetColors() { - groupBox->setPalette( palette(), FALSE ); + groupBox->setPalette( palette(), false ); if(TQObjectList *chldn = groupBox->queryList()) { for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) { if(obj->isWidgetType()) { TQWidget *w = (TQWidget *)obj; if(!w->isTopLevel()) - w->setPalette(palette(), FALSE); + w->setPalette(palette(), false); } } } @@ -27,13 +27,13 @@ void WidgetsBase::resetColors() void WidgetsBase::setColor( const TQString & color ) { - groupBox->setPalette( TQColor( color ), FALSE ); + groupBox->setPalette( TQColor( color ), false ); if(TQObjectList *chldn = groupBox->queryList()) { for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) { if(obj->isWidgetType()) { TQWidget *w = (TQWidget *)obj; if(!w->isTopLevel()) - w->setPalette(TQColor(color), FALSE); + w->setPalette(TQColor(color), false); } } } diff --git a/examples/desktop/desktop.cpp b/examples/desktop/desktop.cpp index 15353e98f..d5fc0ed66 100644 --- a/examples/desktop/desktop.cpp +++ b/examples/desktop/desktop.cpp @@ -310,10 +310,10 @@ int main( int argc, char **argv ) app.setFont( f ); } - bool validOptions = FALSE; + bool validOptions = false; if ( argc == 2 ) { - validOptions = TRUE; + validOptions = true; if ( strcmp(argv[1],"-poly") == 0 ) poly(); else if ( strcmp(argv[1],"-rotate") == 0 ) @@ -323,16 +323,16 @@ int main( int argc, char **argv ) else if ( strcmp(argv[1],"-trollwidget") == 0 ) desktopWidget(); else - validOptions = FALSE; + validOptions = false; } if ( argc == 3 ) { - validOptions = TRUE; + validOptions = true; if ( strcmp(argv[1],"-shadetext") == 0 ) desktopText( argv[2] ); else if ( strcmp(argv[1],"-shadewidget") == 0 ) desktopWidget( argv[2] ); else - validOptions = FALSE; + validOptions = false; } if ( !validOptions ) { fprintf( stderr, "Usage:\n\tdesktop -poly" diff --git a/examples/dirview/dirview.cpp b/examples/dirview/dirview.cpp index 7bd26d3f5..1c4a2df07 100644 --- a/examples/dirview/dirview.cpp +++ b/examples/dirview/dirview.cpp @@ -200,12 +200,12 @@ void Directory::setOpen( bool o ) 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 ); @@ -229,7 +229,7 @@ void Directory::setOpen( bool o ) } } } - listView()->setUpdatesEnabled( TRUE ); + listView()->setUpdatesEnabled( true ); } TQListViewItem::setOpen( o ); } @@ -237,7 +237,7 @@ void Directory::setOpen( bool o ) void Directory::setup() { - setExpandable( TRUE ); + setExpandable( true ); TQListViewItem::setup(); } @@ -274,7 +274,7 @@ TQString Directory::text( int column ) const 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 ) { @@ -289,8 +289,8 @@ DirectoryView::DirectoryView( TQWidget *parent, const char *name, bool sdo ) 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() ) ); @@ -309,7 +309,7 @@ void DirectoryView::openFolder() { autoopen_timer->stop(); if ( dropItem && !dropItem->isOpen() ) { - dropItem->setOpen( TRUE ); + dropItem->setOpen( true ); dropItem->repaint(); } } @@ -344,7 +344,7 @@ void DirectoryView::contentsDragMoveEvent( TQDragMoveEvent *e ) 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(); @@ -376,7 +376,7 @@ void DirectoryView::contentsDragLeaveEvent( TQDragLeaveEvent * ) dropItem = 0; setCurrentItem( oldCurrent ); - setSelected( oldCurrent, TRUE ); + setSelected( oldCurrent, true ); } void DirectoryView::contentsDropEvent( TQDropEvent *e ) @@ -461,7 +461,7 @@ void DirectoryView::contentsMousePressEvent( TQMouseEvent* e ) treeStepSize() * ( i->depth() + ( rootIsDecorated() ? 1 : 0) ) + itemMargin() || p.x() < header()->cellPos( header()->mapToActual( 0 ) ) ) { presspos = e->pos(); - mousePressed = TRUE; + mousePressed = true; } } } @@ -469,7 +469,7 @@ void DirectoryView::contentsMousePressEvent( TQMouseEvent* e ) 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); @@ -486,7 +486,7 @@ void DirectoryView::contentsMouseMoveEvent( TQMouseEvent* e ) void DirectoryView::contentsMouseReleaseEvent( TQMouseEvent * ) { - mousePressed = FALSE; + mousePressed = false; } void DirectoryView::setDir( const TQString &s ) @@ -494,7 +494,7 @@ void DirectoryView::setDir( const TQString &s ) TQListViewItemIterator it( this ); ++it; for ( ; it.current(); ++it ) { - it.current()->setOpen( FALSE ); + it.current()->setOpen( false ); } TQStringList lst( TQStringList::split( "/", s ) ); @@ -503,7 +503,7 @@ void DirectoryView::setDir( const TQString &s ) for ( ; it2 != lst.end(); ++it2 ) { while ( item ) { if ( item->text( 0 ) == *it2 ) { - item->setOpen( TRUE ); + item->setOpen( true ); break; } item = item->itemBelow(); diff --git a/examples/dirview/dirview.h b/examples/dirview/dirview.h index d08574976..e3db20539 100644 --- a/examples/dirview/dirview.h +++ b/examples/dirview/dirview.h @@ -74,7 +74,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: diff --git a/examples/dirview/main.cpp b/examples/dirview/main.cpp index d6cf1a584..b9a2c8f19 100644 --- a/examples/dirview/main.cpp +++ b/examples/dirview/main.cpp @@ -29,12 +29,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(); diff --git a/examples/distributor/distributor.ui.h b/examples/distributor/distributor.ui.h index 93e6826cc..c51056f59 100644 --- a/examples/distributor/distributor.ui.h +++ b/examples/distributor/distributor.ui.h @@ -24,29 +24,29 @@ void Distributor::init() timer = new TQTimer( this ); connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(checkLibData()) ); - cancelButton()->setAutoDefault( FALSE ); - backButton()->setAutoDefault( FALSE ); + cancelButton()->setAutoDefault( false ); + backButton()->setAutoDefault( false ); - setNextEnabled( selectLibrary, FALSE ); + setNextEnabled( selectLibrary, false ); - setHelpEnabled( selectLibrary, FALSE ); - setHelpEnabled( modifyPaths, FALSE ); - setHelpEnabled( verifyMods, FALSE ); + setHelpEnabled( selectLibrary, false ); + setHelpEnabled( modifyPaths, false ); + setHelpEnabled( verifyMods, false ); - setFinishEnabled( verifyMods, TRUE ); + setFinishEnabled( verifyMods, true ); } void Distributor::showPage( TQWidget *page ) { if ( page == selectLibrary ) { - nextButton()->setDefault( TRUE ); + nextButton()->setDefault( true ); libFilename->setFocus(); } else if ( page == modifyPaths ) { - nextButton()->setDefault( TRUE ); + nextButton()->setDefault( true ); prefixPath->selectAll(); prefixPath->setFocus(); } else if ( page == verifyMods ) { - finishButton()->setDefault( TRUE ); + finishButton()->setDefault( true ); finishButton()->setFocus(); TQString labeltext = @@ -81,13 +81,13 @@ void Distributor::showPage( TQWidget *page ) void Distributor::checkLibFilename( const TQString &filename ) { - setNextEnabled( selectLibrary, FALSE ); + setNextEnabled( selectLibrary, false ); TQFileInfo fileinfo( filename ); if ( ! filename.isEmpty() && fileinfo.exists() && fileinfo.isReadable() && fileinfo.isWritable() && fileinfo.isFile() && !fileinfo.isSymLink() ) - timer->start( 500, TRUE ); + timer->start( 500, true ); } void Distributor::browseLibFilename() @@ -134,25 +134,25 @@ void Distributor::checkLibData() } steps[7]; steps[0].key = "qt_nstpath="; - steps[0].done = FALSE; + steps[0].done = false; steps[1].key = "qt_binpath="; - steps[1].done = FALSE; + steps[1].done = false; steps[2].key = "qt_docpath="; - steps[2].done = FALSE; + steps[2].done = false; steps[3].key = "qt_hdrpath="; - steps[3].done = FALSE; + steps[3].done = false; steps[4].key = "qt_libpath="; - steps[4].done = FALSE; + steps[4].done = false; steps[5].key = "qt_plgpath="; - steps[5].done = FALSE; + steps[5].done = false; steps[6].key = "qt_datpath="; - steps[6].done = FALSE; + steps[6].done = false; uint completed = 0; uint total_steps = sizeof(steps) / sizeof(step); @@ -192,7 +192,7 @@ void Distributor::checkLibData() } steps[x].value = s; - steps[x].done = TRUE; + steps[x].done = true; ++completed; } @@ -209,7 +209,7 @@ void Distributor::checkLibData() } if ( completed == total_steps ) { - setNextEnabled( selectLibrary, TRUE ); + setNextEnabled( selectLibrary, true ); TQString prefix = TQFile::decodeName( steps[0].value ); prefixPath->setText( prefix ); @@ -281,31 +281,31 @@ void Distributor::accept() steps[0].key = "qt_nstpath="; steps[0].value = TQFile::encodeName( prefixPath->text() ); - steps[0].done = FALSE; + steps[0].done = false; steps[1].key = "qt_binpath="; steps[1].value = TQFile::encodeName( binPath->text() ); - steps[1].done = FALSE; + steps[1].done = false; steps[2].key = "qt_docpath="; steps[2].value = TQFile::encodeName( docPath->text() ); - steps[2].done = FALSE; + steps[2].done = false; steps[3].key = "qt_hdrpath="; steps[3].value = TQFile::encodeName( hdrPath->text() ); - steps[3].done = FALSE; + steps[3].done = false; steps[4].key = "qt_libpath="; steps[4].value = TQFile::encodeName( libPath->text() ); - steps[4].done = FALSE; + steps[4].done = false; steps[5].key = "qt_plgpath="; steps[5].value = TQFile::encodeName( plgPath->text() ); - steps[5].done = FALSE; + steps[5].done = false; steps[6].key = "qt_datpath="; steps[6].value = TQFile::encodeName( datPath->text() ); - steps[6].done = FALSE; + steps[6].done = false; uint completed = 0; uint total_steps = sizeof(steps) / sizeof(step); @@ -346,7 +346,7 @@ void Distributor::accept() } qstrcpy( s, steps[x].value ); - steps[x].done = TRUE; + steps[x].done = true; ++completed; } diff --git a/examples/dragdrop/dropsite.cpp b/examples/dragdrop/dropsite.cpp index 7257e6ed0..33458f689 100644 --- a/examples/dragdrop/dropsite.cpp +++ b/examples/dragdrop/dropsite.cpp @@ -23,7 +23,7 @@ DropSite::DropSite( TQWidget * parent, const char * name ) : TQLabel( parent, name ) { - setAcceptDrops(TRUE); + setAcceptDrops(true); } diff --git a/examples/dragdrop/main.cpp b/examples/dragdrop/main.cpp index 3a618b60f..d06bc5867 100644 --- a/examples/dragdrop/main.cpp +++ b/examples/dragdrop/main.cpp @@ -17,7 +17,7 @@ #include <ntqlabel.h> #include <ntqpixmap.h> -static void addStuff( TQWidget * parent, bool image, bool secret = FALSE ) +static void addStuff( TQWidget * parent, bool image, bool secret = false ) { TQVBoxLayout * tll = new TQVBoxLayout( parent, 10 ); DropSite * d = new DropSite( parent ); @@ -54,17 +54,17 @@ int main( int argc, char ** argv ) TQApplication a( argc, argv ); TQWidget mw; - addStuff( &mw, TRUE ); + addStuff( &mw, true ); mw.setCaption( "TQt Example - Drag and Drop" ); mw.show(); TQWidget mw2; - addStuff( &mw2, FALSE ); + addStuff( &mw2, false ); mw2.setCaption( "TQt Example - Drag and Drop" ); mw2.show(); TQWidget mw3; - addStuff( &mw3, TRUE, TRUE ); + addStuff( &mw3, true, true ); mw3.setCaption( "TQt Example - Drag and Drop" ); mw3.show(); diff --git a/examples/dragdrop/secret.cpp b/examples/dragdrop/secret.cpp index fdba44884..2d672b46d 100644 --- a/examples/dragdrop/secret.cpp +++ b/examples/dragdrop/secret.cpp @@ -39,9 +39,9 @@ bool SecretDrag::decode( TQDropEvent* e, TQString& str ) TQString msg; msg.sprintf("The secret number is %d", payload[0] ); str = msg; - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/examples/drawdemo/drawdemo.cpp b/examples/drawdemo/drawdemo.cpp index 5fc1e0f7b..3ea0f3b2f 100644 --- a/examples/drawdemo/drawdemo.cpp +++ b/examples/drawdemo/drawdemo.cpp @@ -191,7 +191,7 @@ DrawView::DrawView() maxheight += 30; if ( i == 0 ) - rb->setChecked( TRUE ); + rb->setChecked( true ); } maxheight += 10; // maxheight is now 10 pixels upper margin diff --git a/examples/drawlines/connect.cpp b/examples/drawlines/connect.cpp index 3b7e140cb..c4d5ddf8f 100644 --- a/examples/drawlines/connect.cpp +++ b/examples/drawlines/connect.cpp @@ -35,7 +35,7 @@ private: TQPoint *points; // point array TQColor *colors; // color array int count; // count = number of points - bool down; // TRUE if mouse down + bool down; // true if mouse down }; @@ -48,7 +48,7 @@ ConnectWidget::ConnectWidget( TQWidget *parent, const char *name ) { setBackgroundColor( white ); // white background count = 0; - down = FALSE; + down = false; points = new TQPoint[MAXPOINTS]; colors = new TQColor[MAXCOLORS]; for ( int i=0; i<MAXCOLORS; i++ ) // init color array @@ -84,7 +84,7 @@ void ConnectWidget::paintEvent( TQPaintEvent * ) void ConnectWidget::mousePressEvent( TQMouseEvent * ) { - down = TRUE; + down = true; count = 0; // start recording points erase(); // erase widget contents } @@ -96,7 +96,7 @@ void ConnectWidget::mousePressEvent( TQMouseEvent * ) void ConnectWidget::mouseReleaseEvent( TQMouseEvent * ) { - down = FALSE; // done recording points + down = false; // done recording points update(); // draw the lines } diff --git a/examples/extension/dialogform.ui.h b/examples/extension/dialogform.ui.h index d6f873f33..194db19da 100644 --- a/examples/extension/dialogform.ui.h +++ b/examples/extension/dialogform.ui.h @@ -8,7 +8,7 @@ void DialogForm::init() { - extensionShown = FALSE; + extensionShown = false; setExtension( new Extension( this ) ); setOrientation( Vertical ); } diff --git a/examples/extension/mainform.ui.h b/examples/extension/mainform.ui.h index 1eab636fa..e36fe146e 100644 --- a/examples/extension/mainform.ui.h +++ b/examples/extension/mainform.ui.h @@ -13,16 +13,16 @@ void MainForm::init() { - sessions = FALSE; - logging = FALSE; + sessions = false; + logging = false; log_filename = TQString::null; - log_errors = TRUE; - log_actions = TRUE; + log_errors = true; + log_actions = true; } void MainForm::optionsDlg() { - DialogForm *dlg = new DialogForm( this, "dialog", TRUE ); + DialogForm *dlg = new DialogForm( this, "dialog", true ); Extension *ext = (Extension*)dlg->extension()->tqt_cast( "Extension" ); if ( !ext ) return; diff --git a/examples/fileiconview/mainwindow.cpp b/examples/fileiconview/mainwindow.cpp index d2d6f2edb..505bdb0be 100644 --- a/examples/fileiconview/mainwindow.cpp +++ b/examples/fileiconview/mainwindow.cpp @@ -77,11 +77,11 @@ void FileMainWindow::setup() { TQSplitter *splitter = new TQSplitter( this ); - dirlist = new DirectoryView( splitter, "dirlist", TRUE ); + dirlist = new DirectoryView( splitter, "dirlist", true ); dirlist->addColumn( "Name" ); dirlist->addColumn( "Type" ); Directory *root = new Directory( dirlist, "/" ); - root->setOpen( TRUE ); + root->setOpen( true ); splitter->setResizeMode( dirlist, TQSplitter::KeepSize ); fileview = new TQtFileIconView( "/", splitter ); @@ -90,12 +90,12 @@ void FileMainWindow::setup() setCentralWidget( splitter ); TQToolBar *toolbar = new TQToolBar( this, "toolbar" ); - setRightJustification( TRUE ); + setRightJustification( true ); (void)new TQLabel( tr( " Path: " ), toolbar ); - pathCombo = new TQComboBox( TRUE, toolbar ); - pathCombo->setAutoCompletion( TRUE ); + pathCombo = new TQComboBox( true, toolbar ); + pathCombo->setAutoCompletion( true ); toolbar->setStretchableWidget( pathCombo ); connect( pathCombo, TQ_SIGNAL( activated( const TQString & ) ), this, TQ_SLOT ( changePath( const TQString & ) ) ); @@ -123,13 +123,13 @@ void FileMainWindow::setup() connect( fileview, TQ_SIGNAL( readDirDone() ), this, TQ_SLOT( slotReadDirDone() ) ); - setDockEnabled( DockLeft, FALSE ); - setDockEnabled( DockRight, FALSE ); + setDockEnabled( DockLeft, false ); + setDockEnabled( DockRight, false ); label = new TQLabel( statusBar() ); - statusBar()->addWidget( label, 2, TRUE ); + statusBar()->addWidget( label, 2, true ); progress = new TQProgressBar( statusBar() ); - statusBar()->addWidget( progress, 1, TRUE ); + statusBar()->addWidget( progress, 1, true ); connect( fileview, TQ_SIGNAL( enableUp() ), this, TQ_SLOT( enableUp() ) ); @@ -145,10 +145,10 @@ void FileMainWindow::setPathCombo() { TQString dir = caption(); int i = 0; - bool found = FALSE; + bool found = false; for ( i = 0; i < pathCombo->count(); ++i ) { if ( pathCombo->text( i ) == dir) { - found = TRUE; + found = true; break; } } @@ -209,20 +209,20 @@ void FileMainWindow::changePath( const TQString &path ) void FileMainWindow::enableUp() { - upButton->setEnabled( TRUE ); + upButton->setEnabled( true ); } void FileMainWindow::disableUp() { - upButton->setEnabled( FALSE ); + upButton->setEnabled( false ); } void FileMainWindow::enableMkdir() { - mkdirButton->setEnabled( TRUE ); + mkdirButton->setEnabled( true ); } void FileMainWindow::disableMkdir() { - mkdirButton->setEnabled( FALSE ); + mkdirButton->setEnabled( false ); } diff --git a/examples/fileiconview/qfileiconview.cpp b/examples/fileiconview/qfileiconview.cpp index e684b90b0..26244d7a6 100644 --- a/examples/fileiconview/qfileiconview.cpp +++ b/examples/fileiconview/qfileiconview.cpp @@ -307,7 +307,7 @@ void TQtFileIconDrag::append( const TQIconDragItem &item, const TQRect &pr, TQtFileIconViewItem::TQtFileIconViewItem( TQtFileIconView *parent, TQFileInfo *fi ) : TQIconViewItem( parent, fi->fileName() ), itemFileName( fi->filePath() ), - itemFileInfo( fi ), checkSetText( FALSE ) + itemFileInfo( fi ), checkSetText( false ) { vm = TQtFileIconView::Large; @@ -322,9 +322,9 @@ TQtFileIconViewItem::TQtFileIconViewItem( TQtFileIconView *parent, TQFileInfo *f if ( itemFileInfo->fileName() == "." || itemFileInfo->fileName() == ".." ) - setRenameEnabled( FALSE ); + setRenameEnabled( false ); - checkSetText = TRUE; + checkSetText = true; TQObject::connect( &timer, TQ_SIGNAL( timeout() ), iconView(), TQ_SLOT( openFolder() ) ); @@ -334,7 +334,7 @@ void TQtFileIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg ) { if ( itemFileInfo->isSymLink() ) { TQFont f( p->font() ); - f.setItalic( TRUE ); + f.setItalic( true ); p->setFont( f ); } @@ -394,7 +394,7 @@ void TQtFileIconViewItem::setText( const TQString &text ) return; TQDir dir( itemFileInfo->dir() ); if ( dir.rename( itemFileInfo->fileName(), text ) ) { - itemFileName = itemFileInfo->dirPath( TRUE ) + "/" + text; + itemFileName = itemFileInfo->dirPath( true ) + "/" + text; delete itemFileInfo; itemFileInfo = new TQFileInfo( itemFileName ); TQIconViewItem::setText( text ); @@ -408,9 +408,9 @@ bool TQtFileIconViewItem::acceptDrop( const TQMimeSource *e ) const { if ( type() == Dir && e->provides( "text/uri-list" ) && dropEnabled() ) - return TRUE; + return true; - return FALSE; + return false; } void TQtFileIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ) @@ -496,7 +496,7 @@ TQtFileIconView::TQtFileIconView( const TQString &dir, TQWidget *parent, const c setGridX( 75 ); setResizeMode( Adjust ); - setWordWrapIconText( FALSE ); + setWordWrapIconText( false ); connect( this, TQ_SIGNAL( doubleClicked( TQIconViewItem * ) ), this, TQ_SLOT( itemDoubleClicked( TQIconViewItem * ) ) ); @@ -510,8 +510,8 @@ TQtFileIconView::TQtFileIconView( const TQString &dir, TQWidget *parent, const c setHScrollBarMode( AlwaysOff ); setVScrollBarMode( Auto ); - setAutoArrange( TRUE ); - setSorting( TRUE ); + setAutoArrange( true ); + setSorting( true ); openItem = 0; } @@ -542,22 +542,22 @@ void TQtFileIconView::setDirectory( const TQDir &dir ) void TQtFileIconView::newDirectory() { - setAutoArrange( FALSE ); - selectAll( FALSE ); + setAutoArrange( false ); + selectAll( false ); if ( viewDir.mkdir( TQString( "New Folder %1" ).arg( ++newFolderNum ) ) ) { TQFileInfo *fi = new TQFileInfo( viewDir, TQString( "New Folder %1" ).arg( newFolderNum ) ); TQtFileIconViewItem *item = new TQtFileIconViewItem( this, new TQFileInfo( *fi ) ); item->setKey( TQString( "000000%1" ).arg( fi->fileName() ) ); delete fi; - repaintContents( contentsX(), contentsY(), contentsWidth(), contentsHeight(), FALSE ); + repaintContents( contentsX(), contentsY(), contentsWidth(), contentsHeight(), false ); ensureItemVisible( item ); - item->setSelected( TRUE, TRUE ); + item->setSelected( true, true ); setCurrentItem( item ); repaintItem( item ); tqApp->processEvents(); item->rename(); } - setAutoArrange( TRUE ); + setAutoArrange( true ); } TQDir TQtFileIconView::currentDir() @@ -569,22 +569,22 @@ static bool isRoot( const TQString &s ) { #if defined(Q_OS_UNIX) if ( s == "/" ) - return TRUE; + return true; #elif defined(Q_OS_WIN32) TQString p = s; if ( p.length() == 3 && p.right( 2 ) == ":/" ) - return TRUE; + return true; if ( p[ 0 ] == '/' && p[ 1 ] == '/' ) { int slashes = p.contains( '/' ); if ( slashes <= 3 ) - return TRUE; + return true; if ( slashes == 4 && p[ (int)p.length() - 1 ] == '/' ) - return TRUE; + return true; } #endif - return FALSE; + return false; } void TQtFileIconView::readDir( const TQDir &dir ) @@ -607,7 +607,7 @@ void TQtFileIconView::readDir( const TQDir &dir ) TQFileInfoListIterator it( *filist ); TQFileInfo *fi; - bool allowRename = FALSE, allowRenameSet = FALSE; + bool allowRename = false, allowRenameSet = false; while ( ( fi = it.current() ) != 0 ) { ++it; if ( fi && fi->fileName() == ".." && ( fi->dirPath() == "/" || fi->dirPath().isEmpty() ) ) @@ -621,13 +621,13 @@ void TQtFileIconView::readDir( const TQDir &dir ) if ( !allowRenameSet ) { if ( !TQFileInfo( fi->absFilePath() ).isWritable() || item->text() == "." || item->text() == ".." ) - allowRename = FALSE; + allowRename = false; else - allowRename = TRUE; + allowRename = true; if ( item->text() == "." || item->text() == ".." ) - allowRenameSet = FALSE; + allowRenameSet = false; else - allowRenameSet = TRUE; + allowRenameSet = true; } item->setRenameEnabled( allowRename ); } @@ -669,11 +669,11 @@ TQDragObject *TQtFileIconView::dragObject() TQIconDragItem id; id.setData( TQCString( item->filename() ) ); drag->append( id, - TQRect( item->pixmapRect( FALSE ).x() - orig.x(), - item->pixmapRect( FALSE ).y() - orig.y(), + TQRect( item->pixmapRect( false ).x() - orig.x(), + item->pixmapRect( false ).y() - orig.y(), item->pixmapRect().width(), item->pixmapRect().height() ), - TQRect( item->textRect( FALSE ).x() - orig.x(), - item->textRect( FALSE ).y() - orig.y(), + TQRect( item->textRect( false ).x() - orig.x(), + item->textRect( false ).y() - orig.y(), item->textRect().width(), item->textRect().height() ), TQString( item->filename() ) ); } @@ -757,22 +757,22 @@ void TQtFileIconView::flowSouth() void TQtFileIconView::sortAscending() { - sort( TRUE ); + sort( true ); } void TQtFileIconView::sortDescending() { - sort( FALSE ); + sort( false ); } void TQtFileIconView::itemTextTruncate() { - setWordWrapIconText( FALSE ); + setWordWrapIconText( false ); } void TQtFileIconView::itemTextWordWrap() { - setWordWrapIconText( TRUE ); + setWordWrapIconText( true ); } void TQtFileIconView::slotRightPressed( TQIconViewItem *item ) @@ -797,7 +797,7 @@ void TQtFileIconView::slotRightPressed( TQIconViewItem *item ) menu.insertItem( "Sort &ascending", this, TQ_SLOT( sortAscending() ) ); menu.insertItem( "Sort &descending", this, TQ_SLOT( sortDescending() ) ); - menu.setMouseTracking( TRUE ); + menu.setMouseTracking( true ); menu.exec( TQCursor::pos() ); } else { // on item TQPopupMenu menu( this ); @@ -805,7 +805,7 @@ void TQtFileIconView::slotRightPressed( TQIconViewItem *item ) int RENAME_ITEM = menu.insertItem( "Rename Item" ); int REMOVE_ITEM = menu.insertItem( "Remove Item" ); - menu.setMouseTracking( TRUE ); + menu.setMouseTracking( true ); int id = menu.exec( TQCursor::pos() ); if ( id == -1 ) diff --git a/examples/fileiconview/qfileiconview.h b/examples/fileiconview/qfileiconview.h index 898f26bf9..df6b1219c 100644 --- a/examples/fileiconview/qfileiconview.h +++ b/examples/fileiconview/qfileiconview.h @@ -97,7 +97,7 @@ protected slots: void sortAscending(); void sortDescending(); void arrangeItemsInGrid() { - TQIconView::arrangeItemsInGrid( TRUE ); + TQIconView::arrangeItemsInGrid( true ); } void slotRightPressed( TQIconViewItem *item ); diff --git a/examples/fonts/simple-qfont-demo/viewer.cpp b/examples/fonts/simple-qfont-demo/viewer.cpp index 2e60808c5..dbf4f436c 100644 --- a/examples/fonts/simple-qfont-demo/viewer.cpp +++ b/examples/fonts/simple-qfont-demo/viewer.cpp @@ -39,7 +39,7 @@ Viewer::Viewer() italicsButton = new TQPushButton( "Italics", this, "pushbutton3" ); - italicsButton->setFont( TQFont( "lucida", 12, TQFont::Bold, TRUE ) ); + italicsButton->setFont( TQFont( "lucida", 12, TQFont::Bold, true ) ); connect( italicsButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( setItalics() ) ); @@ -52,7 +52,7 @@ void Viewer::setDefault() font.setPointSize( 24 ); font.setWeight( TQFont::Bold ); - font.setUnderline( TRUE ); + font.setUnderline( true ); greetings->setFont( font ); @@ -73,7 +73,7 @@ void Viewer::setItalics() TQFont font( "Tokyo" ); font.setPointSize( 32 ); font.setWeight( TQFont::Bold ); - font.setItalic( TRUE ); + font.setItalic( true ); greetings->setFont( font ); diff --git a/examples/forever/forever.cpp b/examples/forever/forever.cpp index 24e5af910..ff2074e12 100644 --- a/examples/forever/forever.cpp +++ b/examples/forever/forever.cpp @@ -77,7 +77,7 @@ void Forever::paintEvent( TQPaintEvent * ) void Forever::timerEvent( TQTimerEvent * ) { for ( int i=0; i<100; i++ ) { - repaint( FALSE ); // repaint, don't erase + repaint( false ); // repaint, don't erase rectangles++; } } diff --git a/examples/hello/hello.cpp b/examples/hello/hello.cpp index a1f5f9edb..d2079b2ca 100644 --- a/examples/hello/hello.cpp +++ b/examples/hello/hello.cpp @@ -36,7 +36,7 @@ Hello::Hello( const char *text, TQWidget *parent, const char *name ) void Hello::animate() { b = (b + 1) & 15; - repaint( FALSE ); + repaint( false ); } diff --git a/examples/helpdemo/helpdemo.cpp b/examples/helpdemo/helpdemo.cpp index 88ed7cb94..c0b11e434 100644 --- a/examples/helpdemo/helpdemo.cpp +++ b/examples/helpdemo/helpdemo.cpp @@ -33,7 +33,7 @@ HelpDemo::HelpDemo( TQWidget *parent, const char *name ) connect( assistant, TQ_SIGNAL(assistantClosed()), this, TQ_SLOT(assistantClosed())); connect( assistant, TQ_SIGNAL(error(const TQString&)), this, TQ_SLOT(showAssistantErrors(const TQString&)) ); - closeTQAButton->setEnabled(FALSE); + closeTQAButton->setEnabled(false); } HelpDemo::~HelpDemo() @@ -108,12 +108,12 @@ void HelpDemo::showAssistantErrors( const TQString &err ) void HelpDemo::assistantOpened() { - closeTQAButton->setEnabled( TRUE ); - openTQAButton->setEnabled( FALSE ); + closeTQAButton->setEnabled( true ); + openTQAButton->setEnabled( false ); } void HelpDemo::assistantClosed() { - closeTQAButton->setEnabled( FALSE ); - openTQAButton->setEnabled( TRUE ); + closeTQAButton->setEnabled( false ); + openTQAButton->setEnabled( true ); } diff --git a/examples/helpsystem/whatsthis.cpp b/examples/helpsystem/whatsthis.cpp index 020c59199..7c96e7e3c 100644 --- a/examples/helpsystem/whatsthis.cpp +++ b/examples/helpsystem/whatsthis.cpp @@ -29,7 +29,7 @@ bool WhatsThis::clicked( const TQString &link ) if ( !link.isEmpty() ) emit linkClicked( link ); - return TRUE; + return true; } HeaderWhatsThis::HeaderWhatsThis( TQHeader *h ) diff --git a/examples/helpviewer/helpwindow.cpp b/examples/helpviewer/helpwindow.cpp index 140a9333f..2169e8ca7 100644 --- a/examples/helpviewer/helpwindow.cpp +++ b/examples/helpviewer/helpwindow.cpp @@ -110,8 +110,8 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, menuBar()->insertSeparator(); menuBar()->insertItem( tr("&Help"), help ); - menuBar()->setItemEnabled( forwardId, FALSE); - menuBar()->setItemEnabled( backwardId, FALSE); + menuBar()->setItemEnabled( forwardId, false); + menuBar()->setItemEnabled( backwardId, false); connect( browser, TQ_SIGNAL( backwardAvailable( bool ) ), this, TQ_SLOT( setBackwardAvailable( bool ) ) ); connect( browser, TQ_SIGNAL( forwardAvailable( bool ) ), @@ -124,21 +124,21 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path, button = new TQToolButton( icon_back, tr("Backward"), "", browser, TQ_SLOT(backward()), toolbar ); connect( browser, TQ_SIGNAL( backwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) ); - button->setEnabled( FALSE ); + button->setEnabled( false ); button = new TQToolButton( icon_forward, tr("Forward"), "", browser, TQ_SLOT(forward()), toolbar ); connect( browser, TQ_SIGNAL( forwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) ); - button->setEnabled( FALSE ); + button->setEnabled( false ); button = new TQToolButton( icon_home, tr("Home"), "", browser, TQ_SLOT(home()), toolbar ); toolbar->addSeparator(); - pathCombo = new TQComboBox( TRUE, toolbar ); + pathCombo = new TQComboBox( true, toolbar ); connect( pathCombo, TQ_SIGNAL( activated( const TQString & ) ), this, TQ_SLOT( pathSelected( const TQString & ) ) ); toolbar->setStretchableWidget( pathCombo ); - setRightJustification( TRUE ); - setDockEnabled( DockLeft, FALSE ); - setDockEnabled( DockRight, FALSE ); + setRightJustification( true ); + setDockEnabled( DockLeft, false ); + setDockEnabled( DockRight, false ); pathCombo->insertItem( home_ ); browser->setFocus(); @@ -165,11 +165,11 @@ void HelpWindow::sourceChanged( const TQString& url ) setCaption( "TQt Example - Helpviewer - " + browser->documentTitle() ) ; if ( !url.isEmpty() && pathCombo ) { - bool exists = FALSE; + bool exists = false; int i; for ( i = 0; i < pathCombo->count(); ++i ) { if ( pathCombo->text( i ) == url ) { - exists = TRUE; + exists = true; break; } } @@ -234,7 +234,7 @@ void HelpWindow::print() { #ifndef TQT_NO_PRINTER TQPrinter printer( TQPrinter::HighResolution ); - printer.setFullPage(TRUE); + printer.setFullPage(true); if ( printer.setup( this ) ) { TQPainter p( &printer ); if( !p.isActive() ) // starting printing failed @@ -261,7 +261,7 @@ void HelpWindow::print() break; printer.newPage(); page++; - } while (TRUE); + } while (true); } #endif } diff --git a/examples/i18n/main.cpp b/examples/i18n/main.cpp index 8e8e8661a..80cf7be70 100644 --- a/examples/i18n/main.cpp +++ b/examples/i18n/main.cpp @@ -30,11 +30,11 @@ class TQVDialog : public TQDialog { public: - TQVDialog(TQWidget *parent=0, const char *name=0, bool modal=FALSE, + TQVDialog(TQWidget *parent=0, const char *name=0, bool modal=false, WFlags f=0) : TQDialog(parent,name,modal,f) { TQVBoxLayout* vb = new TQVBoxLayout(this,8); - vb->setAutoAdd(TRUE); + vb->setAutoAdd(true); hb = 0; sm = new TQSignalMapper(this); connect(sm,TQ_SIGNAL(mapped(int)),this,TQ_SLOT(done(int))); @@ -110,7 +110,7 @@ int main( int argc, char** argv ) lang = argv[1]; if ( argc != 2 || lang == "all" ) { - TQVDialog dlg(0,0,TRUE); + TQVDialog dlg(0,0,true); TQCheckBox* qmb[sizeof(qm)/sizeof(qm[0])]; int r; if ( lang == "all" ) { @@ -162,7 +162,7 @@ int main( int argc, char** argv ) } #ifdef USE_I18N_FONT - memorymanager->savePrerenderedFont(font.handle(),FALSE); + memorymanager->savePrerenderedFont(font.handle(),false); #endif // While we run "all", kill them all 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(); } diff --git a/examples/life/life.cpp b/examples/life/life.cpp index c86340a40..a9c8b0a07 100644 --- a/examples/life/life.cpp +++ b/examples/life/life.cpp @@ -41,14 +41,14 @@ void LifeWidget::clear() for ( int t = 0; t < 2; t++ ) for ( int i = 0; i < MAXSIZE + 2; i++ ) for ( int j = 0; j < MAXSIZE + 2; j++ ) - cells[t][i][j] = FALSE; + cells[t][i][j] = false; repaint(); } // We assume that the size will never be beyond the maximum size set -// this is not in general TRUE, but in practice it's good enough for +// this is not in general true, but in practice it's good enough for // this program void LifeWidget::resizeEvent( TQResizeEvent * e ) @@ -62,8 +62,8 @@ void LifeWidget::setPoint( int i, int j ) { if ( i < 1 || i > maxi || j < 1 || j > maxi ) return; - cells[current][i][j] = TRUE; - repaint( index2pos(i), index2pos(j), SCALE, SCALE, FALSE ); + cells[current][i][j] = true; + repaint( index2pos(i), index2pos(j), SCALE, SCALE, false ); } @@ -106,7 +106,7 @@ void LifeWidget::nextGeneration() } } current = !current; - repaint( FALSE ); // repaint without erase + repaint( false ); // repaint without erase } diff --git a/examples/life/lifedlg.cpp b/examples/life/lifedlg.cpp index c24f7d508..1d4142436 100644 --- a/examples/life/lifedlg.cpp +++ b/examples/life/lifedlg.cpp @@ -61,7 +61,7 @@ LifeDialog::LifeDialog( int scale, TQWidget * parent, const char * name ) connect( timer, TQ_SIGNAL(timeout()), life, TQ_SLOT(nextGeneration()) ); pb = new TQPushButton( "Pause", this ); - pb->setToggleButton( TRUE ); + pb->setToggleButton( true ); connect( pb, TQ_SIGNAL(toggled(bool)), timer, TQ_SLOT(pause(bool)) ); pb->resize( pb->sizeHint().width(), 25 ); pb->move( width() - SIDEBORDER - pb->width(), SIDEBORDER ); @@ -115,7 +115,7 @@ LifeDialog::LifeDialog( int scale, TQWidget * parent, const char * name ) cb->insertItem( "Sym Puffer " ); cb->insertItem( "], Near Ship, Pi Heptomino " ); cb->insertItem( "R Pentomino " ); - cb->setAutoResize( FALSE ); + cb->setAutoResize( false ); cb->setCurrentItem( sel ); cb->show(); connect( cb, TQ_SIGNAL(activated(int)), TQ_SLOT(getPattern(int)) ); diff --git a/examples/lineedits/lineedits.cpp b/examples/lineedits/lineedits.cpp index 6e778c62d..404b03341 100644 --- a/examples/lineedits/lineedits.cpp +++ b/examples/lineedits/lineedits.cpp @@ -38,7 +38,7 @@ LineEdits::LineEdits( TQWidget *parent, const char *name ) row1->addWidget( label ); // Create a Combobox with three items... - combo1 = new TQComboBox( FALSE, this ); + combo1 = new TQComboBox( false, this ); row1->addWidget( combo1 ); combo1->insertItem( "Normal" ); combo1->insertItem( "Password" ); @@ -60,7 +60,7 @@ LineEdits::LineEdits( TQWidget *parent, const char *name ) row2->addWidget( label ); // A second Combobox with again three items... - combo2 = new TQComboBox( FALSE, this ); + combo2 = new TQComboBox( false, this ); row2->addWidget( combo2 ); combo2->insertItem( "No Validator" ); combo2->insertItem( "Integer Validator" ); @@ -81,7 +81,7 @@ LineEdits::LineEdits( TQWidget *parent, const char *name ) row3->addWidget( label ); // A combo box for setting alignment - combo3 = new TQComboBox( FALSE, this ); + combo3 = new TQComboBox( false, this ); row3->addWidget( combo3 ); combo3->insertItem( "Left" ); combo3->insertItem( "Centered" ); @@ -102,7 +102,7 @@ LineEdits::LineEdits( TQWidget *parent, const char *name ) row4->addWidget( label ); // A combo box for choosing an input mask - combo4 = new TQComboBox( FALSE, this ); + combo4 = new TQComboBox( false, this ); row4->addWidget( combo4 ); combo4->insertItem( "No mask" ); combo4->insertItem( "Phone number" ); @@ -126,7 +126,7 @@ LineEdits::LineEdits( TQWidget *parent, const char *name ) (void)new TQLabel( "Read-Only: ", row5 ); // A combo box for setting alignment - combo5 = new TQComboBox( FALSE, row5 ); + combo5 = new TQComboBox( false, row5 ); combo5->insertItem( "False" ); combo5->insertItem( "True" ); // ...and again the activated() TQ_SIGNAL gets connected with a TQ_SLOT @@ -260,10 +260,10 @@ void LineEdits::slotReadOnlyChanged( int i ) { switch ( i ) { case 0: - lined5->setReadOnly( FALSE ); + lined5->setReadOnly( false ); break; case 1: - lined5->setReadOnly( TRUE ); + lined5->setReadOnly( true ); break; } diff --git a/examples/listbox/listbox.cpp b/examples/listbox/listbox.cpp index 6f0a018b6..32eec741d 100644 --- a/examples/listbox/listbox.cpp +++ b/examples/listbox/listbox.cpp @@ -42,7 +42,7 @@ ListBoxDemo::ListBoxDemo() this ); bg->insert( b ); v->addWidget( b ); - b->setChecked( TRUE ); + b->setChecked( true ); connect( b, TQ_SIGNAL(clicked()), this, TQ_SLOT(setNumCols()) ); TQHBoxLayout * h = new TQHBoxLayout; v->addLayout( h ); @@ -75,7 +75,7 @@ ListBoxDemo::ListBoxDemo() h->addSpacing( 100 ); h->addWidget( new TQLabel( "Rows:", this ) ); rows = new TQSpinBox( this ); - rows->setEnabled( FALSE ); + rows->setEnabled( false ); h->addWidget( rows ); v->addSpacing( 12 ); @@ -90,7 +90,7 @@ ListBoxDemo::ListBoxDemo() v->addSpacing( 12 ); TQCheckBox * cb = new TQCheckBox( "Variable-height rows", this ); - cb->setChecked( TRUE ); + cb->setChecked( true ); connect( cb, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(setVariableHeight(bool)) ); v->addWidget( cb ); v->addSpacing( 6 ); @@ -135,32 +135,32 @@ ListBoxDemo::~ListBoxDemo() void ListBoxDemo::setNumRows() { - columns->setEnabled( FALSE ); - rows->setEnabled( TRUE ); + columns->setEnabled( false ); + rows->setEnabled( true ); l->setRowMode( rows->value() ); } void ListBoxDemo::setNumCols() { - columns->setEnabled( TRUE ); - rows->setEnabled( FALSE ); + columns->setEnabled( true ); + rows->setEnabled( false ); l->setColumnMode( columns->value() ); } void ListBoxDemo::setRowsByHeight() { - columns->setEnabled( FALSE ); - rows->setEnabled( FALSE ); + columns->setEnabled( false ); + rows->setEnabled( false ); l->setRowMode( TQListBox::FitToHeight ); } void ListBoxDemo::setColsByWidth() { - columns->setEnabled( FALSE ); - rows->setEnabled( FALSE ); + columns->setEnabled( false ); + rows->setEnabled( false ); l->setColumnMode( TQListBox::FitToWidth ); } @@ -184,10 +184,10 @@ void ListBoxDemo::setMultiSelection( bool b ) void ListBoxDemo::sortAscending() { - l->sort( TRUE ); + l->sort( true ); } void ListBoxDemo::sortDescending() { - l->sort( FALSE ); + l->sort( false ); } diff --git a/examples/listboxcombo/listboxcombo.cpp b/examples/listboxcombo/listboxcombo.cpp index cf06c806d..651360294 100644 --- a/examples/listboxcombo/listboxcombo.cpp +++ b/examples/listboxcombo/listboxcombo.cpp @@ -27,7 +27,7 @@ public: MyListBoxItem() : TQListBoxItem() { - setCustomHighlighting( TRUE ); + setCustomHighlighting( true ); } protected: @@ -98,7 +98,7 @@ ListBoxCombo::ListBoxCombo( TQWidget *parent, const char *name ) box1->setSpacing( 5 ); // Create a non-editable Combobox and a label below... - TQComboBox *cb1 = new TQComboBox( FALSE, box1 ); + TQComboBox *cb1 = new TQComboBox( false, box1 ); label1 = new TQLabel( "Current Item: Combobox Item 0", box1 ); label1->setMaximumHeight( label1->sizeHint().height() * 2 ); label1->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); @@ -116,7 +116,7 @@ ListBoxCombo::ListBoxCombo( TQWidget *parent, const char *name ) box2->setSpacing( 5 ); // Create an editable Combobox and a label below... - TQComboBox *cb2 = new TQComboBox( TRUE, box2 ); + TQComboBox *cb2 = new TQComboBox( true, box2 ); label2 = new TQLabel( "Current Item: Combobox Item 0", box2 ); label2->setMaximumHeight( label2->sizeHint().height() * 2 ); label2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); diff --git a/examples/listviews/listviews.cpp b/examples/listviews/listviews.cpp index 66680f852..b21b50fb9 100644 --- a/examples/listviews/listviews.cpp +++ b/examples/listviews/listviews.cpp @@ -40,7 +40,7 @@ MessageHeader &MessageHeader::operator=( const MessageHeader &mh ) Folder::Folder( Folder *parent, const TQString &name ) : TQObject( parent, name ), fName( name ) { - lstMessages.setAutoDelete( TRUE ); + lstMessages.setAutoDelete( true ); } // ----------------------------------------------------------------- @@ -103,16 +103,16 @@ void MessageListItem::paintCell( TQPainter *p, const TQColorGroup &cg, ListViews::ListViews( TQWidget *parent, const char *name ) : TQSplitter( TQt::Horizontal, parent, name ) { - lstFolders.setAutoDelete( TRUE ); + lstFolders.setAutoDelete( true ); folders = new TQListView( this ); - folders->header()->setClickEnabled( FALSE ); + folders->header()->setClickEnabled( false ); folders->addColumn( "Folder" ); initFolders(); setupFolders(); - folders->setRootIsDecorated( TRUE ); + folders->setRootIsDecorated( true ); setResizeMode( folders, TQSplitter::KeepSize ); TQSplitter *vsplitter = new TQSplitter( TQt::Vertical, this ); @@ -122,8 +122,8 @@ ListViews::ListViews( TQWidget *parent, const char *name ) messages->addColumn( "Subject" ); messages->addColumn( "Date" ); messages->setColumnAlignment( 1, TQt::AlignRight ); - messages->setAllColumnsShowFocus( TRUE ); - messages->setShowSortIndicator( TRUE ); + messages->setAllColumnsShowFocus( true ); + messages->setShowSortIndicator( true ); menu = new TQPopupMenu( messages ); for( int i = 1; i <= 10; i++ ) menu->insertItem( TQString( "Context Item %1" ).arg( i ) ); @@ -144,12 +144,12 @@ ListViews::ListViews( TQWidget *parent, const char *name ) messages->setSelectionMode( TQListView::Extended ); // some preparations - folders->firstChild()->setOpen( TRUE ); - folders->firstChild()->firstChild()->setOpen( TRUE ); + folders->firstChild()->setOpen( true ); + folders->firstChild()->firstChild()->setOpen( true ); folders->setCurrentItem( folders->firstChild()->firstChild()->firstChild() ); - folders->setSelected( folders->firstChild()->firstChild()->firstChild(), TRUE ); + folders->setSelected( folders->firstChild()->firstChild()->firstChild(), true ); - messages->setSelected( messages->firstChild(), TRUE ); + messages->setSelected( messages->firstChild(), true ); messages->setCurrentItem( messages->firstChild() ); message->setMargin( 5 ); diff --git a/examples/mdi/application.cpp b/examples/mdi/application.cpp index 5b91bdb58..ec9a905eb 100644 --- a/examples/mdi/application.cpp +++ b/examples/mdi/application.cpp @@ -57,7 +57,7 @@ ApplicationWindow::ApplicationWindow() TQPixmap openIcon, saveIcon; fileTools = new TQToolBar( this, "file operations" ); - addToolBar( fileTools, tr( "File Operations" ), DockTop, TRUE ); + addToolBar( fileTools, tr( "File Operations" ), DockTop, true ); openIcon = TQPixmap( fileopen ); TQToolButton * fileOpen @@ -110,7 +110,7 @@ ApplicationWindow::ApplicationWindow() file->insertItem( "&Quit", tqApp, TQ_SLOT( closeAllWindows() ), CTRL+Key_Q ); windowsMenu = new TQPopupMenu( this ); - windowsMenu->setCheckable( TRUE ); + windowsMenu->setCheckable( true ); connect( windowsMenu, TQ_SIGNAL( aboutToShow() ), this, TQ_SLOT( windowsMenuAboutToShow() ) ); menuBar()->insertItem( "&Windows", windowsMenu ); @@ -127,7 +127,7 @@ ApplicationWindow::ApplicationWindow() TQVBox* vb = new TQVBox( this ); vb->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); ws = new TQWorkspace( vb ); - ws->setScrollBarsEnabled( TRUE ); + ws->setScrollBarsEnabled( true ); setCentralWidget( vb ); statusBar()->message( "Ready", 2000 ); @@ -222,9 +222,9 @@ void ApplicationWindow::windowsMenuAboutToShow() int tileId = windowsMenu->insertItem("&Tile", ws, TQ_SLOT(tile() ) ); int horTileId = windowsMenu->insertItem("Tile &Horizontally", this, TQ_SLOT(tileHorizontal() ) ); if ( ws->windowList().isEmpty() ) { - windowsMenu->setItemEnabled( cascadeId, FALSE ); - windowsMenu->setItemEnabled( tileId, FALSE ); - windowsMenu->setItemEnabled( horTileId, FALSE ); + windowsMenu->setItemEnabled( cascadeId, false ); + windowsMenu->setItemEnabled( tileId, false ); + windowsMenu->setItemEnabled( horTileId, false ); } windowsMenu->insertSeparator(); TQWidgetList windows = ws->windowList(); @@ -398,7 +398,7 @@ void MDIWindow::print( TQPrinter* printer) int pageNo = 1; if ( printer->setup(this) ) { // printer dialog - printer->setFullPage( TRUE ); + printer->setFullPage( true ); emit message( "Printing...", 0 ); TQPainter p; if ( !p.begin( printer ) ) @@ -429,7 +429,7 @@ void MDIWindow::print( TQPrinter* printer) emit message( msg, 0 ); printer->newPage(); page++; - } while (TRUE); + } while (true); } #endif } diff --git a/examples/menu/menu.cpp b/examples/menu/menu.cpp index 8997ddaae..097c25884 100644 --- a/examples/menu/menu.cpp +++ b/examples/menu/menu.cpp @@ -143,8 +143,8 @@ MenuExample::MenuExample( TQWidget *parent, const char *name ) TQ_CHECK_PTR( edit ); int undoID = edit->insertItem( "&Undo", this, TQ_SLOT(undo()) ); int redoID = edit->insertItem( "&Redo", this, TQ_SLOT(redo()) ); - edit->setItemEnabled( undoID, FALSE ); - edit->setItemEnabled( redoID, FALSE ); + edit->setItemEnabled( undoID, false ); + edit->setItemEnabled( redoID, false ); TQPopupMenu* options = new TQPopupMenu( this ); TQ_CHECK_PTR( options ); @@ -155,19 +155,19 @@ MenuExample::MenuExample( TQWidget *parent, const char *name ) options->polish(); // adjust system settings TQFont f = options->font(); - f.setBold( TRUE ); + f.setBold( true ); boldID = options->insertItem( new MyMenuItem( "Bold", f ) ); options->setAccel( CTRL+Key_B, boldID ); options->connectItem( boldID, this, TQ_SLOT(bold()) ); f = font(); - f.setUnderline( TRUE ); + f.setUnderline( true ); underlineID = options->insertItem( new MyMenuItem( "Underline", f ) ); options->setAccel( CTRL+Key_U, underlineID ); options->connectItem( underlineID, this, TQ_SLOT(underline()) ); - isBold = FALSE; - isUnderline = FALSE; - options->setCheckable( TRUE ); + isBold = false; + isUnderline = false; + options->setCheckable( true ); TQPopupMenu *help = new TQPopupMenu( this ); @@ -268,8 +268,8 @@ void MenuExample::redo() void MenuExample::normal() { - isBold = FALSE; - isUnderline = FALSE; + isBold = false; + isUnderline = false; TQFont font; label->setFont( font ); menu->setItemChecked( boldID, isBold ); diff --git a/examples/movies/main.cpp b/examples/movies/main.cpp index 3fa2ec737..af1b9cf88 100644 --- a/examples/movies/main.cpp +++ b/examples/movies/main.cpp @@ -265,7 +265,7 @@ int main(int argc, char **argv) if (argc > 1) { // Commandline mode - show movies given on the command line // - bool gui=TRUE; + bool gui=true; for (int arg=1; arg<argc; arg++) { if ( TQString(argv[arg]) == "-i" ) gui = !gui; diff --git a/examples/network/archivesearch/archivedialog.ui.h b/examples/network/archivesearch/archivedialog.ui.h index 45c4553ee..e8580c398 100644 --- a/examples/network/archivesearch/archivedialog.ui.h +++ b/examples/network/archivesearch/archivedialog.ui.h @@ -87,7 +87,7 @@ void ArchiveDialog::searchDone( bool error ) TQString result(articleSearcher.readAll()); TQRegExp rx("<a href=\"(http://lists\\.trolltech\\.com/qt-interest/.*)\">(.*)</a>"); - rx.setMinimal(TRUE); + rx.setMinimal(true); int pos = 0; while (pos >= 0) { pos = rx.search(result, pos); diff --git a/examples/network/ftpclient/ftpmainwindow.ui.h b/examples/network/ftpclient/ftpmainwindow.ui.h index ded8b2600..e5ab8663a 100644 --- a/examples/network/ftpclient/ftpmainwindow.ui.h +++ b/examples/network/ftpclient/ftpmainwindow.ui.h @@ -33,7 +33,7 @@ void FtpMainWindow::init() { stateFtp = new TQLabel( tr("Unconnected"), statusBar() ); - statusBar()->addWidget( stateFtp, 0, TRUE ); + statusBar()->addWidget( stateFtp, 0, true ); ftp = new TQFtp( this ); connect( ftp, TQ_SIGNAL(commandStarted(int)), @@ -81,7 +81,7 @@ void FtpMainWindow::uploadFile() 0, this, "upload progress dialog", - TRUE ); + true ); connect( ftp, TQ_SIGNAL(dataTransferProgress(int,int)), &progress, TQ_SLOT(setProgress(int,int)) ); connect( ftp, TQ_SIGNAL(commandFinished(int,bool)), @@ -127,7 +127,7 @@ void FtpMainWindow::downloadFile() 0, this, "download progress dialog", - TRUE ); + true ); connect( ftp, TQ_SIGNAL(dataTransferProgress(int,int)), &progress, TQ_SLOT(setProgress(int,int)) ); connect( ftp, TQ_SIGNAL(commandFinished(int,bool)), diff --git a/examples/network/infoprotocol/infoserver/infodata.cpp b/examples/network/infoprotocol/infoserver/infodata.cpp index 347c78d31..f31c092b1 100644 --- a/examples/network/infoprotocol/infoserver/infodata.cpp +++ b/examples/network/infoprotocol/infoserver/infodata.cpp @@ -12,10 +12,10 @@ // we hard code all nodes and data in InfoData class InfoData::InfoData() : - nodes( 17, TRUE ), data( 17, TRUE ) + nodes( 17, true ), data( 17, true ) { - nodes.setAutoDelete(TRUE); - data.setAutoDelete(TRUE); + nodes.setAutoDelete(true); + data.setAutoDelete(true); TQStringList *item; nodes.insert( "/", item = new TQStringList( ) ); @@ -63,10 +63,10 @@ TQStringList InfoData::list( TQString path, bool *found ) const path = "/" + path; TQStringList *list = nodes[ path ]; if ( list ) { - *found = TRUE; + *found = true; return *list; } else { - *found = FALSE; + *found = false; TQStringList empty; return empty; } @@ -78,10 +78,10 @@ TQString InfoData::get( TQString path, bool *found ) const path = "/" + path; TQString *file = data[ path ]; if ( file ) { - *found = TRUE; + *found = true; return *file; } else { - *found = FALSE; + *found = false; TQString empty; return empty; } diff --git a/examples/network/infoprotocol/infoserver/server.cpp b/examples/network/infoprotocol/infoserver/server.cpp index d71de6590..242be013a 100644 --- a/examples/network/infoprotocol/infoserver/server.cpp +++ b/examples/network/infoprotocol/infoserver/server.cpp @@ -80,7 +80,7 @@ TQString ClientSocket::processCommand( const TQString& command ) answer += "550 Invalid path\r\n"; } else if ( com.startsWith( "GET " ) ) { bool ok; - TQStringList data = TQStringList::split( '\n', info->get( com.mid( 4 ), &ok ), TRUE ); + TQStringList data = TQStringList::split( '\n', info->get( com.mid( 4 ), &ok ), true ); if ( ok ) { for ( TQStringList::Iterator it = data.begin(); it != data.end(); ++it ) answer += "213+" + *it + "\r\n"; diff --git a/examples/network/infoprotocol/infourlclient/client.cpp b/examples/network/infoprotocol/infourlclient/client.cpp index c3101639f..83df55e5b 100644 --- a/examples/network/infoprotocol/infourlclient/client.cpp +++ b/examples/network/infoprotocol/infourlclient/client.cpp @@ -43,7 +43,7 @@ TQString ClientInfo::getOpenFileName() { static TQString workingDirectory( "qip://localhost/" ); - TQFileDialog dlg( workingDirectory, TQString::null, 0, 0, TRUE ); + TQFileDialog dlg( workingDirectory, TQString::null, 0, 0, true ); dlg.setCaption( TQFileDialog::tr( "Open" ) ); dlg.setMode( TQFileDialog::ExistingFile ); TQString result; diff --git a/examples/network/infoprotocol/infourlclient/qip.cpp b/examples/network/infoprotocol/infourlclient/qip.cpp index aed848388..71d112174 100644 --- a/examples/network/infoprotocol/infourlclient/qip.cpp +++ b/examples/network/infoprotocol/infourlclient/qip.cpp @@ -33,14 +33,14 @@ int Qip::supportedOperations() const bool Qip::checkConnection( TQNetworkOperation * ) { if ( socket->isOpen() ) - return TRUE; + return true; // don't call connectToHost() if we are already trying to connect if ( socket->state() == TQSocket::Connecting ) - return FALSE; + return false; socket->connectToHost( url()->host(), url()->port() != -1 ? url()->port() : infoPort ); - return FALSE; + return false; } void Qip::operationListChildren( TQNetworkOperation * ) @@ -101,10 +101,10 @@ void Qip::socketReadyRead() TQUrlInfo inf; inf.setName( line.mid( 6 ) + TQString( ( line[ 4 ] == 'D' ) ? "/" : "" ) ); inf.setDir( line[ 4 ] == 'D' ); - inf.setSymLink( FALSE ); + inf.setSymLink( false ); inf.setFile( line[ 4 ] == 'F' ); - inf.setWritable( FALSE ); - inf.setReadable( TRUE ); + inf.setWritable( false ); + inf.setReadable( true ); emit newChild( inf, operationInProgress() ); } else if ( line.startsWith( "213+" ) ) { state = Data; diff --git a/examples/network/mail/composer.cpp b/examples/network/mail/composer.cpp index 51f690126..52c23e492 100644 --- a/examples/network/mail/composer.cpp +++ b/examples/network/mail/composer.cpp @@ -47,7 +47,7 @@ Composer::Composer( TQWidget *parent ) void Composer::sendMessage() { - send->setEnabled( FALSE ); + send->setEnabled( false ); sendStatus->setText( tr( "Looking up mail servers" ) ); Smtp *smtp = new Smtp( from->text(), to->text(), subject->text(), @@ -61,5 +61,5 @@ void Composer::sendMessage() void Composer::enableSend() { - send->setEnabled( TRUE ); + send->setEnabled( true ); } diff --git a/examples/network/networkprotocol/nntp.cpp b/examples/network/networkprotocol/nntp.cpp index 833718ada..54cb6bb55 100644 --- a/examples/network/networkprotocol/nntp.cpp +++ b/examples/network/networkprotocol/nntp.cpp @@ -15,8 +15,8 @@ #include <ntqregexp.h> Nntp::Nntp() - : TQNetworkProtocol(), connectionReady( FALSE ), - readGroups( FALSE ), readArticle( FALSE ) + : TQNetworkProtocol(), connectionReady( false ), + readGroups( false ), readArticle( false ) { // create the command socket and connect to its signals commandSocket = new TQSocket( this ); @@ -56,7 +56,7 @@ void Nntp::operationListChildren( TQNetworkOperation * ) // write the command to the socket commandSocket->writeBlock( cmd.latin1(), cmd.length() ); - readGroups = TRUE; + readGroups = true; } void Nntp::operationGet( TQNetworkOperation *op ) @@ -75,28 +75,28 @@ void Nntp::operationGet( TQNetworkOperation *op ) // read the head of the article cmd = "article " + file + "\r\n"; commandSocket->writeBlock( cmd.latin1(), cmd.length() ); - readArticle = TRUE; + readArticle = true; } bool Nntp::checkConnection( TQNetworkOperation * ) { - // we are connected, return TRUE + // we are connected, return true if ( commandSocket->isOpen() && connectionReady ) - return TRUE; + return true; // seems that there is no chance to connect if ( commandSocket->isOpen() ) - return FALSE; + return false; // don't call connectToHost() if we are already trying to connect if ( commandSocket->state() == TQSocket::Connecting ) - return FALSE; + return false; // start connecting - connectionReady = FALSE; + connectionReady = false; commandSocket->connectToHost( url()->host(), url()->port() != -1 ? url()->port() : 119 ); - return FALSE; + return false; } void Nntp::close() @@ -165,7 +165,7 @@ void Nntp::readyRead() // of the code of the server response was 200, we know that the // server is ready to get commands from us now if ( s.left( 3 ) == "200" ) - connectionReady = TRUE; + connectionReady = true; } void Nntp::parseGroups() @@ -180,7 +180,7 @@ void Nntp::parseGroups() // if the line starts with a dot, all groups or articles have been listed, // so we finished processing the listChildren() command if ( s[ 0 ] == '.' ) { - readGroups = FALSE; + readGroups = false; operationInProgress()->setState( StDone ); emit finished( operationInProgress() ); return; @@ -203,10 +203,10 @@ void Nntp::parseGroups() inf.setName( group ); TQString path = url()->path(); inf.setDir( path.isEmpty() || path == "/" ); - inf.setSymLink( FALSE ); + inf.setSymLink( false ); inf.setFile( !inf.isDir() ); - inf.setWritable( FALSE ); - inf.setReadable( TRUE ); + inf.setWritable( false ); + inf.setReadable( true ); // let others know about our new child emit newChild( inf, operationInProgress() ); @@ -225,7 +225,7 @@ void Nntp::parseArticle() // if the line starts with a dot, we finished reading something if ( s[ 0 ] == '.' ) { - readArticle = FALSE; + readArticle = false; operationInProgress()->setState( StDone ); emit finished( operationInProgress() ); return; diff --git a/examples/network/networkprotocol/view.cpp b/examples/network/networkprotocol/view.cpp index 070b8a7cd..c16597556 100644 --- a/examples/network/networkprotocol/view.cpp +++ b/examples/network/networkprotocol/view.cpp @@ -44,7 +44,7 @@ View::View() this, TQ_SLOT( downloadFile() ) ); fileView = new TQMultiLineEdit( this ); - fileView->setReadOnly( TRUE ); + fileView->setReadOnly( true ); // if new data comes in, display it connect( &op, TQ_SIGNAL( data( const TQByteArray &, TQNetworkOperation * ) ), @@ -71,7 +71,7 @@ TQString View::getOpenFileName() static TQString workingDirectory = TQDir::currentDirPath(); TQFileDialog *dlg = new TQFileDialog( workingDirectory, - TQString::null, 0, 0, TRUE ); + TQString::null, 0, 0, true ); dlg->setCaption( TQFileDialog::tr( "Open" ) ); dlg->setMode( TQFileDialog::ExistingFile ); TQString result; diff --git a/examples/network/remotecontrol/ipcserver.cpp b/examples/network/remotecontrol/ipcserver.cpp index 4bd7b6423..2ccbf772e 100644 --- a/examples/network/remotecontrol/ipcserver.cpp +++ b/examples/network/remotecontrol/ipcserver.cpp @@ -53,7 +53,7 @@ private slots: emit receivedPixmap( TQPixmap(variant.toImage()) ); break; case TQVariant::Palette: - TQApplication::setPalette( variant.toPalette(), TRUE ); + TQApplication::setPalette( variant.toPalette(), true ); break; default: break; diff --git a/examples/opengl/gear/gear.cpp b/examples/opengl/gear/gear.cpp index 0ceb2f6cb..91e086c0e 100644 --- a/examples/opengl/gear/gear.cpp +++ b/examples/opengl/gear/gear.cpp @@ -283,7 +283,7 @@ int main( int argc, char **argv ) } if ( argc >= 2 ) { - bool ok = TRUE; + bool ok = true; timer_interval = TQString::fromLatin1( argv[1] ).toInt( &ok ); if ( !ok ) timer_interval = 10; diff --git a/examples/opengl/glpixmap/globjwin.cpp b/examples/opengl/glpixmap/globjwin.cpp index 11cb675a6..36ae04488 100644 --- a/examples/opengl/glpixmap/globjwin.cpp +++ b/examples/opengl/glpixmap/globjwin.cpp @@ -35,7 +35,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name ) { // Create a menu file = new TQPopupMenu( this ); - file->setCheckable( TRUE ); + file->setCheckable( true ); file->insertItem( "Grab Frame Buffer", this, TQ_SLOT(grabFrameBuffer()) ); file->insertItem( "Render Pixmap", this, TQ_SLOT(makePixmap()) ); file->insertItem( "Render Pixmap Hidden", this, TQ_SLOT(makePixmapHidden()) ); @@ -146,7 +146,7 @@ void GLObjectWindow::makePixmapHidden() // Make a TQGLWidget to draw the pixmap. This widget will not be shown. GLBox* w = new GLBox( this, "temporary glwidget", c1 ); - bool success = FALSE; + bool success = false; TQPixmap pm; if ( w->isValid() ) { @@ -160,7 +160,7 @@ void GLObjectWindow::makePixmapHidden() pm = w->renderPixmap( sz.width(), sz.height() ); if ( !pm.isNull() ) - success = TRUE; + success = true; } if ( success ) { @@ -197,11 +197,11 @@ void GLObjectWindow::useFixedPixmapSize() { if ( pmSz.isValid() ) { pmSz = TQSize(); - file->setItemChecked( fixMenuItemId, FALSE ); + file->setItemChecked( fixMenuItemId, false ); } else { pmSz = TQSize( 200, 200 ); - file->setItemChecked( fixMenuItemId, TRUE ); + file->setItemChecked( fixMenuItemId, true ); } } diff --git a/examples/opengl/overlay/glteapots.cpp b/examples/opengl/overlay/glteapots.cpp index 6d0d5b568..13996c0a6 100644 --- a/examples/opengl/overlay/glteapots.cpp +++ b/examples/opengl/overlay/glteapots.cpp @@ -71,7 +71,7 @@ GLTeapots::GLTeapots( TQWidget* parent, const char* name ) parent, name ) { teapotList = 0; - rubberOn = FALSE; + rubberOn = false; } /*! @@ -288,7 +288,7 @@ void GLTeapots::mousePressEvent( TQMouseEvent* e ) { rubberP1 = e->pos(); rubberP2 = rubberP1; - rubberOn = TRUE; + rubberOn = true; } /*! @@ -311,7 +311,7 @@ void GLTeapots::mouseMoveEvent( TQMouseEvent* e ) void GLTeapots::mouseReleaseEvent( TQMouseEvent* ) { if ( rubberOn ) { - rubberOn = FALSE; + rubberOn = false; updateOverlayGL(); } } diff --git a/examples/opengl/overlay_x11/gearwidget.cpp b/examples/opengl/overlay_x11/gearwidget.cpp index 9a1f4dd90..9ee642999 100644 --- a/examples/opengl/overlay_x11/gearwidget.cpp +++ b/examples/opengl/overlay_x11/gearwidget.cpp @@ -252,9 +252,9 @@ void GearWidget::paintGL() { tqDebug( "GearWidget: Doing GL rendering." ); #if defined (Q_GLX) - static bool doneIt = FALSE; + static bool doneIt = false; if ( !doneIt ) { - doneIt = TRUE; + doneIt = true; // Print out the Visual ID. Access to this will be made // simpler in future versions of TQt! XWindowAttributes a; diff --git a/examples/opengl/overlay_x11/rubberbandwidget.cpp b/examples/opengl/overlay_x11/rubberbandwidget.cpp index a11a81441..7f9f52165 100644 --- a/examples/opengl/overlay_x11/rubberbandwidget.cpp +++ b/examples/opengl/overlay_x11/rubberbandwidget.cpp @@ -19,7 +19,7 @@ RubberbandWidget::RubberbandWidget( TQColor transparentColor, TQWidget *parent, : TQWidget( parent, name, f ) { setBackgroundColor( transparentColor ); - on = FALSE; + on = false; } @@ -28,8 +28,8 @@ void RubberbandWidget::mousePressEvent( TQMouseEvent* e ) p1 = e->pos(); p2 = p1; p3 = p1; - on = TRUE; - setMouseTracking( TRUE ); + on = true; + setMouseTracking( true ); } @@ -54,6 +54,6 @@ void RubberbandWidget::mouseReleaseEvent( TQMouseEvent* ) TQPainter p ( this ); p.eraseRect( rect() ); } - on = FALSE; - setMouseTracking( FALSE ); + on = false; + setMouseTracking( false ); } diff --git a/examples/opengl/texture/gltexobj.cpp b/examples/opengl/texture/gltexobj.cpp index 78b0fcefb..fe4a382eb 100644 --- a/examples/opengl/texture/gltexobj.cpp +++ b/examples/opengl/texture/gltexobj.cpp @@ -33,10 +33,10 @@ GLTexobj::GLTexobj( TQWidget* parent, const char* name ) xRot = yRot = zRot = 0.0; // default object rotation scale = 5.0; // default object scale object = 0; - animation = TRUE; + animation = true; timer = new TQTimer( this ); connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(update()) ); - timer->start( redrawWait, TRUE ); + timer->start( redrawWait, true ); } @@ -74,7 +74,7 @@ void GLTexobj::paintGL() if ( animation ) { glFlush(); // Make sure everything is drawn before restarting timer - timer->start( redrawWait, TRUE ); // Wait this many msecs before redraw + timer->start( redrawWait, true ); // Wait this many msecs before redraw } } diff --git a/examples/popup/popup.cpp b/examples/popup/popup.cpp index 25fd14b0a..a47996921 100644 --- a/examples/popup/popup.cpp +++ b/examples/popup/popup.cpp @@ -17,7 +17,7 @@ FancyPopup::FancyPopup( TQWidget* parent, const char* name ): setAlignment( AlignCenter ); resize(150,100); moves = 0; - setMouseTracking( TRUE ); + setMouseTracking( true ); } void FancyPopup::mouseMoveEvent( TQMouseEvent * e){ diff --git a/examples/progress/progress.cpp b/examples/progress/progress.cpp index 190f50de2..b951b0fc7 100644 --- a/examples/progress/progress.cpp +++ b/examples/progress/progress.cpp @@ -163,7 +163,7 @@ public: cl_id = options->insertItem( "Custom label", this, TQ_SLOT(customLabel()) ); options->insertSeparator(); md_id = options->insertItem( "No minimum duration", this, TQ_SLOT(toggleMinimumDuration()) ); - options->setCheckable( TRUE ); + options->setCheckable( true ); loopDriven(); defaultLabel(); @@ -179,34 +179,34 @@ public slots: draw(drawItemRects(id)); } - void stopDrawing() { got_stop = TRUE; } + void stopDrawing() { got_stop = true; } void timerDriven() { - timer_driven = TRUE; - options->setItemChecked( td_id, TRUE ); - options->setItemChecked( ld_id, FALSE ); + timer_driven = true; + options->setItemChecked( td_id, true ); + options->setItemChecked( ld_id, false ); } void loopDriven() { - timer_driven = FALSE; - options->setItemChecked( ld_id, TRUE ); - options->setItemChecked( td_id, FALSE ); + timer_driven = false; + options->setItemChecked( ld_id, true ); + options->setItemChecked( td_id, false ); } void defaultLabel() { - default_label = TRUE; - options->setItemChecked( dl_id, TRUE ); - options->setItemChecked( cl_id, FALSE ); + default_label = true; + options->setItemChecked( dl_id, true ); + options->setItemChecked( cl_id, false ); } void customLabel() { - default_label = FALSE; - options->setItemChecked( dl_id, FALSE ); - options->setItemChecked( cl_id, TRUE ); + default_label = false; + options->setItemChecked( dl_id, false ); + options->setItemChecked( cl_id, true ); } void toggleMinimumDuration() @@ -243,7 +243,7 @@ private: pb->setProgress( pb->totalSteps() ); TQPainter p(this); p.fillRect(0, 0, width(), height(), backgroundColor()); - enableDrawingItems(TRUE); + enableDrawingItems(true); killTimers(); delete pb; pb = 0; @@ -277,15 +277,15 @@ private: } rects = n; pb = newProgressDialog("Drawing rectangles.\n" - "Using timer event.", n, FALSE); + "Using timer event.", n, false); pb->setCaption("Please Wait"); connect(pb, TQ_SIGNAL(cancelled()), this, TQ_SLOT(stopDrawing())); - enableDrawingItems(FALSE); + enableDrawingItems(false); startTimer(0); - got_stop = FALSE; + got_stop = false; } else { TQProgressDialog* lpb = newProgressDialog( - "Drawing rectangles.\nUsing loop.", n, TRUE); + "Drawing rectangles.\nUsing loop.", n, true); lpb->setCaption("Please Wait"); TQPainter p(this); diff --git a/examples/progressbar/progressbar.cpp b/examples/progressbar/progressbar.cpp index dfe2d70a7..c6178510b 100644 --- a/examples/progressbar/progressbar.cpp +++ b/examples/progressbar/progressbar.cpp @@ -29,7 +29,7 @@ ProgressBar::ProgressBar( TQWidget *parent, const char *name ) TQGridLayout* toplayout = new TQGridLayout( layout(), 2, 2, 5); - setRadioButtonExclusive( TRUE ); + setRadioButtonExclusive( true ); // insert three radiobuttons which the user can use // to set the speed of the progress and two pushbuttons @@ -64,7 +64,7 @@ ProgressBar::ProgressBar( TQWidget *parent, const char *name ) connect( &timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotTimeout() ) ); // Let's start with normal speed... - normal->setChecked( TRUE ); + normal->setChecked( true ); // some contraints @@ -93,9 +93,9 @@ void ProgressBar::slotStart() progress->setTotalSteps( 50 ); // disable the speed-radiobuttons - slow->setEnabled( FALSE ); - normal->setEnabled( FALSE ); - fast->setEnabled( FALSE ); + slow->setEnabled( false ); + normal->setEnabled( false ); + fast->setEnabled( false ); } // If the progress is not running... @@ -126,12 +126,12 @@ void ProgressBar::slotReset() // rename the start/pause/continue button to Start... start->setText( "&Start" ); // ...and enable this button - start->setEnabled( TRUE ); + start->setEnabled( true ); // enable the speed-radiobuttons - slow->setEnabled( TRUE ); - normal->setEnabled( TRUE ); - fast->setEnabled( TRUE ); + slow->setEnabled( true ); + normal->setEnabled( true ); + fast->setEnabled( true ); // reset the progressbar progress->reset(); @@ -154,7 +154,7 @@ void ProgressBar::slotTimeout() // ...rename the start/pause/continue button to Start... start->setText( "&Start" ); // ...and disable it... - start->setEnabled( FALSE ); + start->setEnabled( false ); // ...and return return; } diff --git a/examples/qdir/qdir.cpp b/examples/qdir/qdir.cpp index b2cf108b0..251ef024e 100644 --- a/examples/qdir/qdir.cpp +++ b/examples/qdir/qdir.cpp @@ -94,7 +94,7 @@ void PixmapView::setPixmap( const TQPixmap &pix ) { pixmap = pix; resizeContents( pixmap.size().width(), pixmap.size().height() ); - viewport()->repaint( FALSE ); + viewport()->repaint( false ); } void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch ) @@ -109,7 +109,7 @@ Preview::Preview( TQWidget *parent ) : TQWidgetStack( parent ) { normalText = new TQMultiLineEdit( this ); - normalText->setReadOnly( TRUE ); + normalText->setReadOnly( true ); html = new TQTextView( this ); pixmap = new PixmapView( this ); raiseWidget( normalText ); @@ -183,15 +183,15 @@ void PreviewWidget::previewUrl( const TQUrl &u ) // **************************************************************************************************** CustomFileDialog::CustomFileDialog() - : TQFileDialog( 0, 0, TRUE ) + : TQFileDialog( 0, 0, true ) { setDir( "/" ); - dirView = new DirectoryView( this, 0, TRUE ); + dirView = new DirectoryView( this, 0, true ); dirView->addColumn( "" ); dirView->header()->hide(); ::Directory *root = new ::Directory( dirView, "/" ); - root->setOpen( TRUE ); + root->setOpen( true ); dirView->setFixedWidth( 150 ); addLeftWidget( dirView ); @@ -220,7 +220,7 @@ CustomFileDialog::CustomFileDialog() p->setPopup( bookmarkMenu ); - addToolButton( p, TRUE ); + addToolButton( p, true ); connect( dirView, TQ_SIGNAL( folderSelected( const TQString & ) ), this, TQ_SLOT( setDir2( const TQString & ) ) ); @@ -252,9 +252,9 @@ CustomFileDialog::~CustomFileDialog() void CustomFileDialog::setDir2( const TQString &s ) { - blockSignals( TRUE ); + blockSignals( true ); setDir( s ); - blockSignals( FALSE ); + blockSignals( false ); } void CustomFileDialog::showEvent( TQShowEvent *e ) @@ -289,8 +289,8 @@ int main( int argc, char ** argv ) TQString start; TQString filter; TQString caption; - bool preview = FALSE; - bool custom = FALSE; + bool preview = false; + bool custom = false; TQApplication a( argc, argv ); for (int i=1; i<argc; i++) { TQString arg = argv[i]; @@ -303,9 +303,9 @@ int main( int argc, char ** argv ) else if ( arg == "-filter" ) filter = argv[++i]; else if ( arg == "-preview" ) - preview = TRUE; + preview = true; else if ( arg == "-custom" ) - custom = TRUE; + custom = true; else if ( arg[0] == '-' ) { tqDebug("Usage: qdir [-any | -dir | -custom] [-preview] [-default f] {-filter f} [caption ...]\n" " -any Get any filename, need not exist.\n" @@ -333,10 +333,10 @@ int main( int argc, char ** argv ) ? "Choose directory..." : "Choose file..."; if ( !custom ) { - TQFileDialog fd( TQString::null, filter, 0, 0, TRUE ); + TQFileDialog fd( TQString::null, filter, 0, 0, true ); fd.setMode( mode ); if ( preview ) { - fd.setContentsPreviewEnabled( TRUE ); + fd.setContentsPreviewEnabled( true ); PreviewWidget *pw = new PreviewWidget( &fd ); fd.setContentsPreview( pw, pw ); fd.setViewMode( TQFileDialog::List ); diff --git a/examples/qmag/qmag.cpp b/examples/qmag/qmag.cpp index b5705df6a..c89d686fb 100644 --- a/examples/qmag/qmag.cpp +++ b/examples/qmag/qmag.cpp @@ -57,7 +57,7 @@ private: int yoffset; // pixels in addition to the actual picture int z; // magnification factor int r; // autorefresh rate (index into refreshrates) - bool grabbing; // TRUE if qmag is currently grabbing + bool grabbing; // true if qmag is currently grabbing int grabx, graby; TQString multifn; // filename for multisave }; @@ -87,12 +87,12 @@ MagWidget::MagWidget( TQWidget *parent, const char *name ) #ifdef COMPLEX_GUI int w=0, x=0, n; - zoom = new TQComboBox( FALSE, this ); + zoom = new TQComboBox( false, this ); TQ_CHECK_PTR(zoom); zoom->insertStrList( zoomfactors, 9 ); connect( zoom, TQ_SIGNAL(activated(int)), TQ_SLOT(setZoom(int)) ); - refresh = new TQComboBox( FALSE, this ); + refresh = new TQComboBox( false, this ); TQ_CHECK_PTR(refresh); refresh->insertStrList( refreshrates, 9 ); connect( refresh, TQ_SIGNAL(activated(int)), TQ_SLOT(setRefresh(int)) ); @@ -119,7 +119,7 @@ MagWidget::MagWidget( TQWidget *parent, const char *name ) 10+saveButton->fontMetrics().width("Save"), 20 ); multiSaveButton = new TQPushButton( this ); - multiSaveButton->setToggleButton(TRUE); + multiSaveButton->setToggleButton(true); TQ_CHECK_PTR(multiSaveButton); connect( multiSaveButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(multiSave()) ); multiSaveButton->setText( "MultiSave" ); @@ -158,9 +158,9 @@ MagWidget::MagWidget( TQWidget *parent, const char *name ) #endif grabx = graby = -1; - grabbing = FALSE; + grabbing = false; - setMouseTracking( TRUE ); // and do let me know what pixel I'm at, eh? + setMouseTracking( true ); // and do let me know what pixel I'm at, eh? grabAround( TQPoint(grabx=tqApp->desktop()->width()/2, graby=tqApp->desktop()->height()/2) ); } @@ -203,11 +203,11 @@ void MagWidget::multiSave() multifn = ""; // stops saving multifn = TQFileDialog::getSaveFileName(); if ( multifn.isEmpty() ) - multiSaveButton->setOn(FALSE); + multiSaveButton->setOn(false); if ( !r ) p.save( multifn, "BMP" ); } else { - multiSaveButton->setOn(FALSE); + multiSaveButton->setOn(false); } } @@ -245,7 +245,7 @@ void MagWidget::grab() pm = p.xForm( m ); if ( !multiSaveButton || !multiSaveButton->isOn() ) - repaint( FALSE ); // and finally repaint, flicker-free + repaint( false ); // and finally repaint, flicker-free } @@ -262,7 +262,7 @@ void MagWidget::paintEvent( TQPaintEvent * ) void MagWidget::mousePressEvent( TQMouseEvent *e ) { if ( !grabbing ) { // prepare to grab... - grabbing = TRUE; + grabbing = true; killTimers(); grabMouse( crossCursor ); grabx = -1; @@ -278,7 +278,7 @@ void MagWidget::mousePressEvent( TQMouseEvent *e ) void MagWidget::mouseReleaseEvent( TQMouseEvent * e ) { if ( grabbing && grabx >= 0 && graby >= 0 ) { - grabbing = FALSE; + grabbing = false; grabAround(e->pos()); releaseMouse(); } diff --git a/examples/qwerty/qwerty.cpp b/examples/qwerty/qwerty.cpp index 28dbc48a9..61184447e 100644 --- a/examples/qwerty/qwerty.cpp +++ b/examples/qwerty/qwerty.cpp @@ -21,7 +21,7 @@ #include <ntqtextcodec.h> -const bool no_writing = FALSE; +const bool no_writing = false; static TQPtrList<TQTextCodec> *codecList = 0; @@ -68,7 +68,7 @@ Editor::Editor( TQWidget * parent , const char * name ) edit->insertSeparator(); edit->insertItem( "&Select Font" , this, TQ_SLOT(font()), ALT+Key_T ); #endif - changed = FALSE; + changed = false; e = new TQMultiLineEdit( this, "editor" ); connect( e, TQ_SIGNAL( textChanged() ), this, TQ_SLOT( textChanged() ) ); @@ -155,7 +155,7 @@ void Editor::load( const TQString& fileName, int code ) if ( !f.open( IO_ReadOnly ) ) return; - e->setAutoUpdate( FALSE ); + e->setAutoUpdate( false ); TQTextStream t(&f); if ( code >= Codec ) @@ -181,11 +181,11 @@ void Editor::load( const TQString& fileName, int code ) e->setText( t.read() ); f.close(); - e->setAutoUpdate( TRUE ); + e->setAutoUpdate( true ); e->repaint(); setCaption( fileName ); - changed = FALSE; + changed = false; } void Editor::openAsEncoding( int code ) @@ -205,7 +205,7 @@ bool Editor::save() TQString fn = TQFileDialog::getSaveFileName( TQString::null, TQString::null, this ); if ( !fn.isEmpty() ) return saveAs( fn ); - return FALSE; + return false; #endif } @@ -255,7 +255,7 @@ bool Editor::saveAs( const TQString& fileName, int code ) TQMessageBox::warning(this,"I/O Error", TQString("The file could not be opened.\n\n") +fileName); - return FALSE; + return false; } TQTextStream t(&f); if ( code >= Codec ) @@ -269,15 +269,15 @@ bool Editor::saveAs( const TQString& fileName, int code ) t << e->text(); f.close(); setCaption( fileName ); - changed = FALSE; - return TRUE; + changed = false; + return true; } void Editor::print() { #ifndef TQT_NO_PRINTER if ( printer.setup(this) ) { // opens printer dialog - printer.setFullPage(TRUE); // we'll set our own margins + printer.setFullPage(true); // we'll set our own margins TQPainter p; p.begin( &printer ); // paint on printer p.setFont( e->font() ); @@ -350,5 +350,5 @@ void Editor::toLower() void Editor::textChanged() { - changed = TRUE; + changed = true; } diff --git a/examples/richtext/richtext.cpp b/examples/richtext/richtext.cpp index b166017aa..0dddfdfd4 100644 --- a/examples/richtext/richtext.cpp +++ b/examples/richtext/richtext.cpp @@ -98,7 +98,7 @@ MyRichText::MyRichText( TQWidget *parent, const char *name ) bPrev = new TQPushButton( "<< &Prev", buttons ); bNext = new TQPushButton( "&Next >>", buttons ); - bPrev->setEnabled( FALSE ); + bPrev->setEnabled( false ); connect( bClose, TQ_SIGNAL( clicked() ), tqApp, TQ_SLOT( quit() ) ); connect( bPrev, TQ_SIGNAL( clicked() ), this, TQ_SLOT( prev() ) ); @@ -117,9 +117,9 @@ void MyRichText::prev() view->setText( sayings[num] ); if ( num == 0 ) - bPrev->setEnabled( FALSE ); + bPrev->setEnabled( false ); - bNext->setEnabled( TRUE ); + bNext->setEnabled( true ); } void MyRichText::next() @@ -130,9 +130,9 @@ void MyRichText::next() view->setText( sayings[num] ); if ( !sayings[num + 1] ) - bNext->setEnabled( FALSE ); + bNext->setEnabled( false ); - bPrev->setEnabled( TRUE ); + bPrev->setEnabled( true ); } diff --git a/examples/rot13/rot13.cpp b/examples/rot13/rot13.cpp index dfcc5d684..e66ddc58e 100644 --- a/examples/rot13/rot13.cpp +++ b/examples/rot13/rot13.cpp @@ -36,17 +36,17 @@ Rot13::Rot13() void Rot13::changeLeft() { - left->blockSignals( TRUE ); + left->blockSignals( true ); left->setText( rot13( right->text() ) ); - left->blockSignals( FALSE ); + left->blockSignals( false ); } void Rot13::changeRight() { - right->blockSignals( TRUE ); + right->blockSignals( true ); right->setText( rot13( left->text() ) ); - right->blockSignals( FALSE ); + right->blockSignals( false ); } diff --git a/examples/scribble/scribble.cpp b/examples/scribble/scribble.cpp index 3f80d8881..f8b3d5dcb 100644 --- a/examples/scribble/scribble.cpp +++ b/examples/scribble/scribble.cpp @@ -26,11 +26,11 @@ #include <ntqpopupmenu.h> #include <ntqintdict.h> -const bool no_writing = FALSE; +const bool no_writing = false; Canvas::Canvas( TQWidget *parent, const char *name ) : TQWidget( parent, name, WStaticContents ), pen( TQt::red, 3 ), polyline(3), - mousePressed( FALSE ), buffer( width(), height() ) + mousePressed( false ), buffer( width(), height() ) { if ((tqApp->argc() > 0) && !buffer.load(tqApp->argv()[1])) @@ -50,18 +50,18 @@ void Canvas::save( const TQString &filename, const TQString &format ) void Canvas::clearScreen() { buffer.fill( colorGroup().base() ); - repaint( FALSE ); + repaint( false ); } void Canvas::mousePressEvent( TQMouseEvent *e ) { - mousePressed = TRUE; + mousePressed = true; polyline[2] = polyline[1] = polyline[0] = e->pos(); } void Canvas::mouseReleaseEvent( TQMouseEvent * ) { - mousePressed = FALSE; + mousePressed = false; } void Canvas::mouseMoveEvent( TQMouseEvent *e ) @@ -148,14 +148,14 @@ void Scribble::slotSave() { TQPopupMenu *menu = new TQPopupMenu( 0 ); TQIntDict<TQString> formats; - formats.setAutoDelete( TRUE ); + formats.setAutoDelete( true ); for ( unsigned int i = 0; i < TQImageIO::outputFormats().count(); i++ ) { TQString str = TQString( TQImageIO::outputFormats().at( i ) ); formats.insert( menu->insertItem( TQString( "%1..." ).arg( str ) ), new TQString( str ) ); } - menu->setMouseTracking( TRUE ); + menu->setMouseTracking( true ); int id = menu->exec( bSave->mapToGlobal( TQPoint( 0, bSave->height() + 1 ) ) ); if ( id != -1 ) { diff --git a/examples/scrollview/scrollview.cpp b/examples/scrollview/scrollview.cpp index 29d6e1b5a..4e76e584e 100644 --- a/examples/scrollview/scrollview.cpp +++ b/examples/scrollview/scrollview.cpp @@ -211,7 +211,7 @@ public: vp_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( vp_options ); - vp_options->setCheckable( TRUE ); + vp_options->setCheckable( true ); menubar->insertItem( "&ScrollView", vp_options ); connect( vp_options, TQ_SIGNAL(activated(int)), this, TQ_SLOT(doVPMenuItem(int)) ); @@ -230,13 +230,13 @@ public: vp = new TQScrollView(this); BigShrinker *bs = new BigShrinker(0);//(vp->viewport()); vp->addChild(bs); - bs->setAcceptDrops(TRUE); + bs->setAcceptDrops(true); TQObject::connect(bs, TQ_SIGNAL(clicked(int,int)), vp, TQ_SLOT(center(int,int))); } else { vp = new BigMatrix(this); if ( technique == 3 ) - vp->enableClipper(TRUE); + vp->enableClipper(true); srand(1); for (int i=0; i<30; i++) { TQMultiLineEdit *l = new TQMultiLineEdit(vp->viewport(),"First"); @@ -249,7 +249,7 @@ public: f_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( f_options ); - f_options->setCheckable( TRUE ); + f_options->setCheckable( true ); menubar->insertItem( "F&rame", f_options ); connect( f_options, TQ_SIGNAL(activated(int)), this, TQ_SLOT(doFMenuItem(int)) ); @@ -266,7 +266,7 @@ public: f_options->insertSeparator(); lw_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( lw_options ); - lw_options->setCheckable( TRUE ); + lw_options->setCheckable( true ); for (int lw = 1; lw <= max_lw; lw++) { TQString str; str.sprintf("%d Pixels", lw); @@ -277,7 +277,7 @@ public: this, TQ_SLOT(doFMenuItem(int)) ); mlw_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( mlw_options ); - mlw_options->setCheckable( TRUE ); + mlw_options->setCheckable( true ); for (int mlw = 0; mlw <= max_mlw; mlw++) { TQString str; str.sprintf("%d Pixels", mlw); @@ -288,7 +288,7 @@ public: this, TQ_SLOT(doFMenuItem(int)) ); mw_options = new TQPopupMenu( menubar ); TQ_CHECK_PTR( mw_options ); - mw_options->setCheckable( TRUE ); + mw_options->setCheckable( true ); for (int mw = 0; mw <= max_mw; mw++) { TQString str; str.sprintf("%d Pixels", mw); diff --git a/examples/showimg/imagetexteditor.cpp b/examples/showimg/imagetexteditor.cpp index 2abdabfb7..6bfd0d002 100644 --- a/examples/showimg/imagetexteditor.cpp +++ b/examples/showimg/imagetexteditor.cpp @@ -22,11 +22,11 @@ ImageTextEditor::ImageTextEditor( TQImage& i, TQWidget *parent, const char *name, WFlags f ) : - TQDialog(parent,name,TRUE,f), + TQDialog(parent,name,true,f), image(i) { TQVBoxLayout* vbox = new TQVBoxLayout(this,8); - vbox->setAutoAdd(TRUE); + vbox->setAutoAdd(true); TQGrid* controls = new TQGrid(3,TQGrid::Horizontal,this); controls->setSpacing(8); diff --git a/examples/showimg/showimg.cpp b/examples/showimg/showimg.cpp index 4ef1a1d97..66aff58b1 100644 --- a/examples/showimg/showimg.cpp +++ b/examples/showimg/showimg.cpp @@ -94,8 +94,8 @@ ImageViewer::ImageViewer( TQWidget *parent, const char *name, int wFlags ) ss = options->insertItem( "Smooth scaling" ); cc = options->insertItem( "Use color context" ); if ( TQApplication::colorSpec() == TQApplication::ManyColor ) - options->setItemEnabled( cc, FALSE ); - options->setCheckable( TRUE ); + options->setItemEnabled( cc, false ); + options->setCheckable( true ); setMenuItemFlags(); menubar->insertSeparator(); @@ -110,7 +110,7 @@ ImageViewer::ImageViewer( TQWidget *parent, const char *name, int wFlags ) status->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken ); status->setFixedHeight( fontMetrics().height() + 4 ); - setMouseTracking( TRUE ); + setMouseTracking( true ); } ImageViewer::~ImageViewer() @@ -262,12 +262,12 @@ void ImageViewer::updateStatus() int nalpha=0; for (i=0; i<256; i++) - alpha[i] = FALSE; + alpha[i] = false; for (i=0; i<image.numColors(); i++) { int alevel = image.color(i) >> 24; if (!alpha[alevel]) { - alpha[alevel] = TRUE; + alpha[alevel] = true; nalpha++; } } @@ -336,13 +336,13 @@ void ImageViewer::openFile() format was unknown it will resize the widget to fit the errorText message (see above) displayed in the current font. - Returns TRUE if the image was successfully loaded. + Returns true if the image was successfully loaded. */ bool ImageViewer::loadImage( const TQString& fileName ) { filename = fileName; - bool ok = FALSE; + bool ok = false; if ( !filename.isEmpty() ) { TQApplication::setOverrideCursor( waitCursor ); // this might take time ok = image.load(filename, 0); @@ -378,9 +378,9 @@ bool ImageViewer::loadImage( const TQString& fileName ) bool ImageViewer::reconvertImage() { - bool success = FALSE; + bool success = false; - if ( image.isNull() ) return FALSE; + if ( image.isNull() ) return false; if ( alloc_context ) { TQColor::destroyAllocContext( alloc_context ); @@ -399,7 +399,7 @@ bool ImageViewer::reconvertImage() pmScaled = TQPixmap(); scale(); resize( width(), height() ); - success = TRUE; // load successful + success = true; // load successful } else { pm.resize(0,0); // couldn't load image } @@ -410,7 +410,7 @@ bool ImageViewer::reconvertImage() if ( useColorContext() ) TQColor::leaveAllocContext(); - return success; // TRUE if loaded OK + return success; // true if loaded OK } bool ImageViewer::smooth() const @@ -485,10 +485,10 @@ bool ImageViewer::convertEvent( TQMouseEvent* e, int& x, int& y) x = nx; y = ny; updateStatus(); - return TRUE; + return true; } } - return FALSE; + return false; } void ImageViewer::mousePressEvent( TQMouseEvent *e ) @@ -510,7 +510,7 @@ void ImageViewer::mouseMoveEvent( TQMouseEvent *e ) if (convertEvent(e,pickx,picky)) { updateStatus(); if ((e->state()&LeftButton)) { - may_be_other = FALSE; + may_be_other = false; if ( clickx >= 0 && other) { copyFrom(other); } @@ -550,7 +550,7 @@ void ImageViewer::giveHelp() helptext += "</blockquote>"; helpmsg = new TQMessageBox( "Help", helptext, - TQMessageBox::Information, TQMessageBox::Ok, 0, 0, 0, 0, FALSE ); + TQMessageBox::Information, TQMessageBox::Ok, 0, 0, 0, 0, false ); } helpmsg->show(); helpmsg->raise(); @@ -582,17 +582,17 @@ ImageViewer* ImageViewer::other = 0; void ImageViewer::hFlip() { - setImage(image.mirror(TRUE,FALSE)); + setImage(image.mirror(true,false)); } void ImageViewer::vFlip() { - setImage(image.mirror(FALSE,TRUE)); + setImage(image.mirror(false,true)); } void ImageViewer::rot180() { - setImage(image.mirror(TRUE,TRUE)); + setImage(image.mirror(true,true)); } void ImageViewer::copy() diff --git a/examples/splitter/splitter.cpp b/examples/splitter/splitter.cpp index 7439800c8..ab29fda89 100644 --- a/examples/splitter/splitter.cpp +++ b/examples/splitter/splitter.cpp @@ -85,10 +85,10 @@ int main( int argc, char ** argv ) #ifdef TQ_WS_QWS // TQt/Embedded XOR drawing not yet implemented. - s1->setOpaqueResize( TRUE ); + s1->setOpaqueResize( true ); #endif - s2->setOpaqueResize( TRUE ); - s3->setOpaqueResize( TRUE ); + s2->setOpaqueResize( true ); + s3->setOpaqueResize( true ); a.setMainWidget( s1 ); s1->setCaption("TQt Example - Splitters"); diff --git a/examples/sql/blob/main.cpp b/examples/sql/blob/main.cpp index 9bb9ea0c4..09f3a4c7a 100644 --- a/examples/sql/blob/main.cpp +++ b/examples/sql/blob/main.cpp @@ -22,7 +22,7 @@ int main( int argc, char ** argv ) { - TQApplication a( argc, argv, FALSE ); + TQApplication a( argc, argv, false ); TQSqlDatabase * db = TQSqlDatabase::addDatabase( DRIVER ); db->setDatabaseName( DATABASE ); db->setUserName( USER ); diff --git a/examples/sql/overview/basicbrowsing/main.cpp b/examples/sql/overview/basicbrowsing/main.cpp index 9244d2a93..d0dce2017 100644 --- a/examples/sql/overview/basicbrowsing/main.cpp +++ b/examples/sql/overview/basicbrowsing/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" ); diff --git a/examples/sql/overview/basicbrowsing2/main.cpp b/examples/sql/overview/basicbrowsing2/main.cpp index 79b2b17db..0e4b60374 100644 --- a/examples/sql/overview/basicbrowsing2/main.cpp +++ b/examples/sql/overview/basicbrowsing2/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" ); diff --git a/examples/sql/overview/basicdatamanip/main.cpp b/examples/sql/overview/basicdatamanip/main.cpp index ed422afa7..7aabc4735 100644 --- a/examples/sql/overview/basicdatamanip/main.cpp +++ b/examples/sql/overview/basicdatamanip/main.cpp @@ -17,7 +17,7 @@ bool createConnections(); int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); int rows = 0; diff --git a/examples/sql/overview/connect1/main.cpp b/examples/sql/overview/connect1/main.cpp index ea958e3ae..1177171ae 100644 --- a/examples/sql/overview/connect1/main.cpp +++ b/examples/sql/overview/connect1/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER ); defaultDB->setDatabaseName( DB_SALES_DBNAME ); diff --git a/examples/sql/overview/connection.cpp b/examples/sql/overview/connection.cpp index bb8654df1..7fc124956 100644 --- a/examples/sql/overview/connection.cpp +++ b/examples/sql/overview/connection.cpp @@ -19,7 +19,7 @@ bool createConnections() defaultDB->setHostName( DB_SALES_HOST ); if ( ! defaultDB->open() ) { tqWarning( "Failed to open sales database: " + defaultDB->lastError().text() ); - return FALSE; + return false; } TQSqlDatabase *oracle = TQSqlDatabase::addDatabase( DB_ORDERS_DRIVER, "ORACLE" ); @@ -29,7 +29,7 @@ bool createConnections() oracle->setHostName( DB_ORDERS_HOST ); if ( ! oracle->open() ) { tqWarning( "Failed to open orders database: " + oracle->lastError().text() ); - return FALSE; + return false; } TQSqlQuery q(TQString::null, defaultDB); @@ -46,5 +46,5 @@ bool createConnections() TQSqlQuery q2(TQString::null, oracle); q2.exec("create table people (id integer primary key, name char(40))"); - return TRUE; + return true; } diff --git a/examples/sql/overview/create_connections/main.cpp b/examples/sql/overview/create_connections/main.cpp index dc1042b7b..a85e1e915 100644 --- a/examples/sql/overview/create_connections/main.cpp +++ b/examples/sql/overview/create_connections/main.cpp @@ -13,7 +13,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { // Databases successfully opened; get pointers to them: diff --git a/examples/sql/overview/custom1/main.cpp b/examples/sql/overview/custom1/main.cpp index adde6e2e3..48c9fcbc0 100644 --- a/examples/sql/overview/custom1/main.cpp +++ b/examples/sql/overview/custom1/main.cpp @@ -60,8 +60,8 @@ FormDialog::FormDialog() grid->activate(); staffCursor = new TQSqlCursor( "staff" ); - staffCursor->setTrimmed( "forename", TRUE ); - staffCursor->setTrimmed( "surname", TRUE ); + staffCursor->setTrimmed( "forename", true ); + staffCursor->setTrimmed( "surname", true ); idIndex = staffCursor->index( "id" ); staffCursor->select( idIndex ); staffCursor->first(); diff --git a/examples/sql/overview/delete/main.cpp b/examples/sql/overview/delete/main.cpp index 9ade50bab..1bed71be8 100644 --- a/examples/sql/overview/delete/main.cpp +++ b/examples/sql/overview/delete/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { TQSqlCursor cur( "prices" ); diff --git a/examples/sql/overview/extract/main.cpp b/examples/sql/overview/extract/main.cpp index 0c47911ce..51c7e2e80 100644 --- a/examples/sql/overview/extract/main.cpp +++ b/examples/sql/overview/extract/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { TQSqlCursor cur( "creditors" ); diff --git a/examples/sql/overview/form2/main.cpp b/examples/sql/overview/form2/main.cpp index 115a27420..151cfbafe 100644 --- a/examples/sql/overview/form2/main.cpp +++ b/examples/sql/overview/form2/main.cpp @@ -12,8 +12,8 @@ FormDialog::FormDialog() : staffCursor( "staff" ) { - staffCursor.setTrimmed( "forename", TRUE ); - staffCursor.setTrimmed( "surname", TRUE ); + staffCursor.setTrimmed( "forename", true ); + staffCursor.setTrimmed( "surname", true ); TQLabel *forenameLabel = new TQLabel( "Forename:", this ); TQLineEdit *forenameEdit = new TQLineEdit( this ); diff --git a/examples/sql/overview/insert/main.cpp b/examples/sql/overview/insert/main.cpp index 0f2c7b866..b43e4d9fa 100644 --- a/examples/sql/overview/insert/main.cpp +++ b/examples/sql/overview/insert/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { int count = 0; diff --git a/examples/sql/overview/insert2/main.cpp b/examples/sql/overview/insert2/main.cpp index 5f5ee6620..2a40dd7ee 100644 --- a/examples/sql/overview/insert2/main.cpp +++ b/examples/sql/overview/insert2/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { TQSqlCursor cur( "prices" ); diff --git a/examples/sql/overview/navigating/main.cpp b/examples/sql/overview/navigating/main.cpp index a2e773c1b..7885592e8 100644 --- a/examples/sql/overview/navigating/main.cpp +++ b/examples/sql/overview/navigating/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { TQSqlQuery query( "SELECT id, name FROM people ORDER BY name" ); diff --git a/examples/sql/overview/order1/main.cpp b/examples/sql/overview/order1/main.cpp index 8c2c48df3..409888db6 100644 --- a/examples/sql/overview/order1/main.cpp +++ b/examples/sql/overview/order1/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { TQSqlCursor cur( "staff" ); diff --git a/examples/sql/overview/order2/main.cpp b/examples/sql/overview/order2/main.cpp index 09c36151b..166b79a38 100644 --- a/examples/sql/overview/order2/main.cpp +++ b/examples/sql/overview/order2/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { TQSqlCursor cur( "staff" ); diff --git a/examples/sql/overview/retrieve1/main.cpp b/examples/sql/overview/retrieve1/main.cpp index 768f870de..8693730ec 100644 --- a/examples/sql/overview/retrieve1/main.cpp +++ b/examples/sql/overview/retrieve1/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { TQSqlQuery query( "SELECT id, surname FROM staff" ); diff --git a/examples/sql/overview/subclass3/main.cpp b/examples/sql/overview/subclass3/main.cpp index 7f6f7f567..170f2267f 100644 --- a/examples/sql/overview/subclass3/main.cpp +++ b/examples/sql/overview/subclass3/main.cpp @@ -15,7 +15,7 @@ InvoiceItemCursor::InvoiceItemCursor() : { TQSqlFieldInfo productName( "productname", TQVariant::String ); append( productName ); - setCalculated( productName.name(), TRUE ); + setCalculated( productName.name(), true ); } diff --git a/examples/sql/overview/subclass4/main.cpp b/examples/sql/overview/subclass4/main.cpp index 0ea60afcb..4e4a6ba08 100644 --- a/examples/sql/overview/subclass4/main.cpp +++ b/examples/sql/overview/subclass4/main.cpp @@ -15,15 +15,15 @@ InvoiceItemCursor::InvoiceItemCursor() : { TQSqlFieldInfo productName( "productname", TQVariant::String ); append( productName ); - setCalculated( productName.name(), TRUE ); + setCalculated( productName.name(), true ); TQSqlFieldInfo productPrice( "price", TQVariant::Double ); append( productPrice ); - setCalculated( productPrice.name(), TRUE ); + setCalculated( productPrice.name(), true ); TQSqlFieldInfo productCost( "cost", TQVariant::Double ); append( productCost ); - setCalculated( productCost.name(), TRUE ); + setCalculated( productCost.name(), true ); } diff --git a/examples/sql/overview/subclass5/main.cpp b/examples/sql/overview/subclass5/main.cpp index afb616f67..b4f3f743b 100644 --- a/examples/sql/overview/subclass5/main.cpp +++ b/examples/sql/overview/subclass5/main.cpp @@ -15,15 +15,15 @@ InvoiceItemCursor::InvoiceItemCursor() : { TQSqlFieldInfo productName( "productname", TQVariant::String ); append( productName ); - setCalculated( productName.name(), TRUE ); + setCalculated( productName.name(), true ); TQSqlFieldInfo productPrice( "price", TQVariant::Double ); append( productPrice ); - setCalculated( productPrice.name(), TRUE ); + setCalculated( productPrice.name(), true ); TQSqlFieldInfo productCost( "cost", TQVariant::Double ); append( productCost ); - setCalculated( productCost.name(), TRUE ); + setCalculated( productCost.name(), true ); } diff --git a/examples/sql/overview/table1/main.cpp b/examples/sql/overview/table1/main.cpp index 118e73f6d..164e6500c 100644 --- a/examples/sql/overview/table1/main.cpp +++ b/examples/sql/overview/table1/main.cpp @@ -19,7 +19,7 @@ int main( int argc, char *argv[] ) if ( createConnections() ) { TQSqlCursor staffCursor( "staff" ); - TQDataTable *staffTable = new TQDataTable( &staffCursor, TRUE ); + TQDataTable *staffTable = new TQDataTable( &staffCursor, true ); app.setMainWidget( staffTable ); staffTable->refresh(); staffTable->show(); diff --git a/examples/sql/overview/table4/main.h b/examples/sql/overview/table4/main.h index 394d34738..3be652963 100644 --- a/examples/sql/overview/table4/main.h +++ b/examples/sql/overview/table4/main.h @@ -36,7 +36,7 @@ class CustomTable : public TQDataTable TQ_OBJECT public: CustomTable( - TQSqlCursor *cursor, bool autoPopulate = FALSE, + TQSqlCursor *cursor, bool autoPopulate = false, TQWidget * parent = 0, const char * name = 0 ) : TQDataTable( cursor, autoPopulate, parent, name ) {} void paintField( diff --git a/examples/sql/overview/update/main.cpp b/examples/sql/overview/update/main.cpp index 905e98107..8e199a7c0 100644 --- a/examples/sql/overview/update/main.cpp +++ b/examples/sql/overview/update/main.cpp @@ -14,7 +14,7 @@ int main( int argc, char *argv[] ) { - TQApplication app( argc, argv, FALSE ); + TQApplication app( argc, argv, false ); if ( createConnections() ) { TQSqlCursor cur( "prices" ); diff --git a/examples/sql/sqltable/main.cpp b/examples/sql/sqltable/main.cpp index 5af04d6c5..8de808b8d 100644 --- a/examples/sql/sqltable/main.cpp +++ b/examples/sql/sqltable/main.cpp @@ -61,7 +61,7 @@ int main( int argc, char ** argv ) TQDataTable table( &cursor ); /* data table uses our cursor */ table.addColumn( "name", "Name" ); table.addColumn( "address", "Address" ); - table.setSorting( TRUE ); + table.setSorting( true ); a.setMainWidget( &table ); table.refresh(); /* load data */ diff --git a/examples/tabdialog/tabdialog.cpp b/examples/tabdialog/tabdialog.cpp index e3cfece57..d4823d612 100644 --- a/examples/tabdialog/tabdialog.cpp +++ b/examples/tabdialog/tabdialog.cpp @@ -38,7 +38,7 @@ void TabDialog::setupTab1() fname->setFocus(); (void)new TQLabel( "Path:", tab1 ); - TQLabel *path = new TQLabel( fileinfo.dirPath( TRUE ), tab1 ); + TQLabel *path = new TQLabel( fileinfo.dirPath( true ), tab1 ); path->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); (void)new TQLabel( "Size:", tab1 ); @@ -66,15 +66,15 @@ void TabDialog::setupTab2() TQCheckBox *readable = new TQCheckBox( "Readable", bg ); if ( fileinfo.isReadable() ) - readable->setChecked( TRUE ); + readable->setChecked( true ); TQCheckBox *writable = new TQCheckBox( "Writeable", bg ); if ( fileinfo.isWritable() ) - writable->setChecked( TRUE ); + writable->setChecked( true ); TQCheckBox *executable = new TQCheckBox( "Executable", bg ); if ( fileinfo.isExecutable() ) - executable->setChecked( TRUE ); + executable->setChecked( true ); TQButtonGroup *bg2 = new TQButtonGroup( 2, TQGroupBox::Horizontal, "Owner", tab2 ); diff --git a/examples/table/bigtable/main.cpp b/examples/table/bigtable/main.cpp index a1226a594..642549604 100644 --- a/examples/table/bigtable/main.cpp +++ b/examples/table/bigtable/main.cpp @@ -19,8 +19,8 @@ class MyTable : public TQTable { public: MyTable( int r, int c ) : TQTable( r, c ) { - items.setAutoDelete( TRUE ); - widgets.setAutoDelete( TRUE ); + items.setAutoDelete( true ); + widgets.setAutoDelete( true ); setCaption( tr( "A 1 Million x 1 Million Cell Table" ) ); setLeftMargin( fontMetrics().width( "W999999W" ) ); } @@ -31,9 +31,9 @@ public: void clearCell( int r, int c ) { items.remove( indexOf( r, c ) ); } void takeItem( TQTableItem *item ) { - items.setAutoDelete( FALSE ); + items.setAutoDelete( false ); items.remove( indexOf( item->row(), item->col() ) ); - items.setAutoDelete( TRUE ); + items.setAutoDelete( true ); } void insertWidget( int r, int c, TQWidget *w ) { widgets.replace( indexOf( r, c ), w ); } TQWidget *cellWidget( int r, int c ) const { return widgets.find( indexOf( r, c ) ); } diff --git a/examples/table/small-table-demo/main.cpp b/examples/table/small-table-demo/main.cpp index 359654507..fa1ec295e 100644 --- a/examples/table/small-table-demo/main.cpp +++ b/examples/table/small-table-demo/main.cpp @@ -33,7 +33,7 @@ int main( int argc, char **argv ) header->setLabel( 0, TQObject::tr( "Tiny" ), 40 ); header->setLabel( 1, TQObject::tr( "Checkboxes" ) ); header->setLabel( 5, TQObject::tr( "Combos" ) ); - table.setColumnMovingEnabled(TRUE); + table.setColumnMovingEnabled(true); TQImage img( qtlogo_xpm ); TQPixmap pix = img.scaleHeight( table.rowHeight(3) ); @@ -44,7 +44,7 @@ int main( int argc, char **argv ) comboEntries << "one" << "two" << "three" << "four"; for ( int i = 0; i < numRows; ++i ){ - TQComboTableItem * item = new TQComboTableItem( &table, comboEntries, FALSE ); + TQComboTableItem * item = new TQComboTableItem( &table, comboEntries, false ); item->setCurrentItem( i % 4 ); table.setItem( i, 5, item ); } diff --git a/examples/table/statistics/statistics.cpp b/examples/table/statistics/statistics.cpp index 7726ba4cb..ab4be3b13 100644 --- a/examples/table/statistics/statistics.cpp +++ b/examples/table/statistics/statistics.cpp @@ -31,7 +31,7 @@ const char* dirs[] = { Table::Table() : TQTable( 10, 100, 0, "table" ) { - setSorting( TRUE ); + setSorting( true ); horizontalHeader()->setLabel( 0, tr( "File" ) ); horizontalHeader()->setLabel( 1, tr( "Size (bytes)" ) ); horizontalHeader()->setLabel( 2, tr( "Use in Sum" ) ); @@ -109,7 +109,7 @@ void Table::sortColumn( int col, bool ascending, bool /*wholeRows*/ ) clearCell( numRows() - 1, 0 ); clearCell( numRows() - 1, 1 ); // do sort - TQTable::sortColumn( col, ascending, TRUE ); + TQTable::sortColumn( col, ascending, true ); // re-insert sum row recalcSum( 0, 1 ); } @@ -133,7 +133,7 @@ ComboItem::ComboItem( TQTable *t, EditType et ) : TQTableItem( t, et, "Yes" ), cb( 0 ) { // we do not want this item to be replaced - setReplaceable( FALSE ); + setReplaceable( false ); } TQWidget *ComboItem::createEditor() const diff --git a/examples/tablet/canvas.cpp b/examples/tablet/canvas.cpp index cd5da7d81..4d07c214c 100644 --- a/examples/tablet/canvas.cpp +++ b/examples/tablet/canvas.cpp @@ -14,12 +14,12 @@ #include <ntqevent.h> #include <ntqrect.h> -const bool no_writing = FALSE; +const bool no_writing = false; Canvas::Canvas( TQWidget *parent, const char *name, WFlags fl ) : TQWidget( parent, name, WStaticContents | fl ), pen( TQt::red, 3 ), polyline(3), - mousePressed( FALSE ), oldPressure( 0 ), saveColor( red ), + mousePressed( false ), oldPressure( 0 ), saveColor( red ), buffer( width(), height() ) { @@ -40,18 +40,18 @@ void Canvas::save( const TQString &filename, const TQString &format ) void Canvas::clearScreen() { buffer.fill( colorGroup().base() ); - repaint( FALSE ); + repaint( false ); } void Canvas::mousePressEvent( TQMouseEvent *e ) { - mousePressed = TRUE; + mousePressed = true; polyline[2] = polyline[1] = polyline[0] = e->pos(); } void Canvas::mouseReleaseEvent( TQMouseEvent * ) { - mousePressed = FALSE; + mousePressed = false; } void Canvas::mouseMoveEvent( TQMouseEvent *e ) @@ -118,11 +118,11 @@ void Canvas::tabletEvent( TQTabletEvent *e ) switch ( e->type() ) { case TQEvent::TabletPress: - mousePressed = TRUE; + mousePressed = true; polyline[2] = polyline[1] = polyline[0] = e->pos(); break; case TQEvent::TabletRelease: - mousePressed = FALSE; + mousePressed = false; break; case TQEvent::TabletMove: if ( mousePressed ) { diff --git a/examples/tablet/scribble.cpp b/examples/tablet/scribble.cpp index 457425073..383c38d52 100644 --- a/examples/tablet/scribble.cpp +++ b/examples/tablet/scribble.cpp @@ -96,14 +96,14 @@ void Scribble::slotSave() { TQPopupMenu *menu = new TQPopupMenu( 0 ); TQIntDict<TQString> formats; - formats.setAutoDelete( TRUE ); + formats.setAutoDelete( true ); for ( unsigned int i = 0; i < TQImageIO::outputFormats().count(); i++ ) { TQString str = TQString( TQImageIO::outputFormats().at( i ) ); formats.insert( menu->insertItem( TQString( "%1..." ).arg( str ) ), new TQString( str ) ); } - menu->setMouseTracking( TRUE ); + menu->setMouseTracking( true ); int id = menu->exec( bSave->mapToGlobal( TQPoint( 0, bSave->height() + 1 ) ) ); if ( id != -1 ) { diff --git a/examples/tablet/tabletstats.cpp b/examples/tablet/tabletstats.cpp index 07bf2d447..79bd2c43d 100644 --- a/examples/tablet/tabletstats.cpp +++ b/examples/tablet/tabletstats.cpp @@ -90,11 +90,11 @@ void StatsCanvas::tabletEvent( TQTabletEvent *e ) switch( e->type() ) { case TQEvent::TabletPress: tqDebug( "Tablet Press" ); - mousePressed = TRUE; + mousePressed = true; break; case TQEvent::TabletRelease: tqDebug( "Tablet Release" ); - mousePressed = FALSE; + mousePressed = false; clearScreen(); break; default: diff --git a/examples/tetrix/gtetrix.cpp b/examples/tetrix/gtetrix.cpp index 92b946b44..325b98dfb 100644 --- a/examples/tetrix/gtetrix.cpp +++ b/examples/tetrix/gtetrix.cpp @@ -24,7 +24,7 @@ GenericTetrix::GenericTetrix(int boardWidth,int boardHeight) board(j,i) = 0; currentLine = -1; // -1 if no falling piece. currentPos = 0; - showNext = 0; // FALSE + showNext = 0; // false nLinesRemoved = 0; nPiecesDropped = 0; score = 0; diff --git a/examples/tetrix/qdragapp.cpp b/examples/tetrix/qdragapp.cpp index 19fc9fec6..ad20d10c6 100644 --- a/examples/tetrix/qdragapp.cpp +++ b/examples/tetrix/qdragapp.cpp @@ -110,7 +110,7 @@ bool TQDragApplication::notify( TQObject *o, TQEvent *e ) if ( dragger && !dragger->notify( o, e ) ) return TQApplication::notify( o, e ); else - return FALSE; + return false; } void DropWindow::paintEvent( TQPaintEvent * ) @@ -131,10 +131,10 @@ void DropWindow::closeEvent( TQCloseEvent *e ) TQDragger::TQDragger() { dragInfo.w = 0; - killingDrop = FALSE; - sendingChild = FALSE; - draggedDict.setAutoDelete( TRUE ); - dropDict .setAutoDelete( TRUE ); + killingDrop = false; + sendingChild = false; + draggedDict.setAutoDelete( true ); + dropDict .setAutoDelete( true ); menu = new TQPopupMenu; menu->insertItem( "Open drop window", 1 ); @@ -160,7 +160,7 @@ TQDragger::~TQDragger() bool TQDragger::notify( TQObject *o, TQEvent *e ) { if ( !o->isWidgetType() || o == menu ) - return FALSE; + return false; switch( e->type() ) { case TQEvent::MouseMove: { @@ -189,7 +189,7 @@ bool TQDragger::notify( TQObject *o, TQEvent *e ) default: break; } - return FALSE; + return false; } bool TQDragger::isParentToDragged( TQWidget *w ) @@ -200,24 +200,24 @@ bool TQDragger::isParentToDragged( TQWidget *w ) while( (tmp = iter.current()) ) { ++iter; if ( tmp->mother == w ) - return TRUE; + return true; } - return FALSE; + return false; } bool TQDragger::noWidgets( TQWidget *w ) { const TQObjectList *l = w->children(); if ( !l ) - return TRUE; + return true; TQObjectListIt iter( *l ); TQObject *tmp; while( (tmp = iter.current()) ) { ++iter; if ( tmp->isWidgetType() ) - return FALSE; + return false; } - return TRUE; + return true; } void TQDragger::sendAllChildrenHome( TQWidget *w ) @@ -248,7 +248,7 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e ) w->parentWidget() == 0 ) { // is top level window hostWidget = w; menu->popup( w->mapToGlobal( e->pos() ) ); - return TRUE; + return true; } if ( !draggedDict.find( (long) w ) ) { DraggedInfo *tmp = new DraggedInfo; @@ -265,9 +265,9 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e ) clickOffset = e->pos(); dragInfo.w = w; TQPoint p = w->mapToGlobal(TQPoint(0,0)); - w->reparent( 0, WType_Popup, p, TRUE ); + w->reparent( 0, WType_Popup, p, true ); - return TRUE; + return true; } case TQEvent::MouseButtonRelease: case TQEvent::MouseMove: { @@ -275,12 +275,12 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e ) TQPoint p = TQCursor::pos() - clickOffset; dragInfo.w->move( p ); if ( e->type() == TQEvent::MouseMove ) - return TRUE; + return true; } else { - return FALSE; + return false; } if ( !dragInfo.w ) - return FALSE; + return false; if ( w != dragInfo.w ) w = dragInfo.w; dragInfo.w = 0; @@ -291,12 +291,12 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e ) TQPoint p; if ( !target ) { target = openDropWindow( TQRect( pos, w->size() ), - FALSE); + false); p = TQPoint( 0, 0 ); } else p = target->mapFromGlobal( pos ); - w->reparent( target, 0, p, TRUE ); + w->reparent( target, 0, p, true ); DropInfo *tmp = dropDict.find( (long) dragInfo.mother ); if ( tmp ) { if ( !tmp->userOpened && noWidgets( tmp->w ) ) @@ -305,9 +305,9 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e ) if ( !target->isVisible() ) target->show(); } - return TRUE; + return true; default: - return FALSE; + return false; } } @@ -317,7 +317,7 @@ bool TQDragger::killDropEvent( TQMouseEvent *e ) case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonPress: clickedWidget = cursorWidget(); - return TRUE; + return true; case TQEvent::MouseButtonRelease: hostWidget->releaseMouse(); if ( clickedWidget ) { @@ -328,13 +328,13 @@ bool TQDragger::killDropEvent( TQMouseEvent *e ) } } grabFinished(); - return TRUE; + return true; case TQEvent::MouseMove: - return TRUE; + return true; default: break; } - return FALSE; + return false; } bool TQDragger::sendChildEvent( TQMouseEvent *e ) @@ -343,7 +343,7 @@ bool TQDragger::sendChildEvent( TQMouseEvent *e ) case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonPress: clickedWidget = cursorWidget(); - return TRUE; + return true; case TQEvent::MouseButtonRelease: hostWidget->releaseMouse(); if ( clickedWidget ) { @@ -359,30 +359,30 @@ bool TQDragger::sendChildEvent( TQMouseEvent *e ) } grabFinished(); } - return TRUE; + return true; case TQEvent::MouseMove: - return TRUE; + return true; default: break; } - return FALSE; + return false; } bool TQDragger::startGrab() { if ( !hostWidget ) - return FALSE; + return false; clickedWidget = 0; cursor = hostWidget->cursor(); hostWidget->grabMouse(); hostWidget->setCursor( TQCursor( CrossCursor ) ); - return TRUE; + return true; } void TQDragger::grabFinished() { - killingDrop = FALSE; - sendingChild = FALSE; + killingDrop = false; + sendingChild = false; if(hostWidget) hostWidget->setCursor( cursor ); } @@ -396,7 +396,7 @@ void TQDragger::closeDropWindow( DropWindow *w ) void TQDragger::openDropWindow() { - TQWidget *tmp = openDropWindow( TQRect(100, 100, 300, 200), TRUE ); + TQWidget *tmp = openDropWindow( TQRect(100, 100, 300, 200), true ); tmp->show(); } @@ -405,10 +405,10 @@ TQWidget *TQDragger::openDropWindow( const TQRect &r, bool user ) DropInfo *tmp = new DropInfo; DropWindow *w = new DropWindow; if ( user ) { - tmp->userOpened = TRUE; + tmp->userOpened = true; w->setCaption( "Drop window" ); } else { - tmp->userOpened = FALSE; + tmp->userOpened = false; w->setCaption( "Auto drop window" ); } tmp->w = w; @@ -422,7 +422,7 @@ TQWidget *TQDragger::openDropWindow( const TQRect &r, bool user ) void TQDragger::killDropWindow() { if ( startGrab() ) - killingDrop = TRUE; + killingDrop = true; } void TQDragger::killDropWindow( DropInfo *di ) @@ -447,7 +447,7 @@ void TQDragger::killDropWindow( DropInfo *di ) void TQDragger::killAllDropWindows() { - killAllDropWindows( FALSE ); + killAllDropWindows( false ); } void TQDragger::killAllDropWindows( bool autoOnly ) @@ -466,13 +466,13 @@ void TQDragger::killAllDropWindows( bool autoOnly ) void TQDragger::sendChildHome( DraggedInfo *i ) { - i->w->reparent( i->mother, 0, i->pos, TRUE ); + i->w->reparent( i->mother, 0, i->pos, true ); } void TQDragger::sendChildHome() { if ( startGrab() ) - sendingChild = TRUE; + sendingChild = true; } void TQDragger::sendAllChildrenHome() @@ -485,7 +485,7 @@ void TQDragger::sendAllChildrenHome() sendChildHome( tmp ); draggedDict.remove( (long) tmp->w ); } - killAllDropWindows( TRUE ); + killAllDropWindows( true ); draggedDict.clear(); } diff --git a/examples/tetrix/qtetrix.cpp b/examples/tetrix/qtetrix.cpp index 84941cbec..1db902399 100644 --- a/examples/tetrix/qtetrix.cpp +++ b/examples/tetrix/qtetrix.cpp @@ -160,7 +160,7 @@ TQTetrix::TQTetrix( TQWidget *parent, const char *name ) startButton->setGeometry( 46, 288, 90, 30 ); quitButton->setGeometry( 370, 265, 90, 30 ); pauseButton->setGeometry( 370, 310, 90, 30 ); - board->revealNextPiece(TRUE); + board->revealNextPiece(true); resize( 550, 370 ); } diff --git a/examples/tetrix/qtetrixb.cpp b/examples/tetrix/qtetrixb.cpp index e3df48d70..7d99393ad 100644 --- a/examples/tetrix/qtetrixb.cpp +++ b/examples/tetrix/qtetrixb.cpp @@ -35,9 +35,9 @@ TQTetrixBoard::TQTetrixBoard( TQWidget *p, const char *name ) blockWidth = 20; yOffset = 30; blockHeight = 20; - noGame = TRUE; - isPaused = FALSE; - waitingAfterLine = FALSE; + noGame = true; + isPaused = false; + waitingAfterLine = false; updateTimeoutTime(); // Sets timeoutTime } @@ -45,7 +45,7 @@ void TQTetrixBoard::startGame(int gameType,int fillRandomLines) { if ( isPaused ) return; // ignore if game is paused - noGame = FALSE; + noGame = false; GenericTetrix::startGame( gameType, fillRandomLines ); // Note that the timer is started by updateLevel! } @@ -92,7 +92,7 @@ void TQTetrixBoard::drawSquare(int x,int y,int value) tc = colors[value-1].light(); bc = colors[value-1].dark(); p->drawShadePanel( X, Y, blockWidth, blockHeight, - tc, bc, 1, colors[value-1], TRUE ); + tc, bc, 1, colors[value-1], true ); } else p->fillRect( X, Y, blockWidth, blockHeight, backgroundColor() ); @@ -114,7 +114,7 @@ void TQTetrixBoard::updateRemoved( int noOfLines ) if ( noOfLines > 0 ) { timer->stop(); timer->start( waitAfterLineTime ); - waitingAfterLine = TRUE; + waitingAfterLine = true; } emit updateRemovedSignal( noOfLines ); } @@ -142,7 +142,7 @@ void TQTetrixBoard::pieceDropped(int) void TQTetrixBoard::gameOver() { timer->stop(); - noGame = TRUE; + noGame = true; emit gameOverSignal(); } @@ -150,7 +150,7 @@ void TQTetrixBoard::timeout() { if ( waitingAfterLine ) { timer->stop(); - waitingAfterLine = FALSE; + waitingAfterLine = false; newPiece(); timer->start( timeoutTime ); } else { @@ -192,7 +192,7 @@ void TQTetrixBoard::drawContents( TQPainter *p ) if (y2 >= boardHeight()) y2 = boardHeight() - 1; - updateBoard( x1, y1, x2, y2, TRUE ); + updateBoard( x1, y1, x2, y2, true ); paint = 0; // reset widget painter return; } diff --git a/examples/textedit/textedit.cpp b/examples/textedit/textedit.cpp index fdc6402f6..6ba56ca13 100644 --- a/examples/textedit/textedit.cpp +++ b/examples/textedit/textedit.cpp @@ -123,14 +123,14 @@ void TextEdit::setupTextActions() TQPopupMenu *menu = new TQPopupMenu( this ); menuBar()->insertItem( tr( "F&ormat" ), menu ); - comboFont = new TQComboBox( TRUE, tb ); + comboFont = new TQComboBox( true, tb ); TQFontDatabase db; comboFont->insertStringList( db.families() ); connect( comboFont, TQ_SIGNAL( activated( const TQString & ) ), this, TQ_SLOT( textFamily( const TQString & ) ) ); comboFont->lineEdit()->setText( TQApplication::font().family() ); - comboSize = new TQComboBox( TRUE, tb ); + comboSize = new TQComboBox( true, tb ); TQValueList<int> sizes = db.standardSizes(); TQValueList<int>::Iterator it = sizes.begin(); for ( ; it != sizes.end(); ++it ) @@ -143,30 +143,30 @@ void TextEdit::setupTextActions() connect( actionTextBold, TQ_SIGNAL( activated() ), this, TQ_SLOT( textBold() ) ); actionTextBold->addTo( tb ); actionTextBold->addTo( menu ); - actionTextBold->setToggleAction( TRUE ); + actionTextBold->setToggleAction( true ); actionTextItalic = new TQAction( TQPixmap::fromMimeSource( "textitalic.xpm" ), tr( "&Italic" ), CTRL + Key_I, this, "textItalic" ); connect( actionTextItalic, TQ_SIGNAL( activated() ), this, TQ_SLOT( textItalic() ) ); actionTextItalic->addTo( tb ); actionTextItalic->addTo( menu ); - actionTextItalic->setToggleAction( TRUE ); + actionTextItalic->setToggleAction( true ); actionTextUnderline = new TQAction( TQPixmap::fromMimeSource( "textunder.xpm" ), tr( "&Underline" ), CTRL + Key_U, this, "textUnderline" ); connect( actionTextUnderline, TQ_SIGNAL( activated() ), this, TQ_SLOT( textUnderline() ) ); actionTextUnderline->addTo( tb ); actionTextUnderline->addTo( menu ); - actionTextUnderline->setToggleAction( TRUE ); + actionTextUnderline->setToggleAction( true ); menu->insertSeparator(); TQActionGroup *grp = new TQActionGroup( this ); connect( grp, TQ_SIGNAL( selected( TQAction* ) ), this, TQ_SLOT( textAlign( TQAction* ) ) ); actionAlignLeft = new TQAction( TQPixmap::fromMimeSource( "textleft.xpm" ), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" ); - actionAlignLeft->setToggleAction( TRUE ); + actionAlignLeft->setToggleAction( true ); actionAlignCenter = new TQAction( TQPixmap::fromMimeSource( "textcenter.xpm" ), tr( "C&enter" ), CTRL + Key_E, grp, "textCenter" ); - actionAlignCenter->setToggleAction( TRUE ); + actionAlignCenter->setToggleAction( true ); actionAlignRight = new TQAction( TQPixmap::fromMimeSource( "textright.xpm" ), tr( "&Right" ), CTRL + Key_R, grp, "textRight" ); - actionAlignRight->setToggleAction( TRUE ); + actionAlignRight->setToggleAction( true ); actionAlignJustify = new TQAction( TQPixmap::fromMimeSource( "textjustify.xpm" ), tr( "&Justify" ), CTRL + Key_J, grp, "textjustify" ); - actionAlignJustify->setToggleAction( TRUE ); + actionAlignJustify->setToggleAction( true ); grp->addTo( tb ); grp->addTo( menu ); @@ -271,7 +271,7 @@ void TextEdit::filePrint() return; #ifndef TQT_NO_PRINTER TQPrinter printer( TQPrinter::HighResolution ); - printer.setFullPage(TRUE); + printer.setFullPage(true); if ( printer.setup( this ) ) { TQPainter p( &printer ); // Check that there is a valid device to print to. @@ -301,7 +301,7 @@ void TextEdit::filePrint() break; printer.newPage(); page++; - } while (TRUE); + } while (true); } #endif } @@ -436,13 +436,13 @@ void TextEdit::colorChanged( const TQColor &c ) void TextEdit::alignmentChanged( int a ) { if ( ( a == AlignAuto ) || ( a & AlignLeft )) - actionAlignLeft->setOn( TRUE ); + actionAlignLeft->setOn( true ); else if ( ( a & AlignHCenter ) ) - actionAlignCenter->setOn( TRUE ); + actionAlignCenter->setOn( true ); else if ( ( a & AlignRight ) ) - actionAlignRight->setOn( TRUE ); + actionAlignRight->setOn( true ); else if ( ( a & AlignJustify ) ) - actionAlignJustify->setOn( TRUE ); + actionAlignJustify->setOn( true ); } void TextEdit::editorChanged( TQWidget * ) diff --git a/examples/themes/metal.cpp b/examples/themes/metal.cpp index ee3b57d12..26b1bded0 100644 --- a/examples/themes/metal.cpp +++ b/examples/themes/metal.cpp @@ -49,10 +49,10 @@ void MetalStyle::applicationPolish( const TQStyleControlElementData &ceData, Con // pixmaps here and apply to it all widgets TQFont f("times", ceData.font.pointSize() ); - f.setBold( TRUE ); - f.setItalic( TRUE ); - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, TRUE, "TQMenuBar")); - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, TRUE, "TQPopupMenu")); + f.setBold( true ); + f.setItalic( true ); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, true, "TQMenuBar")); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, true, "TQPopupMenu")); // TQPixmap button( stonedark_xpm ); @@ -93,7 +93,7 @@ void MetalStyle::applicationPolish( const TQStyleControlElementData &ceData, Con ); TQPalette newPalette( active, disabled, active ); - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(newPalette, TRUE)); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(newPalette, true)); } /*! @@ -101,8 +101,8 @@ void MetalStyle::applicationPolish( const TQStyleControlElementData &ceData, Con */ void MetalStyle::applicationUnPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, TRUE)); - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(ceData.font, TRUE)); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, true)); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(ceData.font, true)); } /*! @@ -160,7 +160,7 @@ void MetalStyle::drawPrimitive( PrimitiveElement pe, case PE_ButtonCommand: drawMetalButton( p, r.x(), r.y(), r.width(), r.height(), (flags & (Style_Sunken|Style_On|Style_Down)), - TRUE, !(flags & Style_Raised) ); + true, !(flags & Style_Raised) ); break; case PE_PanelMenuBar: drawMetalFrame( p, r.x(), r.y(), r.width(), r.height() ); @@ -180,7 +180,7 @@ void MetalStyle::drawPrimitive( PrimitiveElement pe, case PE_ScrollBarSlider: - drawMetalButton( p, r.x(), r.y(), r.width(), r.height(), FALSE, + drawMetalButton( p, r.x(), r.y(), r.width(), r.height(), false, flags & Style_Horizontal ); break; default: @@ -312,17 +312,17 @@ void MetalStyle::drawComplexControl( ComplexControl cc, SC_SliderGroove, subActive, opt, widget ); if ( (sub & SC_SliderHandle) && handle.isValid() ) drawMetalButton( p, handle.x(), handle.y(), handle.width(), - handle.height(), FALSE, + handle.height(), false, ceData.orientation == TQSlider::Horizontal); break; } case CC_ComboBox: { - qDrawWinPanel( p, r.x(), r.y(), r.width(), r.height(), cg, TRUE, + qDrawWinPanel( p, r.x(), r.y(), r.width(), r.height(), cg, true, (elementFlags & CEF_IsEnabled) ? &cg.brush( TQColorGroup::Base ) : &cg.brush( TQColorGroup::Background ) ); drawMetalButton( p, r.x() + r.width() - 2 - 16, r.y() + 2, 16, r.height() - 4, - how & Style_Sunken, TRUE ); + how & Style_Sunken, true ); drawPrimitive( PE_ArrowDown, p, ceData, elementFlags, TQRect( r.x() + r.width() - 2 - 16 + 2, r.y() + 2 + 2, 16 - 4, r.height() - 4 -4 ), @@ -340,8 +340,8 @@ void MetalStyle::drawComplexControl( ComplexControl cc, /*! - Draw a metallic button, sunken if \a sunken is TRUE, horizontal if - /a horz is TRUE. + Draw a metallic button, sunken if \a sunken is true, horizontal if + /a horz is true. */ void MetalStyle::drawMetalButton( TQPainter *p, int x, int y, int w, int h, diff --git a/examples/themes/metal.h b/examples/themes/metal.h index 7838bd1c5..fb6fc943e 100644 --- a/examples/themes/metal.h +++ b/examples/themes/metal.h @@ -67,9 +67,9 @@ public: private: void drawMetalFrame( TQPainter *p, int x, int y, int w, int h ) const; void drawMetalGradient( TQPainter *p, int x, int y, int w, int h, - bool sunken, bool horz, bool flat=FALSE ) const; + bool sunken, bool horz, bool flat=false ) const; void drawMetalButton( TQPainter *p, int x, int y, int w, int h, - bool sunken, bool horz, bool flat=FALSE ) const; + bool sunken, bool horz, bool flat=false ) const; TQPalette oldPalette; }; diff --git a/examples/themes/themes.cpp b/examples/themes/themes.cpp index 7eee9c990..82f6322d9 100644 --- a/examples/themes/themes.cpp +++ b/examples/themes/themes.cpp @@ -50,12 +50,12 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f ) setCentralWidget( tabwidget ); TQPopupMenu *style = new TQPopupMenu( this ); - style->setCheckable( TRUE ); + style->setCheckable( true ); menuBar()->insertItem( "&Style" , style ); - style->setCheckable( TRUE ); + style->setCheckable( true ); TQActionGroup *ag = new TQActionGroup( this, 0 ); - ag->setExclusive( TRUE ); + ag->setExclusive( true ); TQSignalMapper *styleMapper = new TQSignalMapper( this ); connect( styleMapper, TQ_SIGNAL( mapped( const TQString& ) ), this, TQ_SLOT( makeStyle( const TQString& ) ) ); TQStringList list = TQStyleFactory::keys(); @@ -64,7 +64,7 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f ) list.insert(list.begin(), "Norwegian Wood"); list.insert(list.begin(), "Metal"); #endif - TQDict<int> stylesDict( 17, FALSE ); + TQDict<int> stylesDict( 17, false ); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { TQString styleStr = *it; TQString styleAccel = styleStr; @@ -113,10 +113,10 @@ void Themes::makeStyle(const TQString &style) tqApp->setStyle(style); if(style == "Platinum") { TQPalette p( TQColor( 239, 239, 239 ) ); - tqApp->setPalette( p, TRUE ); - tqApp->setFont( appFont, TRUE ); + tqApp->setPalette( p, true ); + tqApp->setFont( appFont, true ); } else if(style == "Windows") { - tqApp->setFont( appFont, TRUE ); + tqApp->setFont( appFont, true ); } else if(style == "CDE") { TQPalette p( TQColor( 75, 123, 130 ) ); p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); @@ -137,12 +137,12 @@ void Themes::makeStyle(const TQString &style) p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray ); p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray ); p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray ); - tqApp->setPalette( p, TRUE ); - tqApp->setFont( TQFont( "times", appFont.pointSize() ), TRUE ); + tqApp->setPalette( p, true ); + tqApp->setFont( TQFont( "times", appFont.pointSize() ), true ); } else if(style == "Motif" || style == "MotifPlus") { TQPalette p( TQColor( 192, 192, 192 ) ); - tqApp->setPalette( p, TRUE ); - tqApp->setFont( appFont, TRUE ); + tqApp->setPalette( p, true ); + tqApp->setFont( appFont, true ); } } } diff --git a/examples/themes/wood.cpp b/examples/themes/wood.cpp index b9cf6cda3..d5135b8ab 100644 --- a/examples/themes/wood.cpp +++ b/examples/themes/wood.cpp @@ -868,12 +868,12 @@ void NorwegianWoodStyle::applicationPolish( const TQStyleControlElementData &ceD TQBrush(op.disabled().background(), background) ); - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(TQPalette(active, disabled, active), TRUE)); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(TQPalette(active, disabled, active), true)); } void NorwegianWoodStyle::applicationUnPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) { - applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, TRUE)); + applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, true)); } /*! @@ -960,7 +960,7 @@ void NorwegianWoodStyle::drawPrimitive( PrimitiveElement pe, p->fillRect( r, (flags & Style_Sunken ? TQBrush( cg.light(), *sunkenLight) : cg.brush( TQColorGroup::Dark ) ) ); } p->setClipRegion( internR ); - p->setClipping( FALSE ); + p->setClipping( false ); p->setPen( cg.foreground() ); drawroundrect( p, x, y, w, h, d ); p->setPen( oldPen ); @@ -1155,7 +1155,7 @@ void NorwegianWoodStyle::drawComplexControl( ComplexControl cc, if ( elementFlags & CEF_IsEditable ) { TQRect r( querySubControlMetrics(CC_ComboBox, ceData, elementFlags, SC_ComboBoxEditField, opt, widget) ); - qDrawShadePanel( p, r, cg, TRUE, 1, + qDrawShadePanel( p, r, cg, true, 1, &cg.brush(TQColorGroup::Button) ); } diff --git a/examples/thread/prodcons/prodcons.cpp b/examples/thread/prodcons/prodcons.cpp index 23004dfd6..a018da751 100644 --- a/examples/thread/prodcons/prodcons.cpp +++ b/examples/thread/prodcons/prodcons.cpp @@ -58,7 +58,7 @@ private: ProdThread::ProdThread(TQObject *r, TQMutex *m, TQWaitCondition *c) - : receiver(r), mutex(m), condition(c), done(FALSE) + : receiver(r), mutex(m), condition(c), done(false) { } @@ -66,15 +66,15 @@ ProdThread::ProdThread(TQObject *r, TQMutex *m, TQWaitCondition *c) void ProdThread::stop() { mutex->lock(); - done = TRUE; + done = true; mutex->unlock(); } void ProdThread::run() { - bool stop = FALSE; - done = FALSE; + bool stop = false; + done = false; uchar *buffer = new uchar[BUFSIZE]; int pos = 0, oldpos = 0; @@ -94,7 +94,7 @@ void ProdThread::run() mutex->lock(); if (pos == BUFSIZE) { - done = TRUE; + done = true; } while (! bytearray.isNull() && ! stop) { @@ -159,7 +159,7 @@ private: ConsThread::ConsThread(TQObject *r, TQMutex *m, TQWaitCondition *c) - : receiver(r), mutex(m), condition(c), done(FALSE) + : receiver(r), mutex(m), condition(c), done(false) { } @@ -167,15 +167,15 @@ ConsThread::ConsThread(TQObject *r, TQMutex *m, TQWaitCondition *c) void ConsThread::stop() { mutex->lock(); - done = TRUE; + done = true; mutex->unlock(); } void ConsThread::run() { - bool stop = FALSE; - done = FALSE; + bool stop = false; + done = false; TQFile file("prodcons.out"); file.open(IO_WriteOnly); @@ -251,17 +251,17 @@ private: ProdCons::ProdCons() : TQWidget(0, "producer consumer widget"), - prod(0), cons(0), stopped(FALSE), redraw(TRUE) + prod(0), cons(0), stopped(false), redraw(true) { startbutton = new TQPushButton("&Start", this); connect(startbutton, TQ_SIGNAL(clicked()), TQ_SLOT(go())); stopbutton = new TQPushButton("S&top", this); connect(stopbutton, TQ_SIGNAL(clicked()), TQ_SLOT(stop())); - stopbutton->setEnabled(FALSE); + stopbutton->setEnabled(false); loopcheckbox = new TQCheckBox("Loop", this); - loopcheckbox->setChecked(FALSE); + loopcheckbox->setChecked(false); prodbar = new TQProgressBar(BUFSIZE, this); consbar = new TQProgressBar(BUFSIZE, this); @@ -297,13 +297,13 @@ ProdCons::~ProdCons() void ProdCons::go() { - stopped = FALSE; + stopped = false; mutex.lock(); if ( redraw ) { - startbutton->setEnabled(FALSE); - stopbutton->setEnabled(TRUE); + startbutton->setEnabled(false); + stopbutton->setEnabled(true); } // start the consumer first @@ -337,11 +337,11 @@ void ProdCons::stop() if ( redraw ) { // no point in repainting these buttons so many times is we are looping... - startbutton->setEnabled(TRUE); - stopbutton->setEnabled(FALSE); + startbutton->setEnabled(true); + stopbutton->setEnabled(false); } - stopped = TRUE; + stopped = true; } diff --git a/examples/thread/semaphores/main.cpp b/examples/thread/semaphores/main.cpp index 913b75dc0..a56dce146 100644 --- a/examples/thread/semaphores/main.cpp +++ b/examples/thread/semaphores/main.cpp @@ -29,7 +29,7 @@ class YellowThread : public TQThread { public: YellowThread(TQWidget *o) - : receiver(o), stopped(FALSE) + : receiver(o), stopped(false) { ; } void run(); @@ -57,7 +57,7 @@ void YellowThread::run() mutex.lock(); if (stopped) { - stopped = FALSE; + stopped = false; mutex.unlock(); break; } @@ -76,7 +76,7 @@ void YellowThread::run() void YellowThread::stop() { mutex.lock(); - stopped = TRUE; + stopped = true; mutex.unlock(); } @@ -85,7 +85,7 @@ class GreenThread: public TQThread { public: GreenThread(TQWidget *o) - : receiver(o), stopped( FALSE ) + : receiver(o), stopped( false ) { ; } void run(); @@ -113,7 +113,7 @@ void GreenThread::run() mutex.lock(); if (stopped) { - stopped = FALSE; + stopped = false; mutex.unlock(); break; } @@ -133,7 +133,7 @@ void GreenThread::run() void GreenThread::stop() { mutex.lock(); - stopped = TRUE; + stopped = true; mutex.unlock(); } diff --git a/examples/tictac/tictac.cpp b/examples/tictac/tictac.cpp index 988df2385..2cc14a28f 100644 --- a/examples/tictac/tictac.cpp +++ b/examples/tictac/tictac.cpp @@ -64,7 +64,7 @@ TicTacGameBoard::TicTacGameBoard( int n, TQWidget *parent, const char *name ) st = Init; // initial state nBoard = n; n *= n; // make square - comp_starts = FALSE; // human starts + comp_starts = false; // human starts buttons = new TicTacButtons(n); // create real buttons btArray = new TicTacArray(n); // create button model TQGridLayout * grid = new TQGridLayout( this, nBoard, nBoard, 4 ); @@ -72,7 +72,7 @@ TicTacGameBoard::TicTacGameBoard( int n, TQWidget *parent, const char *name ) for ( int i=0; i<n; i++ ) { // create and connect buttons TicTacButton *ttb = new TicTacButton( this ); ttb->setPalette( p ); - ttb->setEnabled( FALSE ); + ttb->setEnabled( false ); connect( ttb, TQ_SIGNAL(clicked()), TQ_SLOT(buttonClicked()) ); grid->addWidget( ttb, i%nBoard, i/nBoard ); buttons->insert( i, ttb ); @@ -92,7 +92,7 @@ TicTacGameBoard::~TicTacGameBoard() // -------------------------------------------------------------------------- // TicTacGameBoard::computerStarts( bool v ) // -// Computer starts if v=TRUE. The human starts by default. +// Computer starts if v=true. The human starts by default. // void TicTacGameBoard::computerStarts( bool v ) @@ -178,7 +178,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a ) { int t = 0; int row, col; - bool won = FALSE; + bool won = false; for ( row=0; row<nBoard && !won; row++ ) { // check horizontal t = a->at(row*nBoard); if ( t == TicTacButton::Blank ) @@ -187,7 +187,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a ) while ( col<nBoard && a->at(row*nBoard+col) == t ) col++; if ( col == nBoard ) - won = TRUE; + won = true; } for ( col=0; col<nBoard && !won; col++ ) { // check vertical t = a->at(col); @@ -197,7 +197,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a ) while ( row<nBoard && a->at(row*nBoard+col) == t ) row++; if ( row == nBoard ) - won = TRUE; + won = true; } if ( !won ) { // check diagonal top left t = a->at(0); // to bottom right @@ -206,7 +206,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a ) while ( i<nBoard && a->at(i*nBoard+i) == t ) i++; if ( i == nBoard ) - won = TRUE; + won = true; } } if ( !won ) { // check diagonal bottom left @@ -219,7 +219,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a ) i++; j--; } if ( i == nBoard ) - won = TRUE; + won = true; } } if ( !won ) // no winner diff --git a/examples/toplevel/options.ui.h b/examples/toplevel/options.ui.h index 5e68c55e3..225b3ca25 100644 --- a/examples/toplevel/options.ui.h +++ b/examples/toplevel/options.ui.h @@ -81,7 +81,7 @@ void OptionsDialog::apply() connect( okButton, TQ_SIGNAL(clicked()), widget, TQ_SLOT(close()) ); widget->move( pos() ); } else { - widget->reparent( parent, f, widget->geometry().topLeft(), FALSE); + widget->reparent( parent, f, widget->geometry().topLeft(), false); } widget->setCaption( leCaption->text() ); diff --git a/examples/widgets/main.cpp b/examples/widgets/main.cpp index 6d7c217d6..ea9e7a06a 100644 --- a/examples/widgets/main.cpp +++ b/examples/widgets/main.cpp @@ -18,7 +18,7 @@ public: MyWidgetView( TQWidget *parent=0, const char *name=0 ) :WidgetView(parent, name), s(0) { - setToolBarsMovable( TRUE ); + setToolBarsMovable( true ); } void button1Clicked() diff --git a/examples/widgets/widgets.cpp b/examples/widgets/widgets.cpp index 860e6dd45..0f7822958 100644 --- a/examples/widgets/widgets.cpp +++ b/examples/widgets/widgets.cpp @@ -177,7 +177,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) menuBar()->insertItem( "&File", popup ); int id; id = popup->insertItem( "&New" ); - popup->setItemEnabled( id, FALSE ); + popup->setItemEnabled( id, false ); id = popup->insertItem( openIcon, "&Open...", this, TQ_SLOT( open() ) ); popup->insertSeparator(); @@ -191,27 +191,27 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) popup->insertSeparator(); TQFont f = font(); - f.setBold( TRUE ); + f.setBold( true ); id = popup->insertItem( new MyMenuItem( "&Bold", f ) ); popup->setAccel( CTRL+Key_B, id ); f = font(); - f.setItalic( TRUE ); + f.setItalic( true ); id = popup->insertItem( new MyMenuItem( "&Italic", f ) ); - popup->setItemChecked( id, TRUE ); + popup->setItemChecked( id, true ); popup->setAccel( CTRL+Key_I, id ); f = font(); - f.setUnderline( TRUE ); + f.setUnderline( true ); id = popup->insertItem( new MyMenuItem( "&Underline", f ) ); popup->setAccel( CTRL+Key_U, id ); f = font(); - f.setStrikeOut( TRUE ); + f.setStrikeOut( true ); id = popup->insertItem( new MyMenuItem( "&Strike", f ) ); connect( textStylePopup, TQ_SIGNAL(activated(int)), this, TQ_SLOT(popupSelected(int)) ); // Create an analog and a digital clock AnalogClock *aclock = new AnalogClock( central ); - aclock->setAutoMask( TRUE ); + aclock->setAutoMask( true ); DigitalClock *dclock = new DigitalClock( central ); dclock->setMaximumWidth(200); grid->addWidget( aclock, 0, 2 ); @@ -298,7 +298,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) vbox->addSpacing( bg->fontMetrics().height() ); rb = new TQRadioButton( bg ); rb->setText( "&AM" ); - rb->setChecked( TRUE ); + rb->setChecked( true ); vbox->addWidget(rb); TQToolTip::add( rb, "radio button 1" ); rb = new TQRadioButton( bg ); @@ -344,7 +344,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) "The tick marks are optional." " This slider controls the speed of the movie." ); // Create a combo box - TQComboBox *combo = new TQComboBox( FALSE, central, "comboBox" ); + TQComboBox *combo = new TQComboBox( false, central, "comboBox" ); combo->insertItem( "darkBlue" ); combo->insertItem( "darkRed" ); combo->insertItem( "darkGreen" ); @@ -356,7 +356,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) TQToolTip::add( combo, "read-only combo box" ); // Create an editable combo box - TQComboBox *edCombo = new TQComboBox( TRUE, central, "edComboBox" ); + TQComboBox *edCombo = new TQComboBox( true, central, "edComboBox" ); TQListBox *edComboLst = new TQListBox(this); edCombo->setListBox(edComboLst); edComboLst->insertItem( "Permutable" ); @@ -369,7 +369,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) this, TQ_SLOT(edComboBoxItemActivated(const TQString&)) ); TQToolTip::add( edCombo, "editable combo box" ); - edCombo->setAutoCompletion( TRUE ); + edCombo->setAutoCompletion( true ); vbox = new TQVBoxLayout(8); grid->addLayout( vbox, 2, 2 ); @@ -450,7 +450,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) TQSplitter *split = new TQSplitter( Vertical, central, "splitter" ); - split->setOpaqueResize( TRUE ); + split->setOpaqueResize( true ); topLayout->addWidget( split, 1 ); TQListView *lv = new MyListView( split ); connect(lv, TQ_SIGNAL(selectionChanged() ), @@ -463,13 +463,13 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) this, TQ_SLOT( mySelectionChanged(TQListViewItem*) ) ); lv->addColumn( "One" ); lv->addColumn( "Two" ); - lv->setAllColumnsShowFocus( TRUE ); + lv->setAllColumnsShowFocus( true ); TQListViewItem *lvi= new TQListViewItem( lv, "Text", "Text" ); lvi= new TQListViewItem( lv, "Text", "Other Text" ); lvi= new TQListViewItem( lv, "Text", "More Text" ); lvi= new TQListViewItem( lv, "Text", "Extra Text" ); - lvi->setOpen(TRUE); + lvi->setOpen(true); (void)new TQListViewItem( lvi, "SubText", "Additional Text" ); lvi= new TQListViewItem( lvi, "SubText", "Side Text" ); lvi= new TQListViewItem( lvi, "SubSubText", "Complimentary Text" ); @@ -491,7 +491,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name ) TQCheckListItem *lit = new TQCheckListItem( lv, "Cheese" ); - lit->setOpen( TRUE ); + lit->setOpen( true ); (void) new TQCheckListItem( lit, "Cheddar", TQCheckListItem::RadioButton ); (void) new TQCheckListItem( lit, "Mozarella", TQCheckListItem::RadioButton ); (void) new TQCheckListItem( lit, "Jarlsberg", TQCheckListItem::RadioButton ); @@ -576,10 +576,10 @@ void WidgetView::popupSelected( int selectedId ) if ( selectedId == plainStyleID ) { for ( int i = 0; i < int(textStylePopup->count()); i++ ) { int id = textStylePopup->idAt( i ); - textStylePopup->setItemChecked( id, FALSE); + textStylePopup->setItemChecked( id, false); } } else { - textStylePopup->setItemChecked( selectedId, TRUE ); + textStylePopup->setItemChecked( selectedId, true ); } } @@ -679,7 +679,7 @@ void WidgetView::spinBoxValueChanged( const TQString& valueText ) bool WidgetView::eventFilter( TQObject *obj, TQEvent *event ) { - static bool identify_now = TRUE; + static bool identify_now = true; if ( event->type() == TQEvent::MouseButtonPress && identify_now ) { TQMouseEvent *e = (TQMouseEvent*)event; if ( e->button() == TQMouseEvent::RightButton && @@ -691,9 +691,9 @@ bool WidgetView::eventFilter( TQObject *obj, TQEvent *event ) str += obj->name(); else str += "<no name>"; - identify_now = FALSE; // don't do it in message box + identify_now = false; // don't do it in message box TQMessageBox::information( (TQWidget*)obj, "Identify Widget", str ); - identify_now = TRUE; // allow it again + identify_now = true; // allow it again } } return TQMainWindow::eventFilter( obj, event ); // don't eat event @@ -739,9 +739,9 @@ void WidgetView::showProperties() output.sprintf( "Properties for class '%s'", tqApp->focusWidget()->className() ); int i = 0; - while( i < (int) tqApp->focusWidget()->metaObject()->numProperties( TRUE ) ) { + while( i < (int) tqApp->focusWidget()->metaObject()->numProperties( true ) ) { const TQMetaProperty* p - = tqApp->focusWidget()->metaObject()->property( i, TRUE ); + = tqApp->focusWidget()->metaObject()->property( i, true ); TQCString tmp; tmp.sprintf( "\n %2d: %s (read-%s, %s)", ++i, p->name(), p->writable() ? "write" : "only", p->type() ); diff --git a/examples/wizard/wizard.cpp b/examples/wizard/wizard.cpp index 40cb686a8..47c338850 100644 --- a/examples/wizard/wizard.cpp +++ b/examples/wizard/wizard.cpp @@ -19,7 +19,7 @@ #include <ntqapplication.h> Wizard::Wizard( TQWidget *parent, const char *name ) - : TQWizard( parent, name, TRUE ) + : TQWizard( parent, name, true ) { setupPage1(); setupPage2(); @@ -57,8 +57,8 @@ void Wizard::setupPage1() addPage( page1, "Personal Key" ); - setNextEnabled( page1, FALSE ); - setHelpEnabled( page1, FALSE ); + setNextEnabled( page1, false ); + setHelpEnabled( page1, false ); } void Wizard::setupPage2() @@ -117,7 +117,7 @@ void Wizard::setupPage2() addPage( page2, "Personal Data" ); - setHelpEnabled( page2, FALSE ); + setHelpEnabled( page2, false ); } void Wizard::setupPage3() @@ -176,8 +176,8 @@ void Wizard::setupPage3() addPage( page3, "Finish" ); - setFinishEnabled( page3, TRUE ); - setHelpEnabled( page3, FALSE ); + setFinishEnabled( page3, true ); + setHelpEnabled( page3, false ); } void Wizard::showPage( TQWidget* page ) @@ -202,7 +202,7 @@ void Wizard::showPage( TQWidget* page ) dataChanged( firstName->text() ); firstName->setFocus(); } else if ( page == page3 ) { - finishButton()->setEnabled( TRUE ); + finishButton()->setEnabled( true ); finishButton()->setFocus(); } } @@ -220,7 +220,7 @@ void Wizard::dataChanged( const TQString & ) if ( !firstName->text().isEmpty() && !lastName->text().isEmpty() && !email->text().isEmpty() ) - nextButton()->setEnabled( TRUE ); + nextButton()->setEnabled( true ); else - nextButton()->setEnabled( FALSE ); + nextButton()->setEnabled( false ); } diff --git a/examples/xform/xform.cpp b/examples/xform/xform.cpp index 60f73402b..8133e8980 100644 --- a/examples/xform/xform.cpp +++ b/examples/xform/xform.cpp @@ -162,7 +162,7 @@ XFormControl::XFormControl( const TQFont &initialFont, bg->insert(rb_pic,2); rb_txt->setText( tr("Text") ); rb_img->setText( tr("Image") ); - rb_img->setChecked(TRUE); + rb_img->setChecked(true); rb_pic->setText( tr("Picture") ); connect( bg, TQ_SIGNAL(clicked(int)), TQ_SLOT(changeMode(int)) ); @@ -279,13 +279,13 @@ void XFormControl::changeMode(int m) newMtx(); if ( mode == Text ) { optionals->raiseWidget(0); - rb_txt->setChecked(TRUE); + rb_txt->setChecked(true); } else { optionals->raiseWidget(1); if ( mode == Image ) - rb_img->setChecked(TRUE); + rb_img->setChecked(true); else - rb_pic->setChecked(TRUE); + rb_pic->setChecked(true); } tqApp->flushX(); } @@ -447,20 +447,20 @@ private: void XFormCenter::newMode( int m ) { - static bool first_i = TRUE; - static bool first_p = TRUE; + static bool first_i = true; + static bool first_p = true; if ( sx->mode() == m ) return; if ( m == Image && first_i ) { - first_i = FALSE; + first_i = false; TQPixmap pm; if ( pm.load( "image.any" ) ) sx->setPixmap( pm ); return; } if ( m == Picture && first_p ) { - first_p = FALSE; + first_p = false; TQPicture p; if (p.load( "picture.any" )) sx->setPicture( p ); diff --git a/examples/xml/outliner/outlinetree.cpp b/examples/xml/outliner/outlinetree.cpp index ba89585b2..c380309eb 100644 --- a/examples/xml/outliner/outlinetree.cpp +++ b/examples/xml/outliner/outlinetree.cpp @@ -17,7 +17,7 @@ OutlineTree::OutlineTree( const TQString fileName, TQWidget *parent, const char // div. configuration of the list view addColumn( "Outlines" ); setSorting( -1 ); - setRootIsDecorated( TRUE ); + setRootIsDecorated( true ); // read the XML file and create DOM tree TQFile opmlFile( fileName ); diff --git a/examples/xml/tagreader-with-features/structureparser.cpp b/examples/xml/tagreader-with-features/structureparser.cpp index cc5e210a1..d63207e97 100644 --- a/examples/xml/tagreader-with-features/structureparser.cpp +++ b/examples/xml/tagreader-with-features/structureparser.cpp @@ -38,19 +38,19 @@ bool StructureParser::startElement( const TQString& namespaceURI, element = new TQListViewItem( table, qName, namespaceURI ); } stack.push( element ); - element->setOpen( TRUE ); + element->setOpen( true ); if ( attributes.length() > 0 ) { for ( int i = 0 ; i < attributes.length(); i++ ) { new TQListViewItem( element, attributes.qName(i), attributes.uri(i) ); } } - return TRUE; + return true; } bool StructureParser::endElement( const TQString&, const TQString&, const TQString& ) { stack.pop(); - return TRUE; + return true; } diff --git a/examples/xml/tagreader-with-features/tagreader.cpp b/examples/xml/tagreader-with-features/tagreader.cpp index cce97d58d..6116d0b95 100644 --- a/examples/xml/tagreader-with-features/tagreader.cpp +++ b/examples/xml/tagreader-with-features/tagreader.cpp @@ -36,35 +36,35 @@ int main( int argc, char **argv ) "table_namespace_prefix" ); handler->setListView( namespacePrefix ); reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", - TRUE ); + true ); source.reset(); reader.parse( source ); TQListView * prefix = new TQListView( container, "table_prefix"); handler->setListView( prefix ); - reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE ); + reader.setFeature( "http://xml.org/sax/features/namespaces", false ); source.reset(); reader.parse( source ); // namespace label (void) new TQLabel( "Default:\n" - "http://xml.org/sax/features/namespaces: TRUE\n" - "http://xml.org/sax/features/namespace-prefixes: FALSE\n", + "http://xml.org/sax/features/namespaces: true\n" + "http://xml.org/sax/features/namespace-prefixes: false\n", container ); // namespace prefix label (void) new TQLabel( "\n" - "http://xml.org/sax/features/namespaces: TRUE\n" - "http://xml.org/sax/features/namespace-prefixes: TRUE\n", + "http://xml.org/sax/features/namespaces: true\n" + "http://xml.org/sax/features/namespace-prefixes: true\n", container ); // prefix label (void) new TQLabel( "\n" - "http://xml.org/sax/features/namespaces: FALSE\n" - "http://xml.org/sax/features/namespace-prefixes: TRUE\n", + "http://xml.org/sax/features/namespaces: false\n" + "http://xml.org/sax/features/namespace-prefixes: true\n", container ); diff --git a/examples/xml/tagreader/structureparser.cpp b/examples/xml/tagreader/structureparser.cpp index a4798dc49..801d8c68c 100644 --- a/examples/xml/tagreader/structureparser.cpp +++ b/examples/xml/tagreader/structureparser.cpp @@ -15,7 +15,7 @@ bool StructureParser::startDocument() { indent = ""; - return TRUE; + return true; } bool StructureParser::startElement( const TQString&, const TQString&, @@ -24,11 +24,11 @@ bool StructureParser::startElement( const TQString&, const TQString&, { printf( "%s%s\n", (const char*)indent, (const char*)qName ); indent += " "; - return TRUE; + return true; } bool StructureParser::endElement( const TQString&, const TQString&, const TQString& ) { indent.remove( (uint)0, 4 ); - return TRUE; + return true; } |
