diff options
Diffstat (limited to 'kdevdesigner/designer/mainwindow.cpp')
-rw-r--r-- | kdevdesigner/designer/mainwindow.cpp | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index 53706d40..87e15a74 100644 --- a/kdevdesigner/designer/mainwindow.cpp +++ b/kdevdesigner/designer/mainwindow.cpp @@ -219,9 +219,9 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons setupEditActions(); setupProjectActions(); setupSearchActions(); - tqlayoutToolBar = new TQToolBar( this, "Layout" ); - tqlayoutToolBar->setCloseMode( TQDockWindow::Undocked ); - addToolBar( tqlayoutToolBar, i18n( "Layout" ) ); + layoutToolBar = new TQToolBar( this, "Layout" ); + layoutToolBar->setCloseMode( TQDockWindow::Undocked ); + addToolBar( layoutToolBar, i18n( "Layout" ) ); interpreterPluginManager = 0; setupToolActions(); setupLayoutActions(); @@ -255,8 +255,8 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons connect( tqApp->clipboard(), TQT_SIGNAL( dataChanged() ), this, TQT_SLOT( clipboardChanged() ) ); clipboardChanged(); - tqlayoutChilds = FALSE; - tqlayoutSelected = FALSE; + layoutChilds = FALSE; + layoutSelected = FALSE; breakLayout = FALSE; backPix = TRUE; @@ -273,8 +273,8 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons delete w; w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE ); delete w; - setAppropriate( (TQDockWindow*)actionEditor->tqparentWidget(), FALSE ); - actionEditor->tqparentWidget()->hide(); + setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); + actionEditor->parentWidget()->hide(); assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) ); @@ -408,7 +408,7 @@ void MainWindow::setupHierarchyView() "<p>The Object Explorer provides an overview of the relationships " "between the widgets in a form. You can use the clipboard functions using " "a context menu for each item in the view. It is also useful for selecting widgets " - "in forms that have complex tqlayouts.</p>" + "in forms that have complex layouts.</p>" "<p>The columns can be resized by dragging the separator in the list's header.</p>" "<p>The second tab shows all the form's slots, class variables, includes, etc.</p>") ); dw->show(); @@ -742,7 +742,7 @@ void MainWindow::helpContents() showClassDocu = FALSE; break; } - tqfocusWidget = tqfocusWidget->tqparentWidget(); + tqfocusWidget = tqfocusWidget->parentWidget(); } TQString source = "designer-manual.html"; @@ -770,9 +770,9 @@ void MainWindow::helpContents() TQMetaObject* mo = propertyEditor->tqmetaObjectOfCurrentProperty(); TQString s; TQString cp = propertyEditor->currentProperty(); - if ( cp == "tqlayoutMargin" ) { + if ( cp == "layoutMargin" ) { source = propertyDocumentation[ "TQLayout/margin" ]; - } else if ( cp == "tqlayoutSpacing" ) { + } else if ( cp == "layoutSpacing" ) { source = propertyDocumentation[ "TQLayout/spacing" ]; } else if ( cp == "toolTip" ) { source = "tqtooltip.html#details"; @@ -964,7 +964,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) while ( w ) { if ( ::tqqt_cast<PropertyList*>(w) ) break; - w = w->tqparentWidget( TRUE ); + w = w->parentWidget( TRUE ); } if ( w ) { propertyEditor->propertyList()->showCurrentWhatsThis(); @@ -1001,8 +1001,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ::tqqt_cast<TQComboBox*>(w) || ::tqqt_cast<PopupMenuEditor*>(w) || ::tqqt_cast<QDesignerToolBarSeparator*>(w) ) - w = w->tqparentWidget(); - TQWidget *pw = w->tqparentWidget(); + w = w->parentWidget(); + TQWidget *pw = w->parentWidget(); while ( pw ) { if ( ::tqqt_cast<FormWindow*>(pw) ) { ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) ); @@ -1012,7 +1012,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) !::tqqt_cast<TQComboBox*>(o) && !::tqqt_cast<QDesignerToolBarSeparator*>(o) ); } - pw = pw->tqparentWidget(); + pw = pw->parentWidget(); } } if ( o && ( ::tqqt_cast<QDesignerToolBar*>(o) || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) @@ -1151,7 +1151,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ::tqqt_cast<SizeHandle*>(o) || ::tqqt_cast<OrderIndicator*>(o) ) break; - if ( WidgetFactory::tqlayoutType( (TQWidget*)o->tqparent() ) != WidgetFactory::NoLayout ) { + if ( WidgetFactory::layoutType( (TQWidget*)o->tqparent() ) != WidgetFactory::NoLayout ) { ( (FormWindow*)w )->updateSelection( (TQWidget*)o ); if ( e->type() != TQEvent::Resize ) ( (FormWindow*)w )->updateChildSelections( (TQWidget*)o ); @@ -1210,7 +1210,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) while ( w ) { if ( ::tqqt_cast<SourceEditor*>(w) ) break; - w = w->tqparentWidget( TRUE ); + w = w->parentWidget( TRUE ); } if ( ::tqqt_cast<SourceEditor*>(w) ) ( (SourceEditor*)w )->checkTimeStamp(); @@ -1362,7 +1362,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) if ( actionEditor->form() == w ) { actionEditor->setFormWindow( 0 ); - actionEditor->tqparentWidget()->hide(); + actionEditor->parentWidget()->hide(); } return TRUE; @@ -1384,16 +1384,16 @@ void MainWindow::activeWindowChanged( TQWidget *w ) formWindow()->clearSelection(); } workspace()->activeFormChanged( fw ); - setAppropriate( (TQDockWindow*)actionEditor->tqparentWidget(), + setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), ::tqqt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) ); - if ( appropriate( (TQDockWindow*)actionEditor->tqparentWidget() ) ) { + if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) { if ( actionEditor->wantToBeShown() ) - actionEditor->tqparentWidget()->show(); + actionEditor->parentWidget()->show(); } else { TQWidget *mc = 0; if ( ofw && (mc = ofw->mainContainer()) && ::tqqt_cast<TQMainWindow*>(mc) ) - actionEditor->setWantToBeShown( !actionEditor->tqparentWidget()->isHidden() ); - actionEditor->tqparentWidget()->hide(); + actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() ); + actionEditor->parentWidget()->hide(); } actionEditor->setFormWindow( lastActiveFormWindow ); @@ -2003,8 +2003,8 @@ void MainWindow::clipboardChanged() void MainWindow::selectionChanged() { - tqlayoutChilds = FALSE; - tqlayoutSelected = FALSE; + layoutChilds = FALSE; + layoutSelected = FALSE; breakLayout = FALSE; if ( !formWindow() ) { actionEditCut->setEnabled( FALSE ); @@ -2041,7 +2041,7 @@ void MainWindow::selectionChanged() int unlaidout = 0; int laidout = 0; for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( !w->tqparentWidget() || WidgetFactory::tqlayoutType( w->tqparentWidget() ) == WidgetFactory::NoLayout ) + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) unlaidout++; else laidout++; @@ -2053,27 +2053,27 @@ void MainWindow::selectionChanged() actionEditGridLayout->setEnabled( unlaidout > 1 ); actionEditBreakLayout->setEnabled( laidout > 0 ); actionEditAdjustSize->setEnabled( laidout > 0 ); - tqlayoutSelected = unlaidout > 1; + layoutSelected = unlaidout > 1; breakLayout = laidout > 0; } else if ( selectedWidgets == 1 ) { TQWidget *w = widgets.first(); bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) || w == formWindow()->mainContainer(); - actionEditAdjustSize->setEnabled( !w->tqparentWidget() || - WidgetFactory::tqlayoutType( w->tqparentWidget() ) == WidgetFactory::NoLayout ); + actionEditAdjustSize->setEnabled( !w->parentWidget() || + WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ); if ( !isContainer ) { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); actionEditGridLayout->setEnabled( FALSE ); - if ( w->tqparentWidget() && WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout ) { + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); breakLayout = TRUE; } else { actionEditBreakLayout->setEnabled( FALSE ); } } else { - if ( WidgetFactory::tqlayoutType( w ) == WidgetFactory::NoLayout ) { + if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { if ( !formWindow()->hasInsertedChildren( w ) ) { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); @@ -2084,9 +2084,9 @@ void MainWindow::selectionChanged() actionEditVLayout->setEnabled( TRUE ); actionEditGridLayout->setEnabled( TRUE ); actionEditBreakLayout->setEnabled( FALSE ); - tqlayoutChilds = TRUE; + layoutChilds = TRUE; } - if ( w->tqparentWidget() && WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout ) { + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); breakLayout = TRUE; } @@ -2101,7 +2101,7 @@ void MainWindow::selectionChanged() } else if ( selectedWidgets == 0 ) { actionEditAdjustSize->setEnabled( TRUE ); TQWidget *w = formWindow()->mainContainer(); - if ( WidgetFactory::tqlayoutType( w ) == WidgetFactory::NoLayout ) { + if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { if ( !formWindow()->hasInsertedChildren( w ) ) { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); @@ -2112,7 +2112,7 @@ void MainWindow::selectionChanged() actionEditVLayout->setEnabled( TRUE ); actionEditGridLayout->setEnabled( TRUE ); actionEditBreakLayout->setEnabled( FALSE ); - tqlayoutChilds = TRUE; + layoutChilds = TRUE; } } else { actionEditHLayout->setEnabled( FALSE ); @@ -2177,18 +2177,18 @@ void MainWindow::writeConfig() config.writeEntry( keybase + "Geometries/MainwindowWidth", width() ); config.writeEntry( keybase + "Geometries/MainwindowHeight", height() ); config.writeEntry( keybase + "Geometries/MainwindowMaximized", isMaximized() ); - config.writeEntry( keybase + "Geometries/PropertyEditorX", propertyEditor->tqparentWidget()->x() ); - config.writeEntry( keybase + "Geometries/PropertyEditorY", propertyEditor->tqparentWidget()->y() ); - config.writeEntry( keybase + "Geometries/PropertyEditorWidth", propertyEditor->tqparentWidget()->width() ); - config.writeEntry( keybase + "Geometries/PropertyEditorHeight", propertyEditor->tqparentWidget()->height() ); - config.writeEntry( keybase + "Geometries/HierarchyViewX", hierarchyView->tqparentWidget()->x() ); - config.writeEntry( keybase + "Geometries/HierarchyViewY", hierarchyView->tqparentWidget()->y() ); - config.writeEntry( keybase + "Geometries/HierarchyViewWidth", hierarchyView->tqparentWidget()->width() ); - config.writeEntry( keybase + "Geometries/HierarchyViewHeight", hierarchyView->tqparentWidget()->height() ); - config.writeEntry( keybase + "Geometries/WorkspaceX", wspace->tqparentWidget()->x() ); - config.writeEntry( keybase + "Geometries/WorkspaceY", wspace->tqparentWidget()->y() ); - config.writeEntry( keybase + "Geometries/WorkspaceWidth", wspace->tqparentWidget()->width() ); - config.writeEntry( keybase + "Geometries/WorkspaceHeight", wspace->tqparentWidget()->height() ); + config.writeEntry( keybase + "Geometries/PropertyEditorX", propertyEditor->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/PropertyEditorY", propertyEditor->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/PropertyEditorWidth", propertyEditor->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/PropertyEditorHeight", propertyEditor->parentWidget()->height() ); + config.writeEntry( keybase + "Geometries/HierarchyViewX", hierarchyView->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/HierarchyViewY", hierarchyView->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/HierarchyViewWidth", hierarchyView->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/HierarchyViewHeight", hierarchyView->parentWidget()->height() ); + config.writeEntry( keybase + "Geometries/WorkspaceX", wspace->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/WorkspaceY", wspace->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/WorkspaceWidth", wspace->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/WorkspaceHeight", wspace->parentWidget()->height() ); config.writeEntry( keybase + "View/TextLabels", usesTextLabel() ); config.writeEntry( keybase + "View/BigIcons", usesBigPixmaps() ); @@ -3204,7 +3204,7 @@ void MainWindow::setModified( bool b, TQWidget *window ) } return; } - w = w->tqparentWidget( TRUE ); + w = w->parentWidget( TRUE ); } } @@ -3300,9 +3300,9 @@ void MainWindow::enableAll( bool enable ) menuBar()->setEnabled( enable ); TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( TQT_BASE_OBJECT(o) == wspace->tqparentWidget() || - TQT_BASE_OBJECT(o) == oWindow->tqparentWidget() || - TQT_BASE_OBJECT(o) == hierarchyView->tqparentWidget() ) + if ( TQT_BASE_OBJECT(o) == wspace->parentWidget() || + TQT_BASE_OBJECT(o) == oWindow->parentWidget() || + TQT_BASE_OBJECT(o) == hierarchyView->parentWidget() ) continue; ( (TQWidget*)o )->setEnabled( enable ); } @@ -3520,14 +3520,14 @@ void MainWindow::breakPointsChanged() int MainWindow::currentLayoutDefaultSpacing() const { if ( ( (MainWindow*)this )->formWindow() ) - return ( (MainWindow*)this )->formWindow()->tqlayoutDefaultSpacing(); + return ( (MainWindow*)this )->formWindow()->layoutDefaultSpacing(); return BOXLAYOUT_DEFAULT_SPACING; } int MainWindow::currentLayoutDefaultMargin() const { if ( ( (MainWindow*)this )->formWindow() ) - return ( (MainWindow*)this )->formWindow()->tqlayoutDefaultMargin(); + return ( (MainWindow*)this )->formWindow()->layoutDefaultMargin(); return BOXLAYOUT_DEFAULT_MARGIN; } @@ -3682,15 +3682,15 @@ void MainWindow::showGUIStuff( bool b ) return; guiStuffVisible = b; if ( !b ) { - setAppropriate( (TQDockWindow*)toolBox->tqparentWidget(), FALSE ); - toolBox->tqparentWidget()->hide(); + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE ); + toolBox->parentWidget()->hide(); for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { tb->hide(); setAppropriate( tb, FALSE ); } propertyEditor->setPropertyEditorEnabled( FALSE ); - setAppropriate( tqlayoutToolBar, FALSE ); - tqlayoutToolBar->hide(); + setAppropriate( layoutToolBar, FALSE ); + layoutToolBar->hide(); setAppropriate( toolsToolBar, FALSE ); toolsToolBar->hide(); menubar->removeItem( toolsMenuId ); @@ -3706,7 +3706,7 @@ void MainWindow::showGUIStuff( bool b ) actionEditConnections->setEnabled( FALSE ); actionEditFunctions->setEnabled( FALSE ); actionEditAccels->setEnabled( FALSE ); - ( (TQDockWindow*)propertyEditor->tqparentWidget() )-> + ( (TQDockWindow*)propertyEditor->parentWidget() )-> setCaption( i18n( "Signal Handlers" ) ); actionGroupNew->removeFrom( fileMenu ); actionGroupNew->removeFrom( projectToolBar ); @@ -3719,19 +3719,19 @@ void MainWindow::showGUIStuff( bool b ) actionFileSave->addTo( projectToolBar ); actionFileExit->addTo( fileMenu ); } else { - setAppropriate( (TQDockWindow*)toolBox->tqparentWidget(), TRUE ); - toolBox->tqparentWidget()->show(); + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE ); + toolBox->parentWidget()->show(); for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { setAppropriate( tb, TRUE ); tb->hide(); } propertyEditor->setPropertyEditorEnabled( TRUE ); - setAppropriate( tqlayoutToolBar, TRUE ); - tqlayoutToolBar->show(); + setAppropriate( layoutToolBar, TRUE ); + layoutToolBar->show(); setAppropriate( toolsToolBar, TRUE ); toolsToolBar->show(); menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex ); - menubar->insertItem( i18n( "&Layout" ), tqlayoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); + 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) ) ); @@ -3743,7 +3743,7 @@ void MainWindow::showGUIStuff( bool b ) actionEditConnections->setEnabled( TRUE ); actionEditFunctions->setEnabled( TRUE ); actionEditAccels->setEnabled( TRUE ); - ( (TQDockWindow*)propertyEditor->tqparentWidget() )-> + ( (TQDockWindow*)propertyEditor->parentWidget() )-> setCaption( i18n( "Property Editor/Signal Handlers" ) ); actionFileSave->removeFrom( fileMenu ); actionFileSave->removeFrom( projectToolBar ); |