diff options
Diffstat (limited to 'kdevdesigner/designer/hierarchyview.cpp')
-rw-r--r-- | kdevdesigner/designer/hierarchyview.cpp | 272 |
1 files changed, 136 insertions, 136 deletions
diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp index c6433cd0..781a62a3 100644 --- a/kdevdesigner/designer/hierarchyview.cpp +++ b/kdevdesigner/designer/hierarchyview.cpp @@ -90,14 +90,14 @@ void HierarchyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, if ( rtti() == Function && MainWindow::self->currProject()->isCpp() && ( txt == "init()" || txt == "destroy()" ) ) { - listView()->setUpdatesEnabled( FALSE ); + listView()->setUpdatesEnabled( false ); if ( txt == "init()" ) setText( 0, txt + " " + "(Constructor)" ); else setText( 0, txt + " " + "(Destructor)" ); TQListViewItem::paintCell( p, g, column, width, align ); setText( 0, txt ); - listView()->setUpdatesEnabled( TRUE ); + listView()->setUpdatesEnabled( true ); } else { TQListViewItem::paintCell( p, g, column, width, align ); } @@ -183,8 +183,8 @@ HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects init_colors(); setDefaultRenameAction( Accept ); - header()->setMovingEnabled( FALSE ); - header()->setStretchEnabled( TRUE ); + header()->setMovingEnabled( false ); + header()->setStretchEnabled( true ); normalMenu = 0; tabWidgetMenu = 0; addColumn( i18n( "Name" ) ); @@ -193,46 +193,46 @@ 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; + deselect = true; setColumnWidthMode( 1, Manual ); } void HierarchyList::keyPressEvent( TQKeyEvent *e ) { if ( e->key() == Key_Shift || e->key() == Key_Control ) - deselect = FALSE; + deselect = false; else - deselect = TRUE; + deselect = true; TQListView::keyPressEvent( e ); } void HierarchyList::keyReleaseEvent( TQKeyEvent *e ) { - deselect = TRUE; + deselect = true; TQListView::keyReleaseEvent( e ); } void HierarchyList::viewportMousePressEvent( TQMouseEvent *e ) { if ( e->state() & ShiftButton || e->state() & ControlButton ) - deselect = FALSE; + deselect = false; else - deselect = TRUE; + deselect = true; TQListView::viewportMousePressEvent( e ); } @@ -249,45 +249,45 @@ 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->clearSelection( false ); + 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; + deselect = true; } if ( deselect ) - formWindow->clearSelection( FALSE ); + formWindow->clearSelection( false ); return o; } @@ -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(); } @@ -401,17 +401,17 @@ 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()); + bool fakeMainWindow = false; + if ( ::tqt_cast<TQMainWindow*>(o) ) { + TQObject *cw = ( (TQMainWindow*)o )->centralWidget(); if ( cw ) { o = cw; - fakeMainWindow = TRUE; + fakeMainWindow = true; } } 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,42 +433,42 @@ 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 ) item = new HierarchyItem( HierarchyItem::Widget, this, 0, name, className, dbInfo ); else item = new HierarchyItem( HierarchyItem::Widget, parent, 0, name, className, dbInfo ); - item->setOpen( TRUE ); + 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 ); } } } @@ -579,10 +579,10 @@ void HierarchyList::setCurrent( TQObject *o ) TQListViewItemIterator it( this ); while ( it.current() ) { if ( ( (HierarchyItem*)it.current() )->object() == o ) { - blockSignals( TRUE ); + blockSignals( true ); setCurrentItem( it.current() ); ensureItemVisible( it.current() ); - blockSignals( FALSE ); + blockSignals( false ); return; } ++it; @@ -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; @@ -667,7 +667,7 @@ void HierarchyList::removeTabPage() new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). arg( dw->pageTitle() ).arg( wiz->name() ), formWindow, wiz, - wiz->indexOf( wiz->currentPage() ), TRUE ); + wiz->indexOf( wiz->currentPage() ), true ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); } @@ -677,13 +677,13 @@ void HierarchyList::removeTabPage() // ------------------------------------------------------------ FormDefinitionView::FormDefinitionView( TQWidget *parent, FormWindow *fw ) - : HierarchyList( parent, fw, TRUE ) + : HierarchyList( parent, fw, true ) { header()->hide(); removeColumn( 1 ); - connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), - this, TQT_SLOT( renamed( TQListViewItem * ) ) ); - popupOpen = FALSE; + connect( this, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), + this, TQ_SLOT( renamed( TQListViewItem * ) ) ); + popupOpen = false; } void FormDefinitionView::setup() @@ -710,14 +710,14 @@ void FormDefinitionView::setup() HierarchyItem *itemDef = new HierarchyItem( HierarchyItem::DefinitionParent, this, 0, i18n( *dit ), TQString(), TQString() ); itemDef->setPixmap( 0, DesignerFolderPix ); - itemDef->setOpen( TRUE ); + itemDef->setOpen( true ); TQStringList entries = lIface->definitionEntries( *dit, formWindow->mainWindow()->designerInterface() ); HierarchyItem *item = 0; for ( TQStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit ) { item = new HierarchyItem( HierarchyItem::Definition, itemDef, item, *eit, TQString(), TQString() ); - item->setRenameEnabled( 0, TRUE ); + item->setRenameEnabled( 0, true ); } } lIface->release(); @@ -729,7 +729,7 @@ void FormDefinitionView::setup() void FormDefinitionView::setupVariables() { bool pubOpen, protOpen, privOpen; - pubOpen = protOpen = privOpen = TRUE; + pubOpen = protOpen = privOpen = true; TQListViewItem *i = firstChild(); while ( i ) { if ( i->rtti() == HierarchyItem::VarParent ) { @@ -753,7 +753,7 @@ void FormDefinitionView::setupVariables() HierarchyItem *itemVar = new HierarchyItem( HierarchyItem::VarParent, this, 0, i18n( "Class Variables" ), TQString(), TQString() ); itemVar->setPixmap( 0, DesignerFolderPix ); - itemVar->setOpen( TRUE ); + itemVar->setOpen( true ); itemVarPriv = new HierarchyItem( HierarchyItem::VarPrivate, itemVar, 0, i18n( "private" ), TQString(), TQString() ); @@ -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 (;;) { @@ -782,7 +782,7 @@ void FormDefinitionView::setupVariables() --it; } } - itemVar->setOpen( TRUE ); + itemVar->setOpen( true ); itemVarPriv->setOpen( privOpen ); itemVarProt->setOpen( protOpen ); itemVarPubl->setOpen( pubOpen ); @@ -794,7 +794,7 @@ void FormDefinitionView::refresh() return; bool fuPub, fuProt, fuPriv, slPub, slProt, slPriv; - fuPub = fuProt = fuPriv = slPub = slProt = slPriv = TRUE; + fuPub = fuProt = fuPriv = slPub = slProt = slPriv = true; TQListViewItem *i = firstChild(); while ( i ) { if ( i->rtti() == HierarchyItem::SlotParent || @@ -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 (;;) { @@ -885,12 +885,12 @@ void FormDefinitionView::refresh() } } - itemFunct->setOpen( TRUE ); + itemFunct->setOpen( true ); itemFunctPubl->setOpen( fuPub ); itemFunctProt->setOpen( fuProt ); itemFunctPriv->setOpen( fuPriv ); - itemSlots->setOpen( TRUE ); + itemSlots->setOpen( true ); itemPublic->setOpen( slPub ); itemProtected->setOpen( slProt ); itemPrivate->setOpen( slPriv ); @@ -956,7 +956,7 @@ void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const T TQString(), TQString() ); if ( !pix.isNull() ) item->setPixmap( 0, pix ); - item->setRenameEnabled( 0, TRUE ); + item->setRenameEnabled( 0, true ); setCurrentItem( item ); ensureItemVisible( item ); tqApp->processEvents(); @@ -981,22 +981,22 @@ void FormDefinitionView::contentsMouseDoubleClickEvent( TQMouseEvent *e ) if ( formWindow->project()->isCpp() ) switch( i->rtti() ) { case HierarchyItem::FunctPublic: - execFunctionDialog( "public", "function", TRUE ); + execFunctionDialog( "public", "function", true ); break; case HierarchyItem::FunctProtected: - execFunctionDialog( "protected", "function", TRUE ); + execFunctionDialog( "protected", "function", true ); break; case HierarchyItem::FunctPrivate: - execFunctionDialog( "private", "function", TRUE ); + execFunctionDialog( "private", "function", true ); break; case HierarchyItem::SlotPublic: - execFunctionDialog( "public", "slot", TRUE ); + execFunctionDialog( "public", "slot", true ); break; case HierarchyItem::SlotProtected: - execFunctionDialog( "protected", "slot", TRUE ); + execFunctionDialog( "protected", "slot", true ); break; case HierarchyItem::SlotPrivate: - execFunctionDialog( "private", "slot", TRUE ); + execFunctionDialog( "private", "slot", true ); break; case HierarchyItem::VarPublic: case HierarchyItem::VarProtected: @@ -1023,7 +1023,7 @@ void FormDefinitionView::execFunctionDialog( const TQString &access, const TQStr // refresh the functions list in the metadatabase SourceEditor *editor = formFile->editor(); if ( editor ) - editor->refresh( TRUE ); + editor->refresh( true ); EditFunctions dlg( this, formWindow ); if ( addFunc ) @@ -1043,7 +1043,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) const int GOIMPL = 5; TQPopupMenu menu; - bool insertDelete = FALSE; + bool insertDelete = false; if ( i->rtti() == HierarchyItem::FunctParent || i->rtti() == HierarchyItem::SlotParent || i->rtti() == HierarchyItem::VarParent ) { @@ -1059,7 +1059,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) menu.insertItem( SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), i18n( "Properties" ), PROPS ); if ( MetaDataBase::hasEditor( formWindow->project()->language() ) ) menu.insertItem( i18n( "Goto Implementation" ), GOIMPL ); - insertDelete = TRUE; + insertDelete = true; } if ( insertDelete || i->rtti() == HierarchyItem::Variable || i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot || @@ -1067,19 +1067,19 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) menu.insertSeparator(); menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), i18n( "Delete" ), DEL ); } - popupOpen = TRUE; + popupOpen = true; int res = menu.exec( pos ); - popupOpen = FALSE; + popupOpen = false; if ( res == -1 ) return; if ( res == EDIT ) { switch( i->rtti() ) { case HierarchyItem::FunctParent: - execFunctionDialog( "public", "function", FALSE ); + execFunctionDialog( "public", "function", false ); break; case HierarchyItem::SlotParent: - execFunctionDialog( "public", "slot", FALSE ); + execFunctionDialog( "public", "slot", false ); break; case HierarchyItem::VarParent: case HierarchyItem::VarPublic: @@ -1091,7 +1091,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) if ( i ) varDia.setCurrentItem( i->text( 0 ) ); if ( varDia.exec() == TQDialog::Accepted ) - formWindow->commandHistory()->setModified( TRUE ); + formWindow->commandHistory()->setModified( true ); break; } case HierarchyItem::Definition: @@ -1101,7 +1101,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) return; if ( i->rtti() == HierarchyItem::Definition ) i = i->parent(); - ListEditor dia( this, 0, TRUE ); + ListEditor dia( this, 0, true ); dia.setCaption( i18n( "Edit %1" ).arg( i->text( 0 ) ) ); TQStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() ); dia.setList( entries ); @@ -1117,22 +1117,22 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) i = i->parent(); switch( i->rtti() ) { case HierarchyItem::SlotPublic: - execFunctionDialog( "public", "slot", TRUE ); + execFunctionDialog( "public", "slot", true ); break; case HierarchyItem::SlotProtected: - execFunctionDialog( "protected", "slot", TRUE ); + execFunctionDialog( "protected", "slot", true ); break; case HierarchyItem::SlotPrivate: - execFunctionDialog( "private" , "slot", TRUE ); + execFunctionDialog( "private" , "slot", true ); break; case HierarchyItem::FunctPublic: - execFunctionDialog( "public", "function", TRUE ); + execFunctionDialog( "public", "function", true ); break; case HierarchyItem::FunctProtected: - execFunctionDialog( "protected", "function", TRUE ); + execFunctionDialog( "protected", "function", true ); break; case HierarchyItem::FunctPrivate: - execFunctionDialog( "private" , "function", TRUE ); + execFunctionDialog( "private" , "function", true ); break; default: insertEntry( i ); @@ -1192,12 +1192,12 @@ void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i ) } if ( i && i->rtti() == HierarchyItem::Variable ) { - i->setRenameEnabled( 0, FALSE ); + i->setRenameEnabled( 0, false ); TQString varName = i->text( 0 ); 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,9 +1268,9 @@ 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 ); + setTabEnabled( cb.lv, false ); } } } @@ -1301,13 +1301,13 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o ) editor = 0; } - setTabEnabled( listview, TRUE ); + setTabEnabled( listview, true ); setTabEnabled( fView, fw && fw->project()->isCpp() ); 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,14 +1367,14 @@ 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; } setTabEnabled( listview, !!se->formWindow() && !se->formWindow()->isFake() ); - setTabEnabled( fView, FALSE ); + setTabEnabled( fView, false ); formwindow = 0; listview->setFormWindow( 0 ); @@ -1389,10 +1389,10 @@ void HierarchyView::showClassesTimeout() it != classBrowsers->end(); ++it ) { if ( it.key() == se->project()->language() ) { (*it).iface->update( se->text() ); - setTabEnabled( (*it).lv, TRUE ); + setTabEnabled( (*it).lv, true ); showPage( (*it).lv ); } else { - setTabEnabled( (*it).lv, FALSE ); + setTabEnabled( (*it).lv, false ); (*it).iface->clear(); } } @@ -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 } |