diff options
Diffstat (limited to 'src/dialogs')
| -rw-r--r-- | src/dialogs/tqcolordialog.cpp | 92 | ||||
| -rw-r--r-- | src/dialogs/tqcolordialog.h | 4 | ||||
| -rw-r--r-- | src/dialogs/tqdialog.cpp | 74 | ||||
| -rw-r--r-- | src/dialogs/tqdialog.h | 4 | ||||
| -rw-r--r-- | src/dialogs/tqerrormessage.cpp | 8 | ||||
| -rw-r--r-- | src/dialogs/tqfiledialog.cpp | 606 | ||||
| -rw-r--r-- | src/dialogs/tqfiledialog.h | 18 | ||||
| -rw-r--r-- | src/dialogs/tqfontdialog.cpp | 62 | ||||
| -rw-r--r-- | src/dialogs/tqfontdialog.h | 2 | ||||
| -rw-r--r-- | src/dialogs/tqinputdialog.cpp | 48 | ||||
| -rw-r--r-- | src/dialogs/tqinputdialog.h | 4 | ||||
| -rw-r--r-- | src/dialogs/tqmessagebox.cpp | 24 | ||||
| -rw-r--r-- | src/dialogs/tqmessagebox.h | 2 | ||||
| -rw-r--r-- | src/dialogs/tqprintdialog.cpp | 96 | ||||
| -rw-r--r-- | src/dialogs/tqprintdialog.h | 2 | ||||
| -rw-r--r-- | src/dialogs/tqprogressdialog.cpp | 50 | ||||
| -rw-r--r-- | src/dialogs/tqprogressdialog.h | 4 | ||||
| -rw-r--r-- | src/dialogs/tqtabdialog.cpp | 40 | ||||
| -rw-r--r-- | src/dialogs/tqtabdialog.h | 2 | ||||
| -rw-r--r-- | src/dialogs/tqwizard.cpp | 48 | ||||
| -rw-r--r-- | src/dialogs/tqwizard.h | 2 |
21 files changed, 596 insertions, 596 deletions
diff --git a/src/dialogs/tqcolordialog.cpp b/src/dialogs/tqcolordialog.cpp index 43e77866f..a80b63bc1 100644 --- a/src/dialogs/tqcolordialog.cpp +++ b/src/dialogs/tqcolordialog.cpp @@ -78,7 +78,7 @@ class TQWellArray : public TQGridView TQ_PROPERTY( int selectedRow READ selectedRow ) public: - TQWellArray( TQWidget* parent=0, const char* name=0, bool popup = FALSE ); + TQWellArray( TQWidget* parent=0, const char* name=0, bool popup = false ); ~TQWellArray() {} TQString cellContent( int row, int col ) const; @@ -175,7 +175,7 @@ TQWellArray::TQWellArray( TQWidget *parent, const char * name, bool popup ) selRow = -1; if ( smallStyle ) - setMouseTracking( TRUE ); + setMouseTracking( true ); } @@ -411,13 +411,13 @@ void TQWellArray::keyPressEvent( TQKeyEvent* e ) if( curRow > 0 ) setCurrent( curRow - 1, curCol); else if ( smallStyle ) - focusNextPrevChild( FALSE ); + focusNextPrevChild( false ); break; case Key_Down: if( curRow < numRows()-1 ) setCurrent( curRow + 1, curCol); else if ( smallStyle ) - focusNextPrevChild( TRUE ); + focusNextPrevChild( true ); break; case Key_Space: case Key_Return: @@ -433,17 +433,17 @@ void TQWellArray::keyPressEvent( TQKeyEvent* e ) //////////// TQWellArray END -static bool initrgb = FALSE; +static bool initrgb = false; static TQRgb stdrgb[6*8]; static TQRgb cusrgb[2*8]; -static bool customSet = FALSE; +static bool customSet = false; static void initRGB() { if ( initrgb ) return; - initrgb = TRUE; + initrgb = true; int i = 0; for ( int g = 0; g < 4; g++ ) for ( int r = 0; r < 4; r++ ) @@ -490,7 +490,7 @@ void TQColorDialog::setCustomColor( int i, TQRgb c ) #endif return; } - customSet = TRUE; + customSet = true; cusrgb[i] = c; } @@ -521,7 +521,7 @@ class TQColorWell : public TQWellArray { public: TQColorWell( TQWidget *parent, int r, int c, TQRgb *vals ) - :TQWellArray( parent, "" ), values( vals ), mousePressed( FALSE ), oldCurrent( -1, -1 ) + :TQWellArray( parent, "" ), values( vals ), mousePressed( false ), oldCurrent( -1, -1 ) { setNumRows(r), setNumCols(c); setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); } protected: @@ -554,7 +554,7 @@ void TQColorWell::mousePressEvent( TQMouseEvent *e ) { oldCurrent = TQPoint( selectedRow(), selectedColumn() ); TQWellArray::mousePressEvent( e ); - mousePressed = TRUE; + mousePressed = true; pressPos = e->pos(); } @@ -575,7 +575,7 @@ void TQColorWell::mouseMoveEvent( TQMouseEvent *e ) p.drawRect( 0, 0, pix.width(), pix.height() ); p.end(); drg->setPixmap( pix ); - mousePressed = FALSE; + mousePressed = false; drg->dragCopy(); } #endif @@ -613,7 +613,7 @@ void TQColorWell::dropEvent( TQDropEvent *e ) TQColor col; TQColorDrag::decode( e, col ); values[ i ] = col.rgb(); - repaintContents( FALSE ); + repaintContents( false ); e->accept(); } else { e->ignore(); @@ -627,7 +627,7 @@ void TQColorWell::mouseReleaseEvent( TQMouseEvent *e ) if ( !mousePressed ) return; TQWellArray::mouseReleaseEvent( e ); - mousePressed = FALSE; + mousePressed = false; } class TQColorPicker : public TQFrame @@ -738,7 +738,7 @@ void TQColorLuminancePicker::setVal( int v ) return; val = TQMAX( 0, TQMIN(v,255)); delete pix; pix=0; - repaint( FALSE ); //### + repaint( false ); //### emit newHsv( hue, sat, val ); } @@ -773,7 +773,7 @@ void TQColorLuminancePicker::paintEvent( TQPaintEvent * ) TQPainter p(this); p.drawPixmap( 1, coff, *pix ); const TQColorGroup &g = colorGroup(); - qDrawShadePanel( &p, r, g, TRUE ); + qDrawShadePanel( &p, r, g, true ); p.setPen( g.foreground() ); p.setBrush( g.foreground() ); TQPointArray a; @@ -789,7 +789,7 @@ void TQColorLuminancePicker::setCol( int h, int s , int v ) hue = h; sat = s; delete pix; pix=0; - repaint( FALSE );//#### + repaint( false );//#### } TQPoint TQColorPicker::colPt() @@ -842,7 +842,7 @@ void TQColorPicker::setCol( int h, int s ) r = r.unite( TQRect( colPt(), TQSize(20,20) ) ); r.moveBy( contentsRect().x()-9, contentsRect().y()-9 ); // update( r ); - repaint( r, FALSE ); + repaint( r, false ); } void TQColorPicker::mouseMoveEvent( TQMouseEvent *m ) @@ -918,7 +918,7 @@ public: TQString s; s.setNum(i); bool block = signalsBlocked(); - blockSignals(TRUE); + blockSignals(true); setText( s ); blockSignals(block); } @@ -974,8 +974,8 @@ public: TQColorShowLabel( TQWidget *parent ) : TQFrame( parent, "qt_colorshow_lbl" ) { setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); setBackgroundMode( PaletteBackground ); - setAcceptDrops( TRUE ); - mousePressed = FALSE; + setAcceptDrops( true ); + mousePressed = false; } void setColor( TQColor c ) { col = c; } @@ -1018,7 +1018,7 @@ void TQColorShower::showAlpha( bool b ) void TQColorShowLabel::mousePressEvent( TQMouseEvent *e ) { - mousePressed = TRUE; + mousePressed = true; pressPos = e->pos(); } @@ -1035,7 +1035,7 @@ void TQColorShowLabel::mouseMoveEvent( TQMouseEvent *e ) p.drawRect( 0, 0, pix.width(), pix.height() ); p.end(); drg->setPixmap( pix ); - mousePressed = FALSE; + mousePressed = false; drg->dragCopy(); } #endif @@ -1058,7 +1058,7 @@ void TQColorShowLabel::dropEvent( TQDropEvent *e ) { if ( TQColorDrag::canDecode( e ) ) { TQColorDrag::decode( e, col ); - repaint( FALSE ); + repaint( false ); emit colorDropped( col.rgb() ); e->accept(); } else { @@ -1071,7 +1071,7 @@ void TQColorShowLabel::mouseReleaseEvent( TQMouseEvent * ) { if ( !mousePressed ) return; - mousePressed = FALSE; + mousePressed = false; } TQColorShower::TQColorShower( TQWidget *parent, const char *name ) @@ -1154,12 +1154,12 @@ TQColorShower::TQColorShower( TQWidget *parent, const char *name ) void TQColorShower::showCurrentColor() { lab->setColor( currentColor() ); - lab->repaint(FALSE); //### + lab->repaint(false); //### } void TQColorShower::rgbEd() { - rgbOriginal = TRUE; + rgbOriginal = true; if ( alphaEd->isVisible() ) curCol = tqRgba( rEd->val(), gEd->val(), bEd->val(), currentAlpha() ); else @@ -1177,7 +1177,7 @@ void TQColorShower::rgbEd() void TQColorShower::hsvEd() { - rgbOriginal = FALSE; + rgbOriginal = false; hue = hEd->val(); sat = sEd->val(); val = vEd->val(); @@ -1194,7 +1194,7 @@ void TQColorShower::hsvEd() void TQColorShower::setRgb( TQRgb rgb ) { - rgbOriginal = TRUE; + rgbOriginal = true; curCol = rgb; rgb2hsv( currentColor(), hue, sat, val ); @@ -1212,7 +1212,7 @@ void TQColorShower::setRgb( TQRgb rgb ) void TQColorShower::setHsv( int h, int s, int v ) { - rgbOriginal = FALSE; + rgbOriginal = false; hue = h; val = v; sat = s; //Range check### curCol = TQColor( hue, sat, val, TQColor::Hsv ).rgb(); @@ -1300,11 +1300,11 @@ void TQColorDialogPrivate::newStandard( int r, int c ) TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) : TQObject(dialog) { - compact = FALSE; + compact = false; // small displays (e.g. PDAs cannot fit the full color dialog, // so just use the color picker. if ( tqApp->desktop()->width() < 480 || tqApp->desktop()->height() < 350 ) - compact = TRUE; + compact = true; nextCust = 0; const int lumSpace = 3; @@ -1335,7 +1335,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) : custom = new TQColorWell( dialog, 2, 8, cusrgb ); custom->setCellWidth( 28 ); custom->setCellHeight( 24 ); - custom->setAcceptDrops( TRUE ); + custom->setAcceptDrops( true ); connect( custom, TQ_SIGNAL(selected(int,int)), TQ_SLOT(newCustom(int,int))); lab = new TQLabel( custom, TQColorDialog::tr( "&Custom colors") , dialog, "qt_custcolors_lbl" ); @@ -1345,7 +1345,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) : TQPushButton *custbut = new TQPushButton( TQColorDialog::tr("&Define Custom Colors >>"), dialog, "qt_def_custcolors_lbl" ); - custbut->setEnabled( FALSE ); + custbut->setEnabled( false ); leftLay->addWidget( custbut ); } else { // better color picker size for small displays @@ -1390,7 +1390,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) : TQPushButton *ok, *cancel; ok = new TQPushButton( TQColorDialog::tr("OK"), dialog, "qt_ok_btn" ); connect( ok, TQ_SIGNAL(clicked()), dialog, TQ_SLOT(accept()) ); - ok->setDefault(TRUE); + ok->setDefault(true); cancel = new TQPushButton( TQColorDialog::tr("Cancel"), dialog, "qt_cancel_btn" ); connect( cancel, TQ_SIGNAL(clicked()), dialog, TQ_SLOT(reject()) ); buttons->addWidget( ok ); @@ -1410,7 +1410,7 @@ void TQColorDialogPrivate::addCustom() { cusrgb[nextCust] = cs->currentColor(); if (custom) - custom->repaintContents( FALSE ); + custom->repaintContents( false ); nextCust = (nextCust+1) % 16; } @@ -1446,7 +1446,7 @@ void TQColorDialogPrivate::addCustom() /*! Constructs a default color dialog with parent \a parent and called - \a name. If \a modal is TRUE the dialog will be modal. Use + \a name. If \a modal is true the dialog will be modal. Use setColor() to set an initial value. \sa getColor() @@ -1456,7 +1456,7 @@ TQColorDialog::TQColorDialog(TQWidget* parent, const char* name, bool modal) : TQDialog(parent, name, modal, ( WType_Dialog | WStyle_Customize | WStyle_Title | WStyle_DialogBorder | WStyle_SysMenu ) ) { - setSizeGripEnabled( FALSE ); + setSizeGripEnabled( false ); d = new TQColorDialogPrivate( this ); #ifndef TQT_NO_SETTINGS @@ -1464,7 +1464,7 @@ TQColorDialog::TQColorDialog(TQWidget* parent, const char* name, bool modal) : TQSettings settings; settings.insertSearchPath( TQSettings::Windows, "/Trolltech" ); for ( int i = 0; i < 2*8; ++i ) { - bool ok = FALSE; + bool ok = false; TQRgb rgb = (TQRgb)settings.readNumEntry( "/TQt/customColors/" + TQString::number( i ), 0, &ok ); if ( ok ) cusrgb[i] = rgb; @@ -1493,7 +1493,7 @@ TQColor TQColorDialog::getColor( const TQColor& initial, TQWidget *parent, #endif int allocContext = TQColor::enterAllocContext(); - TQColorDialog *dlg = new TQColorDialog( parent, name, TRUE ); //modal + TQColorDialog *dlg = new TQColorDialog( parent, name, true ); //modal #ifndef TQT_NO_WIDGET_TOPEXTRA dlg->setCaption( TQColorDialog::tr( "Select color" ) ); #endif @@ -1516,8 +1516,8 @@ TQColor TQColorDialog::getColor( const TQColor& initial, TQWidget *parent, initially set to \a initial. The dialog is a child of \a parent and called \a name. - If \a ok is non-null, \e *\a ok is set to TRUE if the user clicked - OK, and to FALSE if the user clicked Cancel. + If \a ok is non-null, \e *\a ok is set to true if the user clicked + OK, and to false if the user clicked Cancel. If the user clicks Cancel, the \a initial value is returned. */ @@ -1537,7 +1537,7 @@ TQRgb TQColorDialog::getRgba( TQRgb initial, bool *ok, #endif int allocContext = TQColor::enterAllocContext(); - TQColorDialog *dlg = new TQColorDialog( parent, name, TRUE ); //modal + TQColorDialog *dlg = new TQColorDialog( parent, name, true ); //modal TQ_CHECK_PTR( dlg ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -1616,7 +1616,7 @@ void TQColorDialog::setColor( const TQColor& c ) void TQColorDialog::setSelectedAlpha( int a ) { - d->showAlpha( TRUE ); + d->showAlpha( true ); d->setCurrentAlpha( a ); } @@ -1646,7 +1646,7 @@ bool TQColorDialog::selectColor( const TQColor& col ) d->standard->setCurrent( i, j ); d->standard->setSelected( i, j ); d->standard->setFocus(); - return TRUE; + return true; } } } @@ -1660,12 +1660,12 @@ bool TQColorDialog::selectColor( const TQColor& col ) d->custom->setCurrent( i, j ); d->custom->setSelected( i, j ); d->custom->setFocus(); - return TRUE; + return true; } } } } - return FALSE; + return false; } #include "tqcolordialog.moc" diff --git a/src/dialogs/tqcolordialog.h b/src/dialogs/tqcolordialog.h index 580f82ca0..93b6daf19 100644 --- a/src/dialogs/tqcolordialog.h +++ b/src/dialogs/tqcolordialog.h @@ -65,7 +65,7 @@ public: private: ~TQColorDialog(); - TQColorDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE ); + TQColorDialog( TQWidget* parent=0, const char* name=0, bool modal=false ); void setColor( const TQColor& ); TQColor color() const; @@ -75,7 +75,7 @@ private: void setSelectedAlpha( int ); int selectedAlpha() const; - void showCustom( bool=TRUE ); + void showCustom( bool=true ); private: // Disabled copy constructor and operator= TQColorDialogPrivate *d; diff --git a/src/dialogs/tqdialog.cpp b/src/dialogs/tqdialog.cpp index 277a1b4ca..efeb03abc 100644 --- a/src/dialogs/tqdialog.cpp +++ b/src/dialogs/tqdialog.cpp @@ -99,12 +99,12 @@ and return the appropriate value. Alternatively you can connect to the done() slot, passing it \c Accepted or \c Rejected. - An alternative is to call setModal(TRUE), then show(). Unlike + An alternative is to call setModal(true), then show(). Unlike exec(), show() returns control to the caller immediately. Calling - setModal(TRUE) is especially useful for progress dialogs, where + setModal(true) is especially useful for progress dialogs, where the user must have the ability to interact with the dialog, e.g. to cancel a long running operation. If you use show() and - setModal(TRUE) together you must call + setModal(true) together you must call TQApplication::processEvents() periodically during processing to enable the user to interact with the dialog. (See \l TQProgressDialog.) @@ -214,7 +214,7 @@ class TQDialogPrivate : public TQt public: TQDialogPrivate() - : mainDef(0), orientation(Horizontal),extension(0), doShowExtension(FALSE) + : mainDef(0), orientation(Horizontal),extension(0), doShowExtension(false) #ifndef TQT_NO_SIZEGRIP ,resizer(0) #endif @@ -288,18 +288,18 @@ void TQDialog::setDefault( TQPushButton *pushButton ) Q_ASSERT(list); TQObjectListIt it( *list ); TQPushButton *pb; - bool hasMain = FALSE; + bool hasMain = false; while ( (pb = (TQPushButton*)it.current()) ) { ++it; if ( pb->topLevelWidget() != this ) continue; if ( pb == d->mainDef ) - hasMain = TRUE; + hasMain = true; if ( pb != pushButton ) - pb->setDefault( FALSE ); + pb->setDefault( false ); } if (!pushButton && hasMain) - d->mainDef->setDefault( TRUE ); + d->mainDef->setDefault( true ); if (!hasMain) d->mainDef = pushButton; delete list; @@ -332,7 +332,7 @@ void TQDialog::hideDefault() TQPushButton *pb; while ( (pb = (TQPushButton*)it.current()) ) { ++it; - pb->setDefault( FALSE ); + pb->setDefault( false ); } delete list; #endif @@ -351,9 +351,9 @@ void TQDialog::hideSpecial() // "OK" buttons are hidden, and (Ok) shown on titlebar // "Cancel" buttons are hidden, and (X) shown on titlebar // "Help" buttons are hidden, and (?) shown on titlebar - bool showOK = FALSE, - showX = FALSE, - showQ = FALSE; + bool showOK = false, + showX = false, + showQ = false; TQObjectList *list = queryList( "TQPushButton" ); TQObjectListIt it( *list ); TQPushButton *pb; @@ -361,15 +361,15 @@ void TQDialog::hideSpecial() if ( !showOK && pb->text() == tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Ok] ) ) { pb->hide(); - showOK = TRUE; + showOK = true; } else if ( !showX && pb->text() == tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Cancel] ) ) { pb->hide(); - showX = TRUE; + showX = true; } else if ( !showQ && pb->text() == tqApp->tr("Help") ) { pb->hide(); - showQ = TRUE; + showQ = true; } ++it; } @@ -431,7 +431,7 @@ int TQDialog::exec() show(); - in_loop = TRUE; + in_loop = true; tqApp->enter_loop(); if ( !wasShowModal ) @@ -530,14 +530,14 @@ bool TQDialog::eventFilter( TQObject *o, TQEvent *e ) void TQDialog::contextMenuEvent( TQContextMenuEvent *e ) { #if !defined(TQT_NO_WHATSTHIS) && !defined(TQT_NO_POPUPMENU) - TQWidget* w = childAt( e->pos(), TRUE ); + TQWidget* w = childAt( e->pos(), true ); if ( !w ) return; TQString s; while ( s.isEmpty() && w ) { - s = TQWhatsThis::textFor( w, e->pos(), FALSE ); + s = TQWhatsThis::textFor( w, e->pos(), false ); if ( s.isEmpty() ) - w = w->parentWidget(TRUE); + w = w->parentWidget(true); } if ( !s.isEmpty() ) { TQPopupMenu p(0,"qt_whats_this_menu"); @@ -595,7 +595,7 @@ void TQDialog::keyPressEvent( TQKeyEvent *e ) // call ours, since c++ blocks us from calling the one // belonging to focusWidget(). TQFocusEvent::setReason(TQFocusEvent::Backtab); - focusNextPrevChild( FALSE ); + focusNextPrevChild( false ); TQFocusEvent::resetReason(); break; case Key_Down: @@ -607,7 +607,7 @@ void TQDialog::keyPressEvent( TQKeyEvent *e ) break; } TQFocusEvent::setReason(TQFocusEvent::Tab); - focusNextPrevChild( TRUE ); + focusNextPrevChild( true ); TQFocusEvent::resetReason(); break; default: @@ -701,7 +701,7 @@ void TQDialog::show() adjustSize(); if( !qt_net_supports( qt_net_wm_full_placement )) { if ( has_relpos && !did_move ) { - adjustPositionInternal( parentWidget(), TRUE ); + adjustPositionInternal( parentWidget(), true ); } else if ( !did_move ) { adjustPositionInternal( parentWidget() ); } @@ -750,7 +750,7 @@ void TQDialog::show() if ( !d->mainDef && isTopLevel() ) { if ( !fw || fw->focusPolicy() == NoFocus ) { - focusNextPrevChild( TRUE ); + focusNextPrevChild( true ); fw = focusWidget(); } if ( fw ) { @@ -761,7 +761,7 @@ void TQDialog::show() do { TQPushButton *pb = ::tqt_cast<TQPushButton*>(candidate); if ( pb && pb->autoDefault() ) { - pb->setDefault( TRUE ); + pb->setDefault( true ); break; } candidate = fd->next(); @@ -899,7 +899,7 @@ void TQDialog::hide() // Reimplemented to exit a modal when the dialog is hidden. TQWidget::hide(); if ( in_loop ) { - in_loop = FALSE; + in_loop = false; tqApp->exit_loop(); } } @@ -913,7 +913,7 @@ void TQDialog::hide() void TQDialog::move( int x, int y ) { - did_move = TRUE; + did_move = true; TQWidget::move( x, y ); } @@ -921,7 +921,7 @@ void TQDialog::move( int x, int y ) void TQDialog::move( const TQPoint &p ) { - did_move = TRUE; + did_move = true; TQWidget::move( p ); } @@ -929,7 +929,7 @@ void TQDialog::move( const TQPoint &p ) void TQDialog::resize( int w, int h ) { - did_resize = TRUE; + did_resize = true; TQWidget::resize( w, h ); } @@ -937,7 +937,7 @@ void TQDialog::resize( int w, int h ) void TQDialog::resize( const TQSize &s ) { - did_resize = TRUE; + did_resize = true; TQWidget::resize( s ); } @@ -945,8 +945,8 @@ void TQDialog::resize( const TQSize &s ) void TQDialog::setGeometry( int x, int y, int w, int h ) { - did_move = TRUE; - did_resize = TRUE; + did_move = true; + did_resize = true; TQWidget::setGeometry( x, y, w, h ); } @@ -954,8 +954,8 @@ void TQDialog::setGeometry( int x, int y, int w, int h ) void TQDialog::setGeometry( const TQRect &r ) { - did_move = TRUE; - did_resize = TRUE; + did_move = true; + did_resize = true; TQWidget::setGeometry( r ); } @@ -1019,7 +1019,7 @@ TQWidget* TQDialog::extension() const /*! - If \a showIt is TRUE, the dialog's extension is shown; otherwise the + If \a showIt is true, the dialog's extension is shown; otherwise the extension is hidden. This slot is usually connected to the \l TQButton::toggled() signal @@ -1045,7 +1045,7 @@ void TQDialog::showExtension( bool showIt ) d->max = maximumSize(); #ifndef TQT_NO_LAYOUT if ( layout() ) - layout()->setEnabled( FALSE ); + layout()->setEnabled( false ); #endif TQSize s( d->extension->sizeHint() .expandedTo( d->extension->minimumSize() ) @@ -1068,7 +1068,7 @@ void TQDialog::showExtension( bool showIt ) resize( d->size ); #ifndef TQT_NO_LAYOUT if ( layout() ) - layout()->setEnabled( TRUE ); + layout()->setEnabled( true ); #endif } } @@ -1135,7 +1135,7 @@ bool TQDialog::isSizeGripEnabled() const #ifndef TQT_NO_SIZEGRIP return !!d->resizer; #else - return FALSE; + return false; #endif } diff --git a/src/dialogs/tqdialog.h b/src/dialogs/tqdialog.h index e1d82c179..786be4cf5 100644 --- a/src/dialogs/tqdialog.h +++ b/src/dialogs/tqdialog.h @@ -60,7 +60,7 @@ friend class TQPushButton; TQ_PROPERTY( bool modal READ isModal WRITE setModal ) public: - Q_EXPLICIT TQDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, + Q_EXPLICIT TQDialog( TQWidget* parent=0, const char* name=0, bool modal=false, WFlags f=0 ); ~TQDialog(); @@ -127,7 +127,7 @@ private: uint has_relpos : 1; uint did_resize : 1; uint in_loop: 1; - void adjustPositionInternal( TQWidget*, bool useRelPos = FALSE ); + void adjustPositionInternal( TQWidget*, bool useRelPos = false ); TQDialogPrivate* d; private: // Disabled copy constructor and operator= diff --git a/src/dialogs/tqerrormessage.cpp b/src/dialogs/tqerrormessage.cpp index 12013b0f6..e8431a345 100644 --- a/src/dialogs/tqerrormessage.cpp +++ b/src/dialogs/tqerrormessage.cpp @@ -117,7 +117,7 @@ static void deleteStaticcTQErrorMessage() // post-routine } } -static bool metFatal = FALSE; +static bool metFatal = false; void jump( TQtMsgType t, const char * m ) { @@ -169,7 +169,7 @@ TQErrorMessage::TQErrorMessage( TQWidget * parent, const char * name ) errors = new TQErrorMessageTextView( this, "errors" ); grid->addWidget( errors, 0, 1 ); again = new TQCheckBox( tr( "&Show this message again" ), this, "again" ); - again->setChecked( TRUE ); + again->setChecked( true ); grid->addWidget( again, 1, 1, AlignTop + AlignAuto ); ok = new TQPushButton( tr( "&OK" ), this, "ok" ); connect( ok, TQ_SIGNAL(clicked()), this, TQ_SLOT(accept()) ); @@ -244,10 +244,10 @@ bool TQErrorMessage::nextPending() pending->remove( pending->begin() ); if ( !p.isEmpty() && !doNotShow->find( p ) ) { errors->setText( p ); - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/src/dialogs/tqfiledialog.cpp b/src/dialogs/tqfiledialog.cpp index de4754ec4..36cf60691 100644 --- a/src/dialogs/tqfiledialog.cpp +++ b/src/dialogs/tqfiledialog.cpp @@ -473,10 +473,10 @@ static int lastWidth = 0; static int lastHeight = 0; static TQString * workingDirectory = 0; -static bool bShowHiddenFiles = FALSE; +static bool bShowHiddenFiles = false; static int sortFilesBy = (int)TQDir::Name; -static bool sortAscending = TRUE; -static bool detailViewMode = FALSE; +static bool sortAscending = true; +static bool detailViewMode = false; static TQCleanupHandler<TQPixmap> qfd_cleanup_pixmap; static TQCleanupHandler<TQString> qfd_cleanup_string; @@ -527,7 +527,7 @@ static PtrExtractIconEx ptrExtractIconEx = 0; static void resolveLibs() { #ifndef Q_OS_TEMP - static bool triedResolve = FALSE; + static bool triedResolve = false; if ( !triedResolve ) { #ifdef TQT_THREAD_SUPPORT @@ -542,10 +542,10 @@ static void resolveLibs() return; } #endif - triedResolve = TRUE; + triedResolve = true; if ( qt_winunicode ) { TQLibrary lib("shell32"); - lib.setAutoUnload( FALSE ); + lib.setAutoUnload( false ); ptrExtractIconEx = (PtrExtractIconEx) lib.resolve( "ExtractIconExW" ); } } @@ -618,9 +618,9 @@ static void makeVariables() { TQBitmap m( fifteenTransparentPixels->width(), 1 ); m.fill( TQt::color0 ); fifteenTransparentPixels->setMask( m ); - bShowHiddenFiles = FALSE; + bShowHiddenFiles = false; sortFilesBy = (int)TQDir::Name; - detailViewMode = FALSE; + detailViewMode = false; #if defined(TQ_WS_WIN) if ( !fileIconProvider ) fileIconProvider = new TQWindowsIconProvider( tqApp ); @@ -640,7 +640,7 @@ class TQRenameEdit : public TQLineEdit public: TQRenameEdit( TQWidget *parent ) - : TQLineEdit( parent, "qt_rename_edit" ), doRenameAlreadyEmitted(FALSE) + : TQLineEdit( parent, "qt_rename_edit" ), doRenameAlreadyEmitted(false) { connect( this, TQ_SIGNAL(returnPressed()), TQ_SLOT(slotReturnPressed()) ); } @@ -671,7 +671,7 @@ private: void clear(); void show(); - void startRename( bool check = TRUE ); + void startRename( bool check = true ); void viewportMousePressEvent( TQMouseEvent *e ); void viewportMouseReleaseEvent( TQMouseEvent *e ); void viewportMouseDoubleClickEvent( TQMouseEvent *e ); @@ -720,8 +720,8 @@ public: TQFileDialogTQFileListView( TQWidget *parent, TQFileDialog *d ); void clear(); - void startRename( bool check = TRUE ); - void setSorting( int column, bool increasing = TRUE ); + void startRename( bool check = true ); + void setSorting( int column, bool increasing = true ); TQRenameEdit *lined; bool renaming; @@ -806,7 +806,7 @@ TQFDProgressAnimation::TQFDProgressAnimation( TQWidget *parent ) void TQFDProgressAnimation::start() { - timer->start( 150, FALSE ); + timer->start( 150, false ); } void TQFDProgressAnimation::next() @@ -870,7 +870,7 @@ private: }; TQFDProgressDialog::TQFDProgressDialog( TQWidget *parent, const TQString &fn, int steps ) - : TQDialog( parent, "", TRUE ) + : TQDialog( parent, "", true ) { #ifndef TQT_NO_WIDGET_TOPEXTRA setCaption( TQFileDialog::tr( "Copy or Move a File" ) ); @@ -962,15 +962,15 @@ public: struct File: public TQListViewItem { File( TQFileDialogPrivate * dlgp, const TQUrlInfo * fi, TQListViewItem * parent ) - : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE ) + : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false ) { setup(); dlgp->last = this; } File( TQFileDialogPrivate * dlgp, const TQUrlInfo * fi, TQListView * parent ) - : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE ) + : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false ) { setup(); dlgp->last = this; } File( TQFileDialogPrivate * dlgp, const TQUrlInfo * fi, TQListView * parent, TQListViewItem * after ) - : TQListViewItem( parent, after ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE ) + : TQListViewItem( parent, after ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false ) { setup(); if ( !nextSibling() ) dlgp->last = this; } ~File(); @@ -997,7 +997,7 @@ public: class UrlInfoList : public TQPtrList<TQUrlInfo> { public: - UrlInfoList() { setAutoDelete( TRUE ); } + UrlInfoList() { setAutoDelete( true ); } int compareItems( TQPtrCollection::Item n1, TQPtrCollection::Item n2 ) { if ( !n1 || !n2 ) return 0; @@ -1124,7 +1124,7 @@ public: return ui.isValid(); } } - return TRUE; + return true; } #ifndef Q_NO_CURSOR @@ -1162,12 +1162,12 @@ void TQRenameEdit::focusOutEvent( TQFocusEvent * ) if ( !doRenameAlreadyEmitted ) emit doRename(); else - doRenameAlreadyEmitted = FALSE; + doRenameAlreadyEmitted = false; } void TQRenameEdit::slotReturnPressed() { - doRenameAlreadyEmitted = TRUE; + doRenameAlreadyEmitted = true; emit doRename(); } @@ -1179,8 +1179,8 @@ void TQRenameEdit::slotReturnPressed() TQFileListBox::TQFileListBox( TQWidget *parent, TQFileDialog *dlg ) : TQListBox( parent, "filelistbox" ), filedialog( dlg ), - renaming( FALSE ), renameItem( 0 ), mousePressed( FALSE ), - firstMousePressEvent( TRUE ) + renaming( false ), renameItem( 0 ), mousePressed( false ), + firstMousePressEvent( true ) { changeDirTimer = new TQTimer( this ); TQVBox *box = new TQVBox( viewport(), "qt_vbox" ); @@ -1200,7 +1200,7 @@ TQFileListBox::TQFileListBox( TQWidget *parent, TQFileDialog *dlg ) this, TQ_SLOT( changeDirDuringDrag() ) ); connect( this, TQ_SIGNAL( contentsMoving(int,int) ), this, TQ_SLOT( contentsMoved(int,int) ) ); - viewport()->setAcceptDrops( TRUE ); + viewport()->setAcceptDrops( true ); dragItem = 0; } @@ -1255,7 +1255,7 @@ void TQFileListBox::keyPressEvent( TQKeyEvent *e ) void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e ) { pressPos = e->pos(); - mousePressed = FALSE; + mousePressed = false; bool didRename = renaming; @@ -1265,12 +1265,12 @@ void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e ) if ( e->button() != LeftButton ) { TQListBox::viewportMousePressEvent( e ); - firstMousePressEvent = FALSE; + firstMousePressEvent = false; return; } int i = currentItem(); - bool wasSelected = FALSE; + bool wasSelected = false; if ( i != -1 ) wasSelected = item( i )->isSelected(); TQListBox::mousePressEvent( e ); @@ -1281,24 +1281,24 @@ void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e ) || ( filedialog->mode() == TQFileDialog::Directory ) || ( filedialog->mode() == TQFileDialog::DirectoryOnly ); if ( itemAt( e->pos() ) != item( i ) ) { - firstMousePressEvent = FALSE; + firstMousePressEvent = false; return; } if ( !firstMousePressEvent && !didRename && i == currentItem() && currentItem() != -1 && wasSelected && TQUrlInfo( filedialog->d->url, "." ).isWritable() && item( currentItem() )->text() != ".." ) { - renameTimer->start( TQApplication::doubleClickInterval(), TRUE ); + renameTimer->start( TQApplication::doubleClickInterval(), true ); renameItem = item( i ); } - firstMousePressEvent = FALSE; + firstMousePressEvent = false; } void TQFileListBox::viewportMouseReleaseEvent( TQMouseEvent *e ) { dragItem = 0; TQListBox::viewportMouseReleaseEvent( e ); - mousePressed = FALSE; + mousePressed = false; } void TQFileListBox::viewportMouseDoubleClickEvent( TQMouseEvent *e ) @@ -1334,7 +1334,7 @@ void TQFileListBox::viewportMouseMoveEvent( TQMouseEvent *e ) this, TQ_SLOT( dragObjDestroyed() ) ); drag->drag(); - mousePressed = FALSE; + mousePressed = false; } } else #endif @@ -1462,15 +1462,15 @@ bool TQFileListBox::acceptDrop( const TQPoint &pnt, TQWidget *source ) TQListBoxItem *item = itemAt( pnt ); if ( !item || ( item && !itemRect( item ).contains( pnt ) ) ) { if ( source == viewport() && startDragDir == filedialog->dirPath() ) - return FALSE; - return TRUE; + return false; + return true; } TQUrlInfo fi( filedialog->d->url, item->text() ); if ( fi.isDir() && itemRect( item ).contains( pnt ) ) - return TRUE; - return FALSE; + return true; + return false; } void TQFileListBox::setCurrentDropItem( const TQPoint &pnt ) @@ -1516,7 +1516,7 @@ void TQFileListBox::startRename( bool check ) return; int i = currentItem(); - setSelected( i, TRUE ); + setSelected( i, true ); TQRect r = itemRect( item( i ) ); int bdr = item( i )->pixmap() ? item( i )->pixmap()->width() : 16; @@ -1530,10 +1530,10 @@ void TQFileListBox::startRename( bool check ) lined->setFocus(); lined->setText( item( i )->text() ); lined->selectAll(); - lined->setFrame( FALSE ); + lined->setFrame( false ); lined->parentWidget()->show(); viewport()->setFocusProxy( lined ); - renaming = TRUE; + renaming = true; } void TQFileListBox::clear() @@ -1558,7 +1558,7 @@ void TQFileListBox::cancelRename() renameItem = 0; lined->parentWidget()->hide(); viewport()->setFocusProxy( this ); - renaming = FALSE; + renaming = false; updateItem( currentItem() ); if ( lined->hasFocus() ) viewport()->setFocus(); @@ -1579,9 +1579,9 @@ void TQFileListBox::contentsMoved( int, int ) ************************************************************************/ TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFileDialog *dlg ) - : TQListView( parent, "qt_filedlg_listview" ), renaming( FALSE ), renameItem( 0 ), - filedialog( dlg ), mousePressed( FALSE ), - firstMousePressEvent( TRUE ) + : TQListView( parent, "qt_filedlg_listview" ), renaming( false ), renameItem( 0 ), + filedialog( dlg ), mousePressed( false ), + firstMousePressEvent( true ) { changeDirTimer = new TQTimer( this ); TQVBox *box = new TQVBox( viewport(), "qt_vbox" ); @@ -1595,7 +1595,7 @@ TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFile this, TQ_SLOT (rename() ) ); connect( lined, TQ_SIGNAL( cancelRename() ), this, TQ_SLOT( cancelRename() ) ); - header()->setMovingEnabled( FALSE ); + header()->setMovingEnabled( false ); connect( renameTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( doubleClickTimeout() ) ); connect( changeDirTimer, TQ_SIGNAL( timeout() ), @@ -1607,9 +1607,9 @@ TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFile connect( this, TQ_SIGNAL( contentsMoving(int,int) ), this, TQ_SLOT( contentsMoved(int,int) ) ); - viewport()->setAcceptDrops( TRUE ); + viewport()->setAcceptDrops( true ); sortcolumn = 0; - ascending = TRUE; + ascending = true; dragItem = 0; } @@ -1643,7 +1643,7 @@ void TQFileDialogTQFileListView::setSorting( int column, bool increasing ) void TQFileDialogTQFileListView::changeSortColumn2( int column ) { int lcol = header()->mapToLogical( column ); - setSorting( lcol, sortcolumn == lcol ? !ascending : TRUE ); + setSorting( lcol, sortcolumn == lcol ? !ascending : true ); } void TQFileDialogTQFileListView::keyPressEvent( TQKeyEvent *e ) @@ -1688,7 +1688,7 @@ void TQFileDialogTQFileListView::keyPressEvent( TQKeyEvent *e ) void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e ) { pressPos = e->pos(); - mousePressed = FALSE; + mousePressed = false; bool didRename = renaming; cancelRename(); @@ -1697,7 +1697,7 @@ void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e ) if ( e->button() != LeftButton ) { TQListView::viewportMousePressEvent( e ); - firstMousePressEvent = FALSE; + firstMousePressEvent = false; return; } @@ -1711,17 +1711,17 @@ void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e ) if ( itemAt( e->pos() ) != i || e->x() + contentsX() > columnWidth( 0 ) ) { - firstMousePressEvent = FALSE; + firstMousePressEvent = false; return; } if ( !firstMousePressEvent && !didRename && i == currentItem() && currentItem() && TQUrlInfo( filedialog->d->url, "." ).isWritable() && currentItem()->text( 0 ) != ".." ) { - renameTimer->start( TQApplication::doubleClickInterval(), TRUE ); + renameTimer->start( TQApplication::doubleClickInterval(), true ); renameItem = currentItem(); } - firstMousePressEvent = FALSE; + firstMousePressEvent = false; } void TQFileDialogTQFileListView::viewportMouseDoubleClickEvent( TQMouseEvent *e ) @@ -1733,7 +1733,7 @@ void TQFileDialogTQFileListView::viewportMouseDoubleClickEvent( TQMouseEvent *e void TQFileDialogTQFileListView::viewportMouseReleaseEvent( TQMouseEvent *e ) { TQListView::viewportMouseReleaseEvent( e ); - mousePressed = FALSE; + mousePressed = false; dragItem = 0; } @@ -1762,7 +1762,7 @@ void TQFileDialogTQFileListView::viewportMouseMoveEvent( TQMouseEvent *e ) this, TQ_SLOT( dragObjDestroyed() ) ); drag->drag(); - mousePressed = FALSE; + mousePressed = false; } } #endif @@ -1881,15 +1881,15 @@ bool TQFileDialogTQFileListView::acceptDrop( const TQPoint &pnt, TQWidget *sourc TQListViewItem *item = itemAt( pnt ); if ( !item || ( item && !itemRect( item ).contains( pnt ) ) ) { if ( source == viewport() && startDragDir == filedialog->dirPath() ) - return FALSE; - return TRUE; + return false; + return true; } TQUrlInfo fi( filedialog->d->url, item->text( 0 ) ); if ( fi.isDir() && itemRect( item ).contains( pnt ) ) - return TRUE; - return FALSE; + return true; + return false; } void TQFileDialogTQFileListView::setCurrentDropItem( const TQPoint &pnt ) @@ -1939,7 +1939,7 @@ void TQFileDialogTQFileListView::startRename( bool check ) return; TQListViewItem *i = currentItem(); - setSelected( i, TRUE ); + setSelected( i, true ); TQRect r = itemRect( i ); int bdr = i->pixmap( 0 ) ? @@ -1954,10 +1954,10 @@ void TQFileDialogTQFileListView::startRename( bool check ) lined->setFocus(); lined->setText( i->text( 0 ) ); lined->selectAll(); - lined->setFrame( FALSE ); + lined->setFrame( false ); lined->parentWidget()->show(); viewport()->setFocusProxy( lined ); - renaming = TRUE; + renaming = true; } void TQFileDialogTQFileListView::clear() @@ -1982,7 +1982,7 @@ void TQFileDialogTQFileListView::cancelRename() renameItem = 0; lined->parentWidget()->hide(); viewport()->setFocusProxy( this ); - renaming = FALSE; + renaming = false; if ( currentItem() ) currentItem()->repaint(); if ( lined->hasFocus() ) @@ -2203,7 +2203,7 @@ static TQStringList makeFiltersList( const TQString &filter ) the TQFileDialog. \code - TQFileDialog* fd = new TQFileDialog( this, "file dialog", TRUE ); + TQFileDialog* fd = new TQFileDialog( this, "file dialog", true ); fd->setMode( TQFileDialog::AnyFile ); \endcode @@ -2302,14 +2302,14 @@ static TQStringList makeFiltersList( const TQString &filter ) Preview* p = new Preview; TQFileDialog* fd = new TQFileDialog( this ); - fd->setContentsPreviewEnabled( TRUE ); + fd->setContentsPreviewEnabled( true ); fd->setContentsPreview( p, p ); fd->setPreviewMode( TQFileDialog::Contents ); fd->show(); \endcode The first line creates an instance of our preview widget. We then - create our file dialog and call setContentsPreviewEnabled( TRUE ), + create our file dialog and call setContentsPreviewEnabled( true ), this tell the file dialog to preview the contents of the currently selected file. We then call setContentsPreview() -- note that we pass the same preview widget twice. Finally, before showing the file @@ -2387,7 +2387,7 @@ extern const char qt_file_dialog_filter_reg_exp[] = /*! Constructs a file dialog called \a name, with the parent, \a parent. - If \a modal is TRUE then the file dialog is modal; otherwise it is + If \a modal is true then the file dialog is modal; otherwise it is modeless. */ @@ -2399,7 +2399,7 @@ TQFileDialog::TQFileDialog( TQWidget *parent, const char *name, bool modal ) init(); d->mode = ExistingFile; d->types->insertItem( tr( "All Files (*)" ) ); - d->cursorOverride = FALSE; + d->cursorOverride = false; emit dirEntered( d->url.dirPath() ); rereadDir(); } @@ -2407,7 +2407,7 @@ TQFileDialog::TQFileDialog( TQWidget *parent, const char *name, bool modal ) /*! Constructs a file dialog called \a name with the parent, \a parent. - If \a modal is TRUE then the file dialog is modal; otherwise it is + If \a modal is true then the file dialog is modal; otherwise it is modeless. If \a dirName is specified then it will be used as the dialog's @@ -2435,7 +2435,7 @@ TQFileDialog::TQFileDialog( const TQString& dirName, const TQString & filter, if ( !filter.isEmpty() ) { setFilters( filter ); if ( !dirName.isEmpty() ) { - int dotpos = dirName.find( TQChar('.'), 0, FALSE ); + int dotpos = dirName.find( TQChar('.'), 0, false ); if ( dotpos != -1 ) { for ( int b=0 ; b<d->types->count() ; b++ ) { if ( d->types->text(b).contains( dirName.right( dirName.length() - dotpos ) ) ) { @@ -2463,23 +2463,23 @@ extern int qt_ntfs_permission_lookup; void TQFileDialog::init() { - setSizeGripEnabled( TRUE ); + setSizeGripEnabled( true ); d = new TQFileDialogPrivate(); d->mode = AnyFile; d->last = 0; d->lastEFSelected = 0; d->moreFiles = 0; - d->infoPreview = FALSE; - d->contentsPreview = FALSE; - d->hadDotDot = FALSE; - d->ignoreNextKeyPress = FALSE; + d->infoPreview = false; + d->contentsPreview = false; + d->hadDotDot = false; + d->ignoreNextKeyPress = false; d->progressDia = 0; - d->checkForFilter = FALSE; - d->ignoreNextRefresh = FALSE; - d->ignoreStop = FALSE; - d->pendingItems.setAutoDelete( FALSE ); + d->checkForFilter = false; + d->ignoreNextRefresh = false; + d->ignoreStop = false; + d->pendingItems.setAutoDelete( false ); d->mimeTypeTimer = new TQTimer( this ); - d->cursorOverride = FALSE; + d->cursorOverride = false; #if defined(TQ_WS_WIN) d->oldPermissionLookup = qt_ntfs_permission_lookup; #endif @@ -2525,7 +2525,7 @@ void TQFileDialog::init() files->addColumn( tr("Type") ); files->addColumn( tr("Date") ); files->addColumn( tr("Attributes") ); - files->header()->setStretchEnabled( TRUE, 0 ); + files->header()->setStretchEnabled( true, 0 ); files->setMinimumSize( 50, 25 + 2*fm.lineSpacing() ); @@ -2545,7 +2545,7 @@ void TQFileDialog::init() d->moreFiles = new TQFileListBox( d->stack, this ); d->moreFiles->setRowMode( TQListBox::FitToHeight ); - d->moreFiles->setVariableWidth( TRUE ); + d->moreFiles->setVariableWidth( true ); connect( d->moreFiles, TQ_SIGNAL(selected(TQListBoxItem*)), this, TQ_SLOT(selectDirectoryOrFile(TQListBoxItem*)) ); @@ -2560,14 +2560,14 @@ void TQFileDialog::init() d->moreFiles->viewport()->installEventFilter( this ); okB = new TQPushButton( tr("&OK"), this, "OK" ); //### Or "Save (see other "OK") - okB->setDefault( TRUE ); - okB->setEnabled( FALSE ); + okB->setDefault( true ); + okB->setEnabled( false ); connect( okB, TQ_SIGNAL(clicked()), this, TQ_SLOT(okClicked()) ); cancelB = new TQPushButton( tr("Cancel") , this, "Cancel" ); connect( cancelB, TQ_SIGNAL(clicked()), this, TQ_SLOT(cancelClicked()) ); - d->paths = new TQComboBox( TRUE, this, "directory history/editor" ); - d->paths->setDuplicatesEnabled( FALSE ); + d->paths = new TQComboBox( true, this, "directory history/editor" ); + d->paths->setDuplicatesEnabled( false ); d->paths->setInsertionPolicy( TQComboBox::NoInsertion ); const TQFileInfoList * rootDrives = TQDir::drives(); TQFileInfoListIterator it( *rootDrives ); @@ -2593,10 +2593,10 @@ void TQFileDialog::init() ( (TQLineEdit*)ol->first() )->installEventFilter( this ); delete ol; - d->geometryDirty = TRUE; - d->types = new TQComboBox( TRUE, this, "file types" ); - d->types->setDuplicatesEnabled( FALSE ); - d->types->setEditable( FALSE ); + d->geometryDirty = true; + d->types = new TQComboBox( true, this, "file types" ); + d->types->setDuplicatesEnabled( false ); + d->types->setEditable( false ); connect( d->types, TQ_SIGNAL(activated(const TQString&)), this, TQ_SLOT(setFilter(const TQString&)) ); connect( d->types, TQ_SIGNAL(activated(const TQString&)), @@ -2607,7 +2607,7 @@ void TQFileDialog::init() d->typeL = new TQLabel( d->types, tr("File &type:"), this, "qt_filetype_lbl" ); d->goBack = new TQToolButton( this, "go back" ); - d->goBack->setEnabled( FALSE ); + d->goBack->setEnabled( false ); d->goBack->setFocusPolicy( TabFocus ); connect( d->goBack, TQ_SIGNAL( clicked() ), this, TQ_SLOT( goBack() ) ); #ifndef TQT_NO_TOOLTIP @@ -2636,7 +2636,7 @@ void TQFileDialog::init() d->modeButtons = new TQButtonGroup( 0, "invisible group" ); connect( d->modeButtons, TQ_SIGNAL(destroyed()), this, TQ_SLOT(modeButtonsDestroyed()) ); - d->modeButtons->setExclusive( TRUE ); + d->modeButtons->setExclusive( true ); connect( d->modeButtons, TQ_SIGNAL(clicked(int)), d->stack, TQ_SLOT(raiseWidget(int)) ); connect( d->modeButtons, TQ_SIGNAL(clicked(int)), @@ -2648,7 +2648,7 @@ void TQFileDialog::init() TQToolTip::add( d->mcView, tr( "List View" ) ); #endif d->mcView->setIconSet( *multiColumnListViewIcon ); - d->mcView->setToggleButton( TRUE ); + d->mcView->setToggleButton( true ); d->stack->addWidget( d->moreFiles, d->modeButtons->insert( d->mcView ) ); d->detailView = new TQToolButton( this, "list view" ); d->detailView->setFocusPolicy( TabFocus ); @@ -2656,7 +2656,7 @@ void TQFileDialog::init() TQToolTip::add( d->detailView, tr( "Detail View" ) ); #endif d->detailView->setIconSet( *detailViewIcon ); - d->detailView->setToggleButton( TRUE ); + d->detailView->setToggleButton( true ); d->stack->addWidget( files, d->modeButtons->insert( d->detailView ) ); d->previewInfo = new TQToolButton( this, "preview info view" ); @@ -2665,7 +2665,7 @@ void TQFileDialog::init() TQToolTip::add( d->previewInfo, tr( "Preview File Info" ) ); #endif d->previewInfo->setIconSet( *previewInfoViewIcon ); - d->previewInfo->setToggleButton( TRUE ); + d->previewInfo->setToggleButton( true ); d->modeButtons->insert( d->previewInfo ); d->previewContents = new TQToolButton( this, "preview info view" ); @@ -2675,20 +2675,20 @@ void TQFileDialog::init() if ( !qstrcmp(style().className(), "TQWindowsStyle") ) #endif { - d->goBack->setAutoRaise( TRUE ); - d->cdToParent->setAutoRaise( TRUE ); - d->newFolder->setAutoRaise( TRUE ); - d->mcView->setAutoRaise( TRUE ); - d->detailView->setAutoRaise( TRUE ); - d->previewInfo->setAutoRaise( TRUE ); - d->previewContents->setAutoRaise( TRUE ); + d->goBack->setAutoRaise( true ); + d->cdToParent->setAutoRaise( true ); + d->newFolder->setAutoRaise( true ); + d->mcView->setAutoRaise( true ); + d->detailView->setAutoRaise( true ); + d->previewInfo->setAutoRaise( true ); + d->previewContents->setAutoRaise( true ); } d->previewContents->setFocusPolicy( TabFocus ); #ifndef TQT_NO_TOOLTIP TQToolTip::add( d->previewContents, tr( "Preview File Contents" ) ); #endif d->previewContents->setIconSet( *previewContentsViewIcon ); - d->previewContents->setToggleButton( TRUE ); + d->previewContents->setToggleButton( true ); d->modeButtons->insert( d->previewContents ); connect( d->detailView, TQ_SIGNAL( clicked() ), @@ -2701,18 +2701,18 @@ void TQFileDialog::init() files, TQ_SLOT( cancelRename() ) ); d->stack->raiseWidget( d->moreFiles ); - d->mcView->setOn( TRUE ); + d->mcView->setOn( true ); TQHBoxLayout *lay = new TQHBoxLayout( this ); lay->setMargin( 6 ); d->leftLayout = new TQHBoxLayout( lay, 5 ); d->topLevelLayout = new TQVBoxLayout( (TQWidget*)0, 5 ); lay->addLayout( d->topLevelLayout, 1 ); - d->extraWidgetsLayouts.setAutoDelete( FALSE ); - d->extraLabels.setAutoDelete( FALSE ); - d->extraWidgets.setAutoDelete( FALSE ); - d->extraButtons.setAutoDelete( FALSE ); - d->toolButtons.setAutoDelete( FALSE ); + d->extraWidgetsLayouts.setAutoDelete( false ); + d->extraLabels.setAutoDelete( false ); + d->extraWidgets.setAutoDelete( false ); + d->extraButtons.setAutoDelete( false ); + d->toolButtons.setAutoDelete( false ); TQHBoxLayout * h; @@ -2815,8 +2815,8 @@ void TQFileDialog::init() if ( detailViewMode ) { d->stack->raiseWidget( files ); - d->mcView->setOn( FALSE ); - d->detailView->setOn( TRUE ); + d->mcView->setOn( false ); + d->detailView->setOn( true ); } d->preview->hide(); @@ -2851,9 +2851,9 @@ void TQFileDialog::fileNameEditReturnPressed() if ( f.isDir() ) { setUrl( TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(nameEdit->text() + "/" ) ) ); - d->checkForFilter = TRUE; - trySetSelection( TRUE, d->url, TRUE ); - d->checkForFilter = FALSE; + d->checkForFilter = true; + trySetSelection( true, d->url, true ); + d->checkForFilter = false; } } nameEdit->setText( TQString::null ); @@ -2913,12 +2913,12 @@ TQFileDialog::~TQFileDialog() { // since clear might call setContentsPos which would emit // a signal and thus cause a recompute of sizes... - files->blockSignals( TRUE ); - d->moreFiles->blockSignals( TRUE ); + files->blockSignals( true ); + d->moreFiles->blockSignals( true ); files->clear(); d->moreFiles->clear(); - d->moreFiles->blockSignals( FALSE ); - files->blockSignals( FALSE ); + d->moreFiles->blockSignals( false ); + files->blockSignals( false ); #ifndef TQT_NO_CURSOR if ( d->cursorOverride ) @@ -3003,7 +3003,7 @@ void TQFileDialog::setSelectedFilter( const TQString& mask ) int n; for ( n = 0; n < d->types->count(); n++ ) { - if ( d->types->text( n ).contains( mask, FALSE ) ) { + if ( d->types->text( n ).contains( mask, false ) ) { d->types->setCurrentItem( n ); TQString f = mask; TQRegExp r( TQString::fromLatin1(qt_file_dialog_filter_reg_exp) ); @@ -3098,7 +3098,7 @@ void TQFileDialog::setSelection( const TQString & filename ) else d->url = TQUrlOperator( filename ); d->url.setNameFilter( nf ); - d->checkForFilter = TRUE; + d->checkForFilter = true; bool isDirOk; bool isDir = d->url.isDir( &isDirOk ); if ( !isDirOk ) @@ -3106,8 +3106,8 @@ void TQFileDialog::setSelection( const TQString & filename ) if ( !isDir ) { TQUrlOperator u( d->url ); d->url.setPath( d->url.dirPath() ); - trySetSelection( FALSE, u, TRUE ); - d->ignoreNextRefresh = TRUE; + trySetSelection( false, u, true ); + d->ignoreNextRefresh = true; nameEdit->selectAll(); rereadDir(); emit dirEntered( d->url.dirPath() ); @@ -3118,12 +3118,12 @@ void TQFileDialog::setSelection( const TQString & filename ) p += "/"; d->url.setPath( p ); } - trySetSelection( TRUE, d->url, FALSE ); + trySetSelection( true, d->url, false ); rereadDir(); emit dirEntered( d->url.dirPath() ); nameEdit->setText( TQString::fromLatin1("") ); } - d->checkForFilter = FALSE; + d->checkForFilter = false; } /*! @@ -3267,9 +3267,9 @@ void TQFileDialog::setDir( const TQDir &dir ) d->url = dir.canonicalPath(); d->url.setNameFilter( nf ); TQUrlInfo i( d->url, nameEdit->text() ); - d->checkForFilter = TRUE; - trySetSelection( i.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(nameEdit->text() ) ), FALSE ); - d->checkForFilter = FALSE; + d->checkForFilter = true; + trySetSelection( i.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(nameEdit->text() ) ), false ); + d->checkForFilter = false; rereadDir(); emit dirEntered( d->url.path() ); } @@ -3285,7 +3285,7 @@ void TQFileDialog::setUrl( const TQUrlOperator &url ) d->oldUrl = d->url; TQString nf = d->url.nameFilter(); - TQString operatorPath = url.toString( FALSE, FALSE ); + TQString operatorPath = url.toString( false, false ); if ( TQUrl::isRelativeUrl( operatorPath ) ) { d->url = TQUrl( d->url, operatorPath ); } else { @@ -3293,21 +3293,21 @@ void TQFileDialog::setUrl( const TQUrlOperator &url ) } d->url.setNameFilter( nf ); - d->checkForFilter = TRUE; + d->checkForFilter = true; if ( !d->url.isDir() ) { TQUrlOperator u = d->url; d->url.setPath( d->url.dirPath() ); - trySetSelection( FALSE, u, FALSE ); + trySetSelection( false, u, false ); rereadDir(); emit dirEntered( d->url.dirPath() ); TQString fn = u.fileName(); nameEdit->setText( fn ); } else { - trySetSelection( TRUE, d->url, FALSE ); + trySetSelection( true, d->url, false ); rereadDir(); emit dirEntered( d->url.dirPath() ); } - d->checkForFilter = FALSE; + d->checkForFilter = false; } /*! @@ -3315,7 +3315,7 @@ void TQFileDialog::setUrl( const TQUrlOperator &url ) \brief whether hidden files are shown in the file dialog - The default is FALSE, i.e. don't show hidden files. + The default is false, i.e. don't show hidden files. */ void TQFileDialog::setShowHiddenFiles( bool s ) @@ -3347,7 +3347,7 @@ void TQFileDialog::rereadDir() #ifndef TQT_NO_CURSOR if ( !d->cursorOverride ) { TQApplication::setOverrideCursor( TQCursor( TQt::WaitCursor ) ); - d->cursorOverride = TRUE; + d->cursorOverride = true; } #endif d->pendingItems.clear(); @@ -3357,7 +3357,7 @@ void TQFileDialog::rereadDir() #ifndef TQT_NO_CURSOR if ( d->cursorOverride ) { TQApplication::restoreOverrideCursor(); - d->cursorOverride = FALSE; + d->cursorOverride = false; } #endif } @@ -3406,7 +3406,7 @@ void TQFileDialog::rereadDir() */ extern bool tqt_resolve_symlinks; // defined in tqapplication.cpp -bool TQ_EXPORT tqt_use_native_dialogs = TRUE; +bool TQ_EXPORT tqt_use_native_dialogs = true; /*! This is a convenience static function that returns an existing file @@ -3445,7 +3445,7 @@ bool TQ_EXPORT tqt_use_native_dialogs = TRUE; Under Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. - If \a resolveSymlinks is FALSE, the file dialog will treat + If \a resolveSymlinks is false, the file dialog will treat symlinks as regular directories. \sa getOpenFileNames(), getSaveFileName(), getExistingDirectory() @@ -3507,10 +3507,10 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith, || tqApp->style().inherits("TQMacStyle"))) return qt_mac_precomposeFileName(macGetOpenFileNames(filter, startWith.isEmpty() ? 0 : workingDirectory, - parent, name, caption, selectedFilter, FALSE).first()); + parent, name, caption, selectedFilter, false).first()); #endif - TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofn", TRUE ); + TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofn", true ); TQ_CHECK_PTR( dlg ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -3576,7 +3576,7 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith, Under Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. - If \a resolveSymlinks is FALSE, the file dialog will treat + If \a resolveSymlinks is false, the file dialog will treat symlinks as regular directories. \sa getOpenFileName(), getOpenFileNames(), getExistingDirectory() @@ -3635,7 +3635,7 @@ TQString TQFileDialog::getSaveFileName( const TQString & startWith, caption, selectedFilter)); #endif - TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gsfn", TRUE ); + TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gsfn", true ); TQ_CHECK_PTR( dlg ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -3683,9 +3683,9 @@ void TQFileDialog::okClicked() if ( fn.contains("*") ) { addFilter( fn ); - nameEdit->blockSignals( TRUE ); + nameEdit->blockSignals( true ); nameEdit->setText( TQString::fromLatin1("") ); - nameEdit->blockSignals( FALSE ); + nameEdit->blockSignals( false ); return; } @@ -3714,7 +3714,7 @@ void TQFileDialog::okClicked() if ( mode() == ExistingFiles ) { if ( ! nameEdit->text().isEmpty() ) { TQStringList sf = selectedFiles(); - bool isdir = FALSE; + bool isdir = false; if ( sf.count() == 1 ) { TQUrlOperator u( d->url, sf[0] ); bool ok; @@ -3765,9 +3765,9 @@ void TQFileDialog::okClicked() } if ( f.isDir() ) { setUrl( TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(f.name() + "/" ) ) ); - d->checkForFilter = TRUE; - trySetSelection( TRUE, d->url, TRUE ); - d->checkForFilter = FALSE; + d->checkForFilter = true; + trySetSelection( true, d->url, true ); + d->checkForFilter = false; } else { if ( !nameEdit->text().contains( "/" ) && !nameEdit->text().contains( "\\" ) @@ -3830,7 +3830,7 @@ void TQFileDialog::resizeEvent( TQResizeEvent * e ) bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool updatelined ) { if ( !isDir && !u.path().isEmpty() && u.path().right( 1 ) == "/" ) - isDir = TRUE; + isDir = true; if ( u.fileName().contains( "*") && d->checkForFilter ) { TQString fn( u.fileName() ); if ( fn.contains( "*" ) ) { @@ -3838,7 +3838,7 @@ bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool upd d->currentFileName = TQString::null; d->url.setFileName( TQString::null ); nameEdit->setText( TQString::fromLatin1("") ); - return FALSE; + return false; } } @@ -3873,9 +3873,9 @@ bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool upd } if ( !d->currentFileName.isNull() || isDir ) { - okB->setEnabled( TRUE ); + okB->setEnabled( true ); } else if ( !isDirectoryMode( d->mode ) ) { - okB->setEnabled( FALSE ); + okB->setEnabled( false ); } if ( d->currentFileName.length() && old != d->currentFileName ) @@ -3893,7 +3893,7 @@ void TQFileDialog::updateGeometries() if ( !d || !d->geometryDirty ) return; - d->geometryDirty = FALSE; + d->geometryDirty = false; TQSize r, t; @@ -3990,19 +3990,19 @@ void TQFileDialog::updateFileNameEdit( TQListViewItem * newItem ) if ( mode() == ExistingFiles ) { detailViewSelectionChanged(); TQUrl u( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)files->currentItem())->info.name() ) ); - TQFileInfo fi( u.toString( FALSE, FALSE ) ); + TQFileInfo fi( u.toString( false, false ) ); if ( !fi.isDir() ) - emit fileHighlighted( u.toString( FALSE, FALSE ) ); + emit fileHighlighted( u.toString( false, false ) ); } else if ( files->isSelected( newItem ) ) { TQFileDialogPrivate::File * i = (TQFileDialogPrivate::File *)newItem; if ( i && i->i && !i->i->isSelected() ) { - d->moreFiles->blockSignals( TRUE ); - d->moreFiles->setSelected( i->i, TRUE ); - d->moreFiles->blockSignals( FALSE ); + d->moreFiles->blockSignals( true ); + d->moreFiles->setSelected( i->i, true ); + d->moreFiles->blockSignals( false ); } // Encode the filename in case it had any special characters in it TQString encFile = TQFileDialogPrivate::encodeFileName( newItem->text( 0 ) ); - trySetSelection( i->info.isDir(), TQUrlOperator( d->url, encFile ), TRUE ); + trySetSelection( i->info.isDir(), TQUrlOperator( d->url, encFile ), true ); } } @@ -4014,7 +4014,7 @@ void TQFileDialog::detailViewSelectionChanged() nameEdit->clear(); TQString str; TQListViewItem * i = files->firstChild(); - d->moreFiles->blockSignals( TRUE ); + d->moreFiles->blockSignals( true ); while( i ) { if ( d->moreFiles && isVisible() ) { TQFileDialogPrivate::File *f = (TQFileDialogPrivate::File *)i; @@ -4025,10 +4025,10 @@ void TQFileDialog::detailViewSelectionChanged() str += TQString( "\"%1\" " ).arg( i->text( 0 ) ); i = i->nextSibling(); } - d->moreFiles->blockSignals( FALSE ); + d->moreFiles->blockSignals( false ); nameEdit->setText( str ); nameEdit->setCursorPosition( str.length() ); - okB->setEnabled( TRUE ); + okB->setEnabled( true ); if ( d->preview && d->preview->isVisible() && files->currentItem() ) { TQUrl u = TQUrl( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)files->currentItem())->info.name() ) ); updatePreviews( u ); @@ -4041,7 +4041,7 @@ void TQFileDialog::listBoxSelectionChanged() return; if ( d->ignoreNextRefresh ) { - d->ignoreNextRefresh = FALSE; + d->ignoreNextRefresh = false; return; } @@ -4050,7 +4050,7 @@ void TQFileDialog::listBoxSelectionChanged() TQListBoxItem * i = d->moreFiles->item( 0 ); TQListBoxItem * j = 0; int index = 0; - files->blockSignals( TRUE ); + files->blockSignals( true ); while( i ) { TQFileDialogPrivate::MCItem *mcitem = (TQFileDialogPrivate::MCItem *)i; if ( files && isVisible() ) { @@ -4068,7 +4068,7 @@ void TQFileDialog::listBoxSelectionChanged() if ( mcitem->isSelected() && i != d->lastEFSelected ) { TQUrl u( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)(mcitem)->i)->info.name()) ); d->lastEFSelected = i; - emit fileHighlighted( u.toString(FALSE, FALSE) ); + emit fileHighlighted( u.toString(false, false) ); } } } @@ -4081,10 +4081,10 @@ void TQFileDialog::listBoxSelectionChanged() i = d->moreFiles->item( ++index ); } - files->blockSignals( FALSE ); + files->blockSignals( false ); nameEdit->setText( str ); nameEdit->setCursorPosition( str.length() ); - okB->setEnabled( TRUE ); + okB->setEnabled( true ); if ( d->preview && d->preview->isVisible() && j ) { TQUrl u = TQUrl( d->url, TQFileDialogPrivate::encodeFileName( ( (TQFileDialogPrivate::File*)( (TQFileDialogPrivate::MCItem*)j )->i )->info.name() ) ); @@ -4113,7 +4113,7 @@ void TQFileDialog::fileNameEditDone() TQUrlInfo f( d->url, nameEdit->text() ); if ( mode() != TQFileDialog::ExistingFiles ) { TQUrlOperator u( d->url, TQFileDialogPrivate::encodeFileName( nameEdit->text() ) ); - trySetSelection( f.isDir(), u, FALSE ); + trySetSelection( f.isDir(), u, false ); if ( d->preview && d->preview->isVisible() ) updatePreviews( u ); } @@ -4152,10 +4152,10 @@ void TQFileDialog::selectDirectoryOrFile( TQListViewItem * newItem ) setUrl( TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) + "/" ) ); if ( isDirectoryMode( mode() ) ) { TQUrlInfo f ( d->url, TQString::fromLatin1( "." ) ); - trySetSelection( f.isDir(), d->url, TRUE ); + trySetSelection( f.isDir(), d->url, true ); } } else if ( newItem->isSelectable() && - trySetSelection( i->info.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) ), TRUE ) ) { + trySetSelection( i->info.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) ), true ) ) { if ( !isDirectoryMode( mode() ) ) { if ( mode() == ExistingFile ) { if ( TQFileDialogPrivate::fileExists( d->url, nameEdit->text() ) ) { @@ -4194,16 +4194,16 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p, { if ( item ) { files->setCurrentItem( item ); - files->setSelected( item, TRUE ); + files->setSelected( item, true ); } PopupAction action; - popupContextMenu( item ? item->text( 0 ) : TQString::null, TRUE, action, p ); + popupContextMenu( item ? item->text( 0 ) : TQString::null, true, action, p ); if ( action == PA_Open ) selectDirectoryOrFile( item ); else if ( action == PA_Rename ) - files->startRename( FALSE ); + files->startRename( false ); else if ( action == PA_Delete ) deleteFile( item ? item->text( 0 ) : TQString::null ); else if ( action == PA_Reload ) @@ -4213,19 +4213,19 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p, rereadDir(); } else if ( action == PA_SortName ) { sortFilesBy = (int)TQDir::Name; - sortAscending = TRUE; + sortAscending = true; resortDir(); } else if ( action == PA_SortSize ) { sortFilesBy = (int)TQDir::Size; - sortAscending = TRUE; + sortAscending = true; resortDir(); } else if ( action == PA_SortDate ) { sortFilesBy = (int)TQDir::Time; - sortAscending = TRUE; + sortAscending = true; resortDir(); } else if ( action == PA_SortUnsorted ) { sortFilesBy = (int)TQDir::Unsorted; - sortAscending = TRUE; + sortAscending = true; resortDir(); } @@ -4234,12 +4234,12 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p, void TQFileDialog::popupContextMenu( TQListBoxItem *item, const TQPoint & p ) { PopupAction action; - popupContextMenu( item ? item->text() : TQString::null, FALSE, action, p ); + popupContextMenu( item ? item->text() : TQString::null, false, action, p ); if ( action == PA_Open ) selectDirectoryOrFile( item ); else if ( action == PA_Rename ) - d->moreFiles->startRename( FALSE ); + d->moreFiles->startRename( false ); else if ( action == PA_Delete ) deleteFile( item->text() ); else if ( action == PA_Reload ) @@ -4249,19 +4249,19 @@ void TQFileDialog::popupContextMenu( TQListBoxItem *item, const TQPoint & p ) rereadDir(); } else if ( action == PA_SortName ) { sortFilesBy = (int)TQDir::Name; - sortAscending = TRUE; + sortAscending = true; resortDir(); } else if ( action == PA_SortSize ) { sortFilesBy = (int)TQDir::Size; - sortAscending = TRUE; + sortAscending = true; resortDir(); } else if ( action == PA_SortDate ) { sortFilesBy = (int)TQDir::Time; - sortAscending = TRUE; + sortAscending = true; resortDir(); } else if ( action == PA_SortUnsorted ) { sortFilesBy = (int)TQDir::Unsorted; - sortAscending = TRUE; + sortAscending = true; resortDir(); } } @@ -4274,7 +4274,7 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool, bool glob = filename.isEmpty(); TQPopupMenu m( 0, "file dialog context menu" ); - m.setCheckable( TRUE ); + m.setCheckable( true ); if ( !glob ) { TQString okt; @@ -4295,9 +4295,9 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool, if ( filename.isEmpty() || !TQUrlInfo( d->url, filename ).isWritable() || filename == ".." ) { if ( filename.isEmpty() || !TQUrlInfo( d->url, filename ).isReadable() ) - m.setItemEnabled( ok, FALSE ); - m.setItemEnabled( rename, FALSE ); - m.setItemEnabled( del, FALSE ); + m.setItemEnabled( ok, false ); + m.setItemEnabled( rename, false ); + m.setItemEnabled( del, false ); } m.move( p ); @@ -4321,18 +4321,18 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool, m2.insertSeparator(); int sunsorted = m2.insertItem( tr( "&Unsorted" ) ); - //m2.setItemEnabled( stype, FALSE ); + //m2.setItemEnabled( stype, false ); if ( sortFilesBy == (int)TQDir::Name ) - m2.setItemChecked( sname, TRUE ); + m2.setItemChecked( sname, true ); else if ( sortFilesBy == (int)TQDir::Size ) - m2.setItemChecked( ssize, TRUE ); + m2.setItemChecked( ssize, true ); // else if ( sortFilesBy == 0x16 ) -// m2.setItemChecked( stype, TRUE ); +// m2.setItemChecked( stype, true ); else if ( sortFilesBy == (int)TQDir::Time ) - m2.setItemChecked( sdate, TRUE ); + m2.setItemChecked( sdate, true ); else if ( sortFilesBy == (int)TQDir::Unsorted ) - m2.setItemChecked( sunsorted, TRUE ); + m2.setItemChecked( sunsorted, true ); m.insertItem( tr( "Sort" ), &m2 ); @@ -4436,7 +4436,7 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation * for ( uint i = 0; i < d->moreFiles->count(); ++i ) { if ( d->moreFiles->text( i ) == info.name() ) { d->moreFiles->setCurrentItem( i ); - d->moreFiles->startRename( FALSE ); + d->moreFiles->startRename( false ); break; } } @@ -4444,9 +4444,9 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation * TQListViewItem *item = files->firstChild(); while ( item ) { if ( item->text( 0 ) == info.name() ) { - files->setSelected( item, TRUE ); + files->setSelected( item, true ); files->setCurrentItem( item ); - files->startRename( FALSE ); + files->startRename( false ); break; } item = item->nextSibling(); @@ -4465,7 +4465,7 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation * this, "get existing directory", "Choose a directory", - TRUE ); + true ); \endcode This function creates a modal file dialog called \a name, with @@ -4479,13 +4479,13 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation * Note on Windows that if \a dir is TQString::null then the dialog's working directory will be set to the user's My Documents directory. - If \a dirOnly is TRUE, then only directories will be shown in + If \a dirOnly is true, then only directories will be shown in the file dialog; otherwise both directories and files will be shown. Under Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. - If \a resolveSymlinks is FALSE, the file dialog will treat + If \a resolveSymlinks is false, the file dialog will treat symlinks as regular directories. Under Windows and Mac OS X, this static function will use the native @@ -4544,10 +4544,10 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir, if( tqt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE) || tqApp->style().inherits("TQMacStyle"))) return qt_mac_precomposeFileName(macGetOpenFileNames("", initialDir, parent, name, - caption, 0, FALSE, TRUE).first()); + caption, 0, false, true).first()); #endif - TQFileDialog *dlg = new TQFileDialog( parent, name ? name : "qt_filedlg_ged", TRUE ); + TQFileDialog *dlg = new TQFileDialog( parent, name ? name : "qt_filedlg_ged", true ); TQ_CHECK_PTR( dlg ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -4561,7 +4561,7 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir, dlg->d->types->clear(); dlg->d->types->insertItem( TQFileDialog::tr("Directories") ); - dlg->d->types->setEnabled( FALSE ); + dlg->d->types->setEnabled( false ); TQString dir_( dir ); dir_ = dir_.simplifyWhiteSpace(); @@ -4635,32 +4635,32 @@ void TQFileDialog::setMode( Mode newMode ) d->moreFiles->setSelectionMode( TQListBox::Single ); if ( sel.isNull() ) sel = TQString::fromLatin1("."); - d->types->setEnabled( FALSE ); + d->types->setEnabled( false ); } else if ( newMode == ExistingFiles ) { maxnamelen = INT_MAX; files->setSelectionMode( TQListView::Extended ); d->moreFiles->setSelectionMode( TQListBox::Extended ); - d->types->setEnabled( TRUE ); + d->types->setEnabled( true ); } else { files->setSelectionMode( TQListView::Single ); d->moreFiles->setSelectionMode( TQListBox::Single ); - d->types->setEnabled( TRUE ); + d->types->setEnabled( true ); } nameEdit->setMaxLength(maxnamelen); rereadDir(); TQUrlInfo f( d->url, "." ); - trySetSelection( f.isDir(), d->url, FALSE ); + trySetSelection( f.isDir(), d->url, false ); } TQString okt; - bool changeFilters = FALSE; + bool changeFilters = false; if ( mode() == AnyFile ) { okt = tr("&Save"); d->fileL->setText( tr("File &name:") ); if ( d->types->count() == 1 ) { d->types->setCurrentItem( 0 ); if ( d->types->currentText() == "Directories" ) { - changeFilters = TRUE; + changeFilters = true; } } } @@ -4676,7 +4676,7 @@ void TQFileDialog::setMode( Mode newMode ) if ( d->types->count() == 1 ) { d->types->setCurrentItem( 0 ); if ( d->types->currentText() == "Directories" ) { - changeFilters = TRUE; + changeFilters = true; } } } @@ -4742,15 +4742,15 @@ TQFileDialog::ViewMode TQFileDialog::viewMode() const void TQFileDialog::setViewMode( ViewMode m ) { if ( m == Detail ) { - detailViewMode = TRUE; + detailViewMode = true; d->stack->raiseWidget( files ); - d->detailView->setOn( TRUE ); - d->mcView->setOn( FALSE ); + d->detailView->setOn( true ); + d->mcView->setOn( false ); } else if ( m == List ) { - detailViewMode = FALSE; + detailViewMode = false; d->stack->raiseWidget( d->moreFiles ); - d->detailView->setOn( FALSE ); - d->mcView->setOn( TRUE ); + d->detailView->setOn( false ); + d->mcView->setOn( true ); } } @@ -4772,15 +4772,15 @@ void TQFileDialog::setViewMode( ViewMode m ) void TQFileDialog::setPreviewMode( PreviewMode m ) { if ( m == NoPreview ) { - d->previewInfo->setOn( FALSE ); - d->previewContents->setOn( FALSE ); + d->previewInfo->setOn( false ); + d->previewContents->setOn( false ); } else if ( m == Info && d->infoPreview ) { - d->previewInfo->setOn( TRUE ); - d->previewContents->setOn( FALSE ); + d->previewInfo->setOn( true ); + d->previewContents->setOn( false ); changeMode( d->modeButtons->id( d->previewInfo ) ); } else if ( m == Contents && d->contentsPreview ) { - d->previewInfo->setOn( FALSE ); - d->previewContents->setOn( TRUE ); + d->previewInfo->setOn( false ); + d->previewContents->setOn( true ); changeMode( d->modeButtons->id( d->previewContents ) ); } } @@ -4827,7 +4827,7 @@ void TQFileDialog::addWidgets( TQLabel * l, TQWidget * w, TQPushButton * b ) if ( !l && !w && !b ) return; - d->geometryDirty = TRUE; + d->geometryDirty = true; TQHBoxLayout *lay = new TQHBoxLayout(); d->extraWidgetsLayouts.append( lay ); @@ -4859,7 +4859,7 @@ void TQFileDialog::addWidgets( TQLabel * l, TQWidget * w, TQPushButton * b ) /*! Adds the tool button \a b to the row of tool buttons at the top of the file dialog. The button is appended to the right of - this row. If \a separator is TRUE, a small space is inserted between the + this row. If \a separator is true, a small space is inserted between the last button of the row and the new button \a b. \sa addWidgets(), addLeftWidget(), addRightWidget() @@ -4870,7 +4870,7 @@ void TQFileDialog::addToolButton( TQButton *b, bool separator ) if ( !b || !d->buttonLayout ) return; - d->geometryDirty = TRUE; + d->geometryDirty = true; d->toolButtons.append( b ); if ( separator ) @@ -4890,7 +4890,7 @@ void TQFileDialog::addLeftWidget( TQWidget *w ) { if ( !w ) return; - d->geometryDirty = TRUE; + d->geometryDirty = true; d->leftLayout->addWidget( w ); d->leftLayout->addSpacing( 5 ); @@ -4908,7 +4908,7 @@ void TQFileDialog::addRightWidget( TQWidget *w ) { if ( !w ) return; - d->geometryDirty = TRUE; + d->geometryDirty = true; d->rightLayout->addSpacing( 5 ); d->rightLayout->addWidget( w ); @@ -4949,7 +4949,7 @@ void TQFileDialog::keyPressEvent( TQKeyEvent * ke ) while ( i && nameEdit->text() != i->text( 0 ) ) i = i->nextSibling(); if ( i ) - files->setSelected( i, TRUE ); + files->setSelected( i, true ); else ke->accept(); // strangely, means to ignore that event } @@ -4961,7 +4961,7 @@ void TQFileDialog::keyPressEvent( TQKeyEvent * ke ) ke->ignore(); } - d->ignoreNextKeyPress = FALSE; + d->ignoreNextKeyPress = false; if ( !ke->isAccepted() ) { TQDialog::keyPressEvent( ke ); @@ -5230,7 +5230,7 @@ const TQPixmap * TQWindowsIconProvider::pixmap( const TQFileInfo &fi ) return pixmap(TQFileInfo(real)); } - TQString ext = fi.extension( FALSE ).upper(); + TQString ext = fi.extension( false ).upper(); TQString key = ext; ext.prepend( "." ); TQMap< TQString, TQPixmap >::Iterator it; @@ -5386,38 +5386,38 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e ) if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F5 ) { rereadDir(); ((TQKeyEvent *)e)->accept(); - return TRUE; + return true; } else if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F2 && ( o == files || o == files->viewport() ) ) { if ( files->isVisible() && files->currentItem() ) { if ( TQUrlInfo( d->url, "." ).isWritable() && files->currentItem()->text( 0 ) != ".." ) { files->renameItem = files->currentItem(); - files->startRename( TRUE ); + files->startRename( true ); } } ((TQKeyEvent *)e)->accept(); - return TRUE; + return true; } else if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F2 && ( o == d->moreFiles || o == d->moreFiles->viewport() ) ) { if ( d->moreFiles->isVisible() && d->moreFiles->currentItem() != -1 ) { if ( TQUrlInfo( d->url, "." ).isWritable() && d->moreFiles->item( d->moreFiles->currentItem() )->text() != ".." ) { d->moreFiles->renameItem = d->moreFiles->item( d->moreFiles->currentItem() ); - d->moreFiles->startRename( TRUE ); + d->moreFiles->startRename( true ); } } ((TQKeyEvent *)e)->accept(); - return TRUE; + return true; } else if ( e->type() == TQEvent::KeyPress && d->moreFiles->renaming ) { d->moreFiles->lined->setFocus(); TQApplication::sendEvent( d->moreFiles->lined, e ); ((TQKeyEvent *)e)->accept(); - return TRUE; + return true; } else if ( e->type() == TQEvent::KeyPress && files->renaming ) { files->lined->setFocus(); TQApplication::sendEvent( files->lined, e ); ((TQKeyEvent *)e)->accept(); - return TRUE; + return true; } else if ( e->type() == TQEvent::KeyPress && ((TQKeyEvent *)e)->key() == Key_Backspace && ( o == files || @@ -5426,7 +5426,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e ) o == d->moreFiles->viewport() ) ) { cdUpClicked(); ((TQKeyEvent *)e)->accept(); - return TRUE; + return true; } else if ( e->type() == TQEvent::KeyPress && ((TQKeyEvent *)e)->key() == Key_Delete && ( o == files || @@ -5434,7 +5434,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e ) if ( files->currentItem() ) deleteFile( files->currentItem()->text( 0 ) ); ((TQKeyEvent *)e)->accept(); - return TRUE; + return true; } else if ( e->type() == TQEvent::KeyPress && ((TQKeyEvent *)e)->key() == Key_Delete && ( o == d->moreFiles || @@ -5443,7 +5443,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e ) if ( c >= 0 ) deleteFile( d->moreFiles->item( c )->text() ); ((TQKeyEvent *)e)->accept(); - return TRUE; + return true; } else if ( o == files && e->type() == TQEvent::FocusOut && files->currentItem() ) { } else if ( o == files && e->type() == TQEvent::KeyPress ) { TQTimer::singleShot( 0, this, TQ_SLOT(fixupNameEdit()) ); @@ -5468,23 +5468,23 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e ) nt = i->text( 0 ); int cp = nameEdit->cursorPosition()+1; nameEdit->validateAndSet( nt, cp, cp, nt.length() ); - return TRUE; + return true; } } } else if ( o == nameEdit && e->type() == TQEvent::FocusIn ) { fileNameEditDone(); } else if ( d->moreFiles->renaming && o != d->moreFiles->lined && e->type() == TQEvent::FocusIn ) { d->moreFiles->lined->setFocus(); - return TRUE; + return true; } else if ( files->renaming && o != files->lined && e->type() == TQEvent::FocusIn ) { files->lined->setFocus(); - return TRUE; + return true; } else if ( ( o == d->moreFiles || o == d->moreFiles->viewport() ) && e->type() == TQEvent::FocusIn ) { if ( ( o == d->moreFiles->viewport() && !d->moreFiles->viewport()->hasFocus() ) || ( o == d->moreFiles && !d->moreFiles->hasFocus() ) ) ((TQWidget*)o)->setFocus(); - return FALSE; + return false; } return TQDialog::eventFilter( o, e ); @@ -5640,7 +5640,7 @@ void TQFileDialog::modeButtonsDestroyed() Under Unix/X11, the normal behavior of the file dialog is to resolve and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp, the file dialog will change to /var/tmp after entering /usr/tmp. - If \a resolveSymlinks is FALSE, the file dialog will treat + If \a resolveSymlinks is false, the file dialog will treat symlinks as regular directories. Note that if you want to iterate over the list of files, you should @@ -5707,7 +5707,7 @@ TQStringList TQFileDialog::getOpenFileNames( const TQString & filter, } #endif - TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofns", TRUE ); + TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofns", true ); TQ_CHECK_PTR( dlg ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -5761,21 +5761,21 @@ static bool isRoot( const TQUrl &u ) #if defined(Q_OS_MAC9) TQString p = TQDir::convertSeparators(u.path()); if(p.contains(':') == 1) - return TRUE; + return true; #elif defined(Q_OS_UNIX) if ( u.path() == "/" ) - return TRUE; + return true; #elif defined(Q_OS_WIN32) TQString p = u.path(); 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; } #else #if defined(Q_CC_GNU) @@ -5784,9 +5784,9 @@ static bool isRoot( const TQUrl &u ) #endif if ( !u.isLocalFile() && u.path() == "/" ) - return TRUE; + return true; - return FALSE; + return false; } void TQFileDialog::urlStart( TQNetworkOperation *op ) @@ -5801,13 +5801,13 @@ void TQFileDialog::urlStart( TQNetworkOperation *op ) #ifndef TQT_NO_CURSOR if ( !d->cursorOverride ) { TQApplication::setOverrideCursor( TQCursor( TQt::WaitCursor ) ); - d->cursorOverride = TRUE; + d->cursorOverride = true; } #endif if ( isRoot( d->url ) ) - d->cdToParent->setEnabled( FALSE ); + d->cdToParent->setEnabled( false ); else - d->cdToParent->setEnabled( TRUE ); + d->cdToParent->setEnabled( true ); d->mimeTypeTimer->stop(); d->sortedList.clear(); d->pendingItems.clear(); @@ -5817,15 +5817,15 @@ void TQFileDialog::urlStart( TQNetworkOperation *op ) files->clear(); files->setSorting( -1 ); - TQString s = d->url.toString( FALSE, FALSE ); - bool found = FALSE; + TQString s = d->url.toString( false, false ); + bool found = false; for ( int i = 0; i < d->paths->count(); ++i ) { #if defined(TQ_WS_WIN) if ( d->paths->text( i ).lower() == s.lower() ) { #else if ( d->paths->text( i ) == s ) { #endif - found = TRUE; + found = true; d->paths->setCurrentItem( i ); break; } @@ -5835,12 +5835,12 @@ void TQFileDialog::urlStart( TQNetworkOperation *op ) d->paths->setCurrentItem( d->paths->count() - 1 ); } d->last = 0; - d->hadDotDot = FALSE; + d->hadDotDot = false; if ( d->goBack && d->history.last() != d->url.toString() ) { d->history.append( d->url.toString() ); if ( d->history.count() > 1 ) - d->goBack->setEnabled( TRUE ); + d->goBack->setEnabled( true ); } } } @@ -5854,16 +5854,16 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op ) if ( op->operation() == TQNetworkProtocol::OpListChildren && d->cursorOverride ) { TQApplication::restoreOverrideCursor(); - d->cursorOverride = FALSE; + d->cursorOverride = false; } #endif if ( op->state() == TQNetworkProtocol::StFailed ) { if ( d->paths->hasFocus() ) - d->ignoreNextKeyPress = TRUE; + d->ignoreNextKeyPress = true; if ( d->progressDia ) { - d->ignoreStop = TRUE; + d->ignoreStop = true; d->progressDia->close(); delete d->progressDia; d->progressDia = 0; @@ -5886,17 +5886,17 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op ) } else if ( op->operation() == TQNetworkProtocol::OpListChildren && op == d->currListChildren ) { if ( !d->hadDotDot && !isRoot( d->url ) ) { - bool ok = TRUE; + bool ok = true; #if defined(TQ_WS_WIN) if ( d->url.path().left( 2 ) == "//" ) - ok = FALSE; + ok = false; #endif if ( ok ) { TQUrlInfo ui( d->url, ".." ); ui.setName( ".." ); - ui.setDir( TRUE ); - ui.setFile( FALSE ); - ui.setSymLink( FALSE ); + ui.setDir( true ); + ui.setFile( false ); + ui.setSymLink( false ); ui.setSize( 0 ); TQValueList<TQUrlInfo> lst; lst << ui; @@ -5908,7 +5908,7 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op ) } else if ( op->operation() == TQNetworkProtocol::OpPut ) { rereadDir(); if ( d->progressDia ) { - d->ignoreStop = TRUE; + d->ignoreStop = true; d->progressDia->close(); } delete d->progressDia; @@ -5937,7 +5937,7 @@ void TQFileDialog::dataTransferProgress( int bytesDone, int bytesTotal, TQNetwor if ( !d->progressDia ) { if ( bytesDone < bytesTotal) { - d->ignoreStop = FALSE; + d->ignoreStop = false; d->progressDia = new TQFDProgressDialog( this, label, bytesTotal ); connect( d->progressDia, TQ_SIGNAL( cancelled() ), this, TQ_SLOT( stopCopy() ) ); @@ -5973,7 +5973,7 @@ void TQFileDialog::insertEntry( const TQValueList<TQUrlInfo> &lst, TQNetworkOper if ( d->mode == DirectoryOnly && !inf.isDir() ) continue; if ( inf.name() == ".." ) { - d->hadDotDot = TRUE; + d->hadDotDot = true; if ( isRoot( d->url ) ) continue; #if defined(TQ_WS_WIN) @@ -6018,8 +6018,8 @@ void TQFileDialog::insertEntry( const TQValueList<TQUrlInfo> &lst, TQNetworkOper if ( ( d->mode == ExistingFiles && inf.isDir() ) || ( isDirectoryMode( d->mode ) && inf.isFile() ) ) { - i->setSelectable( FALSE ); - i2->setSelectable( FALSE ); + i->setSelectable( false ); + i2->setSelectable( false ); } i->i = i2; @@ -6036,7 +6036,7 @@ void TQFileDialog::removeEntry( TQNetworkOperation *op ) TQUrlInfo *i = 0; TQListViewItemIterator it( files ); - bool ok1 = FALSE, ok2 = FALSE; + bool ok1 = false, ok2 = false; for ( i = d->sortedList.first(); it.current(); ++it, i = d->sortedList.next() ) { TQString encName = TQFileDialogPrivate::encodeFileName( ( (TQFileDialogPrivate::File*)it.current() )->info.name() ); @@ -6044,12 +6044,12 @@ void TQFileDialog::removeEntry( TQNetworkOperation *op ) d->pendingItems.removeRef( (TQFileDialogPrivate::File*)it.current() ); delete ( (TQFileDialogPrivate::File*)it.current() )->i; delete it.current(); - ok1 = TRUE; + ok1 = true; } if ( i && i->name() == op->arg( 0 ) ) { d->sortedList.removeRef( i ); i = d->sortedList.prev(); - ok2 = TRUE; + ok2 = true; } if ( ok1 && ok2 ) break; @@ -6063,18 +6063,18 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op ) TQUrlInfo *i = 0; TQListViewItemIterator it1( files ); - bool ok1 = FALSE, ok2 = FALSE; + bool ok1 = false, ok2 = false; // first check whether the new file replaces an existing file. for ( i = d->sortedList.first(); it1.current(); ++it1, i = d->sortedList.next() ) { if ( ( (TQFileDialogPrivate::File*)it1.current() )->info.name() == op->arg( 1 ) ) { delete ( (TQFileDialogPrivate::File*)it1.current() )->i; delete it1.current(); - ok1 = TRUE; + ok1 = true; } if ( i && i->name() == op->arg( 1 ) ) { d->sortedList.removeRef( i ); i = d->sortedList.prev(); - ok2 = TRUE; + ok2 = true; } if ( ok1 && ok2 ) break; @@ -6082,16 +6082,16 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op ) i = 0; TQListViewItemIterator it( files ); - ok1 = FALSE; - ok2 = FALSE; + ok1 = false; + ok2 = false; for ( i = d->sortedList.first(); it.current(); ++it, i = d->sortedList.next() ) { if ( ( (TQFileDialogPrivate::File*)it.current() )->info.name() == op->arg( 0 ) ) { ( (TQFileDialogPrivate::File*)it.current() )->info.setName( op->arg( 1 ) ); - ok1 = TRUE; + ok1 = true; } if ( i && i->name() == op->arg( 0 ) ) { i->setName( op->arg( 1 ) ); - ok2 = TRUE; + ok2 = true; } if ( ok1 && ok2 ) break; @@ -6106,7 +6106,7 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op ) \brief whether the file dialog can provide preview information about the currently selected file - The default is FALSE. + The default is false. */ bool TQFileDialog::isInfoPreviewEnabled() const { @@ -6117,7 +6117,7 @@ void TQFileDialog::setInfoPreviewEnabled( bool info ) { if ( info == d->infoPreview ) return; - d->geometryDirty = TRUE; + d->geometryDirty = true; d->infoPreview = info; updateGeometries(); } @@ -6129,7 +6129,7 @@ void TQFileDialog::setInfoPreviewEnabled( bool info ) \brief whether the file dialog can provide a contents preview of the currently selected file - The default is FALSE. + The default is false. \sa setContentsPreview() setInfoPreviewEnabled() */ @@ -6145,7 +6145,7 @@ void TQFileDialog::setContentsPreviewEnabled( bool contents ) { if ( contents == d->contentsPreview ) return; - d->geometryDirty = TRUE; + d->geometryDirty = true; d->contentsPreview = contents; updateGeometries(); } @@ -6185,7 +6185,7 @@ void TQFileDialog::setContentsPreviewEnabled( bool contents ) Preview* p = new Preview; TQFileDialog* fd = new TQFileDialog( this ); - fd->setInfoPreviewEnabled( TRUE ); + fd->setInfoPreviewEnabled( true ); fd->setInfoPreview( p, p ); fd->setPreviewMode( TQFileDialog::Info ); fd->show(); @@ -6245,7 +6245,7 @@ void TQFileDialog::setInfoPreview( TQWidget *w, TQFilePreview *preview ) Preview* p = new Preview; TQFileDialog* fd = new TQFileDialog( this ); - fd->setContentsPreviewEnabled( TRUE ); + fd->setContentsPreviewEnabled( true ); fd->setContentsPreview( p, p ); fd->setPreviewMode( TQFileDialog::Contents ); fd->show(); @@ -6300,8 +6300,8 @@ void TQFileDialog::resortDir() d->pendingItems.append( item ); if ( ( d->mode == ExistingFiles && item->info.isDir() ) || ( isDirectoryMode( d->mode ) && item->info.isFile() ) ) { - item->setSelectable( FALSE ); - item2->setSelectable( FALSE ); + item->setSelectable( false ); + item2->setSelectable( false ); } } @@ -6323,13 +6323,13 @@ void TQFileDialog::stopCopy() if ( d->ignoreStop ) return; - d->url.blockSignals( TRUE ); + d->url.blockSignals( true ); d->url.stop(); if ( d->progressDia ) { - d->ignoreStop = TRUE; + d->ignoreStop = true; TQTimer::singleShot( 100, this, TQ_SLOT( removeProgressDia() ) ); } - d->url.blockSignals( FALSE ); + d->url.blockSignals( false ); } /*! @@ -6365,30 +6365,30 @@ void TQFileDialog::doMimeTypeLookup() if ( item ) { TQFileInfo fi; if ( d->url.isLocalFile() ) { - fi.setFile( TQUrl( d->url.path(), TQFileDialogPrivate::encodeFileName( item->info.name() ) ).path( FALSE ) ); + fi.setFile( TQUrl( d->url.path(), TQFileDialogPrivate::encodeFileName( item->info.name() ) ).path( false ) ); } else fi.setFile( item->info.name() ); // ##### const TQPixmap *p = iconProvider()->pixmap( fi ); if ( p && p != item->pixmap( 0 ) && ( !item->pixmap( 0 ) || p->serialNumber() != item->pixmap( 0 )->serialNumber() ) && p != fifteenTransparentPixels ) { - item->hasMimePixmap = TRUE; + item->hasMimePixmap = true; // evil hack to avoid much too much repaints! TQGuardedPtr<TQFileDialog> that( this ); // this may be deleted by an event handler tqApp->processEvents(); if ( that.isNull() ) return; - files->setUpdatesEnabled( FALSE ); - files->viewport()->setUpdatesEnabled( FALSE ); + files->setUpdatesEnabled( false ); + files->viewport()->setUpdatesEnabled( false ); if ( item != d->pendingItems.first() ) return; item->setPixmap( 0, *p ); tqApp->processEvents(); if ( that.isNull() ) return; - files->setUpdatesEnabled( TRUE ); - files->viewport()->setUpdatesEnabled( TRUE ); + files->setUpdatesEnabled( true ); + files->viewport()->setUpdatesEnabled( true ); if ( files->isVisible() ) { TQRect ir( files->itemRect( item ) ); @@ -6407,19 +6407,19 @@ void TQFileDialog::doMimeTypeLookup() } if ( d->moreFiles->isVisible() ) { - d->moreFiles->viewport()->repaint( r, FALSE ); + d->moreFiles->viewport()->repaint( r, false ); } else { - files->viewport()->repaint( r, FALSE ); + files->viewport()->repaint( r, false ); } if ( d->pendingItems.count() ) d->mimeTypeTimer->start( 0 ); else if ( d->moreFiles->isVisible() ) - d->moreFiles->triggerUpdate( TRUE ); + d->moreFiles->triggerUpdate( true ); } /*! - If \a b is TRUE then all the files in the current directory are selected; + If \a b is true then all the files in the current directory are selected; otherwise, they are deselected. */ @@ -6437,7 +6437,7 @@ void TQFileDialog::goBack() return; d->history.remove( d->history.last() ); if ( d->history.count() < 2 ) - d->goBack->setEnabled( FALSE ); + d->goBack->setEnabled( false ); setUrl( d->history.last() ); } diff --git a/src/dialogs/tqfiledialog.h b/src/dialogs/tqfiledialog.h index 23cd5476e..912c9a557 100644 --- a/src/dialogs/tqfiledialog.h +++ b/src/dialogs/tqfiledialog.h @@ -108,8 +108,8 @@ class TQ_EXPORT TQFileDialog : public TQDialog public: TQFileDialog( const TQString& dirName, const TQString& filter = TQString::null, - TQWidget* parent=0, const char* name=0, bool modal = FALSE ); - TQFileDialog( TQWidget* parent=0, const char* name=0, bool modal = FALSE ); + TQWidget* parent=0, const char* name=0, bool modal = false ); + TQFileDialog( TQWidget* parent=0, const char* name=0, bool modal = false ); ~TQFileDialog(); // recommended static functions @@ -119,26 +119,26 @@ public: TQWidget *parent = 0, const char* name = 0, const TQString &caption = TQString::null, TQString *selectedFilter = 0, - bool resolveSymlinks = TRUE); + bool resolveSymlinks = true); static TQString getSaveFileName( const TQString &initially = TQString::null, const TQString &filter = TQString::null, TQWidget *parent = 0, const char* name = 0, const TQString &caption = TQString::null, TQString *selectedFilter = 0, - bool resolveSymlinks = TRUE); + bool resolveSymlinks = true); static TQString getExistingDirectory( const TQString &dir = TQString::null, TQWidget *parent = 0, const char* name = 0, const TQString &caption = TQString::null, - bool dirOnly = TRUE, - bool resolveSymlinks = TRUE); + bool dirOnly = true, + bool resolveSymlinks = true); static TQStringList getOpenFileNames( const TQString &filter= TQString::null, const TQString &dir = TQString::null, TQWidget *parent = 0, const char* name = 0, const TQString &caption = TQString::null, TQString *selectedFilter = 0, - bool resolveSymlinks = TRUE); + bool resolveSymlinks = true); // other static functions @@ -208,7 +208,7 @@ protected: void keyPressEvent( TQKeyEvent * ); void addWidgets( TQLabel *, TQWidget *, TQPushButton * ); - void addToolButton( TQButton *b, bool separator = FALSE ); + void addToolButton( TQButton *b, bool separator = false ); void addLeftWidget( TQWidget *w ); void addRightWidget( TQWidget *w ); @@ -331,7 +331,7 @@ private: static TQStringList macGetOpenFileNames( const TQString &, TQString*, TQWidget *, const char *, const TQString&, TQString *, - bool = TRUE, bool = FALSE ); + bool = true, bool = false ); #endif diff --git a/src/dialogs/tqfontdialog.cpp b/src/dialogs/tqfontdialog.cpp index 40c9f3de5..37d9b75da 100644 --- a/src/dialogs/tqfontdialog.cpp +++ b/src/dialogs/tqfontdialog.cpp @@ -160,11 +160,11 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name, bool modal, WFlags f ) : TQDialog( parent, name, modal, f ) { - setSizeGripEnabled( TRUE ); + setSizeGripEnabled( true ); d = new TQFontDialogPrivate; // grid d->familyEdit = new TQLineEdit( this, "font family I" ); - d->familyEdit->setReadOnly( TRUE ); + d->familyEdit->setReadOnly( true ); d->familyList = new TQListBox( this, "font family II" ); d->familyEdit->setFocusProxy( d->familyList ); @@ -173,7 +173,7 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name, d->familyAccel->setIndent( 2 ); d->styleEdit = new TQLineEdit( this, "font style I" ); - d->styleEdit->setReadOnly( TRUE ); + d->styleEdit->setReadOnly( true ); d->styleList = new TQListBox( this, "font style II" ); d->styleEdit->setFocusProxy( d->styleList ); @@ -206,14 +206,14 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name, // characters used depend on the charset encoding. d->sampleEdit->setText( "AaBbYyZz" ); - d->scriptCombo = new TQComboBox( FALSE, this, "font encoding" ); + d->scriptCombo = new TQComboBox( false, this, "font encoding" ); d->scriptAccel = new TQLabel( d->scriptCombo, tr("Scr&ipt"), this,"encoding label"); d->scriptAccel->setIndent( 2 ); d->size = 0; - d->smoothScalable = FALSE; + d->smoothScalable = false; connect( d->scriptCombo, TQ_SIGNAL(activated(int)), TQ_SLOT(scriptHighlighted(int)) ); @@ -289,7 +289,7 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name, buttonBox->addWidget( d->ok ); if ( modal ) connect( d->ok, TQ_SIGNAL(clicked()), TQ_SLOT(accept()) ); - d->ok->setDefault( TRUE ); + d->ok->setDefault( true ); buttonBox->addSpacing( 12 ); @@ -327,8 +327,8 @@ TQFontDialog::~TQFontDialog() The dialog is called \a name, with the parent \a parent. \a initial is the initially selected font. - If the \a ok parameter is not-null, \e *\a ok is set to TRUE if the - user clicked OK, and set to FALSE if the user clicked Cancel. + If the \a ok parameter is not-null, \e *\a ok is set to true if the + user clicked OK, and set to false if the user clicked Cancel. This static function is less flexible than the full TQFontDialog object, but is convenient and easy to use. @@ -367,8 +367,8 @@ TQFont TQFontDialog::getFont( bool *ok, const TQFont &initial, clicks Cancel, the TQt default font is returned. The dialog is called \a name, with parent \a parent. - If the \a ok parameter is not-null, \e *\a ok is set to TRUE if the - user clicked OK, and FALSE if the user clicked Cancel. + If the \a ok parameter is not-null, \e *\a ok is set to true if the + user clicked OK, and false if the user clicked Cancel. This static function is less functional than the full TQFontDialog object, but is convenient and easy to use. @@ -404,7 +404,7 @@ TQFont TQFontDialog::getFont( bool *ok, const TQFont *def, if ( def ) result = *def; - TQFontDialog *dlg = new TQFontDialog( parent, name, TRUE ); + TQFontDialog *dlg = new TQFontDialog( parent, name, true ); dlg->setFont( ( def ? *def : TQFont() ) ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -444,12 +444,12 @@ bool TQFontDialog::eventFilter( TQObject * o , TQEvent * e ) if ( ci != d->sizeList->currentItem() && style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this)) d->sizeEdit->selectAll(); - return TRUE; + return true; } else if ( ( o == d->familyList || o == d->styleList ) && ( k->key() == Key_Return || k->key() == Key_Enter) ) { k->accept(); accept(); - return TRUE; + return true; } } else if ( e->type() == TQEvent::FocusIn && style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this) ) { @@ -522,7 +522,7 @@ void TQListBoxFontText::paint( TQPainter *painter ) void TQFontDialog::updateFamilies() { - d->familyList->blockSignals( TRUE ); + d->familyList->blockSignals( true ); enum match_t { MATCH_NONE=0, MATCH_LAST_RESORT=1, MATCH_APP=2, MATCH_FALLBACK, MATCH_FAMILY=3 }; @@ -598,7 +598,7 @@ void TQFontDialog::updateFamilies() d->familyList->hasFocus() ) d->familyEdit->selectAll(); - d->familyList->blockSignals( FALSE ); + d->familyList->blockSignals( false ); updateStyles(); } @@ -610,7 +610,7 @@ void TQFontDialog::updateFamilies() void TQFontDialog::updateStyles() { - d->styleList->blockSignals( TRUE ); + d->styleList->blockSignals( true ); d->styleList->clear(); @@ -618,30 +618,30 @@ void TQFontDialog::updateStyles() if ( styles.isEmpty() ) { d->styleEdit->clear(); - d->smoothScalable = FALSE; + d->smoothScalable = false; } else { d->styleList->insertStringList( styles ); if ( !d->style.isEmpty() ) { - bool found = FALSE; - bool first = TRUE; + bool found = false; + bool first = true; TQString cstyle = d->style; redo: for ( int i = 0 ; i < (int)d->styleList->count() ; i++ ) { if ( cstyle == d->styleList->text(i) ) { d->styleList->setCurrentItem( i ); - found = TRUE; + found = true; break; } } if (!found && first) { if (cstyle.contains("Italic")) { cstyle.replace("Italic", "Oblique"); - first = FALSE; + first = false; goto redo; } else if (cstyle.contains("Oblique")) { cstyle.replace("Oblique", "Italic"); - first = FALSE; + first = false; goto redo; } } @@ -657,7 +657,7 @@ void TQFontDialog::updateStyles() d->smoothScalable = d->fdb.isSmoothlyScalable( d->familyList->currentText(), d->styleList->currentText() ); } - d->styleList->blockSignals( FALSE ); + d->styleList->blockSignals( false ); updateSizes(); } @@ -670,7 +670,7 @@ void TQFontDialog::updateStyles() void TQFontDialog::updateSizes() { - d->sizeList->blockSignals( TRUE ); + d->sizeList->blockSignals( true ); d->sizeList->clear(); @@ -678,12 +678,12 @@ void TQFontDialog::updateSizes() TQValueList<int> sizes = d->fdb.pointSizes( d->familyList->currentText(), d->styleList->currentText() ); int i = 0; - bool found = FALSE; + bool found = false; for( TQValueList<int>::iterator it = sizes.begin() ; it != sizes.end(); ++it ) { d->sizeList->insertItem( TQString::number( *it ) ); if ( !found && *it >= d->size ) { d->sizeList->setCurrentItem( i ); - found = TRUE; + found = true; } ++i; } @@ -692,17 +692,17 @@ void TQFontDialog::updateSizes() d->sizeList->setCurrentItem( d->sizeList->count() - 1 ); } - d->sizeEdit->blockSignals( TRUE ); + d->sizeEdit->blockSignals( true ); d->sizeEdit->setText( ( d->smoothScalable ? TQString::number( d->size ) : d->sizeList->currentText() ) ); if ( style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this) && d->sizeList->hasFocus() ) d->sizeEdit->selectAll(); - d->sizeEdit->blockSignals( FALSE ); + d->sizeEdit->blockSignals( false ); } else { d->sizeEdit->clear(); } - d->sizeList->blockSignals( FALSE ); + d->sizeList->blockSignals( false ); updateSample(); } @@ -792,9 +792,9 @@ void TQFontDialog::sizeChanged( const TQString &s ) if ( d->sizeList->text(i).toInt() >= d->size ) break; } - d->sizeList->blockSignals( TRUE ); + d->sizeList->blockSignals( true ); d->sizeList->setCurrentItem( i ); - d->sizeList->blockSignals( FALSE ); + d->sizeList->blockSignals( false ); } updateSample(); } diff --git a/src/dialogs/tqfontdialog.h b/src/dialogs/tqfontdialog.h index bb19b7676..178781ee7 100644 --- a/src/dialogs/tqfontdialog.h +++ b/src/dialogs/tqfontdialog.h @@ -75,7 +75,7 @@ private: static TQFont getFont( bool *ok, const TQFont *def, TQWidget* parent=0, const char* name=0); - TQFontDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, + TQFontDialog( TQWidget* parent=0, const char* name=0, bool modal=false, WFlags f=0 ); ~TQFontDialog(); diff --git a/src/dialogs/tqinputdialog.cpp b/src/dialogs/tqinputdialog.cpp index a58d9a2dc..fb1d0823b 100644 --- a/src/dialogs/tqinputdialog.cpp +++ b/src/dialogs/tqinputdialog.cpp @@ -118,7 +118,7 @@ public: Constructs the dialog. The \a label is the text which is shown to the user (it should tell the user what they are expected to enter). The \a parent is the dialog's parent widget. The widget is called \a name. If \a - modal is TRUE (the default) the dialog will be modal. The \a type + modal is true (the default) the dialog will be modal. The \a type parameter is used to specify which type of dialog to construct. \sa getText(), getInteger(), getDouble(), getItem() @@ -142,14 +142,14 @@ TQInputDialog::TQInputDialog( const TQString &label, TQWidget* parent, vbox->addWidget( d->stack ); d->lineEdit = new TQLineEdit( d->stack, "qt_inputdlg_le" ); d->spinBox = new TQSpinBox( d->stack, "qt_inputdlg_sb" ); - d->comboBox = new TQComboBox( FALSE, d->stack, "qt_inputdlg_cb" ); - d->editComboBox = new TQComboBox( TRUE, d->stack, "qt_inputdlg_editcb" ); + d->comboBox = new TQComboBox( false, d->stack, "qt_inputdlg_cb" ); + d->editComboBox = new TQComboBox( true, d->stack, "qt_inputdlg_editcb" ); TQHBoxLayout *hbox = new TQHBoxLayout( 6 ); vbox->addLayout( hbox, AlignRight ); d->ok = new TQPushButton( tr( "OK" ), this, "qt_ok_btn" ); - d->ok->setDefault( TRUE ); + d->ok->setDefault( true ); TQPushButton *cancel = new TQPushButton( tr( "Cancel" ), this, "qt_cancel_btn" ); TQSize bs = d->ok->sizeHint().expandedTo( cancel->sizeHint() ); @@ -273,8 +273,8 @@ TQInputDialog::~TQInputDialog() dialog. \a label is the text which is shown to the user (it should say what should be entered). \a text is the default text which is placed in the line edit. The \a mode is the echo mode the line edit - will use. If \a ok is not-null \e *\a ok will be set to TRUE if the - user pressed OK and to FALSE if the user pressed Cancel. The + will use. If \a ok is not-null \e *\a ok will be set to true if the + user pressed OK and to false if the user pressed Cancel. The dialog's parent is \a parent; the dialog is called \a name. The dialog will be modal. @@ -302,7 +302,7 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label, { TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_gettext", - TRUE, LineEdit ); + true, LineEdit ); #ifndef TQT_NO_WIDGET_TOPEXTRA dlg->setCaption( caption ); @@ -310,7 +310,7 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label, dlg->lineEdit()->setText( text ); dlg->lineEdit()->setEchoMode( mode ); - bool ok_ = FALSE; + bool ok_ = false; TQString result; ok_ = dlg->exec() == TQDialog::Accepted; if ( ok ) @@ -332,8 +332,8 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label, and \a step is the amount by which the values change as the user presses the arrow buttons to increment or decrement the value. - If \a ok is not-null *\a ok will be set to TRUE if the user - pressed OK and to FALSE if the user pressed Cancel. The dialog's + If \a ok is not-null *\a ok will be set to true if the user + pressed OK and to false if the user pressed Cancel. The dialog's parent is \a parent; the dialog is called \a name. The dialog will be modal. @@ -360,7 +360,7 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label, { TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_getint", - TRUE, SpinBox ); + true, SpinBox ); #ifndef TQT_NO_WIDGET_TOPEXTRA dlg->setCaption( caption ); #endif @@ -368,7 +368,7 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label, dlg->spinBox()->setSteps( step, 0 ); dlg->spinBox()->setValue( value ); - bool ok_ = FALSE; + bool ok_ = false; int result; ok_ = dlg->exec() == TQDialog::Accepted; if ( ok ) @@ -389,8 +389,8 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label, user may choose, and \a decimals is the maximum number of decimal places the number may have. - If \a ok is not-null \e *\a ok will be set to TRUE if the user - pressed OK and to FALSE if the user pressed Cancel. The dialog's + If \a ok is not-null \e *\a ok will be set to true if the user + pressed OK and to false if the user pressed Cancel. The dialog's parent is \a parent; the dialog is called \a name. The dialog will be modal. @@ -418,7 +418,7 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label, const char *name ) { TQInputDialog dlg( label, parent, - name ? name : "qt_inputdlg_getdbl", TRUE, LineEdit ); + name ? name : "qt_inputdlg_getdbl", true, LineEdit ); #ifndef TQT_NO_WIDGET_TOPEXTRA dlg.setCaption( caption ); #endif @@ -438,17 +438,17 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label, bar of the dialog. \a label is the text which is shown to the user (it should say what should be entered). \a list is the string list which is inserted into the combobox, and \a current is the number - of the item which should be the current item. If \a editable is TRUE - the user can enter their own text; if \a editable is FALSE the user + of the item which should be the current item. If \a editable is true + the user can enter their own text; if \a editable is false the user may only select one of the existing items. - If \a ok is not-null \e *\a ok will be set to TRUE if the user - pressed OK and to FALSE if the user pressed Cancel. The dialog's + If \a ok is not-null \e *\a ok will be set to true if the user + pressed OK and to false if the user pressed Cancel. The dialog's parent is \a parent; the dialog is called \a name. The dialog will be modal. This function returns the text of the current item, or if \a - editable is TRUE, the current text of the combobox. + editable is true, the current text of the combobox. Use this static function like this: @@ -457,7 +457,7 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label, lst << "First" << "Second" << "Third" << "Fourth" << "Fifth"; bool ok; TQString res = TQInputDialog::getItem( - "MyApp 3000", "Select an item:", lst, 1, TRUE, &ok, + "MyApp 3000", "Select an item:", lst, 1, true, &ok, this ); if ( ok ) { // user selected an item and pressed OK @@ -471,7 +471,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label, int current, bool editable, bool *ok, TQWidget *parent, const char *name ) { - TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_getitem", TRUE, editable ? EditableComboBox : ComboBox ); + TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_getitem", true, editable ? EditableComboBox : ComboBox ); #ifndef TQT_NO_WIDGET_TOPEXTRA dlg->setCaption( caption ); #endif @@ -483,7 +483,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label, dlg->comboBox()->setCurrentItem( current ); } - bool ok_ = FALSE; + bool ok_ = false; TQString result; ok_ = dlg->exec() == TQDialog::Accepted; if ( ok ) @@ -506,7 +506,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label, void TQInputDialog::textChanged( const TQString &s ) { - bool on = TRUE; + bool on = true; if ( d->lineEdit->validator() ) { TQString str = d->lineEdit->text(); diff --git a/src/dialogs/tqinputdialog.h b/src/dialogs/tqinputdialog.h index 67434b3ae..0347efee9 100644 --- a/src/dialogs/tqinputdialog.h +++ b/src/dialogs/tqinputdialog.h @@ -61,7 +61,7 @@ private: enum Type { LineEdit, SpinBox, ComboBox, EditableComboBox }; TQInputDialog( const TQString &label, TQWidget* parent=0, const char* name=0, - bool modal = TRUE, Type type = LineEdit ); //### 4.0: widget flag! + bool modal = true, Type type = LineEdit ); //### 4.0: widget flag! ~TQInputDialog(); TQLineEdit *lineEdit() const; @@ -83,7 +83,7 @@ public: double minValue = -2147483647, double maxValue = 2147483647, int decimals = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 ); static TQString getItem( const TQString &caption, const TQString &label, const TQStringList &list, - int current = 0, bool editable = TRUE, + int current = 0, bool editable = true, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 ); private slots: diff --git a/src/dialogs/tqmessagebox.cpp b/src/dialogs/tqmessagebox.cpp index b90840cf7..436194325 100644 --- a/src/dialogs/tqmessagebox.cpp +++ b/src/dialogs/tqmessagebox.cpp @@ -483,7 +483,7 @@ const char * mb_texts[] = { */ TQMessageBox::TQMessageBox( TQWidget *parent, const char *name ) - : TQDialog( parent, name, TRUE, WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_SysMenu ) + : TQDialog( parent, name, true, WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_SysMenu ) { init( Ok, 0, 0 ); } @@ -545,7 +545,7 @@ TQMessageBox::TQMessageBox( TQWidget *parent, const char *name ) modal dialog box. If \a parent is a widget, the message box becomes modal relative to \a parent. - If \a modal is TRUE the message box is modal; otherwise it + If \a modal is true the message box is modal; otherwise it is modeless. The \a parent, \a name, \a modal, and \a f arguments are passed to @@ -674,10 +674,10 @@ void TQMessageBox::init( int button0, int button1, int button2 ) tr(mb_texts[mbd->button[i]]), this, buttonName ); if ( mbd->defButton == i ) { - mbd->pb[i]->setDefault( TRUE ); + mbd->pb[i]->setDefault( true ); mbd->pb[i]->setFocus(); } - mbd->pb[i]->setAutoDefault( TRUE ); + mbd->pb[i]->setAutoDefault( true ); mbd->pb[i]->setFocusPolicy( TQWidget::StrongFocus ); connect( mbd->pb[i], TQ_SIGNAL(clicked()), TQ_SLOT(buttonClicked()) ); } @@ -1116,7 +1116,7 @@ int TQMessageBox::information( TQWidget *parent, #endif TQMessageBox *mb = new TQMessageBox( caption, text, Information, button0, button1, button2, - parent, "qt_msgbox_information", TRUE, + parent, "qt_msgbox_information", true, WDestructiveClose); TQ_CHECK_PTR( mb ); return mb->exec(); @@ -1167,7 +1167,7 @@ int TQMessageBox::question( TQWidget *parent, #endif TQMessageBox *mb = new TQMessageBox( caption, text, Question, button0, button1, button2, - parent, "qt_msgbox_information", TRUE, + parent, "qt_msgbox_information", true, WDestructiveClose); TQ_CHECK_PTR( mb ); return mb->exec(); @@ -1219,7 +1219,7 @@ int TQMessageBox::warning( TQWidget *parent, #endif TQMessageBox *mb = new TQMessageBox( caption, text, Warning, button0, button1, button2, - parent, "qt_msgbox_warning", TRUE, + parent, "qt_msgbox_warning", true, WDestructiveClose); TQ_CHECK_PTR( mb ); return mb->exec(); @@ -1271,7 +1271,7 @@ int TQMessageBox::critical( TQWidget *parent, #endif TQMessageBox *mb = new TQMessageBox( caption, text, Critical, button0, button1, button2, - parent, "qt_msgbox_critical", TRUE, + parent, "qt_msgbox_critical", true, WDestructiveClose); TQ_CHECK_PTR( mb ); return mb->exec(); @@ -1302,7 +1302,7 @@ void TQMessageBox::about( TQWidget *parent, const TQString &caption, TQMessageBox *mb = new TQMessageBox( caption, text, Information, Ok + Default, 0, 0, - parent, "qt_msgbox_simple_about_box", TRUE, + parent, "qt_msgbox_simple_about_box", true, WDestructiveClose); TQ_CHECK_PTR( mb ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -1359,7 +1359,7 @@ static int textBox( TQWidget *parent, TQMessageBox::Icon severity, TQMessageBox *mb = new TQMessageBox( caption, text, severity, b[0], b[1], b[2], - parent, "qt_msgbox_information", TRUE, + parent, "qt_msgbox_information", true, TQt::WDestructiveClose); TQ_CHECK_PTR( mb ); if ( button0Text.isEmpty() ) @@ -1616,9 +1616,9 @@ void TQMessageBox::aboutTQt( TQWidget *parent, const TQString &caption ) #endif mb->setButtonText( 0, tr("OK") ); if ( mb->mbd && mb->mbd->pb[0] ) { - mb->mbd->pb[0]->setAutoDefault( TRUE ); + mb->mbd->pb[0]->setAutoDefault( true ); mb->mbd->pb[0]->setFocusPolicy( TQWidget::StrongFocus ); - mb->mbd->pb[0]->setDefault( TRUE ); + mb->mbd->pb[0]->setDefault( true ); mb->mbd->pb[0]->setFocus(); } mb->exec(); diff --git a/src/dialogs/tqmessagebox.h b/src/dialogs/tqmessagebox.h index cb0933f81..86a96fc2d 100644 --- a/src/dialogs/tqmessagebox.h +++ b/src/dialogs/tqmessagebox.h @@ -67,7 +67,7 @@ public: TQMessageBox( TQWidget* parent=0, const char* name=0 ); TQMessageBox( const TQString& caption, const TQString &text, Icon icon, int button0, int button1, int button2, - TQWidget* parent=0, const char* name=0, bool modal=TRUE, + TQWidget* parent=0, const char* name=0, bool modal=true, WFlags f=WStyle_DialogBorder ); ~TQMessageBox(); diff --git a/src/dialogs/tqprintdialog.cpp b/src/dialogs/tqprintdialog.cpp index 8430f2cbc..4cd57a02c 100644 --- a/src/dialogs/tqprintdialog.cpp +++ b/src/dialogs/tqprintdialog.cpp @@ -251,11 +251,11 @@ static int parsePrintcap( TQListView * printers, const TQString& fileName ) line_ascii[1024] = '\0'; TQString printerDesc; - bool atEnd = FALSE; + bool atEnd = false; while ( !atEnd ) { if ( printcap.atEnd() || printcap.readLine( line_ascii, 1024 ) <= 0 ) - atEnd = TRUE; + atEnd = true; TQString line = line_ascii; line = line.stripWhiteSpace(); if ( line.length() >= 1 && line[int(line.length()) - 1] == '\\' ) @@ -300,7 +300,7 @@ static void parseEtcLpPrinters( TQListView * printers ) TQString remote( TQString::fromLatin1("Remote:") ); TQString contentType( TQString::fromLatin1("Content types:") ); TQString printerHost; - bool canPrintPostscript = FALSE; + bool canPrintPostscript = false; if ( configuration.open( IO_ReadOnly ) ) { while ( !configuration.atEnd() && configuration.readLine( line, 1024 ) > 0 ) { @@ -331,7 +331,7 @@ static void parseEtcLpPrinters( TQListView * printers ) *e = '\0'; if ( !qstrcmp( p, "postscript" ) || !qstrcmp( p, "any" ) ) - canPrintPostscript = TRUE; + canPrintPostscript = true; *e = s; if ( s == ',' ) e++; @@ -356,11 +356,11 @@ static char * parsePrintersConf( TQListView * printers, bool *found = 0 ) TQFile pc( TQString::fromLatin1("/etc/printers.conf") ); if ( !pc.open( IO_ReadOnly ) ) { if ( found ) - *found = FALSE; + *found = false; return 0; } if ( found ) - *found = TRUE; + *found = true; char * line = new char[1025]; line[1024] = '\0'; @@ -519,7 +519,7 @@ static char *parseNsswitchPrintersEntry( TQListView * printers, char *line ) k++ char *defaultPrinter = 0; - bool stop = FALSE; + bool stop = false; int lastStatus = NotFound; int k = 8; @@ -698,7 +698,7 @@ static void parseSpoolInterface( TQListView * printers ) configFile.close(); printerType = printerType.stripWhiteSpace(); - if ( printerType.find("postscript", 0, FALSE) < 0 ) + if ( printerType.find("postscript", 0, false) < 0 ) continue; int ii = 0; @@ -732,7 +732,7 @@ static void parseQconfig( TQListView * printers ) TQString line; TQString stanzaName; // either a queue or a device name - bool up = TRUE; // queue up? default TRUE, can be FALSE + bool up = true; // queue up? default true, can be false TQString remoteHost; // null if local TQString deviceName; // null if remote @@ -776,7 +776,7 @@ static void parseQconfig( TQListView * printers ) line.truncate( line.length()-1 ); if ( line.length() >= 1 && line.length() <= 20 ) stanzaName = line; - up = TRUE; + up = true; remoteHost = TQString::null; deviceName = TQString::null; } else { @@ -865,7 +865,7 @@ static void qpd_cleanup_globaldialog() */ TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name ) - : TQDialog( parent, name, TRUE ) + : TQDialog( parent, name, true ) { d = new TQPrintDialogPrivate; d->numCopies = 1; @@ -917,7 +917,7 @@ TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name d->ok = new TQPushButton( this, "ok" ); d->ok->setText( tr("OK") ); - d->ok->setDefault( TRUE ); + d->ok->setDefault( true ); horiz->addWidget( d->ok ); if (! rightalign) horiz->addStretch( 1 ); @@ -948,7 +948,7 @@ TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name ms.setHeight( 460 ); resize( ms ); - setPrinter( prn, TRUE ); + setPrinter( prn, true ); d->printers->setFocus(); } @@ -1000,7 +1000,7 @@ TQGroupBox * TQPrintDialog::setupPrinterSettings() rb = new TQRadioButton( tr( "Print in color if available" ), g, "color" ); d->colorMode->insert( rb, TQPrinter::Color ); - rb->setChecked( TRUE ); + rb->setChecked( true ); rb = new TQRadioButton( tr("Print in grayscale"), g, "graysacle" ); @@ -1026,15 +1026,15 @@ TQGroupBox * TQPrintDialog::setupDestination() "printer" ); tll->addWidget( rb ); d->printerOrFile->insert( rb, 0 ); - rb->setChecked( TRUE ); - d->outputToFile = FALSE; + rb->setChecked( true ); + d->outputToFile = false; TQBoxLayout * horiz = new TQBoxLayout( TQBoxLayout::LeftToRight ); tll->addLayout( horiz, 3 ); horiz->addSpacing( 19 ); d->printers = new TQListView( g, "list of printers" ); - d->printers->setAllColumnsShowFocus( TRUE ); + d->printers->setAllColumnsShowFocus( true ); d->printers->addColumn( tr("Printer"), 125 ); d->printers->addColumn( tr("Host"), 125 ); d->printers->addColumn( tr("Comment"), 150 ); @@ -1135,7 +1135,7 @@ TQGroupBox * TQPrintDialog::setupDestination() } if ( d->printers->currentItem() ) - d->printers->setSelected( d->printers->currentItem(), TRUE ); + d->printers->setSelected( d->printers->currentItem(), true ); if ( etcLpDefault ) // Avoid purify complaint delete[] etcLpDefault; @@ -1166,16 +1166,16 @@ TQGroupBox * TQPrintDialog::setupDestination() horiz->addWidget( d->fileName, 1 ); horiz->addSpacing( 6 ); d->browse = new TQPushButton( tr("Browse..."), g, "browse files" ); - d->browse->setAutoDefault( FALSE ); + d->browse->setAutoDefault( false ); #ifdef TQT_NO_FILEDIALOG - d->browse->setEnabled( FALSE ); + d->browse->setEnabled( false ); #endif connect( d->browse, TQ_SIGNAL(clicked()), this, TQ_SLOT(browseClicked()) ); horiz->addWidget( d->browse ); - d->fileName->setEnabled( FALSE ); - d->browse->setEnabled( FALSE ); + d->fileName->setEnabled( false ); + d->browse->setEnabled( false ); tll->activate(); @@ -1253,7 +1253,7 @@ TQGroupBox * TQPrintDialog::setupOptions() g, "first page first" ); tll->addWidget( rb ); d->pageOrder->insert( rb, TQPrinter::FirstPageFirst ); - rb->setChecked( TRUE ); + rb->setChecked( true ); rb = new TQRadioButton( tr("Print last page first"), g, "last page first" ); @@ -1308,7 +1308,7 @@ TQGroupBox * TQPrintDialog::setupPaper() d->pageSize = TQPrinter::A4; // page orientation - d->orientationCombo = new TQComboBox( FALSE, g ); + d->orientationCombo = new TQComboBox( false, g ); d->orientationCombo->insertItem( tr( "Portrait" ), -1 ); d->orientationCombo->insertItem( tr( "Landscape" ), -1 ); @@ -1320,7 +1320,7 @@ TQGroupBox * TQPrintDialog::setupPaper() this, TQ_SLOT( orientSelected(int) ) ); // paper size - d->sizeCombo = new TQComboBox( FALSE, g ); + d->sizeCombo = new TQComboBox( false, g ); int n; for( n=0; n<TQPrinter::NPageSize; n++ ) @@ -1366,8 +1366,8 @@ TQGroupBox * TQPrintDialog::setupPaper() /*! Display a dialog and allow the user to configure the TQPrinter \a - p for an optional widget \a w. Returns TRUE if the user clicks OK or - presses Enter, FALSE if the user clicks Cancel or presses Esc. + p for an optional widget \a w. Returns true if the user clicks OK or + presses Enter, false if the user clicks Cancel or presses Esc. getPrinterSetup() remembers the settings and provides the same settings the next time the dialog is shown. @@ -1381,10 +1381,10 @@ bool TQPrintDialog::getPrinterSetup( TQPrinter * p, TQWidget* w ) globalPrintDialog->setCaption( TQPrintDialog::tr( "Setup Printer" ) ); #endif tqAddPostRoutine( qpd_cleanup_globaldialog ); - globalPrintDialog->setPrinter( p, TRUE ); + globalPrintDialog->setPrinter( p, true ); globalPrintDialog->adjustSize(); } else { - globalPrintDialog->setPrinter( p, TRUE ); + globalPrintDialog->setPrinter( p, true ); } globalPrintDialog->adjustPosition( w ); #ifndef TQT_NO_WIDGET_TOPEXTRA @@ -1408,9 +1408,9 @@ bool TQPrintDialog::getPrinterSetup( TQPrinter * p, TQWidget* w ) void TQPrintDialog::printerOrFileSelected( int id ) { - d->outputToFile = id ? TRUE : FALSE; + d->outputToFile = (id != 0); if ( d->outputToFile ) { - d->ok->setEnabled( TRUE ); + d->ok->setEnabled( true ); fileNameEditChanged( d->fileName->text() ); if ( !d->fileName->edited() && d->fileName->text().isEmpty() ) { TQString home = TQString::fromLatin1( ::getenv( "HOME" ) ); @@ -1428,17 +1428,17 @@ void TQPrintDialog::printerOrFileSelected( int id ) d->fileName->setCursorPosition( cur.length() ); d->fileName->selectAll(); } - d->browse->setEnabled( TRUE ); - d->fileName->setEnabled( TRUE ); + d->browse->setEnabled( true ); + d->fileName->setEnabled( true ); d->fileName->setFocus(); - d->printers->setEnabled( FALSE ); + d->printers->setEnabled( false ); } else { d->ok->setEnabled( d->printers->childCount() != 0 ); - d->printers->setEnabled( TRUE ); + d->printers->setEnabled( true ); if ( d->fileName->hasFocus() || d->browse->hasFocus() ) d->printers->setFocus(); - d->browse->setEnabled( FALSE ); - d->fileName->setEnabled( FALSE ); + d->browse->setEnabled( false ); + d->fileName->setEnabled( false ); } } @@ -1490,10 +1490,10 @@ void TQPrintDialog::okClicked() d->firstPage->interpretText(); d->copies->interpretText(); if ( d->outputToFile ) { - d->printer->setOutputToFile( TRUE ); + d->printer->setOutputToFile( true ); d->printer->setOutputFileName( d->fileName->text() ); } else { - d->printer->setOutputToFile( FALSE ); + d->printer->setOutputToFile( false ); TQListViewItem * l = d->printers->currentItem(); if ( l ) d->printer->setPrinterName( l->text( 0 ) ); @@ -1521,7 +1521,7 @@ void TQPrintDialog::okClicked() void TQPrintDialog::printRangeSelected( int id ) { - bool enable = id == 2 ? TRUE : FALSE; + bool enable = (id == 2); d->firstPage->setEnabled( enable ); d->lastPage->setEnabled( enable ); d->firstPageLabel->setEnabled( enable ); @@ -1545,8 +1545,8 @@ void TQPrintDialog::setLastPage( int lp ) /*! Sets this dialog to configure printer \a p, or no printer if \a p - is null. If \a pickUpSettings is TRUE, the dialog reads most of - its settings from \a p. If \a pickUpSettings is FALSE (the + is null. If \a pickUpSettings is true, the dialog reads most of + its settings from \a p. If \a pickUpSettings is false (the default) the dialog keeps its old settings. */ @@ -1566,8 +1566,8 @@ void TQPrintDialog::setPrinter( TQPrinter * p, bool pickUpSettings ) while ( i && i->text( 0 ) != p->printerName() ) i = i->nextSibling(); if ( i ) { - d->printers->setSelected( i, TRUE ); - d->ok->setEnabled( TRUE ); + d->printers->setSelected( i, true ); + d->ok->setEnabled( true ); } else if ( d->fileName->text().isEmpty() ) { d->ok->setEnabled( d->printers->childCount() != 0 ); } @@ -1607,7 +1607,7 @@ void TQPrintDialog::setPrinter( TQPrinter * p, bool pickUpSettings ) } if( p ) { - d->printAllButton->setEnabled( TRUE ); + d->printAllButton->setEnabled( true ); d->printSelectionButton ->setEnabled( d->printer->isOptionEnabled( TQPrinter::PrintSelection ) ); d->printRangeButton @@ -1616,15 +1616,15 @@ void TQPrintDialog::setPrinter( TQPrinter * p, bool pickUpSettings ) TQPrinter::PrintRange range = p->printRange(); switch ( range ) { case TQPrinter::AllPages: - d->printAllButton->setChecked(TRUE); + d->printAllButton->setChecked(true); printRangeSelected( d->printRange->id( d->printAllButton ) ); break; case TQPrinter::Selection: - d->printSelectionButton->setChecked(TRUE); + d->printSelectionButton->setChecked(true); printRangeSelected( d->printRange->id( d->printSelectionButton ) ); break; case TQPrinter::PageRange: - d->printRangeButton->setChecked(TRUE); + d->printRangeButton->setChecked(true); printRangeSelected( d->printRange->id( d->printRangeButton ) ); break; } diff --git a/src/dialogs/tqprintdialog.h b/src/dialogs/tqprintdialog.h index 29824416a..fa7ef36bb 100644 --- a/src/dialogs/tqprintdialog.h +++ b/src/dialogs/tqprintdialog.h @@ -61,7 +61,7 @@ public: static bool getPrinterSetup( TQPrinter *, TQWidget* = 0 ); static void setGlobalPrintDialog( TQPrintDialog * ); - void setPrinter( TQPrinter *, bool = FALSE ); + void setPrinter( TQPrinter *, bool = false ); TQPrinter * printer() const; void addButton( TQPushButton *but ); diff --git a/src/dialogs/tqprogressdialog.cpp b/src/dialogs/tqprogressdialog.cpp index 262dbd85b..4f4319827 100644 --- a/src/dialogs/tqprogressdialog.cpp +++ b/src/dialogs/tqprogressdialog.cpp @@ -75,8 +75,8 @@ public: label( new TQLabel(labelText,that,"label") ), cancel( 0 ), bar( new TQProgressBar(totalSteps,that,"bar") ), - shown_once( FALSE ), - cancellation_flag( FALSE ), + shown_once( false ), + cancellation_flag( false ), showTime( defaultShowTime ) { label->setAlignment(that->style().styleHint(TQStyle::SH_ProgressDialog_TextLabelAlignment, that)); @@ -140,7 +140,7 @@ public: for cancellation with wasCanceled(). For example: \code TQProgressDialog progress( "Copying files...", "Abort Copy", numFiles, - this, "progress", TRUE ); + this, "progress", true ); for ( int i = 0; i < numFiles; i++ ) { progress.setProgress( i ); tqApp->processEvents(); @@ -238,9 +238,9 @@ TQProgressBar *TQProgressDialog::bar() const The \a creator argument is the widget to use as the dialog's parent. The \a name, \a modal, and the widget flags, \a f, are - passed to the TQDialog::TQDialog() constructor. If \a modal is FALSE (the + passed to the TQDialog::TQDialog() constructor. If \a modal is false (the default), you must have an event loop proceeding for any redrawing - of the dialog to occur. If \a modal is TRUE, the dialog ensures that + of the dialog to occur. If \a modal is true, the dialog ensures that events are processed when needed. \sa setLabelText(), setLabel(), setCancelButtonText(), setCancelButton(), @@ -271,9 +271,9 @@ TQProgressDialog::TQProgressDialog( TQWidget *creator, const char *name, The \a creator argument is the widget to use as the dialog's parent. The \a name, \a modal, and widget flags, \a f, are passed to the - TQDialog::TQDialog() constructor. If \a modal is FALSE (the default), + TQDialog::TQDialog() constructor. If \a modal is false (the default), you will must have an event loop proceeding for any redrawing of - the dialog to occur. If \a modal is TRUE, the dialog ensures that + the dialog to occur. If \a modal is true, the dialog ensures that events are processed when needed. @@ -310,9 +310,9 @@ void TQProgressDialog::init( TQWidget *creator, int totstps) { d = new TQProgressDialogData(this, creator, lbl, totstps); - d->autoClose = TRUE; - d->autoReset = TRUE; - d->forceHide = FALSE; + d->autoClose = true; + d->autoReset = true; + d->forceHide = false; setCancelButtonText( canc ); connect( this, TQ_SIGNAL(canceled()), this, TQ_SIGNAL(cancelled()) ); connect( this, TQ_SIGNAL(canceled()), this, TQ_SLOT(cancel()) ); @@ -355,7 +355,7 @@ void TQProgressDialog::setLabel( TQLabel *label ) if ( label->parentWidget() == this ) { label->hide(); // until we resize } else { - label->reparent( this, 0, TQPoint(0,0), FALSE ); + label->reparent( this, 0, TQPoint(0,0), false ); } } int w = TQMAX( isVisible() ? width() : 0, sizeHint().width() ); @@ -408,7 +408,7 @@ void TQProgressDialog::setCancelButton( TQPushButton *cancelButton ) if ( cancelButton->parentWidget() == this ) { cancelButton->hide(); // until we resize } else { - cancelButton->reparent( this, 0, TQPoint(0,0), FALSE ); + cancelButton->reparent( this, 0, TQPoint(0,0), false ); } connect( d->cancel, TQ_SIGNAL(clicked()), this, TQ_SIGNAL(canceled()) ); #ifndef TQT_NO_ACCEL @@ -512,7 +512,7 @@ void TQProgressDialog::setTotalSteps( int totalSteps ) /*! Resets the progress dialog. - The progress dialog becomes hidden if autoClose() is TRUE. + The progress dialog becomes hidden if autoClose() is true. \sa setAutoClose(), setAutoReset() */ @@ -528,23 +528,23 @@ void TQProgressDialog::reset() if ( d->autoClose || d->forceHide ) hide(); bar()->reset(); - d->cancellation_flag = FALSE; - d->shown_once = FALSE; + d->cancellation_flag = false; + d->shown_once = false; forceTimer->stop(); } /*! - Resets the progress dialog. wasCanceled() becomes TRUE until + Resets the progress dialog. wasCanceled() becomes true until the progress dialog is reset. The progress dialog becomes hidden. */ void TQProgressDialog::cancel() { - d->forceHide = TRUE; + d->forceHide = true; reset(); - d->forceHide = FALSE; - d->cancellation_flag = TRUE; + d->forceHide = false; + d->cancellation_flag = true; } /*! @@ -596,7 +596,7 @@ void TQProgressDialog::setProgress( int progress ) bool need_show; int elapsed = d->starttime.elapsed(); if ( elapsed >= d->showTime ) { - need_show = TRUE; + need_show = true; } else { if ( elapsed > minWaitTime ) { int estimate; @@ -606,7 +606,7 @@ void TQProgressDialog::setProgress( int progress ) estimate = elapsed * (totalSteps() - progress) / progress; need_show = estimate >= d->showTime; } else { - need_show = FALSE; + need_show = false; } } if ( need_show ) { @@ -614,7 +614,7 @@ void TQProgressDialog::setProgress( int progress ) int h = TQMAX( isVisible() ? height() : 0, sizeHint().height() ); resize( w, h ); show(); - d->shown_once = TRUE; + d->shown_once = true; } } #ifdef TQ_WS_MACX @@ -759,7 +759,7 @@ void TQProgressDialog::closeEvent( TQCloseEvent *e ) \property TQProgressDialog::autoReset \brief whether the progress dialog calls reset() as soon as progress() equals totalSteps() - The default is TRUE. + The default is true. \sa setAutoClose() */ @@ -778,7 +778,7 @@ bool TQProgressDialog::autoReset() const \property TQProgressDialog::autoClose \brief whether the dialog gets hidden by reset() - The default is TRUE. + The default is true. \sa setAutoReset() */ @@ -819,7 +819,7 @@ void TQProgressDialog::forceShow() return; show(); - d->shown_once = TRUE; + d->shown_once = true; } diff --git a/src/dialogs/tqprogressdialog.h b/src/dialogs/tqprogressdialog.h index 628d6de19..6f65a7425 100644 --- a/src/dialogs/tqprogressdialog.h +++ b/src/dialogs/tqprogressdialog.h @@ -66,11 +66,11 @@ class TQ_EXPORT TQProgressDialog : public TQDialog TQ_PROPERTY( TQString labelText READ labelText WRITE setLabelText ) public: - TQProgressDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, + TQProgressDialog( TQWidget* parent=0, const char* name=0, bool modal=false, WFlags f=0 ); TQProgressDialog( const TQString& labelText, const TQString &cancelButtonText, int totalSteps, TQWidget* parent=0, const char* name=0, - bool modal=FALSE, WFlags f=0 ); + bool modal=false, WFlags f=0 ); ~TQProgressDialog(); void setLabel( TQLabel * ); diff --git a/src/dialogs/tqtabdialog.cpp b/src/dialogs/tqtabdialog.cpp index b312ccc64..c0ad02698 100644 --- a/src/dialogs/tqtabdialog.cpp +++ b/src/dialogs/tqtabdialog.cpp @@ -196,7 +196,7 @@ TQTabDialog::TQTabDialog( TQWidget *parent, const char *name, bool modal, d->ok = new TQPushButton( this, "ok" ); TQ_CHECK_PTR( d->ok ); d->ok->setText( tr("OK") ); - d->ok->setDefault( TRUE ); + d->ok->setDefault( true ); connect( d->ok, TQ_SIGNAL(clicked()), this, TQ_SIGNAL(applyButtonPressed()) ); connect( d->ok, TQ_SIGNAL(clicked()), @@ -242,8 +242,8 @@ void TQTabDialog::setFont( const TQFont & font ) /*! - Returns TRUE if the tab dialog has a Defaults button; otherwise - returns FALSE. + Returns true if the tab dialog has a Defaults button; otherwise + returns false. \sa setDefaultButton() defaultButtonPressed() hasApplyButton() hasCancelButton() @@ -256,8 +256,8 @@ bool TQTabDialog::hasDefaultButton() const /*! - Returns TRUE if the tab dialog has a Help button; otherwise returns - FALSE. + Returns true if the tab dialog has a Help button; otherwise returns + false. \sa setHelpButton() helpButtonPressed() hasApplyButton() hasCancelButton() @@ -284,8 +284,8 @@ bool TQTabDialog::hasHelpButton() const /*! - Returns TRUE if the tab dialog has a Cancel button; otherwise - returns FALSE. + Returns true if the tab dialog has a Cancel button; otherwise + returns false. \sa setCancelButton() cancelButtonPressed() hasApplyButton() hasDefaultButton() @@ -322,8 +322,8 @@ bool TQTabDialog::hasCancelButton() const /*! - Returns TRUE if the tab dialog has an Apply button; otherwise - returns FALSE. + Returns true if the tab dialog has an Apply button; otherwise + returns false. \sa setApplyButton() applyButtonPressed() hasCancelButton() hasDefaultButton() @@ -336,8 +336,8 @@ bool TQTabDialog::hasApplyButton() const /*! - Returns TRUE if the tab dialog has an OK button; otherwise returns - FALSE. + Returns true if the tab dialog has an OK button; otherwise returns + false. \sa setOkButton() hasApplyButton() hasCancelButton() hasDefaultButton() @@ -543,11 +543,11 @@ void TQTabDialog::showPage( TQWidget * w ) /*! \obsolete - Returns TRUE if the page with object name \a name is enabled and - FALSE if it is disabled. + Returns true if the page with object name \a name is enabled and + false if it is disabled. If \a name is 0 or not the name of any of the pages, isTabEnabled() - returns FALSE. + returns false. \sa setTabEnabled(), TQWidget::isEnabled() */ @@ -555,9 +555,9 @@ void TQTabDialog::showPage( TQWidget * w ) bool TQTabDialog::isTabEnabled( const char* name ) const { if ( !name ) - return FALSE; + return false; TQObjectList * l - = ((TQTabDialog *)this)->queryList( "TQWidget", name, FALSE, TRUE ); + = ((TQTabDialog *)this)->queryList( "TQWidget", name, false, true ); if ( l && l->first() ) { TQWidget * w; while( l->current() ) { @@ -572,7 +572,7 @@ bool TQTabDialog::isTabEnabled( const char* name ) const } } delete l; - return FALSE; + return false; } @@ -600,7 +600,7 @@ void TQTabDialog::setTabEnabled( const char* name, bool enable ) if ( !name ) return; TQObjectList * l - = ((TQTabDialog *)this)->queryList( "TQWidget", name, FALSE, TRUE ); + = ((TQTabDialog *)this)->queryList( "TQWidget", name, false, true ); if ( l && l->first() ) { TQObjectListIt it(*l); TQObject *o; @@ -632,7 +632,7 @@ void TQTabDialog::setTabEnabled( const char* name, bool enable ) /*! - Returns TRUE if the page \a w is enabled; otherwise returns FALSE. + Returns true if the page \a w is enabled; otherwise returns false. \sa setTabEnabled(), TQWidget::isEnabled() */ @@ -643,7 +643,7 @@ bool TQTabDialog::isTabEnabled( TQWidget* w ) const } /*! - If \a enable is TRUE the page \a w is enabled; otherwise \a w is + If \a enable is true the page \a w is enabled; otherwise \a w is disabled. The page's tab is redrawn appropriately. TQTabWidget uses TQWidget::setEnabled() internally, rather than keeping a diff --git a/src/dialogs/tqtabdialog.h b/src/dialogs/tqtabdialog.h index 61e4287c6..de6d8bc2c 100644 --- a/src/dialogs/tqtabdialog.h +++ b/src/dialogs/tqtabdialog.h @@ -56,7 +56,7 @@ class TQ_EXPORT TQTabDialog : public TQDialog { TQ_OBJECT public: - TQTabDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE, + TQTabDialog( TQWidget* parent=0, const char* name=0, bool modal=false, WFlags f=0 ); ~TQTabDialog(); diff --git a/src/dialogs/tqwizard.cpp b/src/dialogs/tqwizard.cpp index 78b7431b2..5e2ebaff8 100644 --- a/src/dialogs/tqwizard.cpp +++ b/src/dialogs/tqwizard.cpp @@ -112,9 +112,9 @@ public: struct Page { Page( TQWidget * widget, const TQString & title ): w( widget ), t( title ), - backEnabled( TRUE ), nextEnabled( TRUE ), finishEnabled( FALSE ), - helpEnabled( TRUE ), - appropriate( TRUE ) + backEnabled( true ), nextEnabled( true ), finishEnabled( false ), + helpEnabled( true ), + appropriate( true ) {} TQWidget * w; TQString t; @@ -168,7 +168,7 @@ TQWizard::TQWizard( TQWidget *parent, const char *name, bool modal, d = new TQWizardPrivate(); d->current = 0; // not quite true, but... d->ws = new TQWidgetStack( this, "qt_widgetstack" ); - d->pages.setAutoDelete( TRUE ); + d->pages.setAutoDelete( true ); d->title = new TQLabel( this, "title label" ); // create in nice tab order @@ -190,7 +190,7 @@ TQWizard::TQWizard( TQWidget *parent, const char *name, bool modal, d->finishButton->setText( tr( "&Finish" ) ); d->helpButton->setText( tr( "&Help" ) ); - d->nextButton->setDefault( TRUE ); + d->nextButton->setDefault( true ); connect( d->backButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(back()) ); @@ -273,7 +273,7 @@ void TQWizard::addPage( TQWidget * page, const TQString & title ) int i = d->pages.count(); if( i > 0 ) - d->pages.at( i - 1 )->nextEnabled = TRUE; + d->pages.at( i - 1 )->nextEnabled = true; TQWizardPrivate::Page * p = new TQWizardPrivate::Page( page, title ); p->backEnabled = ( i > 0 ); @@ -304,7 +304,7 @@ void TQWizard::insertPage( TQWidget * page, const TQString & title, int index ) index = d->pages.count(); if( index > 0 && ( index == (int)d->pages.count() ) ) - d->pages.at( index - 1 )->nextEnabled = TRUE; + d->pages.at( index - 1 )->nextEnabled = true; TQWizardPrivate::Page * p = new TQWizardPrivate::Page( page, title ); p->backEnabled = ( index > 0 ); @@ -337,7 +337,7 @@ void TQWizard::showPage( TQWidget * page ) if ( p ) { int i; for( i = 0; i < (int)d->pages.count() && d->pages.at( i ) != p; i++ ); - bool notFirst( FALSE ); + bool notFirst( false ); if( i ) { i--; @@ -347,7 +347,7 @@ void TQWizard::showPage( TQWidget * page ) } } setBackEnabled( notFirst ); - setNextEnabled( TRUE ); + setNextEnabled( true ); d->ws->raiseWidget( page ); d->current = p; } @@ -486,7 +486,7 @@ void TQWizard::setHelpEnabled( bool enable ) */ /*! - If \a enable is TRUE, page \a page has a Back button; otherwise \a + If \a enable is true, page \a page has a Back button; otherwise \a page has no Back button. By default all pages have this button. */ void TQWizard::setBackEnabled( TQWidget * page, bool enable ) @@ -501,7 +501,7 @@ void TQWizard::setBackEnabled( TQWidget * page, bool enable ) /*! - If \a enable is TRUE, page \a page has a Next button; otherwise + If \a enable is true, page \a page has a Next button; otherwise the Next button on \a page is disabled. By default all pages have this button. */ @@ -518,7 +518,7 @@ void TQWizard::setNextEnabled( TQWidget * page, bool enable ) /*! - If \a enable is TRUE, page \a page has a Finish button; otherwise + If \a enable is true, page \a page has a Finish button; otherwise \a page has no Finish button. By default \e no page has this button. */ @@ -534,7 +534,7 @@ void TQWizard::setFinishEnabled( TQWidget * page, bool enable ) /*! - If \a enable is TRUE, page \a page has a Help button; otherwise \a + If \a enable is true, page \a page has a Help button; otherwise \a page has no Help button. By default all pages have this button. */ void TQWizard::setHelpEnabled( TQWidget * page, bool enable ) @@ -550,10 +550,10 @@ void TQWizard::setHelpEnabled( TQWidget * page, bool enable ) /*! Called when the Next button is clicked; this virtual function - returns TRUE if \a page is relevant for display in the current - context; otherwise it is ignored by TQWizard and returns FALSE. The + returns true if \a page is relevant for display in the current + context; otherwise it is ignored by TQWizard and returns false. The default implementation returns the value set using - setAppropriate(). The ultimate default is TRUE. + setAppropriate(). The ultimate default is true. \warning The last page of the wizard will be displayed if no page is relevant in the current context. @@ -562,12 +562,12 @@ void TQWizard::setHelpEnabled( TQWidget * page, bool enable ) bool TQWizard::appropriate( TQWidget * page ) const { TQWizardPrivate::Page * p = d->page( page ); - return p ? p->appropriate : TRUE; + return p ? p->appropriate : true; } /*! - If \a appropriate is TRUE then page \a page is considered relevant + If \a appropriate is true then page \a page is considered relevant in the current context and should be displayed in the page sequence; otherwise \a page should not be displayed in the page sequence. @@ -589,7 +589,7 @@ void TQWizard::updateButtons() int i; for( i = 0; i < (int)d->pages.count() && d->pages.at( i ) != d->current; i++ ); - bool notFirst( FALSE ); + bool notFirst( false ); if( i ) { i--; while( ( i >= 0 ) && !notFirst ) { @@ -736,19 +736,19 @@ TQPushButton * TQWizard::helpButton() const void TQWizard::layOutButtonRow( TQHBoxLayout * layout ) { - bool hasHelp = FALSE; - bool hasEarlyFinish = FALSE; + bool hasHelp = false; + bool hasEarlyFinish = false; int i = d->pages.count() - 2; while ( !hasEarlyFinish && i >= 0 ) { if ( d->pages.at( i ) && d->pages.at( i )->finishEnabled ) - hasEarlyFinish = TRUE; + hasEarlyFinish = true; i--; } i = 0; while ( !hasHelp && i < (int)d->pages.count() ) { if ( d->pages.at( i ) && d->pages.at( i )->helpEnabled ) - hasHelp = TRUE; + hasHelp = true; i++; } @@ -767,7 +767,7 @@ void TQWizard::layOutButtonRow( TQHBoxLayout * layout ) h->addSpacing( 6 ); if (d->current == d->pages.at( d->pages.count()-1 )) - hasEarlyFinish = FALSE; + hasEarlyFinish = false; if ( hasEarlyFinish ) { d->nextButton->show(); diff --git a/src/dialogs/tqwizard.h b/src/dialogs/tqwizard.h index c680e2860..b9bb060f1 100644 --- a/src/dialogs/tqwizard.h +++ b/src/dialogs/tqwizard.h @@ -57,7 +57,7 @@ class TQ_EXPORT TQWizard : public TQDialog TQ_PROPERTY( TQFont titleFont READ titleFont WRITE setTitleFont ) public: - TQWizard( TQWidget* parent=0, const char* name=0, bool modal=FALSE, + TQWizard( TQWidget* parent=0, const char* name=0, bool modal=false, WFlags f=0 ); ~TQWizard(); |
