diff options
Diffstat (limited to 'kdevdesigner')
149 files changed, 2502 insertions, 2610 deletions
diff --git a/kdevdesigner/designer/CMakeLists.txt b/kdevdesigner/designer/CMakeLists.txt index 676a4d57..a0337247 100644 --- a/kdevdesigner/designer/CMakeLists.txt +++ b/kdevdesigner/designer/CMakeLists.txt @@ -27,9 +27,11 @@ link_directories( ##### other data ################################ -install( FILES - kdevdesigner_part.desktop - DESTINATION ${SERVICES_INSTALL_DIR} ) +tde_create_translated_desktop( + SOURCE kdevdesigner_part.desktop + DESTINATION ${SERVICES_INSTALL_DIR} + PO_DIR tdevelop-desktops +) install( FILES kdevdesigner_part.rc kdevdesigner_part_sh.rc diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp index 33f0c4bf..c76f13b6 100644 --- a/kdevdesigner/designer/actiondnd.cpp +++ b/kdevdesigner/designer/actiondnd.cpp @@ -105,7 +105,7 @@ bool QDesignerAction::addTo( TQWidget *w ) if ( !widgetToInsert ) return TQAction::addTo( w ); - if ( ::tqqt_cast<TQPopupMenu*>(w) ) + if ( ::tqt_cast<TQPopupMenu*>(w) ) return FALSE; widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE ); @@ -127,23 +127,23 @@ void QDesignerAction::remove() { if ( !widgetToInsert ) return; - MainWindow::self->formWindow()->selectWidget( TQT_TQOBJECT(widgetToInsert), FALSE ); + MainWindow::self->formWindow()->selectWidget( widgetToInsert, FALSE ); widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE ); } -QDesignerToolBarSeparator::QDesignerToolBarSeparator(Qt::Orientation o , TQToolBar *parent, +QDesignerToolBarSeparator::QDesignerToolBarSeparator(TQt::Orientation o , TQToolBar *parent, const char* name ) : TQWidget( parent, name ) { - connect( parent, TQT_SIGNAL(orientationChanged(Qt::Orientation)), - this, TQT_SLOT(setOrientation(Qt::Orientation)) ); + connect( parent, TQ_SIGNAL(orientationChanged(TQt::Orientation)), + this, TQ_SLOT(setOrientation(TQt::Orientation)) ); setOrientation( o ); setBackgroundMode( parent->backgroundMode() ); setBackgroundOrigin( ParentOrigin ); setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); } -void QDesignerToolBarSeparator::setOrientation( Qt::Orientation o ) +void QDesignerToolBarSeparator::setOrientation( TQt::Orientation o ) { orient = o; } @@ -157,7 +157,7 @@ TQSize QDesignerToolBarSeparator::sizeHint() const { int extent = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); - if ( orient ==Qt::Horizontal ) + if ( orient ==TQt::Horizontal ) return TQSize( extent, 0 ); else return TQSize( 0, extent ); @@ -168,10 +168,10 @@ void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * ) TQPainter p( this ); TQStyle::SFlags flags = TQStyle::Style_Default; - if ( orientation() ==Qt::Horizontal ) + if ( orientation() ==TQt::Horizontal ) flags |= TQStyle::Style_Horizontal; - style().tqdrawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(), + style().drawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(), colorGroup(), flags ); } @@ -184,11 +184,11 @@ QSeparatorAction::QSeparatorAction( TQObject *parent ) bool QSeparatorAction::addTo( TQWidget *w ) { - if ( ::tqqt_cast<TQToolBar*>(w) ) { + if ( ::tqt_cast<TQToolBar*>(w) ) { TQToolBar *tb = (TQToolBar*)w; wid = new QDesignerToolBarSeparator( tb->orientation(), tb ); return TRUE; - } else if ( ::tqqt_cast<TQPopupMenu*>(w) ) { + } else if ( ::tqt_cast<TQPopupMenu*>(w) ) { idx = ( (TQPopupMenu*)w )->count(); ( (TQPopupMenu*)w )->insertSeparator( idx ); return TRUE; @@ -198,10 +198,10 @@ bool QSeparatorAction::addTo( TQWidget *w ) bool QSeparatorAction::removeFrom( TQWidget *w ) { - if ( ::tqqt_cast<TQToolBar*>(w) ) { + if ( ::tqt_cast<TQToolBar*>(w) ) { delete wid; return TRUE; - } else if ( ::tqqt_cast<TQPopupMenu*>(w) ) { + } else if ( ::tqt_cast<TQPopupMenu*>(w) ) { ( (TQPopupMenu*)w )->removeItemAt( idx ); return TRUE; } @@ -221,7 +221,7 @@ QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw ) insertAnchor = 0; afterAnchor = TRUE; setAcceptDrops( TRUE ); - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + MetaDataBase::addEntry( this ); lastIndicatorPos = TQPoint( -1, -1 ); indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); @@ -239,7 +239,7 @@ QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock ) setAcceptDrops( TRUE ); indicator = new QDesignerIndicatorWidget( this ); indicator->hide(); - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + MetaDataBase::addEntry( this ); installEventFilter( this ); widgetInserting = FALSE; findFormWindow(); @@ -250,7 +250,7 @@ void QDesignerToolBar::findFormWindow() { TQWidget *w = this; while ( w ) { - formWindow = ::tqqt_cast<FormWindow*>(w); + formWindow = ::tqt_cast<FormWindow*>(w); if ( formWindow ) break; w = w->parentWidget(); @@ -260,11 +260,11 @@ void QDesignerToolBar::findFormWindow() void QDesignerToolBar::addAction( TQAction *a ) { actionList.append( a ); - connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) ); - if ( ::tqqt_cast<TQActionGroup*>(a) ) { + connect( a, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( actionRemoved() ) ); + if ( ::tqt_cast<TQActionGroup*>(a) ) { ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); - } else if ( ::tqqt_cast<QSeparatorAction*>(a) ) { + } else if ( ::tqt_cast<QSeparatorAction*>(a) ) { ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); } else { @@ -275,22 +275,22 @@ void QDesignerToolBar::addAction( TQAction *a ) static void fixObject( TQObject *&o ) { - while ( o && o->parent() && !::tqqt_cast<QDesignerToolBar*>(o->parent()) ) + while ( o && o->parent() && !::tqt_cast<QDesignerToolBar*>(o->parent()) ) o = o->parent(); } bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) { - if ( !o || !e || o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) || o->inherits( "TQDockWindowTitleBar" ) ) + if ( !o || !e || o->inherits( "TQDockWindowHandle" ) || o->inherits( "TQDockWindowTitleBar" ) ) return TQToolBar::eventFilter( o, e ); - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::MouseButtonPress && - ( ( TQMouseEvent*)e )->button() == Qt::LeftButton ) { + if ( o == this && e->type() == TQEvent::MouseButtonPress && + ( ( TQMouseEvent*)e )->button() == TQt::LeftButton ) { mousePressEvent( (TQMouseEvent*)e ); return TRUE; } - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) + if ( o == this ) return TQToolBar::eventFilter( o, e ); if ( e->type() == TQEvent::MouseButtonPress ) { @@ -359,7 +359,7 @@ void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) void QDesignerToolBar::mousePressEvent( TQMouseEvent *e ) { widgetInserting = FALSE; - if ( e->button() == Qt::LeftButton && + if ( e->button() == TQt::LeftButton && MainWindow::self->currentTool() != POINTER_TOOL && MainWindow::self->currentTool() != ORDER_TOOL && MainWindow::self->currentTool() != CONNECT_TOOL && @@ -393,7 +393,7 @@ void QDesignerToolBar::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() && ::tqqt_cast<QSeparatorAction*>(*it) ) + if ( it != actionMap.end() && ::tqt_cast<QSeparatorAction*>(*it) ) menu.insertItem( i18n( "Delete Separator" ), ID_DELETE ); else menu.insertItem( i18n( "Delete Item" ), ID_DELETE ); @@ -440,10 +440,10 @@ void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) { widgetInserting = FALSE; - if ( e->button() == Qt::MidButton ) + if ( e->button() == TQt::MidButton ) return; - if ( e->button() == Qt::LeftButton && + if ( e->button() == TQt::LeftButton && MainWindow::self->currentTool() != POINTER_TOOL && MainWindow::self->currentTool() != ORDER_TOOL && MainWindow::self->currentTool() != CONNECT_TOOL && @@ -474,7 +474,7 @@ void QDesignerToolBar::removeWidget( TQWidget *w ) void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) { - if ( widgetInserting || ( e->state() & Qt::LeftButton ) == 0 ) + if ( widgetInserting || ( e->state() & TQt::LeftButton ) == 0 ) return; if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() ) return; @@ -494,13 +494,13 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) TQApplication::sendPostedEvents(); adjustSize(); - TQString type = ::tqqt_cast<TQActionGroup*>(a) ? TQString( "application/x-designer-actiongroup" ) : - ::tqqt_cast<QSeparatorAction*>(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); + TQString type = ::tqt_cast<TQActionGroup*>(a) ? TQString( "application/x-designer-actiongroup" ) : + ::tqt_cast<QSeparatorAction*>(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); TQStoredDrag *drag = new ActionDrag( type, a, this ); drag->setPixmap( a->iconSet().pixmap() ); - if ( ::tqqt_cast<QDesignerAction*>(a) ) { + if ( ::tqt_cast<QDesignerAction*>(a) ) { if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) ) - formWindow->selectWidget( ( TQT_TQOBJECT(( (QDesignerAction*)a )->widget())), FALSE ); + formWindow->selectWidget( ( ( (QDesignerAction*)a )->widget()), FALSE ); } if ( !drag->drag() ) { AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Action '%1' to Toolbar '%2'" ). @@ -555,11 +555,11 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e ) if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-separator" ) ) { if ( e->provides( "application/x-designer-actions" ) ) - a = ::tqqt_cast<QDesignerAction*>(ActionDrag::action()); + a = ::tqt_cast<QDesignerAction*>(ActionDrag::action()); else - a = ::tqqt_cast<QSeparatorAction*>(ActionDrag::action()); + a = ::tqt_cast<QSeparatorAction*>(ActionDrag::action()); } else { - a = ::tqqt_cast<QDesignerActionGroup*>(ActionDrag::action()); + a = ::tqt_cast<QDesignerActionGroup*>(ActionDrag::action()); } if ( actionList.findRef( a ) != -1 ) { @@ -588,14 +588,14 @@ void QDesignerToolBar::reInsert() clear(); for ( a = actionList.first(); a; a = actionList.next() ) { a->addTo( this ); - if ( ::tqqt_cast<TQActionGroup*>(a) ) { + if ( ::tqt_cast<TQActionGroup*>(a) ) { actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); if ( ( (QDesignerActionGroup*)a )->widget() ) ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); - } else if ( ::tqqt_cast<QDesignerAction*>(a) ) { + } else if ( ::tqt_cast<QDesignerAction*>(a) ) { actionMap.insert( ( (QDesignerAction*)a )->widget(), a ); ( (QDesignerAction*)a )->widget()->installEventFilter( this ); - } else if ( ::tqqt_cast<QSeparatorAction*>(a) ) { + } else if ( ::tqt_cast<QSeparatorAction*>(a) ) { actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); } @@ -611,7 +611,7 @@ void QDesignerToolBar::actionRemoved() TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) { - if ( orientation() ==Qt::Horizontal ) { + if ( orientation() ==TQt::Horizontal ) { TQPoint pnt( width() - 2, 0 ); insertAnchor = 0; afterAnchor = TRUE; @@ -665,7 +665,7 @@ void QDesignerToolBar::drawIndicator( const TQPoint &pos ) if ( lastIndicatorPos == pos ) return; bool wasVsisible = indicator->isVisible(); - if ( orientation() ==Qt::Horizontal ) { + if ( orientation() ==TQt::Horizontal ) { indicator->resize( 3, height() ); if ( pos != TQPoint( -1, -1 ) ) indicator->move( pos.x() - 1, 0 ); @@ -709,7 +709,7 @@ void QDesignerToolBar::doInsertWidget( const TQPoint &p ) void QDesignerToolBar::clear() { for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( ::tqqt_cast<QDesignerAction*>(a) ) + if ( ::tqt_cast<QDesignerAction*>(a) ) ( (QDesignerAction*)a )->remove(); } TQToolBar::clear(); @@ -719,7 +719,7 @@ void QDesignerToolBar::installEventFilters( TQWidget *w ) { if ( !w ) return; - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( this ); delete l; diff --git a/kdevdesigner/designer/actiondnd.h b/kdevdesigner/designer/actiondnd.h index 1e9f68b0..ae8d8df0 100644 --- a/kdevdesigner/designer/actiondnd.h +++ b/kdevdesigner/designer/actiondnd.h @@ -45,7 +45,7 @@ class TQPopupMenu; class QDesignerIndicatorWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: @@ -58,7 +58,7 @@ public: class ActionDrag : public TQStoredDrag { - Q_OBJECT + TQ_OBJECT public: @@ -81,12 +81,12 @@ private: class QDesignerActionGroup : public TQActionGroup { - Q_OBJECT + TQ_OBJECT public: QDesignerActionGroup( TQObject *parent ) - : TQActionGroup( ::tqqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); } + : TQActionGroup( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); } void init(); @@ -117,14 +117,14 @@ private: class QDesignerAction : public TQAction { - Q_OBJECT + TQ_OBJECT public: QDesignerAction( TQObject *parent ) - : TQAction( ::tqqt_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(); } QDesignerAction( TQWidget *w, TQObject *parent ) - : TQAction( ::tqqt_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(); @@ -154,27 +154,27 @@ private: class QDesignerToolBarSeparator : public TQWidget { - Q_OBJECT + TQ_OBJECT public: - QDesignerToolBarSeparator( Qt::Orientation, TQToolBar *parent, const char* name=0 ); + QDesignerToolBarSeparator( TQt::Orientation, TQToolBar *parent, const char* name=0 ); TQSize sizeHint() const; - Qt::Orientation orientation() const { return orient; } + TQt::Orientation orientation() const { return orient; } public slots: - void setOrientation( Qt::Orientation ); + void setOrientation( TQt::Orientation ); protected: void styleChange( TQStyle& ); void paintEvent( TQPaintEvent * ); private: - Qt::Orientation orient; + TQt::Orientation orient; }; class QSeparatorAction : public TQAction { - Q_OBJECT + TQ_OBJECT public: @@ -194,7 +194,7 @@ private: class QDesignerToolBar : public TQToolBar { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/actioneditor.ui b/kdevdesigner/designer/actioneditor.ui index 13a56a04..9cb136ae 100644 --- a/kdevdesigner/designer/actioneditor.ui +++ b/kdevdesigner/designer/actioneditor.ui @@ -210,14 +210,14 @@ <forwards> <forward>class TQListViewItem;</forward> </forwards> -<Q_SLOTS> +<slots> <slot access="protected">init()</slot> <slot access="protected">destroy()</slot> <slot access="protected">connectionsClicked()</slot> <slot access="protected">currentActionChanged( TQListViewItem * )</slot> <slot access="protected">deleteAction()</slot> <slot access="protected">newAction()</slot> -</Q_SLOTS> +</slots> <includes> <include location="local" impldecl="in implementation">myiconloader.h</include> </includes> diff --git a/kdevdesigner/designer/actioneditorimpl.cpp b/kdevdesigner/designer/actioneditorimpl.cpp index 294507a9..f97e8a47 100644 --- a/kdevdesigner/designer/actioneditorimpl.cpp +++ b/kdevdesigner/designer/actioneditorimpl.cpp @@ -54,17 +54,17 @@ ActionEditor::ActionEditor( TQWidget* parent, const char* name, WFlags fl ) buttonConnect->setEnabled( FALSE ); TQPopupMenu *popup = new TQPopupMenu( this ); - popup->insertItem( i18n( "New &Action" ), this, TQT_SLOT( newAction() ) ); - popup->insertItem( i18n( "New Action &Group" ), this, TQT_SLOT( newActionGroup() ) ); - popup->insertItem( i18n( "New &Dropdown Action Group" ), this, TQT_SLOT( newDropDownActionGroup() ) ); + popup->insertItem( i18n( "New &Action" ), this, TQ_SLOT( newAction() ) ); + popup->insertItem( i18n( "New Action &Group" ), this, TQ_SLOT( newActionGroup() ) ); + popup->insertItem( i18n( "New &Dropdown Action Group" ), this, TQ_SLOT( newDropDownActionGroup() ) ); buttonNewAction->setPopup( popup ); buttonNewAction->setPopupDelay( 0 ); - connect( listActions, TQT_SIGNAL( insertAction() ), this, TQT_SLOT( newAction() ) ); - connect( listActions, TQT_SIGNAL( insertActionGroup() ), this, TQT_SLOT( newActionGroup() ) ); - connect( listActions, TQT_SIGNAL( insertDropDownActionGroup() ), this, TQT_SLOT( newDropDownActionGroup() ) ); - connect( listActions, TQT_SIGNAL( deleteAction() ), this, TQT_SLOT( deleteAction() ) ); - connect( listActions, TQT_SIGNAL( connectAction() ), this, TQT_SLOT( connectionsClicked() ) ); + connect( listActions, TQ_SIGNAL( insertAction() ), this, TQ_SLOT( newAction() ) ); + connect( listActions, TQ_SIGNAL( insertActionGroup() ), this, TQ_SLOT( newActionGroup() ) ); + connect( listActions, TQ_SIGNAL( insertDropDownActionGroup() ), this, TQ_SLOT( newDropDownActionGroup() ) ); + connect( listActions, TQ_SIGNAL( deleteAction() ), this, TQ_SLOT( deleteAction() ) ); + connect( listActions, TQ_SIGNAL( connectAction() ), this, TQ_SLOT( connectionsClicked() ) ); } void ActionEditor::closeEvent( TQCloseEvent *e ) @@ -103,8 +103,8 @@ TQAction *ActionEditor::newActionEx() { ActionItem *i = new ActionItem( listActions, (bool)FALSE ); TQAction *a = i->action(); - TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject* ) ) ); + TQObject::connect( a, TQ_SIGNAL( destroyed( TQObject * ) ), + this, TQ_SLOT( removeConnections( TQObject* ) ) ); MetaDataBase::addEntry( i->action() ); TQString n = "Action"; formWindow->unify( i->action(), n, TRUE ); @@ -139,7 +139,7 @@ void ActionEditor::deleteAction() ++it; } if ( formWindow ) { - formWindow->setActiveObject( TQT_TQOBJECT(formWindow->mainContainer()) ); + formWindow->setActiveObject( formWindow->mainContainer() ); if ( formWindow->formFile() ) formWindow->formFile()->setModified( TRUE ); } @@ -149,7 +149,7 @@ void ActionEditor::newAction() { ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); if ( actionParent ) { - if ( !::tqqt_cast<TQActionGroup*>(actionParent->actionGroup()) ) + if ( !::tqt_cast<TQActionGroup*>(actionParent->actionGroup()) ) actionParent = (ActionItem*)actionParent->parent(); } @@ -159,8 +159,8 @@ void ActionEditor::newAction() else i = new ActionItem( listActions, (bool)FALSE ); TQAction *a = i->action(); - TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject* ) ) ); + TQObject::connect( a, TQ_SIGNAL( destroyed( TQObject * ) ), + this, TQ_SLOT( removeConnections( TQObject* ) ) ); MetaDataBase::addEntry( i->action() ); TQString n = "Action"; formWindow->unify( i->action(), n, TRUE ); @@ -185,7 +185,7 @@ void ActionEditor::newActionGroup() { ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); if ( actionParent ) { - if ( !::tqqt_cast<TQActionGroup*>(actionParent->actionGroup()) ) + if ( !::tqt_cast<TQActionGroup*>(actionParent->actionGroup()) ) actionParent = (ActionItem*)actionParent->parent(); } @@ -195,8 +195,8 @@ void ActionEditor::newActionGroup() else i = new ActionItem( listActions, TRUE ); TQAction *ag = i->actionGroup(); - TQObject::connect( ag, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject* ) ) ); + TQObject::connect( ag, TQ_SIGNAL( destroyed( TQObject * ) ), + this, TQ_SLOT( removeConnections( TQObject* ) ) ); MetaDataBase::addEntry( i->actionGroup() ); MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", TRUE ); TQString n = "ActionGroup"; @@ -225,23 +225,23 @@ void ActionEditor::setFormWindow( FormWindow *fw ) listActions->clear(); formWindow = fw; if ( !formWindow || - !::tqqt_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 ( ::tqqt_cast<TQAction*>(a->parent()) ) + if ( ::tqt_cast<TQAction*>(a->parent()) ) continue; i = new ActionItem( listActions, a ); i->setText( 0, a->name() ); i->setPixmap( 0, a->iconSet().pixmap() ); // make sure we don't duplicate the connection - TQObject::disconnect( a, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject * ) ) ); - TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject* ) ) ); - if ( ::tqqt_cast<TQActionGroup*>(a) ) { + TQObject::disconnect( a, TQ_SIGNAL( destroyed( TQObject * ) ), + this, TQ_SLOT( removeConnections( TQObject * ) ) ); + TQObject::connect( a, TQ_SIGNAL( destroyed( TQObject * ) ), + this, TQ_SLOT( removeConnections( TQObject* ) ) ); + if ( ::tqt_cast<TQActionGroup*>(a) ) { insertChildActions( i ); } } @@ -261,7 +261,7 @@ void ActionEditor::insertChildActions( ActionItem *i ) while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::tqqt_cast<TQAction*>(o) ) + if ( !::tqt_cast<TQAction*>(o) ) continue; TQAction *a = (TQAction*)o; ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a ); @@ -269,11 +269,11 @@ void ActionEditor::insertChildActions( ActionItem *i ) i2->setText( 0, a->name() ); i2->setPixmap( 0, a->iconSet().pixmap() ); // make sure we don't duplicate the connection - TQObject::disconnect( o, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject * ) ) ); - TQObject::connect( o, TQT_SIGNAL( destroyed( TQObject * ) ), - this, TQT_SLOT( removeConnections( TQObject * ) ) ); - if ( ::tqqt_cast<TQActionGroup*>(a) ) + TQObject::disconnect( o, TQ_SIGNAL( destroyed( TQObject * ) ), + this, TQ_SLOT( removeConnections( TQObject * ) ) ); + TQObject::connect( o, TQ_SIGNAL( destroyed( TQObject * ) ), + this, TQ_SLOT( removeConnections( TQObject * ) ) ); + if ( ::tqt_cast<TQActionGroup*>(a) ) insertChildActions( i2 ); } } @@ -305,7 +305,7 @@ void ActionEditor::updateActionIcon( TQAction *a ) void ActionEditor::connectionsClicked() { ConnectionDialog dlg( formWindow->mainWindow() ); - dlg.setDefault( TQT_TQOBJECT(currentAction), TQT_TQOBJECT(formWindow) ); + dlg.setDefault( currentAction, formWindow ); dlg.addConnection(); dlg.exec(); } @@ -313,9 +313,9 @@ void ActionEditor::connectionsClicked() void ActionEditor::removeConnections( TQObject *o ) { TQValueList<MetaDataBase::Connection> conns = - MetaDataBase::connections( TQT_TQOBJECT(formWindow), o ); + MetaDataBase::connections( formWindow, o ); for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin(); it2 != conns.end(); ++it2 ) - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow), (*it2).sender, (*it2).signal, + MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal, (*it2).receiver, (*it2).slot ); } diff --git a/kdevdesigner/designer/actioneditorimpl.h b/kdevdesigner/designer/actioneditorimpl.h index 9e67ed9a..2062aaa2 100644 --- a/kdevdesigner/designer/actioneditorimpl.h +++ b/kdevdesigner/designer/actioneditorimpl.h @@ -37,7 +37,7 @@ class ActionItem; class ActionEditor : public ActionEditorBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/actionlistview.cpp b/kdevdesigner/designer/actionlistview.cpp index 3e8c95c2..8f99679a 100644 --- a/kdevdesigner/designer/actionlistview.cpp +++ b/kdevdesigner/designer/actionlistview.cpp @@ -36,25 +36,25 @@ ActionListView::ActionListView( TQWidget *parent, const char *name ) setShowSortIndicator( TRUE ); setResizeMode( LastColumn ); setRootIsDecorated( TRUE ); - connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), - this, TQT_SLOT( rmbMenu( TQListViewItem *, const TQPoint & ) ) ); + connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), + this, TQ_SLOT( rmbMenu( TQListViewItem *, const TQPoint & ) ) ); } ActionItem::ActionItem( TQListView *lv, TQAction *ac ) : TQListViewItem( lv ), a( 0 ), g( 0 ) { - g = ::tqqt_cast<QDesignerActionGroup*>(ac); + g = ::tqt_cast<QDesignerActionGroup*>(ac); if ( !g ) - a = ::tqqt_cast<QDesignerAction*>(ac); + a = ::tqt_cast<QDesignerAction*>(ac); setDragEnabled( TRUE ); } ActionItem::ActionItem( TQListViewItem *i, TQAction *ac ) : TQListViewItem( i ), a( 0 ), g( 0 ) { - g = ::tqqt_cast<QDesignerActionGroup*>(ac); + g = ::tqt_cast<QDesignerActionGroup*>(ac); if ( !g ) - a = ::tqqt_cast<QDesignerAction*>(ac); + a = ::tqt_cast<QDesignerAction*>(ac); setDragEnabled( TRUE ); moveToEnd(); } diff --git a/kdevdesigner/designer/actionlistview.h b/kdevdesigner/designer/actionlistview.h index 047b21bd..093c884c 100644 --- a/kdevdesigner/designer/actionlistview.h +++ b/kdevdesigner/designer/actionlistview.h @@ -58,7 +58,7 @@ private: class ActionListView : public TQListView { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/asciivalidator.h b/kdevdesigner/designer/asciivalidator.h index a284f6ab..31f53fa6 100644 --- a/kdevdesigner/designer/asciivalidator.h +++ b/kdevdesigner/designer/asciivalidator.h @@ -33,7 +33,7 @@ class AsciiValidator: public TQValidator { - Q_OBJECT + TQ_OBJECT public: AsciiValidator( TQObject * parent, const char *name = 0 ); diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp index b9b97827..4b3b3109 100644 --- a/kdevdesigner/designer/command.cpp +++ b/kdevdesigner/designer/command.cpp @@ -243,7 +243,7 @@ void ResizeCommand::execute() { widget->setGeometry( newRect ); formWindow()->updateSelection( widget ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); + formWindow()->emitUpdateProperties( widget ); if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) formWindow()->updateChildSelections( widget ); } @@ -252,7 +252,7 @@ void ResizeCommand::unexecute() { widget->setGeometry( oldRect ); formWindow()->updateSelection( widget ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); + formWindow()->emitUpdateProperties( widget ); if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) formWindow()->updateChildSelections( widget ); } @@ -279,15 +279,15 @@ void InsertCommand::execute() widget->show(); formWindow()->widgets()->insert( widget, widget ); formWindow()->clearSelection( FALSE ); - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + formWindow()->selectWidget( widget ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget ); } void InsertCommand::unexecute() { widget->hide(); - formWindow()->selectWidget( TQT_TQOBJECT(widget), FALSE ); - formWindow()->widgets()->remove( TQT_TQOBJECT(widget) ); + formWindow()->selectWidget( widget, FALSE ); + formWindow()->widgets()->remove( widget ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget ); } @@ -326,7 +326,7 @@ void MoveCommand::execute() w->reparent( newParent, pos, TRUE ); formWindow()->raiseSelection( w ); formWindow()->raiseChildSelections( w ); - formWindow()->widgetChanged( TQT_TQOBJECT(w) ); + formWindow()->widgetChanged( w ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); } @@ -334,7 +334,7 @@ void MoveCommand::execute() } formWindow()->updateSelection( w ); formWindow()->updateChildSelections( w ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); + formWindow()->emitUpdateProperties( w ); } } @@ -347,7 +347,7 @@ void MoveCommand::unexecute() w->reparent( oldParent, pos, TRUE ); formWindow()->raiseSelection( w ); formWindow()->raiseChildSelections( w ); - formWindow()->widgetChanged( TQT_TQOBJECT(w) ); + formWindow()->widgetChanged( w ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); } @@ -355,7 +355,7 @@ void MoveCommand::unexecute() } formWindow()->updateSelection( w ); formWindow()->updateChildSelections( w ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); + formWindow()->emitUpdateProperties( w ); } } @@ -371,7 +371,7 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw, // Include the children of the selected items when deleting for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - TQObjectList *children = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *children = w->queryList( "TQWidget" ); for ( TQWidget *c = (TQWidget *)children->first(); c; c = (TQWidget *)children->next() ) { if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) { widgets.insert(widgets.at() + 1, c); @@ -392,13 +392,13 @@ void DeleteCommand::execute() TQString s = w->name(); s.prepend( "qt_dead_widget_" ); w->setName( s ); - formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); + formWindow()->selectWidget( w, FALSE ); formWindow()->widgets()->remove( w ); - TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) ); + TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w ); connections.insert( w, conns ); TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); for ( ; it != conns.end(); ++it ) { - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), (*it).sender, + MetaDataBase::removeConnection( formWindow(), (*it).sender, (*it).signal, (*it).receiver, (*it).slot ); } } @@ -418,11 +418,11 @@ void DeleteCommand::unexecute() s.remove( 0, TQString( "qt_dead_widget_" ).length() ); w->setName( s ); formWindow()->widgets()->insert( w, w ); - formWindow()->selectWidget( TQT_TQOBJECT(w) ); + formWindow()->selectWidget( w ); TQValueList<MetaDataBase::Connection> conns = *connections.find( w ); TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); for ( ; it != conns.end(); ++it ) { - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender, + MetaDataBase::addConnection( formWindow(), (*it).sender, (*it).signal, (*it).receiver, (*it).slot ); } } @@ -457,8 +457,8 @@ void SetPropertyCommand::execute() if ( isResetCommand ) { MetaDataBase::setPropertyChanged( widget, propName, FALSE ); if ( WidgetFactory::resetProperty( widget, propName ) ) { - if ( !formWindow()->isWidgetSelected( widget ) && TQT_TQOBJECT(formWindow()) != TQT_TQOBJECT(widget) ) - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + if ( !formWindow()->isWidgetSelected( widget ) && formWindow() != widget ) + formWindow()->selectWidget( widget ); if ( editor->widget() != widget ) editor->setWidget( widget, formWindow() ); editor->propertyList()->setCurrentProperty( propName ); @@ -494,7 +494,7 @@ bool SetPropertyCommand::canMerge( Command *c ) if ( !p ) { if ( propName == "toolTip" || propName == "whatsThis" ) return TRUE; - if ( ::tqqt_cast<CustomWidget*>((TQObject *)widget) ) { + if ( ::tqt_cast<CustomWidget*>((TQObject *)widget) ) { MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget(); if ( !cw ) return FALSE; @@ -545,7 +545,7 @@ bool SetPropertyCommand::checkProperty() return FALSE; } - if ( ::tqqt_cast<FormWindow*>(widget->parent()) ) + if ( ::tqt_cast<FormWindow*>(widget->parent()) ) formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() ); } return TRUE; @@ -557,7 +557,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ return; if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select ) - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + formWindow()->selectWidget( widget ); if ( editor->widget() != widget && select ) editor->setWidget( widget, formWindow() ); if ( select ) @@ -587,17 +587,17 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ TQVariant val = v; if ( val.toString() == "default" ) val = -1; - MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); + MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), val.toInt() ); } else if ( propName == "layoutMargin" ) { TQVariant val = v; if ( val.toString() == "default" ) val = -1; - MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); + MetaDataBase::setMargin( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), val.toInt() ); } else if ( propName == "resizeMode" ) { - MetaDataBase::setResizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), currentItemText ); + MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), currentItemText ); } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) { MetaDataBase::setFakeProperty( editor->widget(), propName, v ); - } else if ( ::tqqt_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 ); @@ -634,9 +634,9 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ oldSerNum = v.toPixmap().serialNumber(); widget->setProperty( propName, v ); if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() ) - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formWindow()), + MetaDataBase::setPixmapKey( formWindow(), widget->property( propName ).toPixmap().serialNumber(), - MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) ); + MetaDataBase::pixmapKey( formWindow(), oldSerNum ) ); if ( propName == "cursor" ) { MetaDataBase::setCursor( (TQWidget*)((TQObject *)widget), v.toCursor() ); } @@ -645,10 +645,10 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ if ( formWindow()->isMainContainer( widget ) ) formWindow()->setName( v.toCString() ); } - if ( propName == "name" && ::tqqt_cast<TQAction*>((TQObject *)widget) && ::tqqt_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" && ::tqqt_cast<TQAction*>((TQObject *)widget) && ::tqqt_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" ) { @@ -666,7 +666,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) ); } editor->emitWidgetChanged(); - formWindow()->killAccels( TQT_TQOBJECT(widget) ); + formWindow()->killAccels( widget ); } // ------------------------------------------------------------ @@ -791,13 +791,13 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, : Command( n, fw ), lb( layoutBase ), widgets( wl ) { WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase ); - spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) ); - margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) ); + spacing = MetaDataBase::spacing( layoutBase ); + margin = MetaDataBase::margin( layoutBase ); layout = 0; if ( lay == WidgetFactory::HBox ) - layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_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, ::tqqt_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 ); } @@ -820,8 +820,8 @@ void BreakLayoutCommand::unexecute() formWindow()->clearSelection( FALSE ); layout->doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); - MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing ); - MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin ); + MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( lb ), spacing ); + MetaDataBase::setMargin( WidgetFactory::containerOfWidget( lb ), margin ); } // ------------------------------------------------------------ @@ -853,7 +853,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" ); tabPage->hide(); index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) ); + MetaDataBase::addEntry( tabPage ); } void AddTabPageCommand::execute() @@ -862,7 +862,7 @@ void AddTabPageCommand::execute() index = ( (QDesignerTabWidget*)tabWidget )->count(); tabWidget->insertTab( tabPage, tabLabel, index ); tabWidget->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -870,7 +870,7 @@ void AddTabPageCommand::unexecute() { tabWidget->removePage( tabPage ); tabPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -889,7 +889,7 @@ void MoveTabPageCommand::execute() ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -898,7 +898,7 @@ void MoveTabPageCommand::unexecute() ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -916,7 +916,7 @@ void DeleteTabPageCommand::execute() { tabWidget->removePage( tabPage ); tabPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -924,7 +924,7 @@ void DeleteTabPageCommand::unexecute() { tabWidget->insertTab( tabPage, tabLabel, index ); tabWidget->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); } @@ -937,13 +937,13 @@ AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWin stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" ); stackPage->hide(); index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) ); + MetaDataBase::addEntry( stackPage ); } void AddWidgetStackPageCommand::execute() { index = widgetStack->insertPage( stackPage, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); } @@ -951,7 +951,7 @@ void AddWidgetStackPageCommand::unexecute() { index = widgetStack->removePage( stackPage ); stackPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); } @@ -966,7 +966,7 @@ void DeleteWidgetStackPageCommand::execute() { index = widgetStack->removePage( stackPage ); stackPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( stackPage ); } @@ -974,7 +974,7 @@ void DeleteWidgetStackPageCommand::unexecute() { index = widgetStack->insertPage( stackPage, index ); widgetStack->raiseWidget( stackPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( stackPage ); } @@ -988,7 +988,7 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw, page->hide(); index = i; show = s; - MetaDataBase::addEntry( TQT_TQOBJECT(page) ); + MetaDataBase::addEntry( page ); } void AddWizardPageCommand::execute() @@ -998,7 +998,7 @@ void AddWizardPageCommand::execute() wizard->insertPage( page, pageLabel, index ); if ( show ) ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1006,7 +1006,7 @@ void AddWizardPageCommand::unexecute() { wizard->removePage( page ); page->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1025,7 +1025,7 @@ void DeleteWizardPageCommand::execute() pageLabel = wizard->title( page ); wizard->removePage( page ); page->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1034,7 +1034,7 @@ void DeleteWizardPageCommand::unexecute() wizard->insertPage( page, pageLabel, index ); if ( show ) ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1054,7 +1054,7 @@ void RenameWizardPageCommand::execute() wizard->setTitle( page, label ); label = oldLabel; - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); } void RenameWizardPageCommand::unexecute() @@ -1079,7 +1079,7 @@ void SwapWizardPagesCommand::execute() wizard->removePage( page2 ); wizard->insertPage( page1, page1Label, index2 ); wizard->insertPage( page2, page2Label, index1 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1101,7 +1101,7 @@ void MoveWizardPageCommand::execute() TQString pageLabel = wizard->title( page ); wizard->removePage( page ); wizard->insertPage( page, pageLabel, index2 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1112,7 +1112,7 @@ void MoveWizardPageCommand::unexecute() TQString pageLabel = wizard->title( page ); wizard->removePage( page ); wizard->insertPage( page, pageLabel, index1 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); } @@ -1126,17 +1126,17 @@ AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw void AddConnectionCommand::execute() { - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, + MetaDataBase::addConnection( formWindow(), connection.sender, connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); } void AddConnectionCommand::unexecute() { - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, + MetaDataBase::removeConnection( formWindow(), connection.sender, connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); } @@ -1150,17 +1150,17 @@ RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWind void RemoveConnectionCommand::execute() { - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, + MetaDataBase::removeConnection( formWindow(), connection.sender, connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); } void RemoveConnectionCommand::unexecute() { - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, + MetaDataBase::addConnection( formWindow(), connection.sender, connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + if ( connection.receiver == formWindow()->mainContainer() ) formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); } @@ -1176,7 +1176,7 @@ AddFunctionCommand::AddFunctionCommand( const TQString &name, FormWindow *fw, co void AddFunctionCommand::execute() { - MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); //integration (add - execute) @@ -1195,7 +1195,7 @@ void AddFunctionCommand::execute() void AddFunctionCommand::unexecute() { - MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); //integration (add - unexecute) @@ -1230,7 +1230,7 @@ ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const TQString &name, void ChangeFunctionAttribCommand::execute() { - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), oldName, newName, newSpec, newAccess, + MetaDataBase::changeFunctionAttributes( formWindow(), oldName, newName, newSpec, newAccess, newType, newLang, newReturnType ); formWindow()->formFile()->functionNameChanged( oldName, newName ); formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType ); @@ -1257,7 +1257,7 @@ void ChangeFunctionAttribCommand::execute() void ChangeFunctionAttribCommand::unexecute() { - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), newName, oldName, oldSpec, oldAccess, + MetaDataBase::changeFunctionAttributes( formWindow(), newName, oldName, oldSpec, oldAccess, oldType, oldLang, oldReturnType ); formWindow()->formFile()->functionNameChanged( newName, oldName ); formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType ); @@ -1291,7 +1291,7 @@ RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow * returnType( rt ) { if ( spec.isNull() ) { - TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); + TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( fw ); for ( TQValueList<MetaDataBase::Function>::Iterator it = lst.begin(); it != lst.end(); ++it ) { if ( MetaDataBase::normalizeFunction( (*it).function ) == MetaDataBase::normalizeFunction( function ) ) { @@ -1308,7 +1308,7 @@ RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow * void RemoveFunctionCommand::execute() { - MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); //integration (remove - execute) @@ -1326,9 +1326,9 @@ void RemoveFunctionCommand::execute() void RemoveFunctionCommand::unexecute() { - if ( MetaDataBase::hasFunction( TQT_TQOBJECT(formWindow()), function ) ) + if ( MetaDataBase::hasFunction( formWindow(), function ) ) return; - MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); //integration (remove - unexecute) @@ -1354,7 +1354,7 @@ AddVariableCommand::AddVariableCommand( const TQString &name, FormWindow *fw, co void AddVariableCommand::execute() { - MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); + MetaDataBase::addVariable( formWindow(), varName, access ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1362,7 +1362,7 @@ void AddVariableCommand::execute() void AddVariableCommand::unexecute() { - MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); + MetaDataBase::removeVariable( formWindow(), varName ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1374,12 +1374,12 @@ SetVariablesCommand::SetVariablesCommand( const TQString &name, FormWindow *fw, TQValueList<MetaDataBase::Variable> lst ) : Command( name, fw ), newList( lst ) { - oldList = MetaDataBase::variables( TQT_TQOBJECT(formWindow()) ); + oldList = MetaDataBase::variables( formWindow() ); } void SetVariablesCommand::execute() { - MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), newList ); + MetaDataBase::setVariables( formWindow(), newList ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1387,7 +1387,7 @@ void SetVariablesCommand::execute() void SetVariablesCommand::unexecute() { - MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), oldList ); + MetaDataBase::setVariables( formWindow(), oldList ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1398,7 +1398,7 @@ void SetVariablesCommand::unexecute() RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn ) : Command( name, fw ), varName( vn ) { - TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( TQT_TQOBJECT(fw) ); + TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( fw ); for ( TQValueList<MetaDataBase::Variable>::Iterator it = lst.begin(); it != lst.end(); ++it ) { if ( (*it).varName == varName ) { access = (*it).varAccess; @@ -1409,7 +1409,7 @@ RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow * void RemoveVariableCommand::execute() { - MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); + MetaDataBase::removeVariable( formWindow(), varName ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1417,7 +1417,7 @@ void RemoveVariableCommand::execute() void RemoveVariableCommand::unexecute() { - MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); + MetaDataBase::addVariable( formWindow(), varName, access ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) formWindow()->formFile()->setModified( TRUE ); @@ -1510,7 +1510,7 @@ void PasteCommand::execute() { for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->show(); - formWindow()->selectWidget( TQT_TQOBJECT(w) ); + formWindow()->selectWidget( w ); formWindow()->widgets()->insert( w, w ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); } @@ -1520,7 +1520,7 @@ void PasteCommand::unexecute() { for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->hide(); - formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); + formWindow()->selectWidget( w, FALSE ); formWindow()->widgets()->remove( w ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); } @@ -1762,21 +1762,21 @@ PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, F : Command( n, fw ), newText( txt ), mlined( mle ) { oldText = mlined->text(); - wasChanged = MetaDataBase::isPropertyChanged( TQT_TQOBJECT(mlined), "text" ); + wasChanged = MetaDataBase::isPropertyChanged( mlined, "text" ); } void PopulateMultiLineEditCommand::execute() { mlined->setText( newText ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", TRUE ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); + MetaDataBase::setPropertyChanged( mlined, "text", TRUE ); + formWindow()->emitUpdateProperties( mlined ); } void PopulateMultiLineEditCommand::unexecute() { mlined->setText( oldText ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", wasChanged ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); + MetaDataBase::setPropertyChanged( mlined, "text", wasChanged ); + formWindow()->emitUpdateProperties( mlined ); } // ------------------------------------------------------------ @@ -1788,7 +1788,7 @@ PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, T { #ifndef TQT_NO_TABLE int i = 0; - TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table ); for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { PopulateTableCommand::Column col; col.text = table->horizontalHeader()->label( i ); @@ -1818,7 +1818,7 @@ void PopulateTableCommand::execute() if ( !(*cit).field.isEmpty() ) columnFields.insert( (*cit).text, (*cit).field ); } - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); + MetaDataBase::setColumnFields( table, columnFields ); table->setNumRows( newRows.count() ); i = 0; for ( TQValueList<Row>::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i ) @@ -1837,7 +1837,7 @@ void PopulateTableCommand::unexecute() if ( !(*cit).field.isEmpty() ) columnFields.insert( (*cit).text, (*cit).field ); } - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); + MetaDataBase::setColumnFields( table, columnFields ); table->setNumRows( oldRows.count() ); i = 0; for ( TQValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i ) @@ -1857,7 +1857,7 @@ void AddActionToToolBarCommand::execute() { action->addTo( toolBar ); - if ( ::tqqt_cast<QDesignerAction*>(action) ) { + if ( ::tqt_cast<QDesignerAction*>(action) ) { TQString s = ( (QDesignerAction*)action )->widget()->name(); if ( s.startsWith( "qt_dead_widget_" ) ) { s.remove( 0, TQString( "qt_dead_widget_" ).length() ); @@ -1865,22 +1865,22 @@ void AddActionToToolBarCommand::execute() } toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action ); ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar ); - } else if ( ::tqqt_cast<QDesignerActionGroup*>(action) ) { + } else if ( ::tqt_cast<QDesignerActionGroup*>(action) ) { if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) { toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action ); ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); } - } else if ( ::tqqt_cast<QSeparatorAction*>(action) ) { + } else if ( ::tqt_cast<QSeparatorAction*>(action) ) { toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action ); ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar ); } - if ( !::tqqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) { + if ( !::tqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) { if ( index == -1 ) toolBar->appendAction( action ); else toolBar->insertAction( index, action ); toolBar->reInsert(); - TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + TQObject::connect( action, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) ); } else { TQObjectList clo = action->childrenListObject(); if ( !clo.isEmpty() ) { @@ -1889,10 +1889,10 @@ void AddActionToToolBarCommand::execute() while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::tqqt_cast<TQAction*>(o) ) + if ( !::tqt_cast<TQAction*>(o) ) continue; // ### fix it for nested actiongroups - if ( ::tqqt_cast<QDesignerAction*>(o) ) { + if ( ::tqt_cast<QDesignerAction*>(o) ) { QDesignerAction *ac = (QDesignerAction*)o; toolBar->insertAction( ac->widget(), ac ); ac->widget()->installEventFilter( toolBar ); @@ -1901,18 +1901,18 @@ void AddActionToToolBarCommand::execute() else toolBar->insertAction( index + (i++), ac ); } - TQObject::connect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + TQObject::connect( o, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) ); } } toolBar->reInsert(); - TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + TQObject::connect( action, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) ); } formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void AddActionToToolBarCommand::unexecute() { - if ( ::tqqt_cast<QDesignerAction*>(action) ) { + if ( ::tqt_cast<QDesignerAction*>(action) ) { TQString s = ( (QDesignerAction*)action )->widget()->name(); s.prepend( "qt_dead_widget_" ); ( (QDesignerAction*)action )->widget()->setName( s ); @@ -1920,8 +1920,8 @@ void AddActionToToolBarCommand::unexecute() toolBar->removeAction( action ); action->removeFrom( toolBar ); - TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - if ( !::tqqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) { + TQObject::disconnect( action, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) ); + if ( !::tqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) { action->removeEventFilter( toolBar ); } else { TQObjectList clo = action->childrenListObject(); @@ -1930,13 +1930,13 @@ void AddActionToToolBarCommand::unexecute() while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::tqqt_cast<TQAction*>(o) ) + if ( !::tqt_cast<TQAction*>(o) ) continue; - if ( ::tqqt_cast<QDesignerAction*>(o) ) { + if ( ::tqt_cast<QDesignerAction*>(o) ) { o->removeEventFilter( toolBar ); toolBar->removeAction( (TQAction*)o ); } - TQObject::disconnect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + TQObject::disconnect( o, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) ); } } } @@ -1955,7 +1955,7 @@ void AddToolBarCommand::execute() if ( !toolBar ) { toolBar = new QDesignerToolBar( mainWindow ); TQString n = "Toolbar"; - formWindow()->unify( TQT_TQOBJECT(toolBar), n, TRUE ); + formWindow()->unify( toolBar, n, TRUE ); toolBar->setName( n ); mainWindow->addToolBar( toolBar, n ); } else { @@ -2011,7 +2011,7 @@ void AddContainerPageCommand::execute() wiface->insertPage( wClassName, container, pageLabel, index, page ); MetaDataBase::addEntry( page ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } @@ -2020,7 +2020,7 @@ void AddContainerPageCommand::unexecute() if ( !wiface || !wiface->supportsPages( wClassName ) ) return; wiface->removePage( wClassName, container, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } @@ -2054,7 +2054,7 @@ void DeleteContainerPageCommand::execute() return; wiface->removePage( wClassName, container, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } @@ -2066,7 +2066,7 @@ void DeleteContainerPageCommand::unexecute() index = wiface->count( wClassName, container ); wiface->insertPage( wClassName, container, pageLabel, index, page ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } @@ -2099,7 +2099,7 @@ void RenameContainerPageCommand::execute() if ( !wiface || !wiface->supportsPages( wClassName ) ) return; wiface->renamePage( wClassName, container, index, newLabel ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } @@ -2108,7 +2108,7 @@ void RenameContainerPageCommand::unexecute() if ( !wiface || !wiface->supportsPages( wClassName ) ) return; wiface->renamePage( wClassName, container, index, oldLabel ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); // #### show and update pages in object hierarchy view } #endif // TQT_CONTAINER_CUSTOM_WIDGETS @@ -2407,7 +2407,7 @@ void RenameMenuCommand::execute() PopupMenuEditor *popup = item->menu(); item->setMenuText( newName ); TQString legal = makeLegal( newName ); - formWindow()->unify( TQT_TQOBJECT(popup), legal, TRUE ); + formWindow()->unify( popup, legal, TRUE ); popup->setName( legal ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -2429,14 +2429,14 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw, toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" ); toolBoxPage->hide(); index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) ); + MetaDataBase::addEntry( toolBoxPage ); } void AddToolBoxPageCommand::execute() { index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel); toolBox->setCurrentIndex( index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -2444,7 +2444,7 @@ void AddToolBoxPageCommand::unexecute() { toolBox->removeItem( toolBoxPage ); toolBoxPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -2462,7 +2462,7 @@ void DeleteToolBoxPageCommand::execute() { toolBox->removeItem( toolBoxPage ); toolBoxPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -2470,6 +2470,6 @@ void DeleteToolBoxPageCommand::unexecute() { index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel ); toolBox->setCurrentIndex( index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->emitUpdateProperties( formWindow()->currentWidget() ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } diff --git a/kdevdesigner/designer/command.h b/kdevdesigner/designer/command.h index b1c7a2a5..a4c1243d 100644 --- a/kdevdesigner/designer/command.h +++ b/kdevdesigner/designer/command.h @@ -149,7 +149,7 @@ private: class CommandHistory : public TQObject { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/configtoolboxdialog.ui b/kdevdesigner/designer/configtoolboxdialog.ui index 226cdd35..6b006d74 100644 --- a/kdevdesigner/designer/configtoolboxdialog.ui +++ b/kdevdesigner/designer/configtoolboxdialog.ui @@ -305,7 +305,7 @@ <includes> <include location="local" impldecl="in implementation">configtoolboxdialog.ui.h</include> </includes> -<Q_SLOTS> +<slots> <slot>addTool()</slot> <slot>removeTool()</slot> <slot>moveToolUp()</slot> @@ -313,7 +313,7 @@ <slot>currentToolChanged( TQListViewItem * i )</slot> <slot>currentCommonToolChanged( TQListViewItem * i )</slot> <slot>ok()</slot> -</Q_SLOTS> +</slots> <functions> <function access="private">init()</function> </functions> diff --git a/kdevdesigner/designer/configtoolboxdialog.ui.h b/kdevdesigner/designer/configtoolboxdialog.ui.h index 7dcd6530..77e294b1 100644 --- a/kdevdesigner/designer/configtoolboxdialog.ui.h +++ b/kdevdesigner/designer/configtoolboxdialog.ui.h @@ -40,10 +40,10 @@ void ConfigToolboxDialog::init() ListViewDnd *commonDnd = new ListViewDnd( listViewCommon ); commonDnd->setDragMode( ListViewDnd::Both | ListViewDnd::Move | ListViewDnd::Flat ); - TQObject::connect( toolsDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ), - commonDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) ); - TQObject::connect( commonDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ), - commonDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) ); + TQObject::connect( toolsDnd, TQ_SIGNAL( dropped( TQListViewItem * ) ), + commonDnd, TQ_SLOT( confirmDrop( TQListViewItem * ) ) ); + TQObject::connect( commonDnd, TQ_SIGNAL( dropped( TQListViewItem * ) ), + commonDnd, TQ_SLOT( confirmDrop( TQListViewItem * ) ) ); TQDict<TQListViewItem> groups; TQAction *a; diff --git a/kdevdesigner/designer/connectiondialog.ui b/kdevdesigner/designer/connectiondialog.ui index 51995633..d6712a84 100644 --- a/kdevdesigner/designer/connectiondialog.ui +++ b/kdevdesigner/designer/connectiondialog.ui @@ -201,7 +201,7 @@ <variable>TQObject *defaultSender;</variable> <variable>TQObject *defaultReceiver;</variable> </variables> -<Q_SLOTS> +<slots> <slot>init()</slot> <slot>addConnection()</slot> <slot returnType="ConnectionContainer *">addConnection( TQObject * sender, TQObject * receiver, const TQString & signal, const TQString & slot )</slot> @@ -214,6 +214,6 @@ <slot>updateEditSlotsButton()</slot> <slot>updateConnectionContainers()</slot> <slot>ensureConnectionVisible()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/connectiondialog.ui.h b/kdevdesigner/designer/connectiondialog.ui.h index 25a5d5f2..0e0877da 100644 --- a/kdevdesigner/designer/connectiondialog.ui.h +++ b/kdevdesigner/designer/connectiondialog.ui.h @@ -69,10 +69,10 @@ static TQPixmap *validConnection = 0; void ConnectionDialog::init() { - connect( connectionsTable, TQT_SIGNAL( currentChanged( int, int ) ), - this, TQT_SLOT( updateEditSlotsButton() ) ); - connect( connectionsTable, TQT_SIGNAL( resorted() ), - this, TQT_SLOT( updateConnectionContainers() ) ); + connect( connectionsTable, TQ_SIGNAL( currentChanged( int, int ) ), + this, TQ_SLOT( updateEditSlotsButton() ) ); + connect( connectionsTable, TQ_SIGNAL( resorted() ), + this, TQ_SLOT( updateConnectionContainers() ) ); buttonEditSlots->setEnabled( FALSE ); if ( !invalidConnection ) { @@ -81,7 +81,7 @@ void ConnectionDialog::init() } TQValueList<MetaDataBase::Connection> conns = - MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); + MetaDataBase::connections( MainWindow::self->formWindow() ); for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) { ConnectionContainer *c = addConnection( (*it).sender, (*it).receiver, @@ -144,13 +144,13 @@ ConnectionContainer *ConnectionDialog::addConnection( TQObject *sender, TQObject re->setSlot( sl ); sl->setSlot( sl ); - connect( re, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ), - this, TQT_SLOT( updateEditSlotsButton() ) ); + connect( re, TQ_SIGNAL( currentReceiverChanged( TQObject * ) ), + this, TQ_SLOT( updateEditSlotsButton() ) ); - ConnectionContainer *c = new ConnectionContainer( TQT_TQOBJECT(this), se, si, re, sl, row ); + ConnectionContainer *c = new ConnectionContainer( this, se, si, re, sl, row ); connections.append( c ); - connect( c, TQT_SIGNAL( changed( ConnectionContainer * ) ), - this, TQT_SLOT( updateConnectionState( ConnectionContainer * ) ) ); + connect( c, TQ_SIGNAL( changed( ConnectionContainer * ) ), + this, TQ_SLOT( updateConnectionState( ConnectionContainer * ) ) ); connectionsTable->setCurrentCell( row, 0 ); @@ -188,7 +188,7 @@ void ConnectionDialog::updateConnectionState( ConnectionContainer *c ) void ConnectionDialog::okClicked() { TQValueList<MetaDataBase::Connection> oldConnections = - MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); + MetaDataBase::connections( MainWindow::self->formWindow() ); TQPtrList<Command> newConnectionCmds; TQPtrList<Command> oldConnectionCmds; for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) { @@ -215,7 +215,7 @@ void ConnectionDialog::okClicked() TQValueList<MetaDataBase::Connection> conns = - MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) ); + MetaDataBase::connections( MainWindow::self->formWindow() ); for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) { RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Signal/Slot " diff --git a/kdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp index 12b03a1d..322d9e4b 100644 --- a/kdevdesigner/designer/connectionitems.cpp +++ b/kdevdesigner/designer/connectionitems.cpp @@ -122,26 +122,26 @@ void ConnectionItem::slotChanged( const TQString & ) void ConnectionItem::setSender( SenderItem *i ) { - connect( i, TQT_SIGNAL( currentSenderChanged( TQObject * ) ), - this, TQT_SLOT( senderChanged( TQObject * ) ) ); + connect( i, TQ_SIGNAL( currentSenderChanged( TQObject * ) ), + this, TQ_SLOT( senderChanged( TQObject * ) ) ); } void ConnectionItem::setReceiver( ReceiverItem *i ) { - connect( i, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ), - this, TQT_SLOT( receiverChanged( TQObject * ) ) ); + connect( i, TQ_SIGNAL( currentReceiverChanged( TQObject * ) ), + this, TQ_SLOT( receiverChanged( TQObject * ) ) ); } void ConnectionItem::setSignal( SignalItem *i ) { - connect( i, TQT_SIGNAL( currentSignalChanged( const TQString & ) ), - this, TQT_SLOT( signalChanged( const TQString & ) ) ); + connect( i, TQ_SIGNAL( currentSignalChanged( const TQString & ) ), + this, TQ_SLOT( signalChanged( const TQString & ) ) ); } void ConnectionItem::setSlot( SlotItem *i ) { - connect( i, TQT_SIGNAL( currentSlotChanged( const TQString & ) ), - this, TQT_SLOT( slotChanged( const TQString & ) ) ); + connect( i, TQ_SIGNAL( currentSlotChanged( const TQString & ) ), + this, TQ_SLOT( slotChanged( const TQString & ) ) ); } void ConnectionItem::paint( TQPainter *p, const TQColorGroup &cg, @@ -187,10 +187,10 @@ static void appendChildActions( TQAction *action, TQStringList &lst ) while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::tqqt_cast<TQAction*>(o) ) + if ( !::tqt_cast<TQAction*>(o) ) continue; lst << o->name(); - if ( !o->childrenListObject().isEmpty() && ::tqqt_cast<TQActionGroup*>(o) ) + if ( !o->childrenListObject().isEmpty() && ::tqt_cast<TQActionGroup*>(o) ) appendChildActions( (TQAction*)o, lst ); } } @@ -203,7 +203,7 @@ static TQStringList flatActions( const TQPtrList<TQAction> &l ) while ( it.current() ) { TQAction *action = it.current(); lst << action->name(); - if ( !action->childrenListObject().isEmpty() && ::tqqt_cast<TQActionGroup*>(action) ) + if ( !action->childrenListObject().isEmpty() && ::tqt_cast<TQActionGroup*>(action) ) appendChildActions( action, lst ); ++it; } @@ -225,9 +225,9 @@ SenderItem::SenderItem( TQTable *table, FormWindow *fw ) continue; } if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && - !::tqqt_cast<TQLayoutWidget*>(it.current()) && - !::tqqt_cast<Spacer*>(it.current()) && - !::tqqt_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(); } @@ -245,8 +245,8 @@ TQWidget *SenderItem::createEditor() const { TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); - connect( cb, TQT_SIGNAL( activated( const TQString & ) ), - this, TQT_SLOT( senderChanged( const TQString & ) ) ); + connect( cb, TQ_SIGNAL( activated( const TQString & ) ), + this, TQ_SLOT( senderChanged( const TQString & ) ) ); return cb; } @@ -258,7 +258,7 @@ void SenderItem::setSenderEx( TQObject *sender ) void SenderItem::senderChanged( const TQString &sender ) { - TQObject *o = formWindow->child( sender, TQOBJECT_OBJECT_NAME_STRING ); + TQObject *o = formWindow->child( sender, "TQObject" ); if ( !o ) o = formWindow->findAction( sender ); if ( !o ) @@ -282,9 +282,9 @@ ReceiverItem::ReceiverItem( TQTable *table, FormWindow *fw ) continue; } if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && - !::tqqt_cast<TQLayoutWidget*>(it.current()) && - !::tqqt_cast<Spacer*>(it.current()) && - !::tqqt_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(); } @@ -302,8 +302,8 @@ TQWidget *ReceiverItem::createEditor() const { TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); - connect( cb, TQT_SIGNAL( activated( const TQString & ) ), - this, TQT_SLOT( receiverChanged( const TQString & ) ) ); + connect( cb, TQ_SIGNAL( activated( const TQString & ) ), + this, TQ_SLOT( receiverChanged( const TQString & ) ) ); return cb; } @@ -315,7 +315,7 @@ void ReceiverItem::setReceiverEx( TQObject *receiver ) void ReceiverItem::receiverChanged( const TQString &receiver ) { - TQObject *o = formWindow->child( receiver, TQOBJECT_OBJECT_NAME_STRING ); + TQObject *o = formWindow->child( receiver, "TQObject" ); if ( !o ) o = formWindow->findAction( receiver ); if ( !o ) @@ -346,15 +346,15 @@ void SignalItem::senderChanged( TQObject *sender ) TQStringList lst = TQStringList::fromStrList( sigs ); - if ( ::tqqt_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 ) lst << MetaDataBase::normalizeFunction( *it ); } - if ( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(formWindow->mainContainer()) ) { - TQStringList extra = MetaDataBase::signalList( TQT_TQOBJECT(formWindow) ); + if ( sender == formWindow->mainContainer() ) { + TQStringList extra = MetaDataBase::signalList( formWindow ); if ( !extra.isEmpty() ) lst += extra; } @@ -371,8 +371,8 @@ TQWidget *SignalItem::createEditor() const { TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); - connect( cb, TQT_SIGNAL( activated( const TQString & ) ), - this, TQT_SIGNAL( currentSignalChanged( const TQString & ) ) ); + connect( cb, TQ_SIGNAL( activated( const TQString & ) ), + this, TQ_SIGNAL( currentSignalChanged( const TQString & ) ) ); return cb; } @@ -408,7 +408,7 @@ bool SlotItem::ignoreSlot( const char* slot ) const { #ifndef TQT_NO_SQL if ( qstrcmp( slot, "update()" ) == 0 && - ::tqqt_cast<TQDataBrowser*>(lastReceiver) ) + ::tqt_cast<TQDataBrowser*>(lastReceiver) ) return FALSE; #endif @@ -417,14 +417,14 @@ bool SlotItem::ignoreSlot( const char* slot ) const return TRUE; } - if ( !formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) { + if ( !formWindow->isMainContainer( lastReceiver ) ) { if ( qstrcmp( slot, "close()" ) == 0 ) return TRUE; } if ( qstrcmp( slot, "setFocus()" ) == 0 ) if ( lastReceiver->isWidgetType() && - ( (TQWidget*)lastReceiver )->focusPolicy() == TQ_NoFocus ) + ( (TQWidget*)lastReceiver )->focusPolicy() == TQWidget::NoFocus ) return TRUE; return FALSE; @@ -447,21 +447,21 @@ void SlotItem::updateSlotList() for( int i = 0; i < n; ++i ) { // accept only public slots. For the form window, also accept protected slots const TQMetaData* md = lastReceiver->metaObject()->slot( i, TRUE ); - if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->tqt_mo_access == TQMetaData::Public) || - (formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) && - lastReceiver->metaObject()->slot(i, TRUE)->tqt_mo_access == + if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->access == TQMetaData::Public) || + (formWindow->isMainContainer( lastReceiver ) && + lastReceiver->metaObject()->slot(i, TRUE)->access == TQMetaData::Protected) ) && - !ignoreSlot( md->tqt_mo_ci_name ) && - checkConnectArgs( signal.latin1(), lastReceiver, md->tqt_mo_ci_name ) ) - if ( lst.find( md->tqt_mo_ci_name ) == lst.end() ) - lst << MetaDataBase::normalizeFunction( md->tqt_mo_ci_name ); + !ignoreSlot( md->name ) && + checkConnectArgs( signal.latin1(), lastReceiver, md->name ) ) + if ( lst.find( md->name ) == lst.end() ) + lst << MetaDataBase::normalizeFunction( md->name ); } LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() ); if ( !iface || iface->supports( LanguageInterface::ConnectionsToCustomSlots ) ) { - if ( formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) { - TQValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( TQT_TQOBJECT(formWindow) ); + if ( formWindow->isMainContainer( lastReceiver ) ) { + TQValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( formWindow ); if ( !moreSlots.isEmpty() ) { for ( TQValueList<MetaDataBase::Function>::Iterator it = moreSlots.begin(); it != moreSlots.end(); ++it ) { @@ -478,7 +478,7 @@ void SlotItem::updateSlotList() } } - if ( ::tqqt_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 ) { @@ -502,8 +502,8 @@ TQWidget *SlotItem::createEditor() const { TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor(); cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) ); - connect( cb, TQT_SIGNAL( activated( const TQString & ) ), - this, TQT_SIGNAL( currentSlotChanged( const TQString & ) ) ); + connect( cb, TQ_SIGNAL( activated( const TQString & ) ), + this, TQ_SIGNAL( currentSlotChanged( const TQString & ) ) ); return cb; } diff --git a/kdevdesigner/designer/connectionitems.h b/kdevdesigner/designer/connectionitems.h index fe5e276d..0883b961 100644 --- a/kdevdesigner/designer/connectionitems.h +++ b/kdevdesigner/designer/connectionitems.h @@ -41,7 +41,7 @@ class ConnectionContainer; class ConnectionItem : public TQObject, public TQComboTableItem { - Q_OBJECT + TQ_OBJECT public: @@ -77,7 +77,7 @@ private: class SenderItem : public ConnectionItem { - Q_OBJECT + TQ_OBJECT public: @@ -97,7 +97,7 @@ private slots: class ReceiverItem : public ConnectionItem { - Q_OBJECT + TQ_OBJECT public: @@ -117,7 +117,7 @@ private slots: class SignalItem : public ConnectionItem { - Q_OBJECT + TQ_OBJECT public: @@ -135,7 +135,7 @@ signals: class SlotItem : public ConnectionItem { - Q_OBJECT + TQ_OBJECT public: @@ -164,7 +164,7 @@ private: class ConnectionContainer : public TQObject { - Q_OBJECT + TQ_OBJECT public: @@ -176,10 +176,10 @@ public: i2->setConnection( this ); i3->setConnection( this ); i4->setConnection( this ); - connect( i1, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); - connect( i2, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); - connect( i3, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); - connect( i4, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) ); + connect( i1, TQ_SIGNAL( changed() ), this, TQ_SLOT( somethingChanged() ) ); + connect( i2, TQ_SIGNAL( changed() ), this, TQ_SLOT( somethingChanged() ) ); + connect( i3, TQ_SIGNAL( changed() ), this, TQ_SLOT( somethingChanged() ) ); + connect( i4, TQ_SIGNAL( changed() ), this, TQ_SLOT( somethingChanged() ) ); } bool isModified() const { return mod; } diff --git a/kdevdesigner/designer/connectiontable.h b/kdevdesigner/designer/connectiontable.h index 60b84426..ba19d589 100644 --- a/kdevdesigner/designer/connectiontable.h +++ b/kdevdesigner/designer/connectiontable.h @@ -31,7 +31,7 @@ class ConnectionTable : public TQTable { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/customwidgeteditor.ui b/kdevdesigner/designer/customwidgeteditor.ui index 99f98961..d1cfc071 100644 --- a/kdevdesigner/designer/customwidgeteditor.ui +++ b/kdevdesigner/designer/customwidgeteditor.ui @@ -573,7 +573,7 @@ <cstring>listSignals</cstring> </property> <property name="whatsThis" stdset="0"> - <string>The list of all the Q_SIGNALS that the selected widget can emit.</string> + <string>The list of all the signals that the selected widget can emit.</string> </property> </widget> <widget class="TQLayoutWidget"> @@ -787,7 +787,7 @@ <string>Change slot access</string> </property> <property name="whatsThis" stdset="0"> - <string><b>Change the slot's access policy.</b><p>You can only connect to the widget's public Q_SLOTS.</p></string> + <string><b>Change the slot's access policy.</b><p>You can only connect to the widget's public slots.</p></string> </property> </widget> <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="4"> diff --git a/kdevdesigner/designer/customwidgeteditorimpl.cpp b/kdevdesigner/designer/customwidgeteditorimpl.cpp index f417f6f2..cc736635 100644 --- a/kdevdesigner/designer/customwidgeteditorimpl.cpp +++ b/kdevdesigner/designer/customwidgeteditorimpl.cpp @@ -58,10 +58,10 @@ CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw ) : CustomWidgetEditorBase( parent, 0, TRUE ), mainWindow( mw ) { - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); checkTimer = new TQTimer( this ); - connect( checkTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( checkWidgetName() ) ); + connect( checkTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( checkWidgetName() ) ); editClass->setEnabled( FALSE ); editHeader->setEnabled( FALSE ); @@ -73,10 +73,10 @@ CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw ) sizeVer->setEnabled( FALSE ); checkContainer->setEnabled( FALSE ); localGlobalCombo->setEnabled( FALSE ); - editClass->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(editClass) ) ); - editSignal->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) ); - editSlot->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) ); - editProperty->setValidator( new AsciiValidator( TQT_TQOBJECT(editSignal) ) ); + editClass->setValidator( new AsciiValidator( TQString(":"), editClass ) ); + editSignal->setValidator( new AsciiValidator( TRUE, editSignal ) ); + editSlot->setValidator( new AsciiValidator( TRUE, editSignal ) ); + editProperty->setValidator( new AsciiValidator( editSignal ) ); editSignal->setEnabled( FALSE ); buttonRemoveSignal->setEnabled( FALSE ); diff --git a/kdevdesigner/designer/customwidgeteditorimpl.h b/kdevdesigner/designer/customwidgeteditorimpl.h index 9e53b2ce..c49f4960 100644 --- a/kdevdesigner/designer/customwidgeteditorimpl.h +++ b/kdevdesigner/designer/customwidgeteditorimpl.h @@ -39,7 +39,7 @@ class MainWindow; class CustomWidgetEditor : public CustomWidgetEditorBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/database.cpp b/kdevdesigner/designer/database.cpp index b5baea28..e7fdf0df 100644 --- a/kdevdesigner/designer/database.cpp +++ b/kdevdesigner/designer/database.cpp @@ -62,7 +62,7 @@ void DatabaseSupport::initPreview( const TQString &connection, const TQString &t con = TQSqlDatabase::database(); frm = new TQSqlForm( o, table ); for ( TQMap<TQString, TQString>::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) { - TQObject *chld = parent->child( it.key(), TQWIDGET_OBJECT_NAME_STRING ); + TQObject *chld = parent->child( it.key(), "TQWidget" ); if ( !chld ) continue; frm->insert( (TQWidget*)chld, *it ); diff --git a/kdevdesigner/designer/database.h b/kdevdesigner/designer/database.h index cbde491f..cf5ae055 100644 --- a/kdevdesigner/designer/database.h +++ b/kdevdesigner/designer/database.h @@ -58,7 +58,7 @@ protected: class QDesignerDataBrowser : public TQDataBrowser, public DatabaseSupport { - Q_OBJECT + TQ_OBJECT public: @@ -70,7 +70,7 @@ protected: class QDesignerDataView : public TQDataView, public DatabaseSupport { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/dbconnection.ui b/kdevdesigner/designer/dbconnection.ui index 1510629b..c21e0ce8 100644 --- a/kdevdesigner/designer/dbconnection.ui +++ b/kdevdesigner/designer/dbconnection.ui @@ -214,10 +214,10 @@ <tabstop>editHostname</tabstop> <tabstop>editPort</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot access="protected">init()</slot> <slot access="protected">destroy()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <includes> <include location="global" impldecl="in implementation">klineedit.h</include> diff --git a/kdevdesigner/designer/dbconnectionimpl.cpp b/kdevdesigner/designer/dbconnectionimpl.cpp index 3cfd1fdc..678dbad0 100644 --- a/kdevdesigner/designer/dbconnectionimpl.cpp +++ b/kdevdesigner/designer/dbconnectionimpl.cpp @@ -61,7 +61,7 @@ void DatabaseConnectionEditor::accept() void DatabaseConnectionEditor::init() { connectionWidget->editName->setEnabled( FALSE ); - connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) ); + connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) ); connectionWidget->editName->setText( conn->name() ); connectionWidget->comboDriver->setEnabled( FALSE ); connectionWidget->comboDriver->lineEdit()->setText( conn->driver() ); diff --git a/kdevdesigner/designer/dbconnectionimpl.h b/kdevdesigner/designer/dbconnectionimpl.h index e2db2286..bb92c27e 100644 --- a/kdevdesigner/designer/dbconnectionimpl.h +++ b/kdevdesigner/designer/dbconnectionimpl.h @@ -35,7 +35,7 @@ class TQGridLayout; class DatabaseConnectionEditor : public DatabaseConnectionEditorBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/dbconnectionsimpl.cpp b/kdevdesigner/designer/dbconnectionsimpl.cpp index e589679b..e71718a0 100644 --- a/kdevdesigner/designer/dbconnectionsimpl.cpp +++ b/kdevdesigner/designer/dbconnectionsimpl.cpp @@ -54,7 +54,7 @@ static bool blockChanges = FALSE; DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl ) : DatabaseConnectionBase( parent, name, modal, fl ), project( pro ) { - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); connectionWidget = new DatabaseConnectionWidget( grp ); grpLayout->addWidget( connectionWidget, 0, 0 ); #ifndef TQT_NO_SQL @@ -63,7 +63,7 @@ DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* pa listConnections->insertItem( conn->name() ); connectionWidget->comboDriver->insertStringList( TQSqlDatabase::drivers() ); #endif - connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) ); + connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) ); enableAll( FALSE ); } diff --git a/kdevdesigner/designer/dbconnectionsimpl.h b/kdevdesigner/designer/dbconnectionsimpl.h index e06cc06a..18bd60bb 100644 --- a/kdevdesigner/designer/dbconnectionsimpl.h +++ b/kdevdesigner/designer/dbconnectionsimpl.h @@ -34,7 +34,7 @@ class Project; class DatabaseConnectionsEditor : public DatabaseConnectionBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/designeraction.h b/kdevdesigner/designer/designeraction.h index 85efef6b..9d6aeaed 100644 --- a/kdevdesigner/designer/designeraction.h +++ b/kdevdesigner/designer/designeraction.h @@ -24,7 +24,7 @@ class DesignerAction : public TQAction { -Q_OBJECT +TQ_OBJECT public: DesignerAction(TQObject *parent = 0, const char *name = 0) diff --git a/kdevdesigner/designer/designerappiface.cpp b/kdevdesigner/designer/designerappiface.cpp index 57ee992e..c871e301 100644 --- a/kdevdesigner/designer/designerappiface.cpp +++ b/kdevdesigner/designer/designerappiface.cpp @@ -55,9 +55,9 @@ TQRESULT DesignerInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInt { *iface = 0; - if ( uuid == IID_TQUnknown ) + if ( uuid == IID_QUnknown ) *iface = (TQUnknownInterface*)this; - else if ( uuid == IID_TQComponentInformation ) + else if ( uuid == IID_QComponentInformation ) *iface = (TQComponentInformationInterface*)this; else if ( uuid == IID_Designer ) *iface = (DesignerInterface*)this; @@ -129,13 +129,13 @@ void DesignerInterfaceImpl::updateFunctionList() void DesignerInterfaceImpl::onProjectChange( TQObject *receiver, const char *slot ) { - TQObject::connect( mainWindow, TQT_SIGNAL( projectChanged() ), receiver, slot ); + TQObject::connect( mainWindow, TQ_SIGNAL( projectChanged() ), receiver, slot ); } void DesignerInterfaceImpl::onFormChange( TQObject *receiver, const char *slot ) { - TQObject::connect( mainWindow, TQT_SIGNAL( formWindowChanged() ), receiver, slot ); - TQObject::connect( mainWindow, TQT_SIGNAL( editorChanged() ), receiver, slot ); + TQObject::connect( mainWindow, TQ_SIGNAL( formWindowChanged() ), receiver, slot ); + TQObject::connect( mainWindow, TQ_SIGNAL( editorChanged() ), receiver, slot ); } bool DesignerInterfaceImpl::singleProjectMode() const @@ -146,7 +146,7 @@ bool DesignerInterfaceImpl::singleProjectMode() const void DesignerInterfaceImpl::showError( TQWidget *widget, int line, const TQString &message ) { - mainWindow->showErrorMessage( TQT_TQOBJECT(widget), line, message ); + mainWindow->showErrorMessage( widget, line, message ); } void DesignerInterfaceImpl::runFinished() @@ -156,12 +156,12 @@ void DesignerInterfaceImpl::runFinished() void DesignerInterfaceImpl::showStackFrame( TQWidget *w, int line ) { - mainWindow->showStackFrame( TQT_TQOBJECT(w), line ); + mainWindow->showStackFrame( w, line ); } void DesignerInterfaceImpl::showDebugStep( TQWidget *w, int line ) { - mainWindow->showDebugStep( TQT_TQOBJECT(w), line ); + mainWindow->showDebugStep( w, line ); } void DesignerInterfaceImpl::runProjectPrecondition() @@ -190,7 +190,7 @@ TQPtrList<DesignerFormWindow> DesignerProjectImpl::formList() const while ( it.current() ) { TQObject *obj = it.current(); ++it; - TQWidget *par = ::tqqt_cast<FormWindow*>(obj->parent()); + TQWidget *par = ::tqt_cast<FormWindow*>(obj->parent()); if ( !obj->isWidgetType() || !par ) continue; @@ -335,7 +335,7 @@ void DesignerProjectImpl::breakPoints( TQMap<TQString, TQValueList<uint> > &bps for ( TQPtrListIterator<FormFile> forms = project->formFiles(); forms.current(); ++forms ) { if ( forms.current()->formWindow() ) - bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( TQT_TQOBJECT(forms.current()->formWindow()) ) ); + bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( forms.current()->formWindow() ) ); } } @@ -360,7 +360,7 @@ void DesignerProjectImpl::clearAllBreakpoints() const for ( TQPtrListIterator<FormFile> forms = project->formFiles(); forms.current(); ++forms ) { if ( forms.current()->formWindow() ) - MetaDataBase::setBreakPoints( TQT_TQOBJECT(forms.current()->formWindow()), empty ); + MetaDataBase::setBreakPoints( forms.current()->formWindow(), empty ); MainWindow::self->resetBreakPoints(); } } @@ -535,7 +535,7 @@ void DesignerPixmapCollectionImpl::addPixmap( const TQPixmap &p, const TQString pixCollection->addPixmap( pix, force ); FormWindow *fw = MainWindow::self->formWindow(); if ( fw ) - MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), p.serialNumber(), name ); + MetaDataBase::setPixmapKey( fw, p.serialNumber(), name ); } TQPixmap DesignerPixmapCollectionImpl::pixmap( const TQString &name ) const @@ -586,7 +586,7 @@ TQWidget *DesignerFormWindowImpl::create( const char *className, TQWidget *paren { TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name ); formWindow->insertWidget( w, TRUE ); - formWindow->killAccels( TQT_TQOBJECT(formWindow->mainContainer()) ); + formWindow->killAccels( formWindow->mainContainer() ); return w; } @@ -674,7 +674,7 @@ void DesignerFormWindowImpl::breakLayout() void DesignerFormWindowImpl::selectWidget( TQWidget * w ) { - formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); + formWindow->selectWidget( w, TRUE ); } void DesignerFormWindowImpl::selectAll() @@ -755,14 +755,14 @@ void DesignerFormWindowImpl::preview() const void DesignerFormWindowImpl::addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot ) { - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow), sender, signal, receiver, slot ); + MetaDataBase::addConnection( formWindow, sender, signal, receiver, slot ); } void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQString &specifier, const TQString &access, const TQString &type, const TQString &language, const TQString &returnType ) { - MetaDataBase::addFunction( TQT_TQOBJECT(formWindow), function, specifier, access, type, language, returnType ); + MetaDataBase::addFunction( formWindow, function, specifier, access, type, language, returnType ); formWindow->mainWindow()->functionsChanged(); } @@ -804,7 +804,7 @@ void DesignerFormWindowImpl::setColumnFields( TQObject *o, const TQMap<TQString, TQStringList DesignerFormWindowImpl::implementationIncludes() const { - TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow ); TQStringList lst; for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) { MetaDataBase::Include inc = *it; @@ -825,7 +825,7 @@ TQStringList DesignerFormWindowImpl::implementationIncludes() const TQStringList DesignerFormWindowImpl::declarationIncludes() const { - TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow ); TQStringList lst; for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) { MetaDataBase::Include inc = *it; @@ -846,7 +846,7 @@ TQStringList DesignerFormWindowImpl::declarationIncludes() const void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst ) { - TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow ); TQValueList<MetaDataBase::Include> includes; for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) { MetaDataBase::Include inc = *it; @@ -882,13 +882,13 @@ void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst includes << inc; } } - MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes ); + MetaDataBase::setIncludes( formWindow, includes ); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); } void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst ) { - TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow ); TQValueList<MetaDataBase::Include> includes; for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) { MetaDataBase::Include inc = *it; @@ -924,60 +924,60 @@ void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst ) includes << inc; } } - MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes ); + MetaDataBase::setIncludes( formWindow, includes ); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); } TQStringList DesignerFormWindowImpl::forwardDeclarations() const { - return MetaDataBase::forwards( TQT_TQOBJECT(formWindow) ); + return MetaDataBase::forwards( formWindow ); } void DesignerFormWindowImpl::setForwardDeclarations( const TQStringList &lst ) { - MetaDataBase::setForwards( TQT_TQOBJECT(formWindow), lst ); + MetaDataBase::setForwards( formWindow, lst ); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); } TQStringList DesignerFormWindowImpl::signalList() const { - return MetaDataBase::signalList( TQT_TQOBJECT(formWindow) ); + return MetaDataBase::signalList( formWindow ); } void DesignerFormWindowImpl::setSignalList( const TQStringList &lst ) { - MetaDataBase::setSignalList( TQT_TQOBJECT(formWindow), lst ); + MetaDataBase::setSignalList( formWindow, lst ); formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup(); } void DesignerFormWindowImpl::onModificationChange( TQObject *receiver, const char *slot ) { - TQObject::connect( formWindow, TQT_SIGNAL( modificationChanged( bool, FormWindow * ) ), receiver, slot ); + TQObject::connect( formWindow, TQ_SIGNAL( modificationChanged( bool, FormWindow * ) ), receiver, slot ); } void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name ) { - if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw ); TQString n = name; - formWindow->unify( TQT_TQOBJECT(popup), n, TRUE ); + formWindow->unify( popup, n, TRUE ); popup->setName( n ); MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); if ( !mb ) { mb = new MenuBarEditor( formWindow, mw ); mb->setName( "MenuBar" ); - MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); + MetaDataBase::addEntry( mb ); } mb->insertItem( text, popup ); - MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); + MetaDataBase::addEntry( popup ); } void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a ) { - if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); if ( !mw->child( 0, "MenuBarEditor" ) ) @@ -990,7 +990,7 @@ void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a ) void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu ) { - if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); if ( !mw->child( 0, "MenuBarEditor" ) ) @@ -1004,19 +1004,19 @@ void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu ) void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &name ) { - if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQToolBar *tb = new QDesignerToolBar( mw ); TQString n = name; - formWindow->unify( TQT_TQOBJECT(tb), n, TRUE ); + formWindow->unify( tb, n, TRUE ); tb->setName( n ); mw->addToolBar( tb, text ); } void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a ) { - if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" ); @@ -1028,7 +1028,7 @@ void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn ) { - if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" ); diff --git a/kdevdesigner/designer/editfunctions.ui b/kdevdesigner/designer/editfunctions.ui index a5075250..fefe1dfe 100644 --- a/kdevdesigner/designer/editfunctions.ui +++ b/kdevdesigner/designer/editfunctions.ui @@ -696,7 +696,7 @@ <tabstop>addFunction</tabstop> <tabstop>deleteFunction</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot access="protected">currentItemChanged( TQListViewItem * )</slot> <slot access="protected">currentSpecifierChanged( const TQString & )</slot> <slot access="protected">currentTextChanged( const TQString & )</slot> @@ -709,7 +709,7 @@ <slot access="protected">functionAdd()</slot> <slot access="protected">functionRemove()</slot> <slot access="protected">displaySlots( bool )</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <includes> <include location="global" impldecl="in implementation">klineedit.h</include> diff --git a/kdevdesigner/designer/editfunctionsimpl.cpp b/kdevdesigner/designer/editfunctionsimpl.cpp index 5681f00b..40c7eae2 100644 --- a/kdevdesigner/designer/editfunctionsimpl.cpp +++ b/kdevdesigner/designer/editfunctionsimpl.cpp @@ -52,12 +52,12 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) : EditFunctionsBase( parent, 0, TRUE ), formWindow( fw ) { - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); id = 0; functList.clear(); - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( fw ); for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { TQListViewItem *i = new TQListViewItem( functionListView ); @@ -86,7 +86,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) id++; if ( (*it).type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).function ).latin1() ) ) + if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( (*it).function ).latin1() ) ) i->setText( 5, i18n( "Yes" ) ); else i->setText( 5, i18n( "No" ) ); @@ -96,7 +96,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) } boxProperties->setEnabled( FALSE ); - functionName->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(functionName) ) ); + functionName->setValidator( new AsciiValidator( TRUE, functionName ) ); if ( functionListView->firstChild() ) functionListView->setCurrentItem( functionListView->firstChild() ); @@ -111,27 +111,27 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) // Connect listview signal to signal-relay TQObject::connect( functionListView, - TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ), + TQ_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ), this, - TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); + TQ_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); // Connect signal-relay to TQLineEdit "functionName" - TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "functionName" ); + TQObjectList *l = parent->queryList( "TQLineEdit", "functionName" ); TQObject *obj; TQObjectListIt itemsLineEditIt( *l ); while ( (obj = itemsLineEditIt.current()) != 0 ) { ++itemsLineEditIt; TQObject::connect( this, - TQT_SIGNAL( itemRenamed( const TQString & ) ), + TQ_SIGNAL( itemRenamed( const TQString & ) ), obj, - TQT_SLOT( setText( const TQString & ) ) ); + TQ_SLOT( setText( const TQString & ) ) ); } delete l; } void EditFunctions::okClicked() { - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow ); TQString n = i18n( "Add/Remove functions of '%1'" ).arg( formWindow->name() ); TQPtrList<Command> commands; TQValueList<MetaDataBase::Function>::Iterator fit; @@ -291,7 +291,7 @@ void EditFunctions::functionAdd( const TQString &access, const TQString &type ) if ( i->text( 4 ) == "slot" ) { i->setText( 0, "newSlot()" ); - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), "newSlot()" ) ) + if ( MetaDataBase::isSlotUsed( formWindow, "newSlot()" ) ) i->setText( 5, i18n( "Yes" ) ); else i->setText( 5, i18n( "No" ) ); @@ -398,7 +398,7 @@ void EditFunctions::currentTextChanged( const TQString &txt ) functionListView->currentItem()->setText( 0, txt ); if ( functionListView->currentItem()->text( 4 ) == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) ) + if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) ) functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); else functionListView->currentItem()->setText( 5, i18n( "No" ) ); @@ -441,7 +441,7 @@ void EditFunctions::currentTypeChanged( const TQString &type ) lastType = type; functionListView->currentItem()->setText( 4, type ); if ( type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), + if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ).latin1() ).latin1() ) ) functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); else @@ -515,7 +515,7 @@ void EditFunctions::displaySlots( bool justSlots ) i->setText( 4, (*it).type ); if ( (*it).type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) ) + if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) ) i->setText( 5, i18n( "Yes" ) ); else i->setText( 5, i18n( "No" ) ); diff --git a/kdevdesigner/designer/editfunctionsimpl.h b/kdevdesigner/designer/editfunctionsimpl.h index 0d4259dc..c4ddf83b 100644 --- a/kdevdesigner/designer/editfunctionsimpl.h +++ b/kdevdesigner/designer/editfunctionsimpl.h @@ -37,7 +37,7 @@ class TQListViewItem; class EditFunctions : public EditFunctionsBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/filechooser.cpp b/kdevdesigner/designer/filechooser.cpp index 0f4c426e..6923e94c 100644 --- a/kdevdesigner/designer/filechooser.cpp +++ b/kdevdesigner/designer/filechooser.cpp @@ -41,15 +41,15 @@ FileChooser::FileChooser( TQWidget *parent, const char *name ) lineEdit = new TQLineEdit( this, "filechooser_lineedit" ); layout->addWidget( lineEdit ); - connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SIGNAL( fileNameChanged( const TQString & ) ) ); + connect( lineEdit, TQ_SIGNAL( textChanged( const TQString & ) ), + this, TQ_SIGNAL( fileNameChanged( const TQString & ) ) ); button = new TQPushButton( "...", this, "filechooser_button" ); button->setFixedWidth( button->fontMetrics().width( " ... " ) ); layout->addWidget( button ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( chooseFile() ) ); + connect( button, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( chooseFile() ) ); setFocusProxy( lineEdit ); } diff --git a/kdevdesigner/designer/filechooser.h b/kdevdesigner/designer/filechooser.h index 42430334..c4026336 100644 --- a/kdevdesigner/designer/filechooser.h +++ b/kdevdesigner/designer/filechooser.h @@ -34,7 +34,7 @@ class TQPushButton; class FileChooser : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_ENUMS( Mode ) diff --git a/kdevdesigner/designer/finddialog.ui b/kdevdesigner/designer/finddialog.ui index 9b16cd8c..c257206e 100644 --- a/kdevdesigner/designer/finddialog.ui +++ b/kdevdesigner/designer/finddialog.ui @@ -264,11 +264,11 @@ <variable>EditorInterface *editor;</variable> <variable>TQObject *formWindow;</variable> </variables> -<Q_SLOTS> +<slots> <slot>init()</slot> <slot>destroy()</slot> <slot>doFind()</slot> <slot>setEditor( EditorInterface * e, TQObject * fw )</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/formfile.cpp b/kdevdesigner/designer/formfile.cpp index 4ba5b7c7..ef111031 100644 --- a/kdevdesigner/designer/formfile.cpp +++ b/kdevdesigner/designer/formfile.cpp @@ -77,13 +77,13 @@ FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name if ( !temp ) checkFileName( FALSE ); - connect(this, TQT_SIGNAL(somethingChanged(FormFile* )), this, TQT_SLOT(emitNewStatus(FormFile* ))); + connect(this, TQ_SIGNAL(somethingChanged(FormFile* )), this, TQ_SLOT(emitNewStatus(FormFile* ))); } FormFile::~FormFile() { pro->removeFormFile( this ); - if ( TQT_TQOBJECT(formWindow()) ) + if ( formWindow() ) formWindow()->setFormFile( 0 ); } @@ -97,7 +97,7 @@ void FormFile::setFormWindow( FormWindow *f ) if ( fw ) fw->setFormFile( this ); parseCode( cod, FALSE ); - TQTimer::singleShot( 0, this, TQT_SLOT( notifyFormWindowChange() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( notifyFormWindowChange() ) ); } void FormFile::setEditor( SourceEditor *e ) @@ -170,7 +170,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) if ( ed ) ed->save(); - if ( TQT_TQOBJECT(formWindow()) && isModified( WFormWindow ) ) { + if ( formWindow() && isModified( WFormWindow ) ) { if ( withMsgBox ) { if ( !formWindow()->checkCustomWidgets() ) return FALSE; @@ -221,7 +221,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) } } - if ( TQT_TQOBJECT(formWindow()) ) { + if ( formWindow() ) { Resource resource( MainWindow::self ); resource.setWidget( formWindow() ); bool formCodeOnly = isModified( WFormCode ) && !isModified( WFormWindow ); @@ -247,7 +247,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) bool FormFile::saveAs( bool ignoreModified ) { TQString f = pro->makeAbsolute( fileName() ); - if ( fileNameTemp && TQT_TQOBJECT(formWindow()) ) { + if ( fileNameTemp && formWindow() ) { f = TQString( formWindow()->name() ).lower(); f.replace( "::", "_" ); f = pro->makeAbsolute( f + ".ui" ); @@ -293,7 +293,7 @@ bool FormFile::saveAs( bool ignoreModified ) } pro->setModified( TRUE ); timeStamp.setFileName( pro->makeAbsolute( codeFile() ) ); - if ( ed && TQT_TQOBJECT(formWindow()) ) + if ( ed && formWindow() ) ed->setCaption( i18n( "Edit %1" ).arg( formWindow()->name() ) ); setModified( TRUE ); if ( pro->isDummy() ) @@ -307,7 +307,7 @@ bool FormFile::close() editor()->save(); editor()->close(); } - if ( TQT_TQOBJECT(formWindow()) ) + if ( formWindow() ) return formWindow()->close(); return TRUE; } @@ -372,7 +372,7 @@ bool FormFile::isModified( int who ) bool FormFile::isFormWindowModified() const { - if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) + if ( !formWindow() || !formWindow()->commandHistory() ) return FALSE; return formWindow()->commandHistory()->isModified(); } @@ -389,7 +389,7 @@ void FormFile::setFormWindowModified( bool m ) bool b = isFormWindowModified(); if ( m == b ) return; - if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) + if ( !formWindow() || !formWindow()->commandHistory() ) return; formWindow()->commandHistory()->setModified( m ); emit somethingChanged( this ); @@ -411,13 +411,13 @@ void FormFile::showFormWindow() { if ( !MainWindow::self ) return; - if ( TQT_TQOBJECT(formWindow()) ) { + if ( formWindow() ) { if ( ( formWindow()->hasFocus() || - TQT_BASE_OBJECT(MainWindow::self->qWorkspace()->activeWindow()) == TQT_BASE_OBJECT(formWindow()) ) && - TQT_BASE_OBJECT(MainWindow::self->propertyeditor()->formWindow()) != TQT_BASE_OBJECT(formWindow()) ) { - MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(formWindow()->currentWidget()), formWindow() ); + MainWindow::self->qWorkspace()->activeWindow() == formWindow() ) && + MainWindow::self->propertyeditor()->formWindow() != formWindow() ) { + MainWindow::self->propertyeditor()->setWidget( formWindow()->currentWidget(), formWindow() ); MainWindow::self->objectHierarchy()->setFormWindow( formWindow(), - TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->currentWidget() ); } formWindow()->setFocus(); return; @@ -519,14 +519,14 @@ void FormFile::setCodeFileState( UihState s ) void FormFile::createFormCode() { - if ( !TQT_TQOBJECT(formWindow()) ) + if ( !formWindow() ) return; LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); if ( !iface ) return; if ( pro->isCpp() ) cod = codeComment(); - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow() ); for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { cod += (!cod.isEmpty() ? "\n\n" : "") + iface->createFunctionStart( formWindow()->name(), make_func_pretty((*it).function), @@ -573,14 +573,14 @@ void FormFile::setCodeEdited( bool b ) void FormFile::parseCode( const TQString &txt, bool allowModify ) { - if ( !TQT_TQOBJECT(formWindow()) ) + if ( !formWindow() ) return; LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); if ( !iface ) return; TQValueList<LanguageInterface::Function> functions; TQValueList<MetaDataBase::Function> newFunctions, oldFunctions; - oldFunctions = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); + oldFunctions = MetaDataBase::functionList( formWindow() ); iface->functions( txt, &functions ); TQMap<TQString, TQString> funcs; for ( TQValueList<LanguageInterface::Function>::Iterator it = functions.begin(); @@ -634,7 +634,7 @@ void FormFile::parseCode( const TQString &txt, bool allowModify ) if ( allowModify && oldFunctions.count() > 0 ) setFormWindowModified( TRUE ); - MetaDataBase::setFunctionList( TQT_TQOBJECT(formWindow()), newFunctions ); + MetaDataBase::setFunctionList( formWindow(), newFunctions ); } void FormFile::syncCode() @@ -704,7 +704,7 @@ void FormFile::addFunctionCode( MetaDataBase::Function function ) if ( !hasFunc ) { if ( !codeEdited && !timeStamp.isUpToDate() ) loadCode(); - MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( TQT_TQOBJECT(formWindow()) ); + MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( formWindow() ); TQString cn; if ( mi.classNameChanged ) cn = mi.className; @@ -802,7 +802,7 @@ void FormFile::functionRetTypeChanged( const TQString &fuName, const TQString &o TQString FormFile::formName() const { FormFile* that = (FormFile*) this; - if ( TQT_TQOBJECT(formWindow()) ) { + if ( formWindow() ) { that->cachedFormName = formWindow()->name(); return cachedFormName; } diff --git a/kdevdesigner/designer/formfile.h b/kdevdesigner/designer/formfile.h index 79f92d16..6f80e040 100644 --- a/kdevdesigner/designer/formfile.h +++ b/kdevdesigner/designer/formfile.h @@ -37,7 +37,7 @@ class SourceEditor; class FormFile : public TQObject { - Q_OBJECT + TQ_OBJECT friend class SourceEditor; diff --git a/kdevdesigner/designer/formsettings.ui b/kdevdesigner/designer/formsettings.ui index 812f30a0..89afbd97 100644 --- a/kdevdesigner/designer/formsettings.ui +++ b/kdevdesigner/designer/formsettings.ui @@ -542,9 +542,9 @@ <tabstop>buttonCancel</tabstop> <tabstop>buttonHelp</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot>okClicked()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <includes> <include location="global" impldecl="in implementation">klineedit.h</include> diff --git a/kdevdesigner/designer/formsettingsimpl.cpp b/kdevdesigner/designer/formsettingsimpl.cpp index e29ea157..412d6067 100644 --- a/kdevdesigner/designer/formsettingsimpl.cpp +++ b/kdevdesigner/designer/formsettingsimpl.cpp @@ -43,8 +43,8 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw ) : FormSettingsBase( parent, 0, TRUE ), formwindow( fw ) { - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(fw) ); + connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( fw ); if ( info.classNameChanged && !info.className.isEmpty() ) editClassName->setText( info.className ); else @@ -52,8 +52,8 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw ) editComment->setText( info.comment ); editAuthor->setText( info.author ); - editClassName->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editClassName) ) ); - editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editPixmapFunction) ) ); + editClassName->setValidator( new AsciiValidator( TQString( ":" ), editClassName ) ); + editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), editPixmapFunction ) ); if ( formwindow->savePixmapInline() ) radioPixmapInline->setChecked( TRUE ); @@ -65,8 +65,8 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw ) radioProjectImageFile->setEnabled( !fw->project()->isDummy() ); spinSpacing->setValue( formwindow->layoutDefaultSpacing() ); spinMargin->setValue( formwindow->layoutDefaultMargin() ); - editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editSpacingFunction) ) ); - editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editMarginFunction) ) ); + editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), editSpacingFunction ) ); + editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), editMarginFunction ) ); checkLayoutFunctions->setChecked( formwindow->hasLayoutFunctions() ); editSpacingFunction->setText( formwindow->spacingFunction() ); editMarginFunction->setText( formwindow->marginFunction() ); @@ -79,17 +79,17 @@ void FormSettings::okClicked() info.classNameChanged = info.className != TQString( formwindow->name() ); info.comment = editComment->text(); info.author = editAuthor->text(); - MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), info ); + MetaDataBase::setMetaInfo( formwindow, info ); formwindow->commandHistory()->setModified( TRUE ); if ( formwindow->savePixmapInline() ) { - MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) ); - MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) ); + MetaDataBase::clearPixmapArguments( formwindow ); + MetaDataBase::clearPixmapKeys( formwindow ); } else if ( formwindow->savePixmapInProject() ) { - MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) ); + MetaDataBase::clearPixmapArguments( formwindow ); } else { - MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) ); + MetaDataBase::clearPixmapKeys( formwindow ); } if ( radioPixmapInline->isChecked() ) { diff --git a/kdevdesigner/designer/formsettingsimpl.h b/kdevdesigner/designer/formsettingsimpl.h index 3dcb6dd7..0580128d 100644 --- a/kdevdesigner/designer/formsettingsimpl.h +++ b/kdevdesigner/designer/formsettingsimpl.h @@ -33,7 +33,7 @@ class FormWindow; class FormSettings : public FormSettingsBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp index 99f631ae..ab4aed7e 100644 --- a/kdevdesigner/designer/formwindow.cpp +++ b/kdevdesigner/designer/formwindow.cpp @@ -87,7 +87,7 @@ static void setCursorToAll( const TQCursor &c, TQWidget *start ) TQObjectList l = start->childrenListObject(); if ( !l.isEmpty() ) { for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && !::tqqt_cast<SizeHandle*>(o) ) + if ( o->isWidgetType() && !::tqt_cast<SizeHandle*>(o) ) setCursorToAll( c, ( (TQWidget*)o ) ); } } @@ -102,7 +102,7 @@ static void restoreCursors( TQWidget *start, FormWindow *fw ) TQObjectList l = start->childrenListObject(); if ( !l.isEmpty() ) { for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && !::tqqt_cast<SizeHandle*>(o) ) + if ( o->isWidgetType() && !::tqt_cast<SizeHandle*>(o) ) restoreCursors( ( (TQWidget*)o ), fw ); } } @@ -156,7 +156,7 @@ void FormWindow::init() setWFlags(getWFlags() & TQt::WStyle_Maximize); fake = qstrcmp( name(), "qt_fakewindow" ) == 0; - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + MetaDataBase::addEntry( this ); ff->setFormWindow( this ); iface = 0; proj = 0; @@ -169,38 +169,38 @@ void FormWindow::init() unclippedPainter = 0; widgetPressed = FALSE; drawRubber = FALSE; - setFocusPolicy( TQ_ClickFocus ); + setFocusPolicy( TQWidget::ClickFocus ); sizePreviewLabel = 0; checkSelectionsTimer = new TQTimer( this, "checkSelectionsTimer" ); - connect( checkSelectionsTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( invalidCheckedSelections() ) ); + connect( checkSelectionsTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( invalidCheckedSelections() ) ); updatePropertiesTimer = new TQTimer( this ); - connect( updatePropertiesTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( updatePropertiesTimerDone() ) ); + connect( updatePropertiesTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( updatePropertiesTimerDone() ) ); showPropertiesTimer = new TQTimer( this ); //!!!! - connect( showPropertiesTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( showPropertiesTimerDone() ) ); + connect( showPropertiesTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( showPropertiesTimerDone() ) ); selectionChangedTimer = new TQTimer( this ); - connect( selectionChangedTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( selectionChangedTimerDone() ) ); + connect( selectionChangedTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( selectionChangedTimerDone() ) ); windowsRepaintWorkaroundTimer = new TQTimer( this ); - connect( windowsRepaintWorkaroundTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( windowsRepaintWorkaroundTimerTimeout() ) ); + connect( windowsRepaintWorkaroundTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( windowsRepaintWorkaroundTimerTimeout() ) ); insertParent = 0; - connect( &commands, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), - this, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) ); + connect( &commands, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), + this, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) ); propShowBlocked = FALSE; setIcon( SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) ); - connect( &commands, TQT_SIGNAL( modificationChanged( bool ) ), - this, TQT_SLOT( modificationChanged( bool ) ) ); + connect( &commands, TQ_SIGNAL( modificationChanged( bool ) ), + this, TQ_SLOT( modificationChanged( bool ) ) ); buffer = 0; - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this ); setMainContainer( w ); - propertyWidget = TQT_TQOBJECT(w); + propertyWidget = w; targetContainer = 0; hadOwnPalette = FALSE; @@ -212,7 +212,7 @@ void FormWindow::init() void FormWindow::setMainWindow( MainWindow *w ) { mainwindow = w; - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + MetaDataBase::addEntry( this ); initSlots(); } @@ -236,7 +236,7 @@ FormWindow::~FormWindow() if ( MainWindow::self && MainWindow::self->objectHierarchy()->formWindow() == this ) MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 ); - MetaDataBase::clear( TQT_TQOBJECT(this) ); + MetaDataBase::clear( this ); if ( ff ) ff->setFormWindow( 0 ); delete iface; @@ -353,15 +353,15 @@ void FormWindow::insertWidget() return; bool useSizeHint = !oldRectValid || ( currRect.width() < 2 && currRect.height() < 2 ); - Qt::Orientation orient =Qt::Horizontal; + TQt::Orientation orient =TQt::Horizontal; TQString n = WidgetDatabase::className( currTool ); - if ( useSizeHint && ( n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING ) ) { + if ( useSizeHint && ( n == "Spacer" || n == "TQSlider" || n == "Line" || n == "TQScrollBar" ) ) { TQPopupMenu m( mainWindow() ); m.insertItem( i18n( "&Horizontal" ) ); int ver = m.insertItem( i18n( "&Vertical" ) ); int r = m.exec( TQCursor::pos() ); if ( r == ver ) - orient =Qt::Vertical; + orient =TQt::Vertical; } @@ -375,7 +375,7 @@ void FormWindow::insertWidget() pix.convertFromImage( SmallIcon( "designer_image.png" , KDevDesignerPartFactory::instance()).convertToImage() ); ( (TQLabel*)w )->setPixmap( pix ); } - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) ); if ( WidgetDatabase::isCustomWidget( id ) ) { TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> " "<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> " @@ -393,7 +393,7 @@ void FormWindow::insertWidget() } TQString s = w->name(); - unify( TQT_TQOBJECT(w), s, TRUE ); + unify( w, s, TRUE ); w->setName( s ); insertWidget( w ); TQRect r( currRect ); @@ -408,7 +408,7 @@ void FormWindow::insertWidget() if ( useSizeHint ) { if ( n == "Spacer" ) { - if ( orient ==Qt::Vertical ) { + if ( orient ==TQt::Vertical ) { r.setWidth( 20 ); r.setHeight( 40 ); } else { @@ -429,13 +429,13 @@ void FormWindow::insertWidget() const TQObjectList l = insertParent->childrenListObject(); TQObjectListIt it( l ); TQWidgetList lst; - if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) { for ( ; it.current(); ) { TQObject *o = it.current(); ++it; if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( TQT_TQWIDGET(o) ) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w) ) { + insertedWidgets.find( o ) && o != w ) { TQRect r2( ( (TQWidget*)o )->pos(), ( (TQWidget*)o )->size() ); if ( r.contains( r2 ) ) @@ -497,12 +497,12 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName ) return; if ( checkName ) { TQString s = w->name(); - unify( TQT_TQOBJECT(w), s, TRUE ); + unify( w, s, TRUE ); w->setName( s ); } - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); + MetaDataBase::addEntry( w ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) ); if ( WidgetDatabase::isCustomWidget( id ) ) { TQWhatsThis::add( w, i18n("<b>A %1 (custom widget)</b> " "<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> " @@ -526,7 +526,7 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName ) void FormWindow::removeWidget( TQWidget *w ) { - MetaDataBase::removeEntry( TQT_TQOBJECT(w) ); + MetaDataBase::removeEntry( w ); widgets()->take( w ); } @@ -535,16 +535,16 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w ) CHECK_MAINWINDOW; switch ( currTool ) { case POINTER_TOOL: { - if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget + if ( !isMainContainer( w ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget raiseChildSelections( w ); // raise selections and select widget - selectWidget( TQT_TQOBJECT(w) ); + selectWidget( w ); // if widget is laid out, find the first non-laid out super-widget TQWidget *realWidget = w; // but store the original one while ( w->parentWidget() && ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.find(w) ) ) w = w->parentWidget(); - if ( ::tqqt_cast<TQMainWindow*>(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { + if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { e->accept(); mainwindow->popupFormWindowMenu( e->globalPos(), this ); } else { @@ -576,7 +576,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) switch ( currTool ) { case POINTER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget + if ( !isMainContainer( w ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget // if the clicked widget is not in a layout, raise it if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) w->raise(); @@ -587,20 +587,20 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) break; } - bool sel = isWidgetSelected( TQT_TQOBJECT(w) ); + bool sel = isWidgetSelected( w ); if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed... if ( !sel ) { // ...and widget no selectted: unselect all clearSelection( FALSE ); } else { // ...widget selected // only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) { - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); setPropertyShowingBlocked( TRUE ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( !o->isWidgetType() ) continue; if ( insertedWidgets.find( (TQWidget*)o ) ) - selectWidget( TQT_TQOBJECT(o), FALSE ); + selectWidget( o, FALSE ); } setPropertyShowingBlocked( FALSE ); delete l; @@ -609,39 +609,39 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) tqApp->processEvents(); } if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) && - sel && e->button() == Qt::LeftButton ) { // control pressed and selected, unselect widget - selectWidget( TQT_TQOBJECT(w), FALSE ); + sel && e->button() == TQt::LeftButton ) { // control pressed and selected, unselect widget + selectWidget( w, FALSE ); break; } raiseChildSelections( w ); // raise selections and select widget - selectWidget( TQT_TQOBJECT(w) ); + selectWidget( w ); // if widget is laid out, find the first non-laid out super-widget while ( w->parentWidget() && ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.find(w) ) ) w = w->parentWidget(); - if ( e->button() == Qt::LeftButton ) { // left button: store original geometry and more as the widget might start moving + if ( e->button() == TQt::LeftButton ) { // left button: store original geometry and more as the widget might start moving widgetPressed = TRUE; widgetGeom = TQRect( w->pos(), w->size() ); oldPressPos = w->mapFromGlobal( e->globalPos() ); origPressPos = oldPressPos; checkedSelectionsForMove = FALSE; moving.clear(); - if ( w->parentWidget() && !isMainContainer( TQT_TQOBJECT(w->parentWidget()) ) && !isCentralWidget( TQT_TQOBJECT(w->parentWidget()) ) ) { + if ( w->parentWidget() && !isMainContainer( w->parentWidget() ) && !isCentralWidget( w->parentWidget() ) ) { targetContainer = w->parentWidget(); hadOwnPalette = w->parentWidget()->ownPalette(); restorePalette = w->parentWidget()->palette(); } } } else { // press was on the formwindow - if ( e->button() == Qt::LeftButton ) { // left button: start rubber selection and show formwindow properties + if ( e->button() == TQt::LeftButton ) { // left button: start rubber selection and show formwindow properties drawRubber = TRUE; if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { clearSelection( FALSE ); TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); } @@ -652,11 +652,11 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) break; case CONNECT_TOOL: case BUDDY_TOOL: - if ( e->button() != Qt::LeftButton ) + if ( e->button() != TQt::LeftButton ) break; validForBuddy = FALSE; if ( currTool == BUDDY_TOOL ) { - if ( !::tqqt_cast<TQLabel*>(w) ) + if ( !::tqt_cast<TQLabel*>(w) ) break; clearSelection( FALSE ); validForBuddy = TRUE; @@ -667,13 +667,13 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) saveBackground(); startPos = mapFromGlobal( e->globalPos() ); currentPos = startPos; - startWidget = designerWidget( TQT_TQOBJECT(w) ); + startWidget = designerWidget( w ); endWidget = startWidget; beginUnclippedPainter( FALSE ); drawConnectionLine(); break; case ORDER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget + if ( !isMainContainer( w ) ) { // press on a child widget orderedWidgets.removeRef( w ); orderedWidgets.append( w ); for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { @@ -691,14 +691,14 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) } break; default: // any insert widget tool - if ( e->button() == Qt::LeftButton ) { + if ( e->button() == TQt::LeftButton ) { insertParent = WidgetFactory::containerOfWidget( mainContainer() ); // default parent for new widget is the formwindow - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press was not on formwindow, check if we can find another parent + if ( !isMainContainer( w ) ) { // press was not on formwindow, check if we can find another parent TQWidget *wid = w; for (;;) { - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(wid) ) ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( wid ) ); if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) && - !::tqqt_cast<TQLayoutWidget*>(wid) && !::tqqt_cast<TQSplitter*>(wid) ) { + !::tqt_cast<TQLayoutWidget*>(wid) && !::tqt_cast<TQSplitter*>(wid) ) { insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it break; } else { @@ -719,7 +719,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) CHECK_MAINWINDOW; switch ( currTool ) { case ORDER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget + if ( !isMainContainer( w ) ) { // press on a child widget orderedWidgets.clear(); orderedWidgets.append( w ); for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { @@ -736,8 +736,8 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) updateOrderIndicators(); } default: - if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) && - ( isMainContainer( TQT_TQOBJECT(w) ) || TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(this) ) ) + if ( !WidgetFactory::isPassiveInteractor( w ) && + ( isMainContainer( w ) || w == this ) ) mainWindow()->editSource(); break; } @@ -746,7 +746,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) { CHECK_MAINWINDOW; - if ( ( e->state() & Qt::LeftButton ) != Qt::LeftButton ) + if ( ( e->state() & TQt::LeftButton ) != TQt::LeftButton ) return; TQWidget *newendWidget = endWidget, *oldendWidget = endWidget, *wid; @@ -799,9 +799,9 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected... - if ( !isWidgetSelected( TQT_TQOBJECT(w) ) ) { // and unselect others. Only siblings can be moved at the same time + if ( !isWidgetSelected( w ) ) { // and unselect others. Only siblings can be moved at the same time setPropertyShowingBlocked( TRUE ); - selectWidget( TQT_TQOBJECT(w) ); + selectWidget( w ); setPropertyShowingBlocked( FALSE ); } checkSelectionsForMove( w ); @@ -810,7 +810,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) // check whether we would have to reparent the selection and highlight the possible new parent container TQMapConstIterator<TQWidget*, TQPoint> it = moving.begin(); TQWidget* wa = containerAt( e->globalPos(), it.key() ); - if ( wa && !isMainContainer( TQT_TQOBJECT(wa) ) && !isCentralWidget( TQT_TQOBJECT(wa) ) ) { + if ( wa && !isMainContainer( wa ) && !isCentralWidget( wa ) ) { wa = WidgetFactory::containerOfWidget( wa ); // ok, looks like we moved onto a container @@ -862,14 +862,14 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) restoreConnectionLine(); wid = tqApp->widgetAt( e->globalPos(), TRUE ); if ( wid ) - wid = designerWidget( TQT_TQOBJECT(wid) ); - if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) + wid = designerWidget( wid ); + if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) newendWidget = wid; - if ( ::tqqt_cast<TQLayoutWidget*>(newendWidget) || ::tqqt_cast<Spacer*>(newendWidget) ) + if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) ) newendWidget = (TQWidget*)endWidget; drawRecRect = newendWidget != endWidget; if ( newendWidget && - ( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) + ( isMainContainer( newendWidget ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( newendWidget ) ) endWidget = newendWidget; mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).arg( startWidget->name() ). arg( endWidget->name() ) ); @@ -886,17 +886,17 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) restoreConnectionLine(); wid = tqApp->widgetAt( e->globalPos(), TRUE ); if ( wid ) - wid = designerWidget( TQT_TQOBJECT(wid) ); + wid = designerWidget( wid ); if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) ) newendWidget = wid; else newendWidget = 0; - if ( ::tqqt_cast<TQLayoutWidget*>(newendWidget) || ::tqqt_cast<Spacer*>(newendWidget) ) + if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) ) newendWidget = (TQWidget*)endWidget; drawRecRect = newendWidget != endWidget; if ( !newendWidget ) endWidget = newendWidget; - else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) + else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( newendWidget ) ) endWidget = newendWidget; if ( endWidget ) mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).arg( startWidget->name() ). @@ -922,7 +922,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) { CHECK_MAINWINDOW; - if ( e->button() != Qt::LeftButton ) + if ( e->button() != TQt::LeftButton ) return; switch ( currTool ) { @@ -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 && ::tqqt_cast<TQButton*>(i) ) { - if ( ::tqqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqqt_cast<TQButtonGroup*>(wa) ) + if ( !emitSelChanged && ::tqt_cast<TQButton*>(i) ) { + if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqt_cast<TQButtonGroup*>(wa) ) emitSelChanged = TRUE; - if ( !::tqqt_cast<TQButtonGroup*>(wa) ) { - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(i), "buttonGroupId", FALSE ); - if ( ::tqqt_cast<TQButtonGroup*>(i->parentWidget()) ) + if ( !::tqt_cast<TQButtonGroup*>(wa) ) { + MetaDataBase::setPropertyChanged( i, "buttonGroupId", FALSE ); + if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) ) ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); } } @@ -990,12 +990,12 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) i->reparent( wa, pos, TRUE ); raiseSelection( i ); raiseChildSelections( i ); - widgetChanged( TQT_TQOBJECT(i) ); + widgetChanged( i ); mainWindow()->objectHierarchy()->widgetRemoved( i ); mainWindow()->objectHierarchy()->widgetInserted( i ); } if ( emitSelChanged ) { - emit showProperties( TQT_TQOBJECT(wa) ); + emit showProperties( wa ); emit showProperties( propertyWidget ); } newParent = wa; @@ -1045,13 +1045,13 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) if ( oldBuddy.isNull() ) oldBuddy = ""; SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ), - this, TQT_TQOBJECT(startWidget), mainWindow()->propertyeditor(), + this, startWidget, mainWindow()->propertyeditor(), "buddy", startWidget->property( "buddy" ), endWidget->name(), endWidget->name(), oldBuddy ); commandHistory()->addCommand( cmd, TRUE ); cmd->execute(); - emitUpdateProperties( TQT_TQOBJECT(startWidget) ); + emitUpdateProperties( startWidget ); } } if ( !toolFixed ) @@ -1160,10 +1160,10 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w ) } } if ( !e->isAccepted() ) { - TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = queryList( "TQWidget" ); if ( !l ) return; - if ( l->find( TQT_TQOBJECT(w) ) != -1 ) + if ( l->find( w ) != -1 ) e->accept(); delete l; } @@ -1185,30 +1185,30 @@ void FormWindow::selectWidget( TQObject *o, bool select ) TQWidget *w = (TQWidget*)o; - if ( isMainContainer( TQT_TQOBJECT(w) ) ) { + if ( isMainContainer( w ) ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); emitShowProperties( propertyWidget ); return; } - if ( ::tqqt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { + if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); emitShowProperties( propertyWidget ); return; } - if ( ::tqqt_cast<QDesignerToolBar*>(o) ) + if ( ::tqt_cast<QDesignerToolBar*>(o) ) return; if ( select ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(w); + propertyWidget = w; if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); if ( !isPropertyShowingBlocked() ) @@ -1238,9 +1238,9 @@ void FormWindow::selectWidget( TQObject *o, bool select ) s->setWidget( 0 ); TQObject *opw = propertyWidget; if ( !usedSelections.isEmpty() ) - propertyWidget = TQT_TQOBJECT(TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget()); + propertyWidget = TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget(); else - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); if ( !isPropertyShowingBlocked() ) @@ -1260,7 +1260,7 @@ void FormWindow::updateSelection( TQWidget *w ) { WidgetSelection *s = usedSelections.find( w ); if ( !w->isVisibleTo( this ) ) - selectWidget( TQT_TQOBJECT(w), FALSE ); + selectWidget( w, FALSE ); else if ( s ) s->updateGeometry(); } @@ -1288,7 +1288,7 @@ void FormWindow::clearSelection( bool changePropertyDisplay ) usedSelections.clear(); if ( changePropertyDisplay ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); emitShowProperties( propertyWidget ); @@ -1365,7 +1365,7 @@ void FormWindow::endRectDraw() void FormWindow::selectWidgets() { - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = mainContainer()->queryList( "TQWidget" ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( ( (TQWidget*)o )->isVisibleTo( this ) && @@ -1374,7 +1374,7 @@ void FormWindow::selectWidgets() p = mapFromGlobal( p ); TQRect r( p, ( (TQWidget*)o )->size() ); if ( r.intersects( currRect ) && !r.contains( currRect ) ) - selectWidget( TQT_TQOBJECT(o) ); + selectWidget( o ); } } delete l; @@ -1420,7 +1420,7 @@ void FormWindow::redo() void FormWindow::raiseChildSelections( TQWidget *w ) { - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); if ( !l || !l->first() ) { delete l; return; @@ -1428,7 +1428,7 @@ void FormWindow::raiseChildSelections( TQWidget *w ) TQPtrDictIterator<WidgetSelection> it( usedSelections ); for ( ; it.current(); ++it ) { - if ( l->findRef( TQT_TQOBJECT(it.current()->widget()) ) != -1 ) + if ( l->findRef( it.current()->widget() ) != -1 ) it.current()->show(); } delete l; @@ -1436,7 +1436,7 @@ void FormWindow::raiseChildSelections( TQWidget *w ) void FormWindow::updateChildSelections( TQWidget *w ) { - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o->isWidgetType() && @@ -1451,7 +1451,7 @@ void FormWindow::checkSelectionsForMove( TQWidget *w ) { checkedSelectionsForMove = TRUE; - TQObjectList *l = w->parentWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, FALSE, FALSE ); + TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, FALSE, FALSE ); moving.clear(); if ( l ) { TQPtrDictIterator<WidgetSelection> it( usedSelections ); @@ -1460,7 +1460,7 @@ void FormWindow::checkSelectionsForMove( TQWidget *w ) if ( it.current()->widget() == mainContainer() ) continue; ++it; - if ( l->find( TQT_TQOBJECT(sel->widget()) ) == -1 ) { + if ( l->find( sel->widget() ) == -1 ) { if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) sel->setWidget( 0 ); } else { @@ -1483,7 +1483,7 @@ void FormWindow::deleteWidgets() TQPtrDictIterator<WidgetSelection> it( usedSelections ); for ( ; it.current(); ++it ) { TQWidget *tb = 0; - if ( !( tb = mainWindow()->isAToolBarChild( TQT_TQOBJECT(it.current()->widget()) ) ) ) + if ( !( tb = mainWindow()->isAToolBarChild( it.current()->widget() ) ) ) widgets.append( it.current()->widget() ); else ( (QDesignerToolBar*)tb )->removeWidget( it.current()->widget() ); @@ -1569,7 +1569,7 @@ void FormWindow::invalidCheckedSelections() void FormWindow::checkPreviewGeometry( TQRect &r ) { - if ( !TQT_TQRECT_OBJECT(rect()).contains( r ) ) { + if ( !rect().contains( r ) ) { if ( r.left() < rect().left() ) r.moveTopLeft( TQPoint( 0, r.top() ) ); if ( r.right() > rect().right() ) @@ -1591,7 +1591,7 @@ void FormWindow::focusOutEvent( TQFocusEvent * ) { if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); + propertyWidget = mainContainer(); if ( opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); } @@ -1613,7 +1613,7 @@ void FormWindow::resizeEvent( TQResizeEvent *e ) void FormWindow::windowsRepaintWorkaroundTimerTimeout() { #if defined(TQ_WS_WIN32) - TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = queryList( "TQWidget" ); for ( TQObject *o = l->first(); o; o = l->next() ) { flickerfree_update( (TQWidget*)o ); } @@ -1632,7 +1632,7 @@ TQWidget *FormWindow::designerWidget( TQObject *o ) const if ( !o || !o->isWidgetType() ) return 0; TQWidget *w = (TQWidget*)o; - while ( w && !isMainContainer( TQT_TQOBJECT(w) ) && !insertedWidgets[ (void*)w ] || isCentralWidget( TQT_TQOBJECT(w) ) ) + while ( w && !isMainContainer( w ) && !insertedWidgets[ (void*)w ] || isCentralWidget( w ) ) w = (TQWidget*)w->parent(); return w; } @@ -1735,7 +1735,7 @@ void FormWindow::currentToolChanged() switch ( currTool ) { case POINTER_TOOL: if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + emitShowProperties( mainContainer() ); restoreCursors( this, this ); break; case ORDER_TOOL: @@ -1744,7 +1744,7 @@ void FormWindow::currentToolChanged() orderedWidgets.clear(); showOrderIndicators(); if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + emitShowProperties( mainContainer() ); setCursorToAll( ArrowCursor, this ); } break; @@ -1756,13 +1756,13 @@ void FormWindow::currentToolChanged() mainWindow()->statusMessage( i18n( "Drag a line to set a buddy...") ); setCursorToAll( CrossCursor, this ); if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + emitShowProperties( mainContainer() ); break; default: mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).arg( WidgetDatabase::toolTip( currTool ).lower() ) ); setCursorToAll( CrossCursor, this ); if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + emitShowProperties( mainContainer() ); break; } } @@ -1771,7 +1771,7 @@ void FormWindow::showOrderIndicators() { hideOrderIndicators(); orderIndicators.setAutoDelete( TRUE ); - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = mainContainer()->queryList( "TQWidget" ); stackedWidgets = MetaDataBase::tabOrder( this ); if ( l ) { int order = 1; @@ -1779,7 +1779,7 @@ void FormWindow::showOrderIndicators() TQWidget* w = (TQWidget*) o; if ( w->isShown() && insertedWidgets[ (void*)w ] && - w->focusPolicy() != TQ_NoFocus ) { + w->focusPolicy() != TQWidget::NoFocus ) { OrderIndicator* ind = new OrderIndicator( order++, w, this ); orderIndicators.append( ind ); if ( stackedWidgets.findRef( w ) == -1 ) @@ -1824,7 +1824,7 @@ bool FormWindow::checkCustomWidgets() TQPtrDictIterator<TQWidget> it( insertedWidgets ); for ( ; it.current(); ++it ) { if ( it.current()->isA( "CustomWidget" ) ) { - TQString className = WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ); + TQString className = WidgetFactory::classNameOf( it.current() ); if ( !MetaDataBase::hasCustomWidget( className ) ) missingCustomWidgets << className; } @@ -1903,7 +1903,7 @@ void FormWindow::checkAccels() { CHECK_MAINWINDOW; TQMap<TQChar, TQWidgetList > accels; - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = mainContainer()->queryList( "TQWidget" ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( ( (TQWidget*)o )->isVisibleTo( this ) && @@ -1921,7 +1921,7 @@ void FormWindow::checkAccels() find_accel( w->property( "title" ).toString(), accels, w ); if ( pageTitle ) find_accel( w->property( "pageTitle" ).toString(), accels, w ); - } else if ( ::tqqt_cast<MenuBarEditor*>(o) ) { + } else if ( ::tqt_cast<MenuBarEditor*>(o) ) { ((MenuBarEditor *)o)->checkAccels( accels ); } } @@ -1941,7 +1941,7 @@ void FormWindow::checkAccels() case 0: // select clearSelection( FALSE ); for ( wid = (*it).first(); wid; wid = (*it).next() ) - selectWidget( TQT_TQOBJECT(wid), TRUE ); + selectWidget( wid, TRUE ); return; case 1: // cancel return; @@ -1978,12 +1978,12 @@ void FormWindow::selectAll() { checkedSelectionsForMove = FALSE; blockSignals( TRUE ); - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = mainContainer()->queryList( "TQWidget" ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( ( (TQWidget*)o )->isVisibleTo( this ) && insertedWidgets[ (void*)o ] ) { - selectWidget( TQT_TQOBJECT(o) ); + selectWidget( o ); } } delete l; @@ -2126,11 +2126,11 @@ void FormWindow::breakLayout( TQWidget *w ) if ( !w || w == this ) break; if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout && - WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) { Command *cmd = breakLayoutCommand( w ); if ( cmd ) commands.insert( 0, cmd ); - if ( !::tqqt_cast<TQLayoutWidget*>(w) && !::tqqt_cast<TQSplitter*>(w) ) + if ( !::tqt_cast<TQLayoutWidget*>(w) && !::tqt_cast<TQSplitter*>(w) ) break; } w = w->parentWidget(); @@ -2155,7 +2155,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w ) TQWidgetList widgets; for ( TQObject *o = l.first(); o; o = l.next() ) { if ( o->isWidgetType() && - !mainWindow()->isAToolBarChild( TQT_TQOBJECT(o) ) && + !mainWindow()->isAToolBarChild( o ) && ( (TQWidget*)o )->isVisibleTo( this ) && insertedWidgets.find( (TQWidget*)o ) ) widgets.append( (TQWidget*)o ); @@ -2181,7 +2181,7 @@ bool FormWindow::hasInsertedChildren( TQWidget *w ) const w = WidgetFactory::containerOfWidget( w ); if ( !w ) return FALSE; - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); if ( !l || !l->first() ) { delete l; return FALSE; @@ -2204,7 +2204,7 @@ bool FormWindow::allowMove( TQWidget *w ) { w = w->parentWidget(); while ( w ) { - if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) + if ( ( isMainContainer( w ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) return TRUE; w = w->parentWidget(); } @@ -2221,8 +2221,8 @@ void FormWindow::editConnections() ConnectionDialog dlg( mainwindow ); mainWindow()->statusMessage( i18n( "Edit connections...") ); - dlg.addConnection( TQT_TQOBJECT(startWidget), TQT_TQOBJECT(endWidget), TQString(), TQString() ); - TQTimer::singleShot( 0, &dlg, TQT_SLOT(ensureConnectionVisible()) ); + dlg.addConnection( startWidget, endWidget, TQString(), TQString() ); + TQTimer::singleShot( 0, &dlg, TQ_SLOT(ensureConnectionVisible()) ); dlg.exec(); } @@ -2361,7 +2361,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) int num = 1; TQPtrDictIterator<TQWidget> it( insertedWidgets ); for ( ; it.current();) { - if ( TQT_BASE_OBJECT(it.current()) != TQT_BASE_OBJECT(w) && + if ( it.current() != w && qstrcmp( it.current()->name(), s.latin1() ) == 0 ) { found = TRUE; if ( !changeIt ) @@ -2376,7 +2376,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) TQPtrList<TQAction> al; TQAction *a = 0; for ( a = actions.first(); a; a = actions.next() ) { - TQObjectList *l = a->queryList( TQACTION_OBJECT_NAME_STRING ); + TQObjectList *l = a->queryList( "TQAction" ); al.append( a ); for ( TQObject *ao = l->first(); ao; ao = l->next() ) al.append( (TQAction*)ao ); @@ -2393,7 +2393,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) } } } - if ( ::tqqt_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 && @@ -2407,9 +2407,9 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) } delete l; } - if ( ::tqqt_cast<TQMainWindow*>(mainContainer()) ) { + if ( ::tqt_cast<TQMainWindow*>(mainContainer()) ) { if ( !found ) { - TQObjectList *l = mainContainer()->queryList( TQDOCKWINDOW_OBJECT_NAME_STRING, 0, TRUE ); + TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, TRUE ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o != w && qstrcmp( o->name(), s.latin1() ) == 0 ) { @@ -2435,7 +2435,7 @@ bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w ) TQPtrDictIterator<TQWidget> it( insertedWidgets ); for ( ; it.current(); ++it ) { if ( it.current()->isA( "CustomWidget" ) ) { - if ( qstrcmp( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ), w->className.utf8() ) == 0 ) + if ( qstrcmp( WidgetFactory::classNameOf( it.current() ), w->className.utf8() ) == 0 ) return TRUE; } } @@ -2447,7 +2447,7 @@ bool FormWindow::isDatabaseWidgetUsed() const { #ifndef TQT_NO_SQL TQStringList dbClasses; - dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here + dbClasses << "TQDataTable"; // add more here TQPtrDictIterator<TQWidget> it( insertedWidgets ); for ( ; it.current(); ++it ) { TQString c( it.current()->className() ); @@ -2473,7 +2473,7 @@ bool FormWindow::isDatabaseAware() const void FormWindow::visibilityChanged() { if ( currTool != ORDER_TOOL ) { - emitUpdateProperties( TQT_TQOBJECT(currentWidget()) ); + emitUpdateProperties( currentWidget() ); } else { updateOrderIndicators(); repositionOrderIndicators(); @@ -2491,7 +2491,7 @@ TQPoint FormWindow::mapToForm( const TQWidget* w, const TQPoint& pos ) const { TQPoint p = pos; const TQWidget* i = w; - while ( i && !i->isTopLevel() && !isMainContainer( TQT_TQOBJECT(const_cast<TQWidget*>(i)) ) ) { + while ( i && !i->isTopLevel() && !isMainContainer( const_cast<TQWidget*>(i) ) ) { p = i->mapToParent( p ); i = i->parentWidget(); } @@ -2525,27 +2525,27 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) TQWidget *container = 0; int depth = -1; TQWidgetList selected = selectedWidgets(); - if ( TQT_TQRECT_OBJECT(rect()).contains( mapFromGlobal( pos ) ) ) { + if ( rect().contains( mapFromGlobal( pos ) ) ) { container = mainContainer(); depth = widgetDepth( container ); } for ( ; it.current(); ++it ) { - if ( ::tqqt_cast<TQLayoutWidget*>(it.current()) - || ::tqqt_cast<TQSplitter*>(it.current()) ) + if ( ::tqt_cast<TQLayoutWidget*>(it.current()) + || ::tqt_cast<TQSplitter*>(it.current()) ) continue; if ( !it.current()->isVisibleTo( this ) ) continue; if ( selected.find( it.current() ) != -1 ) continue; - if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ) ) ) && + if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( it.current() ) ) ) && it.current() != mainContainer() ) continue; // the rectangles of all ancestors of the container must contain the insert position TQWidget *w = it.current(); while ( w && !w->isTopLevel() ) { - if ( !TQT_TQRECT_OBJECT(w->rect()).contains( ( w->mapFromGlobal( pos ) ) ) ) + if ( !w->rect().contains( ( w->mapFromGlobal( pos ) ) ) ) break; w = w->parentWidget(); } @@ -2553,8 +2553,8 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) int wd = widgetDepth( it.current() ); if ( wd == depth && container ) { - if ( ( it.current()->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(it.current()) ) > - ( container->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(container) ) ) + if ( ( it.current()->parentWidget()->childrenListObject() ).find( it.current() ) > + ( container->parentWidget()->childrenListObject() ).find( container ) ) wd++; } if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) { @@ -2568,7 +2568,7 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) bool FormWindow::isMainContainer( TQObject *w ) const { - return w && w->isWidgetType() && ( TQT_BASE_OBJECT(w) == this || TQT_BASE_OBJECT(w) == mainContainer() ); + return w && w->isWidgetType() && ( w == this || w == mainContainer() ); } void FormWindow::setMainContainer( TQWidget *w ) @@ -2576,7 +2576,7 @@ void FormWindow::setMainContainer( TQWidget *w ) bool resetPropertyWidget = isMainContainer( propertyWidget ); if ( mContainer ) insertedWidgets.remove( mContainer ); - if ( TQT_BASE_OBJECT(propertyWidget) == TQT_BASE_OBJECT(mContainer) ) + if ( propertyWidget == mContainer ) propertyWidget = 0; delete mContainer; mContainer = w; @@ -2586,24 +2586,24 @@ void FormWindow::setMainContainer( TQWidget *w ) l->addWidget( w ); if ( resetPropertyWidget ) { TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mContainer); + propertyWidget = mContainer; if ( opw && opw->isWidgetType() ) repaintSelection( (TQWidget*)opw ); } if ( project() ) { LanguageInterface *iface = MetaDataBase::languageInterface( project()->language() ); if ( iface && !project()->isCpp() && !isFake() ) { - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "init()" ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(this), "init()", "", "private", "function", + if ( !MetaDataBase::hasFunction( this, "init()" ) ) + MetaDataBase::addFunction( this, "init()", "", "private", "function", project()->language(), "void" ); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "destroy()" ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(this), "destroy()", "", "private", "function", + if ( !MetaDataBase::hasFunction( this, "destroy()" ) ) + MetaDataBase::addFunction( this, "destroy()", "", "private", "function", project()->language(), "void" ); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ) ) - MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", TQT_TQOBJECT(mainContainer()), "destroy" ) ) - MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", - TQT_TQOBJECT(mainContainer()), "destroy" ); + if ( !MetaDataBase::hasConnection( this, mainContainer(), "shown()", mainContainer(), "init" ) ) + MetaDataBase::addConnection( this, mainContainer(), "shown()", mainContainer(), "init" ); + if ( !MetaDataBase::hasConnection( this, mainContainer(), "destroyed()", mainContainer(), "destroy" ) ) + MetaDataBase::addConnection( this, mainContainer(), "destroyed()", + mainContainer(), "destroy" ); } } } @@ -2663,7 +2663,7 @@ TQAction *FormWindow::findAction( const TQString &name ) for ( TQAction *a = actionList().first(); a; a = actionList().next() ) { if ( TQString( a->name() ) == name ) return a; - TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING ); + TQAction *ac = (TQAction*)a->child( name.latin1(), "TQAction" ); if ( ac ) return ac; } @@ -2672,7 +2672,7 @@ TQAction *FormWindow::findAction( const TQString &name ) void FormWindow::killAccels( TQObject *top ) { - TQObjectList *l = top->queryList( TQACCEL_OBJECT_NAME_STRING ); + TQObjectList *l = top->queryList( "TQAccel" ); if ( !l ) return; for ( TQObject *o = l->first(); o; o = l->next() ) @@ -2689,9 +2689,9 @@ DesignerFormWindow *FormWindow::iFace() bool FormWindow::isCentralWidget( TQObject *w ) const { - if ( !::tqqt_cast<TQMainWindow*>(mainContainer()) ) + if ( !::tqt_cast<TQMainWindow*>(mainContainer()) ) return FALSE; - return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(( (TQMainWindow*)mainContainer() )->centralWidget()); + return w == ((TQMainWindow*)mainContainer())->centralWidget(); } int FormWindow::layoutDefaultSpacing() const @@ -2753,12 +2753,12 @@ void FormWindow::setFormFile( FormFile *f ) { ff = f; if ( ff ) - connect( this, TQT_SIGNAL( modificationChanged(bool, const TQString&) ), ff, TQT_SLOT( formWindowChangedSomehow() ) ); + connect( this, TQ_SIGNAL( modificationChanged(bool, const TQString&) ), ff, TQ_SLOT( formWindowChangedSomehow() ) ); } bool FormWindow::canBeBuddy( const TQWidget *w ) const { - return w->focusPolicy() != TQ_NoFocus; + return w->focusPolicy() != TQWidget::NoFocus; } bool FormWindow::event( TQEvent *e ) diff --git a/kdevdesigner/designer/formwindow.h b/kdevdesigner/designer/formwindow.h index d4295e7e..43e26321 100644 --- a/kdevdesigner/designer/formwindow.h +++ b/kdevdesigner/designer/formwindow.h @@ -64,7 +64,7 @@ class OrderIndicator; class FormWindow : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName ) diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp index c6433cd0..138b9499 100644 --- a/kdevdesigner/designer/hierarchyview.cpp +++ b/kdevdesigner/designer/hierarchyview.cpp @@ -193,20 +193,20 @@ HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) ); (void)*selectedBack; // hack setPalette( p ); - disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), - this, TQT_SLOT( changeSortColumn( int ) ) ); + disconnect( header(), TQ_SIGNAL( sectionClicked( int ) ), + this, TQ_SLOT( changeSortColumn( int ) ) ); setSorting( -1 ); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); if ( doConnects ) { - connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ), - this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - this, TQT_SLOT( objectDoubleClicked( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), - this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ), - this, TQT_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) ); + connect( this, TQ_SIGNAL( clicked( TQListViewItem * ) ), + this, TQ_SLOT( objectClicked( TQListViewItem * ) ) ); + connect( this, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQ_SLOT( objectDoubleClicked( TQListViewItem * ) ) ); + connect( this, TQ_SIGNAL( returnPressed( TQListViewItem * ) ), + this, TQ_SLOT( objectClicked( TQListViewItem * ) ) ); + connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ), + this, TQ_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) ); } deselect = TRUE; setColumnWidthMode( 1, Manual ); @@ -249,39 +249,39 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) TQObject *o = findObject( i ); if ( !o ) return 0; - if ( TQT_BASE_OBJECT(formWindow) == TQT_BASE_OBJECT(o) ) { + if ( formWindow == o ) { if ( deselect ) formWindow->clearSelection( FALSE ); - formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) ); + formWindow->emitShowProperties( formWindow ); return 0; } if ( o->isWidgetType() ) { TQWidget *w = (TQWidget*)o; if ( !formWindow->widgets()->find( w ) ) { - if ( ::tqqt_cast<TQWidgetStack*>(w->parent()) ) { - if (::tqqt_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 = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); - formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); - } else if ( ::tqqt_cast<TQWizard*>(w->parent()->parent()) ) { + o = (TQWidget*)w->parent()->parent(); + formWindow->emitUpdateProperties( formWindow->currentWidget() ); + } else if ( ::tqt_cast<TQWizard*>(w->parent()->parent()) ) { ((QDesignerWizard*)w->parent()->parent())-> setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); - o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); - formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); + o = (TQWidget*)w->parent()->parent(); + formWindow->emitUpdateProperties( formWindow->currentWidget() ); } else { ( (TQWidgetStack*)w->parent() )->raiseWidget( w ); if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) ) ( (QDesignerWidgetStack*)w->parent() )->updateButtons(); } - } else if ( ::tqqt_cast<TQMenuBar*>(w) || ::tqqt_cast<TQDockWindow*>(w) ) { - formWindow->setActiveObject( TQT_TQOBJECT(w) ); - } else if ( ::tqqt_cast<TQPopupMenu*>(w) ) { + } else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQDockWindow*>(w) ) { + formWindow->setActiveObject( w ); + } else if ( ::tqt_cast<TQPopupMenu*>(w) ) { return 0; // ### we could try to find our menu bar and change the currentMenu to our index } else { return 0; } } - } else if ( ::tqqt_cast<TQAction*>(o) ) { + } else if ( ::tqt_cast<TQAction*>(o) ) { MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o ); deselect = TRUE; } @@ -303,7 +303,7 @@ void HierarchyList::objectDoubleClicked( TQListViewItem *i ) if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) w->raise(); - formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); + formWindow->selectWidget( w, TRUE ); } } @@ -314,7 +314,7 @@ void HierarchyList::objectClicked( TQListViewItem *i ) return; if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { TQWidget *w = (TQWidget*)o; - formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); + formWindow->selectWidget( w, TRUE ); } } @@ -388,7 +388,7 @@ void HierarchyList::setup() if ( !widgetStacks ) widgetStacks = new TQPtrList<TQWidgetStack>; if ( w ) - insertObject( TQT_TQOBJECT(w), 0 ); + insertObject( w, 0 ); widgetStacks->clear(); } @@ -402,8 +402,8 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) return; bool fakeMainWindow = FALSE; - if ( ::tqqt_cast<TQMainWindow*>(o) ) { - TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + if ( ::tqt_cast<TQMainWindow*>(o) ) { + TQObject *cw = ( (TQMainWindow*)o )->centralWidget(); if ( cw ) { o = cw; fakeMainWindow = TRUE; @@ -411,7 +411,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) } TQListViewItem *item = 0; TQString className = WidgetFactory::classNameOf( o ); - if ( ::tqqt_cast<TQLayoutWidget*>(o) ) { + if ( ::tqt_cast<TQLayoutWidget*>(o) ) { switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) { case WidgetFactory::HBox: className = "HBox"; @@ -433,21 +433,21 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) #endif TQString name = o->name(); - if ( ::tqqt_cast<TQWidgetStack*>(o->parent()) ) { - if ( ::tqqt_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 ( ::tqqt_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 = ::tqqt_cast<TQToolBox*>(o->parent()->parent()->parent())) ) + (tb = ::tqt_cast<TQToolBox*>(o->parent()->parent()->parent())) ) name = tb->itemLabel( tb->indexOf((TQWidget*)o) ); if ( fakeMainWindow ) { name = o->parent()->name(); - className = TQMAINWINDOW_OBJECT_NAME_STRING; + className = "TQMainWindow"; } if ( !parent ) @@ -457,18 +457,18 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) item->setOpen( TRUE ); if ( !parent ) item->setPixmap( 0, DesignerFormPix ); - else if ( ::tqqt_cast<TQLayoutWidget*>(o) ) + else if ( ::tqt_cast<TQLayoutWidget*>(o) ) item->setPixmap( 0, DesignerLayoutPix ); else item->setPixmap( 0, WidgetDatabase::iconSet( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ). pixmap( TQIconSet::Small, TQIconSet::Normal ) ); - if ( ::tqqt_cast<TQAction*>(o) ) + if ( ::tqt_cast<TQAction*>(o) ) item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() ); ( (HierarchyItem*)item )->setObject( o ); TQObjectList l = o->childrenListObject(); - if ( ::tqqt_cast<QDesignerToolBar*>(o) ) + if ( ::tqt_cast<QDesignerToolBar*>(o) ) l.clear(); if ( !l.isEmpty() ) { TQObjectListIt it( l ); @@ -478,20 +478,20 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) ( (TQWidget*)it.current() )->isHidden() ) continue; if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { - if ( ::tqqt_cast<TQWidgetStack*>(it.current()->parent()) || - ::tqqt_cast<TQWidgetStack*>(it.current()) ) { + if ( ::tqt_cast<TQWidgetStack*>(it.current()->parent()) || + ::tqt_cast<TQWidgetStack*>(it.current()) ) { TQObject *obj = it.current(); - QDesignerTabWidget *tw = ::tqqt_cast<QDesignerTabWidget*>(it.current()->parent()); - QDesignerWizard *dw = ::tqqt_cast<QDesignerWizard*>(it.current()->parent()); + QDesignerTabWidget *tw = ::tqt_cast<QDesignerTabWidget*>(it.current()->parent()); + QDesignerWizard *dw = ::tqt_cast<QDesignerWizard*>(it.current()->parent()); TQWidgetStack *stack = 0; - if ( dw || tw || ::tqqt_cast<TQWidgetStack*>(obj) ) + if ( dw || tw || ::tqt_cast<TQWidgetStack*>(obj) ) stack = (TQWidgetStack*)obj; else stack = (TQWidgetStack*)obj->parent(); if ( widgetStacks->findRef( stack ) != -1 ) continue; widgetStacks->append( stack ); - TQObjectList *l2 = stack->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, TRUE, FALSE ); + TQObjectList *l2 = stack->queryList( "TQWidget", 0, TRUE, FALSE ); for ( obj = l2->last(); obj; obj = l2->prev() ) { if ( qstrcmp( obj->className(), "TQWidgetStackPrivate::Invisible" ) == 0 || @@ -505,12 +505,12 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) insertObject( obj, item ); } delete l2; - } else if ( ::tqqt_cast<TQToolBox*>(it.current()->parent()) ) { - if ( !::tqqt_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 ) - insertObject( TQT_TQOBJECT(tb->item( i )), item ); + insertObject( tb->item( i ), item ); } continue; } @@ -528,9 +528,9 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) for ( obj = l->first(); obj; obj = l->next() ) insertObject( obj, item ); delete l; - } else if ( ::tqqt_cast<QDesignerToolBar*>(o) || ::tqqt_cast<PopupMenuEditor*>(o) ) { + } else if ( ::tqt_cast<QDesignerToolBar*>(o) || ::tqt_cast<PopupMenuEditor*>(o) ) { TQPtrList<TQAction> actions; - if ( ::tqqt_cast<QDesignerToolBar*>(o) ) + if ( ::tqt_cast<QDesignerToolBar*>(o) ) actions = ( (QDesignerToolBar*)o )->insertedActions(); else ( (PopupMenuEditor*)o )->insertedActions( actions ); @@ -539,37 +539,37 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) it.toLast(); while ( it.current() ) { TQAction *a = it.current(); - if ( ::tqqt_cast<QDesignerAction*>(a) ) { + if ( ::tqt_cast<QDesignerAction*>(a) ) { QDesignerAction *da = (QDesignerAction*)a; if ( da->supportsMenu() ) insertObject( da, item ); else - insertObject( TQT_TQOBJECT(da->widget()), item ); - } else if ( ::tqqt_cast<QDesignerActionGroup*>(a) ) { + insertObject( da->widget(), item ); + } else if ( ::tqt_cast<QDesignerActionGroup*>(a) ) { insertObject( a, item ); } --it; } - } else if ( ::tqqt_cast<QDesignerActionGroup*>(o) && !o->childrenListObject().isEmpty() ) { + } else if ( ::tqt_cast<QDesignerActionGroup*>(o) && !o->childrenListObject().isEmpty() ) { TQObjectList l = o->childrenListObject(); for ( TQObject *obj = l.last(); obj; obj = l.prev() ) { - if ( ::tqqt_cast<QDesignerAction*>(obj) ) { + if ( ::tqt_cast<QDesignerAction*>(obj) ) { QDesignerAction *da = (QDesignerAction*)obj; if ( da->supportsMenu() ) insertObject( da, item ); else - insertObject( TQT_TQOBJECT(da->widget()), item ); - } else if ( ::tqqt_cast<QDesignerActionGroup*>(obj) ) { + insertObject( da->widget(), item ); + } else if ( ::tqt_cast<QDesignerActionGroup*>(obj) ) { insertObject( obj, item ); } } - } else if ( ::tqqt_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 ); if ( !md || !md->menu() ) continue; - insertObject( TQT_TQOBJECT(md->menu()), item ); + insertObject( md->menu(), item ); } } } @@ -599,12 +599,12 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) return; if ( !o->isWidgetType() || - ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(formWindow) && !formWindow->widgets()->find( (TQWidget*)o ) ) ) + ( o != formWindow && !formWindow->widgets()->find( (TQWidget*)o ) ) ) return; TQWidget *w = (TQWidget*)o; if ( w->isVisibleTo( formWindow ) ) { - if ( !::tqqt_cast<TQTabWidget*>(w) && !::tqqt_cast<TQWizard*>(w) ) { + if ( !::tqt_cast<TQTabWidget*>(w) && !::tqt_cast<TQWizard*>(w) ) { if ( !normalMenu ) normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this ); normalMenu->popup( p ); @@ -612,8 +612,8 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) if ( !tabWidgetMenu ) tabWidgetMenu = formWindow->mainWindow()->setupTabWidgetHierarchyMenu( - this, TQT_SLOT( addTabPage() ), - TQT_SLOT( removeTabPage() ) ); + this, TQ_SLOT( addTabPage() ), + TQ_SLOT( removeTabPage() ) ); tabWidgetMenu->popup( p ); } } @@ -625,14 +625,14 @@ void HierarchyList::addTabPage() if ( !o || !o->isWidgetType() ) return; TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast<TQTabWidget*>(w) ) { + if ( ::tqt_cast<TQTabWidget*>(w) ) { TQTabWidget *tw = (TQTabWidget*)w; AddTabPageCommand *cmd = new AddTabPageCommand( i18n( "Add Page to %1" ). arg( tw->name() ), formWindow, tw, "Tab" ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - } else if ( ::tqqt_cast<TQWizard*>(w) ) { + } else if ( ::tqt_cast<TQWizard*>(w) ) { TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ). arg( wiz->name() ), formWindow, @@ -648,7 +648,7 @@ void HierarchyList::removeTabPage() if ( !o || !o->isWidgetType() ) return; TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast<TQTabWidget*>(w) ) { + if ( ::tqt_cast<TQTabWidget*>(w) ) { TQTabWidget *tw = (TQTabWidget*)w; if ( tw->currentPage() ) { QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; @@ -659,7 +659,7 @@ void HierarchyList::removeTabPage() formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); } - } else if ( ::tqqt_cast<TQWizard*>(w) ) { + } else if ( ::tqt_cast<TQWizard*>(w) ) { TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); if ( wiz->currentPage() ) { QDesignerWizard *dw = (QDesignerWizard*)wiz; @@ -681,8 +681,8 @@ FormDefinitionView::FormDefinitionView( TQWidget *parent, FormWindow *fw ) { header()->hide(); removeColumn( 1 ); - connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), - this, TQT_SLOT( renamed( TQListViewItem * ) ) ); + connect( this, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), + this, TQ_SLOT( renamed( TQListViewItem * ) ) ); popupOpen = FALSE; } @@ -762,7 +762,7 @@ void FormDefinitionView::setupVariables() itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, i18n( "public" ), TQString(), TQString() ); - TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( formWindow ); TQValueList<MetaDataBase::Variable>::Iterator it = --( varList.end() ); if ( !varList.isEmpty() && itemVar ) { for (;;) { @@ -852,7 +852,7 @@ void FormDefinitionView::refresh() itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, i18n( "public" ), TQString(), TQString() ); - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow ); TQValueList<MetaDataBase::Function>::Iterator it = --( functionList.end() ); if ( !functionList.isEmpty() && itemFunct ) { for (;;) { @@ -1197,7 +1197,7 @@ void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i ) varName = varName.simplifyWhiteSpace(); if ( varName[(int)varName.length() - 1] != ';' ) varName += ";"; - if ( MetaDataBase::hasVariable( TQT_TQOBJECT(formWindow), varName ) ) { + if ( MetaDataBase::hasVariable( formWindow, varName ) ) { TQMessageBox::information( this, i18n( "Edit Variables" ), i18n( "This variable has already been declared." ) ); } else { @@ -1268,7 +1268,7 @@ HierarchyView::HierarchyView( TQWidget *parent ) ClassBrowser cb( ciface->createClassBrowser( this ), ciface ); addTab( cb.lv, i18n( "Class Declarations" ) ); setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) ); - ciface->onClick( TQT_TQOBJECT(this), TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) ); + ciface->onClick( this, TQ_SLOT( jumpTo( const TQString &, const TQString &, int ) ) ); classBrowsers->insert( *it, cb ); setTabEnabled( cb.lv, FALSE ); } @@ -1307,7 +1307,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o ) if ( fw == formwindow ) { if ( fw ) { if ( !fake ) - listview->setCurrent( TQT_TQOBJECT(o) ); + listview->setCurrent( o ); else listview->clear(); if ( MainWindow::self->qWorkspace()->activeWindow() == fw ) @@ -1330,7 +1330,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o ) fView->setFormWindow( fw ); if ( !fake ) { listview->setup(); - listview->setCurrent( TQT_TQOBJECT(o) ); + listview->setCurrent( o ); } fView->setup(); @@ -1356,7 +1356,7 @@ void HierarchyView::showClasses( SourceEditor *se ) return; lastSourceEditor = se; - TQTimer::singleShot( 100, this, TQT_SLOT( showClassesTimeout() ) ); + TQTimer::singleShot( 100, this, TQ_SLOT( showClassesTimeout() ) ); } void HierarchyView::showClassesTimeout() @@ -1367,8 +1367,8 @@ void HierarchyView::showClassesTimeout() if ( !se->object() ) return; if ( se->formWindow() && se->formWindow()->project()->isCpp() ) { - setFormWindow( se->formWindow(), TQT_TQOBJECT(se->formWindow()->currentWidget()) ); - MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(se->formWindow()->currentWidget()), + setFormWindow( se->formWindow(), se->formWindow()->currentWidget() ); + MainWindow::self->propertyeditor()->setWidget( se->formWindow()->currentWidget(), se->formWindow() ); return; } @@ -1445,9 +1445,9 @@ void HierarchyView::widgetsRemoved( const TQWidgetList & ) void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & ) { TQWidget *w2 = w; - if ( ::tqqt_cast<TQMainWindow*>(w) ) + if ( ::tqt_cast<TQMainWindow*>(w) ) w2 = ( (TQMainWindow*)w )->centralWidget(); - listview->changeNameOf( TQT_TQOBJECT(w2), w->name() ); + listview->changeNameOf( w2, w->name() ); } @@ -1455,7 +1455,7 @@ void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& in { #ifndef TQT_NO_SQL TQString i = info.join( "." ); - listview->changeDatabaseOf( TQT_TQOBJECT(w), i ); + listview->changeDatabaseOf( w, i ); #endif } diff --git a/kdevdesigner/designer/hierarchyview.h b/kdevdesigner/designer/hierarchyview.h index cb21ed50..fc4e563f 100644 --- a/kdevdesigner/designer/hierarchyview.h +++ b/kdevdesigner/designer/hierarchyview.h @@ -97,7 +97,7 @@ private: class HierarchyList : public TQListView { - Q_OBJECT + TQ_OBJECT public: @@ -155,7 +155,7 @@ protected: class FormDefinitionView : public HierarchyList { - Q_OBJECT + TQ_OBJECT public: @@ -189,7 +189,7 @@ private: class HierarchyView : public TQTabWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/iconvieweditor.ui b/kdevdesigner/designer/iconvieweditor.ui index 8711bd6b..93cb8ac7 100644 --- a/kdevdesigner/designer/iconvieweditor.ui +++ b/kdevdesigner/designer/iconvieweditor.ui @@ -439,7 +439,7 @@ <tabstop>buttonHelp</tabstop> <tabstop>buttonApply</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot access="protected">init()</slot> <slot access="protected">destroy()</slot> <slot access="protected">applyClicked()</slot> @@ -451,7 +451,7 @@ <slot access="protected">insertNewItem()</slot> <slot access="protected">deletePixmap()</slot> <slot access="protected">okClicked()</slot> -</Q_SLOTS> +</slots> <includes> <include location="local" impldecl="in implementation">myiconloader.h</include> </includes> diff --git a/kdevdesigner/designer/iconvieweditorimpl.cpp b/kdevdesigner/designer/iconvieweditorimpl.cpp index 32a81412..340047ac 100644 --- a/kdevdesigner/designer/iconvieweditorimpl.cpp +++ b/kdevdesigner/designer/iconvieweditorimpl.cpp @@ -40,7 +40,7 @@ IconViewEditor::IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) : IconViewEditorBase( parent, 0, TRUE ), formwindow( fw ) { - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); iconview = (TQIconView*)editWidget; itemText->setText( "" ); diff --git a/kdevdesigner/designer/iconvieweditorimpl.h b/kdevdesigner/designer/iconvieweditorimpl.h index 969c9cf4..87ac63fa 100644 --- a/kdevdesigner/designer/iconvieweditorimpl.h +++ b/kdevdesigner/designer/iconvieweditorimpl.h @@ -33,7 +33,7 @@ class FormWindow; class IconViewEditor : public IconViewEditorBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/kdevdesigner_part.cpp b/kdevdesigner/designer/kdevdesigner_part.cpp index 8c8917a2..1e4a208c 100644 --- a/kdevdesigner/designer/kdevdesigner_part.cpp +++ b/kdevdesigner/designer/kdevdesigner_part.cpp @@ -62,7 +62,7 @@ KDevDesignerPart::KDevDesignerPart( TQWidget *parentWidget, const char *// widge setReadWrite(true); setModified(false); - connect(m_widget, TQT_SIGNAL(formModified(bool )), this, TQT_SLOT(formModified(bool))); + connect(m_widget, TQ_SIGNAL(formModified(bool )), this, TQ_SLOT(formModified(bool))); } void KDevDesignerPart::setupDesignerWindow() @@ -87,48 +87,48 @@ static TQIconSet createPartIconSet( const TQString &name ) void KDevDesignerPart::setupActions( ) { TDEAction *action; - action = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); - action = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - action = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection()); + action = KStdAction::openNew(this, TQ_SLOT(fileNew()), actionCollection()); + action = KStdAction::open(this, TQ_SLOT(fileOpen()), actionCollection()); + action = KStdAction::close(this, TQ_SLOT(fileClose()), actionCollection()); stateSync(action, m_widget->actionFileClose); - action = KStdAction::save(this, TQT_SLOT(save()), actionCollection()); + action = KStdAction::save(this, TQ_SLOT(save()), actionCollection()); stateSync(action, m_widget->actionFileSave); - action = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); + action = KStdAction::saveAs(this, TQ_SLOT(fileSaveAs()), actionCollection()); stateSync(action, m_widget->actionFileSaveAs); - action = new TDEAction(i18n("Save Al&l"), 0, this, TQT_SLOT(fileSaveAs()), actionCollection(), "file_saveall"); + action = new TDEAction(i18n("Save Al&l"), 0, this, TQ_SLOT(fileSaveAs()), actionCollection(), "file_saveall"); stateSync(action, m_widget->actionFileSaveAll); - new TDEAction(i18n("Create &Template..."), 0, this, TQT_SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate"); + new TDEAction(i18n("Create &Template..."), 0, this, TQ_SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate"); - action = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection()); + action = KStdAction::undo(this, TQ_SLOT(editUndo()), actionCollection()); stateSync(action, m_widget->actionEditUndo); - action = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection()); + action = KStdAction::redo(this, TQ_SLOT(editRedo()), actionCollection()); stateSync(action, m_widget->actionEditRedo); - action = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection()); + action = KStdAction::cut(this, TQ_SLOT(editCut()), actionCollection()); stateSync(action, m_widget->actionEditCut); - action = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection()); + action = KStdAction::copy(this, TQ_SLOT(editCopy()), actionCollection()); stateSync(action, m_widget->actionEditCopy); - action = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection()); + action = KStdAction::paste(this, TQ_SLOT(editPaste()), actionCollection()); stateSync(action, m_widget->actionEditPaste); - action = new TDEAction(i18n("&Delete"), Key_Delete, this, TQT_SLOT(editDelete()), actionCollection(), "edit_delete"); + action = new TDEAction(i18n("&Delete"), Key_Delete, this, TQ_SLOT(editDelete()), actionCollection(), "edit_delete"); stateSync(action, m_widget->actionEditDelete); - action = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection()); + action = KStdAction::selectAll(this, TQ_SLOT(editSelectAll()), actionCollection()); stateSync(action, m_widget->actionEditSelectAll); - action = new TDEAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()), actionCollection(), "edit_accels"); + action = new TDEAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, TQ_SLOT(editAccels()), actionCollection(), "edit_accels"); stateSync(action, m_widget->actionEditAccels); - action = new TDEAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, TQT_SLOT(editFunctions()), actionCollection(), "edit_functions"); + action = new TDEAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, TQ_SLOT(editFunctions()), actionCollection(), "edit_functions"); stateSync(action, m_widget->actionEditFunctions); - action = new TDEAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, TQT_SLOT(editConnections()), actionCollection(), "edit_connections"); + action = new TDEAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, TQ_SLOT(editConnections()), actionCollection(), "edit_connections"); stateSync(action, m_widget->actionEditConnections); - action = new TDEAction(i18n("&Form Settings..."), 0, this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_formsettings"); + action = new TDEAction(i18n("&Form Settings..."), 0, this, TQ_SLOT(editFormSettings()), actionCollection(), "edit_formsettings"); stateSync(action, m_widget->actionEditFormSettings); - action = new TDEAction(i18n("&Add File..."), 0, this, TQT_SLOT(projectAddFile()), actionCollection(), "project_addfile"); + action = new TDEAction(i18n("&Add File..."), 0, this, TQ_SLOT(projectAddFile()), actionCollection(), "project_addfile"); stateSync(action, m_widget->actionProjectAddFile); - action = new TDEAction(i18n("&Image Collection..."), 0, this, TQT_SLOT(projectImageCollection()), actionCollection(), "project_imagecollection"); + action = new TDEAction(i18n("&Image Collection..."), 0, this, TQ_SLOT(projectImageCollection()), actionCollection(), "project_imagecollection"); stateSync(action, m_widget->actionEditPixmapCollection); - action = new TDEAction(i18n("&Database Connections..."), 0, this, TQT_SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections"); + action = new TDEAction(i18n("&Database Connections..."), 0, this, TQ_SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections"); stateSync(action, m_widget->actionEditDatabaseConnections); - action = new TDEAction(i18n("&Designer Project Settings..."), 0, this, TQT_SLOT(projectSettings()), actionCollection(), "project_settings"); + action = new TDEAction(i18n("&Designer Project Settings..."), 0, this, TQ_SLOT(projectSettings()), actionCollection(), "project_settings"); stateSync(action, m_widget->actionEditProjectSettings); TDERadioAction *toggle; @@ -141,34 +141,34 @@ void KDevDesignerPart::setupActions( ) setupToolsAction(toggle, m_widget->actionOrderTool); toggle = new TDERadioAction(i18n("Set &Buddy"), createPartIconSet("designer_setbuddy.png"), Key_F12, actionCollection(), "tools_setbuddy"); setupToolsAction(toggle, m_widget->actionBuddyTool); - new TDEAction(i18n("Configure Toolbox..."), 0, this, TQT_SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox"); - new TDEAction(i18n("Edit &Custom Widgets..."), 0, this, TQT_SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets"); + new TDEAction(i18n("Configure Toolbox..."), 0, this, TQ_SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox"); + new TDEAction(i18n("Edit &Custom Widgets..."), 0, this, TQ_SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets"); - action = new TDEAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQT_SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize"); + action = new TDEAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQ_SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize"); stateSync(action, m_widget->actionEditAdjustSize); - action = new TDEAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, TQT_SLOT(layoutHLayout()), actionCollection(), "layout_h"); + action = new TDEAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, TQ_SLOT(layoutHLayout()), actionCollection(), "layout_h"); stateSync(action, m_widget->actionEditHLayout); - action = new TDEAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, TQT_SLOT(layoutVLayout()), actionCollection(), "layout_v"); + action = new TDEAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, TQ_SLOT(layoutVLayout()), actionCollection(), "layout_v"); stateSync(action, m_widget->actionEditVLayout); - action = new TDEAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQT_SLOT(layoutGridLayout()), actionCollection(), "layout_grid"); + action = new TDEAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQ_SLOT(layoutGridLayout()), actionCollection(), "layout_grid"); stateSync(action, m_widget->actionEditGridLayout); - action = new TDEAction(i18n("Lay Out Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith"); + action = new TDEAction(i18n("Lay Out Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, TQ_SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith"); stateSync(action, m_widget->actionEditSplitHorizontal); - action = new TDEAction(i18n("Lay Out Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv"); + action = new TDEAction(i18n("Lay Out Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, TQ_SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv"); stateSync(action, m_widget->actionEditSplitVertical); - action = new TDEAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQT_SLOT(layoutBreak()), actionCollection(), "layout_break"); + action = new TDEAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQ_SLOT(layoutBreak()), actionCollection(), "layout_break"); stateSync(action, m_widget->actionEditBreakLayout); toggle = new TDERadioAction(i18n("Add Spacer"), createPartIconSet("designer_spacer.png"), 0, actionCollection(), "layout_spacer"); setupToolsAction(toggle, m_widget->actionInsertSpacer); - action = new TDEAction(i18n("Preview &Form"), CTRL + Key_T, this, TQT_SLOT(windowPreview()), actionCollection(), "window_preview"); + action = new TDEAction(i18n("Preview &Form"), CTRL + Key_T, this, TQ_SLOT(windowPreview()), actionCollection(), "window_preview"); stateSync(action, m_widget->actionPreview); - action = new TDEAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, TQT_SLOT(windowNext()), actionCollection(), "window_next"); + action = new TDEAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, TQ_SLOT(windowNext()), actionCollection(), "window_next"); stateSync(action, m_widget->actionWindowNext); - action = new TDEAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, TQT_SLOT(windowPrev()), actionCollection(), "window_prev"); + action = new TDEAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, TQ_SLOT(windowPrev()), actionCollection(), "window_prev"); stateSync(action, m_widget->actionWindowPrevious); - action = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection()); + action = KStdAction::preferences(this, TQ_SLOT(editPreferences()), actionCollection()); action->setText(i18n("Configure &KDevDesigner...")); stateSync(action, m_widget->actionEditPreferences); } @@ -217,7 +217,7 @@ void KDevDesignerPart::stateSync( TDEAction * tdeaction, TQAction * qaction ) DesignerAction *ac = dynamic_cast<DesignerAction*>(qaction); if (!ac) return; - connect(ac, TQT_SIGNAL(actionEnabled(bool )), tdeaction, TQT_SLOT(setEnabled(bool ))); + connect(ac, TQ_SIGNAL(actionEnabled(bool )), tdeaction, TQ_SLOT(setEnabled(bool ))); } void KDevDesignerPart::setupToolsAction( TDERadioAction * toggle, TQAction * action ) @@ -227,8 +227,8 @@ void KDevDesignerPart::setupToolsAction( TDERadioAction * toggle, TQAction * act toggle->setGroup("tools"); toggle->setExclusiveGroup("tools"); - connect(action, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); - connect(toggle, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setToggleActionOn(bool))); + connect(action, TQ_SIGNAL(toggled(bool )), this, TQ_SLOT(setToggleActionChecked(bool ))); + connect(toggle, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(setToggleActionOn(bool))); toggle->setChecked(action->isOn()); m_actionMap[action] = toggle; m_actionMap2[toggle] = action; @@ -495,9 +495,9 @@ void KDevDesignerPart::setToggleActionOn( bool b ) TQAction *qaction = m_actionMap2[action]; if (!qaction) return; - disconnect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); + disconnect(qaction, TQ_SIGNAL(toggled(bool )), this, TQ_SLOT(setToggleActionChecked(bool ))); qaction->setOn(b); - connect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); + connect(qaction, TQ_SIGNAL(toggled(bool )), this, TQ_SLOT(setToggleActionChecked(bool ))); } void KDevDesignerPart::openProject( const TQString & // projectFile diff --git a/kdevdesigner/designer/kdevdesigner_part.desktop b/kdevdesigner/designer/kdevdesigner_part.desktop index 7ca2b603..2851e6e9 100644 --- a/kdevdesigner/designer/kdevdesigner_part.desktop +++ b/kdevdesigner/designer/kdevdesigner_part.desktop @@ -1,16 +1,8 @@ [Desktop Entry] Name=KDevDesignerPart -Name[da]=TDevelop Designer-part -Name[el]=ΤμήμαKDevDesigner -Name[nds]=Kdevelop-Makerkomponent -Name[ne]=केडीई विकास डिजाइनर भाग -Name[sv]=TDevelop designerdel -Name[ta]=கேமேம்பாட்டு வடிவமைப்பாளர் பகுதி -Name[tg]=KDevҚисми дизайнгар -Name[zh_TW]=TDevelop 設計元件 + +Type=Service MimeType=application/x-designer X-TDE-ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart X-TDE-Library=libkdevdesignerpart -Type=Service X-TDE-InitialPreference=10 - diff --git a/kdevdesigner/designer/kdevdesigner_part.h b/kdevdesigner/designer/kdevdesigner_part.h index 3006c600..ed940b52 100644 --- a/kdevdesigner/designer/kdevdesigner_part.h +++ b/kdevdesigner/designer/kdevdesigner_part.h @@ -38,7 +38,7 @@ class TDERadioAction; class KDevDesignerPart : public KInterfaceDesigner::Designer { - Q_OBJECT + TQ_OBJECT public: KDevDesignerPart(TQWidget *parentWidget, const char *widgetName, @@ -130,7 +130,7 @@ class TDEAboutData; class KDevDesignerPartFactory : public KParts::Factory { - Q_OBJECT + TQ_OBJECT public: KDevDesignerPartFactory(); diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp index b8fb737c..7c593025 100644 --- a/kdevdesigner/designer/layout.cpp +++ b/kdevdesigner/designer/layout.cpp @@ -124,7 +124,7 @@ void Layout::setup() // we leave here. if ( !lastList || ( lastList->count() < 2 && ( !layoutBase || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) && layoutBase != formWindow->mainContainer() ) ) ) ) { widgets.clear(); @@ -142,8 +142,8 @@ void Layout::setup() // widgets to get informed if one gets deleted to be able to // handle that and do not crash in this case for ( w = widgets.first(); w; w = widgets.next() ) { - connect( w, TQT_SIGNAL( destroyed() ), - this, TQT_SLOT( widgetDestroyed() ) ); + connect( w, TQ_SIGNAL( destroyed() ), + this, TQ_SLOT( widgetDestroyed() ) ); startPoint = TQPoint( TQMIN( startPoint.x(), w->x() ), TQMIN( startPoint.y(), w->y() ) ); geometries.insert( w, TQRect( w->pos(), w->size() ) ); @@ -167,13 +167,13 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent ) for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) w->raise(); needMove = !layoutBase; - needReparent = needMove || ::tqqt_cast<TQLayoutWidget*>(layoutBase) || ::tqqt_cast<TQSplitter*>(layoutBase); + needReparent = needMove || ::tqt_cast<TQLayoutWidget*>(layoutBase) || ::tqt_cast<TQSplitter*>(layoutBase); if ( !layoutBase ) { if ( !useSplitter ) - layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ), + layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLayoutWidget" ), WidgetFactory::containerOfWidget( parent ) ); else - layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ), + layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQSplitter" ), WidgetFactory::containerOfWidget( parent ) ); } else { WidgetFactory::deleteLayout( layoutBase ); @@ -195,7 +195,7 @@ void Layout::finishLayout( bool needMove, TQLayout *layout ) layoutBase->show(); layout->activate(); formWindow->insertWidget( layoutBase ); - formWindow->selectWidget( TQT_TQOBJECT(layoutBase) ); + formWindow->selectWidget( layoutBase ); TQString n = layoutBase->name(); if ( n.find( "qt_dead_widget_" ) != -1 ) { n.remove( 0, TQString( "qt_dead_widget_" ).length() ); @@ -214,9 +214,9 @@ void Layout::undoLayout() it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) ); it.key()->resize( ( *it ).size() ); } - formWindow->selectWidget( TQT_TQOBJECT(layoutBase), FALSE ); + formWindow->selectWidget( layoutBase, FALSE ); WidgetFactory::deleteLayout( layoutBase ); - if ( parent != layoutBase && !::tqqt_cast<TQMainWindow*>(layoutBase) ) { + if ( parent != layoutBase && !::tqt_cast<TQMainWindow*>(layoutBase) ) { layoutBase->hide(); TQString n = layoutBase->name(); n.prepend( "qt_dead_widget_" ); @@ -225,9 +225,9 @@ void Layout::undoLayout() layoutBase->setGeometry( oldGeometry ); } if ( widgets.first() ) - formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); + formWindow->selectWidget( widgets.first() ); else - formWindow->selectWidget( TQT_TQOBJECT(formWindow) ); + formWindow->selectWidget( formWindow ); } void Layout::breakLayout() @@ -239,11 +239,11 @@ void Layout::breakLayout() rects.insert( w, w->geometry() ); } WidgetFactory::deleteLayout( layoutBase ); - bool needReparent = qstrcmp( layoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 || - qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && + bool needReparent = qstrcmp( layoutBase->className(), "TQLayoutWidget" ) == 0 || + qstrcmp( layoutBase->className(), "TQSplitter" ) == 0 || + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) && layoutBase != formWindow->mainContainer() ); - bool needResize = qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0; + bool needResize = qstrcmp( layoutBase->className(), "TQSplitter" ) == 0; bool add = geometries.isEmpty(); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needReparent ) @@ -267,9 +267,9 @@ void Layout::breakLayout() parent = layoutBase; } if ( widgets.first() && widgets.first()->isVisibleTo( formWindow ) ) - formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); + formWindow->selectWidget( widgets.first() ); else - formWindow->selectWidget( TQT_TQOBJECT(formWindow) ); + formWindow->selectWidget( formWindow ); } class HorizontalLayoutList : public TQWidgetList @@ -314,21 +314,21 @@ void HorizontalLayout::doLayout() TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox ); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) + if ( needReparent && w->parent() != layoutBase ) w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); else layout->addWidget( w ); - if ( ::tqqt_cast<TQLayoutWidget*>(w) ) + if ( ::tqt_cast<TQLayoutWidget*>(w) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); } w->show(); } - if ( ::tqqt_cast<TQSplitter*>(layoutBase) ) - ( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal ); + if ( ::tqt_cast<TQSplitter*>(layoutBase) ) + ( (TQSplitter*)layoutBase )->setOrientation( TQt::Horizontal ); finishLayout( needMove, layout ); } @@ -378,21 +378,21 @@ void VerticalLayout::doLayout() TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox ); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) + if ( needReparent && w->parent() != layoutBase ) w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); else layout->addWidget( w ); - if ( ::tqqt_cast<TQLayoutWidget*>(w) ) + if ( ::tqt_cast<TQLayoutWidget*>(w) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); } w->show(); } - if ( ::tqqt_cast<TQSplitter*>(layoutBase) ) - ( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical ); + if ( ::tqt_cast<TQSplitter*>(layoutBase) ) + ( (TQSplitter*)layoutBase )->setOrientation( TQt::Vertical ); finishLayout( needMove, layout ); } @@ -756,14 +756,14 @@ void GridLayout::doLayout() int r, c, rs, cs; for ( w = widgets.first(); w; w = widgets.next() ) { if ( grid->locateWidget( w, r, c, rs, cs) ) { - if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) ) + if ( needReparent && w->parent() != layoutBase ) w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); if ( rs * cs == 1 ) { - layout->addWidget( w, r, c, ::tqqt_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, ::tqqt_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 ( ::tqqt_cast<TQLayoutWidget*>(w) ) + if ( ::tqt_cast<TQLayoutWidget*>(w) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); w->show(); } else { @@ -865,7 +865,7 @@ void GridLayout::buildGrid() Spacer::Spacer( TQWidget *parent, const char *name ) : TQWidget( parent, name, WMouseNoMask ), - orient(Qt::Vertical ), interactive(TRUE), sh( TQSize(20,20) ) + orient(TQt::Vertical ), interactive(TRUE), sh( TQSize(20,20) ) { setSizeType( Expanding ); setAutoMask( TRUE ); @@ -876,7 +876,7 @@ void Spacer::paintEvent( TQPaintEvent * ) TQPainter p( this ); p.setPen( TQt::blue ); - if ( orient ==Qt::Horizontal ) { + if ( orient ==TQt::Horizontal ) { const int dist = 3; const int amplitude = TQMIN( 3, height() / 3 ); const int base = height() / 2; @@ -915,7 +915,7 @@ void Spacer::resizeEvent( TQResizeEvent* e) void Spacer::updateMask() { TQRegion r( rect() ); - if ( orient ==Qt::Horizontal ) { + if ( orient ==TQt::Horizontal ) { const int amplitude = TQMIN( 3, height() / 3 ); const int base = height() / 2; r = r.subtract( TQRect(1, 0, width() - 2, base - amplitude ) ); @@ -932,7 +932,7 @@ void Spacer::updateMask() void Spacer::setSizeType( SizeType t ) { TQSizePolicy sizeP; - if ( orient ==Qt::Vertical ) + if ( orient ==TQt::Vertical ) sizeP = TQSizePolicy( TQSizePolicy::Minimum, (TQSizePolicy::SizeType)t ); else sizeP = TQSizePolicy( (TQSizePolicy::SizeType)t, TQSizePolicy::Minimum ); @@ -942,14 +942,14 @@ void Spacer::setSizeType( SizeType t ) Spacer::SizeType Spacer::sizeType() const { - if ( orient ==Qt::Vertical ) + if ( orient ==TQt::Vertical ) return (SizeType)sizePolicy().verData(); return (SizeType)sizePolicy().horData(); } int Spacer::alignment() const { - if ( orient ==Qt::Vertical ) + if ( orient ==TQt::Vertical ) return AlignHCenter; return AlignVCenter; } @@ -958,7 +958,7 @@ TQSize Spacer::minimumSize() const { TQSize s = TQSize( 20,20 ); if ( sizeType() == Expanding ) - if ( orient ==Qt::Vertical ) + if ( orient ==TQt::Vertical ) s.rheight() = 0; else s.rwidth() = 0; @@ -979,12 +979,12 @@ void Spacer::setSizeHint( const TQSize &s ) updateGeometry(); } -Qt::Orientation Spacer::orientation() const +TQt::Orientation Spacer::orientation() const { return orient; } -void Spacer::setOrientation( Qt::Orientation o ) +void Spacer::setOrientation( TQt::Orientation o ) { if ( orient == o ) return; diff --git a/kdevdesigner/designer/layout.h b/kdevdesigner/designer/layout.h index d1ea776e..af37b323 100644 --- a/kdevdesigner/designer/layout.h +++ b/kdevdesigner/designer/layout.h @@ -40,7 +40,7 @@ class TQPaintEvent; class Layout : public TQObject { - Q_OBJECT + TQ_OBJECT public: @@ -118,7 +118,7 @@ protected: class Spacer : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_OVERRIDE( TQCString name ) @@ -163,7 +163,7 @@ protected: class QDesignerGridLayout : public TQGridLayout { - Q_OBJECT + TQ_OBJECT public: QDesignerGridLayout( TQWidget *parent ) : TQGridLayout( parent ){}; diff --git a/kdevdesigner/designer/listboxdnd.cpp b/kdevdesigner/designer/listboxdnd.cpp index 54498478..4e8a7822 100644 --- a/kdevdesigner/designer/listboxdnd.cpp +++ b/kdevdesigner/designer/listboxdnd.cpp @@ -81,7 +81,7 @@ bool ListBoxDnd::dropEvent( TQDropEvent * event ) bool ListBoxDnd::mouseMoveEvent( TQMouseEvent * event ) { - if ( event->state() & Qt::LeftButton ) { + if ( event->state() & TQt::LeftButton ) { if ( ( event->pos() - mousePressPos ).manhattanLength() > 3 ) { ListBoxItemList list; diff --git a/kdevdesigner/designer/listboxdnd.h b/kdevdesigner/designer/listboxdnd.h index 5abf792f..95f3a667 100644 --- a/kdevdesigner/designer/listboxdnd.h +++ b/kdevdesigner/designer/listboxdnd.h @@ -35,7 +35,7 @@ typedef TQPtrList<TQListBoxItem> ListBoxItemList; class ListBoxDnd : public ListDnd { - Q_OBJECT + TQ_OBJECT public: // dragModes are enumerated in ListDnd diff --git a/kdevdesigner/designer/listboxeditor.ui b/kdevdesigner/designer/listboxeditor.ui index 6c5a8408..628a622c 100644 --- a/kdevdesigner/designer/listboxeditor.ui +++ b/kdevdesigner/designer/listboxeditor.ui @@ -434,7 +434,7 @@ <tabstop>helpButton</tabstop> <tabstop>buttonApply</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot access="protected">init()</slot> <slot access="protected">destroy()</slot> <slot access="protected">insertNewItem()</slot> @@ -448,7 +448,7 @@ <slot access="protected">deletePixmap()</slot> <slot access="protected">moveItemUp()</slot> <slot access="protected">moveItemDown()</slot> -</Q_SLOTS> +</slots> <pixmapfunction>BarIcon2</pixmapfunction> <layoutdefaults spacing="6" margin="11"/> <includes> diff --git a/kdevdesigner/designer/listboxeditorimpl.cpp b/kdevdesigner/designer/listboxeditorimpl.cpp index 01dfa64e..67720ed9 100644 --- a/kdevdesigner/designer/listboxeditorimpl.cpp +++ b/kdevdesigner/designer/listboxeditorimpl.cpp @@ -43,7 +43,7 @@ ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) : ListBoxEditorBase( parent, 0, TRUE ), formwindow( fw ) { - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); listbox = (TQListBox*)editWidget; itemText->setText( "" ); @@ -65,20 +65,20 @@ ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow ListBoxDnd *editorDnd = new ListBoxDnd( preview ); editorDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move ); - TQObject::connect( editorDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), - editorDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) ); + TQObject::connect( editorDnd, TQ_SIGNAL( dropped( TQListBoxItem * ) ), + editorDnd, TQ_SLOT( confirmDrop( TQListBoxItem * ) ) ); ListBoxRename *editorRename = new ListBoxRename( preview ); - TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" ); + TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" ); TQObjectListIt it( *l ); TQObject *obj; while ( (obj = it.current()) != 0 ) { ++it; TQObject::connect( editorRename, - TQT_SIGNAL( itemTextChanged( const TQString & ) ), + TQ_SIGNAL( itemTextChanged( const TQString & ) ), obj, - TQT_SLOT( setText( const TQString & ) ) ); + TQ_SLOT( setText( const TQString & ) ) ); } delete l; diff --git a/kdevdesigner/designer/listboxeditorimpl.h b/kdevdesigner/designer/listboxeditorimpl.h index 28ca0254..7f0c9ee9 100644 --- a/kdevdesigner/designer/listboxeditorimpl.h +++ b/kdevdesigner/designer/listboxeditorimpl.h @@ -34,7 +34,7 @@ class FormWindow; class ListBoxEditor : public ListBoxEditorBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/listboxrename.cpp b/kdevdesigner/designer/listboxrename.cpp index 0a32d292..05999779 100644 --- a/kdevdesigner/designer/listboxrename.cpp +++ b/kdevdesigner/designer/listboxrename.cpp @@ -48,8 +48,8 @@ ListBoxRename::ListBoxRename( TQListBox * eventSource, const char * name ) ed->hide(); ed->setFrame( FALSE ); - TQObject::connect( ed, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( renameClickedItem() ) ); + TQObject::connect( ed, TQ_SIGNAL( returnPressed() ), + this, TQ_SLOT( renameClickedItem() ) ); } bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) @@ -63,7 +63,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) if ( clickedItem && clickedItem->isSelected() && (clickedItem == src->itemAt( pos )) ) { - TQTimer::singleShot( 500, this, TQT_SLOT( showLineEdit() ) ); + TQTimer::singleShot( 500, this, TQ_SLOT( showLineEdit() ) ); activity = FALSE; // no drags or clicks for 500 ms before we start the renaming } else { // new item clicked activity = TRUE; @@ -75,7 +75,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) case TQEvent::MouseMove: - if ( ((TQMouseEvent *) event)->state() & Qt::LeftButton ) { + if ( ((TQMouseEvent *) event)->state() & TQt::LeftButton ) { activity = TRUE; // drag } break; diff --git a/kdevdesigner/designer/listboxrename.h b/kdevdesigner/designer/listboxrename.h index ec666f70..6246eca6 100644 --- a/kdevdesigner/designer/listboxrename.h +++ b/kdevdesigner/designer/listboxrename.h @@ -34,7 +34,7 @@ class TQLineEdit; class ListBoxRename : public TQObject { - Q_OBJECT + TQ_OBJECT public: ListBoxRename( TQListBox * eventSource, const char * name = 0 ); diff --git a/kdevdesigner/designer/listdnd.cpp b/kdevdesigner/designer/listdnd.cpp index 8431fd18..2e3206ae 100644 --- a/kdevdesigner/designer/listdnd.cpp +++ b/kdevdesigner/designer/listdnd.cpp @@ -119,7 +119,7 @@ bool ListDnd::dropEvent( TQDropEvent * ) bool ListDnd::mousePressEvent( TQMouseEvent * event ) { - if ( event->button() == Qt::LeftButton ) + if ( event->button() == TQt::LeftButton ) mousePressPos = event->pos(); return FALSE; } diff --git a/kdevdesigner/designer/listdnd.h b/kdevdesigner/designer/listdnd.h index 39e1af11..27b6dc9f 100644 --- a/kdevdesigner/designer/listdnd.h +++ b/kdevdesigner/designer/listdnd.h @@ -32,7 +32,7 @@ class ListDnd : public TQObject { - Q_OBJECT + TQ_OBJECT public: enum DragMode { None = 0, External = 1, Internal = 2, Both = 3, Move = 4, NullDrop = 8 }; diff --git a/kdevdesigner/designer/listeditor.ui b/kdevdesigner/designer/listeditor.ui index addab137..2376ea9b 100644 --- a/kdevdesigner/designer/listeditor.ui +++ b/kdevdesigner/designer/listeditor.ui @@ -158,7 +158,7 @@ <forwards> <forward>class TQStringList;</forward> </forwards> -<Q_SLOTS> +<slots> <slot>init()</slot> <slot>setList( const TQStringList & l )</slot> <slot>addItem()</slot> @@ -166,7 +166,7 @@ <slot>removeItems()</slot> <slot returnType="TQStringList">items()</slot> <slot>renameItem()</slot> -</Q_SLOTS> +</slots> <pixmapfunction>BarIcon2</pixmapfunction> <layoutdefaults spacing="6" margin="11"/> <includes> diff --git a/kdevdesigner/designer/listviewdnd.cpp b/kdevdesigner/designer/listviewdnd.cpp index 32dcc6d5..f5f89d4d 100644 --- a/kdevdesigner/designer/listviewdnd.cpp +++ b/kdevdesigner/designer/listviewdnd.cpp @@ -92,7 +92,7 @@ bool ListViewDnd::dropEvent( TQDropEvent * event ) bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event ) { - if ( event->state() & Qt::LeftButton ) { + if ( event->state() & TQt::LeftButton ) { if ( ( event->pos() - mousePressPos ).manhattanLength() > 3 ) { ListViewItemList list; diff --git a/kdevdesigner/designer/listviewdnd.h b/kdevdesigner/designer/listviewdnd.h index 5a59f4ad..fca1ef93 100644 --- a/kdevdesigner/designer/listviewdnd.h +++ b/kdevdesigner/designer/listviewdnd.h @@ -37,7 +37,7 @@ typedef TQPtrList<TQListViewItem> ListViewItemList; class ListViewDnd : public ListDnd { - Q_OBJECT + TQ_OBJECT public: enum DragMode { Flat = 16 }; // see ListDnd::DragMode diff --git a/kdevdesigner/designer/listvieweditor.ui b/kdevdesigner/designer/listvieweditor.ui index 8a0abe14..234b52ba 100644 --- a/kdevdesigner/designer/listvieweditor.ui +++ b/kdevdesigner/designer/listvieweditor.ui @@ -897,7 +897,7 @@ <tabstop>colClickable</tabstop> <tabstop>colResizable</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot access="protected">init()</slot> <slot access="protected">destroy()</slot> <slot access="protected">applyClicked()</slot> @@ -925,7 +925,7 @@ <slot access="protected">newColumnClicked()</slot> <slot access="protected">itemRightClicked()</slot> <slot access="protected">okClicked()</slot> -</Q_SLOTS> +</slots> <includes> <include location="local" impldecl="in implementation">myiconloader.h</include> </includes> diff --git a/kdevdesigner/designer/listvieweditorimpl.cpp b/kdevdesigner/designer/listvieweditorimpl.cpp index c5ec7498..32f71562 100644 --- a/kdevdesigner/designer/listvieweditorimpl.cpp +++ b/kdevdesigner/designer/listvieweditorimpl.cpp @@ -49,7 +49,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw ) : ListViewEditorBase( parent, 0, TRUE ), listview( lv ), formwindow( fw ) { - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); itemText->setEnabled( FALSE ); itemChoosePixmap->setEnabled( FALSE ); itemDeletePixmap->setEnabled( FALSE ); @@ -71,8 +71,8 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw // Clamp on drag and drop to TQListView ListViewDnd *itemsDnd = new ListViewDnd( itemsPreview ); itemsDnd->setDragMode( ListViewDnd::Internal | ListViewDnd::Move ); - TQObject::connect( itemsDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ), - itemsDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) ); + TQObject::connect( itemsDnd, TQ_SIGNAL( dropped( TQListViewItem * ) ), + itemsDnd, TQ_SLOT( confirmDrop( TQListViewItem * ) ) ); // Enable rename for all TQListViewItems TQListViewItemIterator it = ((TQListView *)itemsPreview)->firstChild(); @@ -81,45 +81,45 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw // Connect listview signal to signal-relay TQObject::connect( itemsPreview, - TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ), + TQ_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ), this, - TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); + TQ_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); // Connect signal-relay to TQLineEdit "itemText" - TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" ); + TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" ); TQObject *obj; TQObjectListIt itemsLineEditIt( *l ); while ( (obj = itemsLineEditIt.current()) != 0 ) { ++itemsLineEditIt; TQObject::connect( this, - TQT_SIGNAL( itemRenamed( const TQString & ) ), + TQ_SIGNAL( itemRenamed( const TQString & ) ), obj, - TQT_SLOT( setText( const TQString & ) ) ); + TQ_SLOT( setText( const TQString & ) ) ); } delete l; // Clamp on drag and drop to TQListBox ListBoxDnd *columnsDnd = new ListBoxDnd( colPreview ); columnsDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move ); - TQObject::connect( columnsDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), - columnsDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) ); + TQObject::connect( columnsDnd, TQ_SIGNAL( dropped( TQListBoxItem * ) ), + columnsDnd, TQ_SLOT( confirmDrop( TQListBoxItem * ) ) ); // Clamp on rename to TQListBox ListBoxRename *columnsRename = new ListBoxRename( colPreview ); TQObject::connect( columnsRename, - TQT_SIGNAL( itemTextChanged( const TQString & ) ), + TQ_SIGNAL( itemTextChanged( const TQString & ) ), this, - TQT_SLOT( columnTextChanged( const TQString & ) ) ); + TQ_SLOT( columnTextChanged( const TQString & ) ) ); // Find TQLineEdit "colText" and connect - l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "colText" ); + l = parent->queryList( "TQLineEdit", "colText" ); TQObjectListIt columnsLineEditIt( *l ); while ( (obj = columnsLineEditIt.current()) != 0 ) { ++columnsLineEditIt; TQObject::connect( columnsRename, - TQT_SIGNAL( itemTextChanged( const TQString & ) ), + TQ_SIGNAL( itemTextChanged( const TQString & ) ), obj, - TQT_SLOT( setText( const TQString & ) ) ); + TQ_SLOT( setText( const TQString & ) ) ); } delete l; } diff --git a/kdevdesigner/designer/listvieweditorimpl.h b/kdevdesigner/designer/listvieweditorimpl.h index 64048c9d..2644d4d8 100644 --- a/kdevdesigner/designer/listvieweditorimpl.h +++ b/kdevdesigner/designer/listvieweditorimpl.h @@ -37,7 +37,7 @@ class FormWindow; class ListViewEditor : public ListViewEditorBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index 4caaab41..cd1bcd93 100644 --- a/kdevdesigner/designer/mainwindow.cpp +++ b/kdevdesigner/designer/mainwindow.cpp @@ -173,12 +173,12 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons savePluginPaths = FALSE; updateFunctionsTimer = new TQTimer( this ); - connect( updateFunctionsTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( doFunctionsChanged() ) ); + connect( updateFunctionsTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( doFunctionsChanged() ) ); autoSaveTimer = new TQTimer( this ); - connect( autoSaveTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( fileSaveAll() ) ); + connect( autoSaveTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( fileSaveAll() ) ); set_splash_status( "Loading Plugins..." ); setupPluginManagers(); @@ -201,12 +201,7 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons singleProject = single; statusBar()->clear(); -#if defined(TQT_NON_COMMERCIAL) - statusBar()->addWidget( new TQLabel(i18n("Ready - This is the non-commercial version of TQt - " - "For commercial evaluations, use the help menu to register with Trolltech."), statusBar()), 1 ); -#else statusBar()->addWidget( new TQLabel("Ready", statusBar()), 1 ); -#endif set_splash_status( "Setting up GUI..." ); @@ -239,8 +234,8 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons setupRMBMenus(); - connect( this, TQT_SIGNAL( projectChanged() ), this, TQT_SLOT( emitProjectSignals() ) ); - connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), this, TQT_SLOT( emitProjectSignals() ) ); + connect( this, TQ_SIGNAL( projectChanged() ), this, TQ_SLOT( emitProjectSignals() ) ); + connect( this, TQ_SIGNAL( hasActiveWindow(bool) ), this, TQ_SLOT( emitProjectSignals() ) ); emit hasActiveForm( FALSE ); emit hasActiveWindow( FALSE ); @@ -252,8 +247,8 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons as -= TQSize( 30, 30 ); resize( TQSize( 1200, 1000 ).boundedTo( as ) ); - connect( tqApp->clipboard(), TQT_SIGNAL( dataChanged() ), - this, TQT_SLOT( clipboardChanged() ) ); + connect( tqApp->clipboard(), TQ_SIGNAL( dataChanged() ), + this, TQ_SLOT( clipboardChanged() ) ); clipboardChanged(); layoutChilds = FALSE; layoutSelected = FALSE; @@ -263,30 +258,30 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons set_splash_status( "Loading User Settings..." ); readConfig(); // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties) - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLABEL_OBJECT_NAME_STRING ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQTABWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, 0, FALSE ); delete w; setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); actionEditor->parentWidget()->hide(); - assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) ); + assistant = new TQAssistantClient( assistantPath(), this ); statusBar()->setSizeGripEnabled( TRUE ); set_splash_status( "Initialization Done." ); /* if ( shStartDialog ) - TQTimer::singleShot( 0, this, TQT_SLOT( showStartDialog() ));*/ + TQTimer::singleShot( 0, this, TQ_SLOT( showStartDialog() ));*/ if ( autoSaveEnabled ) autoSaveTimer->start( autoSaveInterval * 1000 ); - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); } MainWindow::~MainWindow() @@ -338,8 +333,8 @@ void MainWindow::setupMDI() qworkspace = new TQWorkspace( vbox ); qworkspace->setPaletteBackgroundPixmap( UserIcon( "designer_background.png", KDevDesignerPartFactory::instance() ) ); qworkspace->setScrollBarsEnabled( TRUE ); - connect( qworkspace, TQT_SIGNAL( windowActivated( TQWidget * ) ), - this, TQT_SLOT( activeWindowChanged( TQWidget * ) ) ); + connect( qworkspace, TQ_SIGNAL( windowActivated( TQWidget * ) ), + this, TQ_SLOT( activeWindowChanged( TQWidget * ) ) ); lastActiveFormWindow = 0; qworkspace->setAcceptDrops( TRUE ); } @@ -423,7 +418,7 @@ void MainWindow::setupWorkspace() QCompletionEdit *edit = new QCompletionEdit( vbox ); TQToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) ); TQAccel *a = new TQAccel( this ); - a->connectItem( a->insertItem( ALT + Key_B ), edit, TQT_SLOT( setFocus() ) ); + a->connectItem( a->insertItem( ALT + Key_B ), edit, TQ_SLOT( setFocus() ) ); wspace = new Workspace( vbox, this ); wspace->setBufferEdit( edit ); wspace->setCurrentProject( currentProject ); @@ -475,7 +470,7 @@ void MainWindow::setupToolbox() setDockEnabled( dw, TQt::DockBottom, FALSE ); commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" ); commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame ); - commonWidgetsToolBar->setOrientation( Qt::Vertical ); + commonWidgetsToolBar->setOrientation( TQt::Vertical ); commonWidgetsToolBar->setBackgroundMode(PaletteBase); toolBox->addItem( commonWidgetsToolBar, "Common Widgets" ); } @@ -582,7 +577,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) TQStringList databases; TQPtrDictIterator<TQWidget> wit( *fw->widgets() ); while ( wit.current() ) { - TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(wit.current()), "database" ).toStringList(); + TQStringList lst = MetaDataBase::fakeProperty( wit.current(), "database" ).toStringList(); if ( !lst.isEmpty() ) databases << lst [ 0 ]; ++wit; @@ -601,12 +596,12 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) Resource resource( this ); resource.setWidget( fw ); TQValueList<Resource::Image> images; - resource.save( TQT_TQIODEVICE(&buffer) ); + resource.save( &buffer ); buffer.close(); buffer.open( IO_ReadOnly ); - TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&buffer) ); + TQWidget *w = TQWidgetFactory::create( &buffer ); if ( w ) { previewedForm = w; if ( palet ) { @@ -618,7 +613,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) if ( style ) w->setStyle( style ); - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + TQObjectList *l = w->queryList( "TQWidget" ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( style ) ( (TQWidget*)o )->setStyle( style ); @@ -729,7 +724,7 @@ void MainWindow::previewForm( const TQString & style ) if ( !w ) return; - w->insertChild( TQT_TQOBJECT(st) ); + w->insertChild( st ); w->show(); } @@ -793,7 +788,7 @@ void MainWindow::helpContents() if ( source.isEmpty() || source == "designer-manual.html" ) { if ( classname.lower() == "spacer" ) source = "qspaceritem.html#details"; - else if ( classname == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + else if ( classname == "TQLayoutWidget" ) source = "layout.html"; else source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details"; @@ -877,7 +872,7 @@ void MainWindow::helpRegister() TQProcess process( command + " www.trolltech.com/products/download/eval/evaluation.html" ); if ( !process.start() ) TQMessageBox::information( this, "Register TQt", "Launching your web browser failed.\n" - "To register TQt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" ); + "To TQt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" ); #endif } @@ -886,14 +881,14 @@ void MainWindow::showProperties( TQObject *o ) if ( !o->isWidgetType() ) { propertyEditor->setWidget( o, lastActiveFormWindow ); if ( lastActiveFormWindow ) - hierarchyView->setFormWindow( lastActiveFormWindow, TQT_TQOBJECT(lastActiveFormWindow->mainContainer()) ); + hierarchyView->setFormWindow( lastActiveFormWindow, lastActiveFormWindow->mainContainer() ); else hierarchyView->setFormWindow( 0, 0 ); return; } TQWidget *w = (TQWidget*)o; setupHierarchyView(); - FormWindow *fw = (FormWindow*)isAFormWindowChild( TQT_TQOBJECT(w) ); + FormWindow *fw = (FormWindow*)isAFormWindowChild( w ); if ( fw ) { if ( fw->numSelectedWidgets() > 1 ) { TQWidgetList wl = fw->selectedWidgets(); @@ -903,16 +898,16 @@ void MainWindow::showProperties( TQObject *o ) } propertyEditor->setWidget( new PropertyObject( wl ), fw ); } else { - propertyEditor->setWidget( TQT_TQOBJECT(w), fw ); + propertyEditor->setWidget( w, fw ); } - hierarchyView->setFormWindow( fw, TQT_TQOBJECT(w) ); + hierarchyView->setFormWindow( fw, w ); } else { propertyEditor->setWidget( 0, 0 ); hierarchyView->setFormWindow( 0, 0 ); } if ( currentTool() == POINTER_TOOL && fw && - ( !qworkspace->activeWindow() || !::tqqt_cast<SourceEditor*>(qworkspace->activeWindow()) ) ) + ( !qworkspace->activeWindow() || !::tqt_cast<SourceEditor*>(qworkspace->activeWindow()) ) ) fw->setFocus(); } @@ -929,21 +924,21 @@ void MainWindow::updateProperties( TQObject * ) bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) { - if ( ::tqqt_cast<MenuBarEditor*>(o) || ::tqqt_cast<PopupMenuEditor*>(o) || + if ( ::tqt_cast<MenuBarEditor*>(o) || ::tqt_cast<PopupMenuEditor*>(o) || ( o && - ( ::tqqt_cast<MenuBarEditor*>(o->parent()) || - ::tqqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) { + ( ::tqt_cast<MenuBarEditor*>(o->parent()) || + ::tqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) { - if ( e->type() == TQEvent::Accel && ::tqqt_cast<PopupMenuEditor*>(o) ) { + if ( e->type() == TQEvent::Accel && ::tqt_cast<PopupMenuEditor*>(o) ) { return TRUE; // consume accel events - } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast<MenuBarEditor*>(o) ) { + } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<MenuBarEditor*>(o) ) { TQPoint pos = ((TQMouseEvent*)e)->pos(); - MenuBarEditor *m = ::tqqt_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 && ::tqqt_cast<PopupMenuEditor*>(o) ) { - PopupMenuEditor *m = ::tqqt_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() ); @@ -962,7 +957,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) { w = (TQWidget*)o; while ( w ) { - if ( ::tqqt_cast<PropertyList*>(w) ) + if ( ::tqt_cast<PropertyList*>(w) ) break; w = w->parentWidget( TRUE ); } @@ -978,7 +973,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ( (TQKeyEvent*)e )->key() == Key_E ) && ( (TQKeyEvent*)e )->state() & ControlButton ) { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (TQKeyEvent*)e )->ignore(); return TRUE; } @@ -987,44 +982,44 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::ContextMenu: case TQEvent::MouseButtonPress: if ( o && currentTool() == POINTER_TOOL && - ( ::tqqt_cast<MenuBarEditor*>(o) || - ::tqqt_cast<PopupMenuEditor*>(o) || - ::tqqt_cast<QDesignerToolBar*>(o) || - ( ::tqqt_cast<TQComboBox*>(o) || - ::tqqt_cast<TQToolButton*>(o) || - ::tqqt_cast<QDesignerToolBarSeparator*>(o) ) && + ( ::tqt_cast<MenuBarEditor*>(o) || + ::tqt_cast<PopupMenuEditor*>(o) || + ::tqt_cast<QDesignerToolBar*>(o) || + ( ::tqt_cast<TQComboBox*>(o) || + ::tqt_cast<TQToolButton*>(o) || + ::tqt_cast<QDesignerToolBarSeparator*>(o) ) && o->parent() - && ( ::tqqt_cast<QDesignerToolBar*>(o->parent()) - || ::tqqt_cast<QDesignerWidgetStack*>(o->parent())) ) ) { + && ( ::tqt_cast<QDesignerToolBar*>(o->parent()) + || ::tqt_cast<QDesignerWidgetStack*>(o->parent())) ) ) { TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast<TQToolButton*>(w) || - ::tqqt_cast<TQComboBox*>(w) || - ::tqqt_cast<PopupMenuEditor*>(w) || - ::tqqt_cast<QDesignerToolBarSeparator*>(w) ) + if ( ::tqt_cast<TQToolButton*>(w) || + ::tqt_cast<TQComboBox*>(w) || + ::tqt_cast<PopupMenuEditor*>(w) || + ::tqt_cast<QDesignerToolBarSeparator*>(w) ) w = w->parentWidget(); TQWidget *pw = w->parentWidget(); while ( pw ) { - if ( ::tqqt_cast<FormWindow*>(pw) ) { - ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) ); - if ( !::tqqt_cast<QDesignerToolBar*>(o) ) - return ( !::tqqt_cast<TQToolButton*>(o) && - !::tqqt_cast<MenuBarEditor*>(o) && - !::tqqt_cast<TQComboBox*>(o) && - !::tqqt_cast<QDesignerToolBarSeparator*>(o) ); + if ( ::tqt_cast<FormWindow*>(pw) ) { + ( (FormWindow*)pw )->emitShowProperties( w ); + if ( !::tqt_cast<QDesignerToolBar*>(o) ) + return ( !::tqt_cast<TQToolButton*>(o) && + !::tqt_cast<MenuBarEditor*>(o) && + !::tqt_cast<TQComboBox*>(o) && + !::tqt_cast<QDesignerToolBarSeparator*>(o) ); } pw = pw->parentWidget(); } } - if ( o && ( ::tqqt_cast<QDesignerToolBar*>(o) || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) + if ( o && ( ::tqt_cast<QDesignerToolBar*>(o) || o->inherits("TQDockWindowHandle") ) && e->type() == TQEvent::ContextMenu ) break; if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) break; - if ( ::tqqt_cast<TQSizeGrip*>(o) ) + if ( ::tqt_cast<TQSizeGrip*>(o) ) break; if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast<SizeHandle*>(o) || - ::tqqt_cast<OrderIndicator*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) break; if ( !w->hasFocus() ) w->setFocus(); @@ -1041,7 +1036,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) } lastPressWidget = (TQWidget*)o; if ( passiveInteractor ) - TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); + TQTimer::singleShot( 0, formWindow(), TQ_SLOT( visibilityChanged() ) ); if ( currentTool() == CONNECT_TOOL || currentTool() == BUDDY_TOOL ) return TRUE; return !passiveInteractor; @@ -1049,19 +1044,19 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) lastPressWidget = 0; if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) break; - if ( ::tqqt_cast<TQSizeGrip*>(o) ) + if ( ::tqt_cast<TQSizeGrip*>(o) ) break; if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast<SizeHandle*>(o) || - ::tqqt_cast<OrderIndicator*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) break; passiveInteractor = WidgetFactory::isPassiveInteractor( o ); if ( !passiveInteractor ) ( (FormWindow*)w )->handleMouseRelease( (TQMouseEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( passiveInteractor ) { - TQTimer::singleShot( 0, this, TQT_SLOT( selectionChanged() ) ); - TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( selectionChanged() ) ); + TQTimer::singleShot( 0, formWindow(), TQ_SLOT( visibilityChanged() ) ); } return !passiveInteractor; case TQEvent::MouseMove: @@ -1069,15 +1064,15 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; w = isAFormWindowChild( o ); if ( lastPressWidget != (TQWidget*)o && w && - !::tqqt_cast<SizeHandle*>(o) && !::tqqt_cast<OrderIndicator*>(o) && - !::tqqt_cast<PopupMenuEditor*>(o) && !::tqqt_cast<TQMenuBar*>(o) && - !::tqqt_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 && ::tqqt_cast<TQSizeGrip*>(o) ) + if ( o && ::tqt_cast<TQSizeGrip*>(o) ) break; if ( lastPressWidget != (TQWidget*)o || - ( !w || ::tqqt_cast<SizeHandle*>(o) ) || - ::tqqt_cast<OrderIndicator*>(o) ) + ( !w || ::tqt_cast<SizeHandle*>(o) ) || + ::tqt_cast<OrderIndicator*>(o) ) break; passiveInteractor = WidgetFactory::isPassiveInteractor( o ); if ( !passiveInteractor ) @@ -1090,14 +1085,14 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return FALSE; } if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) { - if ( ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + if ( ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { qWorkspace()->activeWindow()->setFocus(); return TRUE; } } if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast<SizeHandle*>(o) || - ::tqqt_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() ) @@ -1105,10 +1100,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::MouseButtonDblClick: if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast<SizeHandle*>(o) || - ::tqqt_cast<OrderIndicator*>(o) ) { - if ( ::tqqt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() && - o->parent() && ::tqqt_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; } @@ -1122,8 +1117,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return TRUE; case TQEvent::KeyRelease: if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast<SizeHandle*>(o) || - ::tqqt_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() ) @@ -1131,25 +1126,25 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::Hide: if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast<SizeHandle*>(o) || - ::tqqt_cast<OrderIndicator*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) break; - if ( ( (FormWindow*)w )->isWidgetSelected( TQT_TQOBJECT(o) ) ) - ( (FormWindow*)w )->selectWidget( TQT_TQOBJECT(o), FALSE ); + if ( ( (FormWindow*)w )->isWidgetSelected( o ) ) + ( (FormWindow*)w )->selectWidget( o, FALSE ); break; case TQEvent::Enter: case TQEvent::Leave: if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast<SizeHandle*>(o) || - ::tqqt_cast<OrderIndicator*>(o) || - ::tqqt_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 ) ) || - ::tqqt_cast<SizeHandle*>(o) || - ::tqqt_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 ); @@ -1161,31 +1156,31 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) { if ( lastActiveFormWindow && lastActiveFormWindow->project() ) { TQStringList lst = - MetaDataBase::fakeProperty( TQT_TQOBJECT(lastActiveFormWindow), "database" ).toStringList(); + MetaDataBase::fakeProperty( lastActiveFormWindow, "database" ).toStringList(); lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] ); } } break; case TQEvent::DragEnter: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e ); return TRUE; } break; case TQEvent::DragMove: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e ); return TRUE; } break; case TQEvent::Drop: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDropEvent( (TQDropEvent*)e ); return TRUE; } break; case TQEvent::Show: - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) ) + if ( o != this ) break; if ( ((TQShowEvent*)e)->spontaneous() ) break; @@ -1195,33 +1190,33 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return TRUE; case TQEvent::Wheel: if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast<SizeHandle*>(o) || - ::tqqt_cast<OrderIndicator*>(o) ) + ::tqt_cast<SizeHandle*>(o) || + ::tqt_cast<OrderIndicator*>(o) ) break; return TRUE; case TQEvent::FocusIn: - if ( !::tqqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) + if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) return TRUE; //FIXME if ( hierarchyView->formDefinitionView()->isRenaming() - && ( o->inherits( "Editor" ) || ::tqqt_cast<FormWindow*>(o) ) ) + && ( o->inherits( "Editor" ) || ::tqt_cast<FormWindow*>(o) ) ) TQApplication::sendPostedEvents(); if ( o->inherits( "Editor" ) ) { TQWidget *w = (TQWidget*)o; while ( w ) { - if ( ::tqqt_cast<SourceEditor*>(w) ) + if ( ::tqt_cast<SourceEditor*>(w) ) break; w = w->parentWidget( TRUE ); } - if ( ::tqqt_cast<SourceEditor*>(w) ) + if ( ::tqt_cast<SourceEditor*>(w) ) ( (SourceEditor*)w )->checkTimeStamp(); - } else if ( ::tqqt_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 ( !::tqqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) + if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) return TRUE; break; default: @@ -1233,10 +1228,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const { - if ( ::tqqt_cast<TQWizard*>(o->parent()) && !::tqqt_cast<TQPushButton*>(o) ) + if ( ::tqt_cast<TQWizard*>(o->parent()) && !::tqt_cast<TQPushButton*>(o) ) return 0; while ( o ) { - if ( ::tqqt_cast<FormWindow*>(o) ) + if ( ::tqt_cast<FormWindow*>(o) ) return (TQWidget*)o; o = o->parent(); } @@ -1246,9 +1241,9 @@ TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const { while ( o ) { - if ( ::tqqt_cast<QDesignerToolBar*>(o) ) + if ( ::tqt_cast<QDesignerToolBar*>(o) ) return (TQWidget*)o; - if ( ::tqqt_cast<FormWindow*>(o) ) + if ( ::tqt_cast<FormWindow*>(o) ) return 0; o = o->parent(); } @@ -1259,7 +1254,7 @@ FormWindow *MainWindow::formWindow() { if ( qworkspace->activeWindow() ) { FormWindow *fw = 0; - if ( ::tqqt_cast<FormWindow*>(qworkspace->activeWindow()) ) + if ( ::tqt_cast<FormWindow*>(qworkspace->activeWindow()) ) fw = (FormWindow*)qworkspace->activeWindow(); else if ( lastActiveFormWindow && qworkspace->windowList().find( lastActiveFormWindow ) != -1) @@ -1290,16 +1285,16 @@ void MainWindow::insertFormWindow( FormWindow *fw ) "<p>You can have several forms open, and all open forms are listed " "in the <b>Form List</b>.") ); - connect( fw, TQT_SIGNAL( showProperties( TQObject * ) ), - this, TQT_SLOT( showProperties( TQObject * ) ) ); - connect( fw, TQT_SIGNAL( updateProperties( TQObject * ) ), - this, TQT_SLOT( updateProperties( TQObject * ) ) ); - connect( this, TQT_SIGNAL( currentToolChanged() ), - fw, TQT_SLOT( currentToolChanged() ) ); - connect( fw, TQT_SIGNAL( selectionChanged() ), - this, TQT_SLOT( selectionChanged() ) ); - connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), - this, TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); + connect( fw, TQ_SIGNAL( showProperties( TQObject * ) ), + this, TQ_SLOT( showProperties( TQObject * ) ) ); + connect( fw, TQ_SIGNAL( updateProperties( TQObject * ) ), + this, TQ_SLOT( updateProperties( TQObject * ) ) ); + connect( this, TQ_SIGNAL( currentToolChanged() ), + fw, TQ_SLOT( currentToolChanged() ) ); + connect( fw, TQ_SIGNAL( selectionChanged() ), + this, TQ_SLOT( selectionChanged() ) ); + connect( fw, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), + this, TQ_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); if ( !mblockNewForms ) { } else { @@ -1310,9 +1305,9 @@ void MainWindow::insertFormWindow( FormWindow *fw ) if ( fw->caption().isEmpty() && tqstrlen( fw->name() ) ) fw->setCaption( fw->name() ); fw->mainContainer()->setCaption( fw->caption() ); - WidgetFactory::saveDefaultProperties( TQT_TQOBJECT(fw->mainContainer()), + WidgetFactory::saveDefaultProperties( fw->mainContainer(), WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(fw->mainContainer()) ) ) ); + idFromClassName( WidgetFactory::classNameOf( fw->mainContainer() ) ) ); activeWindowChanged( fw ); emit formWindowsChanged(); for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { @@ -1356,7 +1351,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) TQPtrList<SourceEditor> waitingForDelete; waitingForDelete.setAutoDelete( TRUE ); for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(w) ) + if ( e->object() == w ) waitingForDelete.append( e ); } @@ -1371,7 +1366,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) void MainWindow::activeWindowChanged( TQWidget *w ) { TQWidget *old = formWindow(); - if ( ::tqqt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { FormWindow *fw = (FormWindow*)w; FormWindow *ofw = lastActiveFormWindow; lastActiveFormWindow = fw; @@ -1385,13 +1380,13 @@ void MainWindow::activeWindowChanged( TQWidget *w ) } workspace()->activeFormChanged( fw ); setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), - ::tqqt_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()) && ::tqqt_cast<TQMainWindow*>(mc) ) + if ( ofw && (mc = ofw->mainContainer()) && ::tqt_cast<TQMainWindow*>(mc) ) actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() ); actionEditor->parentWidget()->hide(); } @@ -1426,7 +1421,7 @@ void MainWindow::activeWindowChanged( TQWidget *w ) selectionChanged(); - if ( ::tqqt_cast<SourceEditor*>(w) ) { + if ( ::tqt_cast<SourceEditor*>(w) ) { SourceEditor *se = (SourceEditor*)w; TQGuardedPtr<FormWindow> fw = se->formWindow(); if ( se->formWindow() && @@ -1479,7 +1474,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, const TQString &undoCmd, const TQString &redoCmd ) { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; // do not set a formWindow related command actionEditUndo->setEnabled( undoAvailable ); actionEditRedo->setEnabled( redoAvailable ); @@ -1504,7 +1499,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, void MainWindow::updateEditorUndoRedo() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow(); actionEditUndo->setEnabled( editor->editIsUndoAvailable() ); @@ -1555,18 +1550,18 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int> &props, TQWidget *w ) { const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - if ( text && qstrcmp( text->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + if ( text && qstrcmp( text->type(), "TQString") != 0 ) text = 0; const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); - if ( title && qstrcmp( title->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + if ( title && qstrcmp( title->type(), "TQString") != 0 ) title = 0; const TQMetaProperty* pagetitle = w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); - if ( pagetitle && qstrcmp( pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + if ( pagetitle && qstrcmp( pagetitle->type(), "TQString") != 0 ) pagetitle = 0; const TQMetaProperty* pixmap = w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE ); - if ( pixmap && qstrcmp( pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0 ) + if ( pixmap && qstrcmp( pixmap->type(), "TQPixmap") != 0 ) pixmap = 0; if ( text && text->designable(w) || @@ -1580,7 +1575,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int ids << ( id = rmbWidgets->insertItem( i18n("Choose Pixmap..."), -1, 0) ); props.insert( "pixmap", id ); } - if ( text && text->designable(w) && !::tqqt_cast<TQTextEdit*>(w) ) { + if ( text && text->designable(w) && !::tqt_cast<TQTextEdit*>(w) ) { ids << ( id = rmbWidgets->insertItem( i18n("Edit Text..."), -1, 0) ); props.insert( "text", id ); } @@ -1599,7 +1594,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w ) { WidgetInterface *iface = 0; - widgetManager()->queryInterface( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), &iface ); + widgetManager()->queryInterface( WidgetFactory::classNameOf( w ), &iface ); if ( !iface ) return 0; TQWidgetContainerInterfacePrivate *iface2 = 0; @@ -1616,7 +1611,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, { int id; - if ( ::tqqt_cast<TQTabWidget*>(w) ) { + if ( ::tqt_cast<TQTabWidget*>(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); if ( ( (QDesignerTabWidget*)w )->count() > 1) { @@ -1625,7 +1620,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, } ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); commands.insert( "add", id ); - } else if ( ::tqqt_cast<QDesignerWidgetStack*>(w) ) { + } else if ( ::tqt_cast<QDesignerWidgetStack*>(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); if ( ( (QDesignerWidgetStack*)w )->count() > 1) { @@ -1639,7 +1634,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, } ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); commands.insert( "add", id ); - } else if ( ::tqqt_cast<TQToolBox*>(w) ) { + } else if ( ::tqt_cast<TQToolBox*>(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); if ( ( (TQToolBox*)w )->count() > 1 ) { @@ -1651,19 +1646,19 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, #ifdef TQT_CONTAINER_CUSTOM_WIDGETS } else if ( WidgetDatabase:: isCustomPluginWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) { TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); - if ( iface && iface->supportsPages( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) { + if ( iface && iface->supportsPages( WidgetFactory::classNameOf( w ) ) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); - if ( iface->count( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) > 1 ) { + if ( iface->count( WidgetFactory::classNameOf( w ), w ) > 1 ) { ids << ( id = rmbWidgets->insertItem( i18n( "Delete Page" ), -1, 0 ) ); commands.insert( "remove", id ); } ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); commands.insert( "add", id ); - if ( iface->currentIndex( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) != -1 ) { + if ( iface->currentIndex( WidgetFactory::classNameOf( w ), w ) != -1 ) { ids << ( id = rmbWidgets->insertItem( i18n("Rename Current Page..."), -1, 0 ) ); commands.insert( "rename", id ); } @@ -1674,7 +1669,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, } if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); ids << ( id = rmbWidgets->insertItem( i18n("Edit..."), -1, 0 ) ); @@ -1687,7 +1682,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, { int id; - if ( ::tqqt_cast<TQWizard*>(fw->mainContainer()) ) { + if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) { if ( ids.isEmpty() ) ids << rmbFormWindow->insertSeparator( 0 ); @@ -1705,7 +1700,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, ids << ( id = rmbFormWindow->insertItem( i18n("Edit Pages..."), -1, 0 ) ); commands.insert( "edit", id ); - } else if ( ::tqqt_cast<TQMainWindow*>(fw->mainContainer()) ) { + } else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) { if ( ids.isEmpty() ) ids << rmbFormWindow->insertSeparator( 0 ); ids << ( id = rmbFormWindow->insertItem( i18n( "Add Menu Item" ), -1, 0 ) ); @@ -1720,7 +1715,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid if ( id == props[ "text" ] ) { bool ok = FALSE; bool oldDoWrap = FALSE; - if ( ::tqqt_cast<TQLabel*>(w) ) { + if ( ::tqt_cast<TQLabel*>(w) ) { int align = w->property( "alignment" ).toInt(); if ( align & WordBreak ) oldDoWrap = TRUE; @@ -1728,8 +1723,8 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid bool doWrap = oldDoWrap; TQString text; - if ( ::tqqt_cast<TQTextView*>(w) || ::tqqt_cast<TQLabel*>(w) || ::tqqt_cast<TQButton*>(w) ) { - text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqqt_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( i18n("Text"), i18n( "New text" ), @@ -1738,21 +1733,21 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid if ( ok ) { if ( oldDoWrap != doWrap ) { TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "wordwrap", TQVariant( oldDoWrap ), TQVariant( doWrap ), TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); + MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); } TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "text", w->property( "text" ), text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); + MetaDataBase::setPropertyChanged( w, "text", TRUE ); } } else if ( id == props[ "title" ] ) { bool ok = FALSE; @@ -1760,12 +1755,12 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid TQLineEdit::Normal, w->property("title").toString(), &ok, this ); if ( ok ) { TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "title", w->property( "title" ), title, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); + MetaDataBase::setPropertyChanged( w, "title", TRUE ); } } else if ( id == props[ "pagetitle" ] ) { bool ok = FALSE; @@ -1773,32 +1768,32 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this ); if ( ok ) { TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "pageTitle", w->property( "pageTitle" ), text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pageTitle", TRUE ); + MetaDataBase::setPropertyChanged( w, "pageTitle", TRUE ); } } else if ( id == props[ "pixmap" ] ) { TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap(); TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix ); if ( !pix.isNull() ) { TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "pixmap", w->property( "pixmap" ), pix, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pixmap", TRUE ); + MetaDataBase::setPropertyChanged( w, "pixmap", TRUE ); } } } void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w ) { - if ( ::tqqt_cast<TQTabWidget*>(w) ) { + if ( ::tqt_cast<TQTabWidget*>(w) ) { TQTabWidget *tw = (TQTabWidget*)w; if ( id == commands[ "add" ] ) { AddTabPageCommand *cmd = @@ -1817,7 +1812,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command cmd->execute(); } } - } else if ( ::tqqt_cast<TQToolBox*>(w) ) { + } else if ( ::tqt_cast<TQToolBox*>(w) ) { TQToolBox *tb = (TQToolBox*)w; if ( id == commands[ "add" ] ) { AddToolBoxPageCommand *cmd = @@ -1837,7 +1832,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command cmd->execute(); } } - } else if ( ::tqqt_cast<TQWidgetStack*>(w) ) { + } else if ( ::tqt_cast<TQWidgetStack*>(w) ) { QDesignerWidgetStack *ws = (QDesignerWidgetStack*)w; if ( id == commands[ "add" ] ) { AddWidgetStackPageCommand *cmd = @@ -1858,27 +1853,27 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command int currentPage = w->property( "currentPage" ).toInt(); TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) ); SetPropertyCommand *cmd = - new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "currentPage", currentPage, currentPage + 1, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( w, "currentPage", TRUE ); } else if ( id == commands[ "prevpage" ] ) { int currentPage = w->property( "currentPage" ).toInt(); TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) ); SetPropertyCommand *cmd = - new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "currentPage", currentPage, currentPage -1, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( w, "currentPage", TRUE ); } #ifdef TQT_CONTAINER_CUSTOM_WIDGETS } else if ( WidgetDatabase:: isCustomPluginWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) { if ( id == commands[ "add" ] ) { AddContainerPageCommand *cmd = new AddContainerPageCommand( i18n( "Add Page to %1" ).arg( w->name() ), @@ -1888,7 +1883,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command } else if ( id == commands[ "remove" ] ) { TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); if ( iface ) { - TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + TQString wClassName = WidgetFactory::classNameOf( w ); int index = iface->currentIndex( wClassName, w ); DeleteContainerPageCommand *cmd = new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ). @@ -1904,7 +1899,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); if ( iface ) { bool ok = FALSE; - TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + TQString wClassName = WidgetFactory::classNameOf( w ); int index = iface->currentIndex( wClassName, w ); TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), TQLineEdit::Normal, @@ -1929,16 +1924,16 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command } if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) { if ( id == commands[ "edit" ] ) WidgetFactory::editWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), this, w, formWindow() ); + idFromClassName( WidgetFactory::classNameOf( w ) ), this, w, formWindow() ); } } void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, FormWindow *fw ) { - if ( ::tqqt_cast<TQWizard*>(fw->mainContainer()) ) { + if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) { TQWizard *wiz = (TQWizard*)fw->mainContainer(); if ( id == commands[ "add" ] ) { AddWizardPageCommand *cmd = @@ -1976,7 +1971,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command cmd->execute(); } } - } else if ( ::tqqt_cast<TQMainWindow*>(fw->mainContainer()) ) { + } else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) { TQMainWindow *mw = (TQMainWindow*)fw->mainContainer(); if ( id == commands[ "add_toolbar" ] ) { AddToolBarCommand *cmd = @@ -2057,7 +2052,7 @@ void MainWindow::selectionChanged() breakLayout = laidout > 0; } else if ( selectedWidgets == 1 ) { TQWidget *w = widgets.first(); - bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) || + bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) || w == formWindow()->mainContainer(); actionEditAdjustSize->setEnabled( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ); @@ -2067,7 +2062,7 @@ void MainWindow::selectionChanged() actionEditVLayout->setEnabled( FALSE ); actionEditGridLayout->setEnabled( FALSE ); if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); breakLayout = TRUE; } else { actionEditBreakLayout->setEnabled( FALSE ); @@ -2087,14 +2082,14 @@ void MainWindow::selectionChanged() layoutChilds = TRUE; } if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); breakLayout = TRUE; } } else { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); breakLayout = TRUE; } } @@ -2489,7 +2484,7 @@ void MainWindow::closeEvent( TQCloseEvent *e ) while ( wit.current() ) { TQWidget *w = wit.current(); ++wit; - if ( ::tqqt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->formFile()->editor() ) windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); if ( ( (FormWindow*)w )->formFile()->formWindow() ) @@ -2498,7 +2493,7 @@ void MainWindow::closeEvent( TQCloseEvent *e ) e->ignore(); return; } - } else if ( ::tqqt_cast<SourceEditor*>(w) ) { + } else if ( ::tqt_cast<SourceEditor*>(w) ) { if ( !( (SourceEditor*)w )->close() ) { e->ignore(); return; @@ -2562,15 +2557,15 @@ ActionEditor *MainWindow::actioneditor() const bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) { - if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) { - TQString defSignal = WidgetFactory::defaultSignal( TQT_TQOBJECT(w) ); + if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( w ) ) { + TQString defSignal = WidgetFactory::defaultSignal( w ); if ( defSignal.isEmpty() ) { editSource(); } else { TQString s = TQString( w->name() ) + "_" + defSignal; LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() ); if ( iface ) { - TQStrList sigs = iface->signalNames( TQT_TQOBJECT(w) ); + TQStrList sigs = iface->signalNames( w ); TQString fullSignal; for ( int i = 0; i < (int)sigs.count(); ++i ) { TQString sig = sigs.at( i ); @@ -2586,14 +2581,14 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) fullSignal.remove( (int)fullSignal.length() - 1, 1 ); fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() ); s += "(" + fullSignal + ")"; - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(f), s.latin1() ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(f), s.latin1(), "", "public", "slot", + if ( !MetaDataBase::hasFunction( f, s.latin1() ) ) + MetaDataBase::addFunction( f, s.latin1(), "", "public", "slot", f->project()->language(), "void" ); s = s.left( s.find( '(' ) ).latin1(); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(f), TQT_TQOBJECT(w), defSignal.latin1(), TQT_TQOBJECT(f->mainContainer()), s.latin1() ) ) { + if ( !MetaDataBase::hasConnection( f, w, defSignal.latin1(), f->mainContainer(), s.latin1() ) ) { MetaDataBase::Connection conn; - conn.sender = TQT_TQOBJECT(w); - conn.receiver = TQT_TQOBJECT(f->mainContainer()); + conn.sender = w; + conn.receiver = f->mainContainer(); conn.signal = signl; conn.slot = s; AddConnectionCommand *cmd = @@ -2609,9 +2604,9 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) return TRUE; } if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) { statusMessage( i18n( "Edit %1..." ).arg( w->className() ) ); - WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), + WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ), this, w, formWindow() ); statusBar()->clear(); return TRUE; @@ -2622,7 +2617,7 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) if ( text && text->designable(w) ) { bool ok = FALSE; bool oldDoWrap = FALSE; - if ( ::tqqt_cast<TQLabel*>(w) ) { + if ( ::tqt_cast<TQLabel*>(w) ) { int align = w->property( "alignment" ).toInt(); if ( align & WordBreak ) oldDoWrap = TRUE; @@ -2630,9 +2625,9 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) bool doWrap = oldDoWrap; TQString text; - if ( ::tqqt_cast<TQTextEdit*>(w) || ::tqqt_cast<TQLabel*>(w) || ::tqqt_cast<TQButton*>(w) ) { + if ( ::tqt_cast<TQTextEdit*>(w) || ::tqt_cast<TQLabel*>(w) || ::tqt_cast<TQButton*>(w) ) { text = MultiLineEditor::getText( this, w->property( "text" ).toString(), - !::tqqt_cast<TQButton*>(w), &doWrap ); + !::tqt_cast<TQButton*>(w), &doWrap ); ok = !text.isNull(); } else { text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), @@ -2641,21 +2636,21 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) if ( ok ) { if ( oldDoWrap != doWrap ) { TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "wordwrap", TQVariant( oldDoWrap ), TQVariant( doWrap ), TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); + MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); } TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "text", w->property( "text" ), text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); + MetaDataBase::setPropertyChanged( w, "text", TRUE ); } return TRUE; } @@ -2665,17 +2660,17 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) text = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); if ( ok ) { TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, "title", w->property( "title" ), text, TQString(), TQString() ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); + MetaDataBase::setPropertyChanged( w, "title", TRUE ); } return TRUE; } - if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) + if ( !WidgetFactory::isPassiveInteractor( w ) ) editSource(); return TRUE; @@ -2746,7 +2741,7 @@ bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) { TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::tqqt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) ) return TRUE; } @@ -2761,7 +2756,7 @@ void MainWindow::setGrid( const TQPoint &p ) grd = p; TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast<FormWindow*>(w) ) + if ( !::tqt_cast<FormWindow*>(w) ) continue; ( (FormWindow*)w )->mainContainer()->update(); } @@ -2774,7 +2769,7 @@ void MainWindow::setShowGrid( bool b ) sGrid = b; TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast<FormWindow*>(w) ) + if ( !::tqt_cast<FormWindow*>(w) ) continue; ( (FormWindow*)w )->mainContainer()->update(); } @@ -2860,48 +2855,48 @@ void MainWindow::showDialogHelp() TQString link = documentationPath() + "/designer-manual-13.html#"; - if ( ::tqqt_cast<NewFormBase*>(w) || ::tqqt_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 ( ::tqqt_cast<CreateTemplate*>(w) ) + else if ( ::tqt_cast<CreateTemplate*>(w) ) link += "dialog-file-create-template"; - else if ( ::tqqt_cast<EditFunctionsBase*>(w) ) + else if ( ::tqt_cast<EditFunctionsBase*>(w) ) link += "dialog-edit-functions"; -// else if ( ::tqqt_cast<ConnectionViewerBase*>(w) ) +// else if ( ::tqt_cast<ConnectionViewerBase*>(w) ) else if ( w->inherits("ConnectionViewerBase") ) link += "dialog-view-connections"; - else if ( ::tqqt_cast<FormSettingsBase*>(w) ) + else if ( ::tqt_cast<FormSettingsBase*>(w) ) link += "dialog-edit-form-settings"; - else if ( ::tqqt_cast<Preferences*>(w) ) + else if ( ::tqt_cast<Preferences*>(w) ) link += "dialog-edit-preferences"; - else if ( ::tqqt_cast<PixmapCollectionEditor*>(w) ) + else if ( ::tqt_cast<PixmapCollectionEditor*>(w) ) link += "dialog-image-collection"; -// else if ( ::tqqt_cast<DatabaseConnectionBase*>(w) ) +// else if ( ::tqt_cast<DatabaseConnectionBase*>(w) ) else if ( w->inherits( "DatabaseConnectionBase" ) ) link += "dialog-edit-database-connections"; - else if ( ::tqqt_cast<ProjectSettingsBase*>(w) ) + else if ( ::tqt_cast<ProjectSettingsBase*>(w) ) link += "dialog-project-settings"; - else if ( ::tqqt_cast<FindDialog*>(w) ) + else if ( ::tqt_cast<FindDialog*>(w) ) link += "dialog-find-text"; - else if ( ::tqqt_cast<ReplaceDialog*>(w) ) + else if ( ::tqt_cast<ReplaceDialog*>(w) ) link += "dialog-replace-text"; - else if ( ::tqqt_cast<GotoLineDialog*>(w) ) + else if ( ::tqt_cast<GotoLineDialog*>(w) ) link += "dialog-go-to-line"; -// else if ( ::tqqt_cast<ConnectionEditorBase*>(w) ) +// else if ( ::tqt_cast<ConnectionEditorBase*>(w) ) else if ( w->inherits("ConnectionEditorBase") ) link += "dialog-edit-connections"; - else if ( ::tqqt_cast<CustomWidgetEditorBase*>(w) ) + else if ( ::tqt_cast<CustomWidgetEditorBase*>(w) ) link += "dialog-edit-custom-widgets"; - else if ( ::tqqt_cast<PaletteEditorBase*>(w) ) + else if ( ::tqt_cast<PaletteEditorBase*>(w) ) link += "dialog-edit-palette"; - else if ( ::tqqt_cast<ListBoxEditorBase*>(w) ) + else if ( ::tqt_cast<ListBoxEditorBase*>(w) ) link += "dialog-edit-listbox"; - else if ( ::tqqt_cast<ListViewEditorBase*>(w) ) + else if ( ::tqt_cast<ListViewEditorBase*>(w) ) link += "dialog-edit-listview"; - else if ( ::tqqt_cast<IconViewEditorBase*>(w) ) + else if ( ::tqt_cast<IconViewEditorBase*>(w) ) link += "dialog-edit-iconview"; - else if ( ::tqqt_cast<TableEditorBase*>(w) ) + else if ( ::tqt_cast<TableEditorBase*>(w) ) link += "dialog-edit-table"; - else if ( ::tqqt_cast<MultiLineEditor*>(w) ) + else if ( ::tqt_cast<MultiLineEditor*>(w) ) link += "dialog-text"; else { @@ -2925,7 +2920,7 @@ void MainWindow::setupActionManager() continue; iface->connectTo( desInterface ); - TQAction *a = iface->create( *ait, TQT_TQOBJECT(this) ); + TQAction *a = iface->create( *ait, this ); if ( !a ) continue; @@ -2935,11 +2930,11 @@ void MainWindow::setupActionManager() TQPopupMenu *menu = 0; TQToolBar *tb = 0; - if ( !( menu = (TQPopupMenu*)child( grp.latin1(), TQPOPUPMENU_OBJECT_NAME_STRING ) ) ) { + if ( !( menu = (TQPopupMenu*)child( grp.latin1(), "TQPopupMenu" ) ) ) { menu = new TQPopupMenu( this, grp.latin1() ); menuBar()->insertItem( i18n( grp ), menu ); } - if ( !( tb = (TQToolBar*)child( grp.latin1(), TQTOOLBAR_OBJECT_NAME_STRING ) ) ) { + if ( !( tb = (TQToolBar*)child( grp.latin1(), "TQToolBar" ) ) ) { tb = new TQToolBar( this, grp.latin1() ); tb->setCloseMode( TQDockWindow::Undocked ); addToolBar( tb, grp ); @@ -2979,7 +2974,7 @@ void MainWindow::editFunction( const TQString &func, bool rereadSource ) } } - createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang, func, rereadSource ); + createSourceEditor( formWindow(), formWindow()->project(), lang, func, rereadSource ); } void MainWindow::setupRecentlyFilesMenu() @@ -3189,10 +3184,10 @@ void MainWindow::setModified( bool b, TQWidget *window ) { TQWidget *w = window; while ( w ) { - if ( ::tqqt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { ( (FormWindow*)w )->modificationChanged( b ); return; - } else if ( ::tqqt_cast<SourceEditor*>(w) ) { + } else if ( ::tqt_cast<SourceEditor*>(w) ) { FormWindow *fw = ( (SourceEditor*)w )->formWindow(); if ( fw && !fw->isFake() ) { //fw->commandHistory()->setModified( b ); @@ -3227,7 +3222,7 @@ void MainWindow::doFunctionsChanged() void MainWindow::updateFunctionList() { - if ( !qWorkspace()->activeWindow() || !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow(); se->save(); @@ -3238,7 +3233,7 @@ void MainWindow::updateFunctionList() return; TQValueList<LanguageInterface::Connection> conns; iface->connections( se->text(), &conns ); - MetaDataBase::setupConnections( TQT_TQOBJECT(se->formWindow()), conns ); + MetaDataBase::setupConnections( se->formWindow(), conns ); propertyEditor->eventList()->setup(); } } @@ -3298,11 +3293,11 @@ void MainWindow::finishedRun() void MainWindow::enableAll( bool enable ) { menuBar()->setEnabled( enable ); - TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING ); + TQObjectList *l = queryList( "TQDockWindow" ); for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( TQT_BASE_OBJECT(o) == wspace->parentWidget() || - TQT_BASE_OBJECT(o) == oWindow->parentWidget() || - TQT_BASE_OBJECT(o) == hierarchyView->parentWidget() ) + if ( o == wspace->parentWidget() || + o == oWindow->parentWidget() || + o == hierarchyView->parentWidget() ) continue; ( (TQWidget*)o )->setEnabled( enable ); } @@ -3316,9 +3311,9 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) FormWindow *fw = 0; SourceEditor *se = 0; SourceFile *sf = 0; - if ( ::tqqt_cast<FormWindow*>(w) ) { + if ( ::tqt_cast<FormWindow*>(w) ) { fw = (FormWindow*)w; - } else if ( ::tqqt_cast<SourceEditor*>(w) ) { + } else if ( ::tqt_cast<SourceEditor*>(w) ) { se = (SourceEditor*)w; if ( !se->object() ) continue; @@ -3386,7 +3381,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) } } - if ( ::tqqt_cast<SourceFile*>(o) ) { + if ( ::tqt_cast<SourceFile*>(o) ) { for ( TQPtrListIterator<SourceFile> sources = currentProject->sourceFiles(); sources.current(); ++sources ) { SourceFile* f = sources.current(); @@ -3448,12 +3443,12 @@ TQObject *MainWindow::findRealObject( TQObject *o ) { TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::tqqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) ) - return TQT_TQOBJECT(w); - else if ( ::tqqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() && + if ( ::tqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) ) + return w; + else if ( ::tqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() && TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) ) - return TQT_TQOBJECT(w); - else if ( ::tqqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() && + return w; + else if ( ::tqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() && ( (SourceEditor*)w )->sourceFile() == o ) return o; } @@ -3463,7 +3458,7 @@ TQObject *MainWindow::findRealObject( TQObject *o ) void MainWindow::formNameChanged( FormWindow *fw ) { for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(fw) ) + if ( e->object() == fw ) e->refresh( TRUE ); if ( e->project() == fw->project() ) e->resetContext(); @@ -3474,7 +3469,7 @@ void MainWindow::breakPointsChanged() { if ( !inDebugMode ) return; - if ( !qWorkspace()->activeWindow() || !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow(); if ( !e->object() || !e->project() ) @@ -3567,11 +3562,11 @@ bool MainWindow::openProjectSettings( Project *pro ) continue; dia.tabWidget->addTab( t.w, t.title ); if ( t.receiver ) { - connect( dia.buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); - connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); - connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + connect( dia.buttonOk, TQ_SIGNAL( clicked() ), senderObject, TQ_SLOT( emitAcceptSignal() ) ); + connect( senderObject, TQ_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); + connect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); senderObject->emitInitSignal(); - disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + disconnect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); } } @@ -3641,13 +3636,13 @@ void MainWindow::setSingleProject( Project *pro ) while ( wit.current() ) { TQWidget *w = wit.current(); ++wit; - if ( ::tqqt_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 ( ::tqqt_cast<SourceEditor*>(w) ) { + } else if ( ::tqt_cast<SourceEditor*>(w) ) { ( (SourceEditor*)w )->close(); } } @@ -3696,11 +3691,11 @@ void MainWindow::showGUIStuff( bool b ) menubar->removeItem( toolsMenuId ); menubar->removeItem( toolsMenuId + 1 ); menubar->removeItem( toolsMenuId + 2 ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); + disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) ); + disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) ); + disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) ); + disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) ); + disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) ); actionEditFormSettings->setEnabled( FALSE ); actionEditSource->setEnabled( FALSE ); actionEditConnections->setEnabled( FALSE ); @@ -3733,11 +3728,11 @@ void MainWindow::showGUIStuff( bool b ) menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex ); menubar->insertItem( i18n( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); menubar->insertItem( i18n( "&Preview" ), previewMenu, toolsMenuId + 2, toolsMenuIndex + 2 ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) ); actionEditFormSettings->setEnabled( TRUE ); actionEditSource->setEnabled( TRUE ); actionEditConnections->setEnabled( TRUE ); diff --git a/kdevdesigner/designer/mainwindow.h b/kdevdesigner/designer/mainwindow.h index 1b68c14d..605aa578 100644 --- a/kdevdesigner/designer/mainwindow.h +++ b/kdevdesigner/designer/mainwindow.h @@ -79,7 +79,7 @@ class KDevDesignerPart; class MainWindow : public TQMainWindow { - Q_OBJECT + TQ_OBJECT public: @@ -408,9 +408,6 @@ private: TQAction* actionCurrentTool; DesignerAction *actionHelpContents, *actionHelpAbout, *actionHelpAboutTQt, *actionHelpWhatsThis; DesignerAction *actionHelpManual; -#if defined(TQT_NON_COMMERCIAL) - DesignerAction *actionHelpRegister; -#endif DesignerAction *actionToolsCustomWidget, *actionEditPreferences; DesignerAction *actionWindowTile, *actionWindowCascade, *actionWindowClose, *actionWindowCloseAll; DesignerAction *actionWindowNext, *actionWindowPrevious; @@ -490,7 +487,7 @@ friend class KDevDesignerPart; class SenderObject : public TQObject { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp index 7917de8b..86837088 100644 --- a/kdevdesigner/designer/mainwindowactions.cpp +++ b/kdevdesigner/designer/mainwindowactions.cpp @@ -124,104 +124,104 @@ static TQIconSet createIconSet( const TQString &name ) void MainWindow::setupEditActions() { - actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, TQT_TQOBJECT(this), 0 ); + actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, this, 0 ); actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) ); actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) ); - connect( actionEditUndo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editUndo() ) ); + connect( actionEditUndo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editUndo() ) ); actionEditUndo->setEnabled( FALSE ); - actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, TQT_TQOBJECT(this), 0 ); + actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, this, 0 ); actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") ); actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) ); - connect( actionEditRedo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRedo() ) ); + connect( actionEditRedo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRedo() ) ); actionEditRedo->setEnabled( FALSE ); - actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, TQT_TQOBJECT(this), 0 ); + actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, this, 0 ); actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) ); actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) ); - connect( actionEditCut, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCut() ) ); + connect( actionEditCut, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCut() ) ); actionEditCut->setEnabled( FALSE ); - actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, TQT_TQOBJECT(this), 0 ); + actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, this, 0 ); actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) ); actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) ); - connect( actionEditCopy, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCopy() ) ); + connect( actionEditCopy, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCopy() ) ); actionEditCopy->setEnabled( FALSE ); - actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, TQT_TQOBJECT(this), 0 ); + actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, this, 0 ); actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) ); actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) ); - connect( actionEditPaste, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPaste() ) ); + connect( actionEditPaste, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPaste() ) ); actionEditPaste->setEnabled( FALSE ); - actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, TQT_TQOBJECT(this), 0 ); + actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, this, 0 ); actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) ); actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) ); - connect( actionEditDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); + connect( actionEditDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) ); actionEditDelete->setEnabled( FALSE ); #ifdef TQ_WS_MAC - TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, TQT_TQOBJECT(this), 0 ); - connect( macDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); + TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 ); + connect( macDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) ); #endif - actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, TQT_TQOBJECT(this), 0 ); + actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, this, 0 ); actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) ); actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) ); - connect( actionEditSelectAll, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ) ); + connect( actionEditSelectAll, TQ_SIGNAL( activated() ), this, TQ_SLOT( editSelectAll() ) ); actionEditSelectAll->setEnabled( TRUE ); - actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, this, 0 ); actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) ); actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) ); - connect( actionEditRaise, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRaise() ) ); + connect( actionEditRaise, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRaise() ) ); actionEditRaise->setEnabled( FALSE ); - actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, this, 0 ); actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) ); actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) ); - connect( actionEditLower, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLower() ) ); + connect( actionEditLower, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLower() ) ); actionEditLower->setEnabled( FALSE ); actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(), - i18n( "Chec&k Accelerators" ), ALT + Key_R, TQT_TQOBJECT(this), 0 ); + i18n( "Chec&k Accelerators" ), ALT + Key_R, this, 0 ); actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") ); actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) ); - connect( actionEditAccels, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAccels() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditAccels, TQ_SIGNAL( activated() ), this, TQ_SLOT( editAccels() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) ); actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"), - i18n( "S&lots..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "S&lots..." ), 0, this, 0 ); actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") ); actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) ); - connect( actionEditFunctions, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFunctions() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditFunctions, TQ_SIGNAL( activated() ), this, TQ_SLOT( editFunctions() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) ); actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"), - i18n( "Co&nnections..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Co&nnections..." ), 0, this, 0 ); actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") ); actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) ); - connect( actionEditConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editConnections() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditConnections, TQ_SIGNAL( activated() ), this, TQ_SLOT( editConnections() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) ); actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(), - i18n( "&Source..." ), CTRL + Key_E, TQT_TQOBJECT(this), 0 ); + i18n( "&Source..." ), CTRL + Key_E, this, 0 ); actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") ); actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) ); - connect( actionEditSource, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSource() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditSource, TQ_SIGNAL( activated() ), this, TQ_SLOT( editSource() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) ); actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(), - i18n( "&Form Settings..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Form Settings..." ), 0, this, 0 ); actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") ); actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) ); - connect( actionEditFormSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFormSettings() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditFormSettings, TQ_SIGNAL( activated() ), this, TQ_SLOT( editFormSettings() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) ); actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(), - i18n( "Preferences..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Preferences..." ), 0, this, 0 ); actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") ); actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) ); - connect( actionEditPreferences, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPreferences() ) ); + connect( actionEditPreferences, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPreferences() ) ); /* TQToolBar *tb = new TQToolBar( this, "Edit" ); tb->setCloseMode( TQDockWindow::Undocked ); @@ -240,7 +240,7 @@ void MainWindow::setupEditActions() #endif TQPopupMenu *menu = new TQPopupMenu( this, "Edit" ); - connect( menu, TQT_SIGNAL( aboutToShow() ), TQT_TQOBJECT(this), TQT_SLOT( updateEditorUndoRedo() ) ); + connect( menu, TQ_SIGNAL( aboutToShow() ), this, TQ_SLOT( updateEditorUndoRedo() ) ); menubar->insertItem( i18n( "&Edit" ), menu ); actionEditUndo->addTo( menu ); actionEditRedo->addTo( menu ); @@ -269,26 +269,26 @@ void MainWindow::setupEditActions() void MainWindow::setupSearchActions() { actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ), - i18n( "&Find..." ), CTRL + Key_F, TQT_TQOBJECT(this), 0 ); - connect( actionSearchFind, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchFind() ) ); + i18n( "&Find..." ), CTRL + Key_F, this, 0 ); + connect( actionSearchFind, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchFind() ) ); actionSearchFind->setEnabled( FALSE ); actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) ); actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(), - i18n( "Find &Incremental" ), ALT + Key_I, TQT_TQOBJECT(this), 0 ); - connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchIncremetalFindMenu() ) ); + i18n( "Find &Incremental" ), ALT + Key_I, this, 0 ); + connect( actionSearchIncremetal, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchIncremetalFindMenu() ) ); actionSearchIncremetal->setEnabled( FALSE ); actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) ); actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(), - i18n( "&Replace..." ), CTRL + Key_R, TQT_TQOBJECT(this), 0 ); - connect( actionSearchReplace, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchReplace() ) ); + i18n( "&Replace..." ), CTRL + Key_R, this, 0 ); + connect( actionSearchReplace, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchReplace() ) ); actionSearchReplace->setEnabled( FALSE ); actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) ); actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(), - i18n( "&Goto Line..." ), ALT + Key_G, TQT_TQOBJECT(this), 0 ); - connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchGotoLine() ) ); + i18n( "&Goto Line..." ), ALT + Key_G, this, 0 ); + connect( actionSearchGotoLine, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchGotoLine() ) ); actionSearchGotoLine->setEnabled( FALSE ); actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) ); @@ -300,10 +300,10 @@ void MainWindow::setupSearchActions() incrementalSearch = new TQLineEdit( 0 ); incrementalSearch->hide(); TQToolTip::add( incrementalSearch, i18n( "Incremental search (Alt+I)" ) ); - connect( incrementalSearch, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( searchIncremetalFind() ) ); - connect( incrementalSearch, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( searchIncremetalFindNext() ) ); + connect( incrementalSearch, TQ_SIGNAL( textChanged( const TQString & ) ), + this, TQ_SLOT( searchIncremetalFind() ) ); + connect( incrementalSearch, TQ_SIGNAL( returnPressed() ), + this, TQ_SLOT( searchIncremetalFindNext() ) ); incrementalSearch->setEnabled( FALSE ); TQPopupMenu *menu = new TQPopupMenu( this, "Search" ); @@ -320,56 +320,56 @@ void MainWindow::setupLayoutActions() if ( !actionGroupTools ) { actionGroupTools = new TQActionGroup( this ); actionGroupTools->setExclusive( TRUE ); - connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), TQT_TQOBJECT(this), TQT_SLOT( toolSelected(TQAction*) ) ); + connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ), this, TQ_SLOT( toolSelected(TQAction*) ) ); } actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"), - i18n( "Adjust &Size" ), CTRL + Key_J, TQT_TQOBJECT(this), 0 ); + i18n( "Adjust &Size" ), CTRL + Key_J, this, 0 ); actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") ); actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) ); - connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAdjustSize() ) ); + connect( actionEditAdjustSize, TQ_SIGNAL( activated() ), this, TQ_SLOT( editAdjustSize() ) ); actionEditAdjustSize->setEnabled( FALSE ); actionEditHLayout = new DesignerAction( i18n( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"), - i18n( "Lay Out &Horizontally" ), CTRL + Key_H, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out &Horizontally" ), CTRL + Key_H, this, 0 ); actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") ); actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally" ) ); - connect( actionEditHLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontal() ) ); + connect( actionEditHLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontal() ) ); actionEditHLayout->setEnabled( FALSE ); actionEditVLayout = new DesignerAction( i18n( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"), - i18n( "Lay Out &Vertically" ), CTRL + Key_L, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out &Vertically" ), CTRL + Key_L, this, 0 ); actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") ); actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically" ) ); - connect( actionEditVLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVertical() ) ); + connect( actionEditVLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVertical() ) ); actionEditVLayout->setEnabled( FALSE ); actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"), - i18n( "Lay Out in a &Grid" ), CTRL + Key_G, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out in a &Grid" ), CTRL + Key_G, this, 0 ); actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") ); actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) ); - connect( actionEditGridLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutGrid() ) ); + connect( actionEditGridLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutGrid() ) ); actionEditGridLayout->setEnabled( FALSE ); actionEditSplitHorizontal = new DesignerAction( i18n( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"), - i18n( "Lay Out Horizontally (in S&plitter)" ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out Horizontally (in S&plitter)" ), 0, this, 0 ); actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") ); actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally (in Splitter)" ) ); - connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontalSplit() ) ); + connect( actionEditSplitHorizontal, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontalSplit() ) ); actionEditSplitHorizontal->setEnabled( FALSE ); actionEditSplitVertical = new DesignerAction( i18n( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"), - i18n( "Lay Out Vertically (in Sp&litter)" ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out Vertically (in Sp&litter)" ), 0, this, 0 ); actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") ); actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically (in Splitter)" ) ); - connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVerticalSplit() ) ); + connect( actionEditSplitVertical, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVerticalSplit() ) ); actionEditSplitVertical->setEnabled( FALSE ); actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"), - i18n( "&Break Layout" ), CTRL + Key_B, TQT_TQOBJECT(this), 0 ); + i18n( "&Break Layout" ), CTRL + Key_B, this, 0 ); actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") ); actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) ); - connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editBreakLayout() ) ); + connect( actionEditBreakLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editBreakLayout() ) ); actionEditBreakLayout->setEnabled( FALSE ); int id = WidgetDatabase::idFromClassName( "Spacer" ); @@ -424,8 +424,8 @@ void MainWindow::setupToolActions() if ( !actionGroupTools ) { actionGroupTools = new TQActionGroup( this ); actionGroupTools->setExclusive( TRUE ); - connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), - this, TQT_SLOT( toolSelected(TQAction*) ) ); + connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ), + this, TQ_SLOT( toolSelected(TQAction*) ) ); } actionPointerTool = new DesignerAction( i18n("Pointer"), createIconSet("designer_pointer.png"), @@ -487,13 +487,13 @@ void MainWindow::setupToolActions() actionToolsCustomWidget = new DesignerAction( i18n("Custom Widgets"), createIconSet( "designer_customwidget.png" ), - i18n("Edit &Custom Widgets..."), 0, TQT_TQOBJECT(this), 0 ); + i18n("Edit &Custom Widgets..."), 0, this, 0 ); actionToolsCustomWidget->setStatusTip( i18n("Opens a dialog to add and change " "custom widgets") ); actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom" "Widgets" ) ); - connect( actionToolsCustomWidget, TQT_SIGNAL( activated() ), - this, TQT_SLOT( toolsCustomWidget() ) ); + connect( actionToolsCustomWidget, TQ_SIGNAL( activated() ), + this, TQ_SLOT( toolsCustomWidget() ) ); for ( int j = 0; j < WidgetDatabase::numWidgetGroups(); ++j ) { TQString grp = WidgetDatabase::widgetGroup( j ); @@ -520,7 +520,7 @@ void MainWindow::setupToolActions() TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, FALSE, grp.latin1() ); tb2->setFrameStyle( TQFrame::NoFrame ); - tb2->setOrientation( Qt::Vertical ); + tb2->setOrientation( TQt::Vertical ); tb2->setBackgroundMode( PaletteBase ); toolBox->addItem( tb2, grp ); @@ -596,16 +596,16 @@ void MainWindow::setupToolActions() TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0, toolBox, FALSE, "Custom Widgets" ); tb2->setBackgroundMode(PaletteBase); - tb2->setOrientation( Qt::Vertical ); + tb2->setOrientation( TQt::Vertical ); tb2->setFrameStyle( TQFrame::NoFrame ); toolBox->addItem( tb2, "Custom Widgets" ); customWidgetToolBar2 = tb2; } - TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, TQT_TQOBJECT(this) ); + TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, this ); a->setStatusTip( i18n( "Opens a dialog to configure the common " "widgets page of the toolbox") ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( toolsConfigure() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( toolsConfigure() ) ); mmenu->insertSeparator(); a->addTo( mmenu ); resetTool(); @@ -625,7 +625,7 @@ void MainWindow::setupFileActions() DesignerAction *a = 0; if ( !singleProject ) { - DesignerAction *a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + DesignerAction *a = new DesignerAction( this, 0 ); a->setText( i18n( "New" ) ); a->setToolTip( i18n( "New dialog or file" ) ); a->setMenuText( i18n( "&New..." ) ); @@ -633,7 +633,7 @@ void MainWindow::setupFileActions() a->setAccel( CTRL + Key_N ); a->setStatusTip( i18n( "Creates a new project, form or source file." ) ); a->setWhatsThis( whatsThisFrom( "File|New" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNew() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileNew() ) ); a->addTo( tb ); a->addTo( fileMenu ); actionNewFile = a; @@ -653,15 +653,15 @@ void MainWindow::setupFileActions() newForm->setIconSet( createIconSet("designer_form.png") ); newForm->setAccel( CTRL + Key_N ); newForm->setStatusTip( i18n( "Creates a new dialog." ) ); - connect( newForm, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewDialog() ) ); + connect( newForm, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileNewDialog() ) ); - DesignerAction *newFile = new DesignerAction( TQT_TQOBJECT(a), 0 ); + DesignerAction *newFile = new DesignerAction( a, 0 ); newFile->setText( i18n( "New File" ) ); newFile->setMenuText( i18n( "&File..." ) ); newFile->setIconSet( createIconSet("designer_filenew.png") ); newFile->setAccel( ALT + Key_N ); newFile->setStatusTip( i18n( "Creates a new file." ) ); - connect( newFile, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewFile() ) ); + connect( newFile, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileNewFile() ) ); actionNewFile = newFile; a->addTo( tb ); @@ -670,14 +670,14 @@ void MainWindow::setupFileActions() fileMenu->insertSeparator(); } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); a->setText( i18n( "Open" ) ); a->setMenuText( i18n( "&Open..." ) ); a->setIconSet( createIconSet("designer_fileopen.png") ); a->setAccel( CTRL + Key_O ); a->setStatusTip( i18n( "Opens an existing project, form or source file ") ); a->setWhatsThis( whatsThisFrom( "File|Open" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileOpen() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileOpen() ) ); if ( !singleProject ) { a->addTo( tb ); a->addTo( fileMenu ); @@ -685,20 +685,20 @@ void MainWindow::setupFileActions() } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileClose = a; a->setText( i18n( "Close" ) ); a->setMenuText( i18n( "&Close" ) ); a->setStatusTip( i18n( "Closes the current project or document" ) ); a->setWhatsThis(whatsThisFrom( "File|Close" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileClose() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileClose() ) ); + connect( this, TQ_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) { a->addTo( fileMenu ); fileMenu->insertSeparator(); } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileSave = a; a->setText( i18n( "Save" ) ); a->setMenuText( i18n( "&Save" ) ); @@ -706,41 +706,41 @@ void MainWindow::setupFileActions() a->setAccel( CTRL + Key_S ); a->setStatusTip( i18n( "Saves the current project or document" ) ); a->setWhatsThis(whatsThisFrom( "File|Save" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSave() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileSave() ) ); + connect( this, TQ_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); a->addTo( tb ); a->addTo( fileMenu ); - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileSaveAs = a; a->setText( i18n( "Save As" ) ); a->setMenuText( i18n( "Save &As..." ) ); a->setStatusTip( i18n( "Saves the current form with a new filename" ) ); a->setWhatsThis( whatsThisFrom( "File|Save As" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAs() ) ); - connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileSaveAs() ) ); + connect( this, TQ_SIGNAL( hasActiveWindow(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) a->addTo( fileMenu ); - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileSaveAll = a; a->setText( i18n( "Save All" ) ); a->setMenuText( i18n( "Sa&ve All" ) ); a->setStatusTip( i18n( "Saves all open documents" ) ); a->setWhatsThis( whatsThisFrom( "File|Save All" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAll() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileSaveAll() ) ); + connect( this, TQ_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) { a->addTo( fileMenu ); fileMenu->insertSeparator(); } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); a->setText( i18n( "Create Template" ) ); a->setMenuText( i18n( "Create &Template..." ) ); a->setStatusTip( i18n( "Creates a new template" ) ); a->setWhatsThis( whatsThisFrom( "File|Create Template" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileCreateTemplate() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileCreateTemplate() ) ); if ( !singleProject ) a->addTo( fileMenu ); @@ -755,19 +755,19 @@ void MainWindow::setupFileActions() fileMenu->insertItem( i18n( "Recently Opened Projects" ), recentlyProjectsMenu ); } - connect( recentlyFilesMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupRecentlyFilesMenu() ) ); - connect( recentlyProjectsMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupRecentlyProjectsMenu() ) ); - connect( recentlyFilesMenu, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( recentlyFilesMenuActivated( int ) ) ); - connect( recentlyProjectsMenu, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( recentlyProjectsMenuActivated( int ) ) ); + connect( recentlyFilesMenu, TQ_SIGNAL( aboutToShow() ), + this, TQ_SLOT( setupRecentlyFilesMenu() ) ); + connect( recentlyProjectsMenu, TQ_SIGNAL( aboutToShow() ), + this, TQ_SLOT( setupRecentlyProjectsMenu() ) ); + connect( recentlyFilesMenu, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( recentlyFilesMenuActivated( int ) ) ); + connect( recentlyProjectsMenu, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( recentlyProjectsMenuActivated( int ) ) ); if ( !singleProject ) fileMenu->insertSeparator(); - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileExit = a; if ( !singleProjectMode() ) { a->setText( i18n( "Exit" ) ); @@ -778,7 +778,7 @@ void MainWindow::setupFileActions() a->setText( i18n( "Close" ) ); a->setMenuText( i18n( "&Close" ) ); } - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileQuit() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileQuit() ) ); a->addTo( fileMenu ); } @@ -792,8 +792,8 @@ void MainWindow::setupProjectActions() ag->setMenuText( i18n( "Active Project" ) ); ag->setExclusive( TRUE ); ag->setUsesDropDown( TRUE ); - connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SLOT( projectSelected( TQAction * ) ) ); - connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SIGNAL( projectChanged() ) ); + connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SLOT( projectSelected( TQAction * ) ) ); + connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SIGNAL( projectChanged() ) ); DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, TRUE ); eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, TRUE ); projects.insert( a, eProject ); @@ -805,44 +805,44 @@ void MainWindow::setupProjectActions() if ( !singleProject ) projectMenu->insertSeparator(); - a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, this, 0 ); actionProjectAddFile = a; a->setStatusTip( i18n("Adds a file to the current project") ); a->setWhatsThis( whatsThisFrom( "Project|Add File" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( projectInsertFile() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( projectInsertFile() ) ); a->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) a->addTo( projectMenu ); actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(), - i18n( "&Image Collection..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Image Collection..." ), 0, this, 0 ); actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") ); actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) ); - connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPixmapCollection() ) ); + connect( actionEditPixmapCollection, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPixmapCollection() ) ); actionEditPixmapCollection->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQ_SLOT( setEnabled(bool) ) ); actionEditPixmapCollection->addTo( projectMenu ); #ifndef TQT_NO_SQL actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(), - i18n( "&Database Connections..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Database Connections..." ), 0, this, 0 ); actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") ); actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) ); - connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDatabaseConnections() ) ); + connect( actionEditDatabaseConnections, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDatabaseConnections() ) ); //actionEditDatabaseConnections->setEnabled( FALSE ); - //connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) ); + //connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) actionEditDatabaseConnections->addTo( projectMenu ); #endif actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(), - i18n( "&Project Settings..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Project Settings..." ), 0, this, 0 ); actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") ); actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) ); - connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editProjectSettings() ) ); + connect( actionEditProjectSettings, TQ_SIGNAL( activated() ), this, TQ_SLOT( editProjectSettings() ) ); actionEditProjectSettings->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQ_SLOT( setEnabled(bool) ) ); actionEditProjectSettings->addTo( projectMenu ); } @@ -854,19 +854,19 @@ void MainWindow::setupPreviewActions() layoutMenu = menu; menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 ); - a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, this, 0 ); actionPreview = a; a->setAccel( CTRL + Key_T ); a->setStatusTip( i18n("Opens a preview") ); a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( previewForm() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( previewForm() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); a->addTo( menu ); menu->insertSeparator(); - TQSignalMapper *mapper = new TQSignalMapper( TQT_TQOBJECT(this) ); - connect( mapper, TQT_SIGNAL(mapped(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(previewForm(const TQString&)) ); + TQSignalMapper *mapper = new TQSignalMapper( this ); + connect( mapper, TQ_SIGNAL(mapped(const TQString&)), this, TQ_SLOT(previewForm(const TQString&)) ); TQStringList styles = TQStyleFactory::keys(); for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { TQString info; @@ -884,14 +884,14 @@ void MainWindow::setupPreviewActions() info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." ); a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(), - i18n( "... in %1 Style" ).arg( *it ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "... in %1 Style" ).arg( *it ), 0, this, 0 ); a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) ); a->setWhatsThis( i18n("<b>Open a preview in %1 style.</b>" "<p>Use the preview to test the design and " "signal-slot connections of the current form. %2</p>").arg( *it ).arg( info ) ); mapper->setMapping( a, *it ); - connect( a, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map()) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL(activated()), mapper, TQ_SLOT(map()) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); a->addTo( menu ); } } @@ -902,41 +902,41 @@ void MainWindow::setupWindowActions() if ( !windowActionsSetup ) { windowActionsSetup = TRUE; */ - actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, TQT_TQOBJECT(this) ); + actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, this ); actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") ); actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) ); - connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) ); - actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, TQT_TQOBJECT(this) ); + connect( actionWindowTile, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( tile() ) ); + actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, this ); actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") ); actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) ); - connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) ); + connect( actionWindowCascade, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( cascade() ) ); - actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, TQT_TQOBJECT(this) ); + actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, this ); actionWindowClose->setStatusTip( i18n( "Closes the active window") ); actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) ); - connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) ); + connect( actionWindowClose, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( closeActiveWindow() ) ); - actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, TQT_TQOBJECT(this) ); + actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, this ); actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") ); actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) ); - connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) ); + connect( actionWindowCloseAll, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( closeAllWindows() ) ); - actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, TQT_TQOBJECT(this) ); + actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, this ); actionWindowNext->setStatusTip( i18n( "Activates the next window" ) ); actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) ); - connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) ); + connect( actionWindowNext, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( activateNextWindow() ) ); - actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(this) ); + actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, this ); actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) ); actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) ); - connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) ); + connect( actionWindowPrevious, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( activatePreviousWindow() ) ); // } if ( !windowMenu ) { windowMenu = new TQPopupMenu( this, "Window" ); menubar->insertItem( i18n( "&Window" ), windowMenu ); - connect( windowMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupWindowActions() ) ); + connect( windowMenu, TQ_SIGNAL( aboutToShow() ), + this, TQ_SLOT( setupWindowActions() ) ); } else { windowMenu->clear(); } @@ -958,20 +958,20 @@ void MainWindow::setupWindowActions() int j = 0; for ( int i = 0; i < int( windows.count() ); ++i ) { TQWidget *w = windows.at( i ); - if ( !::tqqt_cast<FormWindow*>(w) && !::tqqt_cast<SourceEditor*>(w) ) + if ( !::tqt_cast<FormWindow*>(w) && !::tqt_cast<SourceEditor*>(w) ) continue; - if ( ::tqqt_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 ( ::tqqt_cast<FormWindow*>(w) ) + if ( ::tqt_cast<FormWindow*>(w) ) itemText += w->name(); else itemText += w->caption(); - int id = windowMenu->insertItem( itemText, TQT_TQOBJECT(this), TQT_SLOT( windowsMenuActivated( int ) ) ); + int id = windowMenu->insertItem( itemText, this, TQ_SLOT( windowsMenuActivated( int ) ) ); windowMenu->setItemParameter( id, i ); windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) ); } @@ -979,39 +979,31 @@ void MainWindow::setupWindowActions() void MainWindow::setupHelpActions() { - actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, TQT_TQOBJECT(this), 0 ); + actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, this, 0 ); actionHelpContents->setStatusTip( i18n("Opens the online help") ); actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) ); - connect( actionHelpContents, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpContents() ) ); + connect( actionHelpContents, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpContents() ) ); - actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, TQT_TQOBJECT(this), 0 ); + actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, this, 0 ); actionHelpManual->setStatusTip( i18n("Opens the TQt Designer manual") ); actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) ); - connect( actionHelpManual, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpManual() ) ); + connect( actionHelpManual, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpManual() ) ); - actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, TQT_TQOBJECT(this), 0 ); + actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, this, 0 ); actionHelpAbout->setStatusTip( i18n("Displays information about TQt Designer") ); actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) ); - connect( actionHelpAbout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAbout() ) ); + connect( actionHelpAbout, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpAbout() ) ); - actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, TQT_TQOBJECT(this), 0 ); + actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, this, 0 ); actionHelpAboutTQt->setStatusTip( i18n("Displays information about the TQt Toolkit") ); actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) ); - connect( actionHelpAboutTQt, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAboutTQt() ) ); - -#if 0 //defined(TQT_NON_COMMERCIAL) - // ### not used anymore -- should be deleted? - actionHelpRegister = new DesignerAction( i18n("Register TQt"), TQPixmap(), i18n("&Register TQt..."), 0, TQT_TQOBJECT(this), 0 ); - actionHelpRegister->setStatusTip( i18n("Opens a web browser at the evaluation form on www.trolltech.com") ); - actionHelpRegister->setWhatsThis( i18n("Register with Trolltech") ); - connect( actionHelpRegister, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpRegister() ) ); -#endif + connect( actionHelpAboutTQt, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpAboutTQt() ) ); actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ), - i18n("What's This?"), SHIFT + Key_F1, TQT_TQOBJECT(this), 0 ); + i18n("What's This?"), SHIFT + Key_F1, this, 0 ); actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") ); actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) ); - connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( whatsThis() ) ); + connect( actionHelpWhatsThis, TQ_SIGNAL( activated() ), this, TQ_SLOT( whatsThis() ) ); /* TQToolBar *tb = new TQToolBar( this, "Help" ); tb->setCloseMode( TQDockWindow::Undocked ); @@ -1027,11 +1019,6 @@ void MainWindow::setupHelpActions() menu->insertSeparator(); actionHelpAbout->addTo( menu ); actionHelpAboutTQt->addTo( menu ); -#if 0 //defined(TQT_NON_COMMERCIAL) - // ### not used anymore -- should be deleted? - actionHelpRegister->addTo( menu ); -#endif - menu->insertSeparator(); actionHelpWhatsThis->addTo( menu ); } @@ -1057,13 +1044,13 @@ void MainWindow::fileNewDialog() currentProject->setModified( TRUE ); workspace()->update(); fw->setProject( currentProject ); - MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); + MetaDataBase::addEntry( fw ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() ); fw->setMainContainer( w ); fw->setCaption( n ); fw->resize( 600, 480 ); insertFormWindow( fw ); - fw->killAccels( TQT_TQOBJECT(fw) ); + fw->killAccels( fw ); fw->project()->setModified( TRUE ); fw->setFocus(); fw->setSavePixmapInProject( TRUE ); @@ -1098,9 +1085,9 @@ void MainWindow::fileClose() } else { TQWidget *w = qworkspace->activeWindow(); if ( w ) { - if ( ::tqqt_cast<FormWindow*>(w) ) + if ( ::tqt_cast<FormWindow*>(w) ) ( (FormWindow*)w )->formFile()->close(); - else if ( ::tqqt_cast<SourceEditor*>(w) ) + else if ( ::tqt_cast<SourceEditor*>(w) ) ( (SourceEditor*)w )->close(); } } @@ -1145,14 +1132,14 @@ void MainWindow::fileCloseProject() while ( wit.current() ) { TQWidget *w = wit.current(); ++wit; - if ( ::tqqt_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 ( ::tqqt_cast<SourceEditor*>(w) ) { + } else if ( ::tqt_cast<SourceEditor*>(w) ) { if ( !( (SourceEditor*)w )->close() ) return; } @@ -1170,7 +1157,7 @@ void MainWindow::fileCloseProject() } if ( !windows.isEmpty() ) { for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast<FormWindow*>(w) ) + if ( !::tqt_cast<FormWindow*>(w) ) continue; w->setFocus(); activeWindowChanged( w ); @@ -1358,7 +1345,7 @@ bool MainWindow::fileSave() bool MainWindow::fileSaveForm() { for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == formWindow() || e == qWorkspace()->activeWindow() ) { + if ( e->object() == formWindow() || e == qWorkspace()->activeWindow() ) { e->save(); } } @@ -1367,7 +1354,7 @@ bool MainWindow::fileSaveForm() TQWidget *w = qWorkspace()->activeWindow(); if ( w ) { - if ( ::tqqt_cast<SourceEditor*>(w) ) { + if ( ::tqt_cast<SourceEditor*>(w) ) { SourceEditor *se = (SourceEditor*)w; if ( se->formWindow() ) fw = se->formWindow(); @@ -1400,9 +1387,9 @@ bool MainWindow::fileSaveAs() TQWidget *w = qworkspace->activeWindow(); if ( !w ) return TRUE; - if ( ::tqqt_cast<FormWindow*>(w) ) + if ( ::tqt_cast<FormWindow*>(w) ) return ( (FormWindow*)w )->formFile()->saveAs(); - else if ( ::tqqt_cast<SourceEditor*>(w) ) + else if ( ::tqt_cast<SourceEditor*>(w) ) return ( (SourceEditor*)w )->saveAs(); return FALSE; } @@ -1425,7 +1412,7 @@ void MainWindow::fileCreateTemplate() } for ( i = 0; i < WidgetDatabase::count(); ++i ) { if ( WidgetDatabase::isContainer( i ) && !WidgetDatabase::isForm(i) && - WidgetDatabase::className( i ) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::group( i ) != "Temp" ) { + WidgetDatabase::className( i ) != "TQTabWidget" && WidgetDatabase::group( i ) != "Temp" ) { dia.listClass->insertItem( WidgetDatabase::className( i ) ); } } @@ -1437,14 +1424,14 @@ void MainWindow::fileCreateTemplate() } dia.editName->setText( i18n( "NewTemplate" ) ); - connect( dia.buttonCreate, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( createNewTemplate() ) ); + connect( dia.buttonCreate, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( createNewTemplate() ) ); dia.exec(); } void MainWindow::createNewTemplate() { - CreateTemplate *dia = (CreateTemplate*)TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->parent(); + CreateTemplate *dia = (CreateTemplate*)sender()->parent(); TQString fn = dia->editName->text(); TQString cn = dia->listClass->currentText(); if ( fn.isEmpty() || cn.isEmpty() ) { @@ -1499,7 +1486,7 @@ void MainWindow::createNewTemplate() void MainWindow::editUndo() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editUndo(); return; } @@ -1510,7 +1497,7 @@ void MainWindow::editUndo() void MainWindow::editRedo() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editRedo(); return; } @@ -1521,7 +1508,7 @@ void MainWindow::editRedo() void MainWindow::editCut() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editCut(); return; } @@ -1532,7 +1519,7 @@ void MainWindow::editCut() void MainWindow::editCopy() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editCopy(); return; } @@ -1543,7 +1530,7 @@ void MainWindow::editCopy() void MainWindow::editPaste() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editPaste(); return; } @@ -1555,7 +1542,7 @@ void MainWindow::editPaste() if ( l.count() == 1 ) { w = l.first(); if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) && + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) && w != formWindow()->mainContainer() ) ) w = formWindow()->mainContainer(); } @@ -1582,7 +1569,7 @@ void MainWindow::editDelete() void MainWindow::editSelectAll() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editSelectAll(); return; } @@ -1774,7 +1761,7 @@ SourceEditor *MainWindow::openSourceEditor() } if ( !editor ) -editor = createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang ); +editor = createSourceEditor( formWindow(), formWindow()->project(), lang ); return editor; } @@ -1870,7 +1857,7 @@ void MainWindow::editPreferences() statusMessage( i18n( "Edit preferences..." ) ); Preferences *dia = new Preferences( this, 0, TRUE ); prefDia = dia; - connect( dia->helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( dia->helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); dia->buttonColor->setEditor( StyledButton::ColorEditor ); dia->buttonPixmap->setEditor( StyledButton::PixmapEditor ); dia->groupBoxGrid->setChecked( sGrid ); @@ -1904,11 +1891,11 @@ void MainWindow::editPreferences() Tab t = *it; dia->tabWidget->addTab( t.w, t.title ); if ( t.receiver ) { - connect( dia->buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); - connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); - connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + connect( dia->buttonOk, TQ_SIGNAL( clicked() ), senderObject, TQ_SLOT( emitAcceptSignal() ) ); + connect( senderObject, TQ_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); + connect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); senderObject->emitInitSignal(); - disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + disconnect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); } } @@ -1961,7 +1948,7 @@ void MainWindow::editPreferences() void MainWindow::searchFind() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; if ( !findDialog ) @@ -1983,7 +1970,7 @@ void MainWindow::searchIncremetalFindMenu() void MainWindow::searchIncremetalFind() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), @@ -1993,7 +1980,7 @@ void MainWindow::searchIncremetalFind() void MainWindow::searchIncremetalFindNext() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), @@ -2003,7 +1990,7 @@ void MainWindow::searchIncremetalFindNext() void MainWindow::searchReplace() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; if ( !replaceDialog ) @@ -2019,7 +2006,7 @@ void MainWindow::searchReplace() void MainWindow::searchGotoLine() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; if ( !gotoLineDialog ) diff --git a/kdevdesigner/designer/menubareditor.cpp b/kdevdesigner/designer/menubareditor.cpp index f62e15e0..a3e53973 100644 --- a/kdevdesigner/designer/menubareditor.cpp +++ b/kdevdesigner/designer/menubareditor.cpp @@ -152,7 +152,7 @@ MenuBarEditor::MenuBarEditor( FormWindow * fw, TQWidget * parent, const char * n hasSeparator( FALSE ) { setAcceptDrops( TRUE ); - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); addItem.setMenuText( i18n("new menu") ); addSeparator.setMenuText( i18n("new separator") ); @@ -571,7 +571,7 @@ void MenuBarEditor::paste() bool MenuBarEditor::eventFilter( TQObject * o, TQEvent * e ) { - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit) && e->type() == TQEvent::FocusOut ) { + if ( o == lineEdit && e->type() == TQEvent::FocusOut ) { leaveEditMode(); lineEdit->hide(); update(); @@ -585,7 +585,7 @@ void MenuBarEditor::paintEvent( TQPaintEvent * ) { TQPainter p( this ); TQRect r = rect(); - style().tqdrawPrimitive( TQStyle::PE_PanelMenuBar, &p, + style().drawPrimitive( TQStyle::PE_PanelMenuBar, &p, r, colorGroup() ); drawItems( p ); } @@ -616,7 +616,7 @@ void MenuBarEditor::mouseDoubleClickEvent( TQMouseEvent * e ) void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e ) { - if ( e->state() & Qt::LeftButton ) { + if ( e->state() & TQt::LeftButton ) { if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) { bool itemCreated = FALSE; bool isSeparator = FALSE; @@ -818,7 +818,7 @@ void MenuBarEditor::keyPressEvent( TQKeyEvent * e ) void MenuBarEditor::focusOutEvent( TQFocusEvent * e ) { TQWidget * fw = tqApp->focusWidget(); - if ( e->lostFocus() && !::tqqt_cast<PopupMenuEditor*>(fw) ) + if ( e->lostFocus() && !::tqt_cast<PopupMenuEditor*>(fw) ) hideItem(); update(); } diff --git a/kdevdesigner/designer/menubareditor.h b/kdevdesigner/designer/menubareditor.h index f6279f2b..11277258 100644 --- a/kdevdesigner/designer/menubareditor.h +++ b/kdevdesigner/designer/menubareditor.h @@ -36,7 +36,7 @@ class TQActionGroup; class MenuBarEditorItem : public TQObject { - Q_OBJECT + TQ_OBJECT friend class MenuBarEditor; @@ -81,7 +81,7 @@ class FormWindow; class MenuBarEditor : public TQMenuBar { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp index 74d8ef33..2639639b 100644 --- a/kdevdesigner/designer/metadatabase.cpp +++ b/kdevdesigner/designer/metadatabase.cpp @@ -321,8 +321,8 @@ int MetaDataBase::spacing( TQObject *o ) if ( !o ) return -1; setupDataBase(); - if ( ::tqqt_cast<TQMainWindow*>(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + if ( ::tqt_cast<TQMainWindow*>(o) ) + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -352,9 +352,9 @@ void MetaDataBase::setMargin( TQObject *o, int margin ) bool isInnerLayout = TRUE; TQWidget *widget = (TQWidget*)o; - if ( widget && !::tqqt_cast<TQLayoutWidget*>(widget) && - ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && widget->parentWidget() && ::tqqt_cast<FormWindow*>(widget->parentWidget()) ) ) + if ( widget && !::tqt_cast<TQLayoutWidget*>(widget) && + ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) || + widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) isInnerLayout = FALSE; @@ -378,8 +378,8 @@ int MetaDataBase::margin( TQObject *o ) if ( !o ) return -1; setupDataBase(); - if ( ::tqqt_cast<TQMainWindow*>(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + if ( ::tqt_cast<TQMainWindow*>(o) ) + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -409,8 +409,8 @@ TQString MetaDataBase::resizeMode( TQObject *o ) if ( !o ) return TQString(); setupDataBase(); - if ( ::tqqt_cast<TQMainWindow*>(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + if ( ::tqt_cast<TQMainWindow*>(o) ) + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -440,15 +440,15 @@ void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString r->connections.append( conn ); if ( addCode ) { TQString rec = receiver->name(); - if ( ::tqqt_cast<FormWindow*>(o) && TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) + if ( ::tqt_cast<FormWindow*>(o) && receiver ==( (FormWindow*)o )->mainContainer() ) rec = "this"; TQString sen = sender->name(); - if ( ::tqqt_cast<FormWindow*>(o) && TQT_BASE_OBJECT(sender) ==( (FormWindow*)o )->mainContainer() ) + if ( ::tqt_cast<FormWindow*>(o) && sender ==( (FormWindow*)o )->mainContainer() ) sen = "this"; FormFile *ff = 0; - if ( ::tqqt_cast<FormFile*>(o) ) + if ( ::tqt_cast<FormFile*>(o) ) ff = (FormFile*)o; - else if ( ::tqqt_cast<FormWindow*>(o) ) + else if ( ::tqt_cast<FormWindow*>(o) ) ff = ( (FormWindow*)o )->formFile(); ff->addConnection( sen, signal, rec, slot ); } @@ -468,17 +468,17 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr return; for ( TQValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { Connection conn = *it; - if ( TQT_BASE_OBJECT(conn.sender) ==sender && + if ( conn.sender ==sender && conn.signal == signal && - TQT_BASE_OBJECT(conn.receiver) ==receiver && + conn.receiver ==receiver && conn.slot == slot ) { r->connections.remove( it ); break; } } - if ( ::tqqt_cast<FormWindow*>(o) ) { + if ( ::tqt_cast<FormWindow*>(o) ) { TQString rec = receiver->name(); - if ( TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) + if ( receiver ==( (FormWindow*)o )->mainContainer() ) rec = "this"; ( (FormWindow*)o )->formFile()->removeConnection( sender->name(), signal, rec, slot ); } @@ -494,7 +494,7 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte return; } - if ( !::tqqt_cast<FormFile*>(o) ) + if ( !::tqt_cast<FormFile*>(o) ) return; FormFile *formfile = (FormFile*)o; @@ -514,8 +514,8 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte sender = formfile->project()->objectForFakeFormFile( formfile ); if ( !sender && senderName == "this" ) sender = formfile->formWindow() ? - TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : - TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )); + formfile->formWindow()->mainContainer() : + formfile->project()->objectForFakeFormFile( formfile ); if ( !sender ) continue; MetaDataBase::addConnection( formfile->formWindow() ? @@ -524,8 +524,8 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte sender, (*cit).signal.latin1(), formfile->formWindow() ? - TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : - TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )), + formfile->formWindow()->mainContainer() : + formfile->project()->objectForFakeFormFile( formfile ), (*cit).slot.latin1(), FALSE ); } @@ -544,9 +544,9 @@ bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString for ( TQValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { Connection conn = *it; - if ( TQT_BASE_OBJECT(conn.sender) ==sender && + if ( conn.sender ==sender && conn.signal == signal && - TQT_BASE_OBJECT(conn.receiver) ==receiver && + conn.receiver ==receiver && conn.slot == slot ) return TRUE; } @@ -581,8 +581,8 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ TQValueList<Connection>::Iterator conn; while ( ( conn = it ) != r->connections.end() ) { ++it; - if ( TQT_BASE_OBJECT((*conn).sender) ==sender && - TQT_BASE_OBJECT((*conn).receiver) ==receiver ) + if ( (*conn).sender ==sender && + (*conn).receiver ==receiver ) ret << *conn; } @@ -603,8 +603,8 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ TQValueList<Connection>::Iterator conn; while ( ( conn = it ) != r->connections.end() ) { ++it; - if ( TQT_BASE_OBJECT((*conn).sender) ==object || - TQT_BASE_OBJECT((*conn).receiver) ==object ) + if ( (*conn).sender ==object || + (*conn).receiver ==object ) ret << *conn; } return ret; @@ -679,14 +679,14 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom if ( slotList.find( slot ) != -1 ) return TRUE; - if ( ::tqqt_cast<FormWindow*>(o) ) { - o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); + if ( ::tqt_cast<FormWindow*>(o) ) { + o = ( (FormWindow*)o )->mainContainer(); slotList = o->metaObject()->slotNames( TRUE ); if ( slotList.find( slot ) != -1 ) return TRUE; } - //if ( ::tqqt_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 ) { @@ -909,14 +909,14 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl if ( functionList.find( function ) != -1 ) return TRUE; - if ( ::tqqt_cast<FormWindow*>(o) ) { - o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); + if ( ::tqt_cast<FormWindow*>(o) ) { + o = ( (FormWindow*)o )->mainContainer(); functionList = o->metaObject()->slotNames( TRUE ); if ( functionList.find( function ) != -1 ) return TRUE; } - //if ( ::tqqt_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 ) { @@ -1545,7 +1545,6 @@ void MetaDataBase::setupInterfaceManagers( const TQString &plugDir ) languageInterfaceManager = new TQPluginManager<LanguageInterface>( IID_Language, TQApplication::libraryPaths(), -// kapp->dirs()->resourceDirs("qtplugins"), plugDir ); langList = languageInterfaceManager->featureList(); diff --git a/kdevdesigner/designer/multilineeditor.ui b/kdevdesigner/designer/multilineeditor.ui index f0ff2129..83579b04 100644 --- a/kdevdesigner/designer/multilineeditor.ui +++ b/kdevdesigner/designer/multilineeditor.ui @@ -172,10 +172,10 @@ <slot>cancelClicked()</slot> </connection> </connections> -<Q_SLOTS> +<slots> <slot>applyClicked()</slot> <slot>okClicked()</slot> <slot>cancelClicked()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/multilineeditorimpl.cpp b/kdevdesigner/designer/multilineeditorimpl.cpp index ef06f77b..dbe5bcd8 100644 --- a/kdevdesigner/designer/multilineeditorimpl.cpp +++ b/kdevdesigner/designer/multilineeditorimpl.cpp @@ -56,7 +56,7 @@ ToolBarItem::ToolBarItem( TQWidget *parent, TQWidget *toolBar, setAccel( key ); addTo( toolBar ); tag = tagstr; - connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( wasActivated() ) ); + connect( this, TQ_SIGNAL( activated() ), this, TQ_SLOT( wasActivated() ) ); } ToolBarItem::~ToolBarItem() @@ -103,26 +103,26 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget ToolBarItem *it = new ToolBarItem( this, basicToolBar, i18n( "Italic" ), "i", BarIcon( "designer_textitalic.png", KDevDesignerPartFactory::instance() ), CTRL+Key_I ); it->addTo( stylesMenu ); - connect( it, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( it, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); ToolBarItem *b = new ToolBarItem( this, basicToolBar, i18n( "Bold" ), "b", BarIcon( "designer_textbold.png", KDevDesignerPartFactory::instance() ), CTRL+Key_B ); b->addTo( stylesMenu ); - connect( b, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( b, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); ToolBarItem *ul = new ToolBarItem( this, basicToolBar, i18n( "Underline" ), "u", BarIcon( "designer_textunderline.png" , KDevDesignerPartFactory::instance()), CTRL+Key_U ); ul->addTo( stylesMenu ); - connect( ul, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( ul, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); ToolBarItem *tt = new ToolBarItem( this, basicToolBar, i18n( "Typewriter" ), "tt", BarIcon( "designer_textteletext.png", KDevDesignerPartFactory::instance() ) ); tt->addTo( stylesMenu ); - connect( tt, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( tt, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); basicToolBar->addSeparator(); @@ -134,39 +134,39 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget brAction->setText( i18n("Break" ) ); brAction->addTo( basicToolBar ); brAction->addTo( layoutMenu ); - connect( brAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( insertBR() ) ); + connect( brAction, TQ_SIGNAL( activated() ) , this, TQ_SLOT( insertBR() ) ); ToolBarItem *p = new ToolBarItem( this, basicToolBar, i18n( "Paragraph" ), "p", BarIcon( "designer_textparagraph.png", KDevDesignerPartFactory::instance() ) ); p->addTo( layoutMenu ); - connect( p, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( p, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); layoutMenu->insertSeparator(); basicToolBar->addSeparator(); ToolBarItem *al = new ToolBarItem( this, basicToolBar, i18n( "Align left" ), "p align=\"left\"", BarIcon( "designer_textleft.png", KDevDesignerPartFactory::instance() ) ); al->addTo( layoutMenu ); - connect( al, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( al, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); ToolBarItem *ac = new ToolBarItem( this, basicToolBar, i18n( "Align center" ), "p align=\"center\"", BarIcon( "designer_textcenter.png", KDevDesignerPartFactory::instance() ) ); ac->addTo( layoutMenu ); - connect( ac, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( ac, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); ToolBarItem *ar = new ToolBarItem( this, basicToolBar, i18n( "Align right" ), "p align=\"right\"", BarIcon( "designer_textright.png", KDevDesignerPartFactory::instance() ) ); ar->addTo( layoutMenu ); - connect( ar, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( ar, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); ToolBarItem *block = new ToolBarItem( this, basicToolBar, i18n( "Blockquote" ), "blockquote", BarIcon( "designer_textjustify.png", KDevDesignerPartFactory::instance() ) ); block->addTo( layoutMenu ); - connect( block, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( block, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); TQPopupMenu *fontMenu = new TQPopupMenu( this ); @@ -179,33 +179,33 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget fontAction->setText( i18n("Font" ) ); fontAction->addTo( fontToolBar ); fontAction->addTo( fontMenu ); - connect( fontAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( showFontDialog() ) ); + connect( fontAction, TQ_SIGNAL( activated() ) , this, TQ_SLOT( showFontDialog() ) ); ToolBarItem *fp1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize +1" ), "font size=\"+1\"", BarIcon( "designer_textlarger.png", KDevDesignerPartFactory::instance() ) ); - connect( fp1, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( fp1, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); ToolBarItem *fm1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize -1" ), "font size=\"-1\"", BarIcon( "designer_textsmaller.png", KDevDesignerPartFactory::instance() ) ); - connect( fm1, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( fm1, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); ToolBarItem *h1 = new ToolBarItem( this, fontToolBar, i18n( "Headline 1" ), "h1", BarIcon( "designer_texth1.png", KDevDesignerPartFactory::instance() ) ); - connect( h1, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( h1, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); ToolBarItem *h2 = new ToolBarItem( this, fontToolBar, i18n( "Headline 2" ), "h2", BarIcon( "designer_texth2.png", KDevDesignerPartFactory::instance() ) ); - connect( h2, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( h2, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); ToolBarItem *h3 = new ToolBarItem( this, fontToolBar, i18n( "Headline 3" ), "h3", BarIcon( "designer_texth3.png", KDevDesignerPartFactory::instance() ) ); - connect( h3, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); + connect( h3, TQ_SIGNAL( clicked( const TQString& ) ), + this, TQ_SLOT( insertTags( const TQString& ))); TQPopupMenu *optionsMenu = new TQPopupMenu( this ); menuBar->insertItem( i18n( "O&ptions" ), optionsMenu ); @@ -217,17 +217,17 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget wrapAction->setText( i18n( "Word Wrapping" ) ); wrapAction->addTo( optionsToolBar ); wrapAction->addTo( optionsMenu ); - connect( wrapAction, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( changeWrapMode( bool ) ) ); + connect( wrapAction, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( changeWrapMode( bool ) ) ); oldDoWrap = doWrap; wrapAction->setOn( doWrap ); - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); textEdit->document()->setFormatter( new TQTextFormatterBreakInWords ); textEdit->document()->setUseFormatCollection( FALSE ); textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML ); - if ( !callStatic && ::tqqt_cast<TQTextEdit*>(editWidget) ) { + if ( !callStatic && ::tqt_cast<TQTextEdit*>(editWidget) ) { mlined = (TQTextEdit*)editWidget; mlined->setReadOnly( TRUE ); @@ -286,13 +286,13 @@ void MultiLineEditor::applyClicked() SetPropertyCommand *propcmd; if ( doWrap ) propcmd = new SetPropertyCommand( pn, formwindow, - TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), - "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), + mlined, MainWindow::self->propertyeditor(), + "wordWrap", WidgetFactory::property( mlined, "wordWrap" ), TQVariant( 1 ), "WidgetWidth", oldWrapString ); else propcmd = new SetPropertyCommand( pn, formwindow, - TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), - "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), + mlined, MainWindow::self->propertyeditor(), + "wordWrap", WidgetFactory::property( mlined, "wordWrap" ), TQVariant( 0 ), "NoWrap", oldWrapString ); propcmd->execute(); diff --git a/kdevdesigner/designer/multilineeditorimpl.h b/kdevdesigner/designer/multilineeditorimpl.h index 34d47b3e..75ac330f 100644 --- a/kdevdesigner/designer/multilineeditorimpl.h +++ b/kdevdesigner/designer/multilineeditorimpl.h @@ -38,7 +38,7 @@ class TQTextDocument; class TextEdit : public TQTextEdit { - Q_OBJECT + TQ_OBJECT public: @@ -50,7 +50,7 @@ public: class ToolBarItem : public TQAction { - Q_OBJECT + TQ_OBJECT public: @@ -70,7 +70,7 @@ private: class MultiLineEditor : public MultiLineEditorBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/newform.ui b/kdevdesigner/designer/newform.ui index 81cb4fa5..7b95ee55 100644 --- a/kdevdesigner/designer/newform.ui +++ b/kdevdesigner/designer/newform.ui @@ -230,9 +230,9 @@ <tabstop>buttonOk</tabstop> <tabstop>buttonCancel</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot access="protected">itemChanged( TQIconViewItem * )</slot> <slot access="protected">projectChanged( const TQString & )</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/newformimpl.cpp b/kdevdesigner/designer/newformimpl.cpp index 17dfc1b7..629d53ff 100644 --- a/kdevdesigner/designer/newformimpl.cpp +++ b/kdevdesigner/designer/newformimpl.cpp @@ -77,20 +77,20 @@ void FormItem::insert( Project *pro ) FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro ); fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); fw->setProject( pro ); - MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); + MetaDataBase::addEntry( fw ); if ( fType == Widget ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), fw, n.latin1() ); fw->setMainContainer( w ); } else if ( fType == Dialog ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() ); fw->setMainContainer( w ); } else if ( fType == Wizard ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIZARD_OBJECT_NAME_STRING ), + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWizard" ), fw, n.latin1() ); fw->setMainContainer( w ); } else if ( fType == MainWindow ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQMAINWINDOW_OBJECT_NAME_STRING ), + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQMainWindow" ), fw, n.latin1() ); fw->setMainContainer( w ); } @@ -109,10 +109,10 @@ void FormItem::insert( Project *pro ) // the wizard might have changed a lot, lets update everything MainWindow::self->actioneditor()->setFormWindow( fw ); - MainWindow::self->objectHierarchy()->setFormWindow( fw, TQT_TQOBJECT(fw) ); + MainWindow::self->objectHierarchy()->setFormWindow( fw, fw ); MainWindow::self->objectHierarchy()->formDefinitionView()->refresh(); MainWindow::self->objectHierarchy()->rebuild(); - fw->killAccels( TQT_TQOBJECT(fw) ); + fw->killAccels( fw ); fw->project()->setModified( TRUE ); fw->setFocus(); if ( !pro->isDummy() ) { @@ -368,7 +368,7 @@ NewForm::NewForm( TQWidget *parent, const TQStringList& projects, const TQString& currentProject, const TQString &templatePath ) : NewFormBase( parent, 0, TRUE ) { - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); projectCombo->insertStringList( projects ); projectCombo->setCurrentText( currentProject ); diff --git a/kdevdesigner/designer/newformimpl.h b/kdevdesigner/designer/newformimpl.h index 863f5b9d..6f32cd8a 100644 --- a/kdevdesigner/designer/newformimpl.h +++ b/kdevdesigner/designer/newformimpl.h @@ -142,7 +142,7 @@ private: class NewForm : public NewFormBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/orderindicator.h b/kdevdesigner/designer/orderindicator.h index 33e486d4..401554f0 100644 --- a/kdevdesigner/designer/orderindicator.h +++ b/kdevdesigner/designer/orderindicator.h @@ -33,7 +33,7 @@ class FormWindow; class OrderIndicator : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/outputwindow.cpp b/kdevdesigner/designer/outputwindow.cpp index a23c14a7..84087f01 100644 --- a/kdevdesigner/designer/outputwindow.cpp +++ b/kdevdesigner/designer/outputwindow.cpp @@ -57,24 +57,24 @@ OutputWindow::~OutputWindow() debugoutput = debugView = 0; errorView = 0; if ( !debugToStderr ) - tqInstallMsgHandler( oldMsgHandler ); + qInstallMsgHandler( oldMsgHandler ); delete iface; } void OutputWindow::shuttingDown() { if ( !debugToStderr ) - tqInstallMsgHandler( oldMsgHandler ); + qInstallMsgHandler( oldMsgHandler ); } void OutputWindow::setupError() { errorView = new TQListView( this, "OutputWindow::errorView" ); errorView->setSorting( -1 ); - connect( errorView, TQT_SIGNAL( currentChanged( TQListViewItem* ) ), - this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) ); - connect( errorView, TQT_SIGNAL( clicked( TQListViewItem* ) ), - this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) ); + connect( errorView, TQ_SIGNAL( currentChanged( TQListViewItem* ) ), + this, TQ_SLOT( currentErrorChanged( TQListViewItem* ) ) ); + connect( errorView, TQ_SIGNAL( clicked( TQListViewItem* ) ), + this, TQ_SLOT( currentErrorChanged( TQListViewItem* ) ) ); if ( MetaDataBase::languages().count() > 1 ) addTab( errorView, i18n( "Warnings/Errors" ) ); @@ -119,7 +119,7 @@ void OutputWindow::setupDebug() addTab( debugView, "Debug Output" ); if ( !debugToStderr ) - oldMsgHandler = tqInstallMsgHandler( debugMessageOutput ); + oldMsgHandler = qInstallMsgHandler( debugMessageOutput ); } void OutputWindow::setErrorMessages( const TQStringList &errors, const TQValueList<uint> &lines, diff --git a/kdevdesigner/designer/outputwindow.h b/kdevdesigner/designer/outputwindow.h index 79b3e79a..d3190e0e 100644 --- a/kdevdesigner/designer/outputwindow.h +++ b/kdevdesigner/designer/outputwindow.h @@ -61,7 +61,7 @@ private: class OutputWindow : public TQTabWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/paletteeditoradvancedimpl.cpp b/kdevdesigner/designer/paletteeditoradvancedimpl.cpp index 903c1a4f..e27d3a21 100644 --- a/kdevdesigner/designer/paletteeditoradvancedimpl.cpp +++ b/kdevdesigner/designer/paletteeditoradvancedimpl.cpp @@ -69,7 +69,7 @@ PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent, const char * name, bool modal, WFlags f ) : PaletteEditorAdvancedBase( parent, name, modal, f ), formWindow( fw ), selectedPalette(0) { - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); buttonPixmap->setEditor( StyledButton::PixmapEditor ); diff --git a/kdevdesigner/designer/paletteeditoradvancedimpl.h b/kdevdesigner/designer/paletteeditoradvancedimpl.h index 1fb59912..70d0baa4 100644 --- a/kdevdesigner/designer/paletteeditoradvancedimpl.h +++ b/kdevdesigner/designer/paletteeditoradvancedimpl.h @@ -33,7 +33,7 @@ class FormWindow; class PaletteEditorAdvanced : public PaletteEditorAdvancedBase { - Q_OBJECT + TQ_OBJECT public: PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent=0, const char * name=0, diff --git a/kdevdesigner/designer/paletteeditorimpl.cpp b/kdevdesigner/designer/paletteeditorimpl.cpp index ae0cf7fd..fca7fe90 100644 --- a/kdevdesigner/designer/paletteeditorimpl.cpp +++ b/kdevdesigner/designer/paletteeditorimpl.cpp @@ -39,7 +39,7 @@ PaletteEditor::PaletteEditor( FormWindow *fw, TQWidget * parent, const char * name, bool modal, WFlags f ) : PaletteEditorBase( parent, name, modal, f ), formWindow( fw ) { - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); editPalette = TQApplication::palette(); setPreviewPalette( editPalette ); diff --git a/kdevdesigner/designer/paletteeditorimpl.h b/kdevdesigner/designer/paletteeditorimpl.h index c1943a61..ac1cf229 100644 --- a/kdevdesigner/designer/paletteeditorimpl.h +++ b/kdevdesigner/designer/paletteeditorimpl.h @@ -33,7 +33,7 @@ class FormWindow; class PaletteEditor : public PaletteEditorBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/pixmapchooser.cpp b/kdevdesigner/designer/pixmapchooser.cpp index 92d68ac1..bf521b48 100644 --- a/kdevdesigner/designer/pixmapchooser.cpp +++ b/kdevdesigner/designer/pixmapchooser.cpp @@ -174,31 +174,31 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T TQPixmap pix( dlg.selectedURL().path() ); if ( fn ) *fn = dlg.selectedURL().path(); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dlg.selectedURL().path() ); + MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dlg.selectedURL().path() ); return pix; } } else if ( fw && fw->savePixmapInProject() ) { PixmapCollectionEditor dia( parent, 0, TRUE ); dia.setProject( fw->project() ); dia.setChooserMode( TRUE ); - dia.setCurrentItem( MetaDataBase::pixmapKey( TQT_TQOBJECT(fw), old.serialNumber() ) ); + dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) ); if ( dia.exec() == TQDialog::Accepted ) { TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) ); - MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), pix.serialNumber(), dia.viewPixmaps->currentItem()->text() ); + MetaDataBase::setPixmapKey( fw, pix.serialNumber(), dia.viewPixmaps->currentItem()->text() ); return pix; } } else { PixmapFunction dia( parent, 0, TRUE ); - TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + TQObject::connect( dia.helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" ); - dia.editArguments->setText( MetaDataBase::pixmapArgument( TQT_TQOBJECT(fw), old.serialNumber() ) ); + dia.editArguments->setText( MetaDataBase::pixmapArgument( fw, old.serialNumber() ) ); dia.editArguments->setFocus(); if ( dia.exec() == TQDialog::Accepted ) { TQPixmap pix; // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that pix.convertFromImage( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ).convertToImage() ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() ); + MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dia.editArguments->text() ); return pix; } } @@ -211,7 +211,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T } ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name ) - : TQFileIconProvider( TQT_TQOBJECT(parent), name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) ) + : TQFileIconProvider( parent, name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) ) { fmts = TQImage::inputFormats(); } diff --git a/kdevdesigner/designer/pixmapchooser.h b/kdevdesigner/designer/pixmapchooser.h index c6523488..0f1ac04a 100644 --- a/kdevdesigner/designer/pixmapchooser.h +++ b/kdevdesigner/designer/pixmapchooser.h @@ -37,7 +37,7 @@ class FormWindow; class PixmapView : public TQScrollView, public TQFilePreview { - Q_OBJECT + TQ_OBJECT public: @@ -53,7 +53,7 @@ private: class ImageIconProvider : public TQFileIconProvider { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/pixmapcollectioneditor.ui b/kdevdesigner/designer/pixmapcollectioneditor.ui index 30f74183..e939397f 100644 --- a/kdevdesigner/designer/pixmapcollectioneditor.ui +++ b/kdevdesigner/designer/pixmapcollectioneditor.ui @@ -202,7 +202,7 @@ <variable>Project *project;</variable> <variable>bool chooser;</variable> </variables> -<Q_SLOTS> +<slots> <slot>init()</slot> <slot>destroy()</slot> <slot>addPixmap()</slot> @@ -213,6 +213,6 @@ <slot>setCurrentItem(const TQString & name)</slot> <slot>setProject(Project * pro)</slot> <slot returnType="TQPixmap">scaledPixmap(const TQPixmap & p)</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/pixmapcollectioneditor.ui.h b/kdevdesigner/designer/pixmapcollectioneditor.ui.h index 82bd7929..c32fc135 100644 --- a/kdevdesigner/designer/pixmapcollectioneditor.ui.h +++ b/kdevdesigner/designer/pixmapcollectioneditor.ui.h @@ -110,8 +110,8 @@ void PixmapCollectionEditor::setChooserMode( bool c ) buttonCancel->show(); buttonOk->setEnabled( FALSE ); buttonOk->setDefault( TRUE ); - connect( viewPixmaps, TQT_SIGNAL( doubleClicked( TQIconViewItem * ) ), buttonOk, TQT_SIGNAL( clicked() ) ); - connect( viewPixmaps, TQT_SIGNAL( returnPressed( TQIconViewItem * ) ), buttonOk, TQT_SIGNAL( clicked() ) ); + connect( viewPixmaps, TQ_SIGNAL( doubleClicked( TQIconViewItem * ) ), buttonOk, TQ_SIGNAL( clicked() ) ); + connect( viewPixmaps, TQ_SIGNAL( returnPressed( TQIconViewItem * ) ), buttonOk, TQ_SIGNAL( clicked() ) ); setCaption( i18n( "Choose Image" ) ); } else { buttonClose->show(); diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp index da6289dd..bf60b215 100644 --- a/kdevdesigner/designer/popupmenueditor.cpp +++ b/kdevdesigner/designer/popupmenueditor.cpp @@ -105,7 +105,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, TQObject * par { init(); a = new TQAction( this ); - TQObject::connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( selfDestruct() ) ); + TQObject::connect( a, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( selfDestruct() ) ); } @@ -119,7 +119,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * m removable( TRUE ) { init(); - if ( /*a->name() == "qt_separator_action" ||*/ ::tqqt_cast<QSeparatorAction*>(a) ) + if ( /*a->name() == "qt_separator_action" ||*/ ::tqt_cast<QSeparatorAction*>(a) ) separator = TRUE; if ( a && !a->childrenListObject().isEmpty() ) a->installEventFilter( this ); @@ -135,7 +135,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuE removable( item->removable ) { init(); - if ( ::tqqt_cast<TQActionGroup*>(a) ) + if ( ::tqt_cast<TQActionGroup*>(a) ) a->installEventFilter( this ); } @@ -147,13 +147,13 @@ PopupMenuEditorItem::~PopupMenuEditorItem() void PopupMenuEditorItem::init() { if ( a ) { - TQObject::connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( selfDestruct() ) ); + TQObject::connect( a, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( selfDestruct() ) ); if ( m && !isSeparator() ) { s = new PopupMenuEditor( m->formWindow(), m ); TQString n = "PopupMenuEditor"; - m->formWindow()->unify( TQT_TQOBJECT(s), n, TRUE ); + m->formWindow()->unify( s, n, TRUE ); s->setName( n ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); + MetaDataBase::addEntry( s ); } } } @@ -175,7 +175,7 @@ void PopupMenuEditorItem::setVisible( bool enable ) bool PopupMenuEditorItem::isVisible() const { - TQActionGroup *g = ::tqqt_cast<TQActionGroup*>(a); + TQActionGroup *g = ::tqt_cast<TQActionGroup*>(a); if ( g ) return ( g->isVisible() && g->usesDropDown() ); else if ( a ) @@ -212,7 +212,7 @@ int PopupMenuEditorItem::count() const { if ( s ) { return s->count(); - } else if ( ::tqqt_cast<TQActionGroup*>(a) ) { + } else if ( ::tqt_cast<TQActionGroup*>(a) ) { const TQObjectList l = a->childrenListObject(); if ( !l.isEmpty() ) return l.count(); @@ -222,15 +222,15 @@ int PopupMenuEditorItem::count() const bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event ) { - if ( ! ::tqqt_cast<TQActionGroup*>( o ) ) + if ( ! ::tqt_cast<TQActionGroup*>( o ) ) return FALSE; if ( event->type() == TQEvent::ChildInserted ) { TQChildEvent * ce = ( TQChildEvent * ) event; - TQObject * c = TQT_TQOBJECT(ce->child()); - TQAction * action = ::tqqt_cast<TQAction*>( c ); + TQObject * c = ce->child(); + TQAction * action = ::tqt_cast<TQAction*>( c ); if ( s->find( action ) != -1 ) // avoid duplicates return FALSE; - TQActionGroup * actionGroup = ::tqqt_cast<TQActionGroup*>( c ); + TQActionGroup * actionGroup = ::tqt_cast<TQActionGroup*>( c ); if ( actionGroup ) s->insert( actionGroup ); else if ( action ) @@ -304,7 +304,7 @@ void PopupMenuEditor::init() addSeparator.action()->setMenuText( i18n("new separator") ); setAcceptDrops( TRUE ); - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); lineEdit = new TQLineEdit( this ); lineEdit->hide(); @@ -357,11 +357,11 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index ) PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, 0, TQString( actionGroup->name() ) + "Menu" ); TQActionGroup *g = 0; - TQObjectList *l = actionGroup->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE ); + TQObjectList *l = actionGroup->queryList( "TQAction", 0, FALSE, FALSE ); TQObjectListIterator it( *l ); insert( i, index ); for ( ; it.current(); ++it ) { - g = ::tqqt_cast<TQActionGroup*>(it.current()); + g = ::tqt_cast<TQActionGroup*>(it.current()); if ( g ) { if ( dropdown ) i->s->insert( g ); @@ -714,7 +714,7 @@ void PopupMenuEditor::setFocusAt( const TQPoint & pos ) bool PopupMenuEditor::eventFilter( TQObject * o, TQEvent * e ) { - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit) && e->type() == TQEvent::FocusOut ) { + if ( o == lineEdit && e->type() == TQEvent::FocusOut ) { leaveEditMode( 0 ); update(); } @@ -730,7 +730,7 @@ void PopupMenuEditor::paintEvent( TQPaintEvent * ) rect().width() - borderSize * 2, rect().height() - borderSize * 2 ); reg -= mid; p.setClipRegion( reg ); - style().tqdrawPrimitive( TQStyle::PE_PanelPopup, &p, rect(), colorGroup() ); + style().drawPrimitive( TQStyle::PE_PanelPopup, &p, rect(), colorGroup() ); p.restore(); drawItems( &p ); } @@ -761,7 +761,7 @@ void PopupMenuEditor::mouseDoubleClickEvent( TQMouseEvent * ) void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) { - if ( e->state() & Qt::LeftButton ) { + if ( e->state() & TQt::LeftButton ) { if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) { draggedItem = itemAt( mousePressPos.y() ); if ( draggedItem == &addItem ) { @@ -847,7 +847,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) // Hide the sub menu of the current item, but do it later if ( currentIndex < (int)itemList.count() ) { PopupMenuEditor *s = itemList.at( currentIndex )->s; - TQTimer::singleShot( 0, s, TQT_SLOT( hide() ) ); + TQTimer::singleShot( 0, s, TQ_SLOT( hide() ) ); } draggedItem = 0; @@ -857,16 +857,16 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) PopupMenuEditorItemPtrDrag::decode( e, &i ); } else { if ( e->provides( "application/x-designer-actiongroup" ) ) { - TQActionGroup * g = ::tqqt_cast<QDesignerActionGroup*>(ActionDrag::action()); + TQActionGroup * g = ::tqt_cast<QDesignerActionGroup*>(ActionDrag::action()); if ( g->usesDropDown() ) { i = new PopupMenuEditorItem( g, this ); TQString n = TQString( g->name() ) + "Item"; formWindow()->unify( i, n, FALSE ); i->setName( n ); - TQObjectList *l = g->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE ); + TQObjectList *l = g->queryList( "TQAction", 0, FALSE, FALSE ); TQObjectListIterator it( *l ); for ( ; it.current(); ++it ) { - g = ::tqqt_cast<TQActionGroup*>(it.current()); + g = ::tqt_cast<TQActionGroup*>(it.current()); if ( g ) i->s->insert( g ); else @@ -877,18 +877,18 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) dropInPlace( g, e->pos().y() ); } } else if ( e->provides( "application/x-designer-actions" ) ) { - TQAction *a = ::tqqt_cast<QDesignerAction*>(ActionDrag::action()); + TQAction *a = ::tqt_cast<QDesignerAction*>(ActionDrag::action()); i = new PopupMenuEditorItem( a, this ); } } if ( i ) { dropInPlace( i, e->pos().y() ); - TQTimer::singleShot( 0, this, TQT_SLOT( resizeToContents() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( resizeToContents() ) ); } - TQTimer::singleShot( 0, this, TQT_SLOT( showSubMenu() ) ); - TQTimer::singleShot( 0, this, TQT_SLOT( setFocus() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( showSubMenu() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( setFocus() ) ); dropLine->hide(); e->accept(); } @@ -1012,12 +1012,12 @@ void PopupMenuEditor::focusInEvent( TQFocusEvent * ) void PopupMenuEditor::focusOutEvent( TQFocusEvent * ) { TQWidget * fw = tqApp->focusWidget(); - if ( !fw || ( !::tqqt_cast<PopupMenuEditor*>(fw) && fw != lineEdit ) ) { + if ( !fw || ( !::tqt_cast<PopupMenuEditor*>(fw) && fw != lineEdit ) ) { hideSubMenu(); - if ( fw && ::tqqt_cast<MenuBarEditor*>(fw) ) + if ( fw && ::tqt_cast<MenuBarEditor*>(fw) ) return; TQWidget * w = this; - while ( w && w != fw && ::tqqt_cast<PopupMenuEditor*>(w) ) { // hide all popups + while ( w && w != fw && ::tqt_cast<PopupMenuEditor*>(w) ) { // hide all popups w->hide(); w = ((PopupMenuEditor *)w)->parentEditor(); } @@ -1034,7 +1034,7 @@ void PopupMenuEditor::drawItem( TQPainter * p, PopupMenuEditorItem * i, p->fillRect( r, colorGroup().brush( TQColorGroup::Background ) ); if ( i->isSeparator() ) { - style().tqdrawPrimitive( TQStyle::PE_Separator, p, + style().drawPrimitive( TQStyle::PE_Separator, p, TQRect( r.x(), r.y() + 2, r.width(), 1 ), colorGroup(), TQStyle::Style_Sunken | f ); return; @@ -1042,7 +1042,7 @@ void PopupMenuEditor::drawItem( TQPainter * p, PopupMenuEditorItem * i, const TQAction * a = i->action(); if ( a->isToggleAction() && a->isOn() ) { - style().tqdrawPrimitive( TQStyle::PE_CheckMark, p, + style().drawPrimitive( TQStyle::PE_CheckMark, p, TQRect( x , y, iconWidth, h ), colorGroup(), f ); } else { @@ -1064,7 +1064,7 @@ void PopupMenuEditor::drawItem( TQPainter * p, PopupMenuEditorItem * i, TQPainter::AlignLeft | TQPainter::AlignVCenter, a->accel() ); if ( i->count() ) // Item has submenu - style().tqdrawPrimitive( TQStyle::PE_ArrowRight, p, + style().drawPrimitive( TQStyle::PE_ArrowRight, p, TQRect( r.width() - arrowWidth, r.y(), arrowWidth, r.height() ), colorGroup(), f ); } @@ -1243,8 +1243,8 @@ void PopupMenuEditor::dropInPlace( TQActionGroup * g, int y ) if (l.isEmpty()) return; for ( int i = 0; i < (int)l.count(); ++i ) { - TQAction *a = ::tqqt_cast<TQAction*>(l.at(i)); - TQActionGroup *g = ::tqqt_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 = ::tqqt_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 = ::tqqt_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/kdevdesigner/designer/popupmenueditor.h b/kdevdesigner/designer/popupmenueditor.h index 714ecf42..cfb42749 100644 --- a/kdevdesigner/designer/popupmenueditor.h +++ b/kdevdesigner/designer/popupmenueditor.h @@ -36,7 +36,7 @@ class TQMenuItem; class PopupMenuEditorItem : public TQObject { - Q_OBJECT + TQ_OBJECT friend class PopupMenuEditor; @@ -100,7 +100,7 @@ class TQLineEdit; class PopupMenuEditor : public TQWidget { - Q_OBJECT + TQ_OBJECT friend class PopupMenuEditorItem; diff --git a/kdevdesigner/designer/preferences.ui b/kdevdesigner/designer/preferences.ui index c00cf82a..c5ee2847 100644 --- a/kdevdesigner/designer/preferences.ui +++ b/kdevdesigner/designer/preferences.ui @@ -636,9 +636,9 @@ <tabstop>checkBoxTextLabels</tabstop> <tabstop>helpButton</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot access="protected">init()</slot> <slot access="protected">destroy()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/previewframe.h b/kdevdesigner/designer/previewframe.h index 1883a062..9c479b06 100644 --- a/kdevdesigner/designer/previewframe.h +++ b/kdevdesigner/designer/previewframe.h @@ -34,7 +34,7 @@ class PreviewWorkspace : public TQWorkspace { - Q_OBJECT + TQ_OBJECT public: PreviewWorkspace( TQWidget* parent = 0, const char* name = 0 ) @@ -47,7 +47,7 @@ protected: class PreviewFrame : public TQVBox { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/previewwidgetimpl.cpp b/kdevdesigner/designer/previewwidgetimpl.cpp index d574f9ae..c3c16e32 100644 --- a/kdevdesigner/designer/previewwidgetimpl.cpp +++ b/kdevdesigner/designer/previewwidgetimpl.cpp @@ -31,13 +31,13 @@ PreviewWidget::PreviewWidget( TQWidget *parent, const char *name ) : PreviewWidgetBase( parent, name ) { // install event filter on child widgets - TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING); + TQObjectList *l = queryList("TQWidget"); TQObjectListIt it(*l); TQObject * obj; while ((obj = it.current()) != 0) { ++it; obj->installEventFilter(this); - ((TQWidget*)obj)->setFocusPolicy(TQ_NoFocus); + ((TQWidget*)obj)->setFocusPolicy(TQWidget::NoFocus); } } diff --git a/kdevdesigner/designer/previewwidgetimpl.h b/kdevdesigner/designer/previewwidgetimpl.h index d8887bee..9a4c092c 100644 --- a/kdevdesigner/designer/previewwidgetimpl.h +++ b/kdevdesigner/designer/previewwidgetimpl.h @@ -31,7 +31,7 @@ class PreviewWidget : public PreviewWidgetBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/project.cpp b/kdevdesigner/designer/project.cpp index 0ab26894..8dcf8b28 100644 --- a/kdevdesigner/designer/project.cpp +++ b/kdevdesigner/designer/project.cpp @@ -1066,7 +1066,7 @@ TQObjectList *Project::formList( bool resolveFakeObjects ) const if ( resolveFakeObjects && f->formWindow()->isFake() ) l->append( objectForFakeForm( f->formWindow() ) ); else - l->append( f->formWindow()->child( 0, TQWIDGET_OBJECT_NAME_STRING ) ); + l->append( f->formWindow()->child( 0, "TQWidget" ) ); } else if ( f->isFake() ) { l->append( objectForFakeFormFile( f ) ); } @@ -1311,9 +1311,9 @@ void Project::addObject( TQObject *o ) if ( MainWindow::self ) { TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(), TQEvent::ChildInserted ); connect( fw, - TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), + TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), MainWindow::self, - TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) + TQ_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); } if ( fw->parentWidget() ) { @@ -1487,9 +1487,9 @@ void Project::designerCreated() if ( !fw || fw->mainWindow() ) continue; fw->setMainWindow( MainWindow::self ); - connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, + connect( fw, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), - MainWindow::self, TQT_SLOT( updateUndoRedo( bool, bool, + MainWindow::self, TQ_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); fw->reparent( MainWindow::self->qWorkspace(), TQPoint( 0, 0 ), FALSE ); TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(), @@ -1514,8 +1514,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 = ::tqqt_cast<FormWindow*>(w); - SourceEditor *se = ::tqqt_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]" ); @@ -1532,7 +1532,7 @@ TQString Project::locationOfObject( TQObject *o ) } } - if ( ::tqqt_cast<SourceFile*>(o) ) { + if ( ::tqt_cast<SourceFile*>(o) ) { for ( TQPtrListIterator<SourceFile> sources = sourceFiles(); sources.current(); ++sources ) { SourceFile* f = sources.current(); diff --git a/kdevdesigner/designer/project.h b/kdevdesigner/designer/project.h index 3e80428f..e2d4ef2d 100644 --- a/kdevdesigner/designer/project.h +++ b/kdevdesigner/designer/project.h @@ -110,7 +110,7 @@ private: class Project : public TQObject { - Q_OBJECT + TQ_OBJECT friend class DatabaseConnection; diff --git a/kdevdesigner/designer/projectsettings.ui b/kdevdesigner/designer/projectsettings.ui index 2e03d928..cac4e813 100644 --- a/kdevdesigner/designer/projectsettings.ui +++ b/kdevdesigner/designer/projectsettings.ui @@ -288,7 +288,7 @@ <tabstop>buttonOk</tabstop> <tabstop>buttonCancel</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot access="protected">chooseDatabaseFile()</slot> <slot access="protected">chooseProjectFile()</slot> <slot access="protected">destroy()</slot> @@ -296,7 +296,7 @@ <slot access="protected">init()</slot> <slot access="protected">languageChanged( const TQString & )</slot> <slot access="protected">okClicked()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <includes> <include location="global" impldecl="in implementation">klineedit.h</include> diff --git a/kdevdesigner/designer/projectsettingsimpl.cpp b/kdevdesigner/designer/projectsettingsimpl.cpp index 99bb800d..77ac4f25 100644 --- a/kdevdesigner/designer/projectsettingsimpl.cpp +++ b/kdevdesigner/designer/projectsettingsimpl.cpp @@ -57,7 +57,7 @@ ProjectSettings::ProjectSettings( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl ) : ProjectSettingsBase( parent, name, modal, fl ), project( pro ) { - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); editProjectFile->setFocus(); diff --git a/kdevdesigner/designer/projectsettingsimpl.h b/kdevdesigner/designer/projectsettingsimpl.h index c1b7fb0c..ad784a3c 100644 --- a/kdevdesigner/designer/projectsettingsimpl.h +++ b/kdevdesigner/designer/projectsettingsimpl.h @@ -36,7 +36,7 @@ class SourceFile; class ProjectSettings : public ProjectSettingsBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp index 10fd4aaf..af1d26d7 100644 --- a/kdevdesigner/designer/propertyeditor.cpp +++ b/kdevdesigner/designer/propertyeditor.cpp @@ -294,7 +294,7 @@ void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg, void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r ) { p->save(); - TQApplication::style().tqdrawPrimitive(TQStyle::PE_Panel, p, r, cg, + TQApplication::style().drawPrimitive(TQStyle::PE_Panel, p, r, cg, TQStyle::Style_Sunken, TQStyleOption(1,1) ); p->restore(); } @@ -417,8 +417,8 @@ void PropertyItem::createResetButton() hbox->layout()->setAlignment( TQt::AlignRight ); listview->addChild( hbox ); hbox->hide(); - TQObject::connect( resetButton, TQT_SIGNAL( clicked() ), - listview, TQT_SLOT( resetProperty() ) ); + TQObject::connect( resetButton, TQ_SIGNAL( clicked() ), + listview, TQ_SLOT( resetProperty() ) ); TQToolTip::add( resetButton, i18n( "Reset the property to its default value" ) ); TQWhatsThis::add( resetButton, i18n( "Click this button to reset the property to its default value" ) ); updateResetButtonState(); @@ -555,7 +555,7 @@ void PropertyItem::setFocus( TQWidget *w ) { if ( !tqApp->focusWidget() || listview->propertyEditor()->formWindow() && - ( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->focusWidget()) ) && + ( !MainWindow::self->isAFormWindowChild( tqApp->focusWidget() ) && !tqApp->focusWidget()->inherits( "Editor" ) ) ) w->setFocus(); } @@ -598,7 +598,7 @@ TQLineEdit *PropertyTextItem::lined() if ( asciiOnly ) { if ( PropertyItem::name() == "name" ) { - lin->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(lin), "ascii_validator" ) ); + lin->setValidator( new AsciiValidator( TQString(":"), lin, "ascii_validator" ) ); if ( listview->propertyEditor()->formWindow()->isFake() ) lin->setEnabled( FALSE ); } else { @@ -606,7 +606,7 @@ TQLineEdit *PropertyTextItem::lined() "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9" "\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3" "\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc" - "\xbd\xbe\xbf"), TQT_TQOBJECT(lin), "ascii_validator" ) ); + "\xbd\xbe\xbf"), lin, "ascii_validator" ) ); } } if ( !hasMultiLines ) { lin->hide(); @@ -614,18 +614,18 @@ TQLineEdit *PropertyTextItem::lined() button = new TQPushButton( "...", box ); setupStyle( button ); button->setFixedWidth( 20 ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getText() ) ); + connect( button, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( getText() ) ); lin->setFrame( FALSE ); } - connect( lin, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( setValue() ) ); - connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( setValue() ) ); + connect( lin, TQ_SIGNAL( returnPressed() ), + this, TQ_SLOT( setValue() ) ); + connect( lin, TQ_SIGNAL( textChanged( const TQString & ) ), + this, TQ_SLOT( setValue() ) ); if ( PropertyItem::name() == "name" || PropertyItem::name() == "itemName" ) - connect( lin, TQT_SIGNAL( returnPressed() ), + connect( lin, TQ_SIGNAL( returnPressed() ), listview->propertyEditor()->formWindow()->commandHistory(), - TQT_SLOT( checkCompressedCommand() ) ); + TQ_SLOT( checkCompressedCommand() ) ); lin->installEventFilter( listview ); return lin; } @@ -753,7 +753,7 @@ void PropertyTextItem::setValue() void PropertyTextItem::getText() { - bool richText = !::tqqt_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 ); @@ -781,12 +781,12 @@ TQLineEdit *PropertyDoubleItem::lined() if ( lin ) return lin; lin = new TQLineEdit( listview->viewport() ); - lin->setValidator( new TQDoubleValidator( TQT_TQOBJECT(lin), "double_validator" ) ); + lin->setValidator( new TQDoubleValidator( lin, "double_validator" ) ); - connect( lin, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( setValue() ) ); - connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( setValue() ) ); + connect( lin, TQ_SIGNAL( returnPressed() ), + this, TQ_SLOT( setValue() ) ); + connect( lin, TQ_SIGNAL( textChanged( const TQString & ) ), + this, TQ_SLOT( setValue() ) ); lin->installEventFilter( listview ); return lin; } @@ -861,12 +861,12 @@ TQDateEdit *PropertyDateItem::lined() if ( lin ) return lin; lin = new TQDateEdit( listview->viewport() ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + TQObjectList *l = lin->queryList( "TQLineEdit" ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; - connect( lin, TQT_SIGNAL( valueChanged( const TQDate & ) ), - this, TQT_SLOT( setValue() ) ); + connect( lin, TQ_SIGNAL( valueChanged( const TQDate & ) ), + this, TQ_SLOT( setValue() ) ); return lin; } @@ -910,13 +910,13 @@ void PropertyDateItem::setValue( const TQVariant &v ) lined()->setDate( v.toDate() ); lined()->blockSignals( FALSE ); } - setText( 1, v.toDate().toString( ::Qt::ISODate ) ); + setText( 1, v.toDate().toString( ::TQt::ISODate ) ); PropertyItem::setValue( v ); } void PropertyDateItem::setValue() { - setText( 1, lined()->date().toString( ::Qt::ISODate ) ); + setText( 1, lined()->date().toString( ::TQt::ISODate ) ); TQVariant v; v = lined()->date(); PropertyItem::setValue( v ); @@ -936,9 +936,9 @@ TQTimeEdit *PropertyTimeItem::lined() if ( lin ) return lin; lin = new TQTimeEdit( listview->viewport() ); - connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ), - this, TQT_SLOT( setValue() ) ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + connect( lin, TQ_SIGNAL( valueChanged( const TQTime & ) ), + this, TQ_SLOT( setValue() ) ); + TQObjectList *l = lin->queryList( "TQLineEdit" ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; @@ -985,13 +985,13 @@ void PropertyTimeItem::setValue( const TQVariant &v ) lined()->setTime( v.toTime() ); lined()->blockSignals( FALSE ); } - setText( 1, v.toTime().toString( ::Qt::ISODate ) ); + setText( 1, v.toTime().toString( ::TQt::ISODate ) ); PropertyItem::setValue( v ); } void PropertyTimeItem::setValue() { - setText( 1, lined()->time().toString( ::Qt::ISODate ) ); + setText( 1, lined()->time().toString( ::TQt::ISODate ) ); TQVariant v; v = lined()->time(); PropertyItem::setValue( v ); @@ -1011,9 +1011,9 @@ TQDateTimeEdit *PropertyDateTimeItem::lined() if ( lin ) return lin; lin = new TQDateTimeEdit( listview->viewport() ); - connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ), - this, TQT_SLOT( setValue() ) ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + connect( lin, TQ_SIGNAL( valueChanged( const TQDateTime & ) ), + this, TQ_SLOT( setValue() ) ); + TQObjectList *l = lin->queryList( "TQLineEdit" ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; @@ -1060,13 +1060,13 @@ void PropertyDateTimeItem::setValue( const TQVariant &v ) lined()->setDateTime( v.toDateTime() ); lined()->blockSignals( FALSE ); } - setText( 1, v.toDateTime().toString( ::Qt::ISODate ) ); + setText( 1, v.toDateTime().toString( ::TQt::ISODate ) ); PropertyItem::setValue( v ); } void PropertyDateTimeItem::setValue() { - setText( 1, lined()->dateTime().toString( ::Qt::ISODate ) ); + setText( 1, lined()->dateTime().toString( ::TQt::ISODate ) ); TQVariant v; v = lined()->dateTime(); PropertyItem::setValue( v ); @@ -1089,8 +1089,8 @@ TQComboBox *PropertyBoolItem::combo() comb->hide(); comb->insertItem( i18n( "False" ) ); comb->insertItem( i18n( "True" ) ); - connect( comb, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( setValue() ) ); + connect( comb, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( setValue() ) ); comb->installEventFilter( listview ); return comb; } @@ -1182,12 +1182,12 @@ TQSpinBox *PropertyIntItem::spinBox() spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() ); spinBx->hide(); spinBx->installEventFilter( listview ); - TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + TQObjectList *ol = spinBx->queryList( "TQLineEdit" ); if ( ol && ol->first() ) ol->first()->installEventFilter( listview ); delete ol; - connect( spinBx, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( setValue() ) ); + connect( spinBx, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( setValue() ) ); return spinBx; } @@ -1278,12 +1278,12 @@ TQSpinBox* PropertyLayoutItem::spinBox() spinBx->setSpecialValueText( i18n( "default" ) ); spinBx->hide(); spinBx->installEventFilter( listview ); - TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + TQObjectList *ol = spinBx->queryList( "TQLineEdit" ); if ( ol && ol->first() ) ol->first()->installEventFilter( listview ); delete ol; - connect( spinBx, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( setValue() ) ); + connect( spinBx, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( setValue() ) ); return spinBx; } @@ -1347,11 +1347,11 @@ TQComboBox *PropertyListItem::combo() return comb; comb = new TQComboBox( editable, listview->viewport() ); comb->hide(); - connect( comb, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( setValue() ) ); + connect( comb, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( setValue() ) ); comb->installEventFilter( listview ); if ( editable ) { - TQObjectList *ol = comb->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + TQObjectList *ol = comb->queryList( "TQLineEdit" ); if ( ol && ol->first() ) ol->first()->installEventFilter( listview ); delete ol; @@ -1644,8 +1644,8 @@ PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, Pr box->setLineWidth( 2 ); pixPrev->setFrameStyle( TQFrame::NoFrame ); box->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getPixmap() ) ); + connect( button, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( getPixmap() ) ); } PropertyPixmapItem::~PropertyPixmapItem() @@ -1747,8 +1747,8 @@ PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, Prop pal.setDisabled( cg ); colorPrev->setPalette( pal ); box->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getColor() ) ); + connect( button, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( getColor() ) ); } void PropertyColorItem::createChildren() @@ -1869,8 +1869,8 @@ PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, Proper box->installEventFilter( listview ); lined->installEventFilter( listview ); button->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getFont() ) ); + connect( button, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( getFont() ) ); } void PropertyFontItem::createChildren() @@ -2026,13 +2026,13 @@ void PropertyDatabaseItem::initChildren() else if ( lst.count() > 0 ) item->setValue( TQStringList( lst[ 0 ] ) ); else if ( withField ) - item->setValue( TQStringList( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), + item->setValue( TQStringList( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList()[ 0 ] ) ); if ( lst.count() > 0 && !lst[ 0 ].isEmpty() ) item->setCurrentItem( lst[ 0 ] ); else if ( !isChanged() && withField ) - item->setCurrentItem( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), + item->setCurrentItem( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList()[ 0 ] ); else item->setCurrentItem( 0 ); @@ -2044,7 +2044,7 @@ void PropertyDatabaseItem::initChildren() else if ( lst.count() > 1 ) item->setValue( TQStringList( lst[ 1 ] ) ); else if ( withField ) { - TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); + TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList(); if ( fakeLst.count() > 1 ) item->setValue( fakeLst[ 1 ] ); } @@ -2052,7 +2052,7 @@ void PropertyDatabaseItem::initChildren() if ( lst.count() > 1 && !lst[ 1 ].isEmpty() ) item->setCurrentItem( lst[ 1 ] ); else if ( !isChanged() && withField ) { - TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); + TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList(); if ( fakeLst.count() > 1 ) item->setCurrentItem( fakeLst[ 1 ] ); else @@ -2269,8 +2269,8 @@ PropertyPaletteItem::PropertyPaletteItem( PropertyList *l, PropertyItem *after, box->setLineWidth( 2 ); palettePrev->setFrameStyle( TQFrame::NoFrame ); box->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getPalette() ) ); + connect( button, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( getPalette() ) ); } PropertyPaletteItem::~PropertyPaletteItem() { @@ -2307,14 +2307,10 @@ void PropertyPaletteItem::getPalette() return; bool ok = FALSE; TQWidget *w = (TQWidget*)listview->propertyEditor()->widget(); - if ( ::tqqt_cast<TQScrollView*>(w) ) + if ( ::tqt_cast<TQScrollView*>(w) ) w = ( (TQScrollView*)w )->viewport(); TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(), -#if defined(TQT_NON_COMMERCIAL) - w->backgroundMode(), listview->topLevelWidget(), -#else w->backgroundMode(), listview, -#endif "choose_palette", listview->propertyEditor()->formWindow() ); if ( !ok ) return; @@ -2395,8 +2391,8 @@ TQComboBox *PropertyCursorItem::combo() comb->insertItem( HandPix, i18n("Pointing Hand"), TQObject::PointingHandCursor ); comb->insertItem( NoPix, i18n("Forbidden"), TQObject::ForbiddenCursor ); - connect( comb, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( setValue() ) ); + connect( comb, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( setValue() ) ); comb->installEventFilter( listview ); return comb; } @@ -2463,8 +2459,8 @@ PropertyKeysequenceItem::PropertyKeysequenceItem( PropertyList *l, box = new TQHBox( listview->viewport() ); box->hide(); sequence = new TQLineEdit( box ); - connect( sequence, TQT_SIGNAL(textChanged( const TQString & )), - this, TQT_SLOT(setValue()) ); + connect( sequence, TQ_SIGNAL(textChanged( const TQString & )), + this, TQ_SLOT(setValue()) ); sequence->installEventFilter( this ); } @@ -2658,8 +2654,8 @@ EnumBox::EnumBox( TQWidget *parent, const char *name ) : TQComboBox( parent, name ) { pop = new EnumPopup( this, "popup", TQObject::WType_Popup ); - connect( pop, TQT_SIGNAL( hidden() ), this, TQT_SLOT( popupHidden() ) ); - connect( pop, TQT_SIGNAL( closed() ), this, TQT_SLOT( popupClosed() ) ); + connect( pop, TQ_SIGNAL( hidden() ), this, TQ_SLOT( popupHidden() ) ); + connect( pop, TQ_SIGNAL( closed() ), this, TQ_SLOT( popupClosed() ) ); popupShown = FALSE; arrowDown = FALSE; } @@ -2739,7 +2735,7 @@ void EnumBox::popup() void EnumBox::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() != Qt::LeftButton ) + if ( e->button() != TQt::LeftButton ) return; TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, @@ -2754,14 +2750,14 @@ void EnumBox::mousePressEvent( TQMouseEvent *e ) } popup(); - TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) ); + TQTimer::singleShot( 100, this, TQ_SLOT( restoreArrow() ) ); } void EnumBox::keyPressEvent( TQKeyEvent *e ) { if ( e->key() == Key_Space ) { popup(); - TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) ); + TQTimer::singleShot( 100, this, TQ_SLOT( restoreArrow() ) ); } else if ( e->key() == Key_Enter || e->key() == Key_Return ) { popup(); } @@ -2790,8 +2786,8 @@ PropertyEnumItem::PropertyEnumItem( PropertyList *l, box = new EnumBox( listview->viewport() ); box->hide(); box->installEventFilter( listview ); - connect( box, TQT_SIGNAL( aboutToShowPopup() ), this, TQT_SLOT( insertEnums() ) ); - connect( box, TQT_SIGNAL( valueChanged() ), this, TQT_SLOT( setValue() ) ); + connect( box, TQ_SIGNAL( aboutToShowPopup() ), this, TQ_SLOT( insertEnums() ) ); + connect( box, TQ_SIGNAL( valueChanged() ), this, TQ_SLOT( setValue() ) ); } PropertyEnumItem::~PropertyEnumItem() @@ -2921,16 +2917,16 @@ PropertyList::PropertyList( PropertyEditor *e ) viewport()->installEventFilter( this ); addColumn( i18n( "Property" ) ); addColumn( i18n( "Value" ) ); - connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ), - this, TQT_SLOT( updateEditorSize() ) ); - disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), - this, TQT_SLOT( changeSortColumn( int ) ) ); - connect( header(), TQT_SIGNAL( sectionClicked( int ) ), - this, TQT_SLOT( toggleSort() ) ); - connect( this, TQT_SIGNAL( pressed( TQListViewItem *, const TQPoint &, int ) ), - this, TQT_SLOT( itemPressed( TQListViewItem *, const TQPoint &, int ) ) ); - connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - this, TQT_SLOT( toggleOpen( TQListViewItem * ) ) ); + connect( header(), TQ_SIGNAL( sizeChange( int, int, int ) ), + this, TQ_SLOT( updateEditorSize() ) ); + disconnect( header(), TQ_SIGNAL( sectionClicked( int ) ), + this, TQ_SLOT( changeSortColumn( int ) ) ); + connect( header(), TQ_SIGNAL( sectionClicked( int ) ), + this, TQ_SLOT( toggleSort() ) ); + connect( this, TQ_SIGNAL( pressed( TQListViewItem *, const TQPoint &, int ) ), + this, TQ_SLOT( itemPressed( TQListViewItem *, const TQPoint &, int ) ) ); + connect( this, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQ_SLOT( toggleOpen( TQListViewItem * ) ) ); setSorting( -1 ); setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); @@ -3023,7 +3019,7 @@ static bool parent_is_data_aware( TQWidget *w ) { TQWidget *p = w ? w->parentWidget() : 0; while ( p && !p->isTopLevel() ) { - if ( ::tqqt_cast<QDesignerDataBrowser*>(p) || ::tqqt_cast<QDesignerDataView*>(p) ) + if ( ::tqt_cast<QDesignerDataBrowser*>(p) || ::tqt_cast<QDesignerDataView*>(p) ) return TRUE; p = p->parentWidget(); } @@ -3039,7 +3035,7 @@ void PropertyList::setupProperties() { if ( !editor->widget() ) return; - bool allProperties = !::tqqt_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,7 +3043,7 @@ void PropertyList::setupProperties() TQStringList valueSet; bool parentHasLayout = w->isWidgetType() && - !editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->parentWidget() && + !editor->formWindow()->isMainContainer( w ) && ( (TQWidget*)w )->parentWidget() && WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { const TQMetaProperty* p = @@ -3057,8 +3053,8 @@ void PropertyList::setupProperties() continue; if ( unique.contains( TQString::fromLatin1( it.current() ) ) ) continue; - if ( ::tqqt_cast<QDesignerToolBar*>(editor->widget()) || - ::tqqt_cast<MenuBarEditor*>(editor->widget()) ) { + if ( ::tqt_cast<QDesignerToolBar*>(editor->widget()) || + ::tqt_cast<MenuBarEditor*>(editor->widget()) ) { if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) continue; if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) @@ -3078,7 +3074,7 @@ void PropertyList::setupProperties() } unique.insert( TQString::fromLatin1( it.current() ), TRUE ); if ( editor->widget()->isWidgetType() && - editor->formWindow()->isMainContainer( TQT_TQOBJECT(editor->widget()) ) ) { + editor->formWindow()->isMainContainer( editor->widget() ) ) { if ( qstrcmp( p->name(), "geometry" ) == 0 ) continue; } else { // hide some toplevel-only stuff @@ -3094,7 +3090,7 @@ void PropertyList::setupProperties() continue; if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) continue; - if ( ::tqqt_cast<TQLayoutWidget*>(w) || ::tqqt_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 ) @@ -3137,7 +3133,7 @@ void PropertyList::setupProperties() continue; } } - if ( ::tqqt_cast<TQActionGroup*>(w) ) { + if ( ::tqt_cast<TQActionGroup*>(w) ) { if ( qstrcmp( p->name(), "usesDropDown" ) == 0 ) continue; if ( qstrcmp( p->name(), "toggleAction" ) == 0 ) @@ -3154,7 +3150,7 @@ void PropertyList::setupProperties() if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in TQ_PROPERTY can take a function (isInButtonGroup() in this case) if ( !editor->widget()->isWidgetType() || !editor->widget()->parent() || - !::tqqt_cast<TQButtonGroup*>(editor->widget()->parent()) ) + !::tqt_cast<TQButtonGroup*>(editor->widget()->parent()) ) continue; } @@ -3176,7 +3172,7 @@ void PropertyList::setupProperties() setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) ) item->setChanged( TRUE, FALSE ); - if ( !::tqqt_cast<TQMultiLineEdit*>(editor->widget()) ) { + if ( !::tqt_cast<TQMultiLineEdit*>(editor->widget()) ) { lst.clear(); lst << p->valueToKey( AlignTop ) << p->valueToKey( AlignVCenter ) @@ -3187,7 +3183,7 @@ void PropertyList::setupProperties() if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) ) item->setChanged( TRUE, FALSE ); item = new PropertyBoolItem( this, item, 0, "wordwrap" ); - if ( ::tqqt_cast<TQGroupBox*>(w) ) + if ( ::tqt_cast<TQGroupBox*>(w) ) item->setVisible( FALSE ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) ) @@ -3235,7 +3231,7 @@ void PropertyList::setupProperties() } } - if ( !::tqqt_cast<TQSplitter*>(w) && !::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<QDesignerToolBar*>(w) && + if ( !::tqt_cast<TQSplitter*>(w) && !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<QDesignerToolBar*>(w) && w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" ); setPropertyValue( item ); @@ -3252,8 +3248,8 @@ void PropertyList::setupProperties() else layoutInitValue( item ); TQWidget *widget = (TQWidget*)w; - if ( ( !::tqqt_cast<TQLayoutWidget*>(widget) && - widget->parentWidget() && ::tqqt_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"; @@ -3268,8 +3264,8 @@ void PropertyList::setupProperties() } } - if ( !::tqqt_cast<Spacer*>(w) && !::tqqt_cast<TQLayoutWidget*>(w) && - !::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<QDesignerToolBar*>(w) ) { + if ( !::tqt_cast<Spacer*>(w) && !::tqt_cast<TQLayoutWidget*>(w) && + !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<QDesignerToolBar*>(w) ) { item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) @@ -3281,16 +3277,16 @@ void PropertyList::setupProperties() } #ifndef TQT_NO_SQL - if ( !::tqqt_cast<TQDataTable*>(editor->widget()) && !::tqqt_cast<TQDataBrowser*>(editor->widget()) && - !::tqqt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::tqqt_cast<TQWidget*>(editor->widget()) ) ) { - item = new PropertyDatabaseItem( this, item, 0, "database", TQT_BASE_OBJECT(editor->formWindow()->mainContainer()) != TQT_BASE_OBJECT(w) ); + 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 ( ::tqqt_cast<TQDataTable*>(editor->widget()) || ::tqqt_cast<TQDataBrowser*>(editor->widget()) || - ::tqqt_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" ) ) @@ -3373,14 +3369,14 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, switch ( t ) { case TQVariant::String: item = new PropertyTextItem( this, item, 0, name, TRUE, - ::tqqt_cast<TQLabel*>(editor->widget()) || - ::tqqt_cast<TQTextView*>(editor->widget()) || - ::tqqt_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, name, name == "name" && - TQT_BASE_OBJECT(editor->widget()) == TQT_BASE_OBJECT(editor->formWindow()->mainContainer()), + editor->widget() == editor->formWindow()->mainContainer(), FALSE, TRUE ); break; case TQVariant::Bool: @@ -3546,15 +3542,15 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) else if ( e->type() == TQEvent::MouseButtonPress ) theLastEvent = MouseEvent; - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) &&e->type() == TQEvent::KeyPress ) { + if ( o != this &&e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) && - ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(viewport()) ) && + ( o != this || o != viewport() ) && !( ke->state() & ControlButton ) ) { TQApplication::sendEvent( this, (TQKeyEvent*)e ); return TRUE; - } else if ( ( !::tqqt_cast<TQLineEdit*>(o) || - ( ::tqqt_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 || @@ -3564,21 +3560,21 @@ 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 ) && ::tqqt_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 && ::tqqt_cast<TQLineEdit*>(o) && editor->formWindow() ) { - TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) ); - } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) { + } else if ( e->type() == TQEvent::FocusOut && ::tqt_cast<TQLineEdit*>(o) && editor->formWindow() ) { + TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQ_SLOT( checkCompressedCommand() ) ); + } else if ( o == viewport() ) { TQMouseEvent *me; PropertyListItem* i; switch ( e->type() ) { case TQEvent::MouseButtonPress: me = (TQMouseEvent*)e; i = (PropertyListItem*) itemAt( me->pos() ); - if ( i && ( ::tqqt_cast<PropertyColorItem*>(i) || ::tqqt_cast<PropertyPixmapItem*>(i) ) ) { + if ( i && ( ::tqt_cast<PropertyColorItem*>(i) || ::tqt_cast<PropertyPixmapItem*>(i) ) ) { pressItem = i; pressPos = me->pos(); mousePressed = TRUE; @@ -3586,13 +3582,13 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::MouseMove: me = (TQMouseEvent*)e; - if ( me && me->state() & Qt::LeftButton && mousePressed) { + if ( me && me->state() & TQt::LeftButton && mousePressed) { i = (PropertyListItem*) itemAt( me->pos() ); if ( i && i == pressItem ) { if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){ - if ( ::tqqt_cast<PropertyColorItem*>(i) ) { + if ( ::tqt_cast<PropertyColorItem*>(i) ) { TQColor col = i->value().asColor(); TQColorDrag *drg = new TQColorDrag( col, this ); TQPixmap pix( 25, 25 ); @@ -3604,7 +3600,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) mousePressed = FALSE; drg->dragCopy(); } - else if ( ::tqqt_cast<PropertyPixmapItem*>(i) ) { + else if ( ::tqt_cast<PropertyPixmapItem*>(i) ) { TQPixmap pix = i->value().asPixmap(); if( !pix.isNull() ) { TQImage img = pix.convertToImage(); @@ -3621,7 +3617,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) default: break; } - } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) ) { + } else if ( o == header() ) { if ( e->type() == TQEvent::ContextMenu ) { ((TQContextMenuEvent *)e)->accept(); TQPopupMenu menu( 0 ); @@ -3716,11 +3712,11 @@ void PropertyList::setPropertyValue( PropertyItem *i ) else i->setValue( TQVariant( false ) ); } else if ( i->name() == "layoutSpacing" ) { - ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); + ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ) )); } else if ( i->name() == "layoutMargin" ) { - ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); + ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ) )); } else if ( i->name() == "resizeMode" ) { - ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) )) ); + ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ) ) ); } else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) { i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); } else if ( editor->widget()->inherits( "CustomWidget" ) ) { @@ -3790,9 +3786,9 @@ void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e ) return; } - if ( ::tqqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) + if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) e->accept(); - else if ( ::tqqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) + else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) e->accept(); else e->ignore(); @@ -3806,9 +3802,9 @@ void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e ) return; } - if ( ::tqqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) + if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) e->accept(); - else if ( ::tqqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) + else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) e->accept(); else e->ignore(); @@ -3822,14 +3818,14 @@ void PropertyList::viewportDropEvent ( TQDropEvent *e ) return; } - if ( ::tqqt_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 ( ::tqqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) { + else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) { TQImage img; TQImageDrag::decode( e, img ); TQPixmap pm; @@ -3922,8 +3918,8 @@ EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e ) header()->hide(); removeColumn( 1 ); setRootIsDecorated( TRUE ); - connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), - this, TQT_SLOT( renamed( TQListViewItem * ) ) ); + connect( this, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), + this, TQ_SLOT( renamed( TQListViewItem * ) ) ); } TQString clean_arguments( const TQString &s ) @@ -3970,7 +3966,7 @@ void EventList::setup() it.current(), TQString(), TQString() ); eventItem->setOpen( TRUE ); TQValueList<MetaDataBase::Connection> conns = - MetaDataBase::connections( TQT_TQOBJECT(formWindow), TQT_TQOBJECT(editor->widget()), TQT_TQOBJECT(formWindow->mainContainer()) ); + MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() ); HierarchyItem *item = 0; for ( TQValueList<MetaDataBase::Connection>::Iterator cit = conns.begin(); cit != conns.end(); ++cit ) { @@ -4046,7 +4042,7 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) } else if ( res == DEL_ITEM && i->parent() ) { MetaDataBase::Connection conn; conn.sender = editor->widget(); - conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); + conn.receiver = formWindow->mainContainer(); conn.signal = i->parent()->text( 0 ); conn.slot = i->text( 0 ); delete i; @@ -4080,7 +4076,7 @@ void EventList::renamed( TQListViewItem *i ) } else { MetaDataBase::Connection conn; conn.sender = editor->widget(); - conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); + conn.receiver = formWindow->mainContainer(); conn.signal = i->parent()->text( 0 ); conn.slot = i->text( 0 ); AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Connection" ), diff --git a/kdevdesigner/designer/propertyeditor.h b/kdevdesigner/designer/propertyeditor.h index 7b7eccd8..93d8c71b 100644 --- a/kdevdesigner/designer/propertyeditor.h +++ b/kdevdesigner/designer/propertyeditor.h @@ -138,7 +138,7 @@ private: class PropertyTextItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -175,7 +175,7 @@ private: class PropertyBoolItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -200,7 +200,7 @@ private: class PropertyIntItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -226,7 +226,7 @@ private: class PropertyLayoutItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -251,7 +251,7 @@ private: class PropertyDoubleItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -275,7 +275,7 @@ private: class PropertyListItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -311,7 +311,7 @@ private: class PropertyFontItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -341,7 +341,7 @@ private: class PropertyCoordItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -371,7 +371,7 @@ private: class PropertyColorItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -406,7 +406,7 @@ private: class PropertyPixmapItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -439,7 +439,7 @@ private: class PropertySizePolicyItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -466,7 +466,7 @@ private: class PropertyPaletteItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -495,7 +495,7 @@ private: class PropertyCursorItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -520,7 +520,7 @@ private: class PropertyKeysequenceItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -551,7 +551,7 @@ private: class PropertyDatabaseItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -589,7 +589,7 @@ struct EnumItem { class EnumPopup : public TQFrame { - Q_OBJECT + TQ_OBJECT public: @@ -614,7 +614,7 @@ private: class EnumBox : public TQComboBox { - Q_OBJECT + TQ_OBJECT public: @@ -649,7 +649,7 @@ private: class PropertyEnumItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -676,7 +676,7 @@ private: class PropertyList : public TQListView { - Q_OBJECT + TQ_OBJECT public: @@ -739,7 +739,7 @@ private: class EventList : public HierarchyList { - Q_OBJECT + TQ_OBJECT public: @@ -767,7 +767,7 @@ private: class PropertyEditor : public TQTabWidget { - Q_OBJECT + TQ_OBJECT public: @@ -819,7 +819,7 @@ private: class PropertyDateItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -843,7 +843,7 @@ private: class PropertyTimeItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: @@ -867,7 +867,7 @@ private: class PropertyDateTimeItem : public TQObject, public PropertyItem { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/propertyobject.cpp b/kdevdesigner/designer/propertyobject.cpp index 1bd1883f..70629f31 100644 --- a/kdevdesigner/designer/propertyobject.cpp +++ b/kdevdesigner/designer/propertyobject.cpp @@ -38,7 +38,7 @@ PropertyObject::PropertyObject( const TQWidgetList &objs ) v.resize( objects.count() ); v.setAutoDelete( TRUE ); - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { + for ( TQObject *o = objects.first(); o; o = objects.next() ) { const TQMetaObject *m = o->metaObject(); TQPtrList<TQMetaObject> *mol = new TQPtrList<TQMetaObject>; while ( m ) { @@ -74,7 +74,7 @@ PropertyObject::PropertyObject( const TQWidgetList &objs ) bool PropertyObject::setProperty( const char *name, const TQVariant& value ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) o->setProperty( name, value ); return TRUE; @@ -87,13 +87,13 @@ TQVariant PropertyObject::property( const char *name ) const void PropertyObject::mdPropertyChanged( const TQString &property, bool changed ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) MetaDataBase::setPropertyChanged( o, property, changed ); } bool PropertyObject::mdIsPropertyChanged( const TQString &property ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { + for ( TQObject *o = objects.first(); o; o = objects.next() ) { if ( MetaDataBase::isPropertyChanged( o, property ) ) return TRUE; } @@ -102,29 +102,29 @@ bool PropertyObject::mdIsPropertyChanged( const TQString &property ) void PropertyObject::mdSetPropertyComment( const TQString &property, const TQString &comment ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) MetaDataBase::setPropertyComment( o, property, comment ); } TQString PropertyObject::mdPropertyComment( const TQString &property ) { - return MetaDataBase::propertyComment( TQT_TQOBJECT(objects.first()), property ); + return MetaDataBase::propertyComment( objects.first(), property ); } void PropertyObject::mdSetFakeProperty( const TQString &property, const TQVariant &value ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) MetaDataBase::setFakeProperty( o, property, value ); } TQVariant PropertyObject::mdFakeProperty( const TQString &property ) { - return MetaDataBase::fakeProperty( TQT_TQOBJECT(objects.first()), property ); + return MetaDataBase::fakeProperty( objects.first(), property ); } void PropertyObject::mdSetCursor( const TQCursor &c ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) { + for ( TQObject *o = objects.first(); o; o = objects.next() ) { if ( o->isWidgetType() ) MetaDataBase::setCursor( (TQWidget*)o, c ); } @@ -137,22 +137,22 @@ TQCursor PropertyObject::mdCursor() void PropertyObject::mdSetPixmapKey( int pixmap, const TQString &arg ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) MetaDataBase::setPixmapKey( o, pixmap, arg ); } TQString PropertyObject::mdPixmapKey( int pixmap ) { - return MetaDataBase::pixmapKey( TQT_TQOBJECT(objects.first()), pixmap ); + return MetaDataBase::pixmapKey( objects.first(), pixmap ); } void PropertyObject::mdSetExportMacro( const TQString ¯o ) { - for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) + for ( TQObject *o = objects.first(); o; o = objects.next() ) MetaDataBase::setExportMacro( o, macro ); } TQString PropertyObject::mdExportMacro() { - return MetaDataBase::exportMacro( TQT_TQOBJECT(objects.first()) ); + return MetaDataBase::exportMacro( objects.first() ); } diff --git a/kdevdesigner/designer/qcompletionedit.cpp b/kdevdesigner/designer/qcompletionedit.cpp index ed0c986e..87a40ecf 100644 --- a/kdevdesigner/designer/qcompletionedit.cpp +++ b/kdevdesigner/designer/qcompletionedit.cpp @@ -45,8 +45,8 @@ QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name ) listbox->setHScrollBarMode( TQScrollView::AlwaysOn ); listbox->setVScrollBarMode( TQScrollView::AlwaysOn ); listbox->setCornerWidget( new TQSizeGrip( listbox, "completion sizegrip" ) ); - connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( textDidChange( const TQString & ) ) ); + connect( this, TQ_SIGNAL( textChanged( const TQString & ) ), + this, TQ_SLOT( textDidChange( const TQString & ) ) ); popup->setFocusProxy( listbox ); installEventFilter( this ); } @@ -116,7 +116,7 @@ void QCompletionEdit::updateListBox() bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) { - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(popup) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox->viewport()) ) { + if ( o == popup || o == listbox || o == listbox->viewport() ) { if ( e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) { @@ -159,7 +159,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) emit chosen( text() ); return TRUE; } - } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) { + } else if ( o == this ) { if ( e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; if ( ke->key() == Key_Up || diff --git a/kdevdesigner/designer/qcompletionedit.h b/kdevdesigner/designer/qcompletionedit.h index 5c3f7fe1..c16644e8 100644 --- a/kdevdesigner/designer/qcompletionedit.h +++ b/kdevdesigner/designer/qcompletionedit.h @@ -35,7 +35,7 @@ class TQVBox; class QCompletionEdit : public TQLineEdit { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool autoAdd READ autoAdd WRITE setAutoAdd ) TQ_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive ) diff --git a/kdevdesigner/designer/replacedialog.ui b/kdevdesigner/designer/replacedialog.ui index 27d01a58..e983e9d3 100644 --- a/kdevdesigner/designer/replacedialog.ui +++ b/kdevdesigner/designer/replacedialog.ui @@ -307,12 +307,12 @@ <variable>EditorInterface *editor;</variable> <variable>TQObject *formWindow;</variable> </variables> -<Q_SLOTS> +<slots> <slot>init()</slot> <slot>destroy()</slot> <slot>doReplace()</slot> <slot>doReplaceAll()</slot> <slot>setEditor( EditorInterface * e, TQObject * fw )</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp index f86490c4..18b00d30 100644 --- a/kdevdesigner/designer/resource.cpp +++ b/kdevdesigner/designer/resource.cpp @@ -112,87 +112,87 @@ static struct { int key; const char* name; } keyname[] = { - { TQt::Key_Space, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Space" ) }, - { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Esc" ) }, - { TQt::Key_Tab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Tab" ) }, - { TQt::Key_Backtab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backtab" ) }, - { TQt::Key_Backspace, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backspace" ) }, - { TQt::Key_Return, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Return" ) }, - { TQt::Key_Enter, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Enter" ) }, - { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Ins" ) }, - { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Del" ) }, - { TQt::Key_Pause, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Pause" ) }, - { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print" ) }, - { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "SysReq" ) }, - { TQt::Key_Home, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, - { TQt::Key_End, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "End" ) }, - { TQt::Key_Left, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Left" ) }, - { TQt::Key_Up, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Up" ) }, - { TQt::Key_Right, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Right" ) }, - { TQt::Key_Down, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Down" ) }, - { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgUp" ) }, - { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgDown" ) }, - { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "CapsLock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "NumLock" ) }, - { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "ScrollLock" ) }, - { TQt::Key_Menu, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Menu" ) }, - { TQt::Key_Help, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Help" ) }, + { TQt::Key_Space, TQT_TRANSLATE_NOOP( "TQAccel", "Space" ) }, + { TQt::Key_Escape, TQT_TRANSLATE_NOOP( "TQAccel", "Esc" ) }, + { TQt::Key_Tab, TQT_TRANSLATE_NOOP( "TQAccel", "Tab" ) }, + { TQt::Key_Backtab, TQT_TRANSLATE_NOOP( "TQAccel", "Backtab" ) }, + { TQt::Key_Backspace, TQT_TRANSLATE_NOOP( "TQAccel", "Backspace" ) }, + { TQt::Key_Return, TQT_TRANSLATE_NOOP( "TQAccel", "Return" ) }, + { TQt::Key_Enter, TQT_TRANSLATE_NOOP( "TQAccel", "Enter" ) }, + { TQt::Key_Insert, TQT_TRANSLATE_NOOP( "TQAccel", "Ins" ) }, + { TQt::Key_Delete, TQT_TRANSLATE_NOOP( "TQAccel", "Del" ) }, + { TQt::Key_Pause, TQT_TRANSLATE_NOOP( "TQAccel", "Pause" ) }, + { TQt::Key_Print, TQT_TRANSLATE_NOOP( "TQAccel", "Print" ) }, + { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( "TQAccel", "SysReq" ) }, + { TQt::Key_Home, TQT_TRANSLATE_NOOP( "TQAccel", "Home" ) }, + { TQt::Key_End, TQT_TRANSLATE_NOOP( "TQAccel", "End" ) }, + { TQt::Key_Left, TQT_TRANSLATE_NOOP( "TQAccel", "Left" ) }, + { TQt::Key_Up, TQT_TRANSLATE_NOOP( "TQAccel", "Up" ) }, + { TQt::Key_Right, TQT_TRANSLATE_NOOP( "TQAccel", "Right" ) }, + { TQt::Key_Down, TQT_TRANSLATE_NOOP( "TQAccel", "Down" ) }, + { TQt::Key_Prior, TQT_TRANSLATE_NOOP( "TQAccel", "PgUp" ) }, + { TQt::Key_Next, TQT_TRANSLATE_NOOP( "TQAccel", "PgDown" ) }, + { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( "TQAccel", "CapsLock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( "TQAccel", "NumLock" ) }, + { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( "TQAccel", "ScrollLock" ) }, + { TQt::Key_Menu, TQT_TRANSLATE_NOOP( "TQAccel", "Menu" ) }, + { TQt::Key_Help, TQT_TRANSLATE_NOOP( "TQAccel", "Help" ) }, // Multimedia keys - { TQt::Key_Back, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Back" ) }, - { TQt::Key_Forward, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Forward" ) }, - { TQt::Key_Stop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Stop" ) }, - { TQt::Key_Refresh, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Refresh" ) }, - { TQt::Key_VolumeDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Down" ) }, - { TQt::Key_VolumeMute, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Mute" ) }, - { TQt::Key_VolumeUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Up" ) }, - { TQt::Key_BassBoost, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Boost" ) }, - { TQt::Key_BassUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Up" ) }, - { TQt::Key_BassDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Down" ) }, - { TQt::Key_TrebleUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Up" ) }, - { TQt::Key_TrebleDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Down" ) }, - { TQt::Key_MediaPlay, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Play" ) }, - { TQt::Key_MediaStop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Stop" ) }, - { TQt::Key_MediaPrev, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Previous" ) }, - { TQt::Key_MediaNext, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Next" ) }, - { TQt::Key_MediaRecord, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Record" ) }, - { TQt::Key_HomePage, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, - { TQt::Key_Favorites, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Favorites" ) }, - { TQt::Key_Search, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Search" ) }, - { TQt::Key_Standby, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Standby" ) }, - { TQt::Key_OpenUrl, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Open URL" ) }, - { TQt::Key_LaunchMail, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Mail" ) }, - { TQt::Key_LaunchMedia, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Media" ) }, - { TQt::Key_Launch0, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (0)" ) }, - { TQt::Key_Launch1, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (1)" ) }, - { TQt::Key_Launch2, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (2)" ) }, - { TQt::Key_Launch3, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (3)" ) }, - { TQt::Key_Launch4, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (4)" ) }, - { TQt::Key_Launch5, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (5)" ) }, - { TQt::Key_Launch6, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (6)" ) }, - { TQt::Key_Launch7, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (7)" ) }, - { TQt::Key_Launch8, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (8)" ) }, - { TQt::Key_Launch9, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (9)" ) }, - { TQt::Key_LaunchA, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (A)" ) }, - { TQt::Key_LaunchB, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (B)" ) }, - { TQt::Key_LaunchC, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (C)" ) }, - { TQt::Key_LaunchD, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (D)" ) }, - { TQt::Key_LaunchE, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (E)" ) }, - { TQt::Key_LaunchF, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (F)" ) }, + { TQt::Key_Back, TQT_TRANSLATE_NOOP( "TQAccel", "Back" ) }, + { TQt::Key_Forward, TQT_TRANSLATE_NOOP( "TQAccel", "Forward" ) }, + { TQt::Key_Stop, TQT_TRANSLATE_NOOP( "TQAccel", "Stop" ) }, + { TQt::Key_Refresh, TQT_TRANSLATE_NOOP( "TQAccel", "Refresh" ) }, + { TQt::Key_VolumeDown, TQT_TRANSLATE_NOOP( "TQAccel", "Volume Down" ) }, + { TQt::Key_VolumeMute, TQT_TRANSLATE_NOOP( "TQAccel", "Volume Mute" ) }, + { TQt::Key_VolumeUp, TQT_TRANSLATE_NOOP( "TQAccel", "Volume Up" ) }, + { TQt::Key_BassBoost, TQT_TRANSLATE_NOOP( "TQAccel", "Bass Boost" ) }, + { TQt::Key_BassUp, TQT_TRANSLATE_NOOP( "TQAccel", "Bass Up" ) }, + { TQt::Key_BassDown, TQT_TRANSLATE_NOOP( "TQAccel", "Bass Down" ) }, + { TQt::Key_TrebleUp, TQT_TRANSLATE_NOOP( "TQAccel", "Treble Up" ) }, + { TQt::Key_TrebleDown, TQT_TRANSLATE_NOOP( "TQAccel", "Treble Down" ) }, + { TQt::Key_MediaPlay, TQT_TRANSLATE_NOOP( "TQAccel", "Media Play" ) }, + { TQt::Key_MediaStop, TQT_TRANSLATE_NOOP( "TQAccel", "Media Stop" ) }, + { TQt::Key_MediaPrev, TQT_TRANSLATE_NOOP( "TQAccel", "Media Previous" ) }, + { TQt::Key_MediaNext, TQT_TRANSLATE_NOOP( "TQAccel", "Media Next" ) }, + { TQt::Key_MediaRecord, TQT_TRANSLATE_NOOP( "TQAccel", "Media Record" ) }, + { TQt::Key_HomePage, TQT_TRANSLATE_NOOP( "TQAccel", "Home" ) }, + { TQt::Key_Favorites, TQT_TRANSLATE_NOOP( "TQAccel", "Favorites" ) }, + { TQt::Key_Search, TQT_TRANSLATE_NOOP( "TQAccel", "Search" ) }, + { TQt::Key_Standby, TQT_TRANSLATE_NOOP( "TQAccel", "Standby" ) }, + { TQt::Key_OpenUrl, TQT_TRANSLATE_NOOP( "TQAccel", "Open URL" ) }, + { TQt::Key_LaunchMail, TQT_TRANSLATE_NOOP( "TQAccel", "Launch Mail" ) }, + { TQt::Key_LaunchMedia, TQT_TRANSLATE_NOOP( "TQAccel", "Launch Media" ) }, + { TQt::Key_Launch0, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (0)" ) }, + { TQt::Key_Launch1, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (1)" ) }, + { TQt::Key_Launch2, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (2)" ) }, + { TQt::Key_Launch3, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (3)" ) }, + { TQt::Key_Launch4, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (4)" ) }, + { TQt::Key_Launch5, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (5)" ) }, + { TQt::Key_Launch6, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (6)" ) }, + { TQt::Key_Launch7, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (7)" ) }, + { TQt::Key_Launch8, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (8)" ) }, + { TQt::Key_Launch9, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (9)" ) }, + { TQt::Key_LaunchA, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (A)" ) }, + { TQt::Key_LaunchB, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (B)" ) }, + { TQt::Key_LaunchC, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (C)" ) }, + { TQt::Key_LaunchD, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (D)" ) }, + { TQt::Key_LaunchE, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (E)" ) }, + { TQt::Key_LaunchF, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (F)" ) }, // -------------------------------------------------------------- // More consistent namings - { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print Screen" ) }, - { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Up" ) }, - { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Down" ) }, - { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Caps Lock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Num Lock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Number Lock" ) }, - { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Scroll Lock" ) }, - { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Insert" ) }, - { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Delete" ) }, - { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Escape" ) }, - { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "System Request" ) }, + { TQt::Key_Print, TQT_TRANSLATE_NOOP( "TQAccel", "Print Screen" ) }, + { TQt::Key_Prior, TQT_TRANSLATE_NOOP( "TQAccel", "Page Up" ) }, + { TQt::Key_Next, TQT_TRANSLATE_NOOP( "TQAccel", "Page Down" ) }, + { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( "TQAccel", "Caps Lock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( "TQAccel", "Num Lock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( "TQAccel", "Number Lock" ) }, + { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( "TQAccel", "Scroll Lock" ) }, + { TQt::Key_Insert, TQT_TRANSLATE_NOOP( "TQAccel", "Insert" ) }, + { TQt::Key_Delete, TQT_TRANSLATE_NOOP( "TQAccel", "Delete" ) }, + { TQt::Key_Escape, TQT_TRANSLATE_NOOP( "TQAccel", "Escape" ) }, + { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( "TQAccel", "System Request" ) }, { 0, 0 } }; @@ -319,7 +319,7 @@ bool Resource::load( FormFile *ff, Project *defProject ) TQFile f( ff->absFileName() ); f.open( IO_ReadOnly | IO_Translate ); - bool b = load( ff, TQT_TQIODEVICE(&f), defProject ); + bool b = load( ff, &f, defProject ); f.close(); return b; @@ -347,7 +347,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) formwindow->setProject( MainWindow::self->currProject() ); if ( mainwindow ) formwindow->setMainWindow( mainwindow ); - MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) ); + MetaDataBase::addEntry( formwindow ); if ( !langIface ) { TQString lang = "TQt Script"; @@ -429,7 +429,20 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) inc.implDecl = "in implementation"; inc.header = e.firstChild().toText().data(); if ( inc.header.right( 5 ) != ".ui.h" ) { - metaIncludes.append( inc ); + bool found = false; + TQValueList<MetaDataBase::Include>::Iterator it; + for ( it = metaIncludes.begin(); it != metaIncludes.end(); ++it ) { + MetaDataBase::Include currInc = *it; + if ( currInc.location == inc.location && currInc.implDecl == inc.implDecl && + currInc.header == inc.header) { + found = true; + break; + } + } + if ( !found ) + { + metaIncludes.append( inc ); + } } else { if ( formwindow->formFile() ) formwindow->formFile()->setCodeFileState( FormFile::Ok ); @@ -478,17 +491,8 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) if ( !customWidgets.isNull() ) loadCustomWidgets( customWidgets, this ); -#if defined (TQT_NON_COMMERCIAL) - bool previewMode = MainWindow::self ? MainWindow::self->isPreviewing() : FALSE; - TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self ); - if ( !w ) - return FALSE; - if ( previewMode ) - w->reparent( MainWindow::self, TQt::WType_TopLevel, w->pos(), TRUE ); -#else if ( !createObject( widget, formwindow) ) return FALSE; -#endif if ( !forwards.isNull() ) { for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) @@ -509,7 +513,20 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) inc.implDecl = "in implementation"; inc.header = n.firstChild().toText().data(); if ( inc.header.right( 5 ) != ".ui.h" ) { - metaIncludes.append( inc ); + bool found = false; + TQValueList<MetaDataBase::Include>::Iterator it; + for ( it = metaIncludes.begin(); it != metaIncludes.end(); ++it ) { + MetaDataBase::Include currInc = *it; + if ( currInc.location == inc.location && currInc.implDecl == inc.implDecl && + currInc.header == inc.header) { + found = true; + break; + } + } + if ( !found ) + { + metaIncludes.append( inc ); + } } else { if ( formwindow->formFile() ) formwindow->formFile()->setCodeFileState( FormFile::Ok ); @@ -552,11 +569,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) function.returnType = "void"; function.type = "slot"; function.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, + if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) ) + MetaDataBase::addFunction( formwindow, function.function, function.specifier, function.access, "slot", function.language, function.returnType ); else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, + MetaDataBase::changeFunctionAttributes( formwindow, function.function, function.function, function.specifier, function.access, "slot", function.language, function.returnType ); @@ -580,12 +597,12 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) if ( function.returnType.isEmpty() ) function.returnType = "void"; function.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, + if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) ) + MetaDataBase::addFunction( formwindow, function.function, function.specifier, function.access, function.type, function.language, function.returnType ); else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, + MetaDataBase::changeFunctionAttributes( formwindow, function.function, function.function, function.specifier, function.access, function.type, function.language, function.returnType ); } @@ -606,13 +623,13 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) loadTabOrder( tabOrder ); if ( formwindow ) { - MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes ); - MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards ); - MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), metaVariables ); - MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals ); + MetaDataBase::setIncludes( formwindow, metaIncludes ); + MetaDataBase::setForwards( formwindow, metaForwards ); + MetaDataBase::setVariables( formwindow, metaVariables ); + MetaDataBase::setSignalList( formwindow, metaSignals ); metaInfo.classNameChanged = metaInfo.className != TQString( formwindow->name() ); - MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo ); - MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro ); + MetaDataBase::setMetaInfo( formwindow, metaInfo ); + MetaDataBase::setExportMacro( formwindow->mainContainer(), exportMacro ); } loadExtraSource( formwindow->formFile(), currFileName, langIface, hasFunctions ); @@ -621,7 +638,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) mainwindow->insertFormWindow( formwindow ); if ( formwindow ) { - formwindow->killAccels( TQT_TQOBJECT(formwindow) ); + formwindow->killAccels( formwindow ); if ( formwindow->layout() ) formwindow->layout()->activate(); if ( hadGeometry ) @@ -678,7 +695,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly ) TQFile f( filename ); if ( !f.open( IO_WriteOnly | IO_Translate ) ) return FALSE; - bool b = save( TQT_TQIODEVICE(&f) ); + bool b = save( &f ); f.close(); return b; } @@ -702,23 +719,22 @@ bool Resource::save( TQIODevice* dev ) ts << "<!DOCTYPE UI><UI version=\"3.3\" stdsetdef=\"1\">" << endl; saveMetaInfoBefore( ts, 0 ); - saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 ); - if ( ::tqqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) { + saveObject( formwindow->mainContainer(), 0, ts, 0 ); + 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 ( ::tqqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) + if ( ::tqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) saveActions( formwindow->actionList(), ts, 0 ); if ( !images.isEmpty() ) saveImageCollection( ts, 0 ); - if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() || - !MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() ) + if ( !MetaDataBase::connections( formwindow ).isEmpty() || + !MetaDataBase::slotList( formwindow ).isEmpty() ) saveConnections( ts, 0 ); saveTabOrder( ts, 0 ); saveMetaInfoAfter( ts, 0 ); - saveIncludeHints( ts, 0 ); ts << "</UI>" << endl; bool ok = saveFormCode( formwindow->formFile(), langIface ); images.clear(); @@ -749,7 +765,7 @@ TQString Resource::copy() p = p->parentWidget(); } if ( save ) - saveObject( TQT_TQOBJECT(w), 0, ts, 0 ); + saveObject( w, 0, ts, 0 ); } if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) saveCustomWidgets( ts, 0 ); @@ -807,9 +823,9 @@ void Resource::paste( const TQString &cb, TQWidget *parent ) y = TQMAX( 0, parent->height() - w->height() ); if ( x != w->x() || y != w->y() ) w->move( x, y ); - formwindow->selectWidget( TQT_TQOBJECT(w) ); + formwindow->selectWidget( w ); } else if ( firstWidget.tagName() == "spacer" ) { - TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal ); + TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? TQt::Vertical : TQt::Horizontal ); if ( !w ) continue; widgets.append( w ); @@ -821,7 +837,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent ) y = TQMAX( 0, parent->height() - w->height() ); if ( x != w->x() || y != w->y() ) w->move( x, y ); - formwindow->selectWidget( TQT_TQOBJECT(w) ); + formwindow->selectWidget( w ); } firstWidget = firstWidget.nextSibling().toElement(); } @@ -843,10 +859,29 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea if ( obj->isWidgetType() ) { if ( obj->isA("CustomWidget") || isPlugin ) { usedCustomWidgets << TQString( className ); - includeHints << WidgetDatabase::includeFile( classID ); + MetaDataBase::Include inc; + inc.location = "global"; + inc.implDecl = "in implementation"; + inc.header = WidgetDatabase::includeFile( classID ); + bool found = false; + TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow ); + TQValueList<MetaDataBase::Include>::Iterator it; + for ( it = includes.begin(); it != includes.end(); ++it ) { + MetaDataBase::Include currInc = *it; + if ( currInc.location == inc.location && currInc.implDecl == inc.implDecl && + currInc.header == inc.header) { + found = true; + break; + } + } + if ( !found ) + { + includes << inc; + } + MetaDataBase::setIncludes( formwindow, includes ); } - if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) ) + if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) ) return; // we don't know anything about this thing TQString attributes; @@ -879,9 +914,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea QDesignerWidgetStack* ws = 0; - if ( ::tqqt_cast<TQTabWidget*>(obj) ) { + if ( ::tqt_cast<TQTabWidget*>(obj) ) { TQTabWidget* tw = (TQTabWidget*) obj; - TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING ); + TQObjectList* tmpl = tw->queryList( "TQWidgetStack" ); TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar(); for ( int i = 0; i < tb->count(); ++i ) { @@ -891,7 +926,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea TQWidget *w = ws->widget( t->identifier() ); if ( !w ) continue; - if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ) == -1 ) + if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) ) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ++indent; @@ -906,17 +941,17 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "<string>" << entitize( t->text() ) << "</string>" << endl; indent--; ts << makeIndent( indent ) << "</attribute>" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + saveChildrenOf( w, ts, indent ); --indent; ts << makeIndent( indent ) << "</widget>" << endl; } delete tmpl; - } else if ( (ws = ::tqqt_cast<QDesignerWidgetStack*>(obj)) != 0 ) { + } else if ( (ws = ::tqt_cast<QDesignerWidgetStack*>(obj)) != 0 ) { for ( int i = 0; i < ws->count(); ++i ) { TQWidget *w = ws->page( i ); if ( !w ) continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ++indent; @@ -930,17 +965,17 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "<number>" << TQString::number(i) << "</number>" << endl; indent--; ts << makeIndent( indent ) << "</attribute>" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + saveChildrenOf( w, ts, indent ); --indent; ts << makeIndent( indent ) << "</widget>" << endl; } - } else if ( ::tqqt_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 ); if ( !w ) continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ++indent; @@ -951,7 +986,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "</property>" << endl; ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl; indent++; - saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent ); + saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent ); indent--; ts << makeIndent( indent ) << "</property>" << endl; ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl; @@ -959,17 +994,17 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "<string>" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "</string>" << endl; indent--; ts << makeIndent( indent ) << "</attribute>" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + saveChildrenOf( w, ts, indent ); --indent; ts << makeIndent( indent ) << "</widget>" << endl; } - } else if ( ::tqqt_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 ); if ( !w ) continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl; ++indent; @@ -984,12 +1019,12 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "<string>" << entitize( wiz->title( w ) ) << "</string>" << endl; indent--; ts << makeIndent( indent ) << "</attribute>" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + saveChildrenOf( w, ts, indent ); --indent; ts << makeIndent( indent ) << "</widget>" << endl; } - } else if ( ::tqqt_cast<TQMainWindow*>(obj) ) { - saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent ); + } else if ( ::tqt_cast<TQMainWindow*>(obj) ) { + saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent ); } else { bool saved = FALSE; #ifdef TQT_CONTAINER_CUSTOM_WIDGETS @@ -1007,10 +1042,10 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea int i = 0; for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) { if ( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 ) + idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 ) continue; // we don't know this widget ts << makeIndent( indent ) << "<widget class=\"" - << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) + << WidgetFactory::classNameOf( w ) << "\">" << endl; ++indent; ts << makeIndent( indent ) << "<property name=\"name\">" << endl; @@ -1036,7 +1071,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj ); if ( obj != w ) { ts << makeIndent( indent ) << "<widget class=\"" - << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) + << WidgetFactory::classNameOf( w ) << "\">" << endl; ++indent; ts << makeIndent( indent ) << "<property name=\"name\">" << endl; @@ -1123,9 +1158,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) { - if ( ::tqqt_cast<TQListBox*>(obj) || ::tqqt_cast<TQComboBox*>(obj) ) { + if ( ::tqt_cast<TQListBox*>(obj) || ::tqt_cast<TQComboBox*>(obj) ) { TQListBox *lb = 0; - if ( ::tqqt_cast<TQListBox*>(obj) ) + if ( ::tqt_cast<TQListBox*>(obj) ) lb = (TQListBox*)obj; else lb = ( (TQComboBox*)obj )->listBox(); @@ -1143,7 +1178,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "</item>" << endl; } - } else if ( ::tqqt_cast<TQIconView*>(obj) ) { + } else if ( ::tqt_cast<TQIconView*>(obj) ) { TQIconView *iv = (TQIconView*)obj; TQIconViewItem *i = iv->firstItem(); @@ -1159,7 +1194,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "</item>" << endl; } - } else if ( ::tqqt_cast<TQListView*>(obj) ) { + } else if ( ::tqt_cast<TQListView*>(obj) ) { TQListView *lv = (TQListView*)obj; int i; for ( i = 0; i < lv->header()->count(); ++i ) { @@ -1185,15 +1220,18 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "</column>" << endl; } - saveItem( lv->firstChild(), ts, indent - 1 ); + if (lv->firstChild()) + { + saveItem( lv->firstChild(), ts, indent - 1 ); + } } #if !defined (TQT_NO_TABLE) - else if ( ::tqqt_cast<TQTable*>(obj) ) { + else if ( ::tqt_cast<TQTable*>(obj) ) { TQTable *table = (TQTable*)obj; int i; - TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table ); # ifndef TQT_NO_SQL - bool isDataTable = ::tqqt_cast<TQDataTable*>(table); + bool isDataTable = ::tqt_cast<TQDataTable*>(table); # else bool isDataTable = false; # endif @@ -1245,6 +1283,10 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) void Resource::saveItem( TQListViewItem *i, TQTextStream &ts, int indent ) { + if (!i) + { + return; + } TQListView *lv = i->listView(); while ( i ) { ts << makeIndent( indent ) << "<item>" << endl; @@ -1277,10 +1319,10 @@ void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, cons if ( formwindow && formwindow->savePixmapInline() ) ts << makeIndent( indent ) << "<" << tagname << ">" << saveInCollection( p ) << "</" << tagname << ">" << endl; else if ( formwindow && formwindow->savePixmapInProject() ) - ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() ) + ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( formwindow, p.serialNumber() ) << "</" << tagname << ">" << endl; else - ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() ) + ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( formwindow, p.serialNumber() ) << "</" << tagname << ">" << endl; } @@ -1292,7 +1334,7 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname* TQImage img = loadFromCollection( arg ); TQPixmap pix; pix.convertFromImage( img ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg ); return pix; } else if ( formwindow && formwindow->savePixmapInProject() ) { TQPixmap pix; @@ -1304,13 +1346,13 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname* pix.convertFromImage( pix.convertToImage() ); } - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg ); return pix; } TQPixmap pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ); // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that pix.convertFromImage( pix.convertToImage() ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg ); return pix; } @@ -1350,7 +1392,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; QDesignerGridLayout* grid = 0; - if ( !::tqqt_cast<TQSplitter*>(obj) && + if ( !::tqt_cast<TQSplitter*>(obj) && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && obj->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) { @@ -1378,7 +1420,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) // save properties of layout if ( lay != WidgetFactory::NoLayout ) - saveObjectProperties( TQT_TQOBJECT(layout), ts, indent ); + saveObjectProperties( layout, ts, indent ); } @@ -1398,28 +1440,28 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) TQStringList changed; changed = MetaDataBase::changedProperties( w ); if ( w->isWidgetType() ) { - if ( ::tqqt_cast<Spacer*>(w) ) { + if ( ::tqt_cast<Spacer*>(w) ) { if ( !changed.contains( "sizeHint" ) ) changed << "sizeHint"; if ( !changed.contains( "geometry" ) ) changed << "geometry"; } else { - TQToolButton *tb = ::tqqt_cast<TQToolButton*>(w); + TQToolButton *tb = ::tqt_cast<TQToolButton*>(w); if ( tb && !tb->iconSet().isNull() ) { changed << "iconSet"; } } - } else if ( ::tqqt_cast<TQLayout*>(w) ) { - if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) + } else if ( ::tqt_cast<TQLayout*>(w) ) { + if ( MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) > -1 ) changed << "spacing"; - if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) + if ( MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) > -1 ) changed << "margin"; - if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) != "Auto" - && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() ) + if ( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) != "Auto" + && !MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ).isEmpty() ) changed << "resizeMode"; } - if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + if ( w == formwindow->mainContainer() ) { if ( changed.findIndex( "geometry" ) == -1 ) changed << "geometry"; if ( changed.findIndex( "caption" ) == -1 ) @@ -1429,10 +1471,10 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) if ( changed.isEmpty() ) return; - bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && + bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; - TQStrList lst = w->metaObject()->propertyNames( !::tqqt_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; @@ -1443,10 +1485,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 ( ::tqqt_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 ( ::tqqt_cast<MenuBarEditor*>(w) && + if ( ::tqt_cast<MenuBarEditor*>(w) && ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 || qstrcmp( p->name(), "itemText" ) == 0 ) ) continue; @@ -1460,7 +1502,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) ts << " stdset=\"0\""; ts << ">" << endl; indent++; - if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqqt_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 ); @@ -1527,7 +1569,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant switch ( t ) { case TQVariant::String: if ( name == "resizeMode" ) { - TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + TQString resmod = MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ); if ( !resmod.isNull() && resmod != "Auto" ) { ts << makeIndent( indent ) << "<enum>"; ts << resmod; @@ -1547,12 +1589,12 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant ts << makeIndent( indent ) << "<bool>" << mkBool( value.toBool() ) << "</bool>" << endl; break; case TQVariant::Int: - if ( ::tqqt_cast<TQLayout*>(w) ) { + if ( ::tqt_cast<TQLayout*>(w) ) { num = -1; if ( name == "spacing" ) - num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ); else if ( name == "margin" ) - num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ); if ( num != -1 ) ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl; } else { @@ -1772,7 +1814,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( colspan < 1 ) colspan = 1; - TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ); + TQString className = e.attribute( "class", "TQWidget" ); #ifdef TQT_CONTAINER_CUSTOM_WIDGETS TQString parentClassName = WidgetFactory::classNameOf( parent ); bool isPlugin = @@ -1782,7 +1824,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay // ### TODO loading for custom container widgets without pages #endif if ( !className.isNull() ) { - obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE )); + obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE ); if ( !obj ) { TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ), i18n( "Error loading %1.\n" @@ -1796,7 +1838,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay mainContainerSet = TRUE; } w = (TQWidget*)obj; - if ( ::tqqt_cast<TQMainWindow*>(w) ) + if ( ::tqt_cast<TQMainWindow*>(w) ) w = ( (TQMainWindow*)w )->centralWidget(); if ( layout ) { switch ( WidgetFactory::layoutType( layout ) ) { @@ -1821,25 +1863,25 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( w && formwindow ) { if ( !parent || - ( !::tqqt_cast<TQTabWidget*>(parent) && - !::tqqt_cast<TQWidgetStack*>(parent) && - !::tqqt_cast<TQToolBox*>(parent) && - !::tqqt_cast<TQWizard*>(parent) + ( !::tqt_cast<TQTabWidget*>(parent) && + !::tqt_cast<TQWidgetStack*>(parent) && + !::tqt_cast<TQToolBox*>(parent) && + !::tqt_cast<TQWizard*>(parent) #ifdef TQT_CONTAINER_CUSTOM_WIDGETS && !isPlugin #endif ) ) formwindow->insertWidget( w, pasting ); else if ( parent && - ( ::tqqt_cast<TQTabWidget*>(parent) || - ::tqqt_cast<TQWidgetStack*>(parent) || - ::tqqt_cast<TQToolBox*>(parent) || - ::tqqt_cast<TQWizard*>(parent) + ( ::tqt_cast<TQTabWidget*>(parent) || + ::tqt_cast<TQWidgetStack*>(parent) || + ::tqt_cast<TQToolBox*>(parent) || + ::tqt_cast<TQWizard*>(parent) #ifdef TQT_CONTAINER_CUSTOM_WIDGETS || isPlugin #endif ) ) - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( w ); } } @@ -1848,22 +1890,22 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay while ( !n.isNull() ) { if ( n.tagName() == "spacer" ) { - createSpacer( n, w, layout, Qt::Horizontal ); + createSpacer( n, w, layout, TQt::Horizontal ); } else if ( n.tagName() == "widget" ) { createObject( n, w, layout ); } else if ( n.tagName() == "hbox" ) { layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "grid" ) { layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "vbox" ) { layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); continue; } else if ( n.tagName() == "property" && obj ) { @@ -1877,16 +1919,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 ( ::tqqt_cast<TQTabWidget*>(parent) ) { + if ( ::tqt_cast<TQTabWidget*>(parent) ) { if ( attrib == "title" ) ( (TQTabWidget*)parent )->insertTab( w, v.toString() ); - } else if ( ::tqqt_cast<TQWidgetStack*>(parent) ) { + } else if ( ::tqt_cast<TQWidgetStack*>(parent) ) { if ( attrib == "id" ) ( (QDesignerWidgetStack*)parent )->insertPage( w, v.toInt() ); - } else if ( ::tqqt_cast<TQToolBox*>(parent) ) { + } else if ( ::tqt_cast<TQToolBox*>(parent) ) { if ( attrib == "label" ) ( (TQToolBox*)parent )->addItem( w, v.toString() ); - } else if ( ::tqqt_cast<TQWizard*>(parent) ) { + } else if ( ::tqt_cast<TQWizard*>(parent) ) { if ( attrib == "title" ) ( (TQWizard*)parent )->addPage( w, v.toString() ); #ifdef TQT_CONTAINER_CUSTOM_WIDGETS @@ -1926,7 +1968,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( w->isWidgetType() ) widgets.insert( w->name(), w ); - return TQT_TQOBJECT(w); + return w; } void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) @@ -1934,7 +1976,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) if ( !widget ) return; - if ( ::tqqt_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; @@ -1968,7 +2010,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) lv->header()->setResizeEnabled( resizable, i ); } #ifndef TQT_NO_TABLE - else if ( ::tqqt_cast<TQTable*>(widget) ) { + else if ( ::tqt_cast<TQTable*>(widget) ) { TQTable *table = (TQTable*)widget; bool isRow; if ( ( isRow = e.tagName() == "row" ) ) @@ -1981,7 +2023,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) bool hasPixmap = FALSE; TQString txt; TQString field; - TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table ); while ( !n.isNull() ) { if ( n.tagName() == "property" ) { TQString attrib = n.attribute( "name" ); @@ -2006,7 +2048,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) h->setLabel( i, txt ); if ( !isRow && !field.isEmpty() ) fieldMap.insert( txt, field ); - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), fieldMap ); + MetaDataBase::setColumnFields( table, fieldMap ); } #endif } @@ -2032,17 +2074,17 @@ void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bo void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) { - if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ), TQT_TQOBJECT(widget) ) ) + if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ), widget ) ) return; - if ( ::tqqt_cast<TQListBox*>(widget) || ::tqqt_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 ( ::tqqt_cast<TQListBox*>(widget) ) + if ( ::tqt_cast<TQListBox*>(widget) ) lb = (TQListBox*)widget; else lb = ( (TQComboBox*)widget)->listBox(); @@ -2051,7 +2093,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt } else { new TQListBoxText( lb, txt ); } - } else if ( ::tqqt_cast<TQIconView*>(widget) ) { + } else if ( ::tqt_cast<TQIconView*>(widget) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; bool hasPixmap = FALSE; @@ -2062,7 +2104,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt new TQIconViewItem( iv, txt, pix ); else new TQIconViewItem( iv, txt ); - } else if ( ::tqqt_cast<TQListView*>(widget) ) { + } else if ( ::tqt_cast<TQListView*>(widget) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; TQValueList<TQPixmap> pixmaps; @@ -2104,7 +2146,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt } } -TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ) +TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, TQt::Orientation o ) { TQDomElement n = e.firstChild().toElement(); int row = e.attribute( "row" ).toInt(); @@ -2122,14 +2164,14 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay spacer->setInteraciveMode( FALSE ); while ( !n.isNull() ) { if ( n.tagName() == "property" ) - setObjectProperty( TQT_TQOBJECT(spacer), n.attribute( "name" ), n.firstChild().toElement() ); + setObjectProperty( spacer, n.attribute( "name" ), n.firstChild().toElement() ); n = n.nextSibling().toElement(); } spacer->setInteraciveMode( TRUE ); if ( formwindow ) formwindow->insertWidget( spacer, pasting ); if ( layout ) { - if ( ::tqqt_cast<TQBoxLayout*>(layout) ) + if ( ::tqt_cast<TQBoxLayout*>(layout) ) ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); else ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, @@ -2145,7 +2187,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD { const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE ); - if ( !::tqqt_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" ) @@ -2187,7 +2229,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD if ( !p ) { MetaDataBase::setFakeProperty( obj, prop, v ); if ( obj->isWidgetType() ) { - if ( prop == "database" && TQT_TQOBJECT(obj) != TQT_TQOBJECT(toplevel) ) { + if ( prop == "database" && obj != toplevel ) { TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList(); if ( lst.count() > 2 ) dbControls.insert( obj->name(), lst[ 2 ] ); @@ -2241,32 +2283,32 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD } if ( prop == "icon" ) { formwindow->setIcon( v.toPixmap() ); - TQString pmk = MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), v.toPixmap().serialNumber() ); - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), + TQString pmk = MetaDataBase::pixmapKey( formwindow, v.toPixmap().serialNumber() ); + MetaDataBase::setPixmapKey( formwindow, formwindow->icon()->serialNumber(), pmk ); } if ( prop == "geometry" ) { - if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) { + if ( obj == toplevel ) { hadGeometry = TRUE; toplevel->resize( v.toRect().size() ); return; - } else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + } else if ( obj == formwindow->mainContainer() ) { hadGeometry = TRUE; formwindow->resize( v.toRect().size() ); return; } } - if ( ::tqqt_cast<TQLayout*>(obj) ) { + if ( ::tqt_cast<TQLayout*>(obj) ) { if ( prop == "spacing" ) { - MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); + MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toInt() ); return; } else if ( prop == "margin" ) { - MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); + MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toInt() ); return; } else if ( e.tagName() == "enum" && prop == "resizeMode" ) { - MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toString() ); + MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toString() ); return; } } @@ -2274,10 +2316,10 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD if ( prop == "name" ) { if ( pasting ) { TQString s = v.toString(); - formwindow->unify( TQT_TQOBJECT(obj), s, TRUE ); + formwindow->unify( obj, s, TRUE ); obj->setName( s ); return; - } else if ( formwindow && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + } else if ( formwindow && obj == formwindow->mainContainer() ) { formwindow->setName( v.toCString() ); } } @@ -2443,7 +2485,7 @@ TQImage Resource::loadFromCollection( const TQString &name ) void Resource::saveConnections( TQTextStream &ts, int indent ) { - TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) ); + TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow ); if ( connections.isEmpty() ) return; ts << makeIndent( indent ) << "<connections>" << endl; @@ -2456,8 +2498,8 @@ void Resource::saveConnections( TQTextStream &ts, int indent ) ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 && qstrcmp( conn.receiver->name(), "this" ) != 0 ) ) continue; - if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) && - !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) ) + if ( formwindow->isMainContainer( (*it).receiver ) && + !MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) ) continue; if ( conn.sender->inherits( "CustomWidget" ) ) { @@ -2500,7 +2542,7 @@ void Resource::loadConnections( const TQDomElement &e ) conn.sender = 0; TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { - conn.sender = TQT_TQOBJECT(toplevel); + conn.sender = toplevel; } else { if ( name == "this" ) name = toplevel->name(); @@ -2520,7 +2562,7 @@ void Resource::loadConnections( const TQDomElement &e ) conn.receiver = 0; TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { - conn.receiver = TQT_TQOBJECT(toplevel); + conn.receiver = toplevel; } else { TQObjectList *l = toplevel->queryList( 0, name, FALSE ); if ( l ) { @@ -2538,14 +2580,14 @@ void Resource::loadConnections( const TQDomElement &e ) n2 = n2.nextSibling().toElement(); } if ( formwindow ) { - if ( TQT_BASE_OBJECT(conn.sender) == TQT_BASE_OBJECT(formwindow) ) - conn.sender = TQT_TQOBJECT(formwindow->mainContainer()); - if ( TQT_BASE_OBJECT(conn.receiver) == TQT_BASE_OBJECT(formwindow) ) - conn.receiver = TQT_TQOBJECT(formwindow->mainContainer()); + if ( conn.sender == formwindow ) + conn.sender = formwindow->mainContainer(); + if ( conn.receiver == formwindow ) + conn.receiver = formwindow->mainContainer(); } if ( conn.sender && conn.receiver ) { if ( lang == "C++" ) { - MetaDataBase::addConnection( TQT_TQOBJECT(formwindow ? formwindow : toplevel), + MetaDataBase::addConnection( formwindow ? formwindow : toplevel, conn.sender, conn.signal, conn.receiver, conn.slot ); } } @@ -2562,11 +2604,11 @@ void Resource::loadConnections( const TQDomElement &e ) if ( slot.returnType.isEmpty() ) slot.returnType = "void"; slot.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), slot.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), slot.function, slot.specifier, + if ( !MetaDataBase::hasFunction( formwindow, slot.function, TRUE ) ) + MetaDataBase::addFunction( formwindow, slot.function, slot.specifier, slot.access, "slot", slot.language, slot.returnType ); else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), slot.function, slot.function, + MetaDataBase::changeFunctionAttributes( formwindow, slot.function, slot.function, slot.specifier, slot.access, "slot", slot.language, slot.returnType ); } @@ -2756,7 +2798,7 @@ void Resource::loadTabOrder( const TQDomElement &e ) void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) { - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow ); TQString cn; if ( info.classNameChanged && !info.className.isEmpty() ) cn = info.className; @@ -2771,9 +2813,9 @@ void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) { - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow ); if ( !langIface || formwindow->project()->isCpp() ) { - TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) ); + TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow ); TQString extensionInclude; bool needExtensionInclude = FALSE; if ( langIface && @@ -2800,7 +2842,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "</includes>" << endl; } - TQStringList forwards = MetaDataBase::forwards( TQT_TQOBJECT(formwindow) ); + TQStringList forwards = MetaDataBase::forwards( formwindow ); if ( !forwards.isEmpty() ) { ts << makeIndent( indent ) << "<forwards>" << endl; indent++; @@ -2809,7 +2851,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "</forwards>" << endl; } - TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( TQT_TQOBJECT(formwindow) ); + TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formwindow ); if ( !varLst.isEmpty() ) { ts << makeIndent( indent ) << "<variables>" << endl; indent++; @@ -2825,7 +2867,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "</variables>" << endl; } - TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) ); + TQStringList sigs = MetaDataBase::signalList( formwindow ); if ( !sigs.isEmpty() ) { ts << makeIndent( indent ) << "<signals>" << endl; indent++; @@ -2835,7 +2877,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "</signals>" << endl; } - TQValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ); + TQValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( formwindow ); if ( !slotList.isEmpty() ) { ts << makeIndent( indent ) << "<slots>" << endl; indent++; @@ -2858,7 +2900,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "</slots>" << endl; } - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formwindow), TRUE ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, TRUE ); if ( !functionList.isEmpty() ) { ts << makeIndent( indent ) << "<functions>" << endl; indent++; @@ -2888,7 +2930,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "<pixmapinproject/>" << endl; else ts << makeIndent( indent ) << "<pixmapfunction>" << formwindow->pixmapLoaderFunction() << "</pixmapfunction>" << endl; - if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() ) + if ( !( exportMacro = MetaDataBase::exportMacro( formwindow->mainContainer() ) ).isEmpty() ) ts << makeIndent( indent ) << "<exportmacro>" << exportMacro << "</exportmacro>" << endl; if ( formwindow ) { ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing() @@ -2905,18 +2947,6 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) } } -void Resource::saveIncludeHints( TQTextStream &ts, int indent ) -{ - if ( includeHints.isEmpty() ) - return; - ts << makeIndent( indent ) << "<includehints>" << endl; - indent++; - for ( TQStringList::Iterator it = includeHints.begin(); it != includeHints.end(); ++it ) - ts << makeIndent( indent ) << "<includehint>" << *it << "</includehint>" << endl; - indent--; - ts << makeIndent( indent ) << "</includehints>" << endl; -} - TQColorGroup Resource::loadColorGroup( const TQDomElement &e ) { TQColorGroup cg; @@ -2945,10 +2975,10 @@ void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent ) while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::tqqt_cast<TQAction*>(o) ) + if ( !::tqt_cast<TQAction*>(o) ) continue; TQAction *ac = (TQAction*)o; - bool isGroup = ::tqqt_cast<TQActionGroup*>(ac); + bool isGroup = ::tqt_cast<TQActionGroup*>(ac); if ( isGroup ) ts << makeIndent( indent ) << "<actiongroup>" << endl; else @@ -2977,7 +3007,7 @@ void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts TQPtrListIterator<TQAction> it( actions ); while ( it.current() ) { TQAction *a = it.current(); - bool isGroup = ::tqqt_cast<TQActionGroup*>(a); + bool isGroup = ::tqt_cast<TQActionGroup*>(a); if ( isGroup ) ts << makeIndent( indent ) << "<actiongroup>" << endl; else @@ -3022,7 +3052,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) } n2 = n2.nextSibling().toElement(); } - if ( !::tqqt_cast<TQAction*>(parent) ) + if ( !::tqt_cast<TQAction*>(parent) ) formwindow->actionList().append( a ); } else if ( n.tagName() == "actiongroup" ) { a = new QDesignerActionGroup( parent ); @@ -3045,7 +3075,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) } n2 = n2.nextSibling().toElement(); } - if ( !::tqqt_cast<TQAction*>(parent) ) + if ( !::tqt_cast<TQAction*>(parent) ) formwindow->actionList().append( a ); } } @@ -3055,9 +3085,9 @@ void Resource::loadActions( const TQDomElement &e ) TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "action" ) { - loadChildAction( TQT_TQOBJECT(formwindow), n ); + loadChildAction( formwindow, n ); } else if ( n.tagName() == "actiongroup" ) { - loadChildAction( TQT_TQOBJECT(formwindow), n ); + loadChildAction( formwindow, n ); } n = n.nextSibling().toElement(); } @@ -3078,23 +3108,23 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) continue; ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl; indent++; - saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); + saveObjectProperties( tb, ts, indent ); TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions(); for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( ::tqqt_cast<QSeparatorAction*>(a) ) { + if ( ::tqt_cast<QSeparatorAction*>(a) ) { ts << makeIndent( indent ) << "<separator/>" << endl; } else { - if ( ::tqqt_cast<QDesignerAction*>(a) && !( (QDesignerAction*)a )->supportsMenu() ) { + if ( ::tqt_cast<QDesignerAction*>(a) && !( (QDesignerAction*)a )->supportsMenu() ) { TQWidget *w = ( (QDesignerAction*)a )->widget(); ts << makeIndent( indent ) << "<widget class=\"" - << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << "\">" << endl; + << WidgetFactory::classNameOf( w ) << "\">" << endl; indent++; - const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + const char *className = WidgetFactory::classNameOf( w ); if ( w->isA( "CustomWidget" ) ) usedCustomWidgets << TQString( className ); - if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) - saveItems( TQT_TQOBJECT(w), ts, indent ); - saveObjectProperties( TQT_TQOBJECT(w), ts, indent ); + if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) + saveItems( w, ts, indent ); + saveObjectProperties( w, ts, indent ); indent--; ts << makeIndent( indent ) << "</widget>" << endl; } else { @@ -3117,8 +3147,8 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) return; ts << makeIndent( indent ) << "<menubar>" << endl; indent++; - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mb), "name", TRUE ); // FIXME: remove - saveObjectProperties( TQT_TQOBJECT(mb), ts, indent ); + MetaDataBase::setPropertyChanged( mb, "name", TRUE ); // FIXME: remove + saveObjectProperties( mb, ts, indent ); for ( int i = 0; i < (int)mb->count(); ++i ) { MenuBarEditorItem *m = mb->item( i ); @@ -3143,11 +3173,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 ( ::tqqt_cast<QSeparatorAction*>(a) ) + if ( ::tqt_cast<QSeparatorAction*>(a) ) ts << makeIndent( indent ) << "<separator/>" << endl; - else if ( ::tqqt_cast<QDesignerAction*>(a) ) + else if ( ::tqt_cast<QDesignerAction*>(a) ) ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl; - else if ( ::tqqt_cast<QDesignerActionGroup*>(a) ) + else if ( ::tqt_cast<QDesignerActionGroup*>(a) ) ts << makeIndent( indent ) << "<actiongroup name=\"" << a->name() << "\"/>" << endl; PopupMenuEditor *s = i->subMenu(); if ( s && s->count() ) { @@ -3187,12 +3217,12 @@ void Resource::loadToolBars( const TQDomElement &e ) tb->addAction( a ); } else if ( n2.tagName() == "widget" ) { TQWidget *w = (TQWidget*)createObject( n2, tb ); - QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) ); + QDesignerAction *a = new QDesignerAction( w, tb ); a->addTo( tb ); tb->addAction( a ); tb->installEventFilters( w ); } else if ( n2.tagName() == "property" ) { - setObjectProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); + setObjectProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() ); } n2 = n2.nextSibling().toElement(); } @@ -3206,16 +3236,16 @@ void Resource::loadMenuBar( const TQDomElement &e ) TQDomElement n = e.firstChild().toElement(); TQMainWindow *mw = (TQMainWindow*)formwindow->mainContainer(); MenuBarEditor *mb = new MenuBarEditor( formwindow, mw ); - MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); + MetaDataBase::addEntry( mb ); while ( !n.isNull() ) { if ( n.tagName() == "item" ) { PopupMenuEditor * popup = new PopupMenuEditor( formwindow, mw ); loadPopupMenu( popup, n ); popup->setName( n.attribute( "name" ) ); mb->insertItem( n.attribute( "text" ), popup ); - MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); + MetaDataBase::addEntry( popup ); } else if ( n.tagName() == "property" ) { - setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); + setObjectProperty( mb, n.attribute( "name" ), n.firstChild().toElement() ); } else if ( n.tagName() == "separator" ) { mb->insertSeparator(); } @@ -3225,7 +3255,7 @@ void Resource::loadMenuBar( const TQDomElement &e ) void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e ) { - MetaDataBase::addEntry( TQT_TQOBJECT(p) ); + MetaDataBase::addEntry( p ); TQDomElement n = e.firstChild().toElement(); TQAction *a = 0; while ( !n.isNull() ) { diff --git a/kdevdesigner/designer/resource.h b/kdevdesigner/designer/resource.h index 06598254..7d32cf65 100644 --- a/kdevdesigner/designer/resource.h +++ b/kdevdesigner/designer/resource.h @@ -103,7 +103,6 @@ private: void saveColor( TQTextStream &ts, int indent, const TQColor &c ); void saveMetaInfoBefore( TQTextStream &ts, int indent ); void saveMetaInfoAfter( TQTextStream &ts, int indent ); - void saveIncludeHints( TQTextStream &ts, int indent ); void savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname = "pixmap" ); void saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts, int indent ); void saveChildActions( TQAction *a, TQTextStream &ts, int indent ); @@ -112,7 +111,7 @@ private: void savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStream &ts, int indent ); TQObject *createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout = 0 ); - TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ); + TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, TQt::Orientation o ); void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 ); void createColumn( const TQDomElement &e, TQWidget *widget ); void setObjectProperty( TQObject* widget, const TQString &prop, const TQDomElement &e); @@ -157,7 +156,6 @@ private: TQString currFileName; LanguageInterface *langIface; bool hasFunctions; - TQStringList includeHints; TQString uiFileVersion; }; diff --git a/kdevdesigner/designer/richtextfontdialog.ui b/kdevdesigner/designer/richtextfontdialog.ui index d7d6c5a7..bebb31f5 100644 --- a/kdevdesigner/designer/richtextfontdialog.ui +++ b/kdevdesigner/designer/richtextfontdialog.ui @@ -330,11 +330,11 @@ <include location="local" impldecl="in implementation">richtextfontdialog.ui.h</include> </includes> <variables> - <variable>QString font</variable> - <variable>QColor color</variable> - <variable>QString size</variable> + <variable>TQString font</variable> + <variable>TQColor color</variable> + <variable>TQString size</variable> </variables> -<Q_SLOTS> +<slots> <slot>init()</slot> <slot>selectColor()</slot> <slot>accept()</slot> @@ -342,6 +342,6 @@ <slot returnType="TQString">getSize()</slot> <slot returnType="TQString">getColor()</slot> <slot returnType="TQString">getFont()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/sizehandle.cpp b/kdevdesigner/designer/sizehandle.cpp index d60f223b..a3433003 100644 --- a/kdevdesigner/designer/sizehandle.cpp +++ b/kdevdesigner/designer/sizehandle.cpp @@ -107,7 +107,7 @@ void SizeHandle::paintEvent( TQPaintEvent * ) void SizeHandle::mousePressEvent( TQMouseEvent *e ) { - if ( !widget || e->button() != Qt::LeftButton || !active ) + if ( !widget || e->button() != TQt::LeftButton || !active ) return; oldPressPos = e->pos(); geom = origGeom = TQRect( widget->pos(), widget->size() ); @@ -115,7 +115,7 @@ void SizeHandle::mousePressEvent( TQMouseEvent *e ) void SizeHandle::mouseMoveEvent( TQMouseEvent *e ) { - if ( !widget || ( e->state() & Qt::LeftButton ) != Qt::LeftButton || !active ) + if ( !widget || ( e->state() & TQt::LeftButton ) != TQt::LeftButton || !active ) return; TQPoint rp = mapFromGlobal( e->globalPos() ); TQPoint d = oldPressPos - rp; @@ -227,7 +227,7 @@ void SizeHandle::mouseMoveEvent( TQMouseEvent *e ) void SizeHandle::mouseReleaseEvent( TQMouseEvent *e ) { - if ( e->button() != Qt::LeftButton || !active ) + if ( e->button() != TQt::LeftButton || !active ) return; formWindow->sizePreview()->hide(); @@ -236,7 +236,7 @@ void SizeHandle::mouseReleaseEvent( TQMouseEvent *e ) formWindow, widget, origGeom, widget->geometry() ) ); - formWindow->emitUpdateProperties( TQT_TQOBJECT(widget) ); + formWindow->emitUpdateProperties( widget ); } void SizeHandle::trySetGeometry( TQWidget *w, int x, int y, int width, int height ) diff --git a/kdevdesigner/designer/sizehandle.h b/kdevdesigner/designer/sizehandle.h index 44917884..d022c4e5 100644 --- a/kdevdesigner/designer/sizehandle.h +++ b/kdevdesigner/designer/sizehandle.h @@ -38,7 +38,7 @@ class TQPaintEvent; class SizeHandle : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/sourceeditor.cpp b/kdevdesigner/designer/sourceeditor.cpp index 2850e20e..82ebc991 100644 --- a/kdevdesigner/designer/sourceeditor.cpp +++ b/kdevdesigner/designer/sourceeditor.cpp @@ -47,7 +47,7 @@ SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageIn lIface->addRef(); editor = iFace->editor( MainWindow::self->areEditorsReadOnly(), this, MainWindow::self->designerInterface() ); - iFace->onBreakPointChange( TQT_TQOBJECT(MainWindow::self), TQT_SLOT( breakPointsChanged() ) ); + iFace->onBreakPointChange( MainWindow::self, TQ_SLOT( breakPointsChanged() ) ); resize( 600, 400 ); setIcon( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) ); } @@ -77,7 +77,7 @@ void SourceEditor::setObject( TQObject *o, Project *p ) formWindow()->formFile()->setCodeEdited( FALSE ); formWindow()->formFile()->setEditor( 0 ); } - if ( ::tqqt_cast<FormWindow*>(o) ) + if ( ::tqt_cast<FormWindow*>(o) ) ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE ); save(); bool changed = FALSE; @@ -104,7 +104,7 @@ void SourceEditor::setObject( TQObject *o, Project *p ) if ( formWindow()->isFake() ) iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); else - iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); + iFace->setContext( formWindow()->mainContainer() ); } else { iFace->setContext( 0 ); } @@ -119,9 +119,9 @@ TQString SourceEditor::sourceOfObject( TQObject *o, const TQString &, TQString txt; if ( !o ) return txt; - if ( ::tqqt_cast<FormWindow*>(o) ) + if ( ::tqt_cast<FormWindow*>(o) ) txt = ( (FormWindow*)o )->formFile()->code(); - else if ( ::tqqt_cast<SourceFile*>(o) ) + else if ( ::tqt_cast<SourceFile*>(o) ) txt = ( (SourceFile*)o )->text(); return txt; } @@ -235,7 +235,7 @@ void SourceEditor::resetContext() if ( formWindow()->isFake() ) iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); else - iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); + iFace->setContext( formWindow()->mainContainer() ); } else { iFace->setContext( 0 ); } @@ -307,14 +307,14 @@ bool SourceEditor::saveAs() SourceFile *SourceEditor::sourceFile() const { - if ( !::tqqt_cast<SourceFile*>((TQObject *)obj) ) + if ( !::tqt_cast<SourceFile*>((TQObject *)obj) ) return 0; return (SourceFile*)(TQObject*)obj; } FormWindow *SourceEditor::formWindow() const { - if ( !::tqqt_cast<FormWindow*>((TQObject *)obj) ) + if ( !::tqt_cast<FormWindow*>((TQObject *)obj) ) return 0; return (FormWindow*)(TQObject*)obj; } diff --git a/kdevdesigner/designer/sourceeditor.h b/kdevdesigner/designer/sourceeditor.h index 3dde636e..0f14c5f6 100644 --- a/kdevdesigner/designer/sourceeditor.h +++ b/kdevdesigner/designer/sourceeditor.h @@ -39,7 +39,7 @@ class SourceFile; class SourceEditor : public TQVBox { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/sourcefile.h b/kdevdesigner/designer/sourcefile.h index ef4d31db..81fe540a 100644 --- a/kdevdesigner/designer/sourcefile.h +++ b/kdevdesigner/designer/sourcefile.h @@ -36,7 +36,7 @@ class Project; class SourceFile : public TQObject { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/startdialog.ui b/kdevdesigner/designer/startdialog.ui index 383fdfda..ef1d96f3 100644 --- a/kdevdesigner/designer/startdialog.ui +++ b/kdevdesigner/designer/startdialog.ui @@ -199,9 +199,6 @@ <property name="text"> <string>&Help</string> </property> - <property name="accel"> - <number>4144</number> - </property> <property name="autoDefault"> <bool>true</bool> </property> @@ -230,9 +227,6 @@ <property name="text"> <string>&OK</string> </property> - <property name="accel"> - <number>0</number> - </property> <property name="autoDefault"> <bool>true</bool> </property> @@ -247,9 +241,6 @@ <property name="text"> <string>&Cancel</string> </property> - <property name="accel"> - <number>0</number> - </property> <property name="autoDefault"> <bool>true</bool> </property> @@ -314,11 +305,11 @@ <slot>recentItemChanged(TQIconViewItem*)</slot> </connection> </connections> -<Q_SLOTS> +<slots> <slot>recentItemChanged( TQIconViewItem * )</slot> <slot>clearFileInfo()</slot> <slot>accept()</slot> <slot>reject()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/startdialogimpl.cpp b/kdevdesigner/designer/startdialogimpl.cpp index adff44fd..d5d10d84 100644 --- a/kdevdesigner/designer/startdialogimpl.cpp +++ b/kdevdesigner/designer/startdialogimpl.cpp @@ -45,13 +45,13 @@ StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath ) initFileOpen(); showInFuture = TRUE; - connect( buttonHelp, TQT_SIGNAL( clicked() ), - MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - connect( recentView, TQT_SIGNAL( doubleClicked(TQIconViewItem*) ), - this, TQT_SLOT( accept() ) ); - connect( recentView, TQT_SIGNAL( returnPressed(TQIconViewItem*) ), - this, TQT_SLOT( accept() ) ); - connect( fd, TQT_SIGNAL( fileSelected() ), this, TQT_SLOT( accept() ) ); + connect( buttonHelp, TQ_SIGNAL( clicked() ), + MainWindow::self, TQ_SLOT( showDialogHelp() ) ); + connect( recentView, TQ_SIGNAL( doubleClicked(TQIconViewItem*) ), + this, TQ_SLOT( accept() ) ); + connect( recentView, TQ_SIGNAL( returnPressed(TQIconViewItem*) ), + this, TQ_SLOT( accept() ) ); + connect( fd, TQ_SIGNAL( fileSelected() ), this, TQ_SLOT( accept() ) ); } void StartDialog::accept() @@ -151,7 +151,7 @@ void StartDialog::initFileOpen() TQPoint point( 0, 0 ); fd->reparent( tab, point ); - TQObjectList *l = fd->queryList( TQPUSHBUTTON_OBJECT_NAME_STRING ); + TQObjectList *l = fd->queryList( "TQPushButton" ); TQObjectListIt it( *l ); TQObject *obj; while ( (obj = it.current()) != 0 ) { diff --git a/kdevdesigner/designer/startdialogimpl.h b/kdevdesigner/designer/startdialogimpl.h index 8fb574d0..bd250d4b 100644 --- a/kdevdesigner/designer/startdialogimpl.h +++ b/kdevdesigner/designer/startdialogimpl.h @@ -39,7 +39,7 @@ class FileDialog : public TQFileDialog { - Q_OBJECT + TQ_OBJECT public: @@ -55,7 +55,7 @@ signals: class StartDialog : public StartDialogBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/styledbutton.cpp b/kdevdesigner/designer/styledbutton.cpp index 82c9ddb8..8ea02a98 100644 --- a/kdevdesigner/designer/styledbutton.cpp +++ b/kdevdesigner/designer/styledbutton.cpp @@ -44,7 +44,7 @@ StyledButton::StyledButton(TQWidget* parent, const char* name) setMinimumSize( minimumSizeHint() ); setAcceptDrops( TRUE ); - connect( this, TQT_SIGNAL(clicked()), TQT_SLOT(onEditor())); + connect( this, TQ_SIGNAL(clicked()), TQ_SLOT(onEditor())); setEditor( ColorEditor ); } @@ -151,12 +151,12 @@ void StyledButton::resizeEvent( TQResizeEvent* e ) void StyledButton::drawButton( TQPainter *paint ) { - style().tqdrawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(), + style().drawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(), isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Raised); drawButtonLabel(paint); if (hasFocus()) - style().tqdrawPrimitive(TQStyle::PE_FocusRect, paint, + style().drawPrimitive(TQStyle::PE_FocusRect, paint, style().subRect(TQStyle::SR_PushButtonFocusRect, this), colorGroup(), TQStyle::Style_Default); } diff --git a/kdevdesigner/designer/styledbutton.h b/kdevdesigner/designer/styledbutton.h index 8065fe84..70e97608 100644 --- a/kdevdesigner/designer/styledbutton.h +++ b/kdevdesigner/designer/styledbutton.h @@ -36,7 +36,7 @@ class FormWindow; class StyledButton : public TQButton { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQColor color READ color WRITE setColor ) diff --git a/kdevdesigner/designer/tableeditor.ui b/kdevdesigner/designer/tableeditor.ui index 21874754..86995ec0 100644 --- a/kdevdesigner/designer/tableeditor.ui +++ b/kdevdesigner/designer/tableeditor.ui @@ -793,7 +793,7 @@ <tabstop>buttonRowDown</tabstop> <tabstop>buttonHelp</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot access="protected">init()</slot> <slot access="protected">destroy()</slot> <slot access="protected">applyClicked()</slot> @@ -815,7 +815,7 @@ <slot access="protected">rowTextChanged( const TQString & )</slot> <slot access="protected">rowUpClicked()</slot> <slot access="protected">columnDownClicked()</slot> -</Q_SLOTS> +</slots> <pixmapfunction>BarIcon2</pixmapfunction> <layoutdefaults spacing="6" margin="11"/> <includes> diff --git a/kdevdesigner/designer/tableeditorimpl.cpp b/kdevdesigner/designer/tableeditorimpl.cpp index 060611f6..19fe6e48 100644 --- a/kdevdesigner/designer/tableeditorimpl.cpp +++ b/kdevdesigner/designer/tableeditorimpl.cpp @@ -53,13 +53,13 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f #endif formWindow( fw ) { - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); #ifndef TQT_NO_TABLE labelColumnPixmap->setText( "" ); labelRowPixmap->setText( "" ); #ifndef TQT_NO_SQL - if ( !::tqqt_cast<TQDataTable*>(editTable) ) + if ( !::tqt_cast<TQDataTable*>(editTable) ) #endif { labelFields->hide(); @@ -68,7 +68,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f labelTableValue->hide(); } #ifndef TQT_NO_SQL - if ( ::tqqt_cast<TQDataTable*>(editTable) ) { + if ( ::tqt_cast<TQDataTable*>(editTable) ) { // ## why does this behave weird? // TabWidget->removePage( rows_tab ); // rows_tab->hide(); @@ -76,8 +76,8 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f TabWidget->setTabEnabled( rows_tab, FALSE ); } - if ( formWindow->project() && ::tqqt_cast<TQDataTable*>(editTable) ) { - TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(editTable), "database" ).toStringList(); + 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; fields << "<no field>"; @@ -159,7 +159,7 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i ) editColumnText->blockSignals( FALSE ); #ifndef TQT_NO_SQL - if ( ::tqqt_cast<TQDataTable*>(editTable) ) { + if ( ::tqt_cast<TQDataTable*>(editTable) ) { TQString s = *fieldMap.find( listColumns->index( i ) ); if ( s.isEmpty() ) comboFields->setCurrentItem( 0 ); @@ -244,7 +244,7 @@ void TableEditor::newColumnClicked() listColumns->setCurrentItem( item ); listColumns->setSelected( item, TRUE ); #ifndef TQT_NO_SQL - if ( ::tqqt_cast<TQDataTable*>(editTable) ) { + if ( ::tqt_cast<TQDataTable*>(editTable) ) { comboFields->setFocus(); } else #endif @@ -412,7 +412,7 @@ void TableEditor::readFromTable() #ifndef TQT_NO_TABLE TQHeader *cols = editTable->horizontalHeader(); table->setNumCols( cols->count() ); - TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(editTable) ); + TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( editTable ); for ( int i = 0; i < cols->count(); ++i ) { if ( editTable->horizontalHeader()->iconSet( i ) ) { table->horizontalHeader()->setLabel( i, *editTable->horizontalHeader()->iconSet( i ), diff --git a/kdevdesigner/designer/tableeditorimpl.h b/kdevdesigner/designer/tableeditorimpl.h index 7729f33e..f6889bc3 100644 --- a/kdevdesigner/designer/tableeditorimpl.h +++ b/kdevdesigner/designer/tableeditorimpl.h @@ -36,7 +36,7 @@ class FormWindow; class TableEditor : public TableEditorBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/timestamp.cpp b/kdevdesigner/designer/timestamp.cpp index 553d9e3f..79a51e67 100644 --- a/kdevdesigner/designer/timestamp.cpp +++ b/kdevdesigner/designer/timestamp.cpp @@ -34,7 +34,7 @@ TimeStamp::TimeStamp( TQObject *parent, const TQString &f ) : TQObject( parent ), filename( f ), autoCheck( FALSE ) { timer = new TQTimer( this ); - connect( timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( autoCheckTimeStamp() ) ); + connect( timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( autoCheckTimeStamp() ) ); update(); } diff --git a/kdevdesigner/designer/timestamp.h b/kdevdesigner/designer/timestamp.h index 078a925d..1ac0d13a 100644 --- a/kdevdesigner/designer/timestamp.h +++ b/kdevdesigner/designer/timestamp.h @@ -33,7 +33,7 @@ class TimeStamp : public TQObject { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/variabledialog.ui b/kdevdesigner/designer/variabledialog.ui index d9cdc7ef..721c45c4 100644 --- a/kdevdesigner/designer/variabledialog.ui +++ b/kdevdesigner/designer/variabledialog.ui @@ -282,14 +282,14 @@ <tabstop>okButton</tabstop> <tabstop>cancelButton</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot>addVariable()</slot> <slot>deleteVariable()</slot> <slot>accessChanged()</slot> <slot>nameChanged()</slot> <slot>okClicked()</slot> <slot>currentItemChanged( TQListViewItem * i )</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <includes> <include location="global" impldecl="in implementation">klineedit.h</include> diff --git a/kdevdesigner/designer/variabledialogimpl.cpp b/kdevdesigner/designer/variabledialogimpl.cpp index d2d7ef67..c35fb300 100644 --- a/kdevdesigner/designer/variabledialogimpl.cpp +++ b/kdevdesigner/designer/variabledialogimpl.cpp @@ -44,7 +44,7 @@ VariableDialog::VariableDialog( FormWindow *fw, TQWidget *parent ) : VariableDialogBase( parent ), formWindow( fw ) { varView->setSorting( -1 ); - TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); + TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formWindow ); TQValueList<MetaDataBase::Variable>::Iterator it = varLst.begin(); for ( ; it != varLst.end(); ++it ) { TQListViewItem *i = new TQListViewItem( varView ); diff --git a/kdevdesigner/designer/variabledialogimpl.h b/kdevdesigner/designer/variabledialogimpl.h index 65295073..ba258bed 100644 --- a/kdevdesigner/designer/variabledialogimpl.h +++ b/kdevdesigner/designer/variabledialogimpl.h @@ -34,7 +34,7 @@ class TQListView; class VariableDialog : public VariableDialogBase { - Q_OBJECT + TQ_OBJECT public: VariableDialog( FormWindow *fw, TQWidget* parent = 0 ); diff --git a/kdevdesigner/designer/widgetaction.cpp b/kdevdesigner/designer/widgetaction.cpp index c2ce0721..1d71f4e0 100644 --- a/kdevdesigner/designer/widgetaction.cpp +++ b/kdevdesigner/designer/widgetaction.cpp @@ -35,7 +35,7 @@ static TQStyle *windowsStyle = 0; void WidgetAction::addedTo( TQWidget *w, TQWidget *container ) { - if ( ::tqqt_cast<TQToolButton*>(w) && ::tqqt_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/kdevdesigner/designer/widgetaction.h b/kdevdesigner/designer/widgetaction.h index 161bc8a0..2e0c8e26 100644 --- a/kdevdesigner/designer/widgetaction.h +++ b/kdevdesigner/designer/widgetaction.h @@ -31,7 +31,7 @@ class WidgetAction : public TQAction { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp index 9423b6a6..7db821df 100644 --- a/kdevdesigner/designer/widgetfactory.cpp +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -107,7 +107,7 @@ FormWindow *find_formwindow( TQWidget *w ) if ( !w ) return 0; for (;;) { - if ( ::tqqt_cast<FormWindow*>(w) ) + if ( ::tqt_cast<FormWindow*>(w) ) return (FormWindow*)w; if ( !w->parentWidget() ) return 0; @@ -170,7 +170,7 @@ int QDesignerTabWidget::count() const bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) { - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return FALSE; + if ( o != tabBar() ) return FALSE; switch ( e->type() ) { case TQEvent::MouseButtonPress: { @@ -301,8 +301,8 @@ QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *parent, const char *name ) next->setAutoRaise( TRUE ); next->setAutoRepeat( TRUE ); next->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); - connect( prev, TQT_SIGNAL( clicked() ), this, TQT_SLOT( prevPage() ) ); - connect( next, TQT_SIGNAL( clicked() ), this, TQT_SLOT( nextPage() ) ); + connect( prev, TQ_SIGNAL( clicked() ), this, TQ_SLOT( prevPage() ) ); + connect( next, TQ_SIGNAL( clicked() ), this, TQ_SLOT( nextPage() ) ); updateButtons(); } @@ -522,7 +522,7 @@ void WidgetFactory::saveChangedProperties( TQObject *w, int id ) created. */ -TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) +TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, TQt::Orientation orient ) { TQString n = WidgetDatabase::className( id ); if ( n.isEmpty() ) @@ -537,18 +537,18 @@ 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 ( ::tqqt_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 ) ); if ( !w ) return 0; - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( w ); if ( !defaultProperties->contains( id ) ) - saveDefaultProperties( TQT_TQOBJECT(w), id ); + saveDefaultProperties( w, id ); if ( !changedProperties->contains( id ) ) - saveChangedProperties( TQT_TQOBJECT(w), id ); + saveChangedProperties( w, id ); return w; } @@ -562,36 +562,36 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou int spacing = MainWindow::self->currentLayoutDefaultSpacing(); int margin = 0; - int metaspacing = MetaDataBase::spacing( TQT_TQOBJECT(widget) ); - int metamargin = MetaDataBase::margin( TQT_TQOBJECT(widget) ); + int metaspacing = MetaDataBase::spacing( widget ); + int metamargin = MetaDataBase::margin( widget ); - if ( ::tqqt_cast<TQLayoutWidget*>(widget) && - ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && ::tqqt_cast<FormWindow*>(widget->parentWidget()) ) ) + if ( ::tqt_cast<TQLayoutWidget*>(widget) && + ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) || + widget && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) margin = MainWindow::self->currentLayoutDefaultMargin(); - if ( !layout && ::tqqt_cast<TQTabWidget*>(widget) ) + if ( !layout && ::tqt_cast<TQTabWidget*>(widget) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( !layout && ::tqqt_cast<TQWizard*>(widget) ) + if ( !layout && ::tqt_cast<TQWizard*>(widget) ) widget = ((TQWizard*)widget)->currentPage(); - if ( !layout && ::tqqt_cast<TQMainWindow*>(widget) ) + if ( !layout && ::tqt_cast<TQMainWindow*>(widget) ) widget = ((TQMainWindow*)widget)->centralWidget(); - if ( !layout && ::tqqt_cast<TQWidgetStack*>(widget) ) + if ( !layout && ::tqt_cast<TQWidgetStack*>(widget) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( !layout && ::tqqt_cast<TQToolBox*>(widget) ) + if ( !layout && ::tqt_cast<TQToolBox*>(widget) ) widget = ((TQToolBox*)widget)->currentItem(); - MetaDataBase::addEntry( TQT_TQOBJECT(widget) ); + MetaDataBase::addEntry( widget ); TQLayout *l = 0; int align = 0; - if ( !layout && ::tqqt_cast<TQGroupBox*>(widget) ) { + if ( !layout && ::tqt_cast<TQGroupBox*>(widget) ) { TQGroupBox *gb = (TQGroupBox*)widget; - gb->setColumnLayout( 0, Qt::Vertical ); + gb->setColumnLayout( 0, TQt::Vertical ); layout = gb->layout(); layout->setMargin( 0 ); layout->setSpacing( 0 ); @@ -609,8 +609,8 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou return 0; } align = TQt::AlignTop; - MetaDataBase::setMargin( TQT_TQOBJECT(gb), metamargin ); - MetaDataBase::setSpacing( TQT_TQOBJECT(gb), metaspacing ); + MetaDataBase::setMargin( gb, metamargin ); + MetaDataBase::setSpacing( gb, metaspacing ); } else { if ( layout ) { switch ( type ) { @@ -626,7 +626,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou default: return 0; } - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::addEntry( l ); l->setSpacing( spacing ); l->setMargin( margin ); } else { @@ -643,10 +643,10 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou default: return 0; } - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::addEntry( l ); if ( widget ) { - MetaDataBase::setMargin( TQT_TQOBJECT(widget), metamargin ); - MetaDataBase::setSpacing( TQT_TQOBJECT(widget), metaspacing ); + MetaDataBase::setMargin( widget, metamargin ); + MetaDataBase::setSpacing( widget, metaspacing ); } else { l->setMargin( margin ); l->setSpacing( spacing ); @@ -654,7 +654,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou } } l->setAlignment( align ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::addEntry( l ); return l; } @@ -663,15 +663,15 @@ void WidgetFactory::deleteLayout( TQWidget *widget ) if ( !widget ) return; - if ( ::tqqt_cast<TQTabWidget*>(widget) ) + if ( ::tqt_cast<TQTabWidget*>(widget) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( ::tqqt_cast<TQWizard*>(widget) ) + if ( ::tqt_cast<TQWizard*>(widget) ) widget = ((TQWizard*)widget)->currentPage(); - if ( ::tqqt_cast<TQMainWindow*>(widget) ) + if ( ::tqt_cast<TQMainWindow*>(widget) ) widget = ((TQMainWindow*)widget)->centralWidget(); - if ( ::tqqt_cast<TQWidgetStack*>(widget) ) + if ( ::tqt_cast<TQWidgetStack*>(widget) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( ::tqqt_cast<TQToolBox*>(widget) ) + if ( ::tqt_cast<TQToolBox*>(widget) ) widget = ((TQToolBox*)widget)->currentItem(); delete widget->layout(); } @@ -684,9 +684,9 @@ void WidgetFactory::deleteLayout( TQWidget *widget ) */ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, - const TQRect *r, Qt::Orientation orient ) + const TQRect *r, TQt::Orientation orient ) { - if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { + if ( className == "TQPushButton" ) { TQPushButton *b = 0; if ( init ) { b = new QDesignerPushButton( parent, name ); @@ -695,12 +695,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare b = new QDesignerPushButton( parent, name ); } TQWidget *w = find_formwindow( b ); - b->setAutoDefault( w && ::tqqt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) ); + b->setAutoDefault( w && ::tqt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) ); return b; - } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { + } else if ( className == "TQToolButton" ) { if ( init ) { QDesignerToolButton *tb = new QDesignerToolButton( parent, name ); - if ( ::tqqt_cast<TQToolBox*>(widgetOfContainer(parent))) { + if ( ::tqt_cast<TQToolBox*>(widgetOfContainer(parent))) { tb->setUsesTextLabel(TRUE); tb->setTextLabel("..."); tb->setAutoRaise(TRUE); @@ -711,29 +711,29 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return tb; } return new QDesignerToolButton( parent, name ); - } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQCheckBox" ) { if ( init ) { QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name ); cb->setText( TQString::fromLatin1( name ) ); return cb; } return new QDesignerCheckBox( parent, name ); - } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { + } else if ( className == "TQRadioButton" ) { if ( init ) { QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name ); rb->setText( TQString::fromLatin1( name ) ); return rb; } return new QDesignerRadioButton( parent, name ); - } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQGroupBox" ) { if ( init ) return new TQGroupBox( TQString::fromLatin1( name ), parent, name ); return new TQGroupBox( parent, name ); - } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { + } else if ( className == "TQButtonGroup" ) { if ( init ) return new TQButtonGroup( TQString::fromLatin1( name ), parent, name ); return new TQButtonGroup( parent, name ); - } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQIconView" ) { #if !defined(TQT_NO_ICONVIEW) TQIconView* iv = new TQIconView( parent, name ); if ( init ) @@ -742,7 +742,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare #else return 0; #endif - } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { + } else if ( className == "TQTable" ) { #if !defined(TQT_NO_TABLE) if ( init ) return new TQTable( 3, 3, parent, name ); @@ -751,24 +751,24 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return 0; #endif #ifndef TQT_NO_SQL - } else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { + } else if ( className == "TQDataTable" ) { return new TQDataTable( parent, name ); #endif //TQT_NO_SQL - } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQDateEdit" ) { return new TQDateEdit( parent, name ); - } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQTimeEdit" ) { return new TQTimeEdit( parent, name ); - } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQDateTimeEdit" ) { return new TQDateTimeEdit( parent, name ); } - else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { + else if ( className == "TQListBox" ) { TQListBox* lb = new TQListBox( parent, name ); if ( init ) { lb->insertItem( i18n( "New Item" ) ); lb->setCurrentItem( 0 ); } return lb; - } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQListView" ) { TQListView *lv = new TQListView( parent, name ); lv->setSorting( -1 ); if ( init ) { @@ -776,22 +776,22 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare lv->setCurrentItem( new TQListViewItem( lv, i18n( "New Item" ) ) ); } return lv; - } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) + } else if ( className == "TQLineEdit" ) return new TQLineEdit( parent, name ); - else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) + else if ( className == "TQSpinBox" ) return new TQSpinBox( parent, name ); - else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) + else if ( className == "TQSplitter" ) return new TQSplitter( parent, name ); - else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) + else if ( className == "TQMultiLineEdit" ) return new TQMultiLineEdit( parent, name ); - else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) + else if ( className == "TQTextEdit" ) return new TQTextEdit( parent, name ); - else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" ) { + else if ( className == "TQLabel" || className == "TextLabel" ) { QDesignerLabel *l = new QDesignerLabel( parent, name ); if ( init ) { l->setText( TQString::fromLatin1( name ) ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "text", TRUE ); + MetaDataBase::addEntry( l ); + MetaDataBase::setPropertyChanged( l, "text", TRUE ); } return l; } else if ( className == "PixmapLabel" ) { @@ -799,129 +799,121 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare if ( init ) { l->setPixmap( BarIcon( "designer_qtlogo.png", KDevDesignerPartFactory::instance() ) ); l->setScaledContents( TRUE ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "pixmap", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "scaledContents", TRUE ); + MetaDataBase::addEntry( l ); + MetaDataBase::setPropertyChanged( l, "pixmap", TRUE ); + MetaDataBase::setPropertyChanged( l, "scaledContents", TRUE ); } return l; - } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + } else if ( className == "TQLayoutWidget" ) return new TQLayoutWidget( parent, name ); - else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { + else if ( className == "TQTabWidget" ) { TQTabWidget *tw = new QDesignerTabWidget( parent, name ); if ( init ) { FormWindow *fw = find_formwindow( parent ); TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); tw->addTab( w, i18n("Tab 1") ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( w ); w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); tw->addTab( w, i18n("Tab 2") ); - MetaDataBase::addEntry( TQT_TQOBJECT(tw) ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( tw ); + MetaDataBase::addEntry( w ); } return tw; - } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { + } else if ( className == "TQWidgetStack" ) { QDesignerWidgetStack *ws = new QDesignerWidgetStack( parent, name ); if ( init ) { FormWindow *fw = find_formwindow( parent ); TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" ); ws->insertPage( w ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - MetaDataBase::addEntry( TQT_TQOBJECT(ws) ); + MetaDataBase::addEntry( w ); + MetaDataBase::addEntry( ws ); } return ws; - } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQComboBox" ) { return new TQComboBox( FALSE, parent, name ); - } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { + } else if ( className == "TQWidget" ) { if ( parent && - ( ::tqqt_cast<FormWindow*>(parent) || - ::tqqt_cast<TQWizard*>(parent) || - ::tqqt_cast<TQTabWidget*>(parent) || - ::tqqt_cast<TQWidgetStack*>(parent) || - ::tqqt_cast<TQToolBox*>(parent) || - ::tqqt_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 ) { QDesignerWidget *dw = new QDesignerWidget( fw, parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + MetaDataBase::addEntry( dw ); return dw; } } return new TQWidget( parent, name ); - } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { + } else if ( className == "TQDialog" ) { TQDialog *dia = 0; - if ( ::tqqt_cast<FormWindow*>(parent) ) + if ( ::tqt_cast<FormWindow*>(parent) ) dia = new QDesignerDialog( (FormWindow*)parent, parent, name ); else dia = new TQDialog( parent, name ); -#if defined(TQT_NON_COMMERCIAL) - if ( ::tqqt_cast<MainWindow*>(parent) ) -#else if ( parent ) -#endif dia->reparent( parent, TQPoint( 0, 0 ), TRUE ); return dia; - } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { + } else if ( className == "TQWizard" ) { TQWizard *wiz = new QDesignerWizard( parent, name ); -#if defined(TQT_NON_COMMERCIAL) - if ( ::tqqt_cast<MainWindow*>(parent) ) -#else if ( parent ) -#endif wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); - if ( init && ::tqqt_cast<FormWindow*>(parent) ) { + if ( init && ::tqt_cast<FormWindow*>(parent) ) { QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + MetaDataBase::addEntry( dw ); wiz->addPage( dw, i18n( "Page" ) ); - TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) ); + TQTimer::singleShot( 0, wiz, TQ_SLOT( next() ) ); } return wiz; } else if ( className == "Spacer" ) { Spacer *s = new Spacer( parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "sizeType", TRUE ); + MetaDataBase::addEntry( s ); + MetaDataBase::setPropertyChanged( s, "orientation", TRUE ); + MetaDataBase::setPropertyChanged( s, "sizeType", TRUE ); if ( !r ) return s; if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) s->setOrientation( orient ); else if ( r->width() < r->height() ) - s->setOrientation( Qt::Vertical ); + s->setOrientation( TQt::Vertical ); else - s->setOrientation( Qt::Horizontal ); + s->setOrientation( TQt::Horizontal ); return s; - } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) + } else if ( className == "TQLCDNumber" ) return new TQLCDNumber( parent, name ); - else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) + else if ( className == "TQProgressBar" ) return new TQProgressBar( parent, name ); - else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) + else if ( className == "TQTextView" ) return new TQTextView( parent, name ); - else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) + else if ( className == "TQTextBrowser" ) return new TQTextBrowser( parent, name ); - else if ( className == TQDIAL_OBJECT_NAME_STRING ) + else if ( className == "TQDial" ) return new TQDial( parent, name ); - else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { + else if ( className == "TQSlider" ) { TQSlider *s = new TQSlider( parent, name ); if ( !r ) return s; if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) s->setOrientation( orient ); else if ( r->width() > r->height() ) - s->setOrientation( Qt::Horizontal ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); + s->setOrientation( TQt::Horizontal ); + MetaDataBase::addEntry( s ); + MetaDataBase::setPropertyChanged( s, "orientation", TRUE ); return s; - } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { + } else if ( className == "TQScrollBar" ) { TQScrollBar *s = new TQScrollBar( parent, name ); if ( !r ) return s; if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) s->setOrientation( orient ); else if ( r->width() > r->height() ) - s->setOrientation( Qt::Horizontal ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); + s->setOrientation( TQt::Horizontal ); + MetaDataBase::addEntry( s ); + MetaDataBase::setPropertyChanged( s, "orientation", TRUE ); return s; - } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { + } else if ( className == "TQFrame" ) { if ( !init ) return new TQFrame( parent, name ); TQFrame *f = new TQFrame( parent, name ); @@ -929,28 +921,28 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return f; } else if ( className == "Line" ) { Line *l = new Line( parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "orientation", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShadow", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShape", TRUE ); + MetaDataBase::addEntry( l ); + MetaDataBase::setPropertyChanged( l, "orientation", TRUE ); + MetaDataBase::setPropertyChanged( l, "frameShadow", TRUE ); + MetaDataBase::setPropertyChanged( l, "frameShape", TRUE ); if ( !r ) return l; if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) l->setOrientation( orient ); else if ( r->width() < r->height() ) - l->setOrientation( Qt::Vertical ); + l->setOrientation( TQt::Vertical ); return l; - } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { + } else if ( className == "TQMainWindow" ) { TQMainWindow *mw = new TQMainWindow( parent, name, 0 ); mw->setDockEnabled( TQt::DockMinimized, FALSE ); QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" ); mw->setDockMenuEnabled( FALSE ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + MetaDataBase::addEntry( dw ); mw->setCentralWidget( dw ); (void)mw->statusBar(); dw->show(); return mw; - } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQToolBox" ) { if ( !init ) return new QDesignerToolBox( parent, name ); TQToolBox *tb = new QDesignerToolBox( parent, name ); @@ -958,20 +950,20 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) : new TQWidget( tb, "page1" ); tb->addItem( w, i18n("Page 1") ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( w ); w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new TQWidget( tb, "page2" ); tb->addItem( w, i18n("Page 2") ); - MetaDataBase::addEntry( TQT_TQOBJECT(tb) ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( tb ); + MetaDataBase::addEntry( w ); return tb; } #ifndef TQT_NO_SQL - else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { + else if ( className == "TQDataBrowser" ) { TQWidget *w = new QDesignerDataBrowser( parent, name ); if ( parent ) w->reparent( parent, TQPoint( 0, 0 ), TRUE ); return w; - } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQDataView" ) { TQWidget *w = new QDesignerDataView( parent, name ); if ( parent ) w->reparent( parent, TQPoint( 0, 0 ), TRUE ); @@ -1010,37 +1002,37 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay { layout = 0; - if ( ::tqqt_cast<TQTabWidget*>(w) ) + if ( ::tqt_cast<TQTabWidget*>(w) ) w = ((TQTabWidget*)w)->currentPage(); - if ( ::tqqt_cast<TQWizard*>(w) ) + if ( ::tqt_cast<TQWizard*>(w) ) w = ((TQWizard*)w)->currentPage(); - if ( ::tqqt_cast<TQMainWindow*>(w) ) + if ( ::tqt_cast<TQMainWindow*>(w) ) w = ((TQMainWindow*)w)->centralWidget(); - if ( ::tqqt_cast<TQWidgetStack*>(w) ) + if ( ::tqt_cast<TQWidgetStack*>(w) ) w = ((TQWidgetStack*)w)->visibleWidget(); - if ( ::tqqt_cast<TQToolBox*>(w) ) + if ( ::tqt_cast<TQToolBox*>(w) ) w = ((TQToolBox*)w)->currentItem(); - if ( ::tqqt_cast<TQSplitter*>(w) ) - return ( (TQSplitter*)w )->orientation() ==Qt::Horizontal ? HBox : VBox; + if ( ::tqt_cast<TQSplitter*>(w) ) + return ( (TQSplitter*)w )->orientation() ==TQt::Horizontal ? HBox : VBox; if ( !w || !w->layout() ) return NoLayout; TQLayout *lay = w->layout(); - if ( ::tqqt_cast<TQGroupBox*>(w) ) { - TQObjectList *l = TQT_TQOBJECT(lay)->queryList( TQLAYOUT_OBJECT_NAME_STRING ); + if ( ::tqt_cast<TQGroupBox*>(w) ) { + TQObjectList *l = lay->queryList( "TQLayout" ); if ( l && l->first() ) lay = (TQLayout*)l->first(); delete l; } layout = lay; - if ( ::tqqt_cast<TQHBoxLayout*>(lay) ) + if ( ::tqt_cast<TQHBoxLayout*>(lay) ) return HBox; - else if ( ::tqqt_cast<TQVBoxLayout*>(lay) ) + else if ( ::tqt_cast<TQVBoxLayout*>(lay) ) return VBox; - else if ( ::tqqt_cast<TQGridLayout*>(lay) ) + else if ( ::tqt_cast<TQGridLayout*>(lay) ) return Grid; return NoLayout; } @@ -1050,11 +1042,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay */ WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout ) { - if ( ::tqqt_cast<TQHBoxLayout*>(layout) ) + if ( ::tqt_cast<TQHBoxLayout*>(layout) ) return HBox; - else if ( ::tqqt_cast<TQVBoxLayout*>(layout) ) + else if ( ::tqt_cast<TQVBoxLayout*>(layout) ) return VBox; - else if ( ::tqqt_cast<TQGridLayout*>(layout) ) + else if ( ::tqt_cast<TQGridLayout*>(layout) ) return Grid; return NoLayout; } @@ -1071,7 +1063,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w ) TQWidget *WidgetFactory::layoutParent( TQLayout *layout ) { - TQObject *o = TQT_TQOBJECT(layout); + TQObject *o = layout; while ( o ) { if ( o->isWidgetType() ) return (TQWidget*)o; @@ -1093,15 +1085,15 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) { if ( !w ) return w; - if ( ::tqqt_cast<TQTabWidget*>(w) ) + if ( ::tqt_cast<TQTabWidget*>(w) ) return ((TQTabWidget*)w)->currentPage(); - if ( ::tqqt_cast<TQWizard*>(w) ) + if ( ::tqt_cast<TQWizard*>(w) ) return ((TQWizard*)w)->currentPage(); - if ( ::tqqt_cast<TQWidgetStack*>(w) ) + if ( ::tqt_cast<TQWidgetStack*>(w) ) return ((TQWidgetStack*)w)->visibleWidget(); - if ( ::tqqt_cast<TQToolBox*>(w) ) + if ( ::tqt_cast<TQToolBox*>(w) ) return ((TQToolBox*)w)->currentItem(); - if ( ::tqqt_cast<TQMainWindow*>(w) ) + if ( ::tqt_cast<TQMainWindow*>(w) ) return ((TQMainWindow*)w)->centralWidget(); #ifdef TQT_CONTAINER_CUSTOM_WIDGETS if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ) @@ -1133,16 +1125,16 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) { - if ( w && ::tqqt_cast<TQWidgetStack*>(w->parentWidget()) ) + if ( w && ::tqt_cast<TQWidgetStack*>(w->parentWidget()) ) w = w->parentWidget(); if ( w->parentWidget() && w->parentWidget()->parentWidget() && w->parentWidget()->parentWidget()->parentWidget() && - ::tqqt_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( TQT_TQOBJECT(w) ) ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ); if ( WidgetDatabase::isContainer( id ) || - w && ::tqqt_cast<FormWindow*>(w->parentWidget()) ) + w && ::tqt_cast<FormWindow*>(w->parentWidget()) ) return w; w = w->parentWidget(); } @@ -1165,22 +1157,22 @@ 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 ( ::tqqt_cast<TQTabBar*>(o) ) + if ( ::tqt_cast<TQTabBar*>(o) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast<TQSizeGrip*>(o) ) + else if ( ::tqt_cast<TQSizeGrip*>(o) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast<TQButton*>(o) && - ( ::tqqt_cast<TQTabBar*>(o->parent()) || ::tqqt_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 ( ::tqqt_cast<TQPushButton*>(o) && ::tqqt_cast<TQWizard*>(o->parent()) ) + else if ( ::tqt_cast<TQPushButton*>(o) && ::tqt_cast<TQWizard*>(o->parent()) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast<TQMenuBar*>(o) && ::tqqt_cast<TQMainWindow*>(o->parent()) ) + else if ( ::tqt_cast<TQMenuBar*>(o) && ::tqt_cast<TQMainWindow*>(o->parent()) ) return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::tqqt_cast<TQDockWindowHandle*>(o) ) - else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) ) +// else if ( ::tqt_cast<TQDockWindowHandle*>(o) ) + else if ( o->inherits( "TQDockWindowHandle" ) ) return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::tqqt_cast<TQHideDock*>(o) ) - else if ( o->inherits( TQHIDEDOCK_OBJECT_NAME_STRING ) ) +// else if ( ::tqt_cast<TQHideDock*>(o) ) + else if ( o->inherits( "TQHideDock" ) ) return ( lastWasAPassiveInteractor = TRUE ); else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 ) return ( lastWasAPassiveInteractor = TRUE ); @@ -1189,7 +1181,7 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) return ( lastWasAPassiveInteractor = FALSE ); WidgetInterface *iface = 0; TQWidget *w = (TQWidget*)o; - while ( !iface && w && !::tqqt_cast<FormWindow*>(w) ) { + while ( !iface && w && !::tqt_cast<FormWindow*>(w) ) { widgetManager()->queryInterface( classNameOf( w ), &iface ); w = w->parentWidget(); } @@ -1222,76 +1214,76 @@ const char* WidgetFactory::classNameOf( TQObject* o ) return o->className(); if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className()))) return o->className(); - else if ( ::tqqt_cast<QDesignerTabWidget*>(o) ) - return TQTABWIDGET_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerWidgetStack*>(o) ) - return TQWIDGETSTACK_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<TQWidgetStack*>(o) ) + else if ( ::tqt_cast<QDesignerTabWidget*>(o) ) + return "TQTabWidget"; + else if ( ::tqt_cast<QDesignerWidgetStack*>(o) ) + return "TQWidgetStack"; + else if ( ::tqt_cast<TQWidgetStack*>(o) ) return "TQWeDoNotWantToBreakTabWidget"; - else if ( ::tqqt_cast<QDesignerDialog*>(o) ) - return TQDIALOG_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerWidget*>(o) ) - return TQWIDGET_OBJECT_NAME_STRING; + else if ( ::tqt_cast<QDesignerDialog*>(o) ) + return "TQDialog"; + else if ( ::tqt_cast<QDesignerWidget*>(o) ) + return "TQWidget"; else if ( o->inherits( "CustomWidget" ) ) return ( (CustomWidget*)o )->realClassName().latin1(); - else if ( ::tqqt_cast<QDesignerLabel*>(o) ) - return TQLABEL_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerWizard*>(o) ) - return TQWIZARD_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerPushButton*>(o) ) - return TQPUSHBUTTON_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerToolButton*>(o) ) - return TQTOOLBUTTON_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerRadioButton*>(o) ) - return TQRADIOBUTTON_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerCheckBox*>(o) ) - return TQCHECKBOX_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<MenuBarEditor*>(o) ) - return TQMENUBAR_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerToolBar*>(o) ) - return TQTOOLBAR_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerAction*>(o) ) - return TQACTION_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerActionGroup*>(o) ) - return TQACTIONGROUP_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<PopupMenuEditor*>(o) ) - return TQPOPUPMENU_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerToolBox*>(o) ) - return TQTOOLBOX_OBJECT_NAME_STRING; + else if ( ::tqt_cast<QDesignerLabel*>(o) ) + return "TQLabel"; + else if ( ::tqt_cast<QDesignerWizard*>(o) ) + return "TQWizard"; + else if ( ::tqt_cast<QDesignerPushButton*>(o) ) + return "TQPushButton"; + else if ( ::tqt_cast<QDesignerToolButton*>(o) ) + return "TQToolButton"; + else if ( ::tqt_cast<QDesignerRadioButton*>(o) ) + return "TQRadioButton"; + else if ( ::tqt_cast<QDesignerCheckBox*>(o) ) + return "TQCheckBox"; + else if ( ::tqt_cast<MenuBarEditor*>(o) ) + return "TQMenuBar"; + else if ( ::tqt_cast<QDesignerToolBar*>(o) ) + return "TQToolBar"; + else if ( ::tqt_cast<QDesignerAction*>(o) ) + return "TQAction"; + else if ( ::tqt_cast<QDesignerActionGroup*>(o) ) + return "TQActionGroup"; + else if ( ::tqt_cast<PopupMenuEditor*>(o) ) + return "TQPopupMenu"; + else if ( ::tqt_cast<QDesignerToolBox*>(o) ) + return "TQToolBox"; #ifndef TQT_NO_SQL - else if ( ::tqqt_cast<QDesignerDataBrowser*>(o) ) - return TQDATABROWSER_OBJECT_NAME_STRING; - else if ( ::tqqt_cast<QDesignerDataView*>(o) ) - return TQDATAVIEW_OBJECT_NAME_STRING; + else if ( ::tqt_cast<QDesignerDataBrowser*>(o) ) + return "TQDataBrowser"; + else if ( ::tqt_cast<QDesignerDataView*>(o) ) + return "TQDataView"; #endif return o->className(); } TQString WidgetFactory::defaultSignal( TQObject *w ) { - if ( ::tqqt_cast<TQRadioButton*>(w) || ::tqqt_cast<TQCheckBox*>(w) ) + if ( ::tqt_cast<TQRadioButton*>(w) || ::tqt_cast<TQCheckBox*>(w) ) return "toggled"; - else if ( ::tqqt_cast<TQButton*>(w) || ::tqqt_cast<TQButtonGroup*>(w) ) + else if ( ::tqt_cast<TQButton*>(w) || ::tqt_cast<TQButtonGroup*>(w) ) return "clicked"; - else if ( ::tqqt_cast<TQTextBrowser*>(w) ) + else if ( ::tqt_cast<TQTextBrowser*>(w) ) return "linkClicked"; - else if ( ::tqqt_cast<TQLineEdit*>(w) || ::tqqt_cast<TQTextEdit*>(w) ) + else if ( ::tqt_cast<TQLineEdit*>(w) || ::tqt_cast<TQTextEdit*>(w) ) return "textChanged"; - else if ( ::tqqt_cast<TQListView*>(w) || ::tqqt_cast<TQIconView*>(w) || - ::tqqt_cast<TQListBox*>(w) || ::tqqt_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 ( ::tqqt_cast<TQTabWidget*>(w) ) + else if ( ::tqt_cast<TQTabWidget*>(w) ) return "selected"; - else if ( ::tqqt_cast<TQToolBox*>(w) ) + else if ( ::tqt_cast<TQToolBox*>(w) ) return "currentChanged"; - else if ( ::tqqt_cast<TQWidgetStack*>(w) ) + else if ( ::tqt_cast<TQWidgetStack*>(w) ) return "aboutToShow"; - else if ( ::tqqt_cast<TQSpinBox*>(w) || ::tqqt_cast<TQSlider*>(w) || - ::tqqt_cast<TQScrollBar*>(w) || ::tqqt_cast<TQDateEdit*>(w) || - ::tqqt_cast<TQTimeEdit*>(w) || ::tqqt_cast<TQDateTimeEdit*>(w) || - ::tqqt_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 ( ::tqqt_cast<TQComboBox*>(w) ) + else if ( ::tqt_cast<TQComboBox*>(w) ) return "activated"; return TQString(); } @@ -1307,14 +1299,14 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MainWindow::self->currProject()->fakeFormFileFor( o ) ) return; MetaDataBase::setPropertyChanged( o, "name", TRUE ); - if ( !::tqqt_cast<QDesignerToolBar*>(o) && !::tqqt_cast<MenuBarEditor*>(o) ) + if ( !::tqt_cast<QDesignerToolBar*>(o) && !::tqt_cast<MenuBarEditor*>(o) ) MetaDataBase::setPropertyChanged( o, "geometry", TRUE ); - if ( ::tqqt_cast<TQPushButton*>(o) || - ::tqqt_cast<TQRadioButton*>(o) || - ::tqqt_cast<TQCheckBox*>(o) || - ::tqqt_cast<TQToolButton*>(o) ) { - if (::tqqt_cast<TQToolButton*>(o) && ::tqqt_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 ); @@ -1323,19 +1315,19 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MetaDataBase::setPropertyChanged( o, "text", TRUE ); } } - else if ( ::tqqt_cast<TQGroupBox*>(o) ) + else if ( ::tqt_cast<TQGroupBox*>(o) ) MetaDataBase::setPropertyChanged( o, "title", TRUE ); - else if ( o->isA( TQFRAME_OBJECT_NAME_STRING ) ) { + else if ( o->isA( "TQFrame" ) ) { MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); - } else if ( ::tqqt_cast<TQTabWidget*>(o) || ::tqqt_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 ( ::tqqt_cast<TQWidgetStack*>(o) ) { + } else if ( ::tqt_cast<TQWidgetStack*>(o) ) { MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); - } else if ( ::tqqt_cast<TQToolBox*>(o) ) { + } else if ( ::tqt_cast<TQToolBox*>(o) ) { MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE ); MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE ); @@ -1343,9 +1335,9 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE ); MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE ); #ifndef TQT_NO_TABLE - } else if ( ::tqqt_cast<TQTable*>(o) ) { + } else if ( ::tqt_cast<TQTable*>(o) ) { # ifndef TQT_NO_SQL - if (!::tqqt_cast<TQDataTable*>(o) ) + if (!::tqt_cast<TQDataTable*>(o) ) # endif { MetaDataBase::setPropertyChanged( o, "numRows", TRUE ); @@ -1357,11 +1349,11 @@ void WidgetFactory::initChangedProperties( TQObject *o ) } } #endif - } else if ( ::tqqt_cast<TQSplitter*>(o) ) { + } else if ( ::tqt_cast<TQSplitter*>(o) ) { MetaDataBase::setPropertyChanged( o, "orientation", TRUE ); - } else if ( ::tqqt_cast<QDesignerToolBar*>(o) ) { + } else if ( ::tqt_cast<QDesignerToolBar*>(o) ) { MetaDataBase::setPropertyChanged( o, "label", TRUE ); - } else if ( ::tqqt_cast<MenuBarEditor*>(o) ) { + } else if ( ::tqt_cast<MenuBarEditor*>(o) ) { MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE ); MetaDataBase::setPropertyChanged( o, "itemText", TRUE ); @@ -1380,9 +1372,9 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) return TRUE; if ( className.contains( "IconView" ) ) return TRUE; - if ( className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) + if ( className == "TQTextEdit" || className == "TQMultiLineEdit" ) return TRUE; - if ( ::tqqt_cast<TQTable*>(editorWidget) != 0 ) + if ( ::tqt_cast<TQTable*>(editorWidget) != 0 ) return TRUE; return FALSE; @@ -1394,7 +1386,7 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) if ( className.contains( "ListBox" ) || className.contains( "ListView" ) || className.contains( "IconView" ) || className.contains( "ComboBox" ) || - ::tqqt_cast<TQTable*>(editorWidget) != 0 ) + ::tqt_cast<TQTable*>(editorWidget) != 0 ) return TRUE; return FALSE; @@ -1405,7 +1397,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, TQString className = WidgetDatabase::className( id ); if ( className.contains( "ListBox" ) ) { - if ( !::tqqt_cast<TQListBox*>(editWidget) ) + if ( !::tqt_cast<TQListBox*>(editWidget) ) return; ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw ); e->exec(); @@ -1414,7 +1406,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "ComboBox" ) ) { - if ( !::tqqt_cast<TQComboBox*>(editWidget) ) + if ( !::tqt_cast<TQComboBox*>(editWidget) ) return; TQComboBox *cb = (TQComboBox*)editWidget; ListBoxEditor *e = new ListBoxEditor( parent, cb->listBox(), fw ); @@ -1425,7 +1417,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "ListView" ) ) { - if ( !::tqqt_cast<TQListView*>(editWidget) ) + if ( !::tqt_cast<TQListView*>(editWidget) ) return; TQListView *lv = (TQListView*)editWidget; ListViewEditor *e = new ListViewEditor( parent, lv, fw ); @@ -1435,7 +1427,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "IconView" ) ) { - if ( !::tqqt_cast<TQIconView*>(editWidget) ) + if ( !::tqt_cast<TQIconView*>(editWidget) ) return; IconViewEditor *e = new IconViewEditor( parent, editWidget, fw ); e->exec(); @@ -1443,14 +1435,14 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, return; } - if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING ) { + if ( className == "TQMultiLineEdit" || className == "TQTextEdit" ) { MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw ); e->exec(); delete e; return; } #ifndef TQT_NO_TABLE - if (::tqqt_cast<TQTable*>(editWidget) != 0) { + if (::tqt_cast<TQTable*>(editWidget) != 0) { TableEditor *e = new TableEditor( parent, editWidget, fw ); e->exec(); delete e; @@ -1549,7 +1541,7 @@ void QDesignerLabel::updateBuddy() if ( myBuddy.isEmpty() ) return; - TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, FALSE, TRUE ); + TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, FALSE, TRUE ); if ( !l || !l->first() ) { delete l; return; @@ -1633,15 +1625,15 @@ void TQLayoutWidget::updateSizePolicy() if ( parent() && parent()->isWidgetType() ) { parentLayout = ((TQWidget *)parent())->layout(); if ( parentLayout && - ::tqqt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) ) + ::tqt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) ) parentLayout = 0; } TQObjectListIt it( childrenListObject() ); TQObject *o; - if ( ::tqqt_cast<TQVBoxLayout*>(layout()) ) { - if ( ::tqqt_cast<TQHBoxLayout*>(parentLayout) ) + if ( ::tqt_cast<TQVBoxLayout*>(layout()) ) { + if ( ::tqt_cast<TQHBoxLayout*>(parentLayout) ) vt = TQSizePolicy::Minimum; else vt = TQSizePolicy::Fixed; @@ -1661,8 +1653,8 @@ void TQLayoutWidget::updateSizePolicy() if ( w->sizePolicy().mayShrinkVertically() ) vt |= TQSizePolicy::Maximum; } - } else if ( ::tqqt_cast<TQHBoxLayout*>(layout()) ) { - if ( ::tqqt_cast<TQVBoxLayout*>(parentLayout) ) + } else if ( ::tqt_cast<TQHBoxLayout*>(layout()) ) { + if ( ::tqt_cast<TQVBoxLayout*>(parentLayout) ) ht = TQSizePolicy::Minimum; else ht = TQSizePolicy::Fixed; @@ -1682,13 +1674,13 @@ void TQLayoutWidget::updateSizePolicy() if ( !w->sizePolicy().mayShrinkVertically() ) vt &= ~TQSizePolicy::Maximum; } - } else if ( ::tqqt_cast<TQGridLayout*>(layout()) ) { + } else if ( ::tqt_cast<TQGridLayout*>(layout()) ) { ht = TQSizePolicy::Fixed; vt = TQSizePolicy::Fixed; if ( parentLayout ) { - if ( ::tqqt_cast<TQVBoxLayout*>(parentLayout) ) + if ( ::tqt_cast<TQVBoxLayout*>(parentLayout) ) ht = TQSizePolicy::Minimum; - else if ( ::tqqt_cast<TQHBoxLayout*>(parentLayout) ) + else if ( ::tqt_cast<TQHBoxLayout*>(parentLayout) ) vt = TQSizePolicy::Minimum; } @@ -1708,17 +1700,9 @@ void TQLayoutWidget::updateSizePolicy() vt |= TQSizePolicy::Maximum; } } -#ifdef USE_QT4 - if ( layout()->expanding() & TQSizePolicy::Horizontally ) -#else // USE_QT4 if ( layout()->expanding() & TQSizePolicy::Horizontally ) -#endif // USE_QT4 ht = TQSizePolicy::Expanding; -#ifdef USE_QT4 - if ( layout()->expanding() & TQSizePolicy::Vertically ) -#else // USE_QT4 if ( layout()->expanding() & TQSizePolicy::Vertically ) -#endif // USE_QT4 vt = TQSizePolicy::Expanding; layout()->invalidate(); @@ -1730,7 +1714,7 @@ void TQLayoutWidget::updateSizePolicy() void CustomWidget::paintEvent( TQPaintEvent *e ) { - if ( ::tqqt_cast<FormWindow*>(parentWidget()) ) { + if ( ::tqt_cast<FormWindow*>(parentWidget()) ) { ( (FormWindow*)parentWidget() )->paintGrid( this, e ); } else { TQPainter p( this ); diff --git a/kdevdesigner/designer/widgetfactory.h b/kdevdesigner/designer/widgetfactory.h index feebe9c7..b120313b 100644 --- a/kdevdesigner/designer/widgetfactory.h +++ b/kdevdesigner/designer/widgetfactory.h @@ -121,7 +121,7 @@ private: class QDesignerTabWidget : public TQTabWidget { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true ) TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) @@ -151,7 +151,7 @@ private: class QDesignerWidgetStack : public TQWidgetStack { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true ) TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true ) @@ -195,7 +195,7 @@ private: class QDesignerWizard : public TQWizard { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int currentPage READ currentPageNum WRITE setCurrentPage STORED false DESIGNABLE true ) TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true ) @@ -238,7 +238,7 @@ private: class TQLayoutWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: @@ -257,7 +257,7 @@ protected: class CustomWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: @@ -290,7 +290,7 @@ protected: class Line : public TQFrame { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( Orientation orientation READ orientation WRITE setOrientation ) @@ -317,7 +317,7 @@ public: class QDesignerLabel : public TQLabel { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget ) @@ -350,7 +350,7 @@ private: class QDesignerWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: @@ -371,7 +371,7 @@ private: class QDesignerDialog : public TQDialog { - Q_OBJECT + TQ_OBJECT TQ_OVERRIDE( bool modal READ isModal WRITE setModal ) @@ -393,7 +393,7 @@ private: class QDesignerToolButton : public TQToolButton { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) @@ -402,13 +402,13 @@ public: : TQToolButton( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { ( (TQButtonGroup*)parentWidget() )->remove( this ); ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } @@ -417,7 +417,7 @@ public: class QDesignerRadioButton : public TQRadioButton { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) @@ -426,13 +426,13 @@ public: : TQRadioButton( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { ( (TQButtonGroup*)parentWidget() )->remove( this ); ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } @@ -442,7 +442,7 @@ public: class QDesignerPushButton : public TQPushButton { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) @@ -451,13 +451,13 @@ public: : TQPushButton( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { ( (TQButtonGroup*)parentWidget() )->remove( this ); ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } @@ -467,7 +467,7 @@ public: class QDesignerCheckBox : public TQCheckBox { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId ) @@ -476,13 +476,13 @@ public: : TQCheckBox( parent, name ) {} bool isInButtonGroup() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ); } int buttonGroupId() const { - return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) { ( (TQButtonGroup*)parentWidget() )->remove( this ); ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } @@ -492,7 +492,7 @@ public: class QDesignerToolBox : public TQToolBox { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQString itemLabel READ itemLabel WRITE setItemLabel STORED false DESIGNABLE true ) TQ_PROPERTY( TQCString itemName READ itemName WRITE setItemName STORED false DESIGNABLE true ) diff --git a/kdevdesigner/designer/wizardeditor.ui b/kdevdesigner/designer/wizardeditor.ui index 84302d09..8885a825 100644 --- a/kdevdesigner/designer/wizardeditor.ui +++ b/kdevdesigner/designer/wizardeditor.ui @@ -319,7 +319,7 @@ <slot>cancelClicked()</slot> </connection> </connections> -<Q_SLOTS> +<slots> <slot access="protected">init()</slot> <slot access="protected">destroy()</slot> <slot access="protected">addClicked()</slot> @@ -332,7 +332,7 @@ <slot access="protected">okClicked()</slot> <slot access="protected">removeClicked()</slot> <slot access="protected">upClicked()</slot> -</Q_SLOTS> +</slots> <includes> <include location="local" impldecl="in implementation">myiconloader.h</include> </includes> diff --git a/kdevdesigner/designer/wizardeditorimpl.cpp b/kdevdesigner/designer/wizardeditorimpl.cpp index c4c4f83d..1342c3ac 100644 --- a/kdevdesigner/designer/wizardeditorimpl.cpp +++ b/kdevdesigner/designer/wizardeditorimpl.cpp @@ -41,19 +41,19 @@ WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw ) : WizardEditorBase( parent, 0 ), formwindow( fw ), wizard( w ), draggedItem( 0 ) { - connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); fillListBox(); // Add drag and drop ListBoxDnd *listBoxDnd = new ListBoxDnd( listBox ); listBoxDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move ); - TQObject::connect( listBoxDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), - listBoxDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) ); + TQObject::connect( listBoxDnd, TQ_SIGNAL( dropped( TQListBoxItem * ) ), + listBoxDnd, TQ_SLOT( confirmDrop( TQListBoxItem * ) ) ); - TQObject::connect( listBoxDnd, TQT_SIGNAL( dragged( TQListBoxItem * ) ), - this, TQT_SLOT( itemDragged( TQListBoxItem * ) ) ); - TQObject::connect( listBoxDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ), - this, TQT_SLOT( itemDropped( TQListBoxItem * ) ) ); + TQObject::connect( listBoxDnd, TQ_SIGNAL( dragged( TQListBoxItem * ) ), + this, TQ_SLOT( itemDragged( TQListBoxItem * ) ) ); + TQObject::connect( listBoxDnd, TQ_SIGNAL( dropped( TQListBoxItem * ) ), + this, TQ_SLOT( itemDropped( TQListBoxItem * ) ) ); // Add in-place rename new ListBoxRename( listBox ); diff --git a/kdevdesigner/designer/wizardeditorimpl.h b/kdevdesigner/designer/wizardeditorimpl.h index f49a6b6c..844739a3 100644 --- a/kdevdesigner/designer/wizardeditorimpl.h +++ b/kdevdesigner/designer/wizardeditorimpl.h @@ -37,7 +37,7 @@ class FormWindow; class WizardEditor : public WizardEditorBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/designer/workspace.cpp b/kdevdesigner/designer/workspace.cpp index b806cc6c..4cd0c26f 100644 --- a/kdevdesigner/designer/workspace.cpp +++ b/kdevdesigner/designer/workspace.cpp @@ -80,8 +80,8 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, TQObject *o, Project *p ) project = p; t = ObjectType; setPixmap( 0, SmallIcon( "designer_object.png" , KDevDesignerPartFactory::instance()) ); - TQObject::connect( p->fakeFormFileFor( o ), TQT_SIGNAL( somethingChanged(FormFile*) ), - listView(), TQT_SLOT( update() ) ); + TQObject::connect( p->fakeFormFileFor( o ), TQ_SIGNAL( somethingChanged(FormFile*) ), + listView(), TQ_SLOT( update() ) ); } WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type ) @@ -92,7 +92,7 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type ) t = type; if ( type == FormFileType ) { setPixmap( 0, SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) ); - TQObject::connect( ff, TQT_SIGNAL( somethingChanged(FormFile*) ), listView(), TQT_SLOT( update(FormFile*) ) ); + TQObject::connect( ff, TQ_SIGNAL( somethingChanged(FormFile*) ), listView(), TQ_SLOT( update(FormFile*) ) ); if ( formFile->supportsCodeFile() ) { (void) new WorkspaceItem( this, formFile, FormSourceType ); } @@ -292,12 +292,12 @@ Workspace::Workspace( TQWidget *parent, MainWindow *mw ) #endif addColumn( i18n( "Files" ) ); setAllColumnsShowFocus( TRUE ); - connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ), - this, TQT_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ), - connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - this, TQT_SLOT( itemDoubleClicked( TQListViewItem * ) ) ), - connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), - this, TQT_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ), + connect( this, TQ_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ), + this, TQ_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ), + connect( this, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQ_SLOT( itemDoubleClicked( TQListViewItem * ) ) ), + connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), + this, TQ_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ), setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); viewport()->setAcceptDrops( TRUE ); @@ -319,23 +319,23 @@ void Workspace::setCurrentProject( Project *pro ) if ( project == pro ) return; if ( project ) { - disconnect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); - disconnect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); - disconnect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); - disconnect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); - disconnect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) ); - disconnect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) ); - disconnect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) ); + disconnect( project, TQ_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQ_SLOT( sourceFileAdded(SourceFile*) ) ); + disconnect( project, TQ_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQ_SLOT( sourceFileRemoved(SourceFile*) ) ); + disconnect( project, TQ_SIGNAL( formFileAdded(FormFile*) ), this, TQ_SLOT( formFileAdded(FormFile*) ) ); + disconnect( project, TQ_SIGNAL( formFileRemoved(FormFile*) ), this, TQ_SLOT( formFileRemoved(FormFile*) ) ); + disconnect( project, TQ_SIGNAL( objectAdded(TQObject*) ), this, TQ_SLOT( objectAdded(TQObject*) ) ); + disconnect( project, TQ_SIGNAL( objectRemoved(TQObject*) ), this, TQ_SLOT( objectRemoved(TQObject*) ) ); + disconnect( project, TQ_SIGNAL( projectModified() ), this, TQ_SLOT( update() ) ); } project = pro; - connect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); - connect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); - connect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); - connect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); - connect( project, TQT_SIGNAL( destroyed(TQObject*) ), this, TQT_SLOT( projectDestroyed(TQObject*) ) ); - connect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) ); - connect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) ); - connect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) ); + connect( project, TQ_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQ_SLOT( sourceFileAdded(SourceFile*) ) ); + connect( project, TQ_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQ_SLOT( sourceFileRemoved(SourceFile*) ) ); + connect( project, TQ_SIGNAL( formFileAdded(FormFile*) ), this, TQ_SLOT( formFileAdded(FormFile*) ) ); + connect( project, TQ_SIGNAL( formFileRemoved(FormFile*) ), this, TQ_SLOT( formFileRemoved(FormFile*) ) ); + connect( project, TQ_SIGNAL( destroyed(TQObject*) ), this, TQ_SLOT( projectDestroyed(TQObject*) ) ); + connect( project, TQ_SIGNAL( objectAdded(TQObject*) ), this, TQ_SLOT( objectAdded(TQObject*) ) ); + connect( project, TQ_SIGNAL( objectRemoved(TQObject*) ), this, TQ_SLOT( objectRemoved(TQObject*) ) ); + connect( project, TQ_SIGNAL( projectModified() ), this, TQ_SLOT( update() ) ); clear(); if ( bufferEdit ) @@ -523,7 +523,7 @@ void Workspace::itemDoubleClicked( TQListViewItem *i ) void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& ) { - if ( !i || button != Qt::LeftButton ) + if ( !i || button != TQt::LeftButton ) return; closeAutoOpenItems(); @@ -640,7 +640,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) case OPEN_SOURCE: case OPEN_FORM: case OPEN_FORM_SOURCE: - itemClicked( Qt::LeftButton, i, pos ); + itemClicked( TQt::LeftButton, i, pos ); break; } } @@ -648,7 +648,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) bool Workspace::eventFilter( TQObject *o, TQEvent * e ) { // Reggie, on what type of events do we have to execute updateBufferEdit() - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(bufferEdit) && e->type() != TQEvent::ChildRemoved ) + if ( o == bufferEdit && e->type() != TQEvent::ChildRemoved ) updateBufferEdit(); return TQListView::eventFilter( o, e ); } @@ -656,8 +656,8 @@ bool Workspace::eventFilter( TQObject *o, TQEvent * e ) void Workspace::setBufferEdit( QCompletionEdit *edit ) { bufferEdit = edit; - connect( bufferEdit, TQT_SIGNAL( chosen( const TQString & ) ), - this, TQT_SLOT( bufferChosen( const TQString & ) ) ); + connect( bufferEdit, TQ_SIGNAL( chosen( const TQString & ) ), + this, TQ_SLOT( bufferChosen( const TQString & ) ) ); bufferEdit->installEventFilter( this ); } @@ -689,7 +689,7 @@ void Workspace::bufferChosen( const TQString &buffer ) TQListViewItemIterator it( this ); while ( it.current() ) { if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) { - itemClicked( Qt::LeftButton, it.current(), TQPoint() ); + itemClicked( TQt::LeftButton, it.current(), TQPoint() ); break; } ++it; diff --git a/kdevdesigner/designer/workspace.h b/kdevdesigner/designer/workspace.h index 052a1b87..f16e9fcf 100644 --- a/kdevdesigner/designer/workspace.h +++ b/kdevdesigner/designer/workspace.h @@ -86,7 +86,7 @@ private: class Workspace : public TQListView { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/interfaces/widgetinterface.h b/kdevdesigner/interfaces/widgetinterface.h index 5f0312f8..6f8e1247 100644 --- a/kdevdesigner/interfaces/widgetinterface.h +++ b/kdevdesigner/interfaces/widgetinterface.h @@ -30,6 +30,6 @@ #include <tqwidgetinterface_p.h> #define WidgetInterface TQWidgetFactoryInterface -#define IID_Widget IID_TQWidgetFactory +#define IID_Widget IID_QWidgetFactory #endif diff --git a/kdevdesigner/plugins/languageinterfaceimpl.cpp b/kdevdesigner/plugins/languageinterfaceimpl.cpp index 2e4f9f20..99fa5f2f 100644 --- a/kdevdesigner/plugins/languageinterfaceimpl.cpp +++ b/kdevdesigner/plugins/languageinterfaceimpl.cpp @@ -59,7 +59,7 @@ TQRESULT LanguageInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInt return parent->queryInterface( uuid, iface ); *iface = 0; - if ( uuid == IID_TQUnknown ) + if ( uuid == IID_QUnknown ) *iface = (TQUnknownInterface*)this; else if ( uuid == IID_Language ) *iface = (LanguageInterface*)this; diff --git a/kdevdesigner/shared/ui2uib.cpp b/kdevdesigner/shared/ui2uib.cpp index 5cff46e0..e2b8665f 100644 --- a/kdevdesigner/shared/ui2uib.cpp +++ b/kdevdesigner/shared/ui2uib.cpp @@ -137,13 +137,13 @@ static TQCString layoutForTag( const TQString& tag ) { if ( tag == "grid" ) { - return TQGRIDLAYOUT_OBJECT_NAME_STRING; + return "TQGridLayout"; } else if ( tag == "hbox" ) { - return TQHBOXLAYOUT_OBJECT_NAME_STRING; + return "TQHBoxLayout"; } else if ( tag == "vbox" ) { - return TQVBOXLAYOUT_OBJECT_NAME_STRING; + return "TQVBoxLayout"; } else { - return TQLAYOUT_OBJECT_NAME_STRING; + return "TQLayout"; } } @@ -490,9 +490,9 @@ static int outputObject( TQMap<int, TQStringList>& buddies, { bool isTQObject = !className.isEmpty(); - if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) + if ( className == "TQToolBar" ) out << (TQ_UINT8) elem.attribute( "dock", "0" ).toInt(); - if ( className == TQWIDGET_OBJECT_NAME_STRING ) + if ( className == "TQWidget" ) className = elem.attribute( "class", className ).latin1(); int objectNo = -1; @@ -504,7 +504,7 @@ static int outputObject( TQMap<int, TQStringList>& buddies, outputGridCell( out, elem ); // optimization: insert '&Foo' into string-table before 'Foo' - if ( className == TQACTION_OBJECT_NAME_STRING || className == TQACTIONGROUP_OBJECT_NAME_STRING ) { + if ( className == "TQAction" || className == "TQActionGroup" ) { TQVariant value = DomTool::readProperty( elem, "menuText", TQVariant() ); if ( value.asString().startsWith("&") ) strings.insertString( value.asString() ); @@ -523,11 +523,11 @@ static int outputObject( TQMap<int, TQStringList>& buddies, } } else { out << (TQ_UINT8) Object_SubAction; - outputObject( buddies, objects, strings, out, f, TQACTION_OBJECT_NAME_STRING ); + outputObject( buddies, objects, strings, out, f, "TQAction" ); } } else if ( tag == "actiongroup" ) { out << (TQ_UINT8) Object_SubAction; - outputObject( buddies, objects, strings, out, f, TQACTIONGROUP_OBJECT_NAME_STRING ); + outputObject( buddies, objects, strings, out, f, "TQActionGroup" ); } else if ( tag == "attribute" ) { out << (TQ_UINT8) Object_Attribute; outputProperty( buddies, objectNo, strings, out, f ); @@ -564,13 +564,13 @@ static int outputObject( TQMap<int, TQStringList>& buddies, out << (TQ_UINT8) Object_Spacer; outputObject( buddies, objects, strings, out, f ); } else if ( tag == "widget" ) { - if ( f.attribute("class") == TQLAYOUTWIDGET_OBJECT_NAME_STRING && + if ( f.attribute("class") == "TQLayoutWidget" && elem.tagName() != "widget" ) { outputLayoutWidgetsSubLayout( buddies, objects, strings, out, f ); } else { out << (TQ_UINT8) Object_SubWidget; - outputObject( buddies, objects, strings, out, f, TQWIDGET_OBJECT_NAME_STRING ); + outputObject( buddies, objects, strings, out, f, "TQWidget" ); } } f = f.nextSibling().toElement(); @@ -747,7 +747,7 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) { TQDataStream out2( widgetBlock, IO_WriteOnly ); widgetNo = outputObject( buddies, objects, strings, out2, widgetElem, - TQWIDGET_OBJECT_NAME_STRING ); + "TQWidget" ); } if ( !tabstopsElem.isNull() ) { @@ -772,7 +772,7 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) if ( !menubarElem.isNull() ) { TQDataStream out2( menubarBlock, IO_WriteOnly ); outputObject( buddies, objects, strings, out2, menubarElem, - TQMENUBAR_OBJECT_NAME_STRING ); + "TQMenuBar" ); } if ( !toolbarsElem.isNull() ) { @@ -780,7 +780,7 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) TQDomElement f = toolbarsElem.firstChild().toElement(); while ( !f.isNull() ) { if ( f.tagName() == "toolbar" ) - outputObject( buddies, objects, strings, out2, f, TQTOOLBAR_OBJECT_NAME_STRING ); + outputObject( buddies, objects, strings, out2, f, "TQToolBar" ); f = f.nextSibling().toElement(); } } diff --git a/kdevdesigner/shared/widgetdatabase.cpp b/kdevdesigner/shared/widgetdatabase.cpp index be4b6091..13e93eb1 100644 --- a/kdevdesigner/shared/widgetdatabase.cpp +++ b/kdevdesigner/shared/widgetdatabase.cpp @@ -135,7 +135,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_pushbutton.png"; - r->name = TQPUSHBUTTON_OBJECT_NAME_STRING; + r->name = "TQPushButton"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Push Button"; r->isCommon = TRUE; @@ -144,7 +144,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_toolbutton.png"; - r->name = TQTOOLBUTTON_OBJECT_NAME_STRING; + r->name = "TQToolButton"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Tool Button"; @@ -152,7 +152,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_radiobutton.png"; - r->name = TQRADIOBUTTON_OBJECT_NAME_STRING; + r->name = "TQRadioButton"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Radio Button"; r->isCommon = TRUE; @@ -161,7 +161,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_checkbox.png"; - r->name = TQCHECKBOX_OBJECT_NAME_STRING; + r->name = "TQCheckBox"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Check Box"; r->isCommon = TRUE; @@ -170,7 +170,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_groupbox.png"; - r->name = TQGROUPBOX_OBJECT_NAME_STRING; + r->name = "TQGroupBox"; r->group = widgetGroup( "Containers" ); r->toolTip = "Group Box"; r->isContainer = TRUE; @@ -179,7 +179,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_buttongroup.png"; - r->name = TQBUTTONGROUP_OBJECT_NAME_STRING; + r->name = "TQButtonGroup"; r->group = widgetGroup( "Containers" ); r->toolTip = "Button Group"; r->isContainer = TRUE; @@ -189,7 +189,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_frame.png"; - r->name = TQFRAME_OBJECT_NAME_STRING; + r->name = "TQFrame"; r->group = widgetGroup( "Containers" ); r->toolTip = "Frame"; r->isContainer = TRUE; @@ -198,7 +198,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_tabwidget.png"; - r->name = TQTABWIDGET_OBJECT_NAME_STRING; + r->name = "TQTabWidget"; r->group = widgetGroup( "Containers" ); r->toolTip = "Tabwidget"; r->isContainer = TRUE; @@ -207,7 +207,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_widgetstack.png"; - r->name = TQWIDGETSTACK_OBJECT_NAME_STRING; + r->name = "TQWidgetStack"; r->group = widgetGroup( "Containers" ); r->toolTip = "Widget Stack"; r->isContainer = TRUE; @@ -216,7 +216,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_toolbox.png"; - r->name = TQTOOLBOX_OBJECT_NAME_STRING; + r->name = "TQToolBox"; r->group = widgetGroup( "Containers" ); r->toolTip = "Tool Box"; r->isContainer = TRUE; @@ -225,7 +225,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_listbox.png"; - r->name = TQLISTBOX_OBJECT_NAME_STRING; + r->name = "TQListBox"; r->group = widgetGroup( "Views" ); r->toolTip = "List Box"; r->isCommon = TRUE; @@ -234,7 +234,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_listview.png"; - r->name = TQLISTVIEW_OBJECT_NAME_STRING; + r->name = "TQListView"; r->group = widgetGroup( "Views" ); r->toolTip = "List View"; @@ -243,7 +243,7 @@ void WidgetDatabase::setupDataBase( int id ) #if !defined(TQT_NO_ICONVIEW) || defined(UIC) r = new WidgetDatabaseRecord; r->iconSet = "designer_iconview.png"; - r->name = TQICONVIEW_OBJECT_NAME_STRING; + r->name = "TQIconView"; r->group = widgetGroup( "Views" ); r->toolTip = "Icon View"; @@ -253,7 +253,7 @@ void WidgetDatabase::setupDataBase( int id ) #if !defined(TQT_NO_TABLE) r = new WidgetDatabaseRecord; r->iconSet = "designer_table.png"; - r->name = TQTABLE_OBJECT_NAME_STRING; + r->name = "TQTable"; r->group = widgetGroup( "Views" ); r->toolTip = "Table"; @@ -264,7 +264,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_datatable.png"; r->includeFile = "tqdatatable.h"; - r->name = TQDATATABLE_OBJECT_NAME_STRING; + r->name = "TQDataTable"; r->group = widgetGroup( "Database" ); r->toolTip = "Data Table"; @@ -273,7 +273,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_lineedit.png"; - r->name = TQLINEEDIT_OBJECT_NAME_STRING; + r->name = "TQLineEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Line Edit"; r->isCommon = TRUE; @@ -282,7 +282,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_spinbox.png"; - r->name = TQSPINBOX_OBJECT_NAME_STRING; + r->name = "TQSpinBox"; r->group = widgetGroup( "Input" ); r->toolTip = "Spin Box"; r->isCommon = TRUE; @@ -291,7 +291,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_dateedit.png"; - r->name = TQDATEEDIT_OBJECT_NAME_STRING; + r->name = "TQDateEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Date Edit"; r->includeFile = "tqdatetimeedit.h"; @@ -300,7 +300,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_timeedit.png"; - r->name = TQTIMEEDIT_OBJECT_NAME_STRING; + r->name = "TQTimeEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Time Edit"; r->includeFile = "tqdatetimeedit.h"; @@ -309,7 +309,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_datetimeedit.png"; - r->name = TQDATETIMEEDIT_OBJECT_NAME_STRING; + r->name = "TQDateTimeEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Date-Time Edit"; r->includeFile = "tqdatetimeedit.h"; @@ -318,7 +318,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_multilineedit.png"; - r->name = TQMULTILINEEDIT_OBJECT_NAME_STRING; + r->name = "TQMultiLineEdit"; r->group = widgetGroup( "Temp" ); r->toolTip = "Multi Line Edit"; @@ -326,7 +326,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_richtextedit.png"; - r->name = TQTEXTEDIT_OBJECT_NAME_STRING; + r->name = "TQTextEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Rich Text Edit"; r->isCommon = TRUE; @@ -335,7 +335,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_combobox.png"; - r->name = TQCOMBOBOX_OBJECT_NAME_STRING; + r->name = "TQComboBox"; r->group = widgetGroup( "Input" ); r->toolTip = "Combo Box"; r->isCommon = TRUE; @@ -344,7 +344,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_slider.png"; - r->name = TQSLIDER_OBJECT_NAME_STRING; + r->name = "TQSlider"; r->group = widgetGroup( "Input" ); r->toolTip = "Slider"; @@ -352,7 +352,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_scrollbar.png"; - r->name = TQSCROLLBAR_OBJECT_NAME_STRING; + r->name = "TQScrollBar"; r->group = widgetGroup( "Input" ); r->toolTip = "Scrollbar"; @@ -360,7 +360,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_dial.png"; - r->name = TQDIAL_OBJECT_NAME_STRING; + r->name = "TQDial"; r->group = widgetGroup( "Input" ); r->toolTip = "Dial"; @@ -368,7 +368,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_label.png"; - r->name = TQLABEL_OBJECT_NAME_STRING; + r->name = "TQLabel"; r->group = widgetGroup( "Temp" ); r->toolTip = "Label"; @@ -395,7 +395,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_lcdnumber.png"; - r->name = TQLCDNUMBER_OBJECT_NAME_STRING; + r->name = "TQLCDNumber"; r->group = widgetGroup( "Display" ); r->toolTip = "LCD Number"; @@ -413,7 +413,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_progress.png"; - r->name = TQPROGRESSBAR_OBJECT_NAME_STRING; + r->name = "TQProgressBar"; r->group = widgetGroup( "Display" ); r->toolTip = "Progress Bar"; @@ -421,7 +421,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_textview.png"; - r->name = TQTEXTVIEW_OBJECT_NAME_STRING; + r->name = "TQTextView"; r->group = widgetGroup( "Temp" ); r->toolTip = "Text View"; @@ -429,7 +429,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = "designer_textbrowser.png"; - r->name = TQTEXTBROWSER_OBJECT_NAME_STRING; + r->name = "TQTextBrowser"; r->group = widgetGroup( "Display" ); r->toolTip = "Text Browser"; @@ -445,21 +445,21 @@ void WidgetDatabase::setupDataBase( int id ) append( r ); r = new WidgetDatabaseRecord; - r->name = TQWIDGET_OBJECT_NAME_STRING; + r->name = "TQWidget"; r->isForm = TRUE; r->group = widgetGroup( "Forms" ); append( r ); r = new WidgetDatabaseRecord; - r->name = TQDIALOG_OBJECT_NAME_STRING; + r->name = "TQDialog"; r->group = widgetGroup( "Forms" ); r->isForm = TRUE; append( r ); r = new WidgetDatabaseRecord; - r->name = TQWIZARD_OBJECT_NAME_STRING; + r->name = "TQWizard"; r->group = widgetGroup( "Forms" ); r->isContainer = TRUE; @@ -473,7 +473,7 @@ void WidgetDatabase::setupDataBase( int id ) append( r ); r = new WidgetDatabaseRecord; - r->name = TQLAYOUTWIDGET_OBJECT_NAME_STRING; + r->name = "TQLayoutWidget"; r->group = widgetGroup( "Temp" ); r->includeFile = ""; r->isContainer = TRUE; @@ -481,7 +481,7 @@ void WidgetDatabase::setupDataBase( int id ) append( r ); r = new WidgetDatabaseRecord; - r->name = TQSPLITTER_OBJECT_NAME_STRING; + r->name = "TQSplitter"; r->group = widgetGroup( "Temp" ); r->includeFile = "tqsplitter.h"; r->isContainer = TRUE; @@ -514,7 +514,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = ""; - r->name = TQMAINWINDOW_OBJECT_NAME_STRING; + r->name = "TQMainWindow"; r->includeFile = "tqmainwindow.h"; r->group = widgetGroup( "Temp" ); r->isContainer = TRUE; @@ -541,7 +541,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = ""; - r->name = TQSCROLLVIEW_OBJECT_NAME_STRING; + r->name = "TQScrollView"; r->includeFile = "tqscrollview.h"; r->group = widgetGroup( "Temp" ); r->isContainer = TRUE; @@ -551,7 +551,7 @@ void WidgetDatabase::setupDataBase( int id ) #ifndef TQT_NO_SQL r = new WidgetDatabaseRecord; r->iconSet = ""; - r->name = TQDATABROWSER_OBJECT_NAME_STRING; + r->name = "TQDataBrowser"; r->includeFile = "tqdatabrowser.h"; r->group = widgetGroup( "Database" ); r->toolTip = "Data Browser"; @@ -562,7 +562,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->iconSet = ""; - r->name = TQDATAVIEW_OBJECT_NAME_STRING; + r->name = "TQDataView"; r->includeFile = "tqdataview.h"; r->group = widgetGroup( "Database" ); r->toolTip = "Data View"; @@ -760,7 +760,7 @@ TQString WidgetDatabase::createWidgetName( int id ) { setupDataBase( id ); TQString n = className( id ); - if ( n == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + if ( n == "TQLayoutWidget" ) n = "Layout"; if ( n[ 0 ] == 'Q' && n[ 1 ].lower() != n[ 1 ] ) n = n.mid( 1 ); @@ -787,7 +787,7 @@ int WidgetDatabase::idFromClassName( const TQString &name ) if ( i ) return *i; if ( name == "FormWindow" ) - return idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ); + return idFromClassName( "TQLayoutWidget" ); #ifdef UIC setupDataBase( -2 ); i = className2Id->find( name ); diff --git a/kdevdesigner/src/CMakeLists.txt b/kdevdesigner/src/CMakeLists.txt index c232cd2f..9d7378f9 100644 --- a/kdevdesigner/src/CMakeLists.txt +++ b/kdevdesigner/src/CMakeLists.txt @@ -23,7 +23,11 @@ link_directories( ##### other data ################################ -install( FILES kdevdesigner.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +tde_create_translated_desktop( + SOURCE kdevdesigner.desktop + PO_DIR tdevelop-desktops +) + install( FILES kdevdesigner_shell.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdesigner ) diff --git a/kdevdesigner/src/kdevdesigner.cpp b/kdevdesigner/src/kdevdesigner.cpp index f846e99b..6ff96718 100644 --- a/kdevdesigner/src/kdevdesigner.cpp +++ b/kdevdesigner/src/kdevdesigner.cpp @@ -59,7 +59,7 @@ KDevDesigner::KDevDesigner() // our hands on it TQStringList args; args.append("in shell"); - m_part = static_cast<KParts::ReadWritePart *>(factory->create(TQT_TQOBJECT(this), + m_part = static_cast<KParts::ReadWritePart *>(factory->create(this, "kdevdesigner_part", "KParts::ReadWritePart", args)); if (m_part) @@ -99,16 +99,16 @@ void KDevDesigner::load(const KURL& url) void KDevDesigner::setupActions() { -/* KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); - KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());*/ +/* KStdAction::openNew(this, TQ_SLOT(fileNew()), actionCollection()); + KStdAction::open(this, TQ_SLOT(fileOpen()), actionCollection());*/ - KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); + KStdAction::quit(kapp, TQ_SLOT(quit()), actionCollection()); - m_toolbarAction = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowToolbar()), actionCollection()); - m_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection()); + m_toolbarAction = KStdAction::showToolbar(this, TQ_SLOT(optionsShowToolbar()), actionCollection()); + m_statusbarAction = KStdAction::showStatusbar(this, TQ_SLOT(optionsShowStatusbar()), actionCollection()); - KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::keyBindings(this, TQ_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(this, TQ_SLOT(optionsConfigureToolbars()), actionCollection()); } void KDevDesigner::saveProperties(TDEConfig* /*config*/) @@ -174,8 +174,8 @@ void KDevDesigner::optionsConfigureToolbars() // use the standard toolbar editor KEditToolbar dlg(factory()); - connect(&dlg, TQT_SIGNAL(newToolbarConfig()), - this, TQT_SLOT(applyNewToolbarConfig())); + connect(&dlg, TQ_SIGNAL(newToolbarConfig()), + this, TQ_SLOT(applyNewToolbarConfig())); dlg.exec(); } diff --git a/kdevdesigner/src/kdevdesigner.desktop b/kdevdesigner/src/kdevdesigner.desktop index 7bba7365..77cf9b07 100644 --- a/kdevdesigner/src/kdevdesigner.desktop +++ b/kdevdesigner/src/kdevdesigner.desktop @@ -1,96 +1,13 @@ [Desktop Entry] Name=TDevelop Designer -Name[el]=Σχεδιαστής TDevelop -Name[es]=Diseñador de TDevelop -Name[et]=TDevelopi Disainer -Name[eu]=TDevelop disenatzailea -Name[fa]=طراح TDevelop -Name[fr]=Concepteur TDevelop -Name[ga]=Dearthóir TDevelop -Name[it]=Designer di TDevelop -Name[ja]=TDevelop デザイナー -Name[ms]=Pereka TDevelop -Name[nds]=TDevelop-Maker -Name[ne]=केडीई विकास डिजाइनर -Name[pl]=Projektant TDevelop -Name[pt]=Desenhador do TDevelop -Name[pt_BR]=Designer do TDevelop -Name[sk]=TDevelop Dizajnér -Name[sl]=Snovalnik TDevelop -Name[sv]=TDevelop designer -Name[ta]=கேமேம்பாட்டு வடிவமைப்பாளர் -Name[tg]=Дизайнгари TDevelop -Name[zh_CN]=TDevelop 设计师 -Name[zh_TW]=TDevelop 設計器 + GenericName=Interface Designer -GenericName[br]=Ergrafer etrefas -GenericName[ca]=Dissenyador de interfícies -GenericName[cy]=Dylunydd Rhyngwyneb -GenericName[de]=Oberflächen-Designer -GenericName[el]=Σχεδιαστής διασυνδέσεων -GenericName[es]=Diseñador de interfaces -GenericName[et]=Liidesedisainer -GenericName[eu]=Interfazeen diseinatzailea -GenericName[fa]=طراح واسط -GenericName[fr]=Concepteur d'interfaces graphiques -GenericName[ga]=Dearthóir Comhéadain -GenericName[gl]=Deseñador de interfaces -GenericName[hu]=Felülettervező -GenericName[it]=Interfaccia del Designer -GenericName[ja]=インターフェースデザイナー -GenericName[lt]=Sąsajos redaktorius -GenericName[ms]=Pereka Antaramuka -GenericName[nds]=Böversietmaker -GenericName[ne]=इन्टरफेस डिजाइनर -GenericName[pl]=Projektowanie interfejsu -GenericName[pt]=Editor de Interfaces -GenericName[pt_BR]=Desenhador de Interface -GenericName[ru]=Дизайнер пользовательского интерфейса -GenericName[rw]=Umuhanzi w'Imigaragarire -GenericName[sk]=Interface Dizajnér -GenericName[sl]=Snovalnik vmesnikov -GenericName[sr]=Дизајнер интерфејса -GenericName[sr@Latn]=Dizajner interfejsa -GenericName[sv]=Gränssnittsdesign -GenericName[tr]=Arayüz Tasarlayıcısı -GenericName[zh_CN]=界面设计师 -GenericName[zh_TW]=介面設計器 + +Comment=GUI Designer for Qt/TDE + Exec=kdevdesigner %i -caption "%c" Icon=kdevdesigner Type=Application -X-DocPath=kdevdesigner/index.html -Comment=GUI Designer for Qt/TDE -Comment[ca]=Dissenyador de IGU per Qt/TDE -Comment[da]=Grafisk brugerfladedesigner til Qt/TDE -Comment[de]=Auf Qt-Designer basierender GUI-Designer -Comment[el]=Σχεδιαστής GUI για Qt/TDE -Comment[es]=Diseñador de interfaces para Qt/TDE -Comment[et]=Qt/TDE graafilise kasutajaliidese disainer -Comment[eu]=GUI diseinatzailea Qt/TDE-rako -Comment[fa]=طراح ونک برای Qt/TDE -Comment[fr]=Concepteur d'interfaces graphiques pour Qt / TDE -Comment[ga]=Dearthóir Comhéadan Grafach le haghaidh Qt/TDE -Comment[gl]=Deseñador GUI para Qt/TDE -Comment[hu]=Qt/TDE felülettervező -Comment[it]=Designer di GUI per Qt/TDE -Comment[ja]=Qt/TDE のための GUI デザイナー -Comment[ms]=Pereka GUI untuk Qt/TDE -Comment[nds]=Böversietmaker för Qt/TDE -Comment[ne]=Qt/TDE का लागि जी यू आई डिजाइनर -Comment[nl]=GUI Designer voor Qt/TDE -Comment[pl]=Projektant graficznego interfejsu użytkownika dla Qt/TDE -Comment[pt]=Editor de Interfaces para Qt/TDE -Comment[pt_BR]=Designer de GUI para o Qt/TDE -Comment[ru]=Среда создания графических форм Qt/TDE -Comment[sk]=GUI Dizajnér pre Qt/TDE -Comment[sl]=Snovalnik grafičnega vmesnika za Qt/TDE -Comment[sr]=Дизајнер GUI-ја за Qt/TDE -Comment[sr@Latn]=Dizajner GUI-ja za Qt/TDE -Comment[sv]=Grafisk gränssnittsdesign för Qt och TDE -Comment[ta]=Qtக்கான GUI வடிவமைப்பாளர் -Comment[tg]=Муҳит барои сохтани Qt/TDE ба шакли графикӣ -Comment[tr]=Qt/TDE için Arayüz Tasarlayıcısı -Comment[zh_CN]=Qt/TDE 的 GUI 设计师 -Comment[zh_TW]=Qt/TDE 的使用者介面設計器 Terminal=false +X-DocPath=kdevdesigner/index.html Categories=Qt;TDE;Development;GUIDesigner;X-TDE-TDevelopIDE; diff --git a/kdevdesigner/src/kdevdesigner.h b/kdevdesigner/src/kdevdesigner.h index a497dc5c..bcb6cb9a 100644 --- a/kdevdesigner/src/kdevdesigner.h +++ b/kdevdesigner/src/kdevdesigner.h @@ -41,7 +41,7 @@ class TDEToggleAction; */ class KDevDesigner : public KParts::MainWindow { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/kdevdesigner/uilib/database.cpp b/kdevdesigner/uilib/database.cpp index 2b1956a9..4e1c8d57 100644 --- a/kdevdesigner/uilib/database.cpp +++ b/kdevdesigner/uilib/database.cpp @@ -62,7 +62,7 @@ void DatabaseSupport::initPreview( const TQString &connection, const TQString &t con = TQSqlDatabase::database(); frm = new TQSqlForm( o, table.ascii() ); for ( TQMap<TQString, TQString>::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) { - TQObject *chld = parent->child( it.key().ascii(), TQWIDGET_OBJECT_NAME_STRING ); + TQObject *chld = parent->child( it.key().ascii(), "TQWidget" ); if ( !chld ) continue; frm->insert( (TQWidget*)chld, *it ); diff --git a/kdevdesigner/uilib/database2.h b/kdevdesigner/uilib/database2.h index 865a7f8f..9d7647b4 100644 --- a/kdevdesigner/uilib/database2.h +++ b/kdevdesigner/uilib/database2.h @@ -58,7 +58,7 @@ protected: class QDesignerDataBrowser2 : public TQDataBrowser, public DatabaseSupport2 { - Q_OBJECT + TQ_OBJECT public: @@ -70,7 +70,7 @@ protected: class QDesignerDataView2 : public TQDataView, public DatabaseSupport2 { - Q_OBJECT + TQ_OBJECT public: diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp index c431253e..9d0d3656 100644 --- a/kdevdesigner/uilib/qwidgetfactory.cpp +++ b/kdevdesigner/uilib/qwidgetfactory.cpp @@ -133,19 +133,19 @@ static void setupWidgetListAndMap() return; setupPluginDir(); availableWidgetList = new TQStringList; - (*availableWidgetList) << TQPUSHBUTTON_OBJECT_NAME_STRING << TQTOOLBUTTON_OBJECT_NAME_STRING << TQCHECKBOX_OBJECT_NAME_STRING << TQRADIOBUTTON_OBJECT_NAME_STRING - << TQGROUPBOX_OBJECT_NAME_STRING << TQBUTTONGROUP_OBJECT_NAME_STRING << TQICONVIEW_OBJECT_NAME_STRING << TQTABLE_OBJECT_NAME_STRING - << TQLISTBOX_OBJECT_NAME_STRING << TQLISTVIEW_OBJECT_NAME_STRING << TQLINEEDIT_OBJECT_NAME_STRING << TQSPINBOX_OBJECT_NAME_STRING - << TQMULTILINEEDIT_OBJECT_NAME_STRING << TQLABEL_OBJECT_NAME_STRING << "TextLabel" << "PixmapLabel" - << TQLAYOUTWIDGET_OBJECT_NAME_STRING << TQTABWIDGET_OBJECT_NAME_STRING << TQCOMBOBOX_OBJECT_NAME_STRING - << TQWIDGET_OBJECT_NAME_STRING << TQDIALOG_OBJECT_NAME_STRING << TQWIZARD_OBJECT_NAME_STRING << TQLCDNUMBER_OBJECT_NAME_STRING; + (*availableWidgetList) << "TQPushButton" << "TQToolButton" << "TQCheckBox" << "TQRadioButton" + << "TQGroupBox" << "TQButtonGroup" << "TQIconView" << "TQTable" + << "TQListBox" << "TQListView" << "TQLineEdit" << "TQSpinBox" + << "TQMultiLineEdit" << "TQLabel" << "TextLabel" << "PixmapLabel" + << "TQLayoutWidget" << "TQTabWidget" << "TQComboBox" + << "TQWidget" << "TQDialog" << "TQWizard" << "TQLCDNumber"; // put less stress on the compiler by limiting the template nesting depth - (*availableWidgetList) << TQPROGRESSBAR_OBJECT_NAME_STRING << TQTEXTVIEW_OBJECT_NAME_STRING << TQTEXTBROWSER_OBJECT_NAME_STRING - << TQDIAL_OBJECT_NAME_STRING << TQSLIDER_OBJECT_NAME_STRING << TQFRAME_OBJECT_NAME_STRING << "Line" << TQTEXTEDIT_OBJECT_NAME_STRING - << TQDATEEDIT_OBJECT_NAME_STRING << TQTIMEEDIT_OBJECT_NAME_STRING << TQDATETIMEEDIT_OBJECT_NAME_STRING << TQSCROLLBAR_OBJECT_NAME_STRING - << TQPOPUPMENU_OBJECT_NAME_STRING << TQWIDGETSTACK_OBJECT_NAME_STRING << TQMAINWINDOW_OBJECT_NAME_STRING - << TQDATATABLE_OBJECT_NAME_STRING << TQDATABROWSER_OBJECT_NAME_STRING << TQDATAVIEW_OBJECT_NAME_STRING - << TQVBOX_OBJECT_NAME_STRING << TQHBOX_OBJECT_NAME_STRING << TQGRID_OBJECT_NAME_STRING << TQTOOLBOX_OBJECT_NAME_STRING; + (*availableWidgetList) << "TQProgressBar" << "TQTextView" << "TQTextBrowser" + << "TQDial" << "TQSlider" << "TQFrame" << "Line" << "TQTextEdit" + << "TQDateEdit" << "TQTimeEdit" << "TQDateTimeEdit" << "TQScrollBar" + << "TQPopupMenu" << "TQWidgetStack" << "TQMainWindow" + << "TQDataTable" << "TQDataBrowser" << "TQDataView" + << "TQVBox" << "TQHBox" << "TQGrid" << "TQToolBox"; if ( !widgetInterfaceManager ) widgetInterfaceManager = @@ -295,7 +295,7 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector, return 0; qwf_currFileName = uiFile; - TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&f), connector, parent, name ); + TQWidget *w = TQWidgetFactory::create( &f, connector, parent, name ); if ( !qwf_forms ) qwf_forms = new TQMap<TQWidget*, TQString>; qwf_forms->insert( w, uiFile ); @@ -356,15 +356,15 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge continue; if ( cit.key()->inherits( "QDesignerDataBrowser2" ) ) ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, - TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); + cit.key(), *(*cit).dbControls ); else if ( cit.key()->inherits( "QDesignerDataView2" ) ) ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, - TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); + cit.key(), *(*cit).dbControls ); } for ( TQMap<TQString, TQStringList>::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) { - TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key().ascii(), TQDATATABLE_OBJECT_NAME_STRING ); + TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key().ascii(), "TQDataTable" ); if ( !table ) continue; if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != @@ -391,8 +391,8 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge for ( TQMap<TQString, TQString>::Iterator it = widgetFactory->buddies.begin(); it != widgetFactory->buddies.end(); ++it ) { - TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key().ascii(), TQLABEL_OBJECT_NAME_STRING ); - TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( (*it).ascii(), TQWIDGET_OBJECT_NAME_STRING ); + TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key().ascii(), "TQLabel" ); + TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( (*it).ascii(), "TQWidget" ); if ( label && buddy ) label->setBuddy( buddy ); } @@ -466,7 +466,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec if ( !imageCollection.isNull() ) loadImageCollection( imageCollection ); - createWidgetInternal( widget, parent, 0, widget.attribute("class", TQWIDGET_OBJECT_NAME_STRING) ); + createWidgetInternal( widget, parent, 0, widget.attribute("class", "TQWidget") ); TQWidget *w = toplevel; if ( !w ) return 0; @@ -703,7 +703,7 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in, spacer = new TQSpacerItem( w, h, sizeType, TQSizePolicy::Minimum ); } - if ( parent->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + if ( parent->inherits("TQGridLayout") ) { ((TQGridLayout *) parent)->addMultiCell( spacer, row, row + rowspan - 1, column, column + colspan - 1, vertical ? TQt::AlignHCenter : TQt::AlignVCenter ); @@ -763,11 +763,11 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings, } if ( parent != 0 ) { - if ( parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) { + if ( parent->inherits("TQListView") ) { createListViewColumn( (TQListView *) parent, text, pixmap, clickable, resizable ); #ifndef TQT_NO_TABLE - } else if ( parent->inherits(TQTABLE_OBJECT_NAME_STRING) ) { + } else if ( parent->inherits("TQTable") ) { createTableColumnOrRow( (TQTable *) parent, text, pixmap, field, isRow ); #endif @@ -786,8 +786,8 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, TQ_UINT8 objectTag; TQListView *listView = 0; - if ( parent != 0 && parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) - parent = TQT_TQOBJECT((TQListView *) parent); + if ( parent != 0 && parent->inherits("TQListView") ) + parent = (TQListView *) parent; TQListViewItem *item = 0; if ( listView != 0 ) { if ( parentItem == 0 ) { @@ -848,9 +848,9 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, TQPixmap pixmap = pixmaps.last(); if ( parent != 0 ) { - if ( parent->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || - parent->inherits(TQLISTBOX_OBJECT_NAME_STRING) ) { - TQListBox *listBox = (TQListBox *) parent->tqt_cast( TQLISTBOX_OBJECT_NAME_STRING ); + if ( parent->inherits("TQComboBox") || + parent->inherits("TQListBox") ) { + TQListBox *listBox = (TQListBox *) parent->tqt_cast( "TQListBox" ); if ( listBox == 0 ) listBox = ((TQComboBox *) parent)->listBox(); @@ -860,7 +860,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, (void) new TQListBoxPixmap( listBox, pixmap, text ); } #ifndef TQT_NO_ICONVIEW - } else if ( parent->inherits(TQICONVIEW_OBJECT_NAME_STRING) ) { + } else if ( parent->inherits("TQIconView") ) { (void) new TQIconViewItem( (TQIconView *) parent, text, pixmap ); #endif } @@ -915,53 +915,53 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( isTQObject ) { if ( parent != 0 ) { if ( parent->isWidgetType() ) { - if ( parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) ) { + if ( parent->inherits("TQMainWindow") ) { parentWidget = ((TQMainWindow *) parent)->centralWidget(); } else { parentWidget = (TQWidget *) parent; } - } else if ( parent->inherits(TQLAYOUT_OBJECT_NAME_STRING) ) { + } else if ( parent->inherits("TQLayout") ) { parentLayout = (TQLayout *) parent; parentWidget = ancestorWidget; } } - if ( className == TQACTION_OBJECT_NAME_STRING ) { + if ( className == "TQAction" ) { unpackCString( strings, in, className ); - if ( className == TQACTIONGROUP_OBJECT_NAME_STRING ) { + if ( className == "TQActionGroup" ) { obj = new TQActionGroup( parent ); } else { obj = new TQAction( parent ); } - } else if ( className == TQLAYOUT_OBJECT_NAME_STRING ) { + } else if ( className == "TQLayout" ) { unpackCString( strings, in, className ); LayoutType type = Grid; - if ( className == TQHBOXLAYOUT_OBJECT_NAME_STRING ) { + if ( className == "TQHBoxLayout" ) { type = HBox; - } else if ( className == TQVBOXLAYOUT_OBJECT_NAME_STRING ) { + } else if ( className == "TQVBoxLayout" ) { type = VBox; } - if ( parentLayout != 0 && parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + if ( parentLayout != 0 && parentLayout->inherits("TQGridLayout") ) { layout = createLayout( 0, 0, type ); } else { layout = createLayout( parentWidget, parentLayout, type ); } - obj = TQT_TQOBJECT(layout); - } else if ( className == TQMENUBAR_OBJECT_NAME_STRING ) { + obj = layout; + } else if ( className == "TQMenuBar" ) { unpackCString( strings, in, className ); widget = ((TQMainWindow *) parent)->menuBar(); - obj = TQT_TQOBJECT(widget); - } else if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) { + obj = widget; + } else if ( className == "TQToolBar" ) { TQ_UINT8 dock; in >> dock; unpackCString( strings, in, className ); widget = new TQToolBar( TQString(), (TQMainWindow *) parent, (TQt::Dock) dock ); - obj = TQT_TQOBJECT(widget); - } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { + obj = widget; + } else if ( className == "TQWidget" ) { unpackCString( strings, in, className ); widget = createWidget( className, parentWidget, 0 ); - obj = TQT_TQOBJECT(widget); + obj = widget; } if ( widget != 0 ) @@ -1099,15 +1099,15 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, break; case Object_SubAction: inputObject( objects, numObjects, strings, in, parentWidget, - obj != 0 ? obj : parent, TQACTION_OBJECT_NAME_STRING ); + obj != 0 ? obj : parent, "TQAction" ); break; case Object_SubLayout: inputObject( objects, numObjects, strings, in, parentWidget, obj, - TQLAYOUT_OBJECT_NAME_STRING ); + "TQLayout" ); break; case Object_SubWidget: inputObject( objects, numObjects, strings, in, parentWidget, obj, - TQWIDGET_OBJECT_NAME_STRING ); + "TQWidget" ); break; case Object_TextProperty: unpackCString( strings, in, name ); @@ -1118,9 +1118,9 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( metAttribute > 0 ) { if ( name == "title" ) { if ( parent != 0 ) { - if ( parent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) ) { + if ( parent->inherits("TQTabWidget") ) { ((TQTabWidget *) parent)->insertTab( widget, str ); - } else if ( parent->inherits(TQWIZARD_OBJECT_NAME_STRING) ) { + } else if ( parent->inherits("TQWizard") ) { ((TQWizard *) parent)->addPage( widget, str ); } } @@ -1136,7 +1136,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( metAttribute > 0 ) { if ( name == "id" ) { - if ( parent != 0 && parent->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING) ) + if ( parent != 0 && parent->inherits("TQWidgetStack") ) ((TQWidgetStack *) parent)->addWidget( widget, value.toInt() ); } } else { @@ -1153,7 +1153,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( parentLayout != 0 ) { if ( widget != 0 ) { - if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + if ( parentLayout->inherits("TQGridLayout") ) { ((TQGridLayout *) parentLayout)->addMultiCellWidget( widget, row, row + rowspan - 1, column, column + colspan - 1 ); @@ -1161,7 +1161,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, ((TQBoxLayout *) parentLayout)->addWidget( widget ); } } else if ( layout != 0 ) { - if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + if ( parentLayout->inherits("TQGridLayout") ) { ((TQGridLayout *) parentLayout)->addMultiCellLayout( layout, row, row + rowspan - 1, column, column + colspan - 1 ); @@ -1208,7 +1208,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, switch ( blockType ) { case Block_Actions: - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel) ); + inputObject( objects, numObjects, strings, in, toplevel, toplevel ); break; case Block_Buddies: { @@ -1219,7 +1219,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, unpackUInt16( in, labelNo ); unpackUInt16( in, buddyNo ); TQLabel *label = - (TQLabel *) objects[labelNo]->tqt_cast( TQLABEL_OBJECT_NAME_STRING ); + (TQLabel *) objects[labelNo]->tqt_cast( "TQLabel" ); if ( label != 0 ) label->setBuddy( (TQWidget *) objects[buddyNo] ); } while ( !END_OF_BLOCK() ); @@ -1300,8 +1300,8 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, } break; case Block_Menubar: - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel), - TQMENUBAR_OBJECT_NAME_STRING ); + inputObject( objects, numObjects, strings, in, toplevel, toplevel, + "TQMenuBar" ); break; case Block_Slots: { @@ -1334,7 +1334,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, case Block_Toolbars: do { inputObject( objects, numObjects, strings, in, toplevel, - TQT_TQOBJECT(toplevel), TQTOOLBAR_OBJECT_NAME_STRING ); + toplevel, "TQToolBar" ); } while ( !END_OF_BLOCK() ); break; case Block_Variables: @@ -1344,8 +1344,8 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, break; case Block_Widget: toplevel = (TQWidget *) - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(parent), - TQWIDGET_OBJECT_NAME_STRING ); + inputObject( objects, numObjects, strings, in, toplevel, parent, + "TQWidget" ); if ( toplevel != 0 ) toplevel->setName( name ); break; @@ -1410,97 +1410,97 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa const char *name ) const { // create widgets we know - if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { + if ( className == "TQPushButton" ) { return new TQPushButton( parent, name ); - } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { + } else if ( className == "TQToolButton" ) { return new TQToolButton( parent, name ); - } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQCheckBox" ) { return new TQCheckBox( parent, name ); - } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { + } else if ( className == "TQRadioButton" ) { return new TQRadioButton( parent, name ); - } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQGroupBox" ) { return new TQGroupBox( parent, name ); - } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { + } else if ( className == "TQButtonGroup" ) { return new TQButtonGroup( parent, name ); - } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQIconView" ) { #if !defined(TQT_NO_ICONVIEW) return new TQIconView( parent, name ); #endif - } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { + } else if ( className == "TQTable" ) { #if !defined(TQT_NO_TABLE) return new TQTable( parent, name ); #endif - } else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQListBox" ) { return new TQListBox( parent, name ); - } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQListView" ) { return new TQListView( parent, name ); - } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQLineEdit" ) { return new TQLineEdit( parent, name ); - } else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQSpinBox" ) { return new TQSpinBox( parent, name ); - } else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQMultiLineEdit" ) { return new TQMultiLineEdit( parent, name ); - } else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" || className == "PixmapLabel" ) { + } else if ( className == "TQLabel" || className == "TextLabel" || className == "PixmapLabel" ) { return new TQLabel( parent, name ); - } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { + } else if ( className == "TQLayoutWidget" ) { return new TQWidget( parent, name ); - } else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { + } else if ( className == "TQTabWidget" ) { return new TQTabWidget( parent, name ); - } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQComboBox" ) { return new TQComboBox( FALSE, parent, name ); - } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { + } else if ( className == "TQWidget" ) { if ( !qwf_stays_on_top ) return new TQWidget( parent, name ); return new TQWidget( parent, name, TQt::WStyle_StaysOnTop ); - } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { + } else if ( className == "TQDialog" ) { if ( !qwf_stays_on_top ) return new TQDialog( parent, name ); return new TQDialog( parent, name, FALSE, TQt::WStyle_StaysOnTop ); - } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { + } else if ( className == "TQWizard" ) { return new TQWizard( parent, name ); - } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) { + } else if ( className == "TQLCDNumber" ) { return new TQLCDNumber( parent, name ); - } else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) { + } else if ( className == "TQProgressBar" ) { return new TQProgressBar( parent, name ); - } else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQTextView" ) { return new TQTextView( parent, name ); - } else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) { + } else if ( className == "TQTextBrowser" ) { return new TQTextBrowser( parent, name ); - } else if ( className == TQDIAL_OBJECT_NAME_STRING ) { + } else if ( className == "TQDial" ) { return new TQDial( parent, name ); - } else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { + } else if ( className == "TQSlider" ) { return new TQSlider( parent, name ); - } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { + } else if ( className == "TQFrame" ) { return new TQFrame( parent, name ); - } else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) { + } else if ( className == "TQSplitter" ) { return new TQSplitter( parent, name ); } else if ( className == "Line" ) { TQFrame *f = new TQFrame( parent, name ); f->setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); return f; - } else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQTextEdit" ) { return new TQTextEdit( parent, name ); - } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQDateEdit" ) { return new TQDateEdit( parent, name ); - } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQTimeEdit" ) { return new TQTimeEdit( parent, name ); - } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { + } else if ( className == "TQDateTimeEdit" ) { return new TQDateTimeEdit( parent, name ); - } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { + } else if ( className == "TQScrollBar" ) { return new TQScrollBar( parent, name ); - } else if ( className == TQPOPUPMENU_OBJECT_NAME_STRING ) { + } else if ( className == "TQPopupMenu" ) { return new TQPopupMenu( parent, name ); - } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { + } else if ( className == "TQWidgetStack" ) { return new TQWidgetStack( parent, name ); - } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQToolBox" ) { return new TQToolBox( parent, name ); - } else if ( className == TQVBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQVBox" ) { return new TQVBox( parent, name ); - } else if ( className == TQHBOX_OBJECT_NAME_STRING ) { + } else if ( className == "TQHBox" ) { return new TQHBox( parent, name ); - } else if ( className == TQGRID_OBJECT_NAME_STRING ) { + } else if ( className == "TQGrid" ) { return new TQGrid( 4, parent, name ); - } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { + } else if ( className == "TQMainWindow" ) { TQMainWindow *mw = 0; if ( !qwf_stays_on_top ) mw = new TQMainWindow( parent, name ); @@ -1513,11 +1513,11 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa } #if !defined(TQT_NO_SQL) - else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { + else if ( className == "TQDataTable" ) { return new TQDataTable( parent, name ); - } else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { + } else if ( className == "TQDataBrowser" ) { return new QDesignerDataBrowser2( parent, name ); - } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { + } else if ( className == "TQDataView" ) { return new QDesignerDataView2( parent, name ); } #endif @@ -1589,21 +1589,21 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget bool isTQLayoutWidget = FALSE; if ( !className.isEmpty() ) { - if ( !layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { - className = TQWIDGET_OBJECT_NAME_STRING; + if ( !layout && className == "TQLayoutWidget" ) { + className = "TQWidget"; isTQLayoutWidget = TRUE; } - if ( layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) { + if ( layout && className == "TQLayoutWidget" ) { // hide layout widgets w = parent; } else { - obj = TQT_TQOBJECT(TQWidgetFactory::createWidget( className, parent, 0 )); + obj = TQWidgetFactory::createWidget( className, parent, 0 ); if ( !obj ) return 0; w = (TQWidget*)obj; if ( !toplevel ) toplevel = w; - if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) + if ( w->inherits( "TQMainWindow" ) ) w = ( (TQMainWindow*)w )->centralWidget(); if ( layout ) { switch( layoutType( layout ) ) { @@ -1639,41 +1639,41 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget createSpacer( n, layout ); } else if ( n.tagName() == "widget" ) { TQMap< TQString, TQString> *oldDbControls = dbControls; - createWidgetInternal( n, w, layout, n.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) ); + createWidgetInternal( n, w, layout, n.attribute( "class", "TQWidget" ) ); dbControls = oldDbControls; } else if ( n.tagName() == "hbox" ) { TQLayout *parentLayout = layout; - if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout && layout->inherits( "TQGridLayout" ) ) layout = createLayout( 0, 0, TQWidgetFactory::HBox, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::HBox, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; } else if ( n.tagName() == "grid" ) { TQLayout *parentLayout = layout; - if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout && layout->inherits( "TQGridLayout" ) ) layout = createLayout( 0, 0, TQWidgetFactory::Grid, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::Grid, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; } else if ( n.tagName() == "vbox" ) { TQLayout *parentLayout = layout; - if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout && layout->inherits( "TQGridLayout" ) ) layout = createLayout( 0, 0, TQWidgetFactory::VBox, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::VBox, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); - if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; @@ -1683,16 +1683,16 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget TQString attrib = n.attribute( "name" ); TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); if ( parent ) { - if ( parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) { + if ( parent->inherits( "TQTabWidget" ) ) { if ( attrib == "title" ) ( (TQTabWidget*)parent )->insertTab( w, translate( v.toString() ) ); - } else if ( parent->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) { + } else if ( parent->inherits( "TQWidgetStack" ) ) { if ( attrib == "id" ) ( (TQWidgetStack*)parent )->addWidget( w, v.toInt() ); - } else if ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) { + } else if ( parent->inherits( "TQToolBox" ) ) { if ( attrib == "label" ) ( (TQToolBox*)parent )->addItem( w, v.toString() ); - } else if ( parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) { + } else if ( parent->inherits( "TQWizard" ) ) { if ( attrib == "title" ) ( (TQWizard*)parent )->addPage( w, translate( v.toString() ) ); #ifdef TQT_CONTAINER_CUSTOM_WIDGETS @@ -1737,23 +1737,23 @@ TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout, if ( layout || !widget || isTQLayoutWidget ) margin = 0; - if ( !layout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( "TQTabWidget" ) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( !layout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( "TQWizard" ) ) widget = ((TQWizard*)widget)->currentPage(); - if ( !layout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( "TQWidgetStack" ) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( !layout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) + if ( !layout && widget && widget->inherits( "TQToolBox" ) ) widget = ((TQToolBox*)widget)->currentItem(); TQLayout *l = 0; int align = 0; - if ( !layout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) { + if ( !layout && widget && widget->inherits( "TQGroupBox" ) ) { TQGroupBox *gb = (TQGroupBox*)widget; - gb->setColumnLayout( 0, Qt::Vertical ); + gb->setColumnLayout( 0, TQt::Vertical ); layout = gb->layout(); layout->setMargin( 0 ); layout->setSpacing( 0 ); @@ -1796,11 +1796,11 @@ TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* layout, TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *layout ) const { - if ( layout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout->inherits( "TQHBoxLayout" ) ) return HBox; - else if ( layout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) ) + else if ( layout->inherits( "TQVBoxLayout" ) ) return VBox; - else if ( layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + else if ( layout->inherits( "TQGridLayout" ) ) return Grid; return NoLayout; } @@ -1811,7 +1811,7 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, int offset = obj->metaObject()->findProperty( prop.ascii(), TRUE ); if ( offset != -1 ) { - if ( prop == "geometry" && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) { + if ( prop == "geometry" && obj == toplevel ) { toplevel->resize( value.toRect().size() ); } else if ( prop == "accel" ) { obj->setProperty( prop.ascii(), TQVariant(value.toKeySequence()) ); @@ -1850,11 +1850,11 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, } else if ( prop == "buddy" ) { buddies.insert( obj->name(), value.toCString() ); } else if ( prop == "buttonGroupId" ) { - if ( obj->inherits( TQBUTTON_OBJECT_NAME_STRING ) && obj->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) + if ( obj->inherits( "TQButton" ) && obj->parent()->inherits( "TQButtonGroup" ) ) ( (TQButtonGroup*)obj->parent() )->insert( (TQButton*)obj, value.toInt() ); #ifndef TQT_NO_SQL - } else if ( prop == "database" && !obj->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) - && !obj->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) ) { + } else if ( prop == "database" && !obj->inherits( "TQDataView" ) + && !obj->inherits( "TQDataBrowser" ) ) { const TQStringList& lst = value.asStringList(); if ( lst.count() > 2 ) { if ( dbControls ) @@ -1864,7 +1864,7 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, } } else if ( prop == "database" ) { const TQStringList& lst = value.asStringList(); - if ( lst.count() == 2 && obj->inherits( TQWIDGET_OBJECT_NAME_STRING ) ) { + if ( lst.count() == 2 && obj->inherits( "TQWidget" ) ) { SqlWidgetConnection conn( lst[ 0 ], lst[ 1 ] ); sqlWidgetConnections.insert( (TQWidget*)obj, conn ); dbControls = conn.dbControls; @@ -1925,7 +1925,7 @@ void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout ) int rowspan = e.attribute( "rowspan" ).toInt(); int colspan = e.attribute( "colspan" ).toInt(); - Qt::Orientation orient = Qt::Horizontal; + TQt::Orientation orient = TQt::Horizontal; int w = 0, h = 0; TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred; while ( !n.isNull() ) { @@ -1933,9 +1933,9 @@ void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout ) TQString prop = n.attribute( "name" ); if ( prop == "orientation" ) { if ( n.firstChild().firstChild().toText().data() == "Horizontal" ) - orient = Qt::Horizontal; + orient = TQt::Horizontal; else - orient = Qt::Vertical; + orient = TQt::Vertical; } else if ( prop == "sizeType" ) { sizeType = stringToSizeType( n.firstChild().firstChild().toText().data() ); } else if ( prop == "sizeHint" ) { @@ -1950,14 +1950,14 @@ void TQWidgetFactory::createSpacer( const TQDomElement &e, TQLayout *layout ) rowspan = 1; if ( colspan < 1 ) colspan = 1; - TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum, - orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum ); + TQSpacerItem *item = new TQSpacerItem( w, h, orient == TQt::Horizontal ? sizeType : TQSizePolicy::Minimum, + orient == TQt::Vertical ? sizeType : TQSizePolicy::Minimum ); if ( layout ) { - if ( layout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) ) + if ( layout->inherits( "TQBoxLayout" ) ) ( (TQBoxLayout*)layout )->addItem( item ); else ( (TQGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1, - orient == Qt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter ); + orient == TQt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter ); } } @@ -2069,7 +2069,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto if ( n2.tagName() == "sender" ) { TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { - conn.sender = TQT_TQOBJECT(toplevel); + conn.sender = toplevel; } else { if ( name == "this" ) name = toplevel->name(); @@ -2087,7 +2087,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto } else if ( n2.tagName() == "receiver" ) { TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { - conn.receiver = TQT_TQOBJECT(toplevel); + conn.receiver = toplevel; } else { TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE ); if ( l ) { @@ -2113,7 +2113,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto TQObject *sender = 0, *receiver = 0; TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE ); if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) { - sender = TQT_TQOBJECT(toplevel); + sender = toplevel; } else { if ( !l || !l->first() ) { delete l; @@ -2127,7 +2127,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto sender = findAction( conn.sender->name() ); if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) { - receiver = TQT_TQOBJECT(toplevel); + receiver = toplevel; } else { l = toplevel->queryList( 0, conn.receiver->name(), FALSE ); if ( !l || !l->first() ) { @@ -2148,7 +2148,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto TQStrList slotList = receiver->metaObject()->slotNames( TRUE ); // if this is a connection to a custom slot and we have a connector, try this as receiver - if ( slotList.find( conn.slot ) == -1 && (TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel)) && connector ) { + if ( slotList.find( conn.slot ) == -1 && (receiver == toplevel) && connector ) { slotList = connector->metaObject()->slotNames( TRUE ); receiver = connector; } @@ -2212,7 +2212,7 @@ void TQWidgetFactory::createTableColumnOrRow( TQTable *table, const TQString& tx const TQString& field, bool isRow ) { #ifndef TQT_NO_SQL - bool isSql = table->inherits( TQDATATABLE_OBJECT_NAME_STRING ); + bool isSql = table->inherits( "TQDataTable" ); #endif if ( isRow ) table->setNumRows( table->numRows() + 1 ); @@ -2256,7 +2256,7 @@ void TQWidgetFactory::createTableColumnOrRow( TQTable *table, const TQString& tx void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget ) { - if ( widget->inherits( TQLISTVIEW_OBJECT_NAME_STRING ) && e.tagName() == "column" ) { + if ( widget->inherits( "TQListView" ) && e.tagName() == "column" ) { TQListView *lv = (TQListView*)widget; TQDomElement n = e.firstChild().toElement(); TQPixmap pix; @@ -2280,7 +2280,7 @@ void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget ) createListViewColumn( lv, txt, pix, clickable, resizable ); } #ifndef TQT_NO_TABLE - else if ( widget->inherits( TQTABLE_OBJECT_NAME_STRING ) ) { + else if ( widget->inherits( "TQTable" ) ) { TQTable *table = (TQTable*)widget; TQDomElement n = e.firstChild().toElement(); @@ -2328,14 +2328,14 @@ void TQWidgetFactory::loadItem( const TQDomElement &e, TQPixmap &pix, TQString & void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) { - if ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) || widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) { + if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; bool hasPixmap = FALSE; TQString txt; loadItem( n, pix, txt, hasPixmap ); TQListBox *lb = 0; - if ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) ) + if ( widget->inherits( "TQListBox" ) ) lb = (TQListBox*)widget; else lb = ( (TQComboBox*)widget)->listBox(); @@ -2345,7 +2345,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis new TQListBoxText( lb, txt ); } #ifndef TQT_NO_ICONVIEW - } else if ( widget->inherits( TQICONVIEW_OBJECT_NAME_STRING ) ) { + } else if ( widget->inherits( "TQIconView" ) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; bool hasPixmap = FALSE; @@ -2355,7 +2355,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis TQIconView *iv = (TQIconView*)widget; new TQIconViewItem( iv, txt, pix ); #endif - } else if ( widget->inherits( TQLISTVIEW_OBJECT_NAME_STRING ) ) { + } else if ( widget->inherits( "TQListView" ) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; TQValueList<TQPixmap> pixmaps; @@ -2417,7 +2417,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e ) } n2 = n2.nextSibling().toElement(); } - if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) ) + if ( !parent->inherits( "TQAction" ) ) actionList.append( a ); } else if ( n.tagName() == "actiongroup" ) { a = new TQActionGroup( parent ); @@ -2435,7 +2435,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e ) } n2 = n2.nextSibling().toElement(); } - if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) ) + if ( !parent->inherits( "TQAction" ) ) actionList.append( a ); } @@ -2448,9 +2448,9 @@ void TQWidgetFactory::loadActions( const TQDomElement &e ) TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "action" ) { - loadChildAction( TQT_TQOBJECT(toplevel), n ); + loadChildAction( toplevel, n ); } else if ( n.tagName() == "actiongroup" ) { - loadChildAction( TQT_TQOBJECT(toplevel), n ); + loadChildAction( toplevel, n ); } n = n.nextSibling().toElement(); } @@ -2476,9 +2476,9 @@ void TQWidgetFactory::loadToolBars( const TQDomElement &e ) } else if ( n2.tagName() == "separator" ) { tb->addSeparator(); } else if ( n2.tagName() == "widget" ) { - (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) ); + (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "TQWidget" ) ); } else if ( n2.tagName() == "property" ) { - setProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); + setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() ); } n2 = n2.nextSibling().toElement(); } @@ -2499,7 +2499,7 @@ void TQWidgetFactory::loadMenuBar( const TQDomElement &e ) popup->setName( n.attribute( "name" ).ascii() ); mb->insertItem( translate( n.attribute( "text" ) ), popup ); } else if ( n.tagName() == "property" ) { - setProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); + setProperty( mb, n.attribute( "name" ), n.firstChild().toElement() ); } else if ( n.tagName() == "separator" ) { mb->insertSeparator(); } @@ -2551,7 +2551,7 @@ TQAction *TQWidgetFactory::findAction( const TQString &name ) for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { if ( TQString( a->name() ) == name ) return a; - TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING ); + TQAction *ac = (TQAction*)a->child( name.latin1(), "TQAction" ); if ( ac ) return ac; } |