diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-06 20:38:40 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-06 20:38:40 -0600 |
commit | eb1d1e0dec5720ace27395e290b7093cd68b150d (patch) | |
tree | 04a199ef5ea853d86a6f9a44716c0874d41c20f6 /tools | |
parent | ae8aba1e0f17943046e6bfa889b169f7fc41da0d (diff) | |
download | tqt3-eb1d1e0dec5720ace27395e290b7093cd68b150d.tar.gz tqt3-eb1d1e0dec5720ace27395e290b7093cd68b150d.zip |
Automated update from qt3
Diffstat (limited to 'tools')
31 files changed, 565 insertions, 565 deletions
diff --git a/tools/assistant/tabbedbrowser.ui.h b/tools/assistant/tabbedbrowser.ui.h index 6663b53ab..35ed6a952 100644 --- a/tools/assistant/tabbedbrowser.ui.h +++ b/tools/assistant/tabbedbrowser.ui.h @@ -322,15 +322,15 @@ TQPtrList<HelpWindow> TabbedBrowser::browsers() const { TQPtrList<HelpWindow> list; for (int i=0; i<tab->count(); ++i) { - Q_ASSERT(::qt_cast<HelpWindow*>(tab->page(i))); - list.append(::qt_cast<HelpWindow*>(tab->page(i))); + Q_ASSERT(::tqt_cast<HelpWindow*>(tab->page(i))); + list.append(::tqt_cast<HelpWindow*>(tab->page(i))); } return list; } void TabbedBrowser::sourceChanged() { - HelpWindow *win = ::qt_cast<HelpWindow *>( TQObject::sender() ); + HelpWindow *win = ::tqt_cast<HelpWindow *>( TQObject::sender() ); Q_ASSERT( win ); TQString docTitle(win->documentTitle()); if (docTitle.isEmpty()) diff --git a/tools/designer/designer/actiondnd.cpp b/tools/designer/designer/actiondnd.cpp index def64548a..b0e619c2d 100644 --- a/tools/designer/designer/actiondnd.cpp +++ b/tools/designer/designer/actiondnd.cpp @@ -110,7 +110,7 @@ bool TQDesignerAction::addTo( TQWidget *w ) if ( !widgetToInsert ) return TQAction::addTo( w ); - if ( ::qt_cast<TQPopupMenu*>(w) ) + if ( ::tqt_cast<TQPopupMenu*>(w) ) return FALSE; widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE ); @@ -201,11 +201,11 @@ TQSeparatorAction::TQSeparatorAction( TQObject *parent ) bool TQSeparatorAction::addTo( TQWidget *w ) { - if ( ::qt_cast<TQToolBar*>(w) ) { + if ( ::tqt_cast<TQToolBar*>(w) ) { TQToolBar *tb = (TQToolBar*)w; wid = new TQDesignerToolBarSeparator( tb->orientation(), tb ); return TRUE; - } else if ( ::qt_cast<TQPopupMenu*>(w) ) { + } else if ( ::tqt_cast<TQPopupMenu*>(w) ) { idx = ( (TQPopupMenu*)w )->count(); ( (TQPopupMenu*)w )->insertSeparator( idx ); return TRUE; @@ -215,10 +215,10 @@ bool TQSeparatorAction::addTo( TQWidget *w ) bool TQSeparatorAction::removeFrom( TQWidget *w ) { - if ( ::qt_cast<TQToolBar*>(w) ) { + if ( ::tqt_cast<TQToolBar*>(w) ) { delete wid; return TRUE; - } else if ( ::qt_cast<TQPopupMenu*>(w) ) { + } else if ( ::tqt_cast<TQPopupMenu*>(w) ) { ( (TQPopupMenu*)w )->removeItemAt( idx ); return TRUE; } @@ -267,7 +267,7 @@ void TQDesignerToolBar::findFormWindow() { TQWidget *w = this; while ( w ) { - formWindow = ::qt_cast<FormWindow*>(w); + formWindow = ::tqt_cast<FormWindow*>(w); if ( formWindow ) break; w = w->parentWidget(); @@ -278,10 +278,10 @@ void TQDesignerToolBar::addAction( TQAction *a ) { actionList.append( a ); connect( a, SIGNAL( destroyed() ), this, SLOT( actionRemoved() ) ); - if ( ::qt_cast<TQActionGroup*>(a) ) { + if ( ::tqt_cast<TQActionGroup*>(a) ) { ( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this ); actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a ); - } else if ( ::qt_cast<TQSeparatorAction*>(a) ) { + } else if ( ::tqt_cast<TQSeparatorAction*>(a) ) { ( (TQSeparatorAction*)a )->widget()->installEventFilter( this ); actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a ); } else { @@ -292,7 +292,7 @@ void TQDesignerToolBar::addAction( TQAction *a ) static void fixObject( TQObject *&o ) { - while ( o && o->parent() && !::qt_cast<TQDesignerToolBar*>(o->parent()) ) + while ( o && o->parent() && !::tqt_cast<TQDesignerToolBar*>(o->parent()) ) o = o->parent(); } @@ -410,7 +410,7 @@ void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject const int ID_SEP = 2; const int ID_DELTOOLBAR = 3; TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o ); - if ( it != actionMap.end() && ::qt_cast<TQSeparatorAction*>(*it) ) + if ( it != actionMap.end() && ::tqt_cast<TQSeparatorAction*>(*it) ) menu.insertItem( tr( "Delete Separator" ), ID_DELETE ); else menu.insertItem( tr( "Delete Item" ), ID_DELETE ); @@ -511,11 +511,11 @@ void TQDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) TQApplication::sendPostedEvents(); adjustSize(); - TQString type = ::qt_cast<TQActionGroup*>(a) ? TQString( "application/x-designer-actiongroup" ) : - ::qt_cast<TQSeparatorAction*>(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); + TQString type = ::tqt_cast<TQActionGroup*>(a) ? TQString( "application/x-designer-actiongroup" ) : + ::tqt_cast<TQSeparatorAction*>(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); TQStoredDrag *drag = new ActionDrag( type, a, this ); drag->setPixmap( a->iconSet().pixmap() ); - if ( ::qt_cast<TQDesignerAction*>(a) ) { + if ( ::tqt_cast<TQDesignerAction*>(a) ) { if ( formWindow->widgets()->find( ( (TQDesignerAction*)a )->widget() ) ) formWindow->selectWidget( ( (TQDesignerAction*)a )->widget(), FALSE ); } @@ -572,11 +572,11 @@ void TQDesignerToolBar::dropEvent( TQDropEvent *e ) if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-separator" ) ) { if ( e->provides( "application/x-designer-actions" ) ) - a = ::qt_cast<TQDesignerAction*>(ActionDrag::action()); + a = ::tqt_cast<TQDesignerAction*>(ActionDrag::action()); else - a = ::qt_cast<TQSeparatorAction*>(ActionDrag::action()); + a = ::tqt_cast<TQSeparatorAction*>(ActionDrag::action()); } else { - a = ::qt_cast<TQDesignerActionGroup*>(ActionDrag::action()); + a = ::tqt_cast<TQDesignerActionGroup*>(ActionDrag::action()); } if ( actionList.findRef( a ) != -1 ) { @@ -605,14 +605,14 @@ void TQDesignerToolBar::reInsert() clear(); for ( a = actionList.first(); a; a = actionList.next() ) { a->addTo( this ); - if ( ::qt_cast<TQActionGroup*>(a) ) { + if ( ::tqt_cast<TQActionGroup*>(a) ) { actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a ); if ( ( (TQDesignerActionGroup*)a )->widget() ) ( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this ); - } else if ( ::qt_cast<TQDesignerAction*>(a) ) { + } else if ( ::tqt_cast<TQDesignerAction*>(a) ) { actionMap.insert( ( (TQDesignerAction*)a )->widget(), a ); ( (TQDesignerAction*)a )->widget()->installEventFilter( this ); - } else if ( ::qt_cast<TQSeparatorAction*>(a) ) { + } else if ( ::tqt_cast<TQSeparatorAction*>(a) ) { actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a ); ( (TQSeparatorAction*)a )->widget()->installEventFilter( this ); } @@ -724,7 +724,7 @@ void TQDesignerToolBar::doInsertWidget( const TQPoint &p ) void TQDesignerToolBar::clear() { for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( ::qt_cast<TQDesignerAction*>(a) ) + if ( ::tqt_cast<TQDesignerAction*>(a) ) ( (TQDesignerAction*)a )->remove(); } TQToolBar::clear(); diff --git a/tools/designer/designer/actiondnd.h b/tools/designer/designer/actiondnd.h index 415784248..6d4f7df7c 100644 --- a/tools/designer/designer/actiondnd.h +++ b/tools/designer/designer/actiondnd.h @@ -78,7 +78,7 @@ class TQDesignerActionGroup : public TQActionGroup public: TQDesignerActionGroup( TQObject *parent ) - : TQActionGroup( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); } + : TQActionGroup( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); } void init(); @@ -113,9 +113,9 @@ class TQDesignerAction : public TQAction public: TQDesignerAction( TQObject *parent ) - : TQAction( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); } + : TQAction( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); } TQDesignerAction( TQWidget *w, TQObject *parent ) - : TQAction( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); } + : TQAction( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); } void init(); diff --git a/tools/designer/designer/actioneditorimpl.cpp b/tools/designer/designer/actioneditorimpl.cpp index 88587cdcb..a7ab8d3c1 100644 --- a/tools/designer/designer/actioneditorimpl.cpp +++ b/tools/designer/designer/actioneditorimpl.cpp @@ -154,7 +154,7 @@ void ActionEditor::newAction() { ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); if ( actionParent ) { - if ( !::qt_cast<TQActionGroup*>(actionParent->actionGroup()) ) + if ( !::tqt_cast<TQActionGroup*>(actionParent->actionGroup()) ) actionParent = (ActionItem*)actionParent->parent(); } @@ -190,7 +190,7 @@ void ActionEditor::newActionGroup() { ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); if ( actionParent ) { - if ( !::qt_cast<TQActionGroup*>(actionParent->actionGroup()) ) + if ( !::tqt_cast<TQActionGroup*>(actionParent->actionGroup()) ) actionParent = (ActionItem*)actionParent->parent(); } @@ -230,13 +230,13 @@ void ActionEditor::setFormWindow( FormWindow *fw ) listActions->clear(); formWindow = fw; if ( !formWindow || - !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) { + !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) { setEnabled( FALSE ); } else { setEnabled( TRUE ); for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) { ActionItem *i = 0; - if ( ::qt_cast<TQAction*>(a->parent()) ) + if ( ::tqt_cast<TQAction*>(a->parent()) ) continue; i = new ActionItem( listActions, a ); i->setText( 0, a->name() ); @@ -246,7 +246,7 @@ void ActionEditor::setFormWindow( FormWindow *fw ) this, SLOT( removeConnections( TQObject * ) ) ); TQObject::connect( a, SIGNAL( destroyed( TQObject * ) ), this, SLOT( removeConnections( TQObject* ) ) ); - if ( ::qt_cast<TQActionGroup*>(a) ) { + if ( ::tqt_cast<TQActionGroup*>(a) ) { insertChildActions( i ); } } @@ -265,7 +265,7 @@ void ActionEditor::insertChildActions( ActionItem *i ) while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::qt_cast<TQAction*>(o) ) + if ( !::tqt_cast<TQAction*>(o) ) continue; TQAction *a = (TQAction*)o; ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a ); @@ -277,7 +277,7 @@ void ActionEditor::insertChildActions( ActionItem *i ) this, SLOT( removeConnections( TQObject * ) ) ); TQObject::connect( o, SIGNAL( destroyed( TQObject * ) ), this, SLOT( removeConnections( TQObject * ) ) ); - if ( ::qt_cast<TQActionGroup*>(a) ) + if ( ::tqt_cast<TQActionGroup*>(a) ) insertChildActions( i2 ); } } diff --git a/tools/designer/designer/actionlistview.cpp b/tools/designer/designer/actionlistview.cpp index fe3bc92b0..0bccd671a 100644 --- a/tools/designer/designer/actionlistview.cpp +++ b/tools/designer/designer/actionlistview.cpp @@ -48,18 +48,18 @@ ActionListView::ActionListView( TQWidget *parent, const char *name ) ActionItem::ActionItem( TQListView *lv, TQAction *ac ) : TQListViewItem( lv ), a( 0 ), g( 0 ) { - g = ::qt_cast<TQDesignerActionGroup*>(ac); + g = ::tqt_cast<TQDesignerActionGroup*>(ac); if ( !g ) - a = ::qt_cast<TQDesignerAction*>(ac); + a = ::tqt_cast<TQDesignerAction*>(ac); setDragEnabled( TRUE ); } ActionItem::ActionItem( TQListViewItem *i, TQAction *ac ) : TQListViewItem( i ), a( 0 ), g( 0 ) { - g = ::qt_cast<TQDesignerActionGroup*>(ac); + g = ::tqt_cast<TQDesignerActionGroup*>(ac); if ( !g ) - a = ::qt_cast<TQDesignerAction*>(ac); + a = ::tqt_cast<TQDesignerAction*>(ac); setDragEnabled( TRUE ); moveToEnd(); } diff --git a/tools/designer/designer/command.cpp b/tools/designer/designer/command.cpp index e374a3cc3..5271e9ffe 100644 --- a/tools/designer/designer/command.cpp +++ b/tools/designer/designer/command.cpp @@ -497,7 +497,7 @@ bool SetPropertyCommand::canMerge( Command *c ) if ( !p ) { if ( propName == "toolTip" || propName == "whatsThis" ) return TRUE; - if ( ::qt_cast<CustomWidget*>((TQObject *)widget) ) { + if ( ::tqt_cast<CustomWidget*>((TQObject *)widget) ) { MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget(); if ( !cw ) return FALSE; @@ -548,7 +548,7 @@ bool SetPropertyCommand::checkProperty() return FALSE; } - if ( ::qt_cast<FormWindow*>(widget->parent()) ) + if ( ::tqt_cast<FormWindow*>(widget->parent()) ) formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() ); } return TRUE; @@ -600,7 +600,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), currentItemText ); } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) { MetaDataBase::setFakeProperty( editor->widget(), propName, v ); - } else if ( ::qt_cast<CustomWidget*>(editor->widget()) ) { + } else if ( ::tqt_cast<CustomWidget*>(editor->widget()) ) { MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget(); if ( cw ) { MetaDataBase::setFakeProperty( editor->widget(), propName, v ); @@ -648,10 +648,10 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ if ( formWindow()->isMainContainer( widget ) ) formWindow()->setName( v.toCString() ); } - if ( propName == "name" && ::qt_cast<TQAction*>((TQObject *)widget) && ::qt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) { + if ( propName == "name" && ::tqt_cast<TQAction*>((TQObject *)widget) && ::tqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) { formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget ); } - if ( propName == "iconSet" && ::qt_cast<TQAction*>((TQObject *)widget) && ::qt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) { + if ( propName == "iconSet" && ::tqt_cast<TQAction*>((TQObject *)widget) && ::tqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) { formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget ); } if ( propName == "caption" ) { @@ -798,9 +798,9 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, margin = MetaDataBase::margin( layoutBase ); layout = 0; if ( lay == WidgetFactory::HBox ) - layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::qt_cast<TQSplitter*>(layoutBase) != 0 ); + layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast<TQSplitter*>(layoutBase) != 0 ); else if ( lay == WidgetFactory::VBox ) - layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::qt_cast<TQSplitter*>(layoutBase) != 0 ); + layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast<TQSplitter*>(layoutBase) != 0 ); else if ( lay == WidgetFactory::Grid ) layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE ); } @@ -1786,7 +1786,7 @@ void AddActionToToolBarCommand::execute() { action->addTo( toolBar ); - if ( ::qt_cast<TQDesignerAction*>(action) ) { + if ( ::tqt_cast<TQDesignerAction*>(action) ) { TQString s = ( (TQDesignerAction*)action )->widget()->name(); if ( s.startsWith( "qt_dead_widget_" ) ) { s.remove( 0, TQString( "qt_dead_widget_" ).length() ); @@ -1794,16 +1794,16 @@ void AddActionToToolBarCommand::execute() } toolBar->insertAction( ( (TQDesignerAction*)action )->widget(), action ); ( (TQDesignerAction*)action )->widget()->installEventFilter( toolBar ); - } else if ( ::qt_cast<TQDesignerActionGroup*>(action) ) { + } else if ( ::tqt_cast<TQDesignerActionGroup*>(action) ) { if ( ( (TQDesignerActionGroup*)action )->usesDropDown() ) { toolBar->insertAction( ( (TQDesignerActionGroup*)action )->widget(), action ); ( (TQDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); } - } else if ( ::qt_cast<TQSeparatorAction*>(action) ) { + } else if ( ::tqt_cast<TQSeparatorAction*>(action) ) { toolBar->insertAction( ( (TQSeparatorAction*)action )->widget(), action ); ( (TQSeparatorAction*)action )->widget()->installEventFilter( toolBar ); } - if ( !::qt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) { + if ( !::tqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) { if ( index == -1 ) toolBar->appendAction( action ); else @@ -1817,10 +1817,10 @@ void AddActionToToolBarCommand::execute() while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::qt_cast<TQAction*>(o) ) + if ( !::tqt_cast<TQAction*>(o) ) continue; // ### fix it for nested actiongroups - if ( ::qt_cast<TQDesignerAction*>(o) ) { + if ( ::tqt_cast<TQDesignerAction*>(o) ) { TQDesignerAction *ac = (TQDesignerAction*)o; toolBar->insertAction( ac->widget(), ac ); ac->widget()->installEventFilter( toolBar ); @@ -1840,7 +1840,7 @@ void AddActionToToolBarCommand::execute() void AddActionToToolBarCommand::unexecute() { - if ( ::qt_cast<TQDesignerAction*>(action) ) { + if ( ::tqt_cast<TQDesignerAction*>(action) ) { TQString s = ( (TQDesignerAction*)action )->widget()->name(); s.prepend( "qt_dead_widget_" ); ( (TQDesignerAction*)action )->widget()->setName( s ); @@ -1849,7 +1849,7 @@ void AddActionToToolBarCommand::unexecute() toolBar->removeAction( action ); action->removeFrom( toolBar ); TQObject::disconnect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) ); - if ( !::qt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) { + if ( !::tqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) { action->removeEventFilter( toolBar ); } else { if ( action->children() ) { @@ -1857,9 +1857,9 @@ void AddActionToToolBarCommand::unexecute() while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::qt_cast<TQAction*>(o) ) + if ( !::tqt_cast<TQAction*>(o) ) continue; - if ( ::qt_cast<TQDesignerAction*>(o) ) { + if ( ::tqt_cast<TQDesignerAction*>(o) ) { o->removeEventFilter( toolBar ); toolBar->removeAction( (TQAction*)o ); } diff --git a/tools/designer/designer/connectionitems.cpp b/tools/designer/designer/connectionitems.cpp index db73c966c..35d44c195 100644 --- a/tools/designer/designer/connectionitems.cpp +++ b/tools/designer/designer/connectionitems.cpp @@ -194,10 +194,10 @@ static void appendChildActions( TQAction *action, TQStringList &lst ) while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::qt_cast<TQAction*>(o) ) + if ( !::tqt_cast<TQAction*>(o) ) continue; lst << o->name(); - if ( o->children() && ::qt_cast<TQActionGroup*>(o) ) + if ( o->children() && ::tqt_cast<TQActionGroup*>(o) ) appendChildActions( (TQAction*)o, lst ); } } @@ -210,7 +210,7 @@ static TQStringList flatActions( const TQPtrList<TQAction> &l ) while ( it.current() ) { TQAction *action = it.current(); lst << action->name(); - if ( action->children() && ::qt_cast<TQActionGroup*>(action) ) + if ( action->children() && ::tqt_cast<TQActionGroup*>(action) ) appendChildActions( action, lst ); ++it; } @@ -232,9 +232,9 @@ SenderItem::SenderItem( TQTable *table, FormWindow *fw ) continue; } if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && - !::qt_cast<TQLayoutWidget*>(it.current()) && - !::qt_cast<Spacer*>(it.current()) && - !::qt_cast<SizeHandle*>(it.current()) && + !::tqt_cast<TQLayoutWidget*>(it.current()) && + !::tqt_cast<Spacer*>(it.current()) && + !::tqt_cast<SizeHandle*>(it.current()) && qstrcmp( it.current()->name(), "central widget" ) != 0 ) { lst << it.current()->name(); } @@ -289,9 +289,9 @@ ReceiverItem::ReceiverItem( TQTable *table, FormWindow *fw ) continue; } if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && - !::qt_cast<TQLayoutWidget*>(it.current()) && - !::qt_cast<Spacer*>(it.current()) && - !::qt_cast<SizeHandle*>(it.current()) && + !::tqt_cast<TQLayoutWidget*>(it.current()) && + !::tqt_cast<Spacer*>(it.current()) && + !::tqt_cast<SizeHandle*>(it.current()) && qstrcmp( it.current()->name(), "central widget" ) != 0 ) { lst << it.current()->name(); } @@ -353,7 +353,7 @@ void SignalItem::senderChanged( TQObject *sender ) TQStringList lst = TQStringList::fromStrList( sigs ); - if ( ::qt_cast<CustomWidget*>(sender) ) { + if ( ::tqt_cast<CustomWidget*>(sender) ) { MetaDataBase::CustomWidget *w = ( (CustomWidget*)sender )->customWidget(); for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) @@ -415,7 +415,7 @@ bool SlotItem::ignoreSlot( const char* slot ) const { #ifndef QT_NO_SQL if ( qstrcmp( slot, "update()" ) == 0 && - ::qt_cast<TQDataBrowser*>(lastReceiver) ) + ::tqt_cast<TQDataBrowser*>(lastReceiver) ) return FALSE; #endif @@ -485,7 +485,7 @@ void SlotItem::updateSlotList() } } - if ( ::qt_cast<CustomWidget*>(lastReceiver) ) { + if ( ::tqt_cast<CustomWidget*>(lastReceiver) ) { MetaDataBase::CustomWidget *w = ( (CustomWidget*)lastReceiver )->customWidget(); for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { diff --git a/tools/designer/designer/designerappiface.cpp b/tools/designer/designer/designerappiface.cpp index d1d215a71..4cba8db7f 100644 --- a/tools/designer/designer/designerappiface.cpp +++ b/tools/designer/designer/designerappiface.cpp @@ -197,7 +197,7 @@ TQPtrList<DesignerFormWindow> DesignerProjectImpl::formList() const while ( it.current() ) { TQObject *obj = it.current(); ++it; - TQWidget *par = ::qt_cast<FormWindow*>(obj->parent()); + TQWidget *par = ::tqt_cast<FormWindow*>(obj->parent()); if ( !obj->isWidgetType() || !par ) continue; @@ -964,7 +964,7 @@ void DesignerFormWindowImpl::onModificationChange( TQObject *receiver, const cha void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name ) { - if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); @@ -984,7 +984,7 @@ void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a ) { - if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); if ( !mw->child( 0, "MenuBarEditor" ) ) @@ -997,7 +997,7 @@ void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a ) void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu ) { - if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); if ( !mw->child( 0, "MenuBarEditor" ) ) @@ -1011,7 +1011,7 @@ void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu ) void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &name ) { - if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQToolBar *tb = new TQDesignerToolBar( mw ); @@ -1023,7 +1023,7 @@ void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &n void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a ) { - if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQDesignerToolBar *tb = (TQDesignerToolBar*)mw->child( tbn, "TQDesignerToolBar" ); @@ -1035,7 +1035,7 @@ void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn ) { - if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQDesignerToolBar *tb = (TQDesignerToolBar*)mw->child( tbn, "TQDesignerToolBar" ); diff --git a/tools/designer/designer/formwindow.cpp b/tools/designer/designer/formwindow.cpp index 50dd96207..405968be0 100644 --- a/tools/designer/designer/formwindow.cpp +++ b/tools/designer/designer/formwindow.cpp @@ -90,7 +90,7 @@ static void setCursorToAll( const TQCursor &c, TQWidget *start ) TQObjectList *l = (TQObjectList*)start->children(); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( o->isWidgetType() && !::qt_cast<SizeHandle*>(o) ) + if ( o->isWidgetType() && !::tqt_cast<SizeHandle*>(o) ) setCursorToAll( c, ( (TQWidget*)o ) ); } } @@ -105,7 +105,7 @@ static void restoreCursors( TQWidget *start, FormWindow *fw ) TQObjectList *l = (TQObjectList*)start->children(); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( o->isWidgetType() && !::qt_cast<SizeHandle*>(o) ) + if ( o->isWidgetType() && !::tqt_cast<SizeHandle*>(o) ) restoreCursors( ( (TQWidget*)o ), fw ); } } @@ -544,7 +544,7 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w ) ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.find(w) ) ) w = w->parentWidget(); - if ( ::qt_cast<TQMainWindow*>(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { + if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { e->accept(); mainwindow->popupFormWindowMenu( e->globalPos(), this ); } else { @@ -656,7 +656,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) break; validForBuddy = FALSE; if ( currTool == BUDDY_TOOL ) { - if ( !::qt_cast<TQLabel*>(w) ) + if ( !::tqt_cast<TQLabel*>(w) ) break; clearSelection( FALSE ); validForBuddy = TRUE; @@ -698,7 +698,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) for (;;) { int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( wid ) ); if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) && - !::qt_cast<TQLayoutWidget*>(wid) && !::qt_cast<TQSplitter*>(wid) ) { + !::tqt_cast<TQLayoutWidget*>(wid) && !::tqt_cast<TQSplitter*>(wid) ) { insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it break; } else { @@ -865,7 +865,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) wid = designerWidget( wid ); if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) newendWidget = wid; - if ( ::qt_cast<TQLayoutWidget*>(newendWidget) || ::qt_cast<Spacer*>(newendWidget) ) + if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) ) newendWidget = (TQWidget*)endWidget; drawRecRect = newendWidget != endWidget; if ( newendWidget && @@ -891,7 +891,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) newendWidget = wid; else newendWidget = 0; - if ( ::qt_cast<TQLayoutWidget*>(newendWidget) || ::qt_cast<Spacer*>(newendWidget) ) + if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) ) newendWidget = (TQWidget*)endWidget; drawRecRect = newendWidget != endWidget; if ( !newendWidget ) @@ -977,12 +977,12 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) bool emitSelChanged = FALSE; for ( TQMap<TQWidget*, TQPoint>::Iterator it = moving.begin(); it != moving.end(); ++it ) { TQWidget *i = it.key(); - if ( !emitSelChanged && ::qt_cast<TQButton*>(i) ) { - if ( ::qt_cast<TQButtonGroup*>(i->parentWidget()) || ::qt_cast<TQButtonGroup*>(wa) ) + if ( !emitSelChanged && ::tqt_cast<TQButton*>(i) ) { + if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqt_cast<TQButtonGroup*>(wa) ) emitSelChanged = TRUE; - if ( !::qt_cast<TQButtonGroup*>(wa) ) { + if ( !::tqt_cast<TQButtonGroup*>(wa) ) { MetaDataBase::setPropertyChanged( i, "buttonGroupId", FALSE ); - if ( ::qt_cast<TQButtonGroup*>(i->parentWidget()) ) + if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) ) ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); } } @@ -1194,7 +1194,7 @@ void FormWindow::selectWidget( TQObject *o, bool select ) return; } - if ( ::qt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { + if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { TQObject *opw = propertyWidget; propertyWidget = mainContainer(); if ( opw->isWidgetType() ) @@ -1203,7 +1203,7 @@ void FormWindow::selectWidget( TQObject *o, bool select ) return; } - if ( ::qt_cast<TQDesignerToolBar*>(o) ) + if ( ::tqt_cast<TQDesignerToolBar*>(o) ) return; if ( select ) { @@ -1920,7 +1920,7 @@ void FormWindow::checkAccels() find_accel( w->property( "title" ).toString(), accels, w ); if ( pageTitle ) find_accel( w->property( "pageTitle" ).toString(), accels, w ); - } else if ( ::qt_cast<MenuBarEditor*>(o) ) { + } else if ( ::tqt_cast<MenuBarEditor*>(o) ) { ((MenuBarEditor *)o)->checkAccels( accels ); } } @@ -2129,7 +2129,7 @@ void FormWindow::breakLayout( TQWidget *w ) Command *cmd = breakLayoutCommand( w ); if ( cmd ) commands.insert( 0, cmd ); - if ( !::qt_cast<TQLayoutWidget*>(w) && !::qt_cast<TQSplitter*>(w) ) + if ( !::tqt_cast<TQLayoutWidget*>(w) && !::tqt_cast<TQSplitter*>(w) ) break; } w = w->parentWidget(); @@ -2392,7 +2392,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) } } } - if ( ::qt_cast<TQMainWindow*>(mainContainer()) && !found ) { + if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && !found ) { TQObjectList *l = mainContainer()->queryList( "PopupMenuEditor" ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o != w && @@ -2406,7 +2406,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) } delete l; } - if ( ::qt_cast<TQMainWindow*>(mainContainer()) ) { + if ( ::tqt_cast<TQMainWindow*>(mainContainer()) ) { if ( !found ) { TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, TRUE ); for ( TQObject *o = l->first(); o; o = l->next() ) { @@ -2530,8 +2530,8 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) } for ( ; it.current(); ++it ) { - if ( ::qt_cast<TQLayoutWidget*>(it.current()) - || ::qt_cast<TQSplitter*>(it.current()) ) + if ( ::tqt_cast<TQLayoutWidget*>(it.current()) + || ::tqt_cast<TQSplitter*>(it.current()) ) continue; if ( !it.current()->isVisibleTo( this ) ) continue; @@ -2688,7 +2688,7 @@ DesignerFormWindow *FormWindow::iFace() bool FormWindow::isCentralWidget( TQObject *w ) const { - if ( !::qt_cast<TQMainWindow*>(mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(mainContainer()) ) return FALSE; return w == ( (TQMainWindow*)mainContainer() )->centralWidget(); } diff --git a/tools/designer/designer/hierarchyview.cpp b/tools/designer/designer/hierarchyview.cpp index b27ba3301..e96a86473 100644 --- a/tools/designer/designer/hierarchyview.cpp +++ b/tools/designer/designer/hierarchyview.cpp @@ -256,12 +256,12 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) if ( o->isWidgetType() ) { TQWidget *w = (TQWidget*)o; if ( !formWindow->widgets()->find( w ) ) { - if ( ::qt_cast<TQWidgetStack*>(w->parent()) ) { - if (::qt_cast<TQTabWidget*>(w->parent()->parent()) ) { + if ( ::tqt_cast<TQWidgetStack*>(w->parent()) ) { + if (::tqt_cast<TQTabWidget*>(w->parent()->parent()) ) { ((TQTabWidget*)w->parent()->parent())->showPage( w ); o = (TQWidget*)w->parent()->parent(); formWindow->emitUpdateProperties( formWindow->currentWidget() ); - } else if ( ::qt_cast<TQWizard*>(w->parent()->parent()) ) { + } else if ( ::tqt_cast<TQWizard*>(w->parent()->parent()) ) { ((TQDesignerWizard*)w->parent()->parent())-> setCurrentPage( ( (TQDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); o = (TQWidget*)w->parent()->parent(); @@ -271,15 +271,15 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) if ( (TQWidgetStack*)w->parent()->isA( "TQDesignerWidgetStack" ) ) ( (TQDesignerWidgetStack*)w->parent() )->updateButtons(); } - } else if ( ::qt_cast<TQMenuBar*>(w) || ::qt_cast<TQDockWindow*>(w) ) { + } else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQDockWindow*>(w) ) { formWindow->setActiveObject( w ); - } else if ( ::qt_cast<TQPopupMenu*>(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 { return 0; } } - } else if ( ::qt_cast<TQAction*>(o) ) { + } else if ( ::tqt_cast<TQAction*>(o) ) { MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o ); deselect = TRUE; } @@ -400,7 +400,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) return; bool fakeMainWindow = FALSE; - if ( ::qt_cast<TQMainWindow*>(o) ) { + if ( ::tqt_cast<TQMainWindow*>(o) ) { TQObject *cw = ( (TQMainWindow*)o )->centralWidget(); if ( cw ) { o = cw; @@ -409,7 +409,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) } TQListViewItem *item = 0; TQString className = WidgetFactory::classNameOf( o ); - if ( ::qt_cast<TQLayoutWidget*>(o) ) { + if ( ::tqt_cast<TQLayoutWidget*>(o) ) { switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) { case WidgetFactory::HBox: className = "HBox"; @@ -431,16 +431,16 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) #endif TQString name = o->name(); - if ( ::qt_cast<TQWidgetStack*>(o->parent()) ) { - if ( ::qt_cast<TQTabWidget*>(o->parent()->parent()) ) + if ( ::tqt_cast<TQWidgetStack*>(o->parent()) ) { + if ( ::tqt_cast<TQTabWidget*>(o->parent()->parent()) ) name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o ); - else if ( ::qt_cast<TQWizard*>(o->parent()->parent()) ) + else if ( ::tqt_cast<TQWizard*>(o->parent()->parent()) ) name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o ); } TQToolBox *tb; if ( o->parent() && o->parent()->parent() && - (tb = ::qt_cast<TQToolBox*>(o->parent()->parent()->parent())) ) + (tb = ::tqt_cast<TQToolBox*>(o->parent()->parent()->parent())) ) name = tb->itemLabel( tb->indexOf((TQWidget*)o) ); if ( fakeMainWindow ) { @@ -455,18 +455,18 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) item->setOpen( TRUE ); if ( !parent ) item->setPixmap( 0, TQPixmap::fromMimeSource( "designer_form.png" ) ); - else if ( ::qt_cast<TQLayoutWidget*>(o) ) + else if ( ::tqt_cast<TQLayoutWidget*>(o) ) item->setPixmap( 0, TQPixmap::fromMimeSource( "designer_layout.png" )); else item->setPixmap( 0, WidgetDatabase::iconSet( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ). pixmap( TQIconSet::Small, TQIconSet::Normal ) ); - if ( ::qt_cast<TQAction*>(o) ) + if ( ::tqt_cast<TQAction*>(o) ) item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() ); ( (HierarchyItem*)item )->setObject( o ); const TQObjectList *l = o->children(); - if ( ::qt_cast<TQDesignerToolBar*>(o) ) + if ( ::tqt_cast<TQDesignerToolBar*>(o) ) l = 0; if ( l ) { TQObjectListIt it( *l ); @@ -476,13 +476,13 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) ( (TQWidget*)it.current() )->isHidden() ) continue; if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { - if ( ::qt_cast<TQWidgetStack*>(it.current()->parent()) || - ::qt_cast<TQWidgetStack*>(it.current()) ) { + if ( ::tqt_cast<TQWidgetStack*>(it.current()->parent()) || + ::tqt_cast<TQWidgetStack*>(it.current()) ) { TQObject *obj = it.current(); - TQDesignerTabWidget *tw = ::qt_cast<TQDesignerTabWidget*>(it.current()->parent()); - TQDesignerWizard *dw = ::qt_cast<TQDesignerWizard*>(it.current()->parent()); + TQDesignerTabWidget *tw = ::tqt_cast<TQDesignerTabWidget*>(it.current()->parent()); + TQDesignerWizard *dw = ::tqt_cast<TQDesignerWizard*>(it.current()->parent()); TQWidgetStack *stack = 0; - if ( dw || tw || ::qt_cast<TQWidgetStack*>(obj) ) + if ( dw || tw || ::tqt_cast<TQWidgetStack*>(obj) ) stack = (TQWidgetStack*)obj; else stack = (TQWidgetStack*)obj->parent(); @@ -503,8 +503,8 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) insertObject( obj, item ); } delete l2; - } else if ( ::qt_cast<TQToolBox*>(it.current()->parent()) ) { - if ( !::qt_cast<TQScrollView*>(it.current()) ) + } else if ( ::tqt_cast<TQToolBox*>(it.current()->parent()) ) { + if ( !::tqt_cast<TQScrollView*>(it.current()) ) continue; TQToolBox *tb = (TQToolBox*)it.current()->parent(); for ( int i = tb->count() - 1; i >= 0; --i ) @@ -526,9 +526,9 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) for ( obj = l->first(); obj; obj = l->next() ) insertObject( obj, item ); delete l; - } else if ( ::qt_cast<TQDesignerToolBar*>(o) || ::qt_cast<PopupMenuEditor*>(o) ) { + } else if ( ::tqt_cast<TQDesignerToolBar*>(o) || ::tqt_cast<PopupMenuEditor*>(o) ) { TQPtrList<TQAction> actions; - if ( ::qt_cast<TQDesignerToolBar*>(o) ) + if ( ::tqt_cast<TQDesignerToolBar*>(o) ) actions = ( (TQDesignerToolBar*)o )->insertedActions(); else ( (PopupMenuEditor*)o )->insertedActions( actions ); @@ -537,31 +537,31 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) it.toLast(); while ( it.current() ) { TQAction *a = it.current(); - if ( ::qt_cast<TQDesignerAction*>(a) ) { + if ( ::tqt_cast<TQDesignerAction*>(a) ) { TQDesignerAction *da = (TQDesignerAction*)a; if ( da->supportsMenu() ) insertObject( da, item ); else insertObject( da->widget(), item ); - } else if ( ::qt_cast<TQDesignerActionGroup*>(a) ) { + } else if ( ::tqt_cast<TQDesignerActionGroup*>(a) ) { insertObject( a, item ); } --it; } - } else if ( ::qt_cast<TQDesignerActionGroup*>(o) && o->children() ) { + } else if ( ::tqt_cast<TQDesignerActionGroup*>(o) && o->children() ) { TQObjectList *l = (TQObjectList*)o->children(); for ( TQObject *obj = l->last(); obj; obj = l->prev() ) { - if ( ::qt_cast<TQDesignerAction*>(obj) ) { + if ( ::tqt_cast<TQDesignerAction*>(obj) ) { TQDesignerAction *da = (TQDesignerAction*)obj; if ( da->supportsMenu() ) insertObject( da, item ); else insertObject( da->widget(), item ); - } else if ( ::qt_cast<TQDesignerActionGroup*>(obj) ) { + } else if ( ::tqt_cast<TQDesignerActionGroup*>(obj) ) { insertObject( obj, item ); } } - } else if ( ::qt_cast<MenuBarEditor*>(o) ) { + } else if ( ::tqt_cast<MenuBarEditor*>(o) ) { MenuBarEditor *mb = (MenuBarEditor*)o; for ( int i = mb->count() -1; i >= 0; --i ) { MenuBarEditorItem *md = mb->item( i ); @@ -602,7 +602,7 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) TQWidget *w = (TQWidget*)o; if ( w->isVisibleTo( formWindow ) ) { - if ( !::qt_cast<TQTabWidget*>(w) && !::qt_cast<TQWizard*>(w) ) { + if ( !::tqt_cast<TQTabWidget*>(w) && !::tqt_cast<TQWizard*>(w) ) { if ( !normalMenu ) normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this ); normalMenu->popup( p ); @@ -623,14 +623,14 @@ void HierarchyList::addTabPage() if ( !o || !o->isWidgetType() ) return; TQWidget *w = (TQWidget*)o; - if ( ::qt_cast<TQTabWidget*>(w) ) { + if ( ::tqt_cast<TQTabWidget*>(w) ) { TQTabWidget *tw = (TQTabWidget*)w; AddTabPageCommand *cmd = new AddTabPageCommand( tr( "Add Page to %1" ). arg( tw->name() ), formWindow, tw, "Tab" ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - } else if ( ::qt_cast<TQWizard*>(w) ) { + } else if ( ::tqt_cast<TQWizard*>(w) ) { TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); AddWizardPageCommand *cmd = new AddWizardPageCommand( tr( "Add Page to %1" ). arg( wiz->name() ), formWindow, @@ -646,7 +646,7 @@ void HierarchyList::removeTabPage() if ( !o || !o->isWidgetType() ) return; TQWidget *w = (TQWidget*)o; - if ( ::qt_cast<TQTabWidget*>(w) ) { + if ( ::tqt_cast<TQTabWidget*>(w) ) { TQTabWidget *tw = (TQTabWidget*)w; if ( tw->currentPage() ) { TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw; @@ -657,7 +657,7 @@ void HierarchyList::removeTabPage() formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); } - } else if ( ::qt_cast<TQWizard*>(w) ) { + } else if ( ::tqt_cast<TQWizard*>(w) ) { TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); if ( wiz->currentPage() ) { TQDesignerWizard *dw = (TQDesignerWizard*)wiz; @@ -1437,7 +1437,7 @@ void HierarchyView::widgetsRemoved( const TQWidgetList & ) void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & ) { TQWidget *w2 = w; - if ( ::qt_cast<TQMainWindow*>(w) ) + if ( ::tqt_cast<TQMainWindow*>(w) ) w2 = ( (TQMainWindow*)w )->centralWidget(); listview->changeNameOf( w2, w->name() ); } diff --git a/tools/designer/designer/layout.cpp b/tools/designer/designer/layout.cpp index 5262e49cb..49e2c442a 100644 --- a/tools/designer/designer/layout.cpp +++ b/tools/designer/designer/layout.cpp @@ -174,7 +174,7 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent ) for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) w->raise(); needMove = !layoutBase; - needReparent = needMove || ::qt_cast<TQLayoutWidget*>(layoutBase) || ::qt_cast<TQSplitter*>(layoutBase); + needReparent = needMove || ::tqt_cast<TQLayoutWidget*>(layoutBase) || ::tqt_cast<TQSplitter*>(layoutBase); if ( !layoutBase ) { if ( !useSplitter ) layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLayoutWidget" ), @@ -223,7 +223,7 @@ void Layout::undoLayout() } formWindow->selectWidget( layoutBase, FALSE ); WidgetFactory::deleteLayout( layoutBase ); - if ( parent != layoutBase && !::qt_cast<TQMainWindow*>(layoutBase) ) { + if ( parent != layoutBase && !::tqt_cast<TQMainWindow*>(layoutBase) ) { layoutBase->hide(); TQString n = layoutBase->name(); n.prepend( "qt_dead_widget_" ); @@ -328,13 +328,13 @@ void HorizontalLayout::doLayout() layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); else layout->addWidget( w ); - if ( ::qt_cast<TQLayoutWidget*>(w) ) + if ( ::tqt_cast<TQLayoutWidget*>(w) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); } w->show(); } - if ( ::qt_cast<TQSplitter*>(layoutBase) ) + if ( ::tqt_cast<TQSplitter*>(layoutBase) ) ( (TQSplitter*)layoutBase )->setOrientation( TQt::Horizontal ); finishLayout( needMove, layout ); @@ -392,13 +392,13 @@ void VerticalLayout::doLayout() layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); else layout->addWidget( w ); - if ( ::qt_cast<TQLayoutWidget*>(w) ) + if ( ::tqt_cast<TQLayoutWidget*>(w) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); } w->show(); } - if ( ::qt_cast<TQSplitter*>(layoutBase) ) + if ( ::tqt_cast<TQSplitter*>(layoutBase) ) ( (TQSplitter*)layoutBase )->setOrientation( TQt::Vertical ); finishLayout( needMove, layout ); @@ -766,11 +766,11 @@ void GridLayout::doLayout() if ( needReparent && w->parent() != layoutBase ) w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); if ( rs * cs == 1 ) { - layout->addWidget( w, r, c, ::qt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 ); + layout->addWidget( w, r, c, ::tqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 ); } else { - layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::qt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 ); + layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::tqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 ); } - if ( ::qt_cast<TQLayoutWidget*>(w) ) + if ( ::tqt_cast<TQLayoutWidget*>(w) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); w->show(); } else { diff --git a/tools/designer/designer/mainwindow.cpp b/tools/designer/designer/mainwindow.cpp index 315cbb631..4ae7c7a55 100644 --- a/tools/designer/designer/mainwindow.cpp +++ b/tools/designer/designer/mainwindow.cpp @@ -911,7 +911,7 @@ void MainWindow::showProperties( TQObject *o ) } if ( currentTool() == POINTER_TOOL && fw && - ( !qworkspace->activeWindow() || !::qt_cast<SourceEditor*>(qworkspace->activeWindow()) ) ) + ( !qworkspace->activeWindow() || !::tqt_cast<SourceEditor*>(qworkspace->activeWindow()) ) ) fw->setFocus(); } @@ -928,21 +928,21 @@ void MainWindow::updateProperties( TQObject * ) bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) { - if ( ::qt_cast<MenuBarEditor*>(o) || ::qt_cast<PopupMenuEditor*>(o) || + if ( ::tqt_cast<MenuBarEditor*>(o) || ::tqt_cast<PopupMenuEditor*>(o) || ( o && - ( ::qt_cast<MenuBarEditor*>(o->parent()) || - ::qt_cast<PopupMenuEditor*>(o->parent()) ) ) ) { + ( ::tqt_cast<MenuBarEditor*>(o->parent()) || + ::tqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) { - if ( e->type() == TQEvent::Accel && ::qt_cast<PopupMenuEditor*>(o) ) { + if ( e->type() == TQEvent::Accel && ::tqt_cast<PopupMenuEditor*>(o) ) { return TRUE; // consume accel events - } else if ( e->type() == TQEvent::MouseButtonPress && ::qt_cast<MenuBarEditor*>(o) ) { + } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<MenuBarEditor*>(o) ) { TQPoint pos = ((TQMouseEvent*)e)->pos(); - MenuBarEditor *m = ::qt_cast<MenuBarEditor*>(o); + MenuBarEditor *m = ::tqt_cast<MenuBarEditor*>(o); showProperties( o ); if ( m->findItem( pos ) >= m->count() ) m->setFocus(); - } else if ( e->type() == TQEvent::MouseButtonPress && ::qt_cast<PopupMenuEditor*>(o) ) { - PopupMenuEditor *m = ::qt_cast<PopupMenuEditor*>(o); + } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<PopupMenuEditor*>(o) ) { + PopupMenuEditor *m = ::tqt_cast<PopupMenuEditor*>(o); PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() ); if ( m->find( i->action() ) != -1 && !i->isSeparator() ) showProperties( i->action() ); @@ -961,7 +961,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) { w = (TQWidget*)o; while ( w ) { - if ( ::qt_cast<PropertyList*>(w) ) + if ( ::tqt_cast<PropertyList*>(w) ) break; w = w->parentWidget( TRUE ); } @@ -977,7 +977,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ( (TQKeyEvent*)e )->key() == Key_E ) && ( (TQKeyEvent*)e )->state() & ControlButton ) { if ( qWorkspace()->activeWindow() && - ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (TQKeyEvent*)e )->ignore(); return TRUE; } @@ -986,44 +986,44 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::ContextMenu: case TQEvent::MouseButtonPress: if ( o && currentTool() == POINTER_TOOL && - ( ::qt_cast<MenuBarEditor*>(o) || - ::qt_cast<PopupMenuEditor*>(o) || - ::qt_cast<TQDesignerToolBar*>(o) || - ( ::qt_cast<TQComboBox*>(o) || - ::qt_cast<TQToolButton*>(o) || - ::qt_cast<TQDesignerToolBarSeparator*>(o) ) && + ( ::tqt_cast<MenuBarEditor*>(o) || + ::tqt_cast<PopupMenuEditor*>(o) || + ::tqt_cast<TQDesignerToolBar*>(o) || + ( ::tqt_cast<TQComboBox*>(o) || + ::tqt_cast<TQToolButton*>(o) || + ::tqt_cast<TQDesignerToolBarSeparator*>(o) ) && o->parent() - && ( ::qt_cast<TQDesignerToolBar*>(o->parent()) - || ::qt_cast<TQDesignerWidgetStack*>(o->parent())) ) ) { + && ( ::tqt_cast<TQDesignerToolBar*>(o->parent()) + || ::tqt_cast<TQDesignerWidgetStack*>(o->parent())) ) ) { TQWidget *w = (TQWidget*)o; - if ( ::qt_cast<TQToolButton*>(w) || - ::qt_cast<TQComboBox*>(w) || - ::qt_cast<PopupMenuEditor*>(w) || - ::qt_cast<TQDesignerToolBarSeparator*>(w) ) + if ( ::tqt_cast<TQToolButton*>(w) || + ::tqt_cast<TQComboBox*>(w) || + ::tqt_cast<PopupMenuEditor*>(w) || + ::tqt_cast<TQDesignerToolBarSeparator*>(w) ) w = w->parentWidget(); TQWidget *pw = w->parentWidget(); while ( pw ) { - if ( ::qt_cast<FormWindow*>(pw) ) { + if ( ::tqt_cast<FormWindow*>(pw) ) { ( (FormWindow*)pw )->emitShowProperties( w ); - if ( !::qt_cast<TQDesignerToolBar*>(o) ) - return ( !::qt_cast<TQToolButton*>(o) && - !::qt_cast<MenuBarEditor*>(o) && - !::qt_cast<TQComboBox*>(o) && - !::qt_cast<TQDesignerToolBarSeparator*>(o) ); + if ( !::tqt_cast<TQDesignerToolBar*>(o) ) + return ( !::tqt_cast<TQToolButton*>(o) && + !::tqt_cast<MenuBarEditor*>(o) && + !::tqt_cast<TQComboBox*>(o) && + !::tqt_cast<TQDesignerToolBarSeparator*>(o) ); } pw = pw->parentWidget(); } } - if ( o && ( ::qt_cast<TQDesignerToolBar*>(o) || o->inherits("TQDockWindowHandle") ) + if ( o && ( ::tqt_cast<TQDesignerToolBar*>(o) || o->inherits("TQDockWindowHandle") ) && e->type() == TQEvent::ContextMenu ) break; if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) break; - if ( ::qt_cast<TQSizeGrip*>(o) ) + if ( ::tqt_cast<TQSizeGrip*>(o) ) break; if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) break; if ( !w->hasFocus() ) w->setFocus(); @@ -1048,11 +1048,11 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) lastPressWidget = 0; if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) break; - if ( ::qt_cast<TQSizeGrip*>(o) ) + if ( ::tqt_cast<TQSizeGrip*>(o) ) break; if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) break; passiveInteractor = WidgetFactory::isPassiveInteractor( o ); if ( !passiveInteractor ) @@ -1068,15 +1068,15 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; w = isAFormWindowChild( o ); if ( lastPressWidget != (TQWidget*)o && w && - !::qt_cast<SizeHandle*>(o) && !::qt_cast<OrderIndicator*>(o) && - !::qt_cast<PopupMenuEditor*>(o) && !::qt_cast<TQMenuBar*>(o) && - !::qt_cast<TQSizeGrip*>(o) ) + !::tqt_cast<SizeHandle*>(o) && !::tqt_cast<OrderIndicator*>(o) && + !::tqt_cast<PopupMenuEditor*>(o) && !::tqt_cast<TQMenuBar*>(o) && + !::tqt_cast<TQSizeGrip*>(o) ) return TRUE; - if ( o && ::qt_cast<TQSizeGrip*>(o) ) + if ( o && ::tqt_cast<TQSizeGrip*>(o) ) break; if ( lastPressWidget != (TQWidget*)o || - ( !w || ::qt_cast<SizeHandle*>(o) ) || - ::qt_cast<OrderIndicator*>(o) ) + ( !w || ::tqt_cast<SizeHandle*>(o) ) || + ::tqt_cast<OrderIndicator*>(o) ) break; passiveInteractor = WidgetFactory::isPassiveInteractor( o ); if ( !passiveInteractor ) @@ -1089,14 +1089,14 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return FALSE; } if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) { - if ( ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + if ( ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { qWorkspace()->activeWindow()->setFocus(); return TRUE; } } if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) break; ( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( ((TQKeyEvent*)e)->isAccepted() ) @@ -1104,10 +1104,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::MouseButtonDblClick: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) { - if ( ::qt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() && - o->parent() && ::qt_cast<TQToolBar*>(o->parent()) && formWindow() ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) { + if ( ::tqt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() && + o->parent() && ::tqt_cast<TQToolBar*>(o->parent()) && formWindow() ) formWindow()->setToolFixed(); break; } @@ -1121,8 +1121,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return TRUE; case TQEvent::KeyRelease: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) break; ( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( ((TQKeyEvent*)e)->isAccepted() ) @@ -1130,8 +1130,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::Hide: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) break; if ( ( (FormWindow*)w )->isWidgetSelected( (TQWidget*)o ) ) ( (FormWindow*)w )->selectWidget( (TQWidget*)o, FALSE ); @@ -1139,16 +1139,16 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::Enter: case TQEvent::Leave: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) || - ::qt_cast<MenuBarEditor*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) || + ::tqt_cast<MenuBarEditor*>(o) ) break; return TRUE; case TQEvent::Resize: case TQEvent::Move: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) break; if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) { ( (FormWindow*)w )->updateSelection( (TQWidget*)o ); @@ -1194,33 +1194,33 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return TRUE; case TQEvent::Wheel: if ( !( w = isAFormWindowChild( o ) ) || - ::qt_cast<SizeHandle*>(o) || - ::qt_cast<OrderIndicator*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) break; return TRUE; case TQEvent::FocusIn: - if ( !::qt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) + if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) return TRUE; //FIXME if ( hierarchyView->formDefinitionView()->isRenaming() - && ( o->inherits( "Editor" ) || ::qt_cast<FormWindow*>(o) ) ) + && ( o->inherits( "Editor" ) || ::tqt_cast<FormWindow*>(o) ) ) TQApplication::sendPostedEvents(); if ( o->inherits( "Editor" ) ) { TQWidget *w = (TQWidget*)o; while ( w ) { - if ( ::qt_cast<SourceEditor*>(w) ) + if ( ::tqt_cast<SourceEditor*>(w) ) break; w = w->parentWidget( TRUE ); } - if ( ::qt_cast<SourceEditor*>(w) ) + if ( ::tqt_cast<SourceEditor*>(w) ) ( (SourceEditor*)w )->checkTimeStamp(); - } else if ( ::qt_cast<FormWindow*>(o) ) { + } else if ( ::tqt_cast<FormWindow*>(o) ) { FormWindow *fw = (FormWindow*)o; if ( fw->formFile() && fw->formFile()->editor() ) fw->formFile()->editor()->checkTimeStamp(); } break; case TQEvent::FocusOut: - if ( !::qt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) + if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) return TRUE; break; default: @@ -1232,10 +1232,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const { - if ( ::qt_cast<TQWizard*>(o->parent()) && !::qt_cast<TQPushButton*>(o) ) + if ( ::tqt_cast<TQWizard*>(o->parent()) && !::tqt_cast<TQPushButton*>(o) ) return 0; while ( o ) { - if ( ::qt_cast<FormWindow*>(o) ) + if ( ::tqt_cast<FormWindow*>(o) ) return (TQWidget*)o; o = o->parent(); } @@ -1245,9 +1245,9 @@ TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const { while ( o ) { - if ( ::qt_cast<TQDesignerToolBar*>(o) ) + if ( ::tqt_cast<TQDesignerToolBar*>(o) ) return (TQWidget*)o; - if ( ::qt_cast<FormWindow*>(o) ) + if ( ::tqt_cast<FormWindow*>(o) ) return 0; o = o->parent(); } @@ -1258,7 +1258,7 @@ FormWindow *MainWindow::formWindow() { if ( qworkspace->activeWindow() ) { FormWindow *fw = 0; - if ( ::qt_cast<FormWindow*>(qworkspace->activeWindow()) ) + if ( ::tqt_cast<FormWindow*>(qworkspace->activeWindow()) ) fw = (FormWindow*)qworkspace->activeWindow(); else if ( lastActiveFormWindow && qworkspace->windowList().find( lastActiveFormWindow ) != -1) @@ -1370,7 +1370,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) void MainWindow::activeWindowChanged( TQWidget *w ) { TQWidget *old = formWindow(); - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { FormWindow *fw = (FormWindow*)w; FormWindow *ofw = lastActiveFormWindow; lastActiveFormWindow = fw; @@ -1384,13 +1384,13 @@ void MainWindow::activeWindowChanged( TQWidget *w ) } workspace()->activeFormChanged( fw ); setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), - ::qt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) ); + ::tqt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) ); if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) { if ( actionEditor->wantToBeShown() ) actionEditor->parentWidget()->show(); } else { TQWidget *mc = 0; - if ( ofw && (mc = ofw->mainContainer()) && ::qt_cast<TQMainWindow*>(mc) ) + if ( ofw && (mc = ofw->mainContainer()) && ::tqt_cast<TQMainWindow*>(mc) ) actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() ); actionEditor->parentWidget()->hide(); } @@ -1425,7 +1425,7 @@ void MainWindow::activeWindowChanged( TQWidget *w ) selectionChanged(); - if ( ::qt_cast<SourceEditor*>(w) ) { + if ( ::tqt_cast<SourceEditor*>(w) ) { SourceEditor *se = (SourceEditor*)w; TQGuardedPtr<FormWindow> fw = se->formWindow(); if ( se->formWindow() && @@ -1480,7 +1480,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, const TQString &undoCmd, const TQString &redoCmd ) { if ( qWorkspace()->activeWindow() && - ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; // do not set a formWindow related command actionEditUndo->setEnabled( undoAvailable ); actionEditRedo->setEnabled( redoAvailable ); @@ -1505,7 +1505,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, void MainWindow::updateEditorUndoRedo() { if ( !qWorkspace()->activeWindow() || - !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow(); actionEditUndo->setEnabled( editor->editIsUndoAvailable() ); @@ -1581,7 +1581,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int ids << ( id = rmbWidgets->insertItem( tr("Choose Pixmap..."), -1, 0) ); props.insert( "pixmap", id ); } - if ( text && text->designable(w) && !::qt_cast<TQTextEdit*>(w) ) { + if ( text && text->designable(w) && !::tqt_cast<TQTextEdit*>(w) ) { ids << ( id = rmbWidgets->insertItem( tr("Edit Text..."), -1, 0) ); props.insert( "text", id ); } @@ -1617,7 +1617,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, { int id; - if ( ::qt_cast<TQTabWidget*>(w) ) { + if ( ::tqt_cast<TQTabWidget*>(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); if ( ( (TQDesignerTabWidget*)w )->count() > 1) { @@ -1626,7 +1626,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, } ids << ( id = rmbWidgets->insertItem( tr("Add Page"), -1, 0 ) ); commands.insert( "add", id ); - } else if ( ::qt_cast<TQDesignerWidgetStack*>(w) ) { + } else if ( ::tqt_cast<TQDesignerWidgetStack*>(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); if ( ( (TQDesignerWidgetStack*)w )->count() > 1) { @@ -1640,7 +1640,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, } ids << ( id = rmbWidgets->insertItem( tr("Add Page"), -1, 0 ) ); commands.insert( "add", id ); - } else if ( ::qt_cast<TQToolBox*>(w) ) { + } else if ( ::tqt_cast<TQToolBox*>(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); if ( ( (TQToolBox*)w )->count() > 1 ) { @@ -1688,7 +1688,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, { int id; - if ( ::qt_cast<TQWizard*>(fw->mainContainer()) ) { + if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) { if ( ids.isEmpty() ) ids << rmbFormWindow->insertSeparator( 0 ); @@ -1706,7 +1706,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, ids << ( id = rmbFormWindow->insertItem( tr("Edit Pages..."), -1, 0 ) ); commands.insert( "edit", id ); - } else if ( ::qt_cast<TQMainWindow*>(fw->mainContainer()) ) { + } else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) { if ( ids.isEmpty() ) ids << rmbFormWindow->insertSeparator( 0 ); ids << ( id = rmbFormWindow->insertItem( tr( "Add Menu Item" ), -1, 0 ) ); @@ -1721,7 +1721,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid if ( id == props[ "text" ] ) { bool ok = FALSE; bool oldDoWrap = FALSE; - if ( ::qt_cast<TQLabel*>(w) ) { + if ( ::tqt_cast<TQLabel*>(w) ) { int align = w->property( "alignment" ).toInt(); if ( align & WordBreak ) oldDoWrap = TRUE; @@ -1729,8 +1729,8 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid bool doWrap = oldDoWrap; TQString text; - if ( ::qt_cast<TQTextView*>(w) || ::qt_cast<TQLabel*>(w) || ::qt_cast<TQButton*>(w) ) { - text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::qt_cast<TQButton*>(w), &doWrap ); + if ( ::tqt_cast<TQTextView*>(w) || ::tqt_cast<TQLabel*>(w) || ::tqt_cast<TQButton*>(w) ) { + text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqt_cast<TQButton*>(w), &doWrap ); ok = !text.isNull(); } else { text = TQInputDialog::getText( tr("Text"), tr( "New text" ), @@ -1799,7 +1799,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w ) { - if ( ::qt_cast<TQTabWidget*>(w) ) { + if ( ::tqt_cast<TQTabWidget*>(w) ) { TQTabWidget *tw = (TQTabWidget*)w; if ( id == commands[ "add" ] ) { AddTabPageCommand *cmd = @@ -1818,7 +1818,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command cmd->execute(); } } - } else if ( ::qt_cast<TQToolBox*>(w) ) { + } else if ( ::tqt_cast<TQToolBox*>(w) ) { TQToolBox *tb = (TQToolBox*)w; if ( id == commands[ "add" ] ) { AddToolBoxPageCommand *cmd = @@ -1838,7 +1838,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command cmd->execute(); } } - } else if ( ::qt_cast<TQWidgetStack*>(w) ) { + } else if ( ::tqt_cast<TQWidgetStack*>(w) ) { TQDesignerWidgetStack *ws = (TQDesignerWidgetStack*)w; if ( id == commands[ "add" ] ) { AddWidgetStackPageCommand *cmd = @@ -1939,7 +1939,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, FormWindow *fw ) { - if ( ::qt_cast<TQWizard*>(fw->mainContainer()) ) { + if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) { TQWizard *wiz = (TQWizard*)fw->mainContainer(); if ( id == commands[ "add" ] ) { AddWizardPageCommand *cmd = @@ -1977,7 +1977,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command cmd->execute(); } } - } else if ( ::qt_cast<TQMainWindow*>(fw->mainContainer()) ) { + } else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) { TQMainWindow *mw = (TQMainWindow*)fw->mainContainer(); if ( id == commands[ "add_toolbar" ] ) { AddToolBarCommand *cmd = @@ -1998,7 +1998,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command void MainWindow::clipboardChanged() { TQString text( tqApp->clipboard()->text() ); - if (qWorkspace()->activeWindow() && ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow())) { + if (qWorkspace()->activeWindow() && ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow())) { actionEditPaste->setEnabled(!text.isEmpty()); } else { TQString start( "<!DOCTYPE UI-SELECTION>" ); @@ -2494,7 +2494,7 @@ void MainWindow::closeEvent( TQCloseEvent *e ) while ( wit.current() ) { TQWidget *w = wit.current(); ++wit; - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->formFile()->editor() ) windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); if ( ( (FormWindow*)w )->formFile()->formWindow() ) @@ -2503,7 +2503,7 @@ void MainWindow::closeEvent( TQCloseEvent *e ) e->ignore(); return; } - } else if ( ::qt_cast<SourceEditor*>(w) ) { + } else if ( ::tqt_cast<SourceEditor*>(w) ) { if ( !( (SourceEditor*)w )->close() ) { e->ignore(); return; @@ -2627,7 +2627,7 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) if ( text && text->designable(w) ) { bool ok = FALSE; bool oldDoWrap = FALSE; - if ( ::qt_cast<TQLabel*>(w) ) { + if ( ::tqt_cast<TQLabel*>(w) ) { int align = w->property( "alignment" ).toInt(); if ( align & WordBreak ) oldDoWrap = TRUE; @@ -2635,9 +2635,9 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) bool doWrap = oldDoWrap; TQString text; - if ( ::qt_cast<TQTextEdit*>(w) || ::qt_cast<TQLabel*>(w) || ::qt_cast<TQButton*>(w) ) { + if ( ::tqt_cast<TQTextEdit*>(w) || ::tqt_cast<TQLabel*>(w) || ::tqt_cast<TQButton*>(w) ) { text = MultiLineEditor::getText( this, w->property( "text" ).toString(), - !::qt_cast<TQButton*>(w), &doWrap ); + !::tqt_cast<TQButton*>(w), &doWrap ); ok = !text.isNull(); } else { text = TQInputDialog::getText( tr("Text"), tr( "New text" ), @@ -2751,7 +2751,7 @@ bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) { TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) ) return TRUE; } @@ -2766,7 +2766,7 @@ void MainWindow::setGrid( const TQPoint &p ) grd = p; TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::qt_cast<FormWindow*>(w) ) + if ( !::tqt_cast<FormWindow*>(w) ) continue; ( (FormWindow*)w )->mainContainer()->update(); } @@ -2779,7 +2779,7 @@ void MainWindow::setShowGrid( bool b ) sGrid = b; TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::qt_cast<FormWindow*>(w) ) + if ( !::tqt_cast<FormWindow*>(w) ) continue; ( (FormWindow*)w )->mainContainer()->update(); } @@ -2865,48 +2865,48 @@ void MainWindow::showDialogHelp() TQString link = documentationPath() + "/designer-manual-13.html#"; - if ( ::qt_cast<NewFormBase*>(w) || ::qt_cast<StartDialogBase*>(w) ) // own doc for startdialog? + if ( ::tqt_cast<NewFormBase*>(w) || ::tqt_cast<StartDialogBase*>(w) ) // own doc for startdialog? link += "dialog-file-new"; - else if ( ::qt_cast<CreateTemplate*>(w) ) + else if ( ::tqt_cast<CreateTemplate*>(w) ) link += "dialog-file-create-template"; - else if ( ::qt_cast<EditFunctionsBase*>(w) ) + else if ( ::tqt_cast<EditFunctionsBase*>(w) ) link += "dialog-edit-functions"; -// else if ( ::qt_cast<ConnectionViewerBase*>(w) ) +// else if ( ::tqt_cast<ConnectionViewerBase*>(w) ) else if ( w->inherits("ConnectionViewerBase") ) link += "dialog-view-connections"; - else if ( ::qt_cast<FormSettingsBase*>(w) ) + else if ( ::tqt_cast<FormSettingsBase*>(w) ) link += "dialog-edit-form-settings"; - else if ( ::qt_cast<Preferences*>(w) ) + else if ( ::tqt_cast<Preferences*>(w) ) link += "dialog-edit-preferences"; - else if ( ::qt_cast<PixmapCollectionEditor*>(w) ) + else if ( ::tqt_cast<PixmapCollectionEditor*>(w) ) link += "dialog-image-collection"; -// else if ( ::qt_cast<DatabaseConnectionBase*>(w) ) +// else if ( ::tqt_cast<DatabaseConnectionBase*>(w) ) else if ( w->inherits( "DatabaseConnectionBase" ) ) link += "dialog-edit-database-connections"; - else if ( ::qt_cast<ProjectSettingsBase*>(w) ) + else if ( ::tqt_cast<ProjectSettingsBase*>(w) ) link += "dialog-project-settings"; - else if ( ::qt_cast<FindDialog*>(w) ) + else if ( ::tqt_cast<FindDialog*>(w) ) link += "dialog-find-text"; - else if ( ::qt_cast<ReplaceDialog*>(w) ) + else if ( ::tqt_cast<ReplaceDialog*>(w) ) link += "dialog-replace-text"; - else if ( ::qt_cast<GotoLineDialog*>(w) ) + else if ( ::tqt_cast<GotoLineDialog*>(w) ) link += "dialog-go-to-line"; -// else if ( ::qt_cast<ConnectionEditorBase*>(w) ) +// else if ( ::tqt_cast<ConnectionEditorBase*>(w) ) else if ( w->inherits("ConnectionEditorBase") ) link += "dialog-edit-connections"; - else if ( ::qt_cast<CustomWidgetEditorBase*>(w) ) + else if ( ::tqt_cast<CustomWidgetEditorBase*>(w) ) link += "dialog-edit-custom-widgets"; - else if ( ::qt_cast<PaletteEditorBase*>(w) ) + else if ( ::tqt_cast<PaletteEditorBase*>(w) ) link += "dialog-edit-palette"; - else if ( ::qt_cast<ListBoxEditorBase*>(w) ) + else if ( ::tqt_cast<ListBoxEditorBase*>(w) ) link += "dialog-edit-listbox"; - else if ( ::qt_cast<ListViewEditorBase*>(w) ) + else if ( ::tqt_cast<ListViewEditorBase*>(w) ) link += "dialog-edit-listview"; - else if ( ::qt_cast<IconViewEditorBase*>(w) ) + else if ( ::tqt_cast<IconViewEditorBase*>(w) ) link += "dialog-edit-iconview"; - else if ( ::qt_cast<TableEditorBase*>(w) ) + else if ( ::tqt_cast<TableEditorBase*>(w) ) link += "dialog-edit-table"; - else if ( ::qt_cast<MultiLineEditor*>(w) ) + else if ( ::tqt_cast<MultiLineEditor*>(w) ) link += "dialog-text"; else { @@ -3194,10 +3194,10 @@ void MainWindow::setModified( bool b, TQWidget *window ) { TQWidget *w = window; while ( w ) { - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { ( (FormWindow*)w )->modificationChanged( b ); return; - } else if ( ::qt_cast<SourceEditor*>(w) ) { + } else if ( ::tqt_cast<SourceEditor*>(w) ) { FormWindow *fw = ( (SourceEditor*)w )->formWindow(); if ( fw && !fw->isFake() ) { //fw->commandHistory()->setModified( b ); @@ -3232,7 +3232,7 @@ void MainWindow::doFunctionsChanged() void MainWindow::updateFunctionList() { - if ( !qWorkspace()->activeWindow() || !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow(); se->save(); @@ -3321,9 +3321,9 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) FormWindow *fw = 0; SourceEditor *se = 0; SourceFile *sf = 0; - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { fw = (FormWindow*)w; - } else if ( ::qt_cast<SourceEditor*>(w) ) { + } else if ( ::tqt_cast<SourceEditor*>(w) ) { se = (SourceEditor*)w; if ( !se->object() ) continue; @@ -3391,7 +3391,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) } } - if ( ::qt_cast<SourceFile*>(o) ) { + if ( ::tqt_cast<SourceFile*>(o) ) { for ( TQPtrListIterator<SourceFile> sources = currentProject->sourceFiles(); sources.current(); ++sources ) { SourceFile* f = sources.current(); @@ -3453,12 +3453,12 @@ TQObject *MainWindow::findRealObject( TQObject *o ) { TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::qt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) ) + if ( ::tqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) ) return w; - else if ( ::qt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() && + else if ( ::tqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() && TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) ) return w; - else if ( ::qt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() && + else if ( ::tqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() && ( (SourceEditor*)w )->sourceFile() == o ) return o; } @@ -3479,7 +3479,7 @@ void MainWindow::breakPointsChanged() { if ( !inDebugMode ) return; - if ( !qWorkspace()->activeWindow() || !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow(); if ( !e->object() || !e->project() ) @@ -3646,13 +3646,13 @@ void MainWindow::setSingleProject( Project *pro ) while ( wit.current() ) { TQWidget *w = wit.current(); ++wit; - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->project() == pro ) { if ( ( (FormWindow*)w )->formFile()->editor() ) windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); ( (FormWindow*)w )->formFile()->close(); } - } else if ( ::qt_cast<SourceEditor*>(w) ) { + } else if ( ::tqt_cast<SourceEditor*>(w) ) { ( (SourceEditor*)w )->close(); } } diff --git a/tools/designer/designer/mainwindowactions.cpp b/tools/designer/designer/mainwindowactions.cpp index 69708a37c..7228e29fc 100644 --- a/tools/designer/designer/mainwindowactions.cpp +++ b/tools/designer/designer/mainwindowactions.cpp @@ -952,15 +952,15 @@ void MainWindow::setupWindowActions() int j = 0; for ( int i = 0; i < int( windows.count() ); ++i ) { TQWidget *w = windows.at( i ); - if ( !::qt_cast<FormWindow*>(w) && !::qt_cast<SourceEditor*>(w) ) + if ( !::tqt_cast<FormWindow*>(w) && !::tqt_cast<SourceEditor*>(w) ) continue; - if ( ::qt_cast<FormWindow*>(w) && ( ( (FormWindow*)w )->isFake() ) ) + if ( ::tqt_cast<FormWindow*>(w) && ( ( (FormWindow*)w )->isFake() ) ) continue; j++; TQString itemText; if ( j < 10 ) itemText = TQString("&%1 ").arg( j ); - if ( ::qt_cast<FormWindow*>(w) ) + if ( ::tqt_cast<FormWindow*>(w) ) itemText += w->name(); else itemText += w->caption(); @@ -1092,9 +1092,9 @@ void MainWindow::fileClose() } else { TQWidget *w = qworkspace->activeWindow(); if ( w ) { - if ( ::qt_cast<FormWindow*>(w) ) + if ( ::tqt_cast<FormWindow*>(w) ) ( (FormWindow*)w )->formFile()->close(); - else if ( ::qt_cast<SourceEditor*>(w) ) + else if ( ::tqt_cast<SourceEditor*>(w) ) ( (SourceEditor*)w )->close(); } } @@ -1139,14 +1139,14 @@ void MainWindow::fileCloseProject() while ( wit.current() ) { TQWidget *w = wit.current(); ++wit; - if ( ::qt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->project() == pro ) { if ( ( (FormWindow*)w )->formFile()->editor() ) windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); if ( !( (FormWindow*)w )->formFile()->close() ) return; } - } else if ( ::qt_cast<SourceEditor*>(w) ) { + } else if ( ::tqt_cast<SourceEditor*>(w) ) { if ( !( (SourceEditor*)w )->close() ) return; } @@ -1164,7 +1164,7 @@ void MainWindow::fileCloseProject() } if ( !windows.isEmpty() ) { for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if (!::qt_cast<FormWindow*>(w) || w->isHidden()) + if (!::tqt_cast<FormWindow*>(w) || w->isHidden()) continue; w->setFocus(); activeWindowChanged( w ); @@ -1361,7 +1361,7 @@ bool MainWindow::fileSaveForm() TQWidget *w = qWorkspace()->activeWindow(); if ( w ) { - if ( ::qt_cast<SourceEditor*>(w) ) { + if ( ::tqt_cast<SourceEditor*>(w) ) { SourceEditor *se = (SourceEditor*)w; if ( se->formWindow() ) fw = se->formWindow(); @@ -1394,9 +1394,9 @@ bool MainWindow::fileSaveAs() TQWidget *w = qworkspace->activeWindow(); if ( !w ) return TRUE; - if ( ::qt_cast<FormWindow*>(w) ) + if ( ::tqt_cast<FormWindow*>(w) ) return ( (FormWindow*)w )->formFile()->saveAs(); - else if ( ::qt_cast<SourceEditor*>(w) ) + else if ( ::tqt_cast<SourceEditor*>(w) ) return ( (SourceEditor*)w )->saveAs(); return FALSE; } @@ -1493,7 +1493,7 @@ void MainWindow::createNewTemplate() void MainWindow::editUndo() { if ( qWorkspace()->activeWindow() && - ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editUndo(); return; } @@ -1504,7 +1504,7 @@ void MainWindow::editUndo() void MainWindow::editRedo() { if ( qWorkspace()->activeWindow() && - ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editRedo(); return; } @@ -1515,7 +1515,7 @@ void MainWindow::editRedo() void MainWindow::editCut() { if ( qWorkspace()->activeWindow() && - ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editCut(); return; } @@ -1526,7 +1526,7 @@ void MainWindow::editCut() void MainWindow::editCopy() { if ( qWorkspace()->activeWindow() && - ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editCopy(); return; } @@ -1537,7 +1537,7 @@ void MainWindow::editCopy() void MainWindow::editPaste() { if ( qWorkspace()->activeWindow() && - ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editPaste(); return; } @@ -1576,7 +1576,7 @@ void MainWindow::editDelete() void MainWindow::editSelectAll() { if ( qWorkspace()->activeWindow() && - ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editSelectAll(); return; } @@ -1955,7 +1955,7 @@ void MainWindow::editPreferences() void MainWindow::searchFind() { if ( !qWorkspace()->activeWindow() || - !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; if ( !findDialog ) @@ -1977,7 +1977,7 @@ void MainWindow::searchIncremetalFindMenu() void MainWindow::searchIncremetalFind() { if ( !qWorkspace()->activeWindow() || - !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), @@ -1987,7 +1987,7 @@ void MainWindow::searchIncremetalFind() void MainWindow::searchIncremetalFindNext() { if ( !qWorkspace()->activeWindow() || - !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), @@ -1997,7 +1997,7 @@ void MainWindow::searchIncremetalFindNext() void MainWindow::searchReplace() { if ( !qWorkspace()->activeWindow() || - !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; if ( !replaceDialog ) @@ -2013,7 +2013,7 @@ void MainWindow::searchReplace() void MainWindow::searchGotoLine() { if ( !qWorkspace()->activeWindow() || - !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; if ( !gotoLineDialog ) diff --git a/tools/designer/designer/menubareditor.cpp b/tools/designer/designer/menubareditor.cpp index 2667519ff..84e750343 100644 --- a/tools/designer/designer/menubareditor.cpp +++ b/tools/designer/designer/menubareditor.cpp @@ -823,7 +823,7 @@ void MenuBarEditor::keyPressEvent( TQKeyEvent * e ) void MenuBarEditor::focusOutEvent( TQFocusEvent * e ) { TQWidget * fw = tqApp->focusWidget(); - if ( e->lostFocus() && !::qt_cast<PopupMenuEditor*>(fw) ) + if ( e->lostFocus() && !::tqt_cast<PopupMenuEditor*>(fw) ) hideItem(); update(); } diff --git a/tools/designer/designer/metadatabase.cpp b/tools/designer/designer/metadatabase.cpp index e28d77f3e..81be8ccf8 100644 --- a/tools/designer/designer/metadatabase.cpp +++ b/tools/designer/designer/metadatabase.cpp @@ -322,7 +322,7 @@ int MetaDataBase::spacing( TQObject *o ) if ( !o ) return -1; setupDataBase(); - if ( ::qt_cast<TQMainWindow*>(o) ) + if ( ::tqt_cast<TQMainWindow*>(o) ) o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { @@ -353,9 +353,9 @@ void MetaDataBase::setMargin( TQObject *o, int margin ) bool isInnerLayout = TRUE; TQWidget *widget = (TQWidget*)o; - if ( widget && !::qt_cast<TQLayoutWidget*>(widget) && + if ( widget && !::tqt_cast<TQLayoutWidget*>(widget) && ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) || - widget && widget->parentWidget() && ::qt_cast<FormWindow*>(widget->parentWidget()) ) ) + widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) isInnerLayout = FALSE; @@ -379,7 +379,7 @@ int MetaDataBase::margin( TQObject *o ) if ( !o ) return -1; setupDataBase(); - if ( ::qt_cast<TQMainWindow*>(o) ) + if ( ::tqt_cast<TQMainWindow*>(o) ) o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { @@ -410,7 +410,7 @@ TQString MetaDataBase::resizeMode( TQObject *o ) if ( !o ) return TQString::null; setupDataBase(); - if ( ::qt_cast<TQMainWindow*>(o) ) + if ( ::tqt_cast<TQMainWindow*>(o) ) o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { @@ -441,15 +441,15 @@ void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString r->connections.append( conn ); if ( addCode ) { TQString rec = receiver->name(); - if ( ::qt_cast<FormWindow*>(o) && receiver == ( (FormWindow*)o )->mainContainer() ) + if ( ::tqt_cast<FormWindow*>(o) && receiver == ( (FormWindow*)o )->mainContainer() ) rec = "this"; TQString sen = sender->name(); - if ( ::qt_cast<FormWindow*>(o) && sender == ( (FormWindow*)o )->mainContainer() ) + if ( ::tqt_cast<FormWindow*>(o) && sender == ( (FormWindow*)o )->mainContainer() ) sen = "this"; FormFile *ff = 0; - if ( ::qt_cast<FormFile*>(o) ) + if ( ::tqt_cast<FormFile*>(o) ) ff = (FormFile*)o; - else if ( ::qt_cast<FormWindow*>(o) ) + else if ( ::tqt_cast<FormWindow*>(o) ) ff = ( (FormWindow*)o )->formFile(); ff->addConnection( sen, signal, rec, slot ); } @@ -477,7 +477,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr break; } } - if ( ::qt_cast<FormWindow*>(o) ) { + if ( ::tqt_cast<FormWindow*>(o) ) { TQString rec = receiver->name(); if ( receiver == ( (FormWindow*)o )->mainContainer() ) rec = "this"; @@ -495,7 +495,7 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte return; } - if ( !::qt_cast<FormFile*>(o) ) + if ( !::tqt_cast<FormFile*>(o) ) return; FormFile *formfile = (FormFile*)o; @@ -680,14 +680,14 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom if ( slotList.find( slot ) != -1 ) return TRUE; - if ( ::qt_cast<FormWindow*>(o) ) { + if ( ::tqt_cast<FormWindow*>(o) ) { o = ( (FormWindow*)o )->mainContainer(); slotList = o->metaObject()->slotNames( TRUE ); if ( slotList.find( slot ) != -1 ) return TRUE; } - //if ( ::qt_cast<CustomWidget*>(o) ) { + //if ( ::tqt_cast<CustomWidget*>(o) ) { if ( o->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { @@ -910,14 +910,14 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl if ( functionList.find( function ) != -1 ) return TRUE; - if ( ::qt_cast<FormWindow*>(o) ) { + if ( ::tqt_cast<FormWindow*>(o) ) { o = ( (FormWindow*)o )->mainContainer(); functionList = o->metaObject()->slotNames( TRUE ); if ( functionList.find( function ) != -1 ) return TRUE; } - //if ( ::qt_cast<CustomWidget*>(o) ) { + //if ( ::tqt_cast<CustomWidget*>(o) ) { if ( o->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { diff --git a/tools/designer/designer/multilineeditorimpl.cpp b/tools/designer/designer/multilineeditorimpl.cpp index b7ccc67ac..1d3cd2f87 100644 --- a/tools/designer/designer/multilineeditorimpl.cpp +++ b/tools/designer/designer/multilineeditorimpl.cpp @@ -229,7 +229,7 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget textEdit->document()->setUseFormatCollection( FALSE ); textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML ); - if ( !callStatic && ::qt_cast<TQTextEdit*>(editWidget) ) { + if ( !callStatic && ::tqt_cast<TQTextEdit*>(editWidget) ) { mlined = (TQTextEdit*)editWidget; mlined->setReadOnly( TRUE ); diff --git a/tools/designer/designer/popupmenueditor.cpp b/tools/designer/designer/popupmenueditor.cpp index 355a65491..719e147dd 100644 --- a/tools/designer/designer/popupmenueditor.cpp +++ b/tools/designer/designer/popupmenueditor.cpp @@ -124,7 +124,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * m removable( TRUE ) { init(); - if ( /*a->name() == "qt_separator_action" ||*/ ::qt_cast<TQSeparatorAction*>(a) ) + if ( /*a->name() == "qt_separator_action" ||*/ ::tqt_cast<TQSeparatorAction*>(a) ) separator = TRUE; if ( a && a->children() ) a->installEventFilter( this ); @@ -140,7 +140,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuE removable( item->removable ) { init(); - if ( ::qt_cast<TQActionGroup*>(a) ) + if ( ::tqt_cast<TQActionGroup*>(a) ) a->installEventFilter( this ); } @@ -180,7 +180,7 @@ void PopupMenuEditorItem::setVisible( bool enable ) bool PopupMenuEditorItem::isVisible() const { - TQActionGroup *g = ::qt_cast<TQActionGroup*>(a); + TQActionGroup *g = ::tqt_cast<TQActionGroup*>(a); if ( g ) return ( g->isVisible() && g->usesDropDown() ); else if ( a ) @@ -217,7 +217,7 @@ int PopupMenuEditorItem::count() const { if ( s ) { return s->count(); - } else if ( ::qt_cast<TQActionGroup*>(a) ) { + } else if ( ::tqt_cast<TQActionGroup*>(a) ) { const TQObjectList * l = a->children(); if ( l ) return l->count(); @@ -227,15 +227,15 @@ int PopupMenuEditorItem::count() const bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event ) { - if ( ! ::qt_cast<TQActionGroup*>( o ) ) + if ( ! ::tqt_cast<TQActionGroup*>( o ) ) return FALSE; if ( event->type() == TQEvent::ChildInserted ) { TQChildEvent * ce = ( TQChildEvent * ) event; TQObject * c = ce->child(); - TQAction * action = ::qt_cast<TQAction*>( c ); + TQAction * action = ::tqt_cast<TQAction*>( c ); if ( s->find( action ) != -1 ) // avoid duplicates return FALSE; - TQActionGroup * actionGroup = ::qt_cast<TQActionGroup*>( c ); + TQActionGroup * actionGroup = ::tqt_cast<TQActionGroup*>( c ); if ( actionGroup ) s->insert( actionGroup ); else if ( action ) @@ -367,7 +367,7 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index ) TQObjectListIterator it( *l ); insert( i, index ); for ( ; it.current(); ++it ) { - g = ::qt_cast<TQActionGroup*>(it.current()); + g = ::tqt_cast<TQActionGroup*>(it.current()); if ( g ) { if ( dropdown ) i->s->insert( g ); @@ -857,7 +857,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) PopupMenuEditorItemPtrDrag::decode( e, &i ); } else { if ( e->provides( "application/x-designer-actiongroup" ) ) { - TQActionGroup * g = ::qt_cast<TQDesignerActionGroup*>(ActionDrag::action()); + TQActionGroup * g = ::tqt_cast<TQDesignerActionGroup*>(ActionDrag::action()); if ( g->usesDropDown() ) { i = new PopupMenuEditorItem( g, this ); TQString n = TQString( g->name() ) + "Item"; @@ -866,7 +866,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) TQObjectList *l = g->queryList( "TQAction", 0, FALSE, FALSE ); TQObjectListIterator it( *l ); for ( ; it.current(); ++it ) { - g = ::qt_cast<TQActionGroup*>(it.current()); + g = ::tqt_cast<TQActionGroup*>(it.current()); if ( g ) i->s->insert( g ); else @@ -877,7 +877,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) dropInPlace( g, e->pos().y() ); } } else if ( e->provides( "application/x-designer-actions" ) ) { - TQAction *a = ::qt_cast<TQDesignerAction*>(ActionDrag::action()); + TQAction *a = ::tqt_cast<TQDesignerAction*>(ActionDrag::action()); i = new PopupMenuEditorItem( a, this ); } } @@ -1012,12 +1012,12 @@ void PopupMenuEditor::focusInEvent( TQFocusEvent * ) void PopupMenuEditor::focusOutEvent( TQFocusEvent * ) { TQWidget * fw = tqApp->focusWidget(); - if ( !fw || ( !::qt_cast<PopupMenuEditor*>(fw) && fw != lineEdit ) ) { + if ( !fw || ( !::tqt_cast<PopupMenuEditor*>(fw) && fw != lineEdit ) ) { hideSubMenu(); - if ( fw && ::qt_cast<MenuBarEditor*>(fw) ) + if ( fw && ::tqt_cast<MenuBarEditor*>(fw) ) return; TQWidget * w = this; - while ( w && w != fw && ::qt_cast<PopupMenuEditor*>(w) ) { // hide all popups + while ( w && w != fw && ::tqt_cast<PopupMenuEditor*>(w) ) { // hide all popups w->hide(); w = ((PopupMenuEditor *)w)->parentEditor(); } @@ -1243,8 +1243,8 @@ void PopupMenuEditor::dropInPlace( TQActionGroup * g, int y ) return; TQObjectList l = *g->children(); for ( int i = 0; i < (int)l.count(); ++i ) { - TQAction *a = ::qt_cast<TQAction*>(l.at(i)); - TQActionGroup *g = ::qt_cast<TQActionGroup*>(l.at(i)); + TQAction *a = ::tqt_cast<TQAction*>(l.at(i)); + TQActionGroup *g = ::tqt_cast<TQActionGroup*>(l.at(i)); if ( g ) dropInPlace( g, y ); else if ( a ) @@ -1449,13 +1449,13 @@ TQString PopupMenuEditor::constructName( PopupMenuEditorItem *item ) TQString s; TQString name = item->action()->menuText(); TQWidget *e = parentEditor(); - PopupMenuEditor *p = ::qt_cast<PopupMenuEditor*>(e); + PopupMenuEditor *p = ::tqt_cast<PopupMenuEditor*>(e); if ( p ) { int idx = p->find( item->m ); PopupMenuEditorItem * i = ( idx > -1 ? p->at( idx ) : 0 ); s = ( i ? TQString( i->action()->name() ).remove( "Action" ) : TQString( "" ) ); } else { - MenuBarEditor *b = ::qt_cast<MenuBarEditor*>(e); + MenuBarEditor *b = ::tqt_cast<MenuBarEditor*>(e); if ( b ) { int idx = b->findItem( item->m ); MenuBarEditorItem * i = ( idx > -1 ? b->item( idx ) : 0 ); diff --git a/tools/designer/designer/project.cpp b/tools/designer/designer/project.cpp index 65ee8bbb4..560231bd8 100644 --- a/tools/designer/designer/project.cpp +++ b/tools/designer/designer/project.cpp @@ -1554,8 +1554,8 @@ TQString Project::locationOfObject( TQObject *o ) if ( MainWindow::self ) { TQWidgetList windows = MainWindow::self->qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - FormWindow *fw = ::qt_cast<FormWindow*>(w); - SourceEditor *se = ::qt_cast<SourceEditor*>(w); + FormWindow *fw = ::tqt_cast<FormWindow*>(w); + SourceEditor *se = ::tqt_cast<SourceEditor*>(w); if ( fw ) { if ( fw->isFake() ) return objectForFakeForm( fw )->name() + TQString( " [Source]" ); @@ -1572,7 +1572,7 @@ TQString Project::locationOfObject( TQObject *o ) } } - if ( ::qt_cast<SourceFile*>(o) ) { + if ( ::tqt_cast<SourceFile*>(o) ) { for ( TQPtrListIterator<SourceFile> sources = sourceFiles(); sources.current(); ++sources ) { SourceFile* f = sources.current(); diff --git a/tools/designer/designer/propertyeditor.cpp b/tools/designer/designer/propertyeditor.cpp index db8b12ac0..a4bc629e5 100644 --- a/tools/designer/designer/propertyeditor.cpp +++ b/tools/designer/designer/propertyeditor.cpp @@ -752,7 +752,7 @@ void PropertyTextItem::setValue() void PropertyTextItem::getText() { - bool richText = !::qt_cast<TQButton*>(listview->propertyEditor()->widget()) || + bool richText = !::tqt_cast<TQButton*>(listview->propertyEditor()->widget()) || ( text( 0 ) == "whatsThis" ); bool doWrap = FALSE; TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap ); @@ -2306,7 +2306,7 @@ void PropertyPaletteItem::getPalette() return; bool ok = FALSE; TQWidget *w = (TQWidget*)listview->propertyEditor()->widget(); - if ( ::qt_cast<TQScrollView*>(w) ) + if ( ::tqt_cast<TQScrollView*>(w) ) w = ( (TQScrollView*)w )->viewport(); TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(), #if defined(QT_NON_COMMERCIAL) @@ -3013,7 +3013,7 @@ static bool parent_is_data_aware( TQWidget *w ) { TQWidget *p = w ? w->parentWidget() : 0; while ( p && !p->isTopLevel() ) { - if ( ::qt_cast<TQDesignerDataBrowser*>(p) || ::qt_cast<TQDesignerDataView*>(p) ) + if ( ::tqt_cast<TQDesignerDataBrowser*>(p) || ::tqt_cast<TQDesignerDataView*>(p) ) return TRUE; p = p->parentWidget(); } @@ -3029,7 +3029,7 @@ void PropertyList::setupProperties() { if ( !editor->widget() ) return; - bool allProperties = !::qt_cast<Spacer*>(editor->widget()); + bool allProperties = !::tqt_cast<Spacer*>(editor->widget()); TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties ); PropertyItem *item = 0; TQMap<TQString, bool> unique; @@ -3047,8 +3047,8 @@ void PropertyList::setupProperties() continue; if ( unique.contains( TQString::fromLatin1( it.current() ) ) ) continue; - if ( ::qt_cast<TQDesignerToolBar*>(editor->widget()) || - ::qt_cast<MenuBarEditor*>(editor->widget()) ) { + if ( ::tqt_cast<TQDesignerToolBar*>(editor->widget()) || + ::tqt_cast<MenuBarEditor*>(editor->widget()) ) { if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) continue; if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) @@ -3084,7 +3084,7 @@ void PropertyList::setupProperties() continue; if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) continue; - if ( ::qt_cast<TQLayoutWidget*>(w) || ::qt_cast<Spacer*>(w) ) { + if ( ::tqt_cast<TQLayoutWidget*>(w) || ::tqt_cast<Spacer*>(w) ) { if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) continue; if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) @@ -3127,7 +3127,7 @@ void PropertyList::setupProperties() continue; } } - if ( ::qt_cast<TQActionGroup*>(w) ) { + if ( ::tqt_cast<TQActionGroup*>(w) ) { if ( qstrcmp( p->name(), "usesDropDown" ) == 0 ) continue; if ( qstrcmp( p->name(), "toggleAction" ) == 0 ) @@ -3144,7 +3144,7 @@ void PropertyList::setupProperties() if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in Q_PROPERTY can take a function (isInButtonGroup() in this case) if ( !editor->widget()->isWidgetType() || !editor->widget()->parent() || - !::qt_cast<TQButtonGroup*>(editor->widget()->parent()) ) + !::tqt_cast<TQButtonGroup*>(editor->widget()->parent()) ) continue; } @@ -3166,7 +3166,7 @@ void PropertyList::setupProperties() setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) ) item->setChanged( TRUE, FALSE ); - if ( !::qt_cast<TQMultiLineEdit*>(editor->widget()) ) { + if ( !::tqt_cast<TQMultiLineEdit*>(editor->widget()) ) { lst.clear(); lst << p->valueToKey( AlignTop ) << p->valueToKey( AlignVCenter ) @@ -3177,7 +3177,7 @@ void PropertyList::setupProperties() if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) ) item->setChanged( TRUE, FALSE ); item = new PropertyBoolItem( this, item, 0, "wordwrap" ); - if ( ::qt_cast<TQGroupBox*>(w) ) + if ( ::tqt_cast<TQGroupBox*>(w) ) item->setVisible( FALSE ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) ) @@ -3225,7 +3225,7 @@ void PropertyList::setupProperties() } } - if ( !::qt_cast<TQSplitter*>(w) && !::qt_cast<MenuBarEditor*>(w) && !::qt_cast<TQDesignerToolBar*>(w) && + if ( !::tqt_cast<TQSplitter*>(w) && !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<TQDesignerToolBar*>(w) && w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" ); setPropertyValue( item ); @@ -3242,8 +3242,8 @@ void PropertyList::setupProperties() else layoutInitValue( item ); TQWidget *widget = (TQWidget*)w; - if ( ( !::qt_cast<TQLayoutWidget*>(widget) && - widget->parentWidget() && ::qt_cast<FormWindow*>(widget->parentWidget()) ) ) { + if ( ( !::tqt_cast<TQLayoutWidget*>(widget) && + widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) { item = new PropertyListItem( this, item, 0, "resizeMode", FALSE ); TQStringList lst; lst << "Auto" << "FreeResize" << "Minimum" << "Fixed"; @@ -3258,8 +3258,8 @@ void PropertyList::setupProperties() } } - if ( !::qt_cast<Spacer*>(w) && !::qt_cast<TQLayoutWidget*>(w) && - !::qt_cast<MenuBarEditor*>(w) && !::qt_cast<TQDesignerToolBar*>(w) ) { + if ( !::tqt_cast<Spacer*>(w) && !::tqt_cast<TQLayoutWidget*>(w) && + !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<TQDesignerToolBar*>(w) ) { item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) @@ -3271,16 +3271,16 @@ void PropertyList::setupProperties() } #ifndef QT_NO_SQL - if ( !::qt_cast<TQDataTable*>(editor->widget()) && !::qt_cast<TQDataBrowser*>(editor->widget()) && - !::qt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::qt_cast<TQWidget*>(editor->widget()) ) ) { + if ( !::tqt_cast<TQDataTable*>(editor->widget()) && !::tqt_cast<TQDataBrowser*>(editor->widget()) && + !::tqt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::tqt_cast<TQWidget*>(editor->widget()) ) ) { item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) item->setChanged( TRUE, FALSE ); } - if ( ::qt_cast<TQDataTable*>(editor->widget()) || ::qt_cast<TQDataBrowser*>(editor->widget()) || - ::qt_cast<TQDataView*>(editor->widget()) ) { + if ( ::tqt_cast<TQDataTable*>(editor->widget()) || ::tqt_cast<TQDataBrowser*>(editor->widget()) || + ::tqt_cast<TQDataView*>(editor->widget()) ) { item = new PropertyDatabaseItem( this, item, 0, "database", FALSE ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) @@ -3363,9 +3363,9 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, switch ( t ) { case TQVariant::String: item = new PropertyTextItem( this, item, 0, name, TRUE, - ::qt_cast<TQLabel*>(editor->widget()) || - ::qt_cast<TQTextView*>(editor->widget()) || - ::qt_cast<TQButton*>(editor->widget()) ); + ::tqt_cast<TQLabel*>(editor->widget()) || + ::tqt_cast<TQTextView*>(editor->widget()) || + ::tqt_cast<TQButton*>(editor->widget()) ); break; case TQVariant::CString: item = new PropertyTextItem( this, item, 0, @@ -3543,8 +3543,8 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) !( ke->state() & ControlButton ) ) { TQApplication::sendEvent( this, (TQKeyEvent*)e ); return TRUE; - } else if ( ( !::qt_cast<TQLineEdit*>(o) || - ( ::qt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) && + } else if ( ( !::tqt_cast<TQLineEdit*>(o) || + ( ::tqt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) && i && i->hasSubItems() ) { if ( !i->isOpen() && ( ke->key() == Key_Plus || @@ -3554,12 +3554,12 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) ( ke->key() == Key_Minus || ke->key() == Key_Left ) ) i->setOpen( FALSE ); - } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::qt_cast<TQComboBox*>(o) ) { + } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqt_cast<TQComboBox*>(o) ) { TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 ); TQApplication::sendEvent( o, &ke2 ); return TRUE; } - } else if ( e->type() == TQEvent::FocusOut && ::qt_cast<TQLineEdit*>(o) && editor->formWindow() ) { + } else if ( e->type() == TQEvent::FocusOut && ::tqt_cast<TQLineEdit*>(o) && editor->formWindow() ) { TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), SLOT( checkCompressedCommand() ) ); } else if ( o == viewport() ) { TQMouseEvent *me; @@ -3568,7 +3568,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::MouseButtonPress: me = (TQMouseEvent*)e; i = (PropertyListItem*) itemAt( me->pos() ); - if ( i && ( ::qt_cast<PropertyColorItem*>(i) || ::qt_cast<PropertyPixmapItem*>(i) ) ) { + if ( i && ( ::tqt_cast<PropertyColorItem*>(i) || ::tqt_cast<PropertyPixmapItem*>(i) ) ) { pressItem = i; pressPos = me->pos(); mousePressed = TRUE; @@ -3582,7 +3582,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) if ( i && i == pressItem ) { if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){ - if ( ::qt_cast<PropertyColorItem*>(i) ) { + if ( ::tqt_cast<PropertyColorItem*>(i) ) { TQColor col = i->value().asColor(); TQColorDrag *drg = new TQColorDrag( col, this ); TQPixmap pix( 25, 25 ); @@ -3594,7 +3594,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) mousePressed = FALSE; drg->dragCopy(); } - else if ( ::qt_cast<PropertyPixmapItem*>(i) ) { + else if ( ::tqt_cast<PropertyPixmapItem*>(i) ) { TQPixmap pix = i->value().asPixmap(); if( !pix.isNull() ) { TQImage img = pix.convertToImage(); @@ -3780,9 +3780,9 @@ void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e ) return; } - if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) + if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) e->accept(); - else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) + else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) e->accept(); else e->ignore(); @@ -3796,9 +3796,9 @@ void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e ) return; } - if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) + if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) e->accept(); - else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) + else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) e->accept(); else e->ignore(); @@ -3812,14 +3812,14 @@ void PropertyList::viewportDropEvent ( TQDropEvent *e ) return; } - if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) { + if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) { TQColor color; TQColorDrag::decode( e, color ); i->setValue( TQVariant( color ) ); valueChanged( i ); e->accept(); } - else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) { + else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) { TQImage img; TQImageDrag::decode( e, img ); TQPixmap pm; diff --git a/tools/designer/designer/resource.cpp b/tools/designer/designer/resource.cpp index 36af97757..3a689f453 100644 --- a/tools/designer/designer/resource.cpp +++ b/tools/designer/designer/resource.cpp @@ -704,13 +704,13 @@ bool Resource::save( TQIODevice* dev ) ts << "<!DOCTYPE UI><UI version=\"3.3\" stdsetdef=\"1\">" << endl; saveMetaInfoBefore( ts, 0 ); saveObject( formwindow->mainContainer(), 0, ts, 0 ); - if ( ::qt_cast<TQMainWindow*>(formwindow->mainContainer()) ) { + if ( ::tqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) { saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); } if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) saveCustomWidgets( ts, 0 ); - if ( ::qt_cast<TQMainWindow*>(formwindow->mainContainer()) ) + if ( ::tqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) saveActions( formwindow->actionList(), ts, 0 ); if ( !images.isEmpty() ) saveImageCollection( ts, 0 ); @@ -880,7 +880,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre TQDesignerWidgetStack* ws = 0; - if ( ::qt_cast<TQTabWidget*>(obj) ) { + if ( ::tqt_cast<TQTabWidget*>(obj) ) { TQTabWidget* tw = (TQTabWidget*) obj; TQObjectList* tmpl = tw->queryList( "TQWidgetStack" ); TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); @@ -912,7 +912,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre ts << makeIndent( indent ) << "</widget>" << endl; } delete tmpl; - } else if ( (ws = ::qt_cast<TQDesignerWidgetStack*>(obj)) != 0 ) { + } else if ( (ws = ::tqt_cast<TQDesignerWidgetStack*>(obj)) != 0 ) { for ( int i = 0; i < ws->count(); ++i ) { TQWidget *w = ws->page( i ); if ( !w ) @@ -935,7 +935,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre --indent; ts << makeIndent( indent ) << "</widget>" << endl; } - } else if ( ::qt_cast<TQToolBox*>(obj) ) { + } else if ( ::tqt_cast<TQToolBox*>(obj) ) { TQToolBox* tb = (TQToolBox*)obj; for ( int i = 0; i < tb->count(); ++i ) { TQWidget *w = tb->item( i ); @@ -964,7 +964,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre --indent; ts << makeIndent( indent ) << "</widget>" << endl; } - } else if ( ::qt_cast<TQWizard*>(obj) ) { + } else if ( ::tqt_cast<TQWizard*>(obj) ) { TQWizard* wiz = (TQWizard*)obj; for ( int i = 0; i < wiz->pageCount(); ++i ) { TQWidget *w = wiz->page( i ); @@ -989,7 +989,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre --indent; ts << makeIndent( indent ) << "</widget>" << endl; } - } else if ( ::qt_cast<TQMainWindow*>(obj) ) { + } else if ( ::tqt_cast<TQMainWindow*>(obj) ) { saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent ); } else { bool saved = FALSE; @@ -1124,9 +1124,9 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) { - if ( ::qt_cast<TQListBox*>(obj) || ::qt_cast<TQComboBox*>(obj) ) { + if ( ::tqt_cast<TQListBox*>(obj) || ::tqt_cast<TQComboBox*>(obj) ) { TQListBox *lb = 0; - if ( ::qt_cast<TQListBox*>(obj) ) { + if ( ::tqt_cast<TQListBox*>(obj) ) { lb = (TQListBox*)obj; } else { TQComboBox *cb = (TQComboBox*)obj; @@ -1165,7 +1165,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) } } - } else if ( ::qt_cast<TQIconView*>(obj) ) { + } else if ( ::tqt_cast<TQIconView*>(obj) ) { TQIconView *iv = (TQIconView*)obj; TQIconViewItem *i = iv->firstItem(); @@ -1181,7 +1181,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "</item>" << endl; } - } else if ( ::qt_cast<TQListView*>(obj) ) { + } else if ( ::tqt_cast<TQListView*>(obj) ) { TQListView *lv = (TQListView*)obj; int i; for ( i = 0; i < lv->header()->count(); ++i ) { @@ -1210,12 +1210,12 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) saveItem( lv->firstChild(), ts, indent - 1 ); } #if !defined (QT_NO_TABLE) - else if ( ::qt_cast<TQTable*>(obj) ) { + else if ( ::tqt_cast<TQTable*>(obj) ) { TQTable *table = (TQTable*)obj; int i; TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table ); # ifndef QT_NO_SQL - bool isDataTable = ::qt_cast<TQDataTable*>(table); + bool isDataTable = ::tqt_cast<TQDataTable*>(table); # else bool isDataTable = false; # endif @@ -1372,7 +1372,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer TQLayout *layout = 0; TQDesignerGridLayout* grid = 0; - if ( !::qt_cast<TQSplitter*>(obj) && + if ( !::tqt_cast<TQSplitter*>(obj) && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && obj->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) { @@ -1420,18 +1420,18 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) TQStringList changed; changed = MetaDataBase::changedProperties( w ); if ( w->isWidgetType() ) { - if ( ::qt_cast<Spacer*>(w) ) { + if ( ::tqt_cast<Spacer*>(w) ) { if ( !changed.contains( "sizeHint" ) ) changed << "sizeHint"; if ( !changed.contains( "geometry" ) ) changed << "geometry"; } else { - TQToolButton *tb = ::qt_cast<TQToolButton*>(w); + TQToolButton *tb = ::tqt_cast<TQToolButton*>(w); if ( tb && !tb->iconSet().isNull() ) { changed << "iconSet"; } } - } else if ( ::qt_cast<TQLayout*>(w) ) { + } else if ( ::tqt_cast<TQLayout*>(w) ) { if ( MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) > -1 ) changed << "spacing"; if ( MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) > -1 ) @@ -1454,7 +1454,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; - TQStrList lst = w->metaObject()->propertyNames( !::qt_cast<Spacer*>(w) ); + TQStrList lst = w->metaObject()->propertyNames( !::tqt_cast<Spacer*>(w) ); for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() ) continue; @@ -1465,10 +1465,10 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE ); if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) ) continue; - if ( ::qt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 && + if ( ::tqt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 && ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) ) continue; - if ( ::qt_cast<MenuBarEditor*>(w) && + if ( ::tqt_cast<MenuBarEditor*>(w) && ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 || qstrcmp( p->name(), "itemText" ) == 0 ) ) continue; @@ -1482,7 +1482,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) ts << " stdset=\"0\""; ts << ">" << endl; indent++; - if ( strcmp( it.current(), "resizeMode" ) == 0 && ::qt_cast<TQLayout*>(w) ) { + if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqt_cast<TQLayout*>(w) ) { saveProperty( w, it.current(), "", TQVariant::String, ts, indent ); } else if ( p->isSetType() ) { saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); @@ -1572,7 +1572,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant ts << makeIndent( indent ) << "<bool>" << mkBool( value.toBool() ) << "</bool>" << endl; break; case TQVariant::Int: - if ( ::qt_cast<TQLayout*>(w) ) { + if ( ::tqt_cast<TQLayout*>(w) ) { num = -1; if ( name == "spacing" ) num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ); @@ -1822,7 +1822,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay mainContainerSet = TRUE; } w = (TQWidget*)obj; - if ( ::qt_cast<TQMainWindow*>(w) ) + if ( ::tqt_cast<TQMainWindow*>(w) ) w = ( (TQMainWindow*)w )->centralWidget(); if ( layout ) { switch ( WidgetFactory::layoutType( layout ) ) { @@ -1847,20 +1847,20 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( w && formwindow ) { if ( !parent || - ( !::qt_cast<TQTabWidget*>(parent) && - !::qt_cast<TQWidgetStack*>(parent) && - !::qt_cast<TQToolBox*>(parent) && - !::qt_cast<TQWizard*>(parent) + ( !::tqt_cast<TQTabWidget*>(parent) && + !::tqt_cast<TQWidgetStack*>(parent) && + !::tqt_cast<TQToolBox*>(parent) && + !::tqt_cast<TQWizard*>(parent) #ifdef QT_CONTAINER_CUSTOM_WIDGETS && !isPlugin #endif ) ) formwindow->insertWidget( w, pasting ); else if ( parent && - ( ::qt_cast<TQTabWidget*>(parent) || - ::qt_cast<TQWidgetStack*>(parent) || - ::qt_cast<TQToolBox*>(parent) || - ::qt_cast<TQWizard*>(parent) + ( ::tqt_cast<TQTabWidget*>(parent) || + ::tqt_cast<TQWidgetStack*>(parent) || + ::tqt_cast<TQToolBox*>(parent) || + ::tqt_cast<TQWizard*>(parent) #ifdef QT_CONTAINER_CUSTOM_WIDGETS || isPlugin #endif @@ -1903,16 +1903,16 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay } else if ( n.tagName() == "attribute" && w ) { TQString attrib = n.attribute( "name" ); TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( ::qt_cast<TQTabWidget*>(parent) ) { + if ( ::tqt_cast<TQTabWidget*>(parent) ) { if ( attrib == "title" ) ( (TQTabWidget*)parent )->insertTab( w, v.toString() ); - } else if ( ::qt_cast<TQWidgetStack*>(parent) ) { + } else if ( ::tqt_cast<TQWidgetStack*>(parent) ) { if ( attrib == "id" ) ( (TQDesignerWidgetStack*)parent )->insertPage( w, v.toInt() ); - } else if ( ::qt_cast<TQToolBox*>(parent) ) { + } else if ( ::tqt_cast<TQToolBox*>(parent) ) { if ( attrib == "label" ) ( (TQToolBox*)parent )->addItem( w, v.toString() ); - } else if ( ::qt_cast<TQWizard*>(parent) ) { + } else if ( ::tqt_cast<TQWizard*>(parent) ) { if ( attrib == "title" ) ( (TQWizard*)parent )->addPage( w, v.toString() ); #ifdef QT_CONTAINER_CUSTOM_WIDGETS @@ -1960,7 +1960,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) if ( !widget ) return; - if ( ::qt_cast<TQListView*>(widget) && e.tagName() == "column" ) { + if ( ::tqt_cast<TQListView*>(widget) && e.tagName() == "column" ) { TQListView *lv = (TQListView*)widget; TQDomElement n = e.firstChild().toElement(); TQPixmap pix; @@ -1994,7 +1994,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) lv->header()->setResizeEnabled( resizable, i ); } #ifndef QT_NO_TABLE - else if ( ::qt_cast<TQTable*>(widget) ) { + else if ( ::tqt_cast<TQTable*>(widget) ) { TQTable *table = (TQTable*)widget; bool isRow; if ( ( isRow = e.tagName() == "row" ) ) @@ -2061,14 +2061,14 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ), widget ) ) return; - if ( ::qt_cast<TQListBox*>(widget) || ::qt_cast<TQComboBox*>(widget) ) { + if ( ::tqt_cast<TQListBox*>(widget) || ::tqt_cast<TQComboBox*>(widget) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; bool hasPixmap = FALSE; TQString txt; loadItem( n, pix, txt, hasPixmap ); TQListBox *lb = 0; - if ( ::qt_cast<TQListBox*>(widget) ) { + if ( ::tqt_cast<TQListBox*>(widget) ) { lb = (TQListBox*)widget; } else { TQComboBox *cb = (TQComboBox*)widget; @@ -2083,7 +2083,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt } else { new TQListBoxText( lb, txt ); } - } else if ( ::qt_cast<TQIconView*>(widget) ) { + } else if ( ::tqt_cast<TQIconView*>(widget) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; bool hasPixmap = FALSE; @@ -2094,7 +2094,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt new TQIconViewItem( iv, txt, pix ); else new TQIconViewItem( iv, txt ); - } else if ( ::qt_cast<TQListView*>(widget) ) { + } else if ( ::tqt_cast<TQListView*>(widget) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; TQValueList<TQPixmap> pixmaps; @@ -2161,7 +2161,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay if ( formwindow ) formwindow->insertWidget( spacer, pasting ); if ( layout ) { - if ( ::qt_cast<TQBoxLayout*>(layout) ) + if ( ::tqt_cast<TQBoxLayout*>(layout) ) ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); else ( (TQDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, @@ -2177,7 +2177,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD { const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE ); - if ( !::qt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS) + if ( !::tqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS) if ( obj->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget(); if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" ) @@ -2290,7 +2290,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD } } - if ( ::qt_cast<TQLayout*>(obj) ) { + if ( ::tqt_cast<TQLayout*>(obj) ) { if ( prop == "spacing" ) { MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() ); return; @@ -2976,10 +2976,10 @@ void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent ) while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::qt_cast<TQAction*>(o) ) + if ( !::tqt_cast<TQAction*>(o) ) continue; TQAction *ac = (TQAction*)o; - bool isGroup = ::qt_cast<TQActionGroup*>(ac); + bool isGroup = ::tqt_cast<TQActionGroup*>(ac); if ( isGroup ) ts << makeIndent( indent ) << "<actiongroup>" << endl; else @@ -3008,7 +3008,7 @@ void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts TQPtrListIterator<TQAction> it( actions ); while ( it.current() ) { TQAction *a = it.current(); - bool isGroup = ::qt_cast<TQActionGroup*>(a); + bool isGroup = ::tqt_cast<TQActionGroup*>(a); if ( isGroup ) ts << makeIndent( indent ) << "<actiongroup>" << endl; else @@ -3053,7 +3053,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) } n2 = n2.nextSibling().toElement(); } - if ( !::qt_cast<TQAction*>(parent) ) + if ( !::tqt_cast<TQAction*>(parent) ) formwindow->actionList().append( a ); } else if ( n.tagName() == "actiongroup" ) { a = new TQDesignerActionGroup( parent ); @@ -3076,7 +3076,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) } n2 = n2.nextSibling().toElement(); } - if ( !::qt_cast<TQAction*>(parent) ) + if ( !::tqt_cast<TQAction*>(parent) ) formwindow->actionList().append( a ); } } @@ -3112,10 +3112,10 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) saveObjectProperties( tb, ts, indent ); TQPtrList<TQAction> actionList = ( (TQDesignerToolBar*)tb )->insertedActions(); for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( ::qt_cast<TQSeparatorAction*>(a) ) { + if ( ::tqt_cast<TQSeparatorAction*>(a) ) { ts << makeIndent( indent ) << "<separator/>" << endl; } else { - if ( ::qt_cast<TQDesignerAction*>(a) && !( (TQDesignerAction*)a )->supportsMenu() ) { + if ( ::tqt_cast<TQDesignerAction*>(a) && !( (TQDesignerAction*)a )->supportsMenu() ) { TQWidget *w = ( (TQDesignerAction*)a )->widget(); ts << makeIndent( indent ) << "<widget class=\"" << WidgetFactory::classNameOf( w ) << "\">" << endl; @@ -3174,11 +3174,11 @@ void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStrea { for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) { TQAction *a = i->action(); - if ( ::qt_cast<TQSeparatorAction*>(a) ) + if ( ::tqt_cast<TQSeparatorAction*>(a) ) ts << makeIndent( indent ) << "<separator/>" << endl; - else if ( ::qt_cast<TQDesignerAction*>(a) ) + else if ( ::tqt_cast<TQDesignerAction*>(a) ) ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl; - else if ( ::qt_cast<TQDesignerActionGroup*>(a) ) + else if ( ::tqt_cast<TQDesignerActionGroup*>(a) ) ts << makeIndent( indent ) << "<actiongroup name=\"" << a->name() << "\"/>" << endl; PopupMenuEditor *s = i->subMenu(); if ( s && s->count() ) { diff --git a/tools/designer/designer/sourceeditor.cpp b/tools/designer/designer/sourceeditor.cpp index 167bccc97..823a39f00 100644 --- a/tools/designer/designer/sourceeditor.cpp +++ b/tools/designer/designer/sourceeditor.cpp @@ -82,7 +82,7 @@ void SourceEditor::setObject( TQObject *o, Project *p ) formWindow()->formFile()->setCodeEdited( FALSE ); formWindow()->formFile()->setEditor( 0 ); } - if ( ::qt_cast<FormWindow*>(o) ) + if ( ::tqt_cast<FormWindow*>(o) ) ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE ); save(); bool changed = FALSE; @@ -124,9 +124,9 @@ TQString SourceEditor::sourceOfObject( TQObject *o, const TQString &, TQString txt; if ( !o ) return txt; - if ( ::qt_cast<FormWindow*>(o) ) + if ( ::tqt_cast<FormWindow*>(o) ) txt = ( (FormWindow*)o )->formFile()->code(); - else if ( ::qt_cast<SourceFile*>(o) ) + else if ( ::tqt_cast<SourceFile*>(o) ) txt = ( (SourceFile*)o )->text(); return txt; } @@ -312,14 +312,14 @@ bool SourceEditor::saveAs() SourceFile *SourceEditor::sourceFile() const { - if ( !::qt_cast<SourceFile*>((TQObject *)obj) ) + if ( !::tqt_cast<SourceFile*>((TQObject *)obj) ) return 0; return (SourceFile*)(TQObject*)obj; } FormWindow *SourceEditor::formWindow() const { - if ( !::qt_cast<FormWindow*>((TQObject *)obj) ) + if ( !::tqt_cast<FormWindow*>((TQObject *)obj) ) return 0; return (FormWindow*)(TQObject*)obj; } diff --git a/tools/designer/designer/tableeditorimpl.cpp b/tools/designer/designer/tableeditorimpl.cpp index 4c760e0b1..ecb6bec39 100644 --- a/tools/designer/designer/tableeditorimpl.cpp +++ b/tools/designer/designer/tableeditorimpl.cpp @@ -64,7 +64,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f labelRowPixmap->setText( "" ); #ifndef QT_NO_SQL - if ( !::qt_cast<TQDataTable*>(editTable) ) + if ( !::tqt_cast<TQDataTable*>(editTable) ) #endif { labelFields->hide(); @@ -73,7 +73,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f labelTableValue->hide(); } #ifndef QT_NO_SQL - if ( ::qt_cast<TQDataTable*>(editTable) ) { + if ( ::tqt_cast<TQDataTable*>(editTable) ) { // ## why does this behave weird? // TabWidget->removePage( rows_tab ); // rows_tab->hide(); @@ -81,7 +81,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f TabWidget->setTabEnabled( rows_tab, FALSE ); } - if ( formWindow->project() && ::qt_cast<TQDataTable*>(editTable) ) { + if ( formWindow->project() && ::tqt_cast<TQDataTable*>(editTable) ) { TQStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList(); if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) { TQStringList fields; @@ -164,7 +164,7 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i ) editColumnText->blockSignals( FALSE ); #ifndef QT_NO_SQL - if ( ::qt_cast<TQDataTable*>(editTable) ) { + if ( ::tqt_cast<TQDataTable*>(editTable) ) { TQString s = *fieldMap.find( listColumns->index( i ) ); if ( s.isEmpty() ) comboFields->setCurrentItem( 0 ); @@ -249,7 +249,7 @@ void TableEditor::newColumnClicked() listColumns->setCurrentItem( item ); listColumns->setSelected( item, TRUE ); #ifndef QT_NO_SQL - if ( ::qt_cast<TQDataTable*>(editTable) ) { + if ( ::tqt_cast<TQDataTable*>(editTable) ) { comboFields->setFocus(); } else #endif diff --git a/tools/designer/designer/widgetaction.cpp b/tools/designer/designer/widgetaction.cpp index 5869148e9..694a0857f 100644 --- a/tools/designer/designer/widgetaction.cpp +++ b/tools/designer/designer/widgetaction.cpp @@ -42,7 +42,7 @@ static TQStyle *windowsStyle = 0; void WidgetAction::addedTo( TQWidget *w, TQWidget *container ) { - if ( ::qt_cast<TQToolButton*>(w) && ::qt_cast<TQScrollView*>(container->parent()->parent()) ) { + if ( ::tqt_cast<TQToolButton*>(w) && ::tqt_cast<TQScrollView*>(container->parent()->parent()) ) { if ( !windowsStyle ) windowsStyle = TQStyleFactory::create( "windows" ); w->setStyle( windowsStyle ); diff --git a/tools/designer/designer/widgetfactory.cpp b/tools/designer/designer/widgetfactory.cpp index a05c63782..cf8d9a7a0 100644 --- a/tools/designer/designer/widgetfactory.cpp +++ b/tools/designer/designer/widgetfactory.cpp @@ -108,7 +108,7 @@ FormWindow *find_formwindow( TQWidget *w ) if ( !w ) return 0; for (;;) { - if ( ::qt_cast<FormWindow*>(w) ) + if ( ::tqt_cast<FormWindow*>(w) ) return (FormWindow*)w; if ( !w->parentWidget() ) return 0; @@ -538,7 +538,7 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo TQString str = WidgetDatabase::createWidgetName( id ); const char *s = str.latin1(); w = createWidget( n, parent, name ? name : s, init, r, orient ); - if ( ::qt_cast<TQScrollView*>(w) ) + if ( ::tqt_cast<TQScrollView*>(w) ) ( (TQScrollView*)w )->disableSizeHintCaching(); if ( !w && WidgetDatabase::isCustomWidget( id ) ) w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) ); @@ -566,31 +566,31 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou int metaspacing = MetaDataBase::spacing( widget ); int metamargin = MetaDataBase::margin( widget ); - if ( ::qt_cast<TQLayoutWidget*>(widget) && + if ( ::tqt_cast<TQLayoutWidget*>(widget) && ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) || - widget && ::qt_cast<FormWindow*>(widget->parentWidget()) ) ) + widget && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) margin = MainWindow::self->currentLayoutDefaultMargin(); - if ( !layout && ::qt_cast<TQTabWidget*>(widget) ) + if ( !layout && ::tqt_cast<TQTabWidget*>(widget) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( !layout && ::qt_cast<TQWizard*>(widget) ) + if ( !layout && ::tqt_cast<TQWizard*>(widget) ) widget = ((TQWizard*)widget)->currentPage(); - if ( !layout && ::qt_cast<TQMainWindow*>(widget) ) + if ( !layout && ::tqt_cast<TQMainWindow*>(widget) ) widget = ((TQMainWindow*)widget)->centralWidget(); - if ( !layout && ::qt_cast<TQWidgetStack*>(widget) ) + if ( !layout && ::tqt_cast<TQWidgetStack*>(widget) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( !layout && ::qt_cast<TQToolBox*>(widget) ) + if ( !layout && ::tqt_cast<TQToolBox*>(widget) ) widget = ((TQToolBox*)widget)->currentItem(); MetaDataBase::addEntry( widget ); TQLayout *l = 0; int align = 0; - if ( !layout && ::qt_cast<TQGroupBox*>(widget) ) { + if ( !layout && ::tqt_cast<TQGroupBox*>(widget) ) { TQGroupBox *gb = (TQGroupBox*)widget; gb->setColumnLayout( 0, TQt::Vertical ); layout = gb->layout(); @@ -664,15 +664,15 @@ void WidgetFactory::deleteLayout( TQWidget *widget ) if ( !widget ) return; - if ( ::qt_cast<TQTabWidget*>(widget) ) + if ( ::tqt_cast<TQTabWidget*>(widget) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( ::qt_cast<TQWizard*>(widget) ) + if ( ::tqt_cast<TQWizard*>(widget) ) widget = ((TQWizard*)widget)->currentPage(); - if ( ::qt_cast<TQMainWindow*>(widget) ) + if ( ::tqt_cast<TQMainWindow*>(widget) ) widget = ((TQMainWindow*)widget)->centralWidget(); - if ( ::qt_cast<TQWidgetStack*>(widget) ) + if ( ::tqt_cast<TQWidgetStack*>(widget) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( ::qt_cast<TQToolBox*>(widget) ) + if ( ::tqt_cast<TQToolBox*>(widget) ) widget = ((TQToolBox*)widget)->currentItem(); delete widget->layout(); } @@ -696,12 +696,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare b = new TQDesignerPushButton( parent, name ); } TQWidget *w = find_formwindow( b ); - b->setAutoDefault( w && ::qt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) ); + b->setAutoDefault( w && ::tqt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) ); return b; } else if ( className == "TQToolButton" ) { if ( init ) { TQDesignerToolButton *tb = new TQDesignerToolButton( parent, name ); - if ( ::qt_cast<TQToolBox*>(widgetOfContainer(parent))) { + if ( ::tqt_cast<TQToolBox*>(widgetOfContainer(parent))) { tb->setUsesTextLabel(TRUE); tb->setTextLabel("..."); tb->setAutoRaise(TRUE); @@ -834,12 +834,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return new TQComboBox( FALSE, parent, name ); } else if ( className == "TQWidget" ) { if ( parent && - ( ::qt_cast<FormWindow*>(parent) || - ::qt_cast<TQWizard*>(parent) || - ::qt_cast<TQTabWidget*>(parent) || - ::qt_cast<TQWidgetStack*>(parent) || - ::qt_cast<TQToolBox*>(parent) || - ::qt_cast<TQMainWindow*>(parent) ) ) { + ( ::tqt_cast<FormWindow*>(parent) || + ::tqt_cast<TQWizard*>(parent) || + ::tqt_cast<TQTabWidget*>(parent) || + ::tqt_cast<TQWidgetStack*>(parent) || + ::tqt_cast<TQToolBox*>(parent) || + ::tqt_cast<TQMainWindow*>(parent) ) ) { FormWindow *fw = find_formwindow( parent ); if ( fw ) { TQDesignerWidget *dw = new TQDesignerWidget( fw, parent, name ); @@ -850,12 +850,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return new TQWidget( parent, name ); } else if ( className == "TQDialog" ) { TQDialog *dia = 0; - if ( ::qt_cast<FormWindow*>(parent) ) + if ( ::tqt_cast<FormWindow*>(parent) ) dia = new TQDesignerDialog( (FormWindow*)parent, parent, name ); else dia = new TQDialog( parent, name ); #if defined(QT_NON_COMMERCIAL) - if ( ::qt_cast<MainWindow*>(parent) ) + if ( ::tqt_cast<MainWindow*>(parent) ) #else if ( parent ) #endif @@ -864,12 +864,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare } else if ( className == "TQWizard" ) { TQWizard *wiz = new TQDesignerWizard( parent, name ); #if defined(QT_NON_COMMERCIAL) - if ( ::qt_cast<MainWindow*>(parent) ) + if ( ::tqt_cast<MainWindow*>(parent) ) #else if ( parent ) #endif wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); - if ( init && ::qt_cast<FormWindow*>(parent) ) { + if ( init && ::tqt_cast<FormWindow*>(parent) ) { TQDesignerWidget *dw = new TQDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); MetaDataBase::addEntry( dw ); wiz->addPage( dw, FormWindow::tr( "Page" ) ); @@ -1011,25 +1011,25 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay { layout = 0; - if ( ::qt_cast<TQTabWidget*>(w) ) + if ( ::tqt_cast<TQTabWidget*>(w) ) w = ((TQTabWidget*)w)->currentPage(); - if ( ::qt_cast<TQWizard*>(w) ) + if ( ::tqt_cast<TQWizard*>(w) ) w = ((TQWizard*)w)->currentPage(); - if ( ::qt_cast<TQMainWindow*>(w) ) + if ( ::tqt_cast<TQMainWindow*>(w) ) w = ((TQMainWindow*)w)->centralWidget(); - if ( ::qt_cast<TQWidgetStack*>(w) ) + if ( ::tqt_cast<TQWidgetStack*>(w) ) w = ((TQWidgetStack*)w)->visibleWidget(); - if ( ::qt_cast<TQToolBox*>(w) ) + if ( ::tqt_cast<TQToolBox*>(w) ) w = ((TQToolBox*)w)->currentItem(); - if ( ::qt_cast<TQSplitter*>(w) ) + if ( ::tqt_cast<TQSplitter*>(w) ) return ( (TQSplitter*)w )->orientation() == Horizontal ? HBox : VBox; if ( !w || !w->layout() ) return NoLayout; TQLayout *lay = w->layout(); - if ( ::qt_cast<TQGroupBox*>(w) ) { + if ( ::tqt_cast<TQGroupBox*>(w) ) { TQObjectList *l = lay->queryList( "TQLayout" ); if ( l && l->first() ) lay = (TQLayout*)l->first(); @@ -1037,11 +1037,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay } layout = lay; - if ( ::qt_cast<TQHBoxLayout*>(lay) ) + if ( ::tqt_cast<TQHBoxLayout*>(lay) ) return HBox; - else if ( ::qt_cast<TQVBoxLayout*>(lay) ) + else if ( ::tqt_cast<TQVBoxLayout*>(lay) ) return VBox; - else if ( ::qt_cast<TQGridLayout*>(lay) ) + else if ( ::tqt_cast<TQGridLayout*>(lay) ) return Grid; return NoLayout; } @@ -1051,11 +1051,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay */ WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout ) { - if ( ::qt_cast<TQHBoxLayout*>(layout) ) + if ( ::tqt_cast<TQHBoxLayout*>(layout) ) return HBox; - else if ( ::qt_cast<TQVBoxLayout*>(layout) ) + else if ( ::tqt_cast<TQVBoxLayout*>(layout) ) return VBox; - else if ( ::qt_cast<TQGridLayout*>(layout) ) + else if ( ::tqt_cast<TQGridLayout*>(layout) ) return Grid; return NoLayout; } @@ -1094,15 +1094,15 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) { if ( !w ) return w; - if ( ::qt_cast<TQTabWidget*>(w) ) + if ( ::tqt_cast<TQTabWidget*>(w) ) return ((TQTabWidget*)w)->currentPage(); - if ( ::qt_cast<TQWizard*>(w) ) + if ( ::tqt_cast<TQWizard*>(w) ) return ((TQWizard*)w)->currentPage(); - if ( ::qt_cast<TQWidgetStack*>(w) ) + if ( ::tqt_cast<TQWidgetStack*>(w) ) return ((TQWidgetStack*)w)->visibleWidget(); - if ( ::qt_cast<TQToolBox*>(w) ) + if ( ::tqt_cast<TQToolBox*>(w) ) return ((TQToolBox*)w)->currentItem(); - if ( ::qt_cast<TQMainWindow*>(w) ) + if ( ::tqt_cast<TQMainWindow*>(w) ) return ((TQMainWindow*)w)->centralWidget(); #ifdef QT_CONTAINER_CUSTOM_WIDGETS if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ) @@ -1134,16 +1134,16 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) { - if ( w && ::qt_cast<TQWidgetStack*>(w->parentWidget()) ) + if ( w && ::tqt_cast<TQWidgetStack*>(w->parentWidget()) ) w = w->parentWidget(); if ( w->parentWidget() && w->parentWidget()->parentWidget() && w->parentWidget()->parentWidget()->parentWidget() && - ::qt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) ) + ::tqt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) ) return w->parentWidget()->parentWidget()->parentWidget(); while ( w ) { int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ); if ( WidgetDatabase::isContainer( id ) || - w && ::qt_cast<FormWindow*>(w->parentWidget()) ) + w && ::tqt_cast<FormWindow*>(w->parentWidget()) ) return w; w = w->parentWidget(); } @@ -1166,21 +1166,21 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things return ( lastWasAPassiveInteractor = TRUE ); - if ( ::qt_cast<TQTabBar*>(o) ) + if ( ::tqt_cast<TQTabBar*>(o) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::qt_cast<TQSizeGrip*>(o) ) + else if ( ::tqt_cast<TQSizeGrip*>(o) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::qt_cast<TQButton*>(o) && - ( ::qt_cast<TQTabBar*>(o->parent()) || ::qt_cast<TQToolBox*>(o->parent()) ) ) + else if ( ::tqt_cast<TQButton*>(o) && + ( ::tqt_cast<TQTabBar*>(o->parent()) || ::tqt_cast<TQToolBox*>(o->parent()) ) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::qt_cast<TQPushButton*>(o) && ::qt_cast<TQWizard*>(o->parent()) ) + else if ( ::tqt_cast<TQPushButton*>(o) && ::tqt_cast<TQWizard*>(o->parent()) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::qt_cast<TQMenuBar*>(o) && ::qt_cast<TQMainWindow*>(o->parent()) ) + else if ( ::tqt_cast<TQMenuBar*>(o) && ::tqt_cast<TQMainWindow*>(o->parent()) ) return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::qt_cast<TQDockWindowHandle*>(o) ) +// else if ( ::tqt_cast<TQDockWindowHandle*>(o) ) else if ( o->inherits( "TQDockWindowHandle" ) ) return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::qt_cast<TQHideDock*>(o) ) +// else if ( ::tqt_cast<TQHideDock*>(o) ) else if ( o->inherits( "TQHideDock" ) ) return ( lastWasAPassiveInteractor = TRUE ); else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 ) @@ -1190,7 +1190,7 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) return ( lastWasAPassiveInteractor = FALSE ); WidgetInterface *iface = 0; TQWidget *w = (TQWidget*)o; - while ( !iface && w && !::qt_cast<FormWindow*>(w) ) { + while ( !iface && w && !::tqt_cast<FormWindow*>(w) ) { widgetManager()->queryInterface( classNameOf( w ), &iface ); w = w->parentWidget(); } @@ -1223,46 +1223,46 @@ const char* WidgetFactory::classNameOf( TQObject* o ) return o->className(); if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className()))) return o->className(); - else if ( ::qt_cast<TQDesignerTabWidget*>(o) ) + else if ( ::tqt_cast<TQDesignerTabWidget*>(o) ) return "TQTabWidget"; - else if ( ::qt_cast<TQDesignerWidgetStack*>(o) ) + else if ( ::tqt_cast<TQDesignerWidgetStack*>(o) ) return "TQWidgetStack"; - else if ( ::qt_cast<TQWidgetStack*>(o) ) + else if ( ::tqt_cast<TQWidgetStack*>(o) ) return "TQWeDoNotWantToBreakTabWidget"; - else if ( ::qt_cast<TQDesignerDialog*>(o) ) + else if ( ::tqt_cast<TQDesignerDialog*>(o) ) return "TQDialog"; - else if ( ::qt_cast<TQDesignerWidget*>(o) ) + else if ( ::tqt_cast<TQDesignerWidget*>(o) ) return "TQWidget"; else if ( o->inherits( "CustomWidget" ) ) return ( (CustomWidget*)o )->realClassName().latin1(); - else if ( ::qt_cast<TQDesignerLabel*>(o) ) + else if ( ::tqt_cast<TQDesignerLabel*>(o) ) return "TQLabel"; - else if ( ::qt_cast<TQDesignerWizard*>(o) ) + else if ( ::tqt_cast<TQDesignerWizard*>(o) ) return "TQWizard"; - else if ( ::qt_cast<TQDesignerPushButton*>(o) ) + else if ( ::tqt_cast<TQDesignerPushButton*>(o) ) return "TQPushButton"; - else if ( ::qt_cast<TQDesignerToolButton*>(o) ) + else if ( ::tqt_cast<TQDesignerToolButton*>(o) ) return "TQToolButton"; - else if ( ::qt_cast<TQDesignerRadioButton*>(o) ) + else if ( ::tqt_cast<TQDesignerRadioButton*>(o) ) return "TQRadioButton"; - else if ( ::qt_cast<TQDesignerCheckBox*>(o) ) + else if ( ::tqt_cast<TQDesignerCheckBox*>(o) ) return "TQCheckBox"; - else if ( ::qt_cast<MenuBarEditor*>(o) ) + else if ( ::tqt_cast<MenuBarEditor*>(o) ) return "TQMenuBar"; - else if ( ::qt_cast<TQDesignerToolBar*>(o) ) + else if ( ::tqt_cast<TQDesignerToolBar*>(o) ) return "TQToolBar"; - else if ( ::qt_cast<TQDesignerAction*>(o) ) + else if ( ::tqt_cast<TQDesignerAction*>(o) ) return "TQAction"; - else if ( ::qt_cast<TQDesignerActionGroup*>(o) ) + else if ( ::tqt_cast<TQDesignerActionGroup*>(o) ) return "TQActionGroup"; - else if ( ::qt_cast<PopupMenuEditor*>(o) ) + else if ( ::tqt_cast<PopupMenuEditor*>(o) ) return "TQPopupMenu"; - else if ( ::qt_cast<TQDesignerToolBox*>(o) ) + else if ( ::tqt_cast<TQDesignerToolBox*>(o) ) return "TQToolBox"; #ifndef QT_NO_SQL - else if ( ::qt_cast<TQDesignerDataBrowser*>(o) ) + else if ( ::tqt_cast<TQDesignerDataBrowser*>(o) ) return "TQDataBrowser"; - else if ( ::qt_cast<TQDesignerDataView*>(o) ) + else if ( ::tqt_cast<TQDesignerDataView*>(o) ) return "TQDataView"; #endif return o->className(); @@ -1270,29 +1270,29 @@ const char* WidgetFactory::classNameOf( TQObject* o ) TQString WidgetFactory::defaultSignal( TQObject *w ) { - if ( ::qt_cast<TQRadioButton*>(w) || ::qt_cast<TQCheckBox*>(w) ) + if ( ::tqt_cast<TQRadioButton*>(w) || ::tqt_cast<TQCheckBox*>(w) ) return "toggled"; - else if ( ::qt_cast<TQButton*>(w) || ::qt_cast<TQButtonGroup*>(w) ) + else if ( ::tqt_cast<TQButton*>(w) || ::tqt_cast<TQButtonGroup*>(w) ) return "clicked"; - else if ( ::qt_cast<TQTextBrowser*>(w) ) + else if ( ::tqt_cast<TQTextBrowser*>(w) ) return "linkClicked"; - else if ( ::qt_cast<TQLineEdit*>(w) || ::qt_cast<TQTextEdit*>(w) ) + else if ( ::tqt_cast<TQLineEdit*>(w) || ::tqt_cast<TQTextEdit*>(w) ) return "textChanged"; - else if ( ::qt_cast<TQListView*>(w) || ::qt_cast<TQIconView*>(w) || - ::qt_cast<TQListBox*>(w) || ::qt_cast<TQTable*>(w) ) + else if ( ::tqt_cast<TQListView*>(w) || ::tqt_cast<TQIconView*>(w) || + ::tqt_cast<TQListBox*>(w) || ::tqt_cast<TQTable*>(w) ) return "selectionChanged"; - else if ( ::qt_cast<TQTabWidget*>(w) ) + else if ( ::tqt_cast<TQTabWidget*>(w) ) return "selected"; - else if ( ::qt_cast<TQToolBox*>(w) ) + else if ( ::tqt_cast<TQToolBox*>(w) ) return "currentChanged"; - else if ( ::qt_cast<TQWidgetStack*>(w) ) + else if ( ::tqt_cast<TQWidgetStack*>(w) ) return "aboutToShow"; - else if ( ::qt_cast<TQSpinBox*>(w) || ::qt_cast<TQSlider*>(w) || - ::qt_cast<TQScrollBar*>(w) || ::qt_cast<TQDateEdit*>(w) || - ::qt_cast<TQTimeEdit*>(w) || ::qt_cast<TQDateTimeEdit*>(w) || - ::qt_cast<TQDial*>(w) ) + else if ( ::tqt_cast<TQSpinBox*>(w) || ::tqt_cast<TQSlider*>(w) || + ::tqt_cast<TQScrollBar*>(w) || ::tqt_cast<TQDateEdit*>(w) || + ::tqt_cast<TQTimeEdit*>(w) || ::tqt_cast<TQDateTimeEdit*>(w) || + ::tqt_cast<TQDial*>(w) ) return "valueChanged"; - else if ( ::qt_cast<TQComboBox*>(w) ) + else if ( ::tqt_cast<TQComboBox*>(w) ) return "activated"; return TQString::null; } @@ -1308,14 +1308,14 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MainWindow::self->currProject()->fakeFormFileFor( o ) ) return; MetaDataBase::setPropertyChanged( o, "name", TRUE ); - if ( !::qt_cast<TQDesignerToolBar*>(o) && !::qt_cast<MenuBarEditor*>(o) ) + if ( !::tqt_cast<TQDesignerToolBar*>(o) && !::tqt_cast<MenuBarEditor*>(o) ) MetaDataBase::setPropertyChanged( o, "geometry", TRUE ); - if ( ::qt_cast<TQPushButton*>(o) || - ::qt_cast<TQRadioButton*>(o) || - ::qt_cast<TQCheckBox*>(o) || - ::qt_cast<TQToolButton*>(o) ) { - if (::qt_cast<TQToolButton*>(o) && ::qt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) { + if ( ::tqt_cast<TQPushButton*>(o) || + ::tqt_cast<TQRadioButton*>(o) || + ::tqt_cast<TQCheckBox*>(o) || + ::tqt_cast<TQToolButton*>(o) ) { + if (::tqt_cast<TQToolButton*>(o) && ::tqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) { MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE ); MetaDataBase::setPropertyChanged( o, "textLabel", TRUE ); MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE ); @@ -1324,19 +1324,19 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MetaDataBase::setPropertyChanged( o, "text", TRUE ); } } - else if ( ::qt_cast<TQGroupBox*>(o) ) + else if ( ::tqt_cast<TQGroupBox*>(o) ) MetaDataBase::setPropertyChanged( o, "title", TRUE ); else if ( o->isA( "TQFrame" ) ) { MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); - } else if ( ::qt_cast<TQTabWidget*>(o) || ::qt_cast<TQWizard*>(o) ) { + } else if ( ::tqt_cast<TQTabWidget*>(o) || ::tqt_cast<TQWizard*>(o) ) { MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE ); MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); - } else if ( ::qt_cast<TQWidgetStack*>(o) ) { + } else if ( ::tqt_cast<TQWidgetStack*>(o) ) { MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); - } else if ( ::qt_cast<TQToolBox*>(o) ) { + } else if ( ::tqt_cast<TQToolBox*>(o) ) { MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE ); MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE ); @@ -1344,9 +1344,9 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE ); MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE ); #ifndef QT_NO_TABLE - } else if ( ::qt_cast<TQTable*>(o) ) { + } else if ( ::tqt_cast<TQTable*>(o) ) { # ifndef QT_NO_SQL - if (!::qt_cast<TQDataTable*>(o) ) + if (!::tqt_cast<TQDataTable*>(o) ) # endif { MetaDataBase::setPropertyChanged( o, "numRows", TRUE ); @@ -1358,11 +1358,11 @@ void WidgetFactory::initChangedProperties( TQObject *o ) } } #endif - } else if ( ::qt_cast<TQSplitter*>(o) ) { + } else if ( ::tqt_cast<TQSplitter*>(o) ) { MetaDataBase::setPropertyChanged( o, "orientation", TRUE ); - } else if ( ::qt_cast<TQDesignerToolBar*>(o) ) { + } else if ( ::tqt_cast<TQDesignerToolBar*>(o) ) { MetaDataBase::setPropertyChanged( o, "label", TRUE ); - } else if ( ::qt_cast<MenuBarEditor*>(o) ) { + } else if ( ::tqt_cast<MenuBarEditor*>(o) ) { MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE ); MetaDataBase::setPropertyChanged( o, "itemText", TRUE ); @@ -1383,7 +1383,7 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) return TRUE; if ( className == "TQTextEdit" || className == "TQMultiLineEdit" ) return TRUE; - if ( ::qt_cast<TQTable*>(editorWidget) != 0 ) + if ( ::tqt_cast<TQTable*>(editorWidget) != 0 ) return TRUE; return FALSE; @@ -1395,7 +1395,7 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) if ( className.contains( "ListBox" ) || className.contains( "ListView" ) || className.contains( "IconView" ) || className.contains( "ComboBox" ) || - ::qt_cast<TQTable*>(editorWidget) != 0 ) + ::tqt_cast<TQTable*>(editorWidget) != 0 ) return TRUE; return FALSE; @@ -1406,7 +1406,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, TQString className = WidgetDatabase::className( id ); if ( className.contains( "ListBox" ) ) { - if ( !::qt_cast<TQListBox*>(editWidget) ) + if ( !::tqt_cast<TQListBox*>(editWidget) ) return; ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw ); e->exec(); @@ -1415,7 +1415,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "ComboBox" ) ) { - if ( !::qt_cast<TQComboBox*>(editWidget) ) + if ( !::tqt_cast<TQComboBox*>(editWidget) ) return; TQComboBox *cb = (TQComboBox*)editWidget; TQListBox *lb = cb->listBox(); @@ -1431,7 +1431,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "ListView" ) ) { - if ( !::qt_cast<TQListView*>(editWidget) ) + if ( !::tqt_cast<TQListView*>(editWidget) ) return; TQListView *lv = (TQListView*)editWidget; ListViewEditor *e = new ListViewEditor( parent, lv, fw ); @@ -1441,7 +1441,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "IconView" ) ) { - if ( !::qt_cast<TQIconView*>(editWidget) ) + if ( !::tqt_cast<TQIconView*>(editWidget) ) return; IconViewEditor *e = new IconViewEditor( parent, editWidget, fw ); e->exec(); @@ -1456,7 +1456,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, return; } #ifndef QT_NO_TABLE - if (::qt_cast<TQTable*>(editWidget) != 0) { + if (::tqt_cast<TQTable*>(editWidget) != 0) { TableEditor *e = new TableEditor( parent, editWidget, fw ); e->exec(); delete e; @@ -1639,15 +1639,15 @@ void TQLayoutWidget::updateSizePolicy() if ( parent() && parent()->isWidgetType() ) { parentLayout = ((TQWidget *)parent())->layout(); if ( parentLayout && - ::qt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) ) + ::tqt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) ) parentLayout = 0; } TQObjectListIt it( *children() ); TQObject *o; - if ( ::qt_cast<TQVBoxLayout*>(layout()) ) { - if ( ::qt_cast<TQHBoxLayout*>(parentLayout) ) + if ( ::tqt_cast<TQVBoxLayout*>(layout()) ) { + if ( ::tqt_cast<TQHBoxLayout*>(parentLayout) ) vt = TQSizePolicy::Minimum; else vt = TQSizePolicy::Fixed; @@ -1667,8 +1667,8 @@ void TQLayoutWidget::updateSizePolicy() if ( w->sizePolicy().mayShrinkVertically() ) vt |= TQSizePolicy::Maximum; } - } else if ( ::qt_cast<TQHBoxLayout*>(layout()) ) { - if ( ::qt_cast<TQVBoxLayout*>(parentLayout) ) + } else if ( ::tqt_cast<TQHBoxLayout*>(layout()) ) { + if ( ::tqt_cast<TQVBoxLayout*>(parentLayout) ) ht = TQSizePolicy::Minimum; else ht = TQSizePolicy::Fixed; @@ -1688,13 +1688,13 @@ void TQLayoutWidget::updateSizePolicy() if ( !w->sizePolicy().mayShrinkVertically() ) vt &= ~TQSizePolicy::Maximum; } - } else if ( ::qt_cast<TQGridLayout*>(layout()) ) { + } else if ( ::tqt_cast<TQGridLayout*>(layout()) ) { ht = TQSizePolicy::Fixed; vt = TQSizePolicy::Fixed; if ( parentLayout ) { - if ( ::qt_cast<TQVBoxLayout*>(parentLayout) ) + if ( ::tqt_cast<TQVBoxLayout*>(parentLayout) ) ht = TQSizePolicy::Minimum; - else if ( ::qt_cast<TQHBoxLayout*>(parentLayout) ) + else if ( ::tqt_cast<TQHBoxLayout*>(parentLayout) ) vt = TQSizePolicy::Minimum; } @@ -1728,7 +1728,7 @@ void TQLayoutWidget::updateSizePolicy() void CustomWidget::paintEvent( TQPaintEvent *e ) { - if ( ::qt_cast<FormWindow*>(parentWidget()) ) { + if ( ::tqt_cast<FormWindow*>(parentWidget()) ) { ( (FormWindow*)parentWidget() )->paintGrid( this, e ); } else { TQPainter p( this ); diff --git a/tools/designer/editor/browser.cpp b/tools/designer/editor/browser.cpp index 42c3d4e0e..d32e8551c 100644 --- a/tools/designer/editor/browser.cpp +++ b/tools/designer/editor/browser.cpp @@ -57,7 +57,7 @@ EditorBrowser::~EditorBrowser() bool EditorBrowser::eventFilter( TQObject *o, TQEvent *e ) { - if ( ::qt_cast<Editor*>(o->parent()) || ::qt_cast<Editor*>(o) ) { + if ( ::tqt_cast<Editor*>(o->parent()) || ::tqt_cast<Editor*>(o) ) { TQMouseEvent *me; TQKeyEvent *ke; switch ( e->type() ) { diff --git a/tools/designer/editor/completion.cpp b/tools/designer/editor/completion.cpp index f0923c554..ecd1e73be 100644 --- a/tools/designer/editor/completion.cpp +++ b/tools/designer/editor/completion.cpp @@ -327,7 +327,7 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e ) { if ( !enabled ) return FALSE; - if ( e->type() == TQEvent::KeyPress && ::qt_cast<Editor*>(o)) { + if ( e->type() == TQEvent::KeyPress && ::tqt_cast<Editor*>(o)) { curEditor = (Editor*)o; TQKeyEvent *ke = (TQKeyEvent*)e; if ( ke->key() == Key_Tab ) { @@ -423,7 +423,7 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e ) return TRUE; } } - if ( o == functionLabel || ::qt_cast<Editor*>(o) && functionLabel->isVisible() ) { + if ( o == functionLabel || ::tqt_cast<Editor*>(o) && functionLabel->isVisible() ) { if ( e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; if ( ke->key() == Key_Escape ) { diff --git a/tools/designer/editor/viewmanager.cpp b/tools/designer/editor/viewmanager.cpp index def747050..96c106f03 100644 --- a/tools/designer/editor/viewmanager.cpp +++ b/tools/designer/editor/viewmanager.cpp @@ -97,7 +97,7 @@ TQWidget *ViewManager::currentView() const void ViewManager::childEvent( TQChildEvent *e ) { - if ( e->type() == TQEvent::ChildInserted && ::qt_cast<Editor*>(e->child()) ) + if ( e->type() == TQEvent::ChildInserted && ::tqt_cast<Editor*>(e->child()) ) addView( (TQWidget*)e->child() ); TQWidget::childEvent( e ); } diff --git a/tools/designer/plugins/cppeditor/cppbrowser.cpp b/tools/designer/plugins/cppeditor/cppbrowser.cpp index 8d3e68bc1..8d03931b7 100644 --- a/tools/designer/plugins/cppeditor/cppbrowser.cpp +++ b/tools/designer/plugins/cppeditor/cppbrowser.cpp @@ -72,7 +72,7 @@ void CppEditorBrowser::showHelp( const TQString &w ) } } - TQMainWindow *mw = ::qt_cast<TQMainWindow*>(curEditor->topLevelWidget()); + TQMainWindow *mw = ::tqt_cast<TQMainWindow*>(curEditor->topLevelWidget()); if ( mw ) mw->statusBar()->message( tr( "Nothing available for '%1'" ).arg( w ), 1500 ); } diff --git a/tools/designer/plugins/wizards/sqlformwizardimpl.cpp b/tools/designer/plugins/wizards/sqlformwizardimpl.cpp index 580780de4..a89cb8d38 100644 --- a/tools/designer/plugins/wizards/sqlformwizardimpl.cpp +++ b/tools/designer/plugins/wizards/sqlformwizardimpl.cpp @@ -69,18 +69,18 @@ SqlFormWizard::SqlFormWizard( TQUnknownInterface *aIface, TQWidget *w, setFinishEnabled( finishPage, TRUE ); /* set mode of operation */ - if ( ::qt_cast<TQDataTable*>(widget) ) { + if ( ::tqt_cast<TQDataTable*>(widget) ) { setCaption( "Data Table Wizard" ); mode = Table; setAppropriate( navigPage, FALSE ); setAppropriate( layoutPage, FALSE ); checkBoxAutoEdit->setChecked( FALSE ); - } else if ( ::qt_cast<TQDataBrowser*>(widget) ) { + } else if ( ::tqt_cast<TQDataBrowser*>(widget) ) { setCaption( "Data Browser Wizard" ); setAppropriate( tablePropertiesPage, FALSE ); mode = Browser; checkBoxAutoEdit->setChecked( TRUE ); - } else if ( ::qt_cast<TQDataView*>(widget) ) { + } else if ( ::tqt_cast<TQDataView*>(widget) ) { setCaption( "Data View Wizard" ); setAppropriate( tablePropertiesPage, FALSE ); setAppropriate( navigPage, FALSE ); @@ -450,7 +450,7 @@ void SqlFormWizard::accept() ((TQLineEdit*)editor)->setAlignment( TQt::AlignRight ); formWindow->setPropertyChanged( editor, "alignment", TRUE ); } - if ( ::qt_cast<TQSpinBox*>(editor) ) { + if ( ::tqt_cast<TQSpinBox*>(editor) ) { ( (TQSpinBox*)editor )->setMaxValue( INT_MAX ); formWindow->setPropertyChanged( editor, "maxValue", TRUE ); } diff --git a/tools/designer/uilib/qwidgetfactory.cpp b/tools/designer/uilib/qwidgetfactory.cpp index d1844bb28..e126e937d 100644 --- a/tools/designer/uilib/qwidgetfactory.cpp +++ b/tools/designer/uilib/qwidgetfactory.cpp @@ -861,7 +861,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, if ( parent != 0 ) { if ( parent->inherits("TQComboBox") || parent->inherits("TQListBox") ) { - TQListBox *listBox = (TQListBox *) parent->qt_cast( "TQListBox" ); + TQListBox *listBox = (TQListBox *) parent->tqt_cast( "TQListBox" ); if ( listBox == 0 ) listBox = ((TQComboBox *) parent)->listBox(); @@ -1230,7 +1230,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, unpackUInt16( in, labelNo ); unpackUInt16( in, buddyNo ); TQLabel *label = - (TQLabel *) objects[labelNo]->qt_cast( "TQLabel" ); + (TQLabel *) objects[labelNo]->tqt_cast( "TQLabel" ); if ( label != 0 ) label->setBuddy( (TQWidget *) objects[buddyNo] ); } while ( !END_OF_BLOCK() ); diff --git a/tools/linguist/linguist/msgedit.cpp b/tools/linguist/linguist/msgedit.cpp index 86c3b55d4..5148f5b89 100644 --- a/tools/linguist/linguist/msgedit.cpp +++ b/tools/linguist/linguist/msgedit.cpp @@ -552,7 +552,7 @@ bool MessageEditor::eventFilter( TQObject *o, TQEvent *e ) TQKeyEvent * ke = (TQKeyEvent*)e; const int k = ke->key(); - if ( ::qt_cast<TQTextEdit*>(o) ) { + if ( ::tqt_cast<TQTextEdit*>(o) ) { if ( e->type() == TQEvent::KeyPress ) { // Hardcode the Tab key to do focus changes when pressed // inside the editor @@ -588,7 +588,7 @@ bool MessageEditor::eventFilter( TQObject *o, TQEvent *e ) break; } } - } else if ( ::qt_cast<TQListView*>(o) ) { + } else if ( ::tqt_cast<TQListView*>(o) ) { // handle the ESC key in the list views if ( e->type() == TQEvent::KeyRelease && k == Key_Escape ) editorPage->translationMed->setFocus(); |