diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-29 23:01:28 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-29 23:01:28 +0900 |
commit | 61cd5b18f00b0d36a7953596c5295e358324ebb7 (patch) | |
tree | 9e5fe82b53b2e1957358366b7c0149dab04206fb /kdevdesigner/designer/command.cpp | |
parent | 30ac86e18cc775007edbbf3cdb816082c172f38c (diff) | |
download | tdevelop-61cd5b18f00b0d36a7953596c5295e358324ebb7.tar.gz tdevelop-61cd5b18f00b0d36a7953596c5295e358324ebb7.zip |
Replaced various '#define' with actual strings - part 6
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kdevdesigner/designer/command.cpp')
-rw-r--r-- | kdevdesigner/designer/command.cpp | 182 |
1 files changed, 91 insertions, 91 deletions
diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp index a1c445ad..b6a305c1 100644 --- a/kdevdesigner/designer/command.cpp +++ b/kdevdesigner/designer/command.cpp @@ -243,7 +243,7 @@ void ResizeCommand::execute() { widget->setGeometry( newRect ); formWindow()->updateSelection( widget ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); + formWindow()->emitUpdateProperties( widget ); if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) formWindow()->updateChildSelections( widget ); } @@ -252,7 +252,7 @@ void ResizeCommand::unexecute() { widget->setGeometry( oldRect ); formWindow()->updateSelection( widget ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); + formWindow()->emitUpdateProperties( widget ); if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) formWindow()->updateChildSelections( widget ); } @@ -279,15 +279,15 @@ void InsertCommand::execute() widget->show(); formWindow()->widgets()->insert( widget, widget ); formWindow()->clearSelection( FALSE ); - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + formWindow()->selectWidget( widget ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget ); } void InsertCommand::unexecute() { widget->hide(); - formWindow()->selectWidget( TQT_TQOBJECT(widget), FALSE ); - formWindow()->widgets()->remove( TQT_TQOBJECT(widget) ); + formWindow()->selectWidget( widget, FALSE ); + formWindow()->widgets()->remove( widget ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget ); } @@ -326,7 +326,7 @@ void MoveCommand::execute() w->reparent( newParent, pos, TRUE ); formWindow()->raiseSelection( w ); formWindow()->raiseChildSelections( w ); - formWindow()->widgetChanged( TQT_TQOBJECT(w) ); + formWindow()->widgetChanged( w ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); } @@ -334,7 +334,7 @@ void MoveCommand::execute() } formWindow()->updateSelection( w ); formWindow()->updateChildSelections( w ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); + formWindow()->emitUpdateProperties( w ); } } @@ -347,7 +347,7 @@ void MoveCommand::unexecute() w->reparent( oldParent, pos, TRUE ); formWindow()->raiseSelection( w ); formWindow()->raiseChildSelections( w ); - formWindow()->widgetChanged( TQT_TQOBJECT(w) ); + formWindow()->widgetChanged( w ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); } @@ -355,7 +355,7 @@ void MoveCommand::unexecute() } formWindow()->updateSelection( w ); formWindow()->updateChildSelections( w ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); + formWindow()->emitUpdateProperties( w ); } } @@ -392,13 +392,13 @@ void DeleteCommand::execute() TQString s = w->name(); s.prepend( "qt_dead_widget_" ); w->setName( s ); - formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); + formWindow()->selectWidget( w, FALSE ); formWindow()->widgets()->remove( w ); - TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) ); + TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w ); connections.insert( w, conns ); TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); for ( ; it != conns.end(); ++it ) { - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), (*it).sender, + MetaDataBase::removeConnection( formWindow(), (*it).sender, (*it).signal, (*it).receiver, (*it).slot ); } } @@ -418,11 +418,11 @@ void DeleteCommand::unexecute() s.remove( 0, TQString( "qt_dead_widget_" ).length() ); w->setName( s ); formWindow()->widgets()->insert( w, w ); - formWindow()->selectWidget( TQT_TQOBJECT(w) ); + formWindow()->selectWidget( w ); TQValueList<MetaDataBase::Connection> conns = *connections.find( w ); TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); for ( ; it != conns.end(); ++it ) { - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender, + MetaDataBase::addConnection( formWindow(), (*it).sender, (*it).signal, (*it).receiver, (*it).slot ); } } @@ -457,8 +457,8 @@ void SetPropertyCommand::execute() if ( isResetCommand ) { MetaDataBase::setPropertyChanged( widget, propName, FALSE ); if ( WidgetFactory::resetProperty( widget, propName ) ) { - if ( !formWindow()->isWidgetSelected( widget ) && TQT_TQOBJECT(formWindow()) != TQT_TQOBJECT(widget) ) - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + if ( !formWindow()->isWidgetSelected( widget ) && formWindow() != widget ) + formWindow()->selectWidget( widget ); if ( editor->widget() != widget ) editor->setWidget( widget, formWindow() ); editor->propertyList()->setCurrentProperty( propName ); @@ -557,7 +557,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ return; if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select ) - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + formWindow()->selectWidget( widget ); if ( editor->widget() != widget && select ) editor->setWidget( widget, formWindow() ); if ( select ) @@ -587,14 +587,14 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ TQVariant val = v; if ( val.toString() == "default" ) val = -1; - MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); + MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), val.toInt() ); } else if ( propName == "layoutMargin" ) { TQVariant val = v; if ( val.toString() == "default" ) val = -1; - MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); + MetaDataBase::setMargin( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), val.toInt() ); } else if ( propName == "resizeMode" ) { - MetaDataBase::setResizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), currentItemText ); + MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), currentItemText ); } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) { MetaDataBase::setFakeProperty( editor->widget(), propName, v ); } else if ( ::tqt_cast<CustomWidget*>(editor->widget()) ) { @@ -634,9 +634,9 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ oldSerNum = v.toPixmap().serialNumber(); widget->setProperty( propName, v ); if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() ) - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formWindow()), + MetaDataBase::setPixmapKey( formWindow(), widget->property( propName ).toPixmap().serialNumber(), - MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) ); + MetaDataBase::pixmapKey( formWindow(), oldSerNum ) ); if ( propName == "cursor" ) { MetaDataBase::setCursor( (TQWidget*)((TQObject *)widget), v.toCursor() ); } @@ -666,7 +666,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) ); } editor->emitWidgetChanged(); - formWindow()->killAccels( TQT_TQOBJECT(widget) ); + formWindow()->killAccels( widget ); } // ------------------------------------------------------------ @@ -791,8 +791,8 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, : Command( n, fw ), lb( layoutBase ), widgets( wl ) { WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase ); - spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) ); - margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) ); + spacing = MetaDataBase::spacing( layoutBase ); + margin = MetaDataBase::margin( layoutBase ); layout = 0; if ( lay == WidgetFactory::HBox ) layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast<TQSplitter*>(layoutBase) != 0 ); @@ -820,8 +820,8 @@ void BreakLayoutCommand::unexecute() formWindow()->clearSelection( FALSE ); layout->doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); - MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing ); - MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin ); + MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( lb ), spacing ); + MetaDataBase::setMargin( WidgetFactory::containerOfWidget( lb ), margin ); } // ------------------------------------------------------------ @@ -853,7 +853,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" ); tabPage->hide(); index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) ); + MetaDataBase::addEntry( tabPage ); } void AddTabPageCommand::execute() @@ -862,7 +862,7 @@ void AddTabPageCommand::execute() index = ( (QDesignerTabWidget*)tabWidget )->count(); tabWidget->insertTab( tabPage, tabLabel, index ); tabWidget->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -870,7 +870,7 @@ void AddTabPageCommand::unexecute() { tabWidget->removePage( tabPage ); tabPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -889,7 +889,7 @@ void MoveTabPageCommand::execute() ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -898,7 +898,7 @@ void MoveTabPageCommand::unexecute() ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -916,7 +916,7 @@ void DeleteTabPageCommand::execute() { tabWidget->removePage( tabPage ); tabPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -924,7 +924,7 @@ void DeleteTabPageCommand::unexecute() { tabWidget->insertTab( tabPage, tabLabel, index ); tabWidget->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -937,13 +937,13 @@ AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWin stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" ); stackPage->hide(); index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) ); + MetaDataBase::addEntry( stackPage ); } void AddWidgetStackPageCommand::execute() { index = widgetStack->insertPage( stackPage, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); } @@ -951,7 +951,7 @@ void AddWidgetStackPageCommand::unexecute() { index = widgetStack->removePage( stackPage ); stackPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); } @@ -966,7 +966,7 @@ void DeleteWidgetStackPageCommand::execute() { index = widgetStack->removePage( stackPage ); stackPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( stackPage ); } @@ -974,7 +974,7 @@ void DeleteWidgetStackPageCommand::unexecute() { index = widgetStack->insertPage( stackPage, index ); widgetStack->raiseWidget( stackPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( stackPage ); } @@ -988,7 +988,7 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw, page->hide(); index = i; show = s; - MetaDataBase::addEntry( TQT_TQOBJECT(page) ); + MetaDataBase::addEntry( page ); } void AddWizardPageCommand::execute() @@ -998,7 +998,7 @@ void AddWizardPageCommand::execute() wizard->insertPage( page, pageLabel, index ); if ( show ) ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1006,7 +1006,7 @@ void AddWizardPageCommand::unexecute() { wizard->removePage( page ); page->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1025,7 +1025,7 @@ void DeleteWizardPageCommand::execute() pageLabel = wizard->title( page ); wizard->removePage( page ); page->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1034,7 +1034,7 @@ void DeleteWizardPageCommand::unexecute() wizard->insertPage( page, pageLabel, index ); if ( show ) ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1054,7 +1054,7 @@ void RenameWizardPageCommand::execute() wizard->setTitle( page, label ); label = oldLabel; - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); } void RenameWizardPageCommand::unexecute() @@ -1079,7 +1079,7 @@ void SwapWizardPagesCommand::execute() wizard->removePage( page2 ); wizard->insertPage( page1, page1Label, index2 ); wizard->insertPage( page2, page2Label, index1 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1101,7 +1101,7 @@ void MoveWizardPageCommand::execute() TQString pageLabel = wizard->title( page ); wizard->removePage( page ); wizard->insertPage( page, pageLabel, index2 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1112,7 +1112,7 @@ void MoveWizardPageCommand::unexecute() TQString pageLabel = wizard->title( page ); wizard->removePage( page ); wizard->insertPage( page, pageLabel, index1 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1126,7 +1126,7 @@ AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw void AddConnectionCommand::execute() { - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, + MetaDataBase::addConnection( formWindow(), connection.sender, connection.signal, connection.receiver, connection.slot ); if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); @@ -1134,7 +1134,7 @@ void AddConnectionCommand::execute() void AddConnectionCommand::unexecute() { - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, + MetaDataBase::removeConnection( formWindow(), connection.sender, connection.signal, connection.receiver, connection.slot ); if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); @@ -1150,7 +1150,7 @@ RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWind void RemoveConnectionCommand::execute() { - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, + MetaDataBase::removeConnection( formWindow(), connection.sender, connection.signal, connection.receiver, connection.slot ); if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); @@ -1158,7 +1158,7 @@ void RemoveConnectionCommand::execute() void RemoveConnectionCommand::unexecute() { - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, + MetaDataBase::addConnection( formWindow(), connection.sender, connection.signal, connection.receiver, connection.slot ); if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); @@ -1176,7 +1176,7 @@ AddFunctionCommand::AddFunctionCommand( const TQString &name, FormWindow *fw, co void AddFunctionCommand::execute() { - MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); //integration (add - execute) @@ -1195,7 +1195,7 @@ void AddFunctionCommand::execute() void AddFunctionCommand::unexecute() { - MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); //integration (add - unexecute) @@ -1230,7 +1230,7 @@ ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const TQString &name, void ChangeFunctionAttribCommand::execute() { - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), oldName, newName, newSpec, newAccess, + MetaDataBase::changeFunctionAttributes( formWindow(), oldName, newName, newSpec, newAccess, newType, newLang, newReturnType ); formWindow()->formFile()->functionNameChanged( oldName, newName ); formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType ); @@ -1257,7 +1257,7 @@ void ChangeFunctionAttribCommand::execute() void ChangeFunctionAttribCommand::unexecute() { - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), newName, oldName, oldSpec, oldAccess, + MetaDataBase::changeFunctionAttributes( formWindow(), newName, oldName, oldSpec, oldAccess, oldType, oldLang, oldReturnType ); formWindow()->formFile()->functionNameChanged( newName, oldName ); formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType ); @@ -1291,7 +1291,7 @@ RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow * returnType( rt ) { if ( spec.isNull() ) { - TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); + TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( fw ); for ( TQValueList<MetaDataBase::Function>::Iterator it = lst.begin(); it != lst.end(); ++it ) { if ( MetaDataBase::normalizeFunction( (*it).function ) == MetaDataBase::normalizeFunction( function ) ) { @@ -1308,7 +1308,7 @@ RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow * void RemoveFunctionCommand::execute() { - MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); //integration (remove - execute) @@ -1326,9 +1326,9 @@ void RemoveFunctionCommand::execute() void RemoveFunctionCommand::unexecute() { - if ( MetaDataBase::hasFunction( TQT_TQOBJECT(formWindow()), function ) ) + if ( MetaDataBase::hasFunction( formWindow(), function ) ) return; - MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); //integration (remove - unexecute) @@ -1354,7 +1354,7 @@ AddVariableCommand::AddVariableCommand( const TQString &name, FormWindow *fw, co void AddVariableCommand::execute() { - MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); + MetaDataBase::addVariable( formWindow(), varName, access ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1362,7 +1362,7 @@ void AddVariableCommand::execute() void AddVariableCommand::unexecute() { - MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); + MetaDataBase::removeVariable( formWindow(), varName ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1374,12 +1374,12 @@ SetVariablesCommand::SetVariablesCommand( const TQString &name, FormWindow *fw, TQValueList<MetaDataBase::Variable> lst ) : Command( name, fw ), newList( lst ) { - oldList = MetaDataBase::variables( TQT_TQOBJECT(formWindow()) ); + oldList = MetaDataBase::variables( formWindow() ); } void SetVariablesCommand::execute() { - MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), newList ); + MetaDataBase::setVariables( formWindow(), newList ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1387,7 +1387,7 @@ void SetVariablesCommand::execute() void SetVariablesCommand::unexecute() { - MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), oldList ); + MetaDataBase::setVariables( formWindow(), oldList ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1398,7 +1398,7 @@ void SetVariablesCommand::unexecute() RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn ) : Command( name, fw ), varName( vn ) { - TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( TQT_TQOBJECT(fw) ); + TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( fw ); for ( TQValueList<MetaDataBase::Variable>::Iterator it = lst.begin(); it != lst.end(); ++it ) { if ( (*it).varName == varName ) { access = (*it).varAccess; @@ -1409,7 +1409,7 @@ RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow * void RemoveVariableCommand::execute() { - MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); + MetaDataBase::removeVariable( formWindow(), varName ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1417,7 +1417,7 @@ void RemoveVariableCommand::execute() void RemoveVariableCommand::unexecute() { - MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); + MetaDataBase::addVariable( formWindow(), varName, access ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1510,7 +1510,7 @@ void PasteCommand::execute() { for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->show(); - formWindow()->selectWidget( TQT_TQOBJECT(w) ); + formWindow()->selectWidget( w ); formWindow()->widgets()->insert( w, w ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); } @@ -1520,7 +1520,7 @@ void PasteCommand::unexecute() { for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->hide(); - formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); + formWindow()->selectWidget( w, FALSE ); formWindow()->widgets()->remove( w ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); } @@ -1762,21 +1762,21 @@ PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, F : Command( n, fw ), newText( txt ), mlined( mle ) { oldText = mlined->text(); - wasChanged = MetaDataBase::isPropertyChanged( TQT_TQOBJECT(mlined), "text" ); + wasChanged = MetaDataBase::isPropertyChanged( mlined, "text" ); } void PopulateMultiLineEditCommand::execute() { mlined->setText( newText ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", TRUE ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); + MetaDataBase::setPropertyChanged( mlined, "text", TRUE ); + formWindow()->emitUpdateProperties( mlined ); } void PopulateMultiLineEditCommand::unexecute() { mlined->setText( oldText ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", wasChanged ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); + MetaDataBase::setPropertyChanged( mlined, "text", wasChanged ); + formWindow()->emitUpdateProperties( mlined ); } // ------------------------------------------------------------ @@ -1788,7 +1788,7 @@ PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, T { #ifndef TQT_NO_TABLE int i = 0; - TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table ); for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { PopulateTableCommand::Column col; col.text = table->horizontalHeader()->label( i ); @@ -1818,7 +1818,7 @@ void PopulateTableCommand::execute() if ( !(*cit).field.isEmpty() ) columnFields.insert( (*cit).text, (*cit).field ); } - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); + MetaDataBase::setColumnFields( table, columnFields ); table->setNumRows( newRows.count() ); i = 0; for ( TQValueList<Row>::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i ) @@ -1837,7 +1837,7 @@ void PopulateTableCommand::unexecute() if ( !(*cit).field.isEmpty() ) columnFields.insert( (*cit).text, (*cit).field ); } - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); + MetaDataBase::setColumnFields( table, columnFields ); table->setNumRows( oldRows.count() ); i = 0; for ( TQValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i ) @@ -1955,7 +1955,7 @@ void AddToolBarCommand::execute() if ( !toolBar ) { toolBar = new QDesignerToolBar( mainWindow ); TQString n = "Toolbar"; - formWindow()->unify( TQT_TQOBJECT(toolBar), n, TRUE ); + formWindow()->unify( toolBar, n, TRUE ); toolBar->setName( n ); mainWindow->addToolBar( toolBar, n ); } else { @@ -2011,7 +2011,7 @@ void AddContainerPageCommand::execute() wiface->insertPage( wClassName, container, pageLabel, index, page ); MetaDataBase::addEntry( page ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } @@ -2020,7 +2020,7 @@ void AddContainerPageCommand::unexecute() if ( !wiface || !wiface->supportsPages( wClassName ) ) return; wiface->removePage( wClassName, container, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } @@ -2054,7 +2054,7 @@ void DeleteContainerPageCommand::execute() return; wiface->removePage( wClassName, container, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } @@ -2066,7 +2066,7 @@ void DeleteContainerPageCommand::unexecute() index = wiface->count( wClassName, container ); wiface->insertPage( wClassName, container, pageLabel, index, page ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } @@ -2099,7 +2099,7 @@ void RenameContainerPageCommand::execute() if ( !wiface || !wiface->supportsPages( wClassName ) ) return; wiface->renamePage( wClassName, container, index, newLabel ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } @@ -2108,7 +2108,7 @@ void RenameContainerPageCommand::unexecute() if ( !wiface || !wiface->supportsPages( wClassName ) ) return; wiface->renamePage( wClassName, container, index, oldLabel ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } #endif // TQT_CONTAINER_CUSTOM_WIDGETS @@ -2407,7 +2407,7 @@ void RenameMenuCommand::execute() PopupMenuEditor *popup = item->menu(); item->setMenuText( newName ); TQString legal = makeLegal( newName ); - formWindow()->unify( TQT_TQOBJECT(popup), legal, TRUE ); + formWindow()->unify( popup, legal, TRUE ); popup->setName( legal ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -2429,14 +2429,14 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw, toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" ); toolBoxPage->hide(); index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) ); + MetaDataBase::addEntry( toolBoxPage ); } void AddToolBoxPageCommand::execute() { index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel); toolBox->setCurrentIndex( index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -2444,7 +2444,7 @@ void AddToolBoxPageCommand::unexecute() { toolBox->removeItem( toolBoxPage ); toolBoxPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -2462,7 +2462,7 @@ void DeleteToolBoxPageCommand::execute() { toolBox->removeItem( toolBoxPage ); toolBoxPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -2470,6 +2470,6 @@ void DeleteToolBoxPageCommand::unexecute() { index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel ); toolBox->setCurrentIndex( index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } |