diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-08 12:59:07 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-04-10 17:35:38 +0900 |
commit | d2d30bfbef26707f9158cbc31d5763a9a1d4ab2d (patch) | |
tree | 6d2d4502d6fbe4d6810bfb7bcf297cbf995d3db8 /kdevdesigner/designer/mainwindow.cpp | |
parent | b9618de13e8f38c3558e9ed393a75c1f13af665c (diff) | |
download | tdevelop-r14.1.4.tar.gz tdevelop-r14.1.4.zip |
Replace TRUE/FALSE with boolean values true/falser14.1.4
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 5198c9d3ac02aa9c7949f49e3cf374f683facb18)
Diffstat (limited to 'kdevdesigner/designer/mainwindow.cpp')
-rw-r--r-- | kdevdesigner/designer/mainwindow.cpp | 506 |
1 files changed, 253 insertions, 253 deletions
diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index cd1bcd93..050fc1b2 100644 --- a/kdevdesigner/designer/mainwindow.cpp +++ b/kdevdesigner/designer/mainwindow.cpp @@ -119,7 +119,7 @@ #include "kdevdesigner_part.h" -static bool mblockNewForms = FALSE; +static bool mblockNewForms = false; extern TQMap<TQWidget*, TQString> *qwf_forms; extern TQString *qwf_language; extern bool qwf_execute_code; @@ -151,9 +151,9 @@ static TQString textNoAccel( const TQString& text) MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, const TQString &plgDir ) : TQMainWindow( 0, "designer_mainwindow"/*, WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader*/ ), - grd( 10, 10 ), sGrid( TRUE ), snGrid( TRUE ), restoreConfig( TRUE ), splashScreen( TRUE ), + grd( 10, 10 ), sGrid( true ), snGrid( true ), restoreConfig( true ), splashScreen( true ), fileFilter( i18n( "TQt User-Interface Files (*.ui)" ) ), client( asClient ), - previewing( FALSE ), databaseAutoEdit( FALSE ), autoSaveEnabled( FALSE ), autoSaveInterval( 1800 ), m_part(part) + previewing( false ), databaseAutoEdit( false ), autoSaveEnabled( false ), autoSaveInterval( 1800 ), m_part(part) { // extern void qInitImages_designercore(); // qInitImages_designercore(); @@ -161,16 +161,16 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons self = this; setPluginDirectory( plgDir ); customWidgetToolBar = customWidgetToolBar2 = 0; - guiStuffVisible = TRUE; - editorsReadOnly = FALSE; - sSignalHandlers = TRUE; + guiStuffVisible = true; + editorsReadOnly = false; + sSignalHandlers = true; init_colors(); - shStartDialog = FALSE; + shStartDialog = false; desInterface = new DesignerInterfaceImpl( this ); desInterface->addRef(); - inDebugMode = FALSE; - savePluginPaths = FALSE; + inDebugMode = false; + savePluginPaths = false; updateFunctionsTimer = new TQTimer( this ); connect( updateFunctionsTimer, TQ_SIGNAL( timeout() ), @@ -237,8 +237,8 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons connect( this, TQ_SIGNAL( projectChanged() ), this, TQ_SLOT( emitProjectSignals() ) ); connect( this, TQ_SIGNAL( hasActiveWindow(bool) ), this, TQ_SLOT( emitProjectSignals() ) ); - emit hasActiveForm( FALSE ); - emit hasActiveWindow( FALSE ); + emit hasActiveForm( false ); + emit hasActiveWindow( false ); lastPressWidget = 0; tqApp->installEventFilter( this ); @@ -250,30 +250,30 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons connect( tqApp->clipboard(), TQ_SIGNAL( dataChanged() ), this, TQ_SLOT( clipboardChanged() ) ); clipboardChanged(); - layoutChilds = FALSE; - layoutSelected = FALSE; - breakLayout = FALSE; - backPix = TRUE; + layoutChilds = false; + layoutSelected = false; + breakLayout = false; + backPix = true; set_splash_status( "Loading User Settings..." ); readConfig(); // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties) - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, FALSE ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, false ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, false ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, false ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, false ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, 0, false ); delete w; - setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); + setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), false ); actionEditor->parentWidget()->hide(); assistant = new TQAssistantClient( assistantPath(), this ); - statusBar()->setSizeGripEnabled( TRUE ); + statusBar()->setSizeGripEnabled( true ); set_splash_status( "Initialization Done." ); /* if ( shStartDialog ) TQTimer::singleShot( 0, this, TQ_SLOT( showStartDialog() ));*/ @@ -332,11 +332,11 @@ void MainWindow::setupMDI() vbox->setLineWidth( 1 ); qworkspace = new TQWorkspace( vbox ); qworkspace->setPaletteBackgroundPixmap( UserIcon( "designer_background.png", KDevDesignerPartFactory::instance() ) ); - qworkspace->setScrollBarsEnabled( TRUE ); + qworkspace->setScrollBarsEnabled( true ); connect( qworkspace, TQ_SIGNAL( windowActivated( TQWidget * ) ), this, TQ_SLOT( activeWindowChanged( TQWidget * ) ) ); lastActiveFormWindow = 0; - qworkspace->setAcceptDrops( TRUE ); + qworkspace->setAcceptDrops( true ); } void MainWindow::setupMenuBar() @@ -347,7 +347,7 @@ void MainWindow::setupMenuBar() void MainWindow::setupPropertyEditor() { TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); propertyEditor = new PropertyEditor( dw ); addToolBar( dw, TQt::DockRight ); @@ -376,7 +376,7 @@ void MainWindow::setupPropertyEditor() void MainWindow::setupOutputWindow() { TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); addToolBar( dw, TQt::DockBottom ); oWindow = new OutputWindow( dw ); @@ -390,7 +390,7 @@ void MainWindow::setupHierarchyView() if ( hierarchyView ) return; TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); hierarchyView = new HierarchyView( dw ); addToolBar( dw, TQt::DockRight ); @@ -412,7 +412,7 @@ void MainWindow::setupHierarchyView() void MainWindow::setupWorkspace() { TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); TQVBox *vbox = new TQVBox( dw ); QCompletionEdit *edit = new QCompletionEdit( vbox ); @@ -438,7 +438,7 @@ void MainWindow::setupActionEditor() { TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, 0 ); addDockWindow( dw, TQt::DockTornOff ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); actionEditor = new ActionEditor( dw ); dw->setWidget( actionEditor ); @@ -452,13 +452,13 @@ void MainWindow::setupActionEditor() "these are displayed on toolbar buttons and besides their names in " "menus.</p>" ) ); dw->hide(); - setAppropriate( dw, FALSE ); + setAppropriate( dw, false ); } void MainWindow::setupToolbox() { TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); addToolBar( dw, TQt::DockLeft ); toolBox = new TQToolBox( dw ); @@ -466,9 +466,9 @@ void MainWindow::setupToolbox() dw->setFixedExtentWidth( 160 ); dw->setCaption( i18n( "Toolbox" ) ); dw->show(); - setDockEnabled( dw, TQt::DockTop, FALSE ); - setDockEnabled( dw, TQt::DockBottom, FALSE ); - commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" ); + setDockEnabled( dw, TQt::DockTop, false ); + setDockEnabled( dw, TQt::DockBottom, false ); + commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, false, "Common Widgets" ); commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame ); commonWidgetsToolBar->setOrientation( TQt::Vertical ); commonWidgetsToolBar->setBackgroundMode(PaletteBase); @@ -548,14 +548,14 @@ void MainWindow::runProjectPrecondition() oWindow->clearErrorMessages(); oWindow->clearDebug(); oWindow->showDebugTab(); - previewing = TRUE; + previewing = true; } void MainWindow::runProjectPostcondition( TQObjectList *l ) { - inDebugMode = TRUE; + inDebugMode = true; debuggingForms = *l; - enableAll( FALSE ); + enableAll( false ); for ( SourceEditor *e2 = sourceEditors.first(); e2; e2 = sourceEditors.next() ) { if ( e2->project() == currentProject ) e2->editorInterface()->setMode( EditorInterface::Debugging ); @@ -564,7 +564,7 @@ void MainWindow::runProjectPostcondition( TQObjectList *l ) TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) { - qwf_execute_code = FALSE; + qwf_execute_code = false; for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) e->save(); if ( currentTool() == ORDER_TOOL ) @@ -586,7 +586,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) if ( fw->project() ) { TQStringList::ConstIterator it; for ( it = databases.begin(); it != databases.end(); ++it ) - fw->project()->openDatabase( *it, FALSE ); + fw->project()->openDatabase( *it, false ); } TQApplication::setOverrideCursor( WaitCursor ); @@ -622,9 +622,9 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) w->move( fw->mapToGlobal( TQPoint(0,0) ) ); ((MainWindow*)w )->setWFlags( WDestructiveClose ); - previewing = TRUE; + previewing = true; w->show(); - previewing = FALSE; + previewing = false; TQApplication::restoreOverrideCursor(); return w; } @@ -731,10 +731,10 @@ void MainWindow::previewForm( const TQString & style ) void MainWindow::helpContents() { TQWidget *focusWidget = tqApp->focusWidget(); - bool showClassDocu = TRUE; + bool showClassDocu = true; while ( focusWidget ) { if ( focusWidget->isA( "PropertyList" ) ) { - showClassDocu = FALSE; + showClassDocu = false; break; } focusWidget = focusWidget->parentWidget(); @@ -808,7 +808,7 @@ void MainWindow::helpManual() void MainWindow::helpAbout() { - AboutDialog dlg( this, 0, TRUE ); + AboutDialog dlg( this, 0, true ); if ( singleProjectMode() ) { dlg.aboutPixmap->setText( "" ); dlg.aboutVersion->setText( "" ); @@ -913,7 +913,7 @@ void MainWindow::showProperties( TQObject *o ) void MainWindow::resetTool() { - actionPointerTool->setOn( TRUE ); + actionPointerTool->setOn( true ); } void MainWindow::updateProperties( TQObject * ) @@ -930,7 +930,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ::tqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) { if ( e->type() == TQEvent::Accel && ::tqt_cast<PopupMenuEditor*>(o) ) { - return TRUE; // consume accel events + return true; // consume accel events } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<MenuBarEditor*>(o) ) { TQPoint pos = ((TQMouseEvent*)e)->pos(); MenuBarEditor *m = ::tqt_cast<MenuBarEditor*>(o); @@ -959,12 +959,12 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) while ( w ) { if ( ::tqt_cast<PropertyList*>(w) ) break; - w = w->parentWidget( TRUE ); + w = w->parentWidget( true ); } if ( w ) { propertyEditor->propertyList()->showCurrentWhatsThis(); ( (TQKeyEvent*)e )->accept(); - return TRUE; + return true; } } break; @@ -975,7 +975,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) if ( qWorkspace()->activeWindow() && ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (TQKeyEvent*)e )->ignore(); - return TRUE; + return true; } } break; @@ -1028,7 +1028,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) if( e->type() == TQEvent::ContextMenu ) { ( (FormWindow*)w )->handleContextMenu( (TQContextMenuEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); - return TRUE; + return true; } else { ( (FormWindow*)w )->handleMousePress( (TQMouseEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); @@ -1038,7 +1038,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) if ( passiveInteractor ) TQTimer::singleShot( 0, formWindow(), TQ_SLOT( visibilityChanged() ) ); if ( currentTool() == CONNECT_TOOL || currentTool() == BUDDY_TOOL ) - return TRUE; + return true; return !passiveInteractor; case TQEvent::MouseButtonRelease: lastPressWidget = 0; @@ -1067,7 +1067,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) !::tqt_cast<SizeHandle*>(o) && !::tqt_cast<OrderIndicator*>(o) && !::tqt_cast<PopupMenuEditor*>(o) && !::tqt_cast<TQMenuBar*>(o) && !::tqt_cast<TQSizeGrip*>(o) ) - return TRUE; + return true; if ( o && ::tqt_cast<TQSizeGrip*>(o) ) break; if ( lastPressWidget != (TQWidget*)o || @@ -1082,12 +1082,12 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::KeyPress: if ( ( (TQKeyEvent*)e )->key() == Key_Escape && currentTool() != POINTER_TOOL ) { resetTool(); - return FALSE; + return false; } if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) { if ( ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { qWorkspace()->activeWindow()->setFocus(); - return TRUE; + return true; } } if ( !( w = isAFormWindowChild( o ) ) || @@ -1096,7 +1096,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; ( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( ((TQKeyEvent*)e)->isAccepted() ) - return TRUE; + return true; break; case TQEvent::MouseButtonDblClick: if ( !( w = isAFormWindowChild( o ) ) || @@ -1110,11 +1110,11 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) if ( currentTool() == ORDER_TOOL ) { ( (FormWindow*)w )->handleMouseDblClick( (TQMouseEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); - return TRUE; + return true; } if ( !WidgetFactory::isPassiveInteractor( o ) && ( (FormWindow*)w )->formFile() ) return openEditor( ( (FormWindow*)w )->designerWidget( o ), (FormWindow*)w ); - return TRUE; + return true; case TQEvent::KeyRelease: if ( !( w = isAFormWindowChild( o ) ) || ::tqt_cast<SizeHandle*>(o) || @@ -1122,7 +1122,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; ( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( ((TQKeyEvent*)e)->isAccepted() ) - return TRUE; + return true; break; case TQEvent::Hide: if ( !( w = isAFormWindowChild( o ) ) || @@ -1130,7 +1130,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ::tqt_cast<OrderIndicator*>(o) ) break; if ( ( (FormWindow*)w )->isWidgetSelected( o ) ) - ( (FormWindow*)w )->selectWidget( o, FALSE ); + ( (FormWindow*)w )->selectWidget( o, false ); break; case TQEvent::Enter: case TQEvent::Leave: @@ -1139,7 +1139,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ::tqt_cast<OrderIndicator*>(o) || ::tqt_cast<MenuBarEditor*>(o) ) break; - return TRUE; + return true; case TQEvent::Resize: case TQEvent::Move: if ( !( w = isAFormWindowChild( o ) ) || @@ -1164,19 +1164,19 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::DragEnter: if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e ); - return TRUE; + return true; } break; case TQEvent::DragMove: if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e ); - return TRUE; + return true; } break; case TQEvent::Drop: if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDropEvent( (TQDropEvent*)e ); - return TRUE; + return true; } break; case TQEvent::Show: @@ -1187,16 +1187,16 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) TQApplication::sendPostedEvents( qworkspace, TQEvent::ChildInserted ); showEvent( (TQShowEvent*)e ); checkTempFiles(); - return TRUE; + return true; case TQEvent::Wheel: if ( !( w = isAFormWindowChild( o ) ) || ::tqt_cast<SizeHandle*>(o) || ::tqt_cast<OrderIndicator*>(o) ) break; - return TRUE; + return true; case TQEvent::FocusIn: if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) - return TRUE; //FIXME + return true; //FIXME if ( hierarchyView->formDefinitionView()->isRenaming() && ( o->inherits( "Editor" ) || ::tqt_cast<FormWindow*>(o) ) ) TQApplication::sendPostedEvents(); @@ -1205,7 +1205,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) while ( w ) { if ( ::tqt_cast<SourceEditor*>(w) ) break; - w = w->parentWidget( TRUE ); + w = w->parentWidget( true ); } if ( ::tqt_cast<SourceEditor*>(w) ) ( (SourceEditor*)w )->checkTimeStamp(); @@ -1217,7 +1217,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::FocusOut: if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) - return TRUE; + return true; break; default: return TQMainWindow::eventFilter( o, e ); @@ -1334,7 +1334,7 @@ void MainWindow::createNewProject( const TQString &lang ) } TQAction *a = new TQAction( pro->makeRelative( pro->fileName() ), - pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, TRUE ); + pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, true ); projects.insert( a, pro ); addRecentlyOpened( pro->makeAbsolute( pro->fileName() ), recentlyProjects ); projectSelected( a ); @@ -1349,7 +1349,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) lastActiveFormWindow = 0; TQPtrList<SourceEditor> waitingForDelete; - waitingForDelete.setAutoDelete( TRUE ); + waitingForDelete.setAutoDelete( true ); for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { if ( e->object() == w ) waitingForDelete.append( e ); @@ -1360,7 +1360,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) actionEditor->parentWidget()->hide(); } - return TRUE; + return true; } void MainWindow::activeWindowChanged( TQWidget *w ) @@ -1371,7 +1371,7 @@ void MainWindow::activeWindowChanged( TQWidget *w ) FormWindow *ofw = lastActiveFormWindow; lastActiveFormWindow = fw; lastActiveFormWindow->updateUndoInfo(); - emit hasActiveForm( TRUE ); + emit hasActiveForm( true ); if ( formWindow() ) { formWindow()->emitShowProperties(); emit formModified( formWindow()->commandHistory()->isModified() ); @@ -1406,17 +1406,17 @@ void MainWindow::activeWindowChanged( TQWidget *w ) propertyEditor->resetFocus(); } else if ( !lastActiveFormWindow ) { emit formWindowChanged(); - emit hasActiveForm( FALSE ); - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); + emit hasActiveForm( false ); + actionEditUndo->setEnabled( false ); + actionEditRedo->setEnabled( false ); } if ( !w ) { emit formWindowChanged(); - emit hasActiveForm( FALSE ); + emit hasActiveForm( false ); propertyEditor->clear(); hierarchyView->clear(); - updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); + updateUndoRedo( false, false, TQString(), TQString() ); } selectionChanged(); @@ -1428,18 +1428,18 @@ void MainWindow::activeWindowChanged( TQWidget *w ) lastActiveFormWindow != fw ) { activeWindowChanged( se->formWindow() ); } - actionSearchFind->setEnabled( TRUE ); - actionSearchIncremetal->setEnabled( TRUE ); - actionSearchReplace->setEnabled( TRUE ); - actionSearchGotoLine->setEnabled( TRUE ); - incrementalSearch->setEnabled( TRUE ); - - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); - actionEditCut->setEnabled( TRUE ); - actionEditCopy->setEnabled( TRUE ); - actionEditPaste->setEnabled( TRUE ); - actionEditSelectAll->setEnabled( TRUE ); + actionSearchFind->setEnabled( true ); + actionSearchIncremetal->setEnabled( true ); + actionSearchReplace->setEnabled( true ); + actionSearchGotoLine->setEnabled( true ); + incrementalSearch->setEnabled( true ); + + actionEditUndo->setEnabled( false ); + actionEditRedo->setEnabled( false ); + actionEditCut->setEnabled( true ); + actionEditCopy->setEnabled( true ); + actionEditPaste->setEnabled( true ); + actionEditSelectAll->setEnabled( true ); actionEditUndo->setMenuText( i18n( "&Undo" ) ); actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) ); actionEditRedo->setMenuText( i18n( "&Redo" ) ); @@ -1457,11 +1457,11 @@ void MainWindow::activeWindowChanged( TQWidget *w ) } workspace()->activeEditorChanged( se ); } else { - actionSearchFind->setEnabled( FALSE ); - actionSearchIncremetal->setEnabled( FALSE ); - actionSearchReplace->setEnabled( FALSE ); - actionSearchGotoLine->setEnabled( FALSE ); - incrementalSearch->setEnabled( FALSE ); + actionSearchFind->setEnabled( false ); + actionSearchIncremetal->setEnabled( false ); + actionSearchReplace->setEnabled( false ); + actionSearchGotoLine->setEnabled( false ); + incrementalSearch->setEnabled( false ); } if ( currentTool() == ORDER_TOOL && w != old ) @@ -1491,8 +1491,8 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) ); if ( currentTool() == ORDER_TOOL ) { - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); + actionEditUndo->setEnabled( false ); + actionEditRedo->setEnabled( false ); } } @@ -1549,18 +1549,18 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int> &props, TQWidget *w ) { - const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); + const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", true ), true ); if ( text && qstrcmp( text->type(), "TQString") != 0 ) text = 0; - const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true ); if ( title && qstrcmp( title->type(), "TQString") != 0 ) title = 0; const TQMetaProperty* pagetitle = - w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); + w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", true ), true ); if ( pagetitle && qstrcmp( pagetitle->type(), "TQString") != 0 ) pagetitle = 0; const TQMetaProperty* pixmap = - w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE ); + w->metaObject()->property( w->metaObject()->findProperty( "pixmap", true ), true ); if ( pixmap && qstrcmp( pixmap->type(), "TQPixmap") != 0 ) pixmap = 0; @@ -1713,12 +1713,12 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWidget *w ) { if ( id == props[ "text" ] ) { - bool ok = FALSE; - bool oldDoWrap = FALSE; + bool ok = false; + bool oldDoWrap = false; if ( ::tqt_cast<TQLabel*>(w) ) { int align = w->property( "alignment" ).toInt(); if ( align & WordBreak ) - oldDoWrap = TRUE; + oldDoWrap = true; } bool doWrap = oldDoWrap; @@ -1738,7 +1738,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid TQVariant( doWrap ), TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); + MetaDataBase::setPropertyChanged( w, "wordwrap", true ); } TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); @@ -1747,10 +1747,10 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "text", TRUE ); + MetaDataBase::setPropertyChanged( w, "text", true ); } } else if ( id == props[ "title" ] ) { - bool ok = FALSE; + bool ok = false; TQString title = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); if ( ok ) { @@ -1760,10 +1760,10 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid title, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "title", TRUE ); + MetaDataBase::setPropertyChanged( w, "title", true ); } } else if ( id == props[ "pagetitle" ] ) { - bool ok = FALSE; + bool ok = false; TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this ); if ( ok ) { @@ -1774,7 +1774,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "pageTitle", TRUE ); + MetaDataBase::setPropertyChanged( w, "pageTitle", true ); } } else if ( id == props[ "pixmap" ] ) { TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap(); @@ -1786,7 +1786,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid pix, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "pixmap", TRUE ); + MetaDataBase::setPropertyChanged( w, "pixmap", true ); } } } @@ -1858,7 +1858,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command currentPage + 1, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( w, "currentPage", true ); } else if ( id == commands[ "prevpage" ] ) { int currentPage = w->property( "currentPage" ).toInt(); TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) ); @@ -1868,7 +1868,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command currentPage -1, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( w, "currentPage", true ); } #ifdef TQT_CONTAINER_CUSTOM_WIDGETS } else if ( WidgetDatabase:: @@ -1898,7 +1898,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command } else if ( id == commands[ "rename" ] ) { TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); if ( iface ) { - bool ok = FALSE; + bool ok = false; TQString wClassName = WidgetFactory::classNameOf( w ); int index = iface->currentIndex( wClassName, w ); TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), @@ -1958,7 +1958,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command delete e; } else if ( id == commands[ "rename" ] ) { - bool ok = FALSE; + bool ok = false; QDesignerWizard *dw = (QDesignerWizard*)wiz; TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), TQLineEdit::Normal, dw->pageTitle(), &ok, this ); @@ -1998,23 +1998,23 @@ void MainWindow::clipboardChanged() void MainWindow::selectionChanged() { - layoutChilds = FALSE; - layoutSelected = FALSE; - breakLayout = FALSE; + layoutChilds = false; + layoutSelected = false; + breakLayout = false; if ( !formWindow() ) { - actionEditCut->setEnabled( FALSE ); - actionEditCopy->setEnabled( FALSE ); - actionEditDelete->setEnabled( FALSE ); - actionEditAdjustSize->setEnabled( FALSE ); - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditSplitHorizontal->setEnabled( FALSE ); - actionEditSplitVertical->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); - actionEditLower->setEnabled( FALSE ); - actionEditRaise->setEnabled( FALSE ); - actionEditAdjustSize->setEnabled( FALSE ); + actionEditCut->setEnabled( false ); + actionEditCopy->setEnabled( false ); + actionEditDelete->setEnabled( false ); + actionEditAdjustSize->setEnabled( false ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditSplitHorizontal->setEnabled( false ); + actionEditSplitVertical->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); + actionEditBreakLayout->setEnabled( false ); + actionEditLower->setEnabled( false ); + actionEditRaise->setEnabled( false ); + actionEditAdjustSize->setEnabled( false ); return; } @@ -2026,11 +2026,11 @@ void MainWindow::selectionChanged() actionEditLower->setEnabled( enable ); actionEditRaise->setEnabled( enable ); - actionEditAdjustSize->setEnabled( FALSE ); - actionEditSplitHorizontal->setEnabled( FALSE ); - actionEditSplitVertical->setEnabled( FALSE ); + actionEditAdjustSize->setEnabled( false ); + actionEditSplitHorizontal->setEnabled( false ); + actionEditSplitVertical->setEnabled( false ); - enable = FALSE; + enable = false; TQWidgetList widgets = formWindow()->selectedWidgets(); if ( selectedWidgets > 1 ) { int unlaidout = 0; @@ -2058,69 +2058,69 @@ void MainWindow::selectionChanged() WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ); if ( !isContainer ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); - breakLayout = TRUE; + breakLayout = true; } else { - actionEditBreakLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( false ); } } else { if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { if ( !formWindow()->hasInsertedChildren( w ) ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); + actionEditBreakLayout->setEnabled( false ); } else { - actionEditHLayout->setEnabled( TRUE ); - actionEditVLayout->setEnabled( TRUE ); - actionEditGridLayout->setEnabled( TRUE ); - actionEditBreakLayout->setEnabled( FALSE ); - layoutChilds = TRUE; + actionEditHLayout->setEnabled( true ); + actionEditVLayout->setEnabled( true ); + actionEditGridLayout->setEnabled( true ); + actionEditBreakLayout->setEnabled( false ); + layoutChilds = true; } if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); - breakLayout = TRUE; + breakLayout = true; } } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); - breakLayout = TRUE; + breakLayout = true; } } } else if ( selectedWidgets == 0 ) { - actionEditAdjustSize->setEnabled( TRUE ); + actionEditAdjustSize->setEnabled( true ); TQWidget *w = formWindow()->mainContainer(); if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { if ( !formWindow()->hasInsertedChildren( w ) ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); + actionEditBreakLayout->setEnabled( false ); } else { - actionEditHLayout->setEnabled( TRUE ); - actionEditVLayout->setEnabled( TRUE ); - actionEditGridLayout->setEnabled( TRUE ); - actionEditBreakLayout->setEnabled( FALSE ); - layoutChilds = TRUE; + actionEditHLayout->setEnabled( true ); + actionEditVLayout->setEnabled( true ); + actionEditGridLayout->setEnabled( true ); + actionEditBreakLayout->setEnabled( false ); + layoutChilds = true; } } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( TRUE ); - breakLayout = TRUE; + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); + actionEditBreakLayout->setEnabled( true ); + breakLayout = true; } } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); + actionEditBreakLayout->setEnabled( false ); } } @@ -2247,12 +2247,12 @@ void MainWindow::readConfig() config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); bool ok; - bool readPreviousConfig = FALSE; + bool readPreviousConfig = false; TQString backPixName( TQDir::home().absPath() + "/.designer/" + "background.xpm" ); - restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); + restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", true, &ok ); if ( !ok ) { keybase = DesignerApplication::oldSettingsKey(); - restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); + restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", true, &ok ); if ( !ok ) { if ( oWindow ) { oWindow->shuttingDown(); @@ -2264,7 +2264,7 @@ void MainWindow::readConfig() qworkspace->setBackgroundPixmap( pix ); return; } - readPreviousConfig = TRUE; + readPreviousConfig = true; } if ( !readPreviousConfig ) { fileFilter = config.readEntry( keybase + "FileFilter", fileFilter ); @@ -2303,7 +2303,7 @@ void MainWindow::readConfig() recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects" ); } - backPix = config.readBoolEntry( keybase + "Background/UsePixmap", TRUE ) | readPreviousConfig; + backPix = config.readBoolEntry( keybase + "Background/UsePixmap", true ) | readPreviousConfig; if ( backPix ) { TQPixmap pix; pix.load( backPixName ); @@ -2314,14 +2314,14 @@ void MainWindow::readConfig() } if ( !readPreviousConfig ) { - splashScreen = config.readBoolEntry( keybase + "SplashScreen", TRUE ); + splashScreen = config.readBoolEntry( keybase + "SplashScreen", true ); - sGrid = config.readBoolEntry( keybase + "Grid/Show", TRUE ); - snGrid = config.readBoolEntry( keybase + "Grid/Snap", TRUE ); + sGrid = config.readBoolEntry( keybase + "Grid/Show", true ); + snGrid = config.readBoolEntry( keybase + "Grid/Snap", true ); grd.setX( config.readNumEntry( keybase + "Grid/x", 10 ) ); grd.setY( config.readNumEntry( keybase + "Grid/y", 10 ) ); - if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", FALSE ) ) { + if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", false ) ) { TQRect r( pos(), size() ); r.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", r.x() ) ); r.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", r.y() ) ); @@ -2335,8 +2335,8 @@ void MainWindow::readConfig() move( r.topLeft() ); } } - setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", FALSE ) ); - setUsesBigPixmaps( FALSE /*config.readBoolEntry( "BigIcons", FALSE )*/ ); // ### disabled for now + setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", false ) ); + setUsesBigPixmaps( false /*config.readBoolEntry( "BigIcons", false )*/ ); // ### disabled for now } } int num = config.readNumEntry( keybase + "CustomWidgets/num" ); @@ -2595,13 +2595,13 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) new AddConnectionCommand( i18n( "Add Connection" ), f, conn ); f->commandHistory()->addCommand( cmd ); cmd->execute(); - f->formFile()->setModified( TRUE ); + f->formFile()->setModified( true ); } } } - editFunction( s, TRUE ); + editFunction( s, true ); } - return TRUE; + return true; } if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) { @@ -2609,18 +2609,18 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ), this, w, formWindow() ); statusBar()->clear(); - return TRUE; + return true; } - const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", true ), true ); + const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true ); if ( text && text->designable(w) ) { - bool ok = FALSE; - bool oldDoWrap = FALSE; + bool ok = false; + bool oldDoWrap = false; if ( ::tqt_cast<TQLabel*>(w) ) { int align = w->property( "alignment" ).toInt(); if ( align & WordBreak ) - oldDoWrap = TRUE; + oldDoWrap = true; } bool doWrap = oldDoWrap; @@ -2641,7 +2641,7 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) TQVariant( doWrap ), TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); + MetaDataBase::setPropertyChanged( w, "wordwrap", true ); } TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); @@ -2650,12 +2650,12 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "text", TRUE ); + MetaDataBase::setPropertyChanged( w, "text", true ); } - return TRUE; + return true; } if ( title && title->designable(w) ) { - bool ok = FALSE; + bool ok = false; TQString text; text = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); if ( ok ) { @@ -2665,15 +2665,15 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "title", TRUE ); + MetaDataBase::setPropertyChanged( w, "title", true ); } - return TRUE; + return true; } if ( !WidgetFactory::isPassiveInteractor( w ) ) editSource(); - return TRUE; + return true; } void MainWindow::rebuildCustomWidgetGUI() @@ -2698,7 +2698,7 @@ void MainWindow::rebuildCustomWidgetGUI() for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { WidgetAction* a = new WidgetAction( "Custom Widgets", actionGroupTools, TQString::number( w->id ).latin1() ); - a->setToggleAction( TRUE ); + a->setToggleAction( true ); a->setText( w->className ); a->setIconSet( *w->pixmap ); a->setStatusTip( i18n( "Insert a %1 (custom widget)" ).arg( w->className ) ); @@ -2725,16 +2725,16 @@ void MainWindow::rebuildCustomWidgetGUI() void MainWindow::rebuildCommonWidgetsToolBoxPage() { - toolBox->setUpdatesEnabled( FALSE ); - commonWidgetsToolBar->setUpdatesEnabled( FALSE ); + toolBox->setUpdatesEnabled( false ); + commonWidgetsToolBar->setUpdatesEnabled( false ); commonWidgetsToolBar->clear(); for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() ) a->addTo( commonWidgetsToolBar ); TQWidget *w; commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); - toolBox->setUpdatesEnabled( TRUE ); - commonWidgetsToolBar->setUpdatesEnabled( TRUE ); + toolBox->setUpdatesEnabled( true ); + commonWidgetsToolBar->setUpdatesEnabled( true ); } bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) @@ -2743,10 +2743,10 @@ bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) for ( TQWidget *w = windows.first(); w; w = windows.next() ) { if ( ::tqt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) ) - return TRUE; + return true; } } - return FALSE; + return false; } void MainWindow::setGrid( const TQPoint &p ) @@ -2796,11 +2796,11 @@ void MainWindow::windowsMenuActivated( int id ) void MainWindow::projectSelected( TQAction *a ) { - a->setOn( TRUE ); + a->setOn( true ); if ( currentProject ) - currentProject->setActive( FALSE ); + currentProject->setActive( false ); Project *p = *projects.find( a ); - p->setActive( TRUE ); + p->setActive( true ); if ( currentProject == p ) return; currentProject = p; @@ -2818,8 +2818,8 @@ void MainWindow::openProject( const TQString &fn ) } TQApplication::setOverrideCursor( waitCursor ); Project *pro = new Project( fn, "", projectSettingsPluginManager ); - pro->setModified( FALSE ); - TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, TRUE ); + pro->setModified( false ); + TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, true ); projects.insert( a, pro ); projectSelected( a ); TQApplication::restoreOverrideCursor(); @@ -2843,7 +2843,7 @@ void MainWindow::checkTempFiles() TQApplication::setOverrideCursor( waitCursor ); for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { if ( load ) - openFormWindow( s + "/" + *it, FALSE ); + openFormWindow( s + "/" + *it, false ); d.remove( *it ); } } @@ -2955,7 +2955,7 @@ void MainWindow::editFunction( const TQString &func, bool rereadSource ) return; if ( formWindow()->formFile()->codeFileState() != FormFile::Ok ) - if ( !formWindow()->formFile()->setupUihFile(FALSE) ) + if ( !formWindow()->formFile()->setupUihFile(false) ) return; TQString lang = currentProject->language(); @@ -3199,7 +3199,7 @@ void MainWindow::setModified( bool b, TQWidget *window ) } return; } - w = w->parentWidget( TRUE ); + w = w->parentWidget( true ); } } @@ -3210,13 +3210,13 @@ void MainWindow::editorClosed( SourceEditor *e ) void MainWindow::functionsChanged() { - updateFunctionsTimer->start( 0, TRUE ); + updateFunctionsTimer->start( 0, true ); } void MainWindow::doFunctionsChanged() { for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->refresh( FALSE ); + e->refresh( false ); hierarchyView->formDefinitionView()->refresh(); } @@ -3271,17 +3271,17 @@ void MainWindow::showErrorMessage( TQObject *o, int errorLine, const TQString &e ol.append( o ); TQStringList ll; ll << currentProject->locationOfObject( o ); - oWindow->setErrorMessages( l2, l, TRUE, ll, ol ); + oWindow->setErrorMessages( l2, l, true, ll, ol ); showSourceLine( o, errorLine, Error ); } } void MainWindow::finishedRun() { - inDebugMode = FALSE; - previewing = FALSE; + inDebugMode = false; + previewing = false; debuggingForms.clear(); - enableAll( TRUE ); + enableAll( true ); for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { if ( e->project() == currentProject ) e->editorInterface()->setMode( EditorInterface::Editing ); @@ -3415,11 +3415,11 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) return; } - mblockNewForms = TRUE; + mblockNewForms = true; if ( !fw ) openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) ); else - fw->formFile()->showEditor( FALSE ); + fw->formFile()->showEditor( false ); tqApp->processEvents(); // give all views the chance to get the formwindow SourceEditor *se = editSource(); if ( se ) { @@ -3435,7 +3435,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) break; } } - mblockNewForms = FALSE; + mblockNewForms = false; } @@ -3459,7 +3459,7 @@ void MainWindow::formNameChanged( FormWindow *fw ) { for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { if ( e->object() == fw ) - e->refresh( TRUE ); + e->refresh( true ); if ( e->project() == fw->project() ) e->resetContext(); } @@ -3553,7 +3553,7 @@ SourceFile *MainWindow::sourceFile() bool MainWindow::openProjectSettings( Project *pro ) { - ProjectSettings dia( pro, this, 0, TRUE ); + ProjectSettings dia( pro, this, 0, true ); SenderObject *senderObject = new SenderObject( designerInterface() ); TQValueList<Tab>::ConstIterator it; for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { @@ -3571,7 +3571,7 @@ bool MainWindow::openProjectSettings( Project *pro ) } if ( singleProject ) - dia.tabWidget->setTabEnabled( dia.tabSettings, FALSE ); + dia.tabWidget->setTabEnabled( dia.tabSettings, false ); int res = dia.exec(); @@ -3580,7 +3580,7 @@ bool MainWindow::openProjectSettings( Project *pro ) for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { Tab t = *it; dia.tabWidget->removePage( t.w ); - t.w->reparent( 0, TQPoint(0,0), FALSE ); + t.w->reparent( 0, TQPoint(0,0), false ); } return res == TQDialog::Accepted; @@ -3631,7 +3631,7 @@ void MainWindow::setSingleProject( Project *pro ) Project *pro = eProject; pro->save(); TQWidgetList windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( TRUE ); + qWorkspace()->blockSignals( true ); TQWidgetListIt wit( windows ); while ( wit.current() ) { TQWidget *w = wit.current(); @@ -3648,18 +3648,18 @@ void MainWindow::setSingleProject( Project *pro ) } hierarchyView->clear(); windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( FALSE ); + qWorkspace()->blockSignals( false ); currentProject = 0; - updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); + updateUndoRedo( false, false, TQString(), TQString() ); } - singleProject = TRUE; + singleProject = true; projects.clear(); TQAction *a = new TQAction( i18n( pro->name() ), i18n( pro->name() ), 0, - actionGroupProjects, 0, TRUE ); + actionGroupProjects, 0, true ); eProject = pro; projects.insert( a, eProject ); - a->setOn( TRUE ); + a->setOn( true ); actionGroupProjects->removeFrom( projectMenu ); actionGroupProjects->removeFrom( projectToolBar ); currentProject = eProject; @@ -3677,16 +3677,16 @@ void MainWindow::showGUIStuff( bool b ) return; guiStuffVisible = b; if ( !b ) { - setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE ); + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), false ); toolBox->parentWidget()->hide(); for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { tb->hide(); - setAppropriate( tb, FALSE ); + setAppropriate( tb, false ); } - propertyEditor->setPropertyEditorEnabled( FALSE ); - setAppropriate( layoutToolBar, FALSE ); + propertyEditor->setPropertyEditorEnabled( false ); + setAppropriate( layoutToolBar, false ); layoutToolBar->hide(); - setAppropriate( toolsToolBar, FALSE ); + setAppropriate( toolsToolBar, false ); toolsToolBar->hide(); menubar->removeItem( toolsMenuId ); menubar->removeItem( toolsMenuId + 1 ); @@ -3696,11 +3696,11 @@ void MainWindow::showGUIStuff( bool b ) disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) ); disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) ); disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) ); - actionEditFormSettings->setEnabled( FALSE ); - actionEditSource->setEnabled( FALSE ); - actionEditConnections->setEnabled( FALSE ); - actionEditFunctions->setEnabled( FALSE ); - actionEditAccels->setEnabled( FALSE ); + actionEditFormSettings->setEnabled( false ); + actionEditSource->setEnabled( false ); + actionEditConnections->setEnabled( false ); + actionEditFunctions->setEnabled( false ); + actionEditAccels->setEnabled( false ); ( (TQDockWindow*)propertyEditor->parentWidget() )-> setCaption( i18n( "Signal Handlers" ) ); actionGroupNew->removeFrom( fileMenu ); @@ -3714,16 +3714,16 @@ void MainWindow::showGUIStuff( bool b ) actionFileSave->addTo( projectToolBar ); actionFileExit->addTo( fileMenu ); } else { - setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE ); + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), true ); toolBox->parentWidget()->show(); for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { - setAppropriate( tb, TRUE ); + setAppropriate( tb, true ); tb->hide(); } - propertyEditor->setPropertyEditorEnabled( TRUE ); - setAppropriate( layoutToolBar, TRUE ); + propertyEditor->setPropertyEditorEnabled( true ); + setAppropriate( layoutToolBar, true ); layoutToolBar->show(); - setAppropriate( toolsToolBar, TRUE ); + setAppropriate( toolsToolBar, true ); toolsToolBar->show(); menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex ); menubar->insertItem( i18n( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); @@ -3733,11 +3733,11 @@ void MainWindow::showGUIStuff( bool b ) connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) ); connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) ); connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) ); - actionEditFormSettings->setEnabled( TRUE ); - actionEditSource->setEnabled( TRUE ); - actionEditConnections->setEnabled( TRUE ); - actionEditFunctions->setEnabled( TRUE ); - actionEditAccels->setEnabled( TRUE ); + actionEditFormSettings->setEnabled( true ); + actionEditSource->setEnabled( true ); + actionEditConnections->setEnabled( true ); + actionEditFunctions->setEnabled( true ); + actionEditAccels->setEnabled( true ); ( (TQDockWindow*)propertyEditor->parentWidget() )-> setCaption( i18n( "Property Editor/Signal Handlers" ) ); actionFileSave->removeFrom( fileMenu ); |