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:59:58 +0900 |
commit | b9186693ada54762210d51282c15e2248e76a586 (patch) | |
tree | 6e7e82a9639e67a50aa121eb08b8d7c1f6ba0229 /kdevdesigner | |
parent | f12db681be834f7027132156c05afcbcb2346278 (diff) | |
download | tdevelop-b9186693ada54762210d51282c15e2248e76a586.tar.gz tdevelop-b9186693ada54762210d51282c15e2248e76a586.zip |
Replaced various '#define' with actual strings - part 6
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 61cd5b18f00b0d36a7953596c5295e358324ebb7)
Diffstat (limited to 'kdevdesigner')
32 files changed, 704 insertions, 704 deletions
diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp index 071845c9..64ea116f 100644 --- a/kdevdesigner/designer/actiondnd.cpp +++ b/kdevdesigner/designer/actiondnd.cpp @@ -127,7 +127,7 @@ void QDesignerAction::remove() { if ( !widgetToInsert ) return; - MainWindow::self->formWindow()->selectWidget( TQT_TQOBJECT(widgetToInsert), FALSE ); + MainWindow::self->formWindow()->selectWidget( widgetToInsert, FALSE ); widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE ); } @@ -221,7 +221,7 @@ QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw ) insertAnchor = 0; afterAnchor = TRUE; setAcceptDrops( TRUE ); - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + MetaDataBase::addEntry( this ); lastIndicatorPos = TQPoint( -1, -1 ); indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); @@ -239,7 +239,7 @@ QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock ) setAcceptDrops( TRUE ); indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + MetaDataBase::addEntry( this ); installEventFilter( this ); widgetInserting = FALSE; findFormWindow(); @@ -500,7 +500,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) drag->setPixmap( a->iconSet().pixmap() ); if ( ::tqt_cast<QDesignerAction*>(a) ) { if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) ) - formWindow->selectWidget( ( TQT_TQOBJECT(( (QDesignerAction*)a )->widget())), FALSE ); + formWindow->selectWidget( ( ( (QDesignerAction*)a )->widget()), FALSE ); } if ( !drag->drag() ) { AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Action '%1' to Toolbar '%2'" ). diff --git a/kdevdesigner/designer/actioneditorimpl.cpp b/kdevdesigner/designer/actioneditorimpl.cpp index a08edc67..59063f8d 100644 --- a/kdevdesigner/designer/actioneditorimpl.cpp +++ b/kdevdesigner/designer/actioneditorimpl.cpp @@ -139,7 +139,7 @@ void ActionEditor::deleteAction() ++it; } if ( formWindow ) { - formWindow->setActiveObject( TQT_TQOBJECT(formWindow->mainContainer()) ); + formWindow->setActiveObject( formWindow->mainContainer() ); if ( formWindow->formFile() ) formWindow->formFile()->setModified( TRUE ); } @@ -305,7 +305,7 @@ void ActionEditor::updateActionIcon( TQAction *a ) void ActionEditor::connectionsClicked() { ConnectionDialog dlg( formWindow->mainWindow() ); - dlg.setDefault( TQT_TQOBJECT(currentAction), TQT_TQOBJECT(formWindow) ); + dlg.setDefault( currentAction, formWindow ); dlg.addConnection(); dlg.exec(); } @@ -313,9 +313,9 @@ void ActionEditor::connectionsClicked() void ActionEditor::removeConnections( TQObject *o ) { TQValueList<MetaDataBase::Connection> conns = - MetaDataBase::connections( TQT_TQOBJECT(formWindow), o ); + MetaDataBase::connections( formWindow, o ); for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin(); it2 != conns.end(); ++it2 ) - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow), (*it2).sender, (*it2).signal, + MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal, (*it2).receiver, (*it2).slot ); } 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(); } diff --git a/kdevdesigner/designer/connectiondialog.ui.h b/kdevdesigner/designer/connectiondialog.ui.h index 25a5d5f2..ea73e46c 100644 --- a/kdevdesigner/designer/connectiondialog.ui.h +++ b/kdevdesigner/designer/connectiondialog.ui.h @@ -81,7 +81,7 @@ void ConnectionDialog::init() } TQValueList<MetaDataBase::Connection> conns = - MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); + MetaDataBase::connections( MainWindow::self->formWindow() ); for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) { ConnectionContainer *c = addConnection( (*it).sender, (*it).receiver, @@ -147,7 +147,7 @@ ConnectionContainer *ConnectionDialog::addConnection( TQObject *sender, TQObject connect( re, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ), this, TQT_SLOT( updateEditSlotsButton() ) ); - ConnectionContainer *c = new ConnectionContainer( TQT_TQOBJECT(this), se, si, re, sl, row ); + ConnectionContainer *c = new ConnectionContainer( this, se, si, re, sl, row ); connections.append( c ); connect( c, TQT_SIGNAL( changed( ConnectionContainer * ) ), this, TQT_SLOT( updateConnectionState( ConnectionContainer * ) ) ); @@ -188,7 +188,7 @@ void ConnectionDialog::updateConnectionState( ConnectionContainer *c ) void ConnectionDialog::okClicked() { TQValueList<MetaDataBase::Connection> oldConnections = - MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); + MetaDataBase::connections( MainWindow::self->formWindow() ); TQPtrList<Command> newConnectionCmds; TQPtrList<Command> oldConnectionCmds; for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) { @@ -215,7 +215,7 @@ void ConnectionDialog::okClicked() TQValueList<MetaDataBase::Connection> conns = - MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); + MetaDataBase::connections( MainWindow::self->formWindow() ); for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) { RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Signal/Slot " diff --git a/kdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp index f0a04362..9f0c2b5e 100644 --- a/kdevdesigner/designer/connectionitems.cpp +++ b/kdevdesigner/designer/connectionitems.cpp @@ -354,7 +354,7 @@ void SignalItem::senderChanged( TQObject *sender ) } if ( sender == formWindow->mainContainer() ) { - TQStringList extra = MetaDataBase::signalList( TQT_TQOBJECT(formWindow) ); + TQStringList extra = MetaDataBase::signalList( formWindow ); if ( !extra.isEmpty() ) lst += extra; } @@ -417,7 +417,7 @@ bool SlotItem::ignoreSlot( const char* slot ) const return TRUE; } - if ( !formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) { + if ( !formWindow->isMainContainer( lastReceiver ) ) { if ( qstrcmp( slot, "close()" ) == 0 ) return TRUE; } @@ -448,7 +448,7 @@ void SlotItem::updateSlotList() // accept only public slots. For the form window, also accept protected slots const TQMetaData* md = lastReceiver->metaObject()->slot( i, TRUE ); if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->access == TQMetaData::Public) || - (formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) && + (formWindow->isMainContainer( lastReceiver ) && lastReceiver->metaObject()->slot(i, TRUE)->access == TQMetaData::Protected) ) && !ignoreSlot( md->name ) && @@ -460,8 +460,8 @@ void SlotItem::updateSlotList() LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() ); if ( !iface || iface->supports( LanguageInterface::ConnectionsToCustomSlots ) ) { - if ( formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) { - TQValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( TQT_TQOBJECT(formWindow) ); + if ( formWindow->isMainContainer( lastReceiver ) ) { + TQValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( formWindow ); if ( !moreSlots.isEmpty() ) { for ( TQValueList<MetaDataBase::Function>::Iterator it = moreSlots.begin(); it != moreSlots.end(); ++it ) { diff --git a/kdevdesigner/designer/customwidgeteditorimpl.cpp b/kdevdesigner/designer/customwidgeteditorimpl.cpp index f417f6f2..56c3bebf 100644 --- a/kdevdesigner/designer/customwidgeteditorimpl.cpp +++ b/kdevdesigner/designer/customwidgeteditorimpl.cpp @@ -73,10 +73,10 @@ CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw ) sizeVer->setEnabled( FALSE ); checkContainer->setEnabled( FALSE ); localGlobalCombo->setEnabled( FALSE ); - editClass->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(editClass) ) ); - editSignal->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) ); - editSlot->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) ); - editProperty->setValidator( new AsciiValidator( TQT_TQOBJECT(editSignal) ) ); + editClass->setValidator( new AsciiValidator( TQString(":"), editClass ) ); + editSignal->setValidator( new AsciiValidator( TRUE, editSignal ) ); + editSlot->setValidator( new AsciiValidator( TRUE, editSignal ) ); + editProperty->setValidator( new AsciiValidator( editSignal ) ); editSignal->setEnabled( FALSE ); buttonRemoveSignal->setEnabled( FALSE ); diff --git a/kdevdesigner/designer/dbconnectionimpl.cpp b/kdevdesigner/designer/dbconnectionimpl.cpp index 3cfd1fdc..678dbad0 100644 --- a/kdevdesigner/designer/dbconnectionimpl.cpp +++ b/kdevdesigner/designer/dbconnectionimpl.cpp @@ -61,7 +61,7 @@ void DatabaseConnectionEditor::accept() void DatabaseConnectionEditor::init() { connectionWidget->editName->setEnabled( FALSE ); - connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) ); + connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) ); connectionWidget->editName->setText( conn->name() ); connectionWidget->comboDriver->setEnabled( FALSE ); connectionWidget->comboDriver->lineEdit()->setText( conn->driver() ); diff --git a/kdevdesigner/designer/dbconnectionsimpl.cpp b/kdevdesigner/designer/dbconnectionsimpl.cpp index e589679b..b3ce1b32 100644 --- a/kdevdesigner/designer/dbconnectionsimpl.cpp +++ b/kdevdesigner/designer/dbconnectionsimpl.cpp @@ -63,7 +63,7 @@ DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* pa listConnections->insertItem( conn->name() ); connectionWidget->comboDriver->insertStringList( TQSqlDatabase::drivers() ); #endif - connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) ); + connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) ); enableAll( FALSE ); } diff --git a/kdevdesigner/designer/designerappiface.cpp b/kdevdesigner/designer/designerappiface.cpp index 4a223cef..5befa1e4 100644 --- a/kdevdesigner/designer/designerappiface.cpp +++ b/kdevdesigner/designer/designerappiface.cpp @@ -146,7 +146,7 @@ bool DesignerInterfaceImpl::singleProjectMode() const void DesignerInterfaceImpl::showError( TQWidget *widget, int line, const TQString &message ) { - mainWindow->showErrorMessage( TQT_TQOBJECT(widget), line, message ); + mainWindow->showErrorMessage( widget, line, message ); } void DesignerInterfaceImpl::runFinished() @@ -156,12 +156,12 @@ void DesignerInterfaceImpl::runFinished() void DesignerInterfaceImpl::showStackFrame( TQWidget *w, int line ) { - mainWindow->showStackFrame( TQT_TQOBJECT(w), line ); + mainWindow->showStackFrame( w, line ); } void DesignerInterfaceImpl::showDebugStep( TQWidget *w, int line ) { - mainWindow->showDebugStep( TQT_TQOBJECT(w), line ); + mainWindow->showDebugStep( w, line ); } void DesignerInterfaceImpl::runProjectPrecondition() @@ -335,7 +335,7 @@ void DesignerProjectImpl::breakPoints( TQMap<TQString, TQValueList<uint> > &bps for ( TQPtrListIterator<FormFile> forms = project->formFiles(); forms.current(); ++forms ) { if ( forms.current()->formWindow() ) - bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( TQT_TQOBJECT(forms.current()->formWindow()) ) ); + bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( forms.current()->formWindow() ) ); } } @@ -360,7 +360,7 @@ void DesignerProjectImpl::clearAllBreakpoints() const for ( TQPtrListIterator<FormFile> forms = project->formFiles(); forms.current(); ++forms ) { if ( forms.current()->formWindow() ) - MetaDataBase::setBreakPoints( TQT_TQOBJECT(forms.current()->formWindow()), empty ); + MetaDataBase::setBreakPoints( forms.current()->formWindow(), empty ); MainWindow::self->resetBreakPoints(); } } @@ -535,7 +535,7 @@ void DesignerPixmapCollectionImpl::addPixmap( const TQPixmap &p, const TQString pixCollection->addPixmap( pix, force ); FormWindow *fw = MainWindow::self->formWindow(); if ( fw ) - MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), p.serialNumber(), name ); + MetaDataBase::setPixmapKey( fw, p.serialNumber(), name ); } TQPixmap DesignerPixmapCollectionImpl::pixmap( const TQString &name ) const @@ -586,7 +586,7 @@ TQWidget *DesignerFormWindowImpl::create( const char *className, TQWidget *paren { TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name ); formWindow->insertWidget( w, TRUE ); - formWindow->killAccels( TQT_TQOBJECT(formWindow->mainContainer()) ); + formWindow->killAccels( formWindow->mainContainer() ); return w; } @@ -674,7 +674,7 @@ void DesignerFormWindowImpl::breakLayout() void DesignerFormWindowImpl::selectWidget( TQWidget * w ) { - formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); + formWindow->selectWidget( w, TRUE ); } void DesignerFormWindowImpl::selectAll() @@ -755,14 +755,14 @@ void DesignerFormWindowImpl::preview() const void DesignerFormWindowImpl::addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot ) { - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow), sender, signal, receiver, slot ); + MetaDataBase::addConnection( formWindow, sender, signal, receiver, slot ); } void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQString &specifier, const TQString &access, const TQString &type, const TQString &language, const TQString &returnType ) { - MetaDataBase::addFunction( TQT_TQOBJECT(formWindow), function, specifier, access, type, language, returnType ); + MetaDataBase::addFunction( formWindow, function, specifier, access, type, language, returnType ); formWindow->mainWindow()->functionsChanged(); } @@ -804,7 +804,7 @@ void DesignerFormWindowImpl::setColumnFields( TQObject *o, const TQMap<TQString, TQStringList DesignerFormWindowImpl::implementationIncludes() const { - TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow ); TQStringList lst; for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) { MetaDataBase::Include inc = *it; @@ -825,7 +825,7 @@ TQStringList DesignerFormWindowImpl::implementationIncludes() const TQStringList DesignerFormWindowImpl::declarationIncludes() const { - TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow ); TQStringList lst; for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) { MetaDataBase::Include inc = *it; @@ -846,7 +846,7 @@ TQStringList DesignerFormWindowImpl::declarationIncludes() const void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst ) { - TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow ); TQValueList<MetaDataBase::Include> includes; for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) { MetaDataBase::Include inc = *it; @@ -882,13 +882,13 @@ void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst includes << inc; } } - MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes ); + MetaDataBase::setIncludes( formWindow, includes ); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); } void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst ) { - TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow ); TQValueList<MetaDataBase::Include> includes; for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) { MetaDataBase::Include inc = *it; @@ -924,29 +924,29 @@ void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst ) includes << inc; } } - MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes ); + MetaDataBase::setIncludes( formWindow, includes ); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); } TQStringList DesignerFormWindowImpl::forwardDeclarations() const { - return MetaDataBase::forwards( TQT_TQOBJECT(formWindow) ); + return MetaDataBase::forwards( formWindow ); } void DesignerFormWindowImpl::setForwardDeclarations( const TQStringList &lst ) { - MetaDataBase::setForwards( TQT_TQOBJECT(formWindow), lst ); + MetaDataBase::setForwards( formWindow, lst ); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); } TQStringList DesignerFormWindowImpl::signalList() const { - return MetaDataBase::signalList( TQT_TQOBJECT(formWindow) ); + return MetaDataBase::signalList( formWindow ); } void DesignerFormWindowImpl::setSignalList( const TQStringList &lst ) { - MetaDataBase::setSignalList( TQT_TQOBJECT(formWindow), lst ); + MetaDataBase::setSignalList( formWindow, lst ); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); } @@ -963,16 +963,16 @@ void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw ); TQString n = name; - formWindow->unify( TQT_TQOBJECT(popup), n, TRUE ); + formWindow->unify( popup, n, TRUE ); popup->setName( n ); MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); if ( !mb ) { mb = new MenuBarEditor( formWindow, mw ); mb->setName( "MenuBar" ); - MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); + MetaDataBase::addEntry( mb ); } mb->insertItem( text, popup ); - MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); + MetaDataBase::addEntry( popup ); } void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a ) @@ -1009,7 +1009,7 @@ void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &n TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQToolBar *tb = new QDesignerToolBar( mw ); TQString n = name; - formWindow->unify( TQT_TQOBJECT(tb), n, TRUE ); + formWindow->unify( tb, n, TRUE ); tb->setName( n ); mw->addToolBar( tb, text ); } diff --git a/kdevdesigner/designer/editfunctionsimpl.cpp b/kdevdesigner/designer/editfunctionsimpl.cpp index 4d006097..1bdbf9e3 100644 --- a/kdevdesigner/designer/editfunctionsimpl.cpp +++ b/kdevdesigner/designer/editfunctionsimpl.cpp @@ -57,7 +57,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) id = 0; functList.clear(); - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( fw ); for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { TQListViewItem *i = new TQListViewItem( functionListView ); @@ -86,7 +86,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) id++; if ( (*it).type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).function ).latin1() ) ) + if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( (*it).function ).latin1() ) ) i->setText( 5, i18n( "Yes" ) ); else i->setText( 5, i18n( "No" ) ); @@ -96,7 +96,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) } boxProperties->setEnabled( FALSE ); - functionName->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(functionName) ) ); + functionName->setValidator( new AsciiValidator( TRUE, functionName ) ); if ( functionListView->firstChild() ) functionListView->setCurrentItem( functionListView->firstChild() ); @@ -131,7 +131,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) void EditFunctions::okClicked() { - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow ); TQString n = i18n( "Add/Remove functions of '%1'" ).arg( formWindow->name() ); TQPtrList<Command> commands; TQValueList<MetaDataBase::Function>::Iterator fit; @@ -291,7 +291,7 @@ void EditFunctions::functionAdd( const TQString &access, const TQString &type ) if ( i->text( 4 ) == "slot" ) { i->setText( 0, "newSlot()" ); - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), "newSlot()" ) ) + if ( MetaDataBase::isSlotUsed( formWindow, "newSlot()" ) ) i->setText( 5, i18n( "Yes" ) ); else i->setText( 5, i18n( "No" ) ); @@ -398,7 +398,7 @@ void EditFunctions::currentTextChanged( const TQString &txt ) functionListView->currentItem()->setText( 0, txt ); if ( functionListView->currentItem()->text( 4 ) == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) ) + if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) ) functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); else functionListView->currentItem()->setText( 5, i18n( "No" ) ); @@ -441,7 +441,7 @@ void EditFunctions::currentTypeChanged( const TQString &type ) lastType = type; functionListView->currentItem()->setText( 4, type ); if ( type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), + if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ).latin1() ).latin1() ) ) functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); else @@ -515,7 +515,7 @@ void EditFunctions::displaySlots( bool justSlots ) i->setText( 4, (*it).type ); if ( (*it).type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) ) + if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) ) i->setText( 5, i18n( "Yes" ) ); else i->setText( 5, i18n( "No" ) ); diff --git a/kdevdesigner/designer/formfile.cpp b/kdevdesigner/designer/formfile.cpp index 1ef0b0b7..abbd8991 100644 --- a/kdevdesigner/designer/formfile.cpp +++ b/kdevdesigner/designer/formfile.cpp @@ -83,7 +83,7 @@ FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name FormFile::~FormFile() { pro->removeFormFile( this ); - if ( TQT_TQOBJECT(formWindow()) ) + if ( formWindow() ) formWindow()->setFormFile( 0 ); } @@ -170,7 +170,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) if ( ed ) ed->save(); - if ( TQT_TQOBJECT(formWindow()) && isModified( WFormWindow ) ) { + if ( formWindow() && isModified( WFormWindow ) ) { if ( withMsgBox ) { if ( !formWindow()->checkCustomWidgets() ) return FALSE; @@ -221,7 +221,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) } } - if ( TQT_TQOBJECT(formWindow()) ) { + if ( formWindow() ) { Resource resource( MainWindow::self ); resource.setWidget( formWindow() ); bool formCodeOnly = isModified( WFormCode ) && !isModified( WFormWindow ); @@ -247,7 +247,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) bool FormFile::saveAs( bool ignoreModified ) { TQString f = pro->makeAbsolute( fileName() ); - if ( fileNameTemp && TQT_TQOBJECT(formWindow()) ) { + if ( fileNameTemp && formWindow() ) { f = TQString( formWindow()->name() ).lower(); f.replace( "::", "_" ); f = pro->makeAbsolute( f + ".ui" ); @@ -293,7 +293,7 @@ bool FormFile::saveAs( bool ignoreModified ) } pro->setModified( TRUE ); timeStamp.setFileName( pro->makeAbsolute( codeFile() ) ); - if ( ed && TQT_TQOBJECT(formWindow()) ) + if ( ed && formWindow() ) ed->setCaption( i18n( "Edit %1" ).arg( formWindow()->name() ) ); setModified( TRUE ); if ( pro->isDummy() ) @@ -307,7 +307,7 @@ bool FormFile::close() editor()->save(); editor()->close(); } - if ( TQT_TQOBJECT(formWindow()) ) + if ( formWindow() ) return formWindow()->close(); return TRUE; } @@ -372,7 +372,7 @@ bool FormFile::isModified( int who ) bool FormFile::isFormWindowModified() const { - if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) + if ( !formWindow() || !formWindow()->commandHistory() ) return FALSE; return formWindow()->commandHistory()->isModified(); } @@ -389,7 +389,7 @@ void FormFile::setFormWindowModified( bool m ) bool b = isFormWindowModified(); if ( m == b ) return; - if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) + if ( !formWindow() || !formWindow()->commandHistory() ) return; formWindow()->commandHistory()->setModified( m ); emit somethingChanged( this ); @@ -411,13 +411,13 @@ void FormFile::showFormWindow() { if ( !MainWindow::self ) return; - if ( TQT_TQOBJECT(formWindow()) ) { + if ( formWindow() ) { if ( ( formWindow()->hasFocus() || MainWindow::self->qWorkspace()->activeWindow() == formWindow() ) && MainWindow::self->propertyeditor()->formWindow() != formWindow() ) { - MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(formWindow()->currentWidget()), formWindow() ); + MainWindow::self->propertyeditor()->setWidget( formWindow()->currentWidget(), formWindow() ); MainWindow::self->objectHierarchy()->setFormWindow( formWindow(), - TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->currentWidget() ); } formWindow()->setFocus(); return; @@ -519,14 +519,14 @@ void FormFile::setCodeFileState( UihState s ) void FormFile::createFormCode() { - if ( !TQT_TQOBJECT(formWindow()) ) + if ( !formWindow() ) return; LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); if ( !iface ) return; if ( pro->isCpp() ) cod = codeComment(); - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow() ); for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { cod += (!cod.isEmpty() ? "\n\n" : "") + iface->createFunctionStart( formWindow()->name(), make_func_pretty((*it).function), @@ -573,14 +573,14 @@ void FormFile::setCodeEdited( bool b ) void FormFile::parseCode( const TQString &txt, bool allowModify ) { - if ( !TQT_TQOBJECT(formWindow()) ) + if ( !formWindow() ) return; LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); if ( !iface ) return; TQValueList<LanguageInterface::Function> functions; TQValueList<MetaDataBase::Function> newFunctions, oldFunctions; - oldFunctions = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); + oldFunctions = MetaDataBase::functionList( formWindow() ); iface->functions( txt, &functions ); TQMap<TQString, TQString> funcs; for ( TQValueList<LanguageInterface::Function>::Iterator it = functions.begin(); @@ -634,7 +634,7 @@ void FormFile::parseCode( const TQString &txt, bool allowModify ) if ( allowModify && oldFunctions.count() > 0 ) setFormWindowModified( TRUE ); - MetaDataBase::setFunctionList( TQT_TQOBJECT(formWindow()), newFunctions ); + MetaDataBase::setFunctionList( formWindow(), newFunctions ); } void FormFile::syncCode() @@ -704,7 +704,7 @@ void FormFile::addFunctionCode( MetaDataBase::Function function ) if ( !hasFunc ) { if ( !codeEdited && !timeStamp.isUpToDate() ) loadCode(); - MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( TQT_TQOBJECT(formWindow()) ); + MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( formWindow() ); TQString cn; if ( mi.classNameChanged ) cn = mi.className; @@ -802,7 +802,7 @@ void FormFile::functionRetTypeChanged( const TQString &fuName, const TQString &o TQString FormFile::formName() const { FormFile* that = (FormFile*) this; - if ( TQT_TQOBJECT(formWindow()) ) { + if ( formWindow() ) { that->cachedFormName = formWindow()->name(); return cachedFormName; } diff --git a/kdevdesigner/designer/formsettingsimpl.cpp b/kdevdesigner/designer/formsettingsimpl.cpp index e29ea157..f82ae552 100644 --- a/kdevdesigner/designer/formsettingsimpl.cpp +++ b/kdevdesigner/designer/formsettingsimpl.cpp @@ -44,7 +44,7 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw ) : FormSettingsBase( parent, 0, TRUE ), formwindow( fw ) { connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(fw) ); + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( fw ); if ( info.classNameChanged && !info.className.isEmpty() ) editClassName->setText( info.className ); else @@ -52,8 +52,8 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw ) editComment->setText( info.comment ); editAuthor->setText( info.author ); - editClassName->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editClassName) ) ); - editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editPixmapFunction) ) ); + editClassName->setValidator( new AsciiValidator( TQString( ":" ), editClassName ) ); + editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), editPixmapFunction ) ); if ( formwindow->savePixmapInline() ) radioPixmapInline->setChecked( TRUE ); @@ -65,8 +65,8 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw ) radioProjectImageFile->setEnabled( !fw->project()->isDummy() ); spinSpacing->setValue( formwindow->layoutDefaultSpacing() ); spinMargin->setValue( formwindow->layoutDefaultMargin() ); - editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editSpacingFunction) ) ); - editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editMarginFunction) ) ); + editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), editSpacingFunction ) ); + editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), editMarginFunction ) ); checkLayoutFunctions->setChecked( formwindow->hasLayoutFunctions() ); editSpacingFunction->setText( formwindow->spacingFunction() ); editMarginFunction->setText( formwindow->marginFunction() ); @@ -79,17 +79,17 @@ void FormSettings::okClicked() info.classNameChanged = info.className != TQString( formwindow->name() ); info.comment = editComment->text(); info.author = editAuthor->text(); - MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), info ); + MetaDataBase::setMetaInfo( formwindow, info ); formwindow->commandHistory()->setModified( TRUE ); if ( formwindow->savePixmapInline() ) { - MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) ); - MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) ); + MetaDataBase::clearPixmapArguments( formwindow ); + MetaDataBase::clearPixmapKeys( formwindow ); } else if ( formwindow->savePixmapInProject() ) { - MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) ); + MetaDataBase::clearPixmapArguments( formwindow ); } else { - MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) ); + MetaDataBase::clearPixmapKeys( formwindow ); } if ( radioPixmapInline->isChecked() ) { diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp index 2dc7bb9d..cff5fd2f 100644 --- a/kdevdesigner/designer/formwindow.cpp +++ b/kdevdesigner/designer/formwindow.cpp @@ -156,7 +156,7 @@ void FormWindow::init() setWFlags(getWFlags() & TQt::WStyle_Maximize); fake = qstrcmp( name(), "qt_fakewindow" ) == 0; - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + MetaDataBase::addEntry( this ); ff->setFormWindow( this ); iface = 0; proj = 0; @@ -200,7 +200,7 @@ void FormWindow::init() TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this ); setMainContainer( w ); - propertyWidget = TQT_TQOBJECT(w); + propertyWidget = w; targetContainer = 0; hadOwnPalette = FALSE; @@ -212,7 +212,7 @@ void FormWindow::init() void FormWindow::setMainWindow( MainWindow *w ) { mainwindow = w; - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + MetaDataBase::addEntry( this ); initSlots(); } @@ -236,7 +236,7 @@ FormWindow::~FormWindow() if ( MainWindow::self && MainWindow::self->objectHierarchy()->formWindow() == this ) MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 ); - MetaDataBase::clear( TQT_TQOBJECT(this) ); + MetaDataBase::clear( this ); if ( ff ) ff->setFormWindow( 0 ); delete iface; @@ -375,7 +375,7 @@ void FormWindow::insertWidget() pix.convertFromImage( SmallIcon( "designer_image.png" , KDevDesignerPartFactory::instance()).convertToImage() ); ( (TQLabel*)w )->setPixmap( pix ); } - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) ); if ( WidgetDatabase::isCustomWidget( id ) ) { TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> " "<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> " @@ -393,7 +393,7 @@ void FormWindow::insertWidget() } TQString s = w->name(); - unify( TQT_TQOBJECT(w), s, TRUE ); + unify( w, s, TRUE ); w->setName( s ); insertWidget( w ); TQRect r( currRect ); @@ -429,7 +429,7 @@ void FormWindow::insertWidget() const TQObjectList l = insertParent->childrenListObject(); TQObjectListIt it( l ); TQWidgetList lst; - if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) { for ( ; it.current(); ) { TQObject *o = it.current(); ++it; @@ -497,12 +497,12 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName ) return; if ( checkName ) { TQString s = w->name(); - unify( TQT_TQOBJECT(w), s, TRUE ); + unify( w, s, TRUE ); w->setName( s ); } - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); + MetaDataBase::addEntry( w ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) ); if ( WidgetDatabase::isCustomWidget( id ) ) { TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> " "<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> " @@ -526,7 +526,7 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName ) void FormWindow::removeWidget( TQWidget *w ) { - MetaDataBase::removeEntry( TQT_TQOBJECT(w) ); + MetaDataBase::removeEntry( w ); widgets()->take( w ); } @@ -535,9 +535,9 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w ) CHECK_MAINWINDOW; switch ( currTool ) { case POINTER_TOOL: { - if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget + if ( !isMainContainer( w ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget raiseChildSelections( w ); // raise selections and select widget - selectWidget( TQT_TQOBJECT(w) ); + selectWidget( w ); // if widget is laid out, find the first non-laid out super-widget TQWidget *realWidget = w; // but store the original one while ( w->parentWidget() && @@ -576,7 +576,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) switch ( currTool ) { case POINTER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget + if ( !isMainContainer( w ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget // if the clicked widget is not in a layout, raise it if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) w->raise(); @@ -587,7 +587,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) break; } - bool sel = isWidgetSelected( TQT_TQOBJECT(w) ); + bool sel = isWidgetSelected( w ); if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed... if ( !sel ) { // ...and widget no selectted: unselect all clearSelection( FALSE ); @@ -600,7 +600,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) if ( !o->isWidgetType() ) continue; if ( insertedWidgets.find( (TQWidget*)o ) ) - selectWidget( TQT_TQOBJECT(o), FALSE ); + selectWidget( o, FALSE ); } setPropertyShowingBlocked( FALSE ); delete l; @@ -610,12 +610,12 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) } if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) && sel && e->button() == TQt::LeftButton ) { // control pressed and selected, unselect widget - selectWidget( TQT_TQOBJECT(w), FALSE ); + selectWidget( w, FALSE ); break; } raiseChildSelections( w ); // raise selections and select widget - selectWidget( TQT_TQOBJECT(w) ); + selectWidget( w ); // if widget is laid out, find the first non-laid out super-widget while ( w->parentWidget() && @@ -629,7 +629,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) origPressPos = oldPressPos; checkedSelectionsForMove = FALSE; moving.clear(); - if ( w->parentWidget() && !isMainContainer( TQT_TQOBJECT(w->parentWidget()) ) && !isCentralWidget( TQT_TQOBJECT(w->parentWidget()) ) ) { + if ( w->parentWidget() && !isMainContainer( w->parentWidget() ) && !isCentralWidget( w->parentWidget() ) ) { targetContainer = w->parentWidget(); hadOwnPalette = w->parentWidget()->ownPalette(); restorePalette = w->parentWidget()->palette(); @@ -641,7 +641,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { clearSelection( FALSE ); TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); } @@ -667,13 +667,13 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) saveBackground(); startPos = mapFromGlobal( e->globalPos() ); currentPos = startPos; - startWidget = designerWidget( TQT_TQOBJECT(w) ); + startWidget = designerWidget( w ); endWidget = startWidget; beginUnclippedPainter( FALSE ); drawConnectionLine(); break; case ORDER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget + if ( !isMainContainer( w ) ) { // press on a child widget orderedWidgets.removeRef( w ); orderedWidgets.append( w ); for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { @@ -693,10 +693,10 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) default: // any insert widget tool if ( e->button() == TQt::LeftButton ) { insertParent = WidgetFactory::containerOfWidget( mainContainer() ); // default parent for new widget is the formwindow - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press was not on formwindow, check if we can find another parent + if ( !isMainContainer( w ) ) { // press was not on formwindow, check if we can find another parent TQWidget *wid = w; for (;;) { - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(wid) ) ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( wid ) ); if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) && !::tqt_cast<TQLayoutWidget*>(wid) && !::tqt_cast<TQSplitter*>(wid) ) { insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it @@ -719,7 +719,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) CHECK_MAINWINDOW; switch ( currTool ) { case ORDER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget + if ( !isMainContainer( w ) ) { // press on a child widget orderedWidgets.clear(); orderedWidgets.append( w ); for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { @@ -736,7 +736,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) updateOrderIndicators(); } default: - if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) && + if ( !WidgetFactory::isPassiveInteractor( w ) && ( isMainContainer( w ) || w == this ) ) mainWindow()->editSource(); break; @@ -799,9 +799,9 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected... - if ( !isWidgetSelected( TQT_TQOBJECT(w) ) ) { // and unselect others. Only siblings can be moved at the same time + if ( !isWidgetSelected( w ) ) { // and unselect others. Only siblings can be moved at the same time setPropertyShowingBlocked( TRUE ); - selectWidget( TQT_TQOBJECT(w) ); + selectWidget( w ); setPropertyShowingBlocked( FALSE ); } checkSelectionsForMove( w ); @@ -810,7 +810,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) // check whether we would have to reparent the selection and highlight the possible new parent container TQMapConstIterator<TQWidget*, TQPoint> it = moving.begin(); TQWidget* wa = containerAt( e->globalPos(), it.key() ); - if ( wa && !isMainContainer( TQT_TQOBJECT(wa) ) && !isCentralWidget( TQT_TQOBJECT(wa) ) ) { + if ( wa && !isMainContainer( wa ) && !isCentralWidget( wa ) ) { wa = WidgetFactory::containerOfWidget( wa ); // ok, looks like we moved onto a container @@ -862,14 +862,14 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) restoreConnectionLine(); wid = tqApp->widgetAt( e->globalPos(), TRUE ); if ( wid ) - wid = designerWidget( TQT_TQOBJECT(wid) ); - if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) + wid = designerWidget( wid ); + if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) newendWidget = wid; if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) ) newendWidget = (TQWidget*)endWidget; drawRecRect = newendWidget != endWidget; if ( newendWidget && - ( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) + ( isMainContainer( newendWidget ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( newendWidget ) ) endWidget = newendWidget; mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).arg( startWidget->name() ). arg( endWidget->name() ) ); @@ -886,7 +886,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) restoreConnectionLine(); wid = tqApp->widgetAt( e->globalPos(), TRUE ); if ( wid ) - wid = designerWidget( TQT_TQOBJECT(wid) ); + wid = designerWidget( wid ); if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) ) newendWidget = wid; else @@ -896,7 +896,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) drawRecRect = newendWidget != endWidget; if ( !newendWidget ) endWidget = newendWidget; - else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) + else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( newendWidget ) ) endWidget = newendWidget; if ( endWidget ) mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).arg( startWidget->name() ). @@ -981,7 +981,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqt_cast<TQButtonGroup*>(wa) ) emitSelChanged = TRUE; if ( !::tqt_cast<TQButtonGroup*>(wa) ) { - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(i), "buttonGroupId", FALSE ); + MetaDataBase::setPropertyChanged( i, "buttonGroupId", FALSE ); if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) ) ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); } @@ -990,12 +990,12 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) i->reparent( wa, pos, TRUE ); raiseSelection( i ); raiseChildSelections( i ); - widgetChanged( TQT_TQOBJECT(i) ); + widgetChanged( i ); mainWindow()->objectHierarchy()->widgetRemoved( i ); mainWindow()->objectHierarchy()->widgetInserted( i ); } if ( emitSelChanged ) { - emit showProperties( TQT_TQOBJECT(wa) ); + emit showProperties( wa ); emit showProperties( propertyWidget ); } newParent = wa; @@ -1045,13 +1045,13 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) if ( oldBuddy.isNull() ) oldBuddy = ""; SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ), - this, TQT_TQOBJECT(startWidget), mainWindow()->propertyeditor(), + this, startWidget, mainWindow()->propertyeditor(), "buddy", startWidget->property( "buddy" ), endWidget->name(), endWidget->name(), oldBuddy ); commandHistory()->addCommand( cmd, TRUE ); cmd->execute(); - emitUpdateProperties( TQT_TQOBJECT(startWidget) ); + emitUpdateProperties( startWidget ); } } if ( !toolFixed ) @@ -1163,7 +1163,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w ) TQObjectList *l = queryList( "TQWidget" ); if ( !l ) return; - if ( l->find( TQT_TQOBJECT(w) ) != -1 ) + if ( l->find( w ) != -1 ) e->accept(); delete l; } @@ -1185,9 +1185,9 @@ void FormWindow::selectWidget( TQObject *o, bool select ) TQWidget *w = (TQWidget*)o; - if ( isMainContainer( TQT_TQOBJECT(w) ) ) { + if ( isMainContainer( w ) ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); emitShowProperties( propertyWidget ); @@ -1196,7 +1196,7 @@ void FormWindow::selectWidget( TQObject *o, bool select ) if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); emitShowProperties( propertyWidget ); @@ -1208,7 +1208,7 @@ void FormWindow::selectWidget( TQObject *o, bool select ) if ( select ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(w); + propertyWidget = w; if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); if ( !isPropertyShowingBlocked() ) @@ -1238,9 +1238,9 @@ void FormWindow::selectWidget( TQObject *o, bool select ) s->setWidget( 0 ); TQObject *opw = propertyWidget; if ( !usedSelections.isEmpty() ) - propertyWidget = TQT_TQOBJECT(TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget()); + propertyWidget = TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget(); else - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); if ( !isPropertyShowingBlocked() ) @@ -1260,7 +1260,7 @@ void FormWindow::updateSelection( TQWidget *w ) { WidgetSelection *s = usedSelections.find( w ); if ( !w->isVisibleTo( this ) ) - selectWidget( TQT_TQOBJECT(w), FALSE ); + selectWidget( w, FALSE ); else if ( s ) s->updateGeometry(); } @@ -1288,7 +1288,7 @@ void FormWindow::clearSelection( bool changePropertyDisplay ) usedSelections.clear(); if ( changePropertyDisplay ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); emitShowProperties( propertyWidget ); @@ -1374,7 +1374,7 @@ void FormWindow::selectWidgets() p = mapFromGlobal( p ); TQRect r( p, ( (TQWidget*)o )->size() ); if ( r.intersects( currRect ) && !r.contains( currRect ) ) - selectWidget( TQT_TQOBJECT(o) ); + selectWidget( o ); } } delete l; @@ -1428,7 +1428,7 @@ void FormWindow::raiseChildSelections( TQWidget *w ) TQPtrDictIterator<WidgetSelection> it( usedSelections ); for ( ; it.current(); ++it ) { - if ( l->findRef( TQT_TQOBJECT(it.current()->widget()) ) != -1 ) + if ( l->findRef( it.current()->widget() ) != -1 ) it.current()->show(); } delete l; @@ -1460,7 +1460,7 @@ void FormWindow::checkSelectionsForMove( TQWidget *w ) if ( it.current()->widget() == mainContainer() ) continue; ++it; - if ( l->find( TQT_TQOBJECT(sel->widget()) ) == -1 ) { + if ( l->find( sel->widget() ) == -1 ) { if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) sel->setWidget( 0 ); } else { @@ -1483,7 +1483,7 @@ void FormWindow::deleteWidgets() TQPtrDictIterator<WidgetSelection> it( usedSelections ); for ( ; it.current(); ++it ) { TQWidget *tb = 0; - if ( !( tb = mainWindow()->isAToolBarChild( TQT_TQOBJECT(it.current()->widget()) ) ) ) + if ( !( tb = mainWindow()->isAToolBarChild( it.current()->widget() ) ) ) widgets.append( it.current()->widget() ); else ( (QDesignerToolBar*)tb )->removeWidget( it.current()->widget() ); @@ -1591,7 +1591,7 @@ void FormWindow::focusOutEvent( TQFocusEvent * ) { if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); } @@ -1632,7 +1632,7 @@ TQWidget *FormWindow::designerWidget( TQObject *o ) const if ( !o || !o->isWidgetType() ) return 0; TQWidget *w = (TQWidget*)o; - while ( w && !isMainContainer( TQT_TQOBJECT(w) ) && !insertedWidgets[ (void*)w ] || isCentralWidget( TQT_TQOBJECT(w) ) ) + while ( w && !isMainContainer( w ) && !insertedWidgets[ (void*)w ] || isCentralWidget( w ) ) w = (TQWidget*)w->parent(); return w; } @@ -1735,7 +1735,7 @@ void FormWindow::currentToolChanged() switch ( currTool ) { case POINTER_TOOL: if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + emitShowProperties( mainContainer() ); restoreCursors( this, this ); break; case ORDER_TOOL: @@ -1744,7 +1744,7 @@ void FormWindow::currentToolChanged() orderedWidgets.clear(); showOrderIndicators(); if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + emitShowProperties( mainContainer() ); setCursorToAll( ArrowCursor, this ); } break; @@ -1756,13 +1756,13 @@ void FormWindow::currentToolChanged() mainWindow()->statusMessage( i18n( "Drag a line to set a buddy...") ); setCursorToAll( CrossCursor, this ); if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + emitShowProperties( mainContainer() ); break; default: mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).arg( WidgetDatabase::toolTip( currTool ).lower() ) ); setCursorToAll( CrossCursor, this ); if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + emitShowProperties( mainContainer() ); break; } } @@ -1824,7 +1824,7 @@ bool FormWindow::checkCustomWidgets() TQPtrDictIterator<TQWidget> it( insertedWidgets ); for ( ; it.current(); ++it ) { if ( it.current()->isA( "CustomWidget" ) ) { - TQString className = WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ); + TQString className = WidgetFactory::classNameOf( it.current() ); if ( !MetaDataBase::hasCustomWidget( className ) ) missingCustomWidgets << className; } @@ -1941,7 +1941,7 @@ void FormWindow::checkAccels() case 0: // select clearSelection( FALSE ); for ( wid = (*it).first(); wid; wid = (*it).next() ) - selectWidget( TQT_TQOBJECT(wid), TRUE ); + selectWidget( wid, TRUE ); return; case 1: // cancel return; @@ -1983,7 +1983,7 @@ void FormWindow::selectAll() for ( TQObject *o = l->first(); o; o = l->next() ) { if ( ( (TQWidget*)o )->isVisibleTo( this ) && insertedWidgets[ (void*)o ] ) { - selectWidget( TQT_TQOBJECT(o) ); + selectWidget( o ); } } delete l; @@ -2126,7 +2126,7 @@ void FormWindow::breakLayout( TQWidget *w ) if ( !w || w == this ) break; if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout && - WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) { Command *cmd = breakLayoutCommand( w ); if ( cmd ) commands.insert( 0, cmd ); @@ -2155,7 +2155,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w ) TQWidgetList widgets; for ( TQObject *o = l.first(); o; o = l.next() ) { if ( o->isWidgetType() && - !mainWindow()->isAToolBarChild( TQT_TQOBJECT(o) ) && + !mainWindow()->isAToolBarChild( o ) && ( (TQWidget*)o )->isVisibleTo( this ) && insertedWidgets.find( (TQWidget*)o ) ) widgets.append( (TQWidget*)o ); @@ -2204,7 +2204,7 @@ bool FormWindow::allowMove( TQWidget *w ) { w = w->parentWidget(); while ( w ) { - if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) + if ( ( isMainContainer( w ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) return TRUE; w = w->parentWidget(); } @@ -2221,7 +2221,7 @@ void FormWindow::editConnections() ConnectionDialog dlg( mainwindow ); mainWindow()->statusMessage( i18n( "Edit connections...") ); - dlg.addConnection( TQT_TQOBJECT(startWidget), TQT_TQOBJECT(endWidget), TQString(), TQString() ); + dlg.addConnection( startWidget, endWidget, TQString(), TQString() ); TQTimer::singleShot( 0, &dlg, TQT_SLOT(ensureConnectionVisible()) ); dlg.exec(); } @@ -2435,7 +2435,7 @@ bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w ) TQPtrDictIterator<TQWidget> it( insertedWidgets ); for ( ; it.current(); ++it ) { if ( it.current()->isA( "CustomWidget" ) ) { - if ( qstrcmp( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ), w->className.utf8() ) == 0 ) + if ( qstrcmp( WidgetFactory::classNameOf( it.current() ), w->className.utf8() ) == 0 ) return TRUE; } } @@ -2473,7 +2473,7 @@ bool FormWindow::isDatabaseAware() const void FormWindow::visibilityChanged() { if ( currTool != ORDER_TOOL ) { - emitUpdateProperties( TQT_TQOBJECT(currentWidget()) ); + emitUpdateProperties( currentWidget() ); } else { updateOrderIndicators(); repositionOrderIndicators(); @@ -2491,7 +2491,7 @@ TQPoint FormWindow::mapToForm( const TQWidget* w, const TQPoint& pos ) const { TQPoint p = pos; const TQWidget* i = w; - while ( i && !i->isTopLevel() && !isMainContainer( TQT_TQOBJECT(const_cast<TQWidget*>(i)) ) ) { + while ( i && !i->isTopLevel() && !isMainContainer( const_cast<TQWidget*>(i) ) ) { p = i->mapToParent( p ); i = i->parentWidget(); } @@ -2538,7 +2538,7 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) continue; if ( selected.find( it.current() ) != -1 ) continue; - if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ) ) ) && + if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( it.current() ) ) ) && it.current() != mainContainer() ) continue; @@ -2553,8 +2553,8 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) int wd = widgetDepth( it.current() ); if ( wd == depth && container ) { - if ( ( it.current()->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(it.current()) ) > - ( container->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(container) ) ) + if ( ( it.current()->parentWidget()->childrenListObject() ).find( it.current() ) > + ( container->parentWidget()->childrenListObject() ).find( container ) ) wd++; } if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) { @@ -2586,24 +2586,24 @@ void FormWindow::setMainContainer( TQWidget *w ) l->addWidget( w ); if ( resetPropertyWidget ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mContainer); + propertyWidget = mContainer; if ( opw && opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); } if ( project() ) { LanguageInterface *iface = MetaDataBase::languageInterface( project()->language() ); if ( iface && !project()->isCpp() && !isFake() ) { - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "init()" ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(this), "init()", "", "private", "function", + if ( !MetaDataBase::hasFunction( this, "init()" ) ) + MetaDataBase::addFunction( this, "init()", "", "private", "function", project()->language(), "void" ); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "destroy()" ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(this), "destroy()", "", "private", "function", + if ( !MetaDataBase::hasFunction( this, "destroy()" ) ) + MetaDataBase::addFunction( this, "destroy()", "", "private", "function", project()->language(), "void" ); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ) ) - MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", TQT_TQOBJECT(mainContainer()), "destroy" ) ) - MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", - TQT_TQOBJECT(mainContainer()), "destroy" ); + if ( !MetaDataBase::hasConnection( this, mainContainer(), "shown()", mainContainer(), "init" ) ) + MetaDataBase::addConnection( this, mainContainer(), "shown()", mainContainer(), "init" ); + if ( !MetaDataBase::hasConnection( this, mainContainer(), "destroyed()", mainContainer(), "destroy" ) ) + MetaDataBase::addConnection( this, mainContainer(), "destroyed()", + mainContainer(), "destroy" ); } } } diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp index 11531834..f5193421 100644 --- a/kdevdesigner/designer/hierarchyview.cpp +++ b/kdevdesigner/designer/hierarchyview.cpp @@ -252,7 +252,7 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) if ( formWindow == o ) { if ( deselect ) formWindow->clearSelection( FALSE ); - formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) ); + formWindow->emitShowProperties( formWindow ); return 0; } if ( o->isWidgetType() ) { @@ -261,20 +261,20 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) if ( ::tqt_cast<TQWidgetStack*>(w->parent()) ) { if (::tqt_cast<TQTabWidget*>(w->parent()->parent()) ) { ((TQTabWidget*)w->parent()->parent())->showPage( w ); - o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); - formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); + o = (TQWidget*)w->parent()->parent(); + formWindow->emitUpdateProperties( formWindow->currentWidget() ); } else if ( ::tqt_cast<TQWizard*>(w->parent()->parent()) ) { ((QDesignerWizard*)w->parent()->parent())-> setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); - o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); - formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); + o = (TQWidget*)w->parent()->parent(); + formWindow->emitUpdateProperties( formWindow->currentWidget() ); } else { ( (TQWidgetStack*)w->parent() )->raiseWidget( w ); if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) ) ( (QDesignerWidgetStack*)w->parent() )->updateButtons(); } } else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQDockWindow*>(w) ) { - formWindow->setActiveObject( TQT_TQOBJECT(w) ); + formWindow->setActiveObject( w ); } else if ( ::tqt_cast<TQPopupMenu*>(w) ) { return 0; // ### we could try to find our menu bar and change the currentMenu to our index } else { @@ -303,7 +303,7 @@ void HierarchyList::objectDoubleClicked( TQListViewItem *i ) if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) w->raise(); - formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); + formWindow->selectWidget( w, TRUE ); } } @@ -314,7 +314,7 @@ void HierarchyList::objectClicked( TQListViewItem *i ) return; if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { TQWidget *w = (TQWidget*)o; - formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); + formWindow->selectWidget( w, TRUE ); } } @@ -388,7 +388,7 @@ void HierarchyList::setup() if ( !widgetStacks ) widgetStacks = new TQPtrList<TQWidgetStack>; if ( w ) - insertObject( TQT_TQOBJECT(w), 0 ); + insertObject( w, 0 ); widgetStacks->clear(); } @@ -403,7 +403,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) return; bool fakeMainWindow = FALSE; if ( ::tqt_cast<TQMainWindow*>(o) ) { - TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + TQObject *cw = ( (TQMainWindow*)o )->centralWidget(); if ( cw ) { o = cw; fakeMainWindow = TRUE; @@ -510,7 +510,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) continue; TQToolBox *tb = (TQToolBox*)it.current()->parent(); for ( int i = tb->count() - 1; i >= 0; --i ) - insertObject( TQT_TQOBJECT(tb->item( i )), item ); + insertObject( tb->item( i ), item ); } continue; } @@ -544,7 +544,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( da->supportsMenu() ) insertObject( da, item ); else - insertObject( TQT_TQOBJECT(da->widget()), item ); + insertObject( da->widget(), item ); } else if ( ::tqt_cast<QDesignerActionGroup*>(a) ) { insertObject( a, item ); } @@ -558,7 +558,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( da->supportsMenu() ) insertObject( da, item ); else - insertObject( TQT_TQOBJECT(da->widget()), item ); + insertObject( da->widget(), item ); } else if ( ::tqt_cast<QDesignerActionGroup*>(obj) ) { insertObject( obj, item ); } @@ -569,7 +569,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) MenuBarEditorItem *md = mb->item( i ); if ( !md || !md->menu() ) continue; - insertObject( TQT_TQOBJECT(md->menu()), item ); + insertObject( md->menu(), item ); } } } @@ -762,7 +762,7 @@ void FormDefinitionView::setupVariables() itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, i18n( "public" ), TQString(), TQString() ); - TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( formWindow ); TQValueList<MetaDataBase::Variable>::Iterator it = --( varList.end() ); if ( !varList.isEmpty() && itemVar ) { for (;;) { @@ -852,7 +852,7 @@ void FormDefinitionView::refresh() itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, i18n( "public" ), TQString(), TQString() ); - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow ); TQValueList<MetaDataBase::Function>::Iterator it = --( functionList.end() ); if ( !functionList.isEmpty() && itemFunct ) { for (;;) { @@ -1197,7 +1197,7 @@ void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i ) varName = varName.simplifyWhiteSpace(); if ( varName[(int)varName.length() - 1] != ';' ) varName += ";"; - if ( MetaDataBase::hasVariable( TQT_TQOBJECT(formWindow), varName ) ) { + if ( MetaDataBase::hasVariable( formWindow, varName ) ) { TQMessageBox::information( this, i18n( "Edit Variables" ), i18n( "This variable has already been declared." ) ); } else { @@ -1268,7 +1268,7 @@ HierarchyView::HierarchyView( TQWidget *parent ) ClassBrowser cb( ciface->createClassBrowser( this ), ciface ); addTab( cb.lv, i18n( "Class Declarations" ) ); setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) ); - ciface->onClick( TQT_TQOBJECT(this), TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) ); + ciface->onClick( this, TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) ); classBrowsers->insert( *it, cb ); setTabEnabled( cb.lv, FALSE ); } @@ -1307,7 +1307,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o ) if ( fw == formwindow ) { if ( fw ) { if ( !fake ) - listview->setCurrent( TQT_TQOBJECT(o) ); + listview->setCurrent( o ); else listview->clear(); if ( MainWindow::self->qWorkspace()->activeWindow() == fw ) @@ -1330,7 +1330,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o ) fView->setFormWindow( fw ); if ( !fake ) { listview->setup(); - listview->setCurrent( TQT_TQOBJECT(o) ); + listview->setCurrent( o ); } fView->setup(); @@ -1367,8 +1367,8 @@ void HierarchyView::showClassesTimeout() if ( !se->object() ) return; if ( se->formWindow() && se->formWindow()->project()->isCpp() ) { - setFormWindow( se->formWindow(), TQT_TQOBJECT(se->formWindow()->currentWidget()) ); - MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(se->formWindow()->currentWidget()), + setFormWindow( se->formWindow(), se->formWindow()->currentWidget() ); + MainWindow::self->propertyeditor()->setWidget( se->formWindow()->currentWidget(), se->formWindow() ); return; } @@ -1447,7 +1447,7 @@ void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & ) TQWidget *w2 = w; if ( ::tqt_cast<TQMainWindow*>(w) ) w2 = ( (TQMainWindow*)w )->centralWidget(); - listview->changeNameOf( TQT_TQOBJECT(w2), w->name() ); + listview->changeNameOf( w2, w->name() ); } @@ -1455,7 +1455,7 @@ void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& in { #ifndef TQT_NO_SQL TQString i = info.join( "." ); - listview->changeDatabaseOf( TQT_TQOBJECT(w), i ); + listview->changeDatabaseOf( w, i ); #endif } diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp index 4aae7be6..62684a76 100644 --- a/kdevdesigner/designer/layout.cpp +++ b/kdevdesigner/designer/layout.cpp @@ -124,7 +124,7 @@ void Layout::setup() // we leave here. if ( !lastList || ( lastList->count() < 2 && ( !layoutBase || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) && layoutBase != formWindow->mainContainer() ) ) ) ) { widgets.clear(); @@ -195,7 +195,7 @@ void Layout::finishLayout( bool needMove, TQLayout *layout ) layoutBase->show(); layout->activate(); formWindow->insertWidget( layoutBase ); - formWindow->selectWidget( TQT_TQOBJECT(layoutBase) ); + formWindow->selectWidget( layoutBase ); TQString n = layoutBase->name(); if ( n.find( "qt_dead_widget_" ) != -1 ) { n.remove( 0, TQString( "qt_dead_widget_" ).length() ); @@ -214,7 +214,7 @@ void Layout::undoLayout() it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) ); it.key()->resize( ( *it ).size() ); } - formWindow->selectWidget( TQT_TQOBJECT(layoutBase), FALSE ); + formWindow->selectWidget( layoutBase, FALSE ); WidgetFactory::deleteLayout( layoutBase ); if ( parent != layoutBase && !::tqt_cast<TQMainWindow*>(layoutBase) ) { layoutBase->hide(); @@ -225,9 +225,9 @@ void Layout::undoLayout() layoutBase->setGeometry( oldGeometry ); } if ( widgets.first() ) - formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); + formWindow->selectWidget( widgets.first() ); else - formWindow->selectWidget( TQT_TQOBJECT(formWindow) ); + formWindow->selectWidget( formWindow ); } void Layout::breakLayout() @@ -241,7 +241,7 @@ void Layout::breakLayout() WidgetFactory::deleteLayout( layoutBase ); bool needReparent = qstrcmp( layoutBase->className(), "TQLayoutWidget" ) == 0 || qstrcmp( layoutBase->className(), "TQSplitter" ) == 0 || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) && layoutBase != formWindow->mainContainer() ); bool needResize = qstrcmp( layoutBase->className(), "TQSplitter" ) == 0; bool add = geometries.isEmpty(); @@ -267,9 +267,9 @@ void Layout::breakLayout() parent = layoutBase; } if ( widgets.first() && widgets.first()->isVisibleTo( formWindow ) ) - formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); + formWindow->selectWidget( widgets.first() ); else - formWindow->selectWidget( TQT_TQOBJECT(formWindow) ); + formWindow->selectWidget( formWindow ); } class HorizontalLayoutList : public TQWidgetList diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index af4c4b78..8bdc87a8 100644 --- a/kdevdesigner/designer/mainwindow.cpp +++ b/kdevdesigner/designer/mainwindow.cpp @@ -271,7 +271,7 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); actionEditor->parentWidget()->hide(); - assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) ); + assistant = new TQAssistantClient( assistantPath(), this ); statusBar()->setSizeGripEnabled( TRUE ); set_splash_status( "Initialization Done." ); @@ -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; @@ -724,7 +724,7 @@ void MainWindow::previewForm( const TQString & style ) if ( !w ) return; - w->insertChild( TQT_TQOBJECT(st) ); + w->insertChild( st ); w->show(); } @@ -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 ); @@ -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) && @@ -1129,8 +1129,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ::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: @@ -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 ] ); } } @@ -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() ) { @@ -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 ) ); @@ -1733,21 +1733,21 @@ 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; @@ -1755,12 +1755,12 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid 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; @@ -1768,25 +1768,25 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid 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" ). @@ -1899,7 +1899,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); if ( iface ) { bool ok = FALSE; - TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + 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() ); } } @@ -2052,7 +2052,7 @@ 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 ); @@ -2062,7 +2062,7 @@ void MainWindow::selectionChanged() actionEditVLayout->setEnabled( FALSE ); actionEditGridLayout->setEnabled( FALSE ); if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); breakLayout = TRUE; } else { actionEditBreakLayout->setEnabled( FALSE ); @@ -2082,14 +2082,14 @@ void MainWindow::selectionChanged() layoutChilds = TRUE; } if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); breakLayout = TRUE; } } else { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); breakLayout = TRUE; } } @@ -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,14 +2581,14 @@ 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 = @@ -2604,9 +2604,9 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) 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; @@ -2636,21 +2636,21 @@ 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; } @@ -2660,17 +2660,17 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) 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; } - if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) + if ( !WidgetFactory::isPassiveInteractor( w ) ) editSource(); return TRUE; @@ -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; @@ -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() @@ -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(); } } @@ -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; diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp index 9733097e..96d0a4dc 100644 --- a/kdevdesigner/designer/mainwindowactions.cpp +++ b/kdevdesigner/designer/mainwindowactions.cpp @@ -124,104 +124,104 @@ static TQIconSet createIconSet( const TQString &name ) void MainWindow::setupEditActions() { - actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, TQT_TQOBJECT(this), 0 ); + actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, this, 0 ); actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) ); actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) ); - connect( actionEditUndo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editUndo() ) ); + connect( actionEditUndo, TQT_SIGNAL( activated() ), this, TQT_SLOT( editUndo() ) ); actionEditUndo->setEnabled( FALSE ); - actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, TQT_TQOBJECT(this), 0 ); + actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, this, 0 ); actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") ); actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) ); - connect( actionEditRedo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRedo() ) ); + connect( actionEditRedo, TQT_SIGNAL( activated() ), this, TQT_SLOT( editRedo() ) ); actionEditRedo->setEnabled( FALSE ); - actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, TQT_TQOBJECT(this), 0 ); + actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, this, 0 ); actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) ); actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) ); - connect( actionEditCut, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCut() ) ); + connect( actionEditCut, TQT_SIGNAL( activated() ), this, TQT_SLOT( editCut() ) ); actionEditCut->setEnabled( FALSE ); - actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, TQT_TQOBJECT(this), 0 ); + actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, this, 0 ); actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) ); actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) ); - connect( actionEditCopy, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCopy() ) ); + connect( actionEditCopy, TQT_SIGNAL( activated() ), this, TQT_SLOT( editCopy() ) ); actionEditCopy->setEnabled( FALSE ); - actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, TQT_TQOBJECT(this), 0 ); + actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, this, 0 ); actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) ); actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) ); - connect( actionEditPaste, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPaste() ) ); + connect( actionEditPaste, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPaste() ) ); actionEditPaste->setEnabled( FALSE ); - actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, TQT_TQOBJECT(this), 0 ); + actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, this, 0 ); actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) ); actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) ); - connect( actionEditDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); + connect( actionEditDelete, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDelete() ) ); actionEditDelete->setEnabled( FALSE ); #ifdef TQ_WS_MAC - TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, TQT_TQOBJECT(this), 0 ); - connect( macDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); + TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 ); + connect( macDelete, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDelete() ) ); #endif - actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, TQT_TQOBJECT(this), 0 ); + actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, this, 0 ); actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) ); actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) ); - connect( actionEditSelectAll, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ) ); + connect( actionEditSelectAll, TQT_SIGNAL( activated() ), this, TQT_SLOT( editSelectAll() ) ); actionEditSelectAll->setEnabled( TRUE ); - actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, this, 0 ); actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) ); actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) ); - connect( actionEditRaise, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRaise() ) ); + connect( actionEditRaise, TQT_SIGNAL( activated() ), this, TQT_SLOT( editRaise() ) ); actionEditRaise->setEnabled( FALSE ); - actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, this, 0 ); actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) ); actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) ); - connect( actionEditLower, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLower() ) ); + connect( actionEditLower, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLower() ) ); actionEditLower->setEnabled( FALSE ); actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(), - i18n( "Chec&k Accelerators" ), ALT + Key_R, TQT_TQOBJECT(this), 0 ); + i18n( "Chec&k Accelerators" ), ALT + Key_R, this, 0 ); actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") ); actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) ); - connect( actionEditAccels, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAccels() ) ); + connect( actionEditAccels, TQT_SIGNAL( activated() ), this, TQT_SLOT( editAccels() ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"), - i18n( "S&lots..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "S&lots..." ), 0, this, 0 ); actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") ); actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) ); - connect( actionEditFunctions, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFunctions() ) ); + connect( actionEditFunctions, TQT_SIGNAL( activated() ), this, TQT_SLOT( editFunctions() ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"), - i18n( "Co&nnections..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Co&nnections..." ), 0, this, 0 ); actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") ); actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) ); - connect( actionEditConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editConnections() ) ); + connect( actionEditConnections, TQT_SIGNAL( activated() ), this, TQT_SLOT( editConnections() ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(), - i18n( "&Source..." ), CTRL + Key_E, TQT_TQOBJECT(this), 0 ); + i18n( "&Source..." ), CTRL + Key_E, this, 0 ); actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") ); actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) ); - connect( actionEditSource, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSource() ) ); + connect( actionEditSource, TQT_SIGNAL( activated() ), this, TQT_SLOT( editSource() ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(), - i18n( "&Form Settings..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Form Settings..." ), 0, this, 0 ); actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") ); actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) ); - connect( actionEditFormSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFormSettings() ) ); + connect( actionEditFormSettings, TQT_SIGNAL( activated() ), this, TQT_SLOT( editFormSettings() ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(), - i18n( "Preferences..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Preferences..." ), 0, this, 0 ); actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") ); actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) ); - connect( actionEditPreferences, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPreferences() ) ); + connect( actionEditPreferences, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPreferences() ) ); /* TQToolBar *tb = new TQToolBar( this, "Edit" ); tb->setCloseMode( TQDockWindow::Undocked ); @@ -240,7 +240,7 @@ void MainWindow::setupEditActions() #endif TQPopupMenu *menu = new TQPopupMenu( this, "Edit" ); - connect( menu, TQT_SIGNAL( aboutToShow() ), TQT_TQOBJECT(this), TQT_SLOT( updateEditorUndoRedo() ) ); + connect( menu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( updateEditorUndoRedo() ) ); menubar->insertItem( i18n( "&Edit" ), menu ); actionEditUndo->addTo( menu ); actionEditRedo->addTo( menu ); @@ -269,26 +269,26 @@ void MainWindow::setupEditActions() void MainWindow::setupSearchActions() { actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ), - i18n( "&Find..." ), CTRL + Key_F, TQT_TQOBJECT(this), 0 ); - connect( actionSearchFind, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchFind() ) ); + i18n( "&Find..." ), CTRL + Key_F, this, 0 ); + connect( actionSearchFind, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchFind() ) ); actionSearchFind->setEnabled( FALSE ); actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) ); actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(), - i18n( "Find &Incremental" ), ALT + Key_I, TQT_TQOBJECT(this), 0 ); - connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchIncremetalFindMenu() ) ); + i18n( "Find &Incremental" ), ALT + Key_I, this, 0 ); + connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchIncremetalFindMenu() ) ); actionSearchIncremetal->setEnabled( FALSE ); actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) ); actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(), - i18n( "&Replace..." ), CTRL + Key_R, TQT_TQOBJECT(this), 0 ); - connect( actionSearchReplace, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchReplace() ) ); + i18n( "&Replace..." ), CTRL + Key_R, this, 0 ); + connect( actionSearchReplace, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchReplace() ) ); actionSearchReplace->setEnabled( FALSE ); actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) ); actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(), - i18n( "&Goto Line..." ), ALT + Key_G, TQT_TQOBJECT(this), 0 ); - connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchGotoLine() ) ); + i18n( "&Goto Line..." ), ALT + Key_G, this, 0 ); + connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), this, TQT_SLOT( searchGotoLine() ) ); actionSearchGotoLine->setEnabled( FALSE ); actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) ); @@ -320,56 +320,56 @@ void MainWindow::setupLayoutActions() if ( !actionGroupTools ) { actionGroupTools = new TQActionGroup( this ); actionGroupTools->setExclusive( TRUE ); - connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), TQT_TQOBJECT(this), TQT_SLOT( toolSelected(TQAction*) ) ); + connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), this, TQT_SLOT( toolSelected(TQAction*) ) ); } actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"), - i18n( "Adjust &Size" ), CTRL + Key_J, TQT_TQOBJECT(this), 0 ); + i18n( "Adjust &Size" ), CTRL + Key_J, this, 0 ); actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") ); actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) ); - connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAdjustSize() ) ); + connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), this, TQT_SLOT( editAdjustSize() ) ); actionEditAdjustSize->setEnabled( FALSE ); actionEditHLayout = new DesignerAction( i18n( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"), - i18n( "Lay Out &Horizontally" ), CTRL + Key_H, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out &Horizontally" ), CTRL + Key_H, this, 0 ); actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") ); actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally" ) ); - connect( actionEditHLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontal() ) ); + connect( actionEditHLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutHorizontal() ) ); actionEditHLayout->setEnabled( FALSE ); actionEditVLayout = new DesignerAction( i18n( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"), - i18n( "Lay Out &Vertically" ), CTRL + Key_L, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out &Vertically" ), CTRL + Key_L, this, 0 ); actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") ); actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically" ) ); - connect( actionEditVLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVertical() ) ); + connect( actionEditVLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutVertical() ) ); actionEditVLayout->setEnabled( FALSE ); actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"), - i18n( "Lay Out in a &Grid" ), CTRL + Key_G, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out in a &Grid" ), CTRL + Key_G, this, 0 ); actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") ); actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) ); - connect( actionEditGridLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutGrid() ) ); + connect( actionEditGridLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutGrid() ) ); actionEditGridLayout->setEnabled( FALSE ); actionEditSplitHorizontal = new DesignerAction( i18n( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"), - i18n( "Lay Out Horizontally (in S&plitter)" ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out Horizontally (in S&plitter)" ), 0, this, 0 ); actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") ); actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally (in Splitter)" ) ); - connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontalSplit() ) ); + connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutHorizontalSplit() ) ); actionEditSplitHorizontal->setEnabled( FALSE ); actionEditSplitVertical = new DesignerAction( i18n( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"), - i18n( "Lay Out Vertically (in Sp&litter)" ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out Vertically (in Sp&litter)" ), 0, this, 0 ); actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") ); actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically (in Splitter)" ) ); - connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVerticalSplit() ) ); + connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), this, TQT_SLOT( editLayoutVerticalSplit() ) ); actionEditSplitVertical->setEnabled( FALSE ); actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"), - i18n( "&Break Layout" ), CTRL + Key_B, TQT_TQOBJECT(this), 0 ); + i18n( "&Break Layout" ), CTRL + Key_B, this, 0 ); actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") ); actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) ); - connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editBreakLayout() ) ); + connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), this, TQT_SLOT( editBreakLayout() ) ); actionEditBreakLayout->setEnabled( FALSE ); int id = WidgetDatabase::idFromClassName( "Spacer" ); @@ -487,7 +487,7 @@ void MainWindow::setupToolActions() actionToolsCustomWidget = new DesignerAction( i18n("Custom Widgets"), createIconSet( "designer_customwidget.png" ), - i18n("Edit &Custom Widgets..."), 0, TQT_TQOBJECT(this), 0 ); + i18n("Edit &Custom Widgets..."), 0, this, 0 ); actionToolsCustomWidget->setStatusTip( i18n("Opens a dialog to add and change " "custom widgets") ); actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom" @@ -602,10 +602,10 @@ void MainWindow::setupToolActions() customWidgetToolBar2 = tb2; } - TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, TQT_TQOBJECT(this) ); + TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, this ); a->setStatusTip( i18n( "Opens a dialog to configure the common " "widgets page of the toolbox") ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( toolsConfigure() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( toolsConfigure() ) ); mmenu->insertSeparator(); a->addTo( mmenu ); resetTool(); @@ -625,7 +625,7 @@ void MainWindow::setupFileActions() DesignerAction *a = 0; if ( !singleProject ) { - DesignerAction *a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + DesignerAction *a = new DesignerAction( this, 0 ); a->setText( i18n( "New" ) ); a->setToolTip( i18n( "New dialog or file" ) ); a->setMenuText( i18n( "&New..." ) ); @@ -633,7 +633,7 @@ void MainWindow::setupFileActions() a->setAccel( CTRL + Key_N ); a->setStatusTip( i18n( "Creates a new project, form or source file." ) ); a->setWhatsThis( whatsThisFrom( "File|New" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNew() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNew() ) ); a->addTo( tb ); a->addTo( fileMenu ); actionNewFile = a; @@ -653,15 +653,15 @@ void MainWindow::setupFileActions() newForm->setIconSet( createIconSet("designer_form.png") ); newForm->setAccel( CTRL + Key_N ); newForm->setStatusTip( i18n( "Creates a new dialog." ) ); - connect( newForm, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewDialog() ) ); + connect( newForm, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNewDialog() ) ); - DesignerAction *newFile = new DesignerAction( TQT_TQOBJECT(a), 0 ); + DesignerAction *newFile = new DesignerAction( a, 0 ); newFile->setText( i18n( "New File" ) ); newFile->setMenuText( i18n( "&File..." ) ); newFile->setIconSet( createIconSet("designer_filenew.png") ); newFile->setAccel( ALT + Key_N ); newFile->setStatusTip( i18n( "Creates a new file." ) ); - connect( newFile, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewFile() ) ); + connect( newFile, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileNewFile() ) ); actionNewFile = newFile; a->addTo( tb ); @@ -670,14 +670,14 @@ void MainWindow::setupFileActions() fileMenu->insertSeparator(); } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); a->setText( i18n( "Open" ) ); a->setMenuText( i18n( "&Open..." ) ); a->setIconSet( createIconSet("designer_fileopen.png") ); a->setAccel( CTRL + Key_O ); a->setStatusTip( i18n( "Opens an existing project, form or source file ") ); a->setWhatsThis( whatsThisFrom( "File|Open" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileOpen() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileOpen() ) ); if ( !singleProject ) { a->addTo( tb ); a->addTo( fileMenu ); @@ -685,20 +685,20 @@ void MainWindow::setupFileActions() } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileClose = a; a->setText( i18n( "Close" ) ); a->setMenuText( i18n( "&Close" ) ); a->setStatusTip( i18n( "Closes the current project or document" ) ); a->setWhatsThis(whatsThisFrom( "File|Close" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileClose() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileClose() ) ); connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); if ( !singleProject ) { a->addTo( fileMenu ); fileMenu->insertSeparator(); } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileSave = a; a->setText( i18n( "Save" ) ); a->setMenuText( i18n( "&Save" ) ); @@ -706,41 +706,41 @@ void MainWindow::setupFileActions() a->setAccel( CTRL + Key_S ); a->setStatusTip( i18n( "Saves the current project or document" ) ); a->setWhatsThis(whatsThisFrom( "File|Save" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSave() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSave() ) ); connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); a->addTo( tb ); a->addTo( fileMenu ); - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileSaveAs = a; a->setText( i18n( "Save As" ) ); a->setMenuText( i18n( "Save &As..." ) ); a->setStatusTip( i18n( "Saves the current form with a new filename" ) ); a->setWhatsThis( whatsThisFrom( "File|Save As" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAs() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSaveAs() ) ); connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); if ( !singleProject ) a->addTo( fileMenu ); - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileSaveAll = a; a->setText( i18n( "Save All" ) ); a->setMenuText( i18n( "Sa&ve All" ) ); a->setStatusTip( i18n( "Saves all open documents" ) ); a->setWhatsThis( whatsThisFrom( "File|Save All" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAll() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileSaveAll() ) ); connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); if ( !singleProject ) { a->addTo( fileMenu ); fileMenu->insertSeparator(); } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); a->setText( i18n( "Create Template" ) ); a->setMenuText( i18n( "Create &Template..." ) ); a->setStatusTip( i18n( "Creates a new template" ) ); a->setWhatsThis( whatsThisFrom( "File|Create Template" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileCreateTemplate() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileCreateTemplate() ) ); if ( !singleProject ) a->addTo( fileMenu ); @@ -767,7 +767,7 @@ void MainWindow::setupFileActions() if ( !singleProject ) fileMenu->insertSeparator(); - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileExit = a; if ( !singleProjectMode() ) { a->setText( i18n( "Exit" ) ); @@ -778,7 +778,7 @@ void MainWindow::setupFileActions() a->setText( i18n( "Close" ) ); a->setMenuText( i18n( "&Close" ) ); } - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileQuit() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( fileQuit() ) ); a->addTo( fileMenu ); } @@ -792,8 +792,8 @@ void MainWindow::setupProjectActions() ag->setMenuText( i18n( "Active Project" ) ); ag->setExclusive( TRUE ); ag->setUsesDropDown( TRUE ); - connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SLOT( projectSelected( TQAction * ) ) ); - connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SIGNAL( projectChanged() ) ); + connect( ag, TQT_SIGNAL( selected( TQAction * ) ), this, TQT_SLOT( projectSelected( TQAction * ) ) ); + connect( ag, TQT_SIGNAL( selected( TQAction * ) ), this, TQT_SIGNAL( projectChanged() ) ); DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, TRUE ); eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, TRUE ); projects.insert( a, eProject ); @@ -805,31 +805,31 @@ void MainWindow::setupProjectActions() if ( !singleProject ) projectMenu->insertSeparator(); - a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, this, 0 ); actionProjectAddFile = a; a->setStatusTip( i18n("Adds a file to the current project") ); a->setWhatsThis( whatsThisFrom( "Project|Add File" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( projectInsertFile() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( projectInsertFile() ) ); a->setEnabled( FALSE ); connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); if ( !singleProject ) a->addTo( projectMenu ); actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(), - i18n( "&Image Collection..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Image Collection..." ), 0, this, 0 ); actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") ); actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) ); - connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPixmapCollection() ) ); + connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), this, TQT_SLOT( editPixmapCollection() ) ); actionEditPixmapCollection->setEnabled( FALSE ); connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) ); actionEditPixmapCollection->addTo( projectMenu ); #ifndef TQT_NO_SQL actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(), - i18n( "&Database Connections..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Database Connections..." ), 0, this, 0 ); actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") ); actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) ); - connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDatabaseConnections() ) ); + connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), this, TQT_SLOT( editDatabaseConnections() ) ); //actionEditDatabaseConnections->setEnabled( FALSE ); //connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) ); if ( !singleProject ) @@ -837,10 +837,10 @@ void MainWindow::setupProjectActions() #endif actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(), - i18n( "&Project Settings..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Project Settings..." ), 0, this, 0 ); actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") ); actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) ); - connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editProjectSettings() ) ); + connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), this, TQT_SLOT( editProjectSettings() ) ); actionEditProjectSettings->setEnabled( FALSE ); connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) ); actionEditProjectSettings->addTo( projectMenu ); @@ -854,19 +854,19 @@ void MainWindow::setupPreviewActions() layoutMenu = menu; menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 ); - a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, this, 0 ); actionPreview = a; a->setAccel( CTRL + Key_T ); a->setStatusTip( i18n("Opens a preview") ); a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( previewForm() ) ); + connect( a, TQT_SIGNAL( activated() ), this, TQT_SLOT( previewForm() ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); a->addTo( menu ); menu->insertSeparator(); - TQSignalMapper *mapper = new TQSignalMapper( TQT_TQOBJECT(this) ); - connect( mapper, TQT_SIGNAL(mapped(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(previewForm(const TQString&)) ); + TQSignalMapper *mapper = new TQSignalMapper( this ); + connect( mapper, TQT_SIGNAL(mapped(const TQString&)), this, TQT_SLOT(previewForm(const TQString&)) ); TQStringList styles = TQStyleFactory::keys(); for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { TQString info; @@ -884,7 +884,7 @@ void MainWindow::setupPreviewActions() info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." ); a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(), - i18n( "... in %1 Style" ).arg( *it ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "... in %1 Style" ).arg( *it ), 0, this, 0 ); a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) ); a->setWhatsThis( i18n("<b>Open a preview in %1 style.</b>" "<p>Use the preview to test the design and " @@ -902,31 +902,31 @@ void MainWindow::setupWindowActions() if ( !windowActionsSetup ) { windowActionsSetup = TRUE; */ - actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, TQT_TQOBJECT(this) ); + actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, this ); actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") ); actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) ); connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) ); - actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, TQT_TQOBJECT(this) ); + actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, this ); actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") ); actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) ); connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) ); - actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, TQT_TQOBJECT(this) ); + actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, this ); actionWindowClose->setStatusTip( i18n( "Closes the active window") ); actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) ); connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) ); - actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, TQT_TQOBJECT(this) ); + actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, this ); actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") ); actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) ); connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) ); - actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, TQT_TQOBJECT(this) ); + actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, this ); actionWindowNext->setStatusTip( i18n( "Activates the next window" ) ); actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) ); connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) ); - actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(this) ); + actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, this ); actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) ); actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) ); connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) ); @@ -971,7 +971,7 @@ void MainWindow::setupWindowActions() else itemText += w->caption(); - int id = windowMenu->insertItem( itemText, TQT_TQOBJECT(this), TQT_SLOT( windowsMenuActivated( int ) ) ); + int id = windowMenu->insertItem( itemText, this, TQT_SLOT( windowsMenuActivated( int ) ) ); windowMenu->setItemParameter( id, i ); windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) ); } @@ -979,31 +979,31 @@ void MainWindow::setupWindowActions() void MainWindow::setupHelpActions() { - actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, TQT_TQOBJECT(this), 0 ); + actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, this, 0 ); actionHelpContents->setStatusTip( i18n("Opens the online help") ); actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) ); - connect( actionHelpContents, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpContents() ) ); + connect( actionHelpContents, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpContents() ) ); - actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, TQT_TQOBJECT(this), 0 ); + actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, this, 0 ); actionHelpManual->setStatusTip( i18n("Opens the TQt Designer manual") ); actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) ); - connect( actionHelpManual, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpManual() ) ); + connect( actionHelpManual, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpManual() ) ); - actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, TQT_TQOBJECT(this), 0 ); + actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, this, 0 ); actionHelpAbout->setStatusTip( i18n("Displays information about TQt Designer") ); actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) ); - connect( actionHelpAbout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAbout() ) ); + connect( actionHelpAbout, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpAbout() ) ); - actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, TQT_TQOBJECT(this), 0 ); + actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, this, 0 ); actionHelpAboutTQt->setStatusTip( i18n("Displays information about the TQt Toolkit") ); actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) ); - connect( actionHelpAboutTQt, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAboutTQt() ) ); + connect( actionHelpAboutTQt, TQT_SIGNAL( activated() ), this, TQT_SLOT( helpAboutTQt() ) ); actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ), - i18n("What's This?"), SHIFT + Key_F1, TQT_TQOBJECT(this), 0 ); + i18n("What's This?"), SHIFT + Key_F1, this, 0 ); actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") ); actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) ); - connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( whatsThis() ) ); + connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), this, TQT_SLOT( whatsThis() ) ); /* TQToolBar *tb = new TQToolBar( this, "Help" ); tb->setCloseMode( TQDockWindow::Undocked ); @@ -1044,13 +1044,13 @@ void MainWindow::fileNewDialog() currentProject->setModified( TRUE ); workspace()->update(); fw->setProject( currentProject ); - MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); + MetaDataBase::addEntry( fw ); TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() ); fw->setMainContainer( w ); fw->setCaption( n ); fw->resize( 600, 480 ); insertFormWindow( fw ); - fw->killAccels( TQT_TQOBJECT(fw) ); + fw->killAccels( fw ); fw->project()->setModified( TRUE ); fw->setFocus(); fw->setSavePixmapInProject( TRUE ); @@ -1542,7 +1542,7 @@ void MainWindow::editPaste() if ( l.count() == 1 ) { w = l.first(); if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) && + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) && w != formWindow()->mainContainer() ) ) w = formWindow()->mainContainer(); } @@ -1761,7 +1761,7 @@ SourceEditor *MainWindow::openSourceEditor() } if ( !editor ) -editor = createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang ); +editor = createSourceEditor( formWindow(), formWindow()->project(), lang ); return editor; } diff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp index 32fdcd62..2639639b 100644 --- a/kdevdesigner/designer/metadatabase.cpp +++ b/kdevdesigner/designer/metadatabase.cpp @@ -322,7 +322,7 @@ int MetaDataBase::spacing( TQObject *o ) return -1; setupDataBase(); if ( ::tqt_cast<TQMainWindow*>(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -353,7 +353,7 @@ void MetaDataBase::setMargin( TQObject *o, int margin ) TQWidget *widget = (TQWidget*)o; if ( widget && !::tqt_cast<TQLayoutWidget*>(widget) && - ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || + ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) || widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) isInnerLayout = FALSE; @@ -379,7 +379,7 @@ int MetaDataBase::margin( TQObject *o ) return -1; setupDataBase(); if ( ::tqt_cast<TQMainWindow*>(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -410,7 +410,7 @@ TQString MetaDataBase::resizeMode( TQObject *o ) return TQString(); setupDataBase(); if ( ::tqt_cast<TQMainWindow*>(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -514,8 +514,8 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte sender = formfile->project()->objectForFakeFormFile( formfile ); if ( !sender && senderName == "this" ) sender = formfile->formWindow() ? - TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : - TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )); + formfile->formWindow()->mainContainer() : + formfile->project()->objectForFakeFormFile( formfile ); if ( !sender ) continue; MetaDataBase::addConnection( formfile->formWindow() ? @@ -524,8 +524,8 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte sender, (*cit).signal.latin1(), formfile->formWindow() ? - TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : - TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )), + formfile->formWindow()->mainContainer() : + formfile->project()->objectForFakeFormFile( formfile ), (*cit).slot.latin1(), FALSE ); } @@ -680,7 +680,7 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom return TRUE; if ( ::tqt_cast<FormWindow*>(o) ) { - o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); + o = ( (FormWindow*)o )->mainContainer(); slotList = o->metaObject()->slotNames( TRUE ); if ( slotList.find( slot ) != -1 ) return TRUE; @@ -910,7 +910,7 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl return TRUE; if ( ::tqt_cast<FormWindow*>(o) ) { - o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); + o = ( (FormWindow*)o )->mainContainer(); functionList = o->metaObject()->slotNames( TRUE ); if ( functionList.find( function ) != -1 ) return TRUE; diff --git a/kdevdesigner/designer/multilineeditorimpl.cpp b/kdevdesigner/designer/multilineeditorimpl.cpp index d2b3d158..fc9a7560 100644 --- a/kdevdesigner/designer/multilineeditorimpl.cpp +++ b/kdevdesigner/designer/multilineeditorimpl.cpp @@ -286,13 +286,13 @@ void MultiLineEditor::applyClicked() SetPropertyCommand *propcmd; if ( doWrap ) propcmd = new SetPropertyCommand( pn, formwindow, - TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), - "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), + mlined, MainWindow::self->propertyeditor(), + "wordWrap", WidgetFactory::property( mlined, "wordWrap" ), TQVariant( 1 ), "WidgetWidth", oldWrapString ); else propcmd = new SetPropertyCommand( pn, formwindow, - TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), - "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), + mlined, MainWindow::self->propertyeditor(), + "wordWrap", WidgetFactory::property( mlined, "wordWrap" ), TQVariant( 0 ), "NoWrap", oldWrapString ); propcmd->execute(); diff --git a/kdevdesigner/designer/newformimpl.cpp b/kdevdesigner/designer/newformimpl.cpp index 738c8a55..73844f9d 100644 --- a/kdevdesigner/designer/newformimpl.cpp +++ b/kdevdesigner/designer/newformimpl.cpp @@ -77,7 +77,7 @@ void FormItem::insert( Project *pro ) FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro ); fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); fw->setProject( pro ); - MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); + MetaDataBase::addEntry( fw ); if ( fType == Widget ) { TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), fw, n.latin1() ); @@ -109,10 +109,10 @@ void FormItem::insert( Project *pro ) // the wizard might have changed a lot, lets update everything MainWindow::self->actioneditor()->setFormWindow( fw ); - MainWindow::self->objectHierarchy()->setFormWindow( fw, TQT_TQOBJECT(fw) ); + MainWindow::self->objectHierarchy()->setFormWindow( fw, fw ); MainWindow::self->objectHierarchy()->formDefinitionView()->refresh(); MainWindow::self->objectHierarchy()->rebuild(); - fw->killAccels( TQT_TQOBJECT(fw) ); + fw->killAccels( fw ); fw->project()->setModified( TRUE ); fw->setFocus(); if ( !pro->isDummy() ) { diff --git a/kdevdesigner/designer/pixmapchooser.cpp b/kdevdesigner/designer/pixmapchooser.cpp index 92d68ac1..851b519b 100644 --- a/kdevdesigner/designer/pixmapchooser.cpp +++ b/kdevdesigner/designer/pixmapchooser.cpp @@ -174,31 +174,31 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T TQPixmap pix( dlg.selectedURL().path() ); if ( fn ) *fn = dlg.selectedURL().path(); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dlg.selectedURL().path() ); + MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dlg.selectedURL().path() ); return pix; } } else if ( fw && fw->savePixmapInProject() ) { PixmapCollectionEditor dia( parent, 0, TRUE ); dia.setProject( fw->project() ); dia.setChooserMode( TRUE ); - dia.setCurrentItem( MetaDataBase::pixmapKey( TQT_TQOBJECT(fw), old.serialNumber() ) ); + dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) ); if ( dia.exec() == TQDialog::Accepted ) { TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) ); - MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), pix.serialNumber(), dia.viewPixmaps->currentItem()->text() ); + MetaDataBase::setPixmapKey( fw, pix.serialNumber(), dia.viewPixmaps->currentItem()->text() ); return pix; } } else { PixmapFunction dia( parent, 0, TRUE ); TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" ); - dia.editArguments->setText( MetaDataBase::pixmapArgument( TQT_TQOBJECT(fw), old.serialNumber() ) ); + dia.editArguments->setText( MetaDataBase::pixmapArgument( fw, old.serialNumber() ) ); dia.editArguments->setFocus(); if ( dia.exec() == TQDialog::Accepted ) { TQPixmap pix; // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that pix.convertFromImage( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ).convertToImage() ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() ); + MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dia.editArguments->text() ); return pix; } } @@ -211,7 +211,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T } ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name ) - : TQFileIconProvider( TQT_TQOBJECT(parent), name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) ) + : TQFileIconProvider( parent, name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) ) { fmts = TQImage::inputFormats(); } diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp index e33fa239..12530f1a 100644 --- a/kdevdesigner/designer/popupmenueditor.cpp +++ b/kdevdesigner/designer/popupmenueditor.cpp @@ -151,9 +151,9 @@ void PopupMenuEditorItem::init() if ( m && !isSeparator() ) { s = new PopupMenuEditor( m->formWindow(), m ); TQString n = "PopupMenuEditor"; - m->formWindow()->unify( TQT_TQOBJECT(s), n, TRUE ); + m->formWindow()->unify( s, n, TRUE ); s->setName( n ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); + MetaDataBase::addEntry( s ); } } } @@ -226,7 +226,7 @@ bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event ) return FALSE; if ( event->type() == TQEvent::ChildInserted ) { TQChildEvent * ce = ( TQChildEvent * ) event; - TQObject * c = TQT_TQOBJECT(ce->child()); + TQObject * c = ce->child(); TQAction * action = ::tqt_cast<TQAction*>( c ); if ( s->find( action ) != -1 ) // avoid duplicates return FALSE; diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp index 68fe21f1..8f7b1071 100644 --- a/kdevdesigner/designer/propertyeditor.cpp +++ b/kdevdesigner/designer/propertyeditor.cpp @@ -555,7 +555,7 @@ void PropertyItem::setFocus( TQWidget *w ) { if ( !tqApp->focusWidget() || listview->propertyEditor()->formWindow() && - ( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->focusWidget()) ) && + ( !MainWindow::self->isAFormWindowChild( tqApp->focusWidget() ) && !tqApp->focusWidget()->inherits( "Editor" ) ) ) w->setFocus(); } @@ -598,7 +598,7 @@ TQLineEdit *PropertyTextItem::lined() if ( asciiOnly ) { if ( PropertyItem::name() == "name" ) { - lin->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(lin), "ascii_validator" ) ); + lin->setValidator( new AsciiValidator( TQString(":"), lin, "ascii_validator" ) ); if ( listview->propertyEditor()->formWindow()->isFake() ) lin->setEnabled( FALSE ); } else { @@ -606,7 +606,7 @@ TQLineEdit *PropertyTextItem::lined() "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9" "\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3" "\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc" - "\xbd\xbe\xbf"), TQT_TQOBJECT(lin), "ascii_validator" ) ); + "\xbd\xbe\xbf"), lin, "ascii_validator" ) ); } } if ( !hasMultiLines ) { lin->hide(); @@ -781,7 +781,7 @@ TQLineEdit *PropertyDoubleItem::lined() if ( lin ) return lin; lin = new TQLineEdit( listview->viewport() ); - lin->setValidator( new TQDoubleValidator( TQT_TQOBJECT(lin), "double_validator" ) ); + lin->setValidator( new TQDoubleValidator( lin, "double_validator" ) ); connect( lin, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( setValue() ) ); @@ -2026,13 +2026,13 @@ void PropertyDatabaseItem::initChildren() else if ( lst.count() > 0 ) item->setValue( TQStringList( lst[ 0 ] ) ); else if ( withField ) - item->setValue( TQStringList( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), + item->setValue( TQStringList( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList()[ 0 ] ) ); if ( lst.count() > 0 && !lst[ 0 ].isEmpty() ) item->setCurrentItem( lst[ 0 ] ); else if ( !isChanged() && withField ) - item->setCurrentItem( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), + item->setCurrentItem( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList()[ 0 ] ); else item->setCurrentItem( 0 ); @@ -2044,7 +2044,7 @@ void PropertyDatabaseItem::initChildren() else if ( lst.count() > 1 ) item->setValue( TQStringList( lst[ 1 ] ) ); else if ( withField ) { - TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); + TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList(); if ( fakeLst.count() > 1 ) item->setValue( fakeLst[ 1 ] ); } @@ -2052,7 +2052,7 @@ void PropertyDatabaseItem::initChildren() if ( lst.count() > 1 && !lst[ 1 ].isEmpty() ) item->setCurrentItem( lst[ 1 ] ); else if ( !isChanged() && withField ) { - TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); + TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList(); if ( fakeLst.count() > 1 ) item->setCurrentItem( fakeLst[ 1 ] ); else @@ -3043,7 +3043,7 @@ void PropertyList::setupProperties() TQStringList valueSet; bool parentHasLayout = w->isWidgetType() && - !editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->parentWidget() && + !editor->formWindow()->isMainContainer( w ) && ( (TQWidget*)w )->parentWidget() && WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { const TQMetaProperty* p = @@ -3074,7 +3074,7 @@ void PropertyList::setupProperties() } unique.insert( TQString::fromLatin1( it.current() ), TRUE ); if ( editor->widget()->isWidgetType() && - editor->formWindow()->isMainContainer( TQT_TQOBJECT(editor->widget()) ) ) { + editor->formWindow()->isMainContainer( editor->widget() ) ) { if ( qstrcmp( p->name(), "geometry" ) == 0 ) continue; } else { // hide some toplevel-only stuff @@ -3712,11 +3712,11 @@ void PropertyList::setPropertyValue( PropertyItem *i ) else i->setValue( TQVariant( false ) ); } else if ( i->name() == "layoutSpacing" ) { - ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); + ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ) )); } else if ( i->name() == "layoutMargin" ) { - ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); + ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ) )); } else if ( i->name() == "resizeMode" ) { - ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) )) ); + ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ) ) ); } else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) { i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); } else if ( editor->widget()->inherits( "CustomWidget" ) ) { @@ -3966,7 +3966,7 @@ void EventList::setup() it.current(), TQString(), TQString() ); eventItem->setOpen( TRUE ); TQValueList<MetaDataBase::Connection> conns = - MetaDataBase::connections( TQT_TQOBJECT(formWindow), TQT_TQOBJECT(editor->widget()), TQT_TQOBJECT(formWindow->mainContainer()) ); + MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() ); HierarchyItem *item = 0; for ( TQValueList<MetaDataBase::Connection>::Iterator cit = conns.begin(); cit != conns.end(); ++cit ) { @@ -4042,7 +4042,7 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) } else if ( res == DEL_ITEM && i->parent() ) { MetaDataBase::Connection conn; conn.sender = editor->widget(); - conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); + conn.receiver = formWindow->mainContainer(); conn.signal = i->parent()->text( 0 ); conn.slot = i->text( 0 ); delete i; @@ -4076,7 +4076,7 @@ void EventList::renamed( TQListViewItem *i ) } else { MetaDataBase::Connection conn; conn.sender = editor->widget(); - conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); + conn.receiver = formWindow->mainContainer(); conn.signal = i->parent()->text( 0 ); conn.slot = i->text( 0 ); AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Connection" ), diff --git a/kdevdesigner/designer/propertyobject.cpp b/kdevdesigner/designer/propertyobject.cpp index 1bd1883f..70629f31 100644 --- a/kdevdesigner/designer/propertyobject.cpp +++ b/kdevdesigner/designer/propertyobject.cpp @@ -38,7 +38,7 @@ PropertyObject::PropertyObject( const TQWidgetList &objs ) v.resize( objects.count() ); v.setAutoDelete( TRUE ); - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { + for ( TQObject *o = objects.first(); o; o = objects.next() ) { const TQMetaObject *m = o->metaObject(); TQPtrList<TQMetaObject> *mol = new TQPtrList<TQMetaObject>; while ( m ) { @@ -74,7 +74,7 @@ PropertyObject::PropertyObject( const TQWidgetList &objs ) bool PropertyObject::setProperty( const char *name, const TQVariant& value ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) o->setProperty( name, value ); return TRUE; @@ -87,13 +87,13 @@ TQVariant PropertyObject::property( const char *name ) const void PropertyObject::mdPropertyChanged( const TQString &property, bool changed ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) MetaDataBase::setPropertyChanged( o, property, changed ); } bool PropertyObject::mdIsPropertyChanged( const TQString &property ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { + for ( TQObject *o = objects.first(); o; o = objects.next() ) { if ( MetaDataBase::isPropertyChanged( o, property ) ) return TRUE; } @@ -102,29 +102,29 @@ bool PropertyObject::mdIsPropertyChanged( const TQString &property ) void PropertyObject::mdSetPropertyComment( const TQString &property, const TQString &comment ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) MetaDataBase::setPropertyComment( o, property, comment ); } TQString PropertyObject::mdPropertyComment( const TQString &property ) { - return MetaDataBase::propertyComment( TQT_TQOBJECT(objects.first()), property ); + return MetaDataBase::propertyComment( objects.first(), property ); } void PropertyObject::mdSetFakeProperty( const TQString &property, const TQVariant &value ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) MetaDataBase::setFakeProperty( o, property, value ); } TQVariant PropertyObject::mdFakeProperty( const TQString &property ) { - return MetaDataBase::fakeProperty( TQT_TQOBJECT(objects.first()), property ); + return MetaDataBase::fakeProperty( objects.first(), property ); } void PropertyObject::mdSetCursor( const TQCursor &c ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { + for ( TQObject *o = objects.first(); o; o = objects.next() ) { if ( o->isWidgetType() ) MetaDataBase::setCursor( (TQWidget*)o, c ); } @@ -137,22 +137,22 @@ TQCursor PropertyObject::mdCursor() void PropertyObject::mdSetPixmapKey( int pixmap, const TQString &arg ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) MetaDataBase::setPixmapKey( o, pixmap, arg ); } TQString PropertyObject::mdPixmapKey( int pixmap ) { - return MetaDataBase::pixmapKey( TQT_TQOBJECT(objects.first()), pixmap ); + return MetaDataBase::pixmapKey( objects.first(), pixmap ); } void PropertyObject::mdSetExportMacro( const TQString ¯o ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) MetaDataBase::setExportMacro( o, macro ); } TQString PropertyObject::mdExportMacro() { - return MetaDataBase::exportMacro( TQT_TQOBJECT(objects.first()) ); + return MetaDataBase::exportMacro( objects.first() ); } diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp index d4099e34..18b00d30 100644 --- a/kdevdesigner/designer/resource.cpp +++ b/kdevdesigner/designer/resource.cpp @@ -347,7 +347,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) formwindow->setProject( MainWindow::self->currProject() ); if ( mainwindow ) formwindow->setMainWindow( mainwindow ); - MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) ); + MetaDataBase::addEntry( formwindow ); if ( !langIface ) { TQString lang = "TQt Script"; @@ -569,11 +569,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) function.returnType = "void"; function.type = "slot"; function.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, + if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) ) + MetaDataBase::addFunction( formwindow, function.function, function.specifier, function.access, "slot", function.language, function.returnType ); else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, + MetaDataBase::changeFunctionAttributes( formwindow, function.function, function.function, function.specifier, function.access, "slot", function.language, function.returnType ); @@ -597,12 +597,12 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) if ( function.returnType.isEmpty() ) function.returnType = "void"; function.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, + if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) ) + MetaDataBase::addFunction( formwindow, function.function, function.specifier, function.access, function.type, function.language, function.returnType ); else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, + MetaDataBase::changeFunctionAttributes( formwindow, function.function, function.function, function.specifier, function.access, function.type, function.language, function.returnType ); } @@ -623,13 +623,13 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) loadTabOrder( tabOrder ); if ( formwindow ) { - MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes ); - MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards ); - MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), metaVariables ); - MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals ); + MetaDataBase::setIncludes( formwindow, metaIncludes ); + MetaDataBase::setForwards( formwindow, metaForwards ); + MetaDataBase::setVariables( formwindow, metaVariables ); + MetaDataBase::setSignalList( formwindow, metaSignals ); metaInfo.classNameChanged = metaInfo.className != TQString( formwindow->name() ); - MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo ); - MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro ); + MetaDataBase::setMetaInfo( formwindow, metaInfo ); + MetaDataBase::setExportMacro( formwindow->mainContainer(), exportMacro ); } loadExtraSource( formwindow->formFile(), currFileName, langIface, hasFunctions ); @@ -638,7 +638,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) mainwindow->insertFormWindow( formwindow ); if ( formwindow ) { - formwindow->killAccels( TQT_TQOBJECT(formwindow) ); + formwindow->killAccels( formwindow ); if ( formwindow->layout() ) formwindow->layout()->activate(); if ( hadGeometry ) @@ -719,7 +719,7 @@ bool Resource::save( TQIODevice* dev ) ts << "<!DOCTYPE UI><UI version=\"3.3\" stdsetdef=\"1\">" << endl; saveMetaInfoBefore( ts, 0 ); - saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 ); + saveObject( formwindow->mainContainer(), 0, ts, 0 ); if ( ::tqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) { saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); @@ -730,8 +730,8 @@ bool Resource::save( TQIODevice* dev ) saveActions( formwindow->actionList(), ts, 0 ); if ( !images.isEmpty() ) saveImageCollection( ts, 0 ); - if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() || - !MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() ) + if ( !MetaDataBase::connections( formwindow ).isEmpty() || + !MetaDataBase::slotList( formwindow ).isEmpty() ) saveConnections( ts, 0 ); saveTabOrder( ts, 0 ); saveMetaInfoAfter( ts, 0 ); @@ -765,7 +765,7 @@ TQString Resource::copy() p = p->parentWidget(); } if ( save ) - saveObject( TQT_TQOBJECT(w), 0, ts, 0 ); + saveObject( w, 0, ts, 0 ); } if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) saveCustomWidgets( ts, 0 ); @@ -823,7 +823,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent ) y = TQMAX( 0, parent->height() - w->height() ); if ( x != w->x() || y != w->y() ) w->move( x, y ); - formwindow->selectWidget( TQT_TQOBJECT(w) ); + formwindow->selectWidget( w ); } else if ( firstWidget.tagName() == "spacer" ) { TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? TQt::Vertical : TQt::Horizontal ); if ( !w ) @@ -837,7 +837,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent ) y = TQMAX( 0, parent->height() - w->height() ); if ( x != w->x() || y != w->y() ) w->move( x, y ); - formwindow->selectWidget( TQT_TQOBJECT(w) ); + formwindow->selectWidget( w ); } firstWidget = firstWidget.nextSibling().toElement(); } @@ -864,7 +864,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea inc.implDecl = "in implementation"; inc.header = WidgetDatabase::includeFile( classID ); bool found = false; - TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) ); + TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow ); TQValueList<MetaDataBase::Include>::Iterator it; for ( it = includes.begin(); it != includes.end(); ++it ) { MetaDataBase::Include currInc = *it; @@ -878,7 +878,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea { includes << inc; } - MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), includes ); + MetaDataBase::setIncludes( formwindow, includes ); } if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) ) @@ -926,7 +926,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea TQWidget *w = ws->widget( t->identifier() ); if ( !w ) continue; - if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ) == -1 ) + if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) ) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ++indent; @@ -941,7 +941,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "<string>" << entitize( t->text() ) << "</string>" << endl; indent--; ts << makeIndent( indent ) << "</attribute>" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + saveChildrenOf( w, ts, indent ); --indent; ts << makeIndent( indent ) << "</widget>" << endl; } @@ -951,7 +951,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea TQWidget *w = ws->page( i ); if ( !w ) continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ++indent; @@ -965,7 +965,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "<number>" << TQString::number(i) << "</number>" << endl; indent--; ts << makeIndent( indent ) << "</attribute>" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + saveChildrenOf( w, ts, indent ); --indent; ts << makeIndent( indent ) << "</widget>" << endl; } @@ -975,7 +975,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea TQWidget *w = tb->item( i ); if ( !w ) continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ++indent; @@ -986,7 +986,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "</property>" << endl; ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl; indent++; - saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent ); + saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent ); indent--; ts << makeIndent( indent ) << "</property>" << endl; ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl; @@ -994,7 +994,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "<string>" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "</string>" << endl; indent--; ts << makeIndent( indent ) << "</attribute>" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + saveChildrenOf( w, ts, indent ); --indent; ts << makeIndent( indent ) << "</widget>" << endl; } @@ -1004,7 +1004,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea TQWidget *w = wiz->page( i ); if ( !w ) continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ++indent; @@ -1019,12 +1019,12 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "<string>" << entitize( wiz->title( w ) ) << "</string>" << endl; indent--; ts << makeIndent( indent ) << "</attribute>" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + saveChildrenOf( w, ts, indent ); --indent; ts << makeIndent( indent ) << "</widget>" << endl; } } else if ( ::tqt_cast<TQMainWindow*>(obj) ) { - saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent ); + saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent ); } else { bool saved = FALSE; #ifdef TQT_CONTAINER_CUSTOM_WIDGETS @@ -1042,10 +1042,10 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea int i = 0; for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) { if ( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 ) + idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"" - << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) + << WidgetFactory::classNameOf( w ) << "\">" << endl; ++indent; ts << makeIndent( indent ) << "<property name=\"name\">" << endl; @@ -1071,7 +1071,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj ); if ( obj != w ) { ts << makeIndent( indent ) << "<widget class=\"" - << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) + << WidgetFactory::classNameOf( w ) << "\">" << endl; ++indent; ts << makeIndent( indent ) << "<property name=\"name\">" << endl; @@ -1229,7 +1229,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) else if ( ::tqt_cast<TQTable*>(obj) ) { TQTable *table = (TQTable*)obj; int i; - TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table ); # ifndef TQT_NO_SQL bool isDataTable = ::tqt_cast<TQDataTable*>(table); # else @@ -1319,10 +1319,10 @@ void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, cons if ( formwindow && formwindow->savePixmapInline() ) ts << makeIndent( indent ) << "<" << tagname << ">" << saveInCollection( p ) << "</" << tagname << ">" << endl; else if ( formwindow && formwindow->savePixmapInProject() ) - ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() ) + ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( formwindow, p.serialNumber() ) << "</" << tagname << ">" << endl; else - ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() ) + ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( formwindow, p.serialNumber() ) << "</" << tagname << ">" << endl; } @@ -1334,7 +1334,7 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname* TQImage img = loadFromCollection( arg ); TQPixmap pix; pix.convertFromImage( img ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg ); return pix; } else if ( formwindow && formwindow->savePixmapInProject() ) { TQPixmap pix; @@ -1346,13 +1346,13 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname* pix.convertFromImage( pix.convertToImage() ); } - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg ); return pix; } TQPixmap pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ); // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that pix.convertFromImage( pix.convertToImage() ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg ); return pix; } @@ -1420,7 +1420,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) // save properties of layout if ( lay != WidgetFactory::NoLayout ) - saveObjectProperties( TQT_TQOBJECT(layout), ts, indent ); + saveObjectProperties( layout, ts, indent ); } @@ -1452,12 +1452,12 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) } } } else if ( ::tqt_cast<TQLayout*>(w) ) { - if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) + if ( MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) > -1 ) changed << "spacing"; - if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) + if ( MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) > -1 ) changed << "margin"; - if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) != "Auto" - && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() ) + if ( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) != "Auto" + && !MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ).isEmpty() ) changed << "resizeMode"; } @@ -1569,7 +1569,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant switch ( t ) { case TQVariant::String: if ( name == "resizeMode" ) { - TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + TQString resmod = MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ); if ( !resmod.isNull() && resmod != "Auto" ) { ts << makeIndent( indent ) << "<enum>"; ts << resmod; @@ -1592,9 +1592,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant if ( ::tqt_cast<TQLayout*>(w) ) { num = -1; if ( name == "spacing" ) - num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ); else if ( name == "margin" ) - num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ); if ( num != -1 ) ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl; } else { @@ -1824,7 +1824,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay // ### TODO loading for custom container widgets without pages #endif if ( !className.isNull() ) { - obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE )); + obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE ); if ( !obj ) { TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ), i18n( "Error loading %1.\n" @@ -1881,7 +1881,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay || isPlugin #endif ) ) - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( w ); } } @@ -1895,17 +1895,17 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay createObject( n, w, layout ); } else if ( n.tagName() == "hbox" ) { layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "grid" ) { layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "vbox" ) { layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "property" && obj ) { @@ -1968,7 +1968,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( w->isWidgetType() ) widgets.insert( w->name(), w ); - return TQT_TQOBJECT(w); + return w; } void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) @@ -2023,7 +2023,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) bool hasPixmap = FALSE; TQString txt; TQString field; - TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table ); while ( !n.isNull() ) { if ( n.tagName() == "property" ) { TQString attrib = n.attribute( "name" ); @@ -2048,7 +2048,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) h->setLabel( i, txt ); if ( !isRow && !field.isEmpty() ) fieldMap.insert( txt, field ); - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), fieldMap ); + MetaDataBase::setColumnFields( table, fieldMap ); } #endif } @@ -2074,7 +2074,7 @@ void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bo void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) { - if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ), TQT_TQOBJECT(widget) ) ) + if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ), widget ) ) return; if ( ::tqt_cast<TQListBox*>(widget) || ::tqt_cast<TQComboBox*>(widget) ) { @@ -2164,7 +2164,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay spacer->setInteraciveMode( FALSE ); while ( !n.isNull() ) { if ( n.tagName() == "property" ) - setObjectProperty( TQT_TQOBJECT(spacer), n.attribute( "name" ), n.firstChild().toElement() ); + setObjectProperty( spacer, n.attribute( "name" ), n.firstChild().toElement() ); n = n.nextSibling().toElement(); } spacer->setInteraciveMode( TRUE ); @@ -2229,7 +2229,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD if ( !p ) { MetaDataBase::setFakeProperty( obj, prop, v ); if ( obj->isWidgetType() ) { - if ( prop == "database" && TQT_TQOBJECT(obj) != TQT_TQOBJECT(toplevel) ) { + if ( prop == "database" && obj != toplevel ) { TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList(); if ( lst.count() > 2 ) dbControls.insert( obj->name(), lst[ 2 ] ); @@ -2283,8 +2283,8 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD } if ( prop == "icon" ) { formwindow->setIcon( v.toPixmap() ); - TQString pmk = MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), v.toPixmap().serialNumber() ); - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), + TQString pmk = MetaDataBase::pixmapKey( formwindow, v.toPixmap().serialNumber() ); + MetaDataBase::setPixmapKey( formwindow, formwindow->icon()->serialNumber(), pmk ); } @@ -2302,13 +2302,13 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD if ( ::tqt_cast<TQLayout*>(obj) ) { if ( prop == "spacing" ) { - MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); + MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toInt() ); return; } else if ( prop == "margin" ) { - MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); + MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toInt() ); return; } else if ( e.tagName() == "enum" && prop == "resizeMode" ) { - MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toString() ); + MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toString() ); return; } } @@ -2316,7 +2316,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD if ( prop == "name" ) { if ( pasting ) { TQString s = v.toString(); - formwindow->unify( TQT_TQOBJECT(obj), s, TRUE ); + formwindow->unify( obj, s, TRUE ); obj->setName( s ); return; } else if ( formwindow && obj == formwindow->mainContainer() ) { @@ -2485,7 +2485,7 @@ TQImage Resource::loadFromCollection( const TQString &name ) void Resource::saveConnections( TQTextStream &ts, int indent ) { - TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) ); + TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow ); if ( connections.isEmpty() ) return; ts << makeIndent( indent ) << "<connections>" << endl; @@ -2498,8 +2498,8 @@ void Resource::saveConnections( TQTextStream &ts, int indent ) ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 && qstrcmp( conn.receiver->name(), "this" ) != 0 ) ) continue; - if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) && - !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) ) + if ( formwindow->isMainContainer( (*it).receiver ) && + !MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) ) continue; if ( conn.sender->inherits( "CustomWidget" ) ) { @@ -2542,7 +2542,7 @@ void Resource::loadConnections( const TQDomElement &e ) conn.sender = 0; TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { - conn.sender = TQT_TQOBJECT(toplevel); + conn.sender = toplevel; } else { if ( name == "this" ) name = toplevel->name(); @@ -2562,7 +2562,7 @@ void Resource::loadConnections( const TQDomElement &e ) conn.receiver = 0; TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { - conn.receiver = TQT_TQOBJECT(toplevel); + conn.receiver = toplevel; } else { TQObjectList *l = toplevel->queryList( 0, name, FALSE ); if ( l ) { @@ -2581,13 +2581,13 @@ void Resource::loadConnections( const TQDomElement &e ) } if ( formwindow ) { if ( conn.sender == formwindow ) - conn.sender = TQT_TQOBJECT(formwindow->mainContainer()); + conn.sender = formwindow->mainContainer(); if ( conn.receiver == formwindow ) - conn.receiver = TQT_TQOBJECT(formwindow->mainContainer()); + conn.receiver = formwindow->mainContainer(); } if ( conn.sender && conn.receiver ) { if ( lang == "C++" ) { - MetaDataBase::addConnection( TQT_TQOBJECT(formwindow ? formwindow : toplevel), + MetaDataBase::addConnection( formwindow ? formwindow : toplevel, conn.sender, conn.signal, conn.receiver, conn.slot ); } } @@ -2604,11 +2604,11 @@ void Resource::loadConnections( const TQDomElement &e ) if ( slot.returnType.isEmpty() ) slot.returnType = "void"; slot.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), slot.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), slot.function, slot.specifier, + if ( !MetaDataBase::hasFunction( formwindow, slot.function, TRUE ) ) + MetaDataBase::addFunction( formwindow, slot.function, slot.specifier, slot.access, "slot", slot.language, slot.returnType ); else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), slot.function, slot.function, + MetaDataBase::changeFunctionAttributes( formwindow, slot.function, slot.function, slot.specifier, slot.access, "slot", slot.language, slot.returnType ); } @@ -2798,7 +2798,7 @@ void Resource::loadTabOrder( const TQDomElement &e ) void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) { - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow ); TQString cn; if ( info.classNameChanged && !info.className.isEmpty() ) cn = info.className; @@ -2813,9 +2813,9 @@ void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) { - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow ); if ( !langIface || formwindow->project()->isCpp() ) { - TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) ); + TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow ); TQString extensionInclude; bool needExtensionInclude = FALSE; if ( langIface && @@ -2842,7 +2842,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "</includes>" << endl; } - TQStringList forwards = MetaDataBase::forwards( TQT_TQOBJECT(formwindow) ); + TQStringList forwards = MetaDataBase::forwards( formwindow ); if ( !forwards.isEmpty() ) { ts << makeIndent( indent ) << "<forwards>" << endl; indent++; @@ -2851,7 +2851,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "</forwards>" << endl; } - TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( TQT_TQOBJECT(formwindow) ); + TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formwindow ); if ( !varLst.isEmpty() ) { ts << makeIndent( indent ) << "<variables>" << endl; indent++; @@ -2867,7 +2867,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "</variables>" << endl; } - TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) ); + TQStringList sigs = MetaDataBase::signalList( formwindow ); if ( !sigs.isEmpty() ) { ts << makeIndent( indent ) << "<signals>" << endl; indent++; @@ -2877,7 +2877,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "</signals>" << endl; } - TQValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ); + TQValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( formwindow ); if ( !slotList.isEmpty() ) { ts << makeIndent( indent ) << "<slots>" << endl; indent++; @@ -2900,7 +2900,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "</slots>" << endl; } - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formwindow), TRUE ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, TRUE ); if ( !functionList.isEmpty() ) { ts << makeIndent( indent ) << "<functions>" << endl; indent++; @@ -2930,7 +2930,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "<pixmapinproject/>" << endl; else ts << makeIndent( indent ) << "<pixmapfunction>" << formwindow->pixmapLoaderFunction() << "</pixmapfunction>" << endl; - if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() ) + if ( !( exportMacro = MetaDataBase::exportMacro( formwindow->mainContainer() ) ).isEmpty() ) ts << makeIndent( indent ) << "<exportmacro>" << exportMacro << "</exportmacro>" << endl; if ( formwindow ) { ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing() @@ -3085,9 +3085,9 @@ void Resource::loadActions( const TQDomElement &e ) TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "action" ) { - loadChildAction( TQT_TQOBJECT(formwindow), n ); + loadChildAction( formwindow, n ); } else if ( n.tagName() == "actiongroup" ) { - loadChildAction( TQT_TQOBJECT(formwindow), n ); + loadChildAction( formwindow, n ); } n = n.nextSibling().toElement(); } @@ -3108,7 +3108,7 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) continue; ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl; indent++; - saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); + saveObjectProperties( tb, ts, indent ); TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions(); for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { if ( ::tqt_cast<QSeparatorAction*>(a) ) { @@ -3117,14 +3117,14 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) if ( ::tqt_cast<QDesignerAction*>(a) && !( (QDesignerAction*)a )->supportsMenu() ) { TQWidget *w = ( (QDesignerAction*)a )->widget(); ts << makeIndent( indent ) << "<widget class=\"" - << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << "\">" << endl; + << WidgetFactory::classNameOf( w ) << "\">" << endl; indent++; - const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + const char *className = WidgetFactory::classNameOf( w ); if ( w->isA( "CustomWidget" ) ) usedCustomWidgets << TQString( className ); - if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) - saveItems( TQT_TQOBJECT(w), ts, indent ); - saveObjectProperties( TQT_TQOBJECT(w), ts, indent ); + if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) + saveItems( w, ts, indent ); + saveObjectProperties( w, ts, indent ); indent--; ts << makeIndent( indent ) << "</widget>" << endl; } else { @@ -3147,8 +3147,8 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) return; ts << makeIndent( indent ) << "<menubar>" << endl; indent++; - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mb), "name", TRUE ); // FIXME: remove - saveObjectProperties( TQT_TQOBJECT(mb), ts, indent ); + MetaDataBase::setPropertyChanged( mb, "name", TRUE ); // FIXME: remove + saveObjectProperties( mb, ts, indent ); for ( int i = 0; i < (int)mb->count(); ++i ) { MenuBarEditorItem *m = mb->item( i ); @@ -3217,12 +3217,12 @@ void Resource::loadToolBars( const TQDomElement &e ) tb->addAction( a ); } else if ( n2.tagName() == "widget" ) { TQWidget *w = (TQWidget*)createObject( n2, tb ); - QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) ); + QDesignerAction *a = new QDesignerAction( w, tb ); a->addTo( tb ); tb->addAction( a ); tb->installEventFilters( w ); } else if ( n2.tagName() == "property" ) { - setObjectProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); + setObjectProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() ); } n2 = n2.nextSibling().toElement(); } @@ -3236,16 +3236,16 @@ void Resource::loadMenuBar( const TQDomElement &e ) TQDomElement n = e.firstChild().toElement(); TQMainWindow *mw = (TQMainWindow*)formwindow->mainContainer(); MenuBarEditor *mb = new MenuBarEditor( formwindow, mw ); - MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); + MetaDataBase::addEntry( mb ); while ( !n.isNull() ) { if ( n.tagName() == "item" ) { PopupMenuEditor * popup = new PopupMenuEditor( formwindow, mw ); loadPopupMenu( popup, n ); popup->setName( n.attribute( "name" ) ); mb->insertItem( n.attribute( "text" ), popup ); - MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); + MetaDataBase::addEntry( popup ); } else if ( n.tagName() == "property" ) { - setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); + setObjectProperty( mb, n.attribute( "name" ), n.firstChild().toElement() ); } else if ( n.tagName() == "separator" ) { mb->insertSeparator(); } @@ -3255,7 +3255,7 @@ void Resource::loadMenuBar( const TQDomElement &e ) void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e ) { - MetaDataBase::addEntry( TQT_TQOBJECT(p) ); + MetaDataBase::addEntry( p ); TQDomElement n = e.firstChild().toElement(); TQAction *a = 0; while ( !n.isNull() ) { diff --git a/kdevdesigner/designer/sizehandle.cpp b/kdevdesigner/designer/sizehandle.cpp index 62d95bc7..a3433003 100644 --- a/kdevdesigner/designer/sizehandle.cpp +++ b/kdevdesigner/designer/sizehandle.cpp @@ -236,7 +236,7 @@ void SizeHandle::mouseReleaseEvent( TQMouseEvent *e ) formWindow, widget, origGeom, widget->geometry() ) ); - formWindow->emitUpdateProperties( TQT_TQOBJECT(widget) ); + formWindow->emitUpdateProperties( widget ); } void SizeHandle::trySetGeometry( TQWidget *w, int x, int y, int width, int height ) diff --git a/kdevdesigner/designer/sourceeditor.cpp b/kdevdesigner/designer/sourceeditor.cpp index 1efbe164..bcdca52e 100644 --- a/kdevdesigner/designer/sourceeditor.cpp +++ b/kdevdesigner/designer/sourceeditor.cpp @@ -47,7 +47,7 @@ SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageIn lIface->addRef(); editor = iFace->editor( MainWindow::self->areEditorsReadOnly(), this, MainWindow::self->designerInterface() ); - iFace->onBreakPointChange( TQT_TQOBJECT(MainWindow::self), TQT_SLOT( breakPointsChanged() ) ); + iFace->onBreakPointChange( MainWindow::self, TQT_SLOT( breakPointsChanged() ) ); resize( 600, 400 ); setIcon( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) ); } @@ -104,7 +104,7 @@ void SourceEditor::setObject( TQObject *o, Project *p ) if ( formWindow()->isFake() ) iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); else - iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); + iFace->setContext( formWindow()->mainContainer() ); } else { iFace->setContext( 0 ); } @@ -235,7 +235,7 @@ void SourceEditor::resetContext() if ( formWindow()->isFake() ) iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); else - iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); + iFace->setContext( formWindow()->mainContainer() ); } else { iFace->setContext( 0 ); } diff --git a/kdevdesigner/designer/tableeditorimpl.cpp b/kdevdesigner/designer/tableeditorimpl.cpp index 1bde6758..3d0fa9e3 100644 --- a/kdevdesigner/designer/tableeditorimpl.cpp +++ b/kdevdesigner/designer/tableeditorimpl.cpp @@ -77,7 +77,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f } if ( formWindow->project() && ::tqt_cast<TQDataTable*>(editTable) ) { - TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(editTable), "database" ).toStringList(); + TQStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList(); if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) { TQStringList fields; fields << "<no field>"; @@ -412,7 +412,7 @@ void TableEditor::readFromTable() #ifndef TQT_NO_TABLE TQHeader *cols = editTable->horizontalHeader(); table->setNumCols( cols->count() ); - TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(editTable) ); + TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( editTable ); for ( int i = 0; i < cols->count(); ++i ) { if ( editTable->horizontalHeader()->iconSet( i ) ) { table->horizontalHeader()->setLabel( i, *editTable->horizontalHeader()->iconSet( i ), diff --git a/kdevdesigner/designer/variabledialogimpl.cpp b/kdevdesigner/designer/variabledialogimpl.cpp index d2d7ef67..c35fb300 100644 --- a/kdevdesigner/designer/variabledialogimpl.cpp +++ b/kdevdesigner/designer/variabledialogimpl.cpp @@ -44,7 +44,7 @@ VariableDialog::VariableDialog( FormWindow *fw, TQWidget *parent ) : VariableDialogBase( parent ), formWindow( fw ) { varView->setSorting( -1 ); - TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formWindow ); TQValueList<MetaDataBase::Variable>::Iterator it = varLst.begin(); for ( ; it != varLst.end(); ++it ) { TQListViewItem *i = new TQListViewItem( varView ); diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp index 00a4fa07..8d800061 100644 --- a/kdevdesigner/designer/widgetfactory.cpp +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -543,12 +543,12 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) ); if ( !w ) return 0; - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( w ); if ( !defaultProperties->contains( id ) ) - saveDefaultProperties( TQT_TQOBJECT(w), id ); + saveDefaultProperties( w, id ); if ( !changedProperties->contains( id ) ) - saveChangedProperties( TQT_TQOBJECT(w), id ); + saveChangedProperties( w, id ); return w; } @@ -562,11 +562,11 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou int spacing = MainWindow::self->currentLayoutDefaultSpacing(); int margin = 0; - int metaspacing = MetaDataBase::spacing( TQT_TQOBJECT(widget) ); - int metamargin = MetaDataBase::margin( TQT_TQOBJECT(widget) ); + int metaspacing = MetaDataBase::spacing( widget ); + int metamargin = MetaDataBase::margin( widget ); if ( ::tqt_cast<TQLayoutWidget*>(widget) && - ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || + ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) || widget && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) margin = MainWindow::self->currentLayoutDefaultMargin(); @@ -585,7 +585,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou if ( !layout && ::tqt_cast<TQToolBox*>(widget) ) widget = ((TQToolBox*)widget)->currentItem(); - MetaDataBase::addEntry( TQT_TQOBJECT(widget) ); + MetaDataBase::addEntry( widget ); TQLayout *l = 0; int align = 0; @@ -609,8 +609,8 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou return 0; } align = TQt::AlignTop; - MetaDataBase::setMargin( TQT_TQOBJECT(gb), metamargin ); - MetaDataBase::setSpacing( TQT_TQOBJECT(gb), metaspacing ); + MetaDataBase::setMargin( gb, metamargin ); + MetaDataBase::setSpacing( gb, metaspacing ); } else { if ( layout ) { switch ( type ) { @@ -626,7 +626,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou default: return 0; } - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::addEntry( l ); l->setSpacing( spacing ); l->setMargin( margin ); } else { @@ -643,10 +643,10 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou default: return 0; } - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::addEntry( l ); if ( widget ) { - MetaDataBase::setMargin( TQT_TQOBJECT(widget), metamargin ); - MetaDataBase::setSpacing( TQT_TQOBJECT(widget), metaspacing ); + MetaDataBase::setMargin( widget, metamargin ); + MetaDataBase::setSpacing( widget, metaspacing ); } else { l->setMargin( margin ); l->setSpacing( spacing ); @@ -654,7 +654,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou } } l->setAlignment( align ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::addEntry( l ); return l; } @@ -790,8 +790,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare QDesignerLabel *l = new QDesignerLabel( parent, name ); if ( init ) { l->setText( TQString::fromLatin1( name ) ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "text", TRUE ); + MetaDataBase::addEntry( l ); + MetaDataBase::setPropertyChanged( l, "text", TRUE ); } return l; } else if ( className == "PixmapLabel" ) { @@ -799,9 +799,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare if ( init ) { l->setPixmap( BarIcon( "designer_qtlogo.png", KDevDesignerPartFactory::instance() ) ); l->setScaledContents( TRUE ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "pixmap", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "scaledContents", TRUE ); + MetaDataBase::addEntry( l ); + MetaDataBase::setPropertyChanged( l, "pixmap", TRUE ); + MetaDataBase::setPropertyChanged( l, "scaledContents", TRUE ); } return l; } else if ( className == "TQLayoutWidget" ) @@ -812,11 +812,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare FormWindow *fw = find_formwindow( parent ); TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); tw->addTab( w, i18n("Tab 1") ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( w ); w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); tw->addTab( w, i18n("Tab 2") ); - MetaDataBase::addEntry( TQT_TQOBJECT(tw) ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( tw ); + MetaDataBase::addEntry( w ); } return tw; } else if ( className == "TQWidgetStack" ) { @@ -825,8 +825,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare FormWindow *fw = find_formwindow( parent ); TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" ); ws->insertPage( w ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - MetaDataBase::addEntry( TQT_TQOBJECT(ws) ); + MetaDataBase::addEntry( w ); + MetaDataBase::addEntry( ws ); } return ws; } else if ( className == "TQComboBox" ) { @@ -842,7 +842,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare FormWindow *fw = find_formwindow( parent ); if ( fw ) { QDesignerWidget *dw = new QDesignerWidget( fw, parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + MetaDataBase::addEntry( dw ); return dw; } } @@ -862,16 +862,16 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); if ( init && ::tqt_cast<FormWindow*>(parent) ) { QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + MetaDataBase::addEntry( dw ); wiz->addPage( dw, i18n( "Page" ) ); TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) ); } return wiz; } else if ( className == "Spacer" ) { Spacer *s = new Spacer( parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "sizeType", TRUE ); + MetaDataBase::addEntry( s ); + MetaDataBase::setPropertyChanged( s, "orientation", TRUE ); + MetaDataBase::setPropertyChanged( s, "sizeType", TRUE ); if ( !r ) return s; if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) @@ -899,8 +899,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare s->setOrientation( orient ); else if ( r->width() > r->height() ) s->setOrientation( TQt::Horizontal ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); + MetaDataBase::addEntry( s ); + MetaDataBase::setPropertyChanged( s, "orientation", TRUE ); return s; } else if ( className == "TQScrollBar" ) { TQScrollBar *s = new TQScrollBar( parent, name ); @@ -910,8 +910,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare s->setOrientation( orient ); else if ( r->width() > r->height() ) s->setOrientation( TQt::Horizontal ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); + MetaDataBase::addEntry( s ); + MetaDataBase::setPropertyChanged( s, "orientation", TRUE ); return s; } else if ( className == "TQFrame" ) { if ( !init ) @@ -921,10 +921,10 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return f; } else if ( className == "Line" ) { Line *l = new Line( parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "orientation", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShadow", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShape", TRUE ); + MetaDataBase::addEntry( l ); + MetaDataBase::setPropertyChanged( l, "orientation", TRUE ); + MetaDataBase::setPropertyChanged( l, "frameShadow", TRUE ); + MetaDataBase::setPropertyChanged( l, "frameShape", TRUE ); if ( !r ) return l; if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) @@ -937,7 +937,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare mw->setDockEnabled( TQt::DockMinimized, FALSE ); QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" ); mw->setDockMenuEnabled( FALSE ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + MetaDataBase::addEntry( dw ); mw->setCentralWidget( dw ); (void)mw->statusBar(); dw->show(); @@ -950,11 +950,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) : new TQWidget( tb, "page1" ); tb->addItem( w, i18n("Page 1") ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( w ); w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new TQWidget( tb, "page2" ); tb->addItem( w, i18n("Page 2") ); - MetaDataBase::addEntry( TQT_TQOBJECT(tb) ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( tb ); + MetaDataBase::addEntry( w ); return tb; } #ifndef TQT_NO_SQL @@ -1021,7 +1021,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay TQLayout *lay = w->layout(); if ( ::tqt_cast<TQGroupBox*>(w) ) { - TQObjectList *l = TQT_TQOBJECT(lay)->queryList( "TQLayout" ); + TQObjectList *l = lay->queryList( "TQLayout" ); if ( l && l->first() ) lay = (TQLayout*)l->first(); delete l; @@ -1063,7 +1063,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w ) TQWidget *WidgetFactory::layoutParent( TQLayout *layout ) { - TQObject *o = TQT_TQOBJECT(layout); + TQObject *o = layout; while ( o ) { if ( o->isWidgetType() ) return (TQWidget*)o; @@ -1132,7 +1132,7 @@ TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) ::tqt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) ) return w->parentWidget()->parentWidget()->parentWidget(); while ( w ) { - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ); if ( WidgetDatabase::isContainer( id ) || w && ::tqt_cast<FormWindow*>(w->parentWidget()) ) return w; diff --git a/kdevdesigner/src/kdevdesigner.cpp b/kdevdesigner/src/kdevdesigner.cpp index f846e99b..bc83e670 100644 --- a/kdevdesigner/src/kdevdesigner.cpp +++ b/kdevdesigner/src/kdevdesigner.cpp @@ -59,7 +59,7 @@ KDevDesigner::KDevDesigner() // our hands on it TQStringList args; args.append("in shell"); - m_part = static_cast<KParts::ReadWritePart *>(factory->create(TQT_TQOBJECT(this), + m_part = static_cast<KParts::ReadWritePart *>(factory->create(this, "kdevdesigner_part", "KParts::ReadWritePart", args)); if (m_part) @@ -99,16 +99,16 @@ void KDevDesigner::load(const KURL& url) void KDevDesigner::setupActions() { -/* KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); - KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());*/ +/* KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); + KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());*/ - KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); + KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); - m_toolbarAction = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowToolbar()), actionCollection()); - m_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection()); + m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection()); + m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection()); - KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); } void KDevDesigner::saveProperties(TDEConfig* /*config*/) diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp index a79687a8..9d0d3656 100644 --- a/kdevdesigner/uilib/qwidgetfactory.cpp +++ b/kdevdesigner/uilib/qwidgetfactory.cpp @@ -356,10 +356,10 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge continue; if ( cit.key()->inherits( "QDesignerDataBrowser2" ) ) ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, - TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); + cit.key(), *(*cit).dbControls ); else if ( cit.key()->inherits( "QDesignerDataView2" ) ) ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, - TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); + cit.key(), *(*cit).dbControls ); } for ( TQMap<TQString, TQStringList>::Iterator it = widgetFactory->dbTables.begin(); @@ -787,7 +787,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, TQListView *listView = 0; if ( parent != 0 && parent->inherits("TQListView") ) - parent = TQT_TQOBJECT((TQListView *) parent); + parent = (TQListView *) parent; TQListViewItem *item = 0; if ( listView != 0 ) { if ( parentItem == 0 ) { @@ -946,22 +946,22 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, } else { layout = createLayout( parentWidget, parentLayout, type ); } - obj = TQT_TQOBJECT(layout); + obj = layout; } else if ( className == "TQMenuBar" ) { unpackCString( strings, in, className ); widget = ((TQMainWindow *) parent)->menuBar(); - obj = TQT_TQOBJECT(widget); + obj = widget; } else if ( className == "TQToolBar" ) { TQ_UINT8 dock; in >> dock; unpackCString( strings, in, className ); widget = new TQToolBar( TQString(), (TQMainWindow *) parent, (TQt::Dock) dock ); - obj = TQT_TQOBJECT(widget); + obj = widget; } else if ( className == "TQWidget" ) { unpackCString( strings, in, className ); widget = createWidget( className, parentWidget, 0 ); - obj = TQT_TQOBJECT(widget); + obj = widget; } if ( widget != 0 ) @@ -1208,7 +1208,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, switch ( blockType ) { case Block_Actions: - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel) ); + inputObject( objects, numObjects, strings, in, toplevel, toplevel ); break; case Block_Buddies: { @@ -1300,7 +1300,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, } break; case Block_Menubar: - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel), + inputObject( objects, numObjects, strings, in, toplevel, toplevel, "TQMenuBar" ); break; case Block_Slots: @@ -1334,7 +1334,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, case Block_Toolbars: do { inputObject( objects, numObjects, strings, in, toplevel, - TQT_TQOBJECT(toplevel), "TQToolBar" ); + toplevel, "TQToolBar" ); } while ( !END_OF_BLOCK() ); break; case Block_Variables: @@ -1344,7 +1344,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, break; case Block_Widget: toplevel = (TQWidget *) - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(parent), + inputObject( objects, numObjects, strings, in, toplevel, parent, "TQWidget" ); if ( toplevel != 0 ) toplevel->setName( name ); @@ -1597,7 +1597,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget // hide layout widgets w = parent; } else { - obj = TQT_TQOBJECT(TQWidgetFactory::createWidget( className, parent, 0 )); + obj = TQWidgetFactory::createWidget( className, parent, 0 ); if ( !obj ) return 0; w = (TQWidget*)obj; @@ -1647,7 +1647,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget layout = createLayout( 0, 0, TQWidgetFactory::HBox, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::HBox, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, @@ -1659,7 +1659,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget layout = createLayout( 0, 0, TQWidgetFactory::Grid, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::Grid, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, @@ -1671,7 +1671,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget layout = createLayout( 0, 0, TQWidgetFactory::VBox, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::VBox, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, @@ -2069,7 +2069,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto if ( n2.tagName() == "sender" ) { TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { - conn.sender = TQT_TQOBJECT(toplevel); + conn.sender = toplevel; } else { if ( name == "this" ) name = toplevel->name(); @@ -2087,7 +2087,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto } else if ( n2.tagName() == "receiver" ) { TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { - conn.receiver = TQT_TQOBJECT(toplevel); + conn.receiver = toplevel; } else { TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE ); if ( l ) { @@ -2113,7 +2113,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto TQObject *sender = 0, *receiver = 0; TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE ); if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) { - sender = TQT_TQOBJECT(toplevel); + sender = toplevel; } else { if ( !l || !l->first() ) { delete l; @@ -2127,7 +2127,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto sender = findAction( conn.sender->name() ); if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) { - receiver = TQT_TQOBJECT(toplevel); + receiver = toplevel; } else { l = toplevel->queryList( 0, conn.receiver->name(), FALSE ); if ( !l || !l->first() ) { @@ -2448,9 +2448,9 @@ void TQWidgetFactory::loadActions( const TQDomElement &e ) TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "action" ) { - loadChildAction( TQT_TQOBJECT(toplevel), n ); + loadChildAction( toplevel, n ); } else if ( n.tagName() == "actiongroup" ) { - loadChildAction( TQT_TQOBJECT(toplevel), n ); + loadChildAction( toplevel, n ); } n = n.nextSibling().toElement(); } @@ -2478,7 +2478,7 @@ void TQWidgetFactory::loadToolBars( const TQDomElement &e ) } else if ( n2.tagName() == "widget" ) { (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "TQWidget" ) ); } else if ( n2.tagName() == "property" ) { - setProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); + setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() ); } n2 = n2.nextSibling().toElement(); } @@ -2499,7 +2499,7 @@ void TQWidgetFactory::loadMenuBar( const TQDomElement &e ) popup->setName( n.attribute( "name" ).ascii() ); mb->insertItem( translate( n.attribute( "text" ) ), popup ); } else if ( n.tagName() == "property" ) { - setProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); + setProperty( mb, n.attribute( "name" ), n.firstChild().toElement() ); } else if ( n.tagName() == "separator" ) { mb->insertSeparator(); } |