diff options
Diffstat (limited to 'kdevdesigner/designer/mainwindow.cpp')
-rw-r--r-- | kdevdesigner/designer/mainwindow.cpp | 690 |
1 files changed, 345 insertions, 345 deletions
diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index af4c4b78..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,24 +161,24 @@ 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, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( doFunctionsChanged() ) ); + connect( updateFunctionsTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( doFunctionsChanged() ) ); autoSaveTimer = new TQTimer( this ); - connect( autoSaveTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( fileSaveAll() ) ); + connect( autoSaveTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( fileSaveAll() ) ); set_splash_status( "Loading Plugins..." ); setupPluginManagers(); @@ -234,11 +234,11 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons setupRMBMenus(); - connect( this, TQT_SIGNAL( projectChanged() ), this, TQT_SLOT( emitProjectSignals() ) ); - connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), this, TQT_SLOT( emitProjectSignals() ) ); + 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 ); @@ -247,36 +247,36 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons as -= TQSize( 30, 30 ); resize( TQSize( 1200, 1000 ).boundedTo( as ) ); - connect( tqApp->clipboard(), TQT_SIGNAL( dataChanged() ), - this, TQT_SLOT( clipboardChanged() ) ); + 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(), TQT_TQOBJECT(this) ); + assistant = new TQAssistantClient( assistantPath(), this ); - statusBar()->setSizeGripEnabled( TRUE ); + statusBar()->setSizeGripEnabled( true ); set_splash_status( "Initialization Done." ); /* if ( shStartDialog ) - TQTimer::singleShot( 0, this, TQT_SLOT( showStartDialog() ));*/ + TQTimer::singleShot( 0, this, TQ_SLOT( showStartDialog() ));*/ if ( autoSaveEnabled ) autoSaveTimer->start( autoSaveInterval * 1000 ); @@ -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 ); - connect( qworkspace, TQT_SIGNAL( windowActivated( TQWidget * ) ), - this, TQT_SLOT( activeWindowChanged( TQWidget * ) ) ); + 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,13 +412,13 @@ 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 ); TQToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) ); TQAccel *a = new TQAccel( this ); - a->connectItem( a->insertItem( ALT + Key_B ), edit, TQT_SLOT( setFocus() ) ); + a->connectItem( a->insertItem( ALT + Key_B ), edit, TQ_SLOT( setFocus() ) ); wspace = new Workspace( vbox, this ); wspace->setBufferEdit( edit ); wspace->setCurrentProject( currentProject ); @@ -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 ) @@ -577,7 +577,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) TQStringList databases; TQPtrDictIterator<TQWidget> wit( *fw->widgets() ); while ( wit.current() ) { - TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(wit.current()), "database" ).toStringList(); + TQStringList lst = MetaDataBase::fakeProperty( wit.current(), "database" ).toStringList(); if ( !lst.isEmpty() ) databases << lst [ 0 ]; ++wit; @@ -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; } @@ -724,17 +724,17 @@ void MainWindow::previewForm( const TQString & style ) if ( !w ) return; - w->insertChild( TQT_TQOBJECT(st) ); + w->insertChild( st ); w->show(); } 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( "" ); @@ -881,14 +881,14 @@ void MainWindow::showProperties( TQObject *o ) if ( !o->isWidgetType() ) { propertyEditor->setWidget( o, lastActiveFormWindow ); if ( lastActiveFormWindow ) - hierarchyView->setFormWindow( lastActiveFormWindow, TQT_TQOBJECT(lastActiveFormWindow->mainContainer()) ); + hierarchyView->setFormWindow( lastActiveFormWindow, lastActiveFormWindow->mainContainer() ); else hierarchyView->setFormWindow( 0, 0 ); return; } TQWidget *w = (TQWidget*)o; setupHierarchyView(); - FormWindow *fw = (FormWindow*)isAFormWindowChild( TQT_TQOBJECT(w) ); + FormWindow *fw = (FormWindow*)isAFormWindowChild( w ); if ( fw ) { if ( fw->numSelectedWidgets() > 1 ) { TQWidgetList wl = fw->selectedWidgets(); @@ -898,9 +898,9 @@ void MainWindow::showProperties( TQObject *o ) } propertyEditor->setWidget( new PropertyObject( wl ), fw ); } else { - propertyEditor->setWidget( TQT_TQOBJECT(w), fw ); + propertyEditor->setWidget( w, fw ); } - hierarchyView->setFormWindow( fw, TQT_TQOBJECT(w) ); + hierarchyView->setFormWindow( fw, w ); } else { propertyEditor->setWidget( 0, 0 ); hierarchyView->setFormWindow( 0, 0 ); @@ -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; @@ -1000,7 +1000,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) TQWidget *pw = w->parentWidget(); while ( pw ) { if ( ::tqt_cast<FormWindow*>(pw) ) { - ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) ); + ( (FormWindow*)pw )->emitShowProperties( w ); if ( !::tqt_cast<QDesignerToolBar*>(o) ) return ( !::tqt_cast<TQToolButton*>(o) && !::tqt_cast<MenuBarEditor*>(o) && @@ -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 ) ); @@ -1036,9 +1036,9 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) } lastPressWidget = (TQWidget*)o; if ( passiveInteractor ) - TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); + 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; @@ -1055,8 +1055,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ( (FormWindow*)w )->handleMouseRelease( (TQMouseEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( passiveInteractor ) { - TQTimer::singleShot( 0, this, TQT_SLOT( selectionChanged() ) ); - TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( selectionChanged() ) ); + TQTimer::singleShot( 0, formWindow(), TQ_SLOT( visibilityChanged() ) ); } return !passiveInteractor; case TQEvent::MouseMove: @@ -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,15 +1122,15 @@ 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 ) ) || ::tqt_cast<SizeHandle*>(o) || ::tqt_cast<OrderIndicator*>(o) ) break; - if ( ( (FormWindow*)w )->isWidgetSelected( TQT_TQOBJECT(o) ) ) - ( (FormWindow*)w )->selectWidget( TQT_TQOBJECT(o), FALSE ); + if ( ( (FormWindow*)w )->isWidgetSelected( o ) ) + ( (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 ) ) || @@ -1156,7 +1156,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) { if ( lastActiveFormWindow && lastActiveFormWindow->project() ) { TQStringList lst = - MetaDataBase::fakeProperty( TQT_TQOBJECT(lastActiveFormWindow), "database" ).toStringList(); + MetaDataBase::fakeProperty( lastActiveFormWindow, "database" ).toStringList(); lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] ); } } @@ -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 ); @@ -1285,16 +1285,16 @@ void MainWindow::insertFormWindow( FormWindow *fw ) "<p>You can have several forms open, and all open forms are listed " "in the <b>Form List</b>.") ); - connect( fw, TQT_SIGNAL( showProperties( TQObject * ) ), - this, TQT_SLOT( showProperties( TQObject * ) ) ); - connect( fw, TQT_SIGNAL( updateProperties( TQObject * ) ), - this, TQT_SLOT( updateProperties( TQObject * ) ) ); - connect( this, TQT_SIGNAL( currentToolChanged() ), - fw, TQT_SLOT( currentToolChanged() ) ); - connect( fw, TQT_SIGNAL( selectionChanged() ), - this, TQT_SLOT( selectionChanged() ) ); - connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), - this, TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); + connect( fw, TQ_SIGNAL( showProperties( TQObject * ) ), + this, TQ_SLOT( showProperties( TQObject * ) ) ); + connect( fw, TQ_SIGNAL( updateProperties( TQObject * ) ), + this, TQ_SLOT( updateProperties( TQObject * ) ) ); + connect( this, TQ_SIGNAL( currentToolChanged() ), + fw, TQ_SLOT( currentToolChanged() ) ); + connect( fw, TQ_SIGNAL( selectionChanged() ), + this, TQ_SLOT( selectionChanged() ) ); + connect( fw, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), + this, TQ_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); if ( !mblockNewForms ) { } else { @@ -1305,9 +1305,9 @@ void MainWindow::insertFormWindow( FormWindow *fw ) if ( fw->caption().isEmpty() && tqstrlen( fw->name() ) ) fw->setCaption( fw->name() ); fw->mainContainer()->setCaption( fw->caption() ); - WidgetFactory::saveDefaultProperties( TQT_TQOBJECT(fw->mainContainer()), + WidgetFactory::saveDefaultProperties( fw->mainContainer(), WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(fw->mainContainer()) ) ) ); + idFromClassName( WidgetFactory::classNameOf( fw->mainContainer() ) ) ); activeWindowChanged( fw ); emit formWindowsChanged(); for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { @@ -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; @@ -1594,7 +1594,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w ) { WidgetInterface *iface = 0; - widgetManager()->queryInterface( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), &iface ); + widgetManager()->queryInterface( WidgetFactory::classNameOf( w ), &iface ); if ( !iface ) return 0; TQWidgetContainerInterfacePrivate *iface2 = 0; @@ -1646,19 +1646,19 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, #ifdef TQT_CONTAINER_CUSTOM_WIDGETS } else if ( WidgetDatabase:: isCustomPluginWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) { TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); - if ( iface && iface->supportsPages( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) { + if ( iface && iface->supportsPages( WidgetFactory::classNameOf( w ) ) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); - if ( iface->count( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) > 1 ) { + if ( iface->count( WidgetFactory::classNameOf( w ), w ) > 1 ) { ids << ( id = rmbWidgets->insertItem( i18n( "Delete Page" ), -1, 0 ) ); commands.insert( "remove", id ); } ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); commands.insert( "add", id ); - if ( iface->currentIndex( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) != -1 ) { + if ( iface->currentIndex( WidgetFactory::classNameOf( w ), w ) != -1 ) { ids << ( id = rmbWidgets->insertItem( i18n("Rename Current Page..."), -1, 0 ) ); commands.insert( "rename", id ); } @@ -1669,7 +1669,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, } if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); ids << ( id = rmbWidgets->insertItem( i18n("Edit..."), -1, 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; @@ -1733,60 +1733,60 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid if ( ok ) { if ( oldDoWrap != doWrap ) { TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "wordwrap", TQVariant( oldDoWrap ), TQVariant( doWrap ), TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); + MetaDataBase::setPropertyChanged( w, "wordwrap", true ); } TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "text", w->property( "text" ), text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(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 ) { TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "title", w->property( "title" ), title, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(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 ) { TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "pageTitle", w->property( "pageTitle" ), text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pageTitle", TRUE ); + MetaDataBase::setPropertyChanged( w, "pageTitle", true ); } } else if ( id == props[ "pixmap" ] ) { TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap(); TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix ); if ( !pix.isNull() ) { TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "pixmap", w->property( "pixmap" ), pix, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pixmap", TRUE ); + MetaDataBase::setPropertyChanged( w, "pixmap", true ); } } } @@ -1853,27 +1853,27 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command int currentPage = w->property( "currentPage" ).toInt(); TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) ); SetPropertyCommand *cmd = - new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "currentPage", currentPage, currentPage + 1, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(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() ) ); SetPropertyCommand *cmd = - new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "currentPage", currentPage, currentPage -1, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( w, "currentPage", true ); } #ifdef TQT_CONTAINER_CUSTOM_WIDGETS } else if ( WidgetDatabase:: isCustomPluginWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) { if ( id == commands[ "add" ] ) { AddContainerPageCommand *cmd = new AddContainerPageCommand( i18n( "Add Page to %1" ).arg( w->name() ), @@ -1883,7 +1883,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command } else if ( id == commands[ "remove" ] ) { TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); if ( iface ) { - TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + TQString wClassName = WidgetFactory::classNameOf( w ); int index = iface->currentIndex( wClassName, w ); DeleteContainerPageCommand *cmd = new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ). @@ -1898,8 +1898,8 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command } else if ( id == commands[ "rename" ] ) { TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); if ( iface ) { - bool ok = FALSE; - TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + 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" ), TQLineEdit::Normal, @@ -1924,10 +1924,10 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command } if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) { if ( id == commands[ "edit" ] ) WidgetFactory::editWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), this, w, formWindow() ); + idFromClassName( WidgetFactory::classNameOf( w ) ), this, w, formWindow() ); } } @@ -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; @@ -2052,75 +2052,75 @@ void MainWindow::selectionChanged() breakLayout = laidout > 0; } else if ( selectedWidgets == 1 ) { TQWidget *w = widgets.first(); - bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) || + bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) || w == formWindow()->mainContainer(); actionEditAdjustSize->setEnabled( !w->parentWidget() || 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( TQT_TQOBJECT(w) ) ); - breakLayout = TRUE; + actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); + 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( TQT_TQOBJECT(w) ) ); - breakLayout = TRUE; + actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); + breakLayout = true; } } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); - breakLayout = TRUE; + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); + actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); + 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" ); @@ -2557,15 +2557,15 @@ ActionEditor *MainWindow::actioneditor() const bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) { - if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) { - TQString defSignal = WidgetFactory::defaultSignal( TQT_TQOBJECT(w) ); + if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( w ) ) { + TQString defSignal = WidgetFactory::defaultSignal( w ); if ( defSignal.isEmpty() ) { editSource(); } else { TQString s = TQString( w->name() ) + "_" + defSignal; LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() ); if ( iface ) { - TQStrList sigs = iface->signalNames( TQT_TQOBJECT(w) ); + TQStrList sigs = iface->signalNames( w ); TQString fullSignal; for ( int i = 0; i < (int)sigs.count(); ++i ) { TQString sig = sigs.at( i ); @@ -2581,46 +2581,46 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) fullSignal.remove( (int)fullSignal.length() - 1, 1 ); fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() ); s += "(" + fullSignal + ")"; - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(f), s.latin1() ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(f), s.latin1(), "", "public", "slot", + if ( !MetaDataBase::hasFunction( f, s.latin1() ) ) + MetaDataBase::addFunction( f, s.latin1(), "", "public", "slot", f->project()->language(), "void" ); s = s.left( s.find( '(' ) ).latin1(); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(f), TQT_TQOBJECT(w), defSignal.latin1(), TQT_TQOBJECT(f->mainContainer()), s.latin1() ) ) { + if ( !MetaDataBase::hasConnection( f, w, defSignal.latin1(), f->mainContainer(), s.latin1() ) ) { MetaDataBase::Connection conn; - conn.sender = TQT_TQOBJECT(w); - conn.receiver = TQT_TQOBJECT(f->mainContainer()); + conn.sender = w; + conn.receiver = f->mainContainer(); conn.signal = signl; conn.slot = s; AddConnectionCommand *cmd = 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( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) { statusMessage( i18n( "Edit %1..." ).arg( w->className() ) ); - WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), + 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; @@ -2636,44 +2636,44 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) if ( ok ) { if ( oldDoWrap != doWrap ) { TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "wordwrap", TQVariant( oldDoWrap ), TQVariant( doWrap ), TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); + MetaDataBase::setPropertyChanged( w, "wordwrap", true ); } TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "text", w->property( "text" ), text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(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 ) { TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "title", w->property( "title" ), text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); + MetaDataBase::setPropertyChanged( w, "title", true ); } - return TRUE; + return true; } - if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) + 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 ); } } @@ -2920,7 +2920,7 @@ void MainWindow::setupActionManager() continue; iface->connectTo( desInterface ); - TQAction *a = iface->create( *ait, TQT_TQOBJECT(this) ); + TQAction *a = iface->create( *ait, this ); if ( !a ) continue; @@ -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(); @@ -2974,7 +2974,7 @@ void MainWindow::editFunction( const TQString &func, bool rereadSource ) } } - createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang, func, rereadSource ); + createSourceEditor( formWindow(), formWindow()->project(), lang, func, rereadSource ); } void MainWindow::setupRecentlyFilesMenu() @@ -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(); } @@ -3233,7 +3233,7 @@ void MainWindow::updateFunctionList() return; TQValueList<LanguageInterface::Connection> conns; iface->connections( se->text(), &conns ); - MetaDataBase::setupConnections( TQT_TQOBJECT(se->formWindow()), conns ); + MetaDataBase::setupConnections( se->formWindow(), conns ); propertyEditor->eventList()->setup(); } } @@ -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; } @@ -3444,10 +3444,10 @@ TQObject *MainWindow::findRealObject( TQObject *o ) TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { if ( ::tqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) ) - return TQT_TQOBJECT(w); + return w; else if ( ::tqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() && TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) ) - return TQT_TQOBJECT(w); + return w; else if ( ::tqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() && ( (SourceEditor*)w )->sourceFile() == o ) return o; @@ -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 ) { @@ -3562,16 +3562,16 @@ bool MainWindow::openProjectSettings( Project *pro ) continue; dia.tabWidget->addTab( t.w, t.title ); if ( t.receiver ) { - connect( dia.buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); - connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); - connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + connect( dia.buttonOk, TQ_SIGNAL( clicked() ), senderObject, TQ_SLOT( emitAcceptSignal() ) ); + connect( senderObject, TQ_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); + connect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); senderObject->emitInitSignal(); - disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + disconnect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); } } 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,30 +3677,30 @@ 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 ); menubar->removeItem( toolsMenuId + 2 ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); - actionEditFormSettings->setEnabled( FALSE ); - actionEditSource->setEnabled( FALSE ); - actionEditConnections->setEnabled( FALSE ); - actionEditFunctions->setEnabled( FALSE ); - actionEditAccels->setEnabled( FALSE ); + disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) ); + disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) ); + 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 ); ( (TQDockWindow*)propertyEditor->parentWidget() )-> setCaption( i18n( "Signal Handlers" ) ); actionGroupNew->removeFrom( fileMenu ); @@ -3714,30 +3714,30 @@ 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 ); menubar->insertItem( i18n( "&Preview" ), previewMenu, toolsMenuId + 2, toolsMenuIndex + 2 ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); - actionEditFormSettings->setEnabled( TRUE ); - actionEditSource->setEnabled( TRUE ); - actionEditConnections->setEnabled( TRUE ); - actionEditFunctions->setEnabled( TRUE ); - actionEditAccels->setEnabled( TRUE ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) ); + 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 ); ( (TQDockWindow*)propertyEditor->parentWidget() )-> setCaption( i18n( "Property Editor/Signal Handlers" ) ); actionFileSave->removeFrom( fileMenu ); |