diff options
Diffstat (limited to 'parts/classview/classviewwidget.cpp')
-rw-r--r-- | parts/classview/classviewwidget.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/parts/classview/classviewwidget.cpp b/parts/classview/classviewwidget.cpp index 64079546..1eccf136 100644 --- a/parts/classview/classviewwidget.cpp +++ b/parts/classview/classviewwidget.cpp @@ -71,28 +71,28 @@ ClassViewWidget::ClassViewWidget( ClassViewPart * part ) m_actionViewMode->setItems( lst ); m_actionViewMode->setWhatsThis(i18n("<b>View mode</b><p>Class browser items can be grouped by directories, listed in a plain or java like view.")); - m_actionNewClass = new KAction( i18n("New Class..."), KShortcut(), this, TQT_SLOT(slotNewClass()), + m_actionNewClass = new KAction( i18n("New Class..."), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotNewClass()), m_part->actionCollection(), "classview_new_class" ); m_actionNewClass->setWhatsThis(i18n("<b>New class</b><p>Calls the <b>New Class</b> wizard.")); - m_actionCreateAccessMethods = new KAction( i18n("Create get/set Methods"), KShortcut(), this, TQT_SLOT(slotCreateAccessMethods()), m_part->actionCollection(), "classview_create_access_methods" ); + m_actionCreateAccessMethods = new KAction( i18n("Create get/set Methods"), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotCreateAccessMethods()), m_part->actionCollection(), "classview_create_access_methods" ); - m_actionAddMethod = new KAction( i18n("Add Method..."), KShortcut(), this, TQT_SLOT(slotAddMethod()), + m_actionAddMethod = new KAction( i18n("Add Method..."), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotAddMethod()), m_part->actionCollection(), "classview_add_method" ); m_actionAddMethod->setWhatsThis(i18n("<b>Add method</b><p>Calls the <b>New Method</b> wizard.")); - m_actionAddAttribute = new KAction( i18n("Add Attribute..."), KShortcut(), this, TQT_SLOT(slotAddAttribute()), + m_actionAddAttribute = new KAction( i18n("Add Attribute..."), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotAddAttribute()), m_part->actionCollection(), "classview_add_attribute" ); m_actionAddAttribute->setWhatsThis(i18n("<b>Add attribute</b><p>Calls the <b>New Attribute</b> wizard.")); - m_actionOpenDeclaration = new KAction( i18n("Open Declaration"), KShortcut(), this, TQT_SLOT(slotOpenDeclaration()), + m_actionOpenDeclaration = new KAction( i18n("Open Declaration"), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotOpenDeclaration()), m_part->actionCollection(), "classview_open_declaration" ); m_actionOpenDeclaration->setWhatsThis(i18n("<b>Open declaration</b><p>Opens a file where the selected item is declared and jumps to the declaration line.")); - m_actionOpenImplementation = new KAction( i18n("Open Implementation"), KShortcut(), this, TQT_SLOT(slotOpenImplementation()), + m_actionOpenImplementation = new KAction( i18n("Open Implementation"), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotOpenImplementation()), m_part->actionCollection(), "classview_open_implementation" ); m_actionOpenImplementation->setWhatsThis(i18n("<b>Open implementation</b><p>Opens a file where the selected item is defined (implemented) and jumps to the definition line.")); - m_actionFollowEditor = new KToggleAction( i18n("Follow Editor"), KShortcut(), this, TQT_SLOT(slotFollowEditor()), m_part->actionCollection(), "classview_follow_editor" ); + m_actionFollowEditor = new KToggleAction( i18n("Follow Editor"), KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotFollowEditor()), m_part->actionCollection(), "classview_follow_editor" ); KConfig* config = m_part->instance()->config(); config->setGroup( "General" ); @@ -116,7 +116,7 @@ template <class ModelType, class ListItemType> if( c ) { KSharedPtr<ModelType> d( c ); - typename TQMap<KSharedPtr<ModelType>, ListItemType*>::ConstIterator it = map.find(d); + typename TQMap<KSharedPtr<ModelType>, ListItemType*>::ConstIterator it = map.tqfind(d); if( it != map.end() ) { ( *it )->select(); return true; @@ -482,13 +482,13 @@ void FolderBrowserItem::processFile( FileDom file, TQStringList& path, bool remo TQString current = path.front(); path.pop_front(); - FolderBrowserItem* item = m_folders.contains( current ) ? m_folders[ current ] : 0; + FolderBrowserItem* item = m_folders.tqcontains( current ) ? m_folders[ current ] : 0; if( !item ){ if( remove ) return; item = new FolderBrowserItem( m_widget, this, current ); - if( listView()->removedText.contains(current) ) + if( listView()->removedText.tqcontains(current) ) item->setOpen( true ); m_folders.insert( current, item ); } @@ -507,13 +507,13 @@ void FolderBrowserItem::processFile( FileDom file, TQStringList& path, bool remo void FolderBrowserItem::processNamespace( NamespaceDom ns, bool remove ) { - NamespaceDomBrowserItem* item = m_namespaces.contains( ns->name() ) ? m_namespaces[ ns->name() ] : 0; + NamespaceDomBrowserItem* item = m_namespaces.tqcontains( ns->name() ) ? m_namespaces[ ns->name() ] : 0; if( !item ){ if( remove ) return; item = new NamespaceDomBrowserItem( this, ns ); - if( listView()->removedText.contains(ns->name()) ) + if( listView()->removedText.tqcontains(ns->name()) ) item->setOpen( true ); m_namespaces.insert( ns->name(), item ); } @@ -547,13 +547,13 @@ void FolderBrowserItem::processNamespace( NamespaceDom ns, bool remove ) void FolderBrowserItem::processClass( ClassDom klass, bool remove ) { - ClassDomBrowserItem* item = m_classes.contains( klass ) ? m_classes[ klass ] : 0; + ClassDomBrowserItem* item = m_classes.tqcontains( klass ) ? m_classes[ klass ] : 0; if( !item ){ if( remove ) return; item = new ClassDomBrowserItem( this, klass ); - if( listView()->removedText.contains(klass->name()) ) + if( listView()->removedText.tqcontains(klass->name()) ) item->setOpen( true ); m_classes.insert( klass, item ); } @@ -584,13 +584,13 @@ void FolderBrowserItem::processClass( ClassDom klass, bool remove ) void FolderBrowserItem::processTypeAlias( TypeAliasDom typeAlias, bool remove ) { - TypeAliasDomBrowserItem* item = m_typeAliases.contains( typeAlias ) ? m_typeAliases[ typeAlias ] : 0; + TypeAliasDomBrowserItem* item = m_typeAliases.tqcontains( typeAlias ) ? m_typeAliases[ typeAlias ] : 0; if( !item ){ if( remove ) return; item = new TypeAliasDomBrowserItem( this, typeAlias ); - if( listView()->removedText.contains(typeAlias->name()) ) + if( listView()->removedText.tqcontains(typeAlias->name()) ) item->setOpen( true ); m_typeAliases.insert( typeAlias, item ); } @@ -607,7 +607,7 @@ void FolderBrowserItem::processTypeAlias( TypeAliasDom typeAlias, bool remove ) void FolderBrowserItem::processFunction( FunctionDom fun, bool remove ) { - FunctionDomBrowserItem* item = m_functions.contains( fun ) ? m_functions[ fun ] : 0; + FunctionDomBrowserItem* item = m_functions.tqcontains( fun ) ? m_functions[ fun ] : 0; if( !item ){ if( remove ) return; @@ -625,7 +625,7 @@ void FolderBrowserItem::processFunction( FunctionDom fun, bool remove ) void FolderBrowserItem::processVariable( VariableDom var, bool remove ) { - VariableDomBrowserItem* item = m_variables.contains( var ) ? m_variables[ var ] : 0; + VariableDomBrowserItem* item = m_variables.tqcontains( var ) ? m_variables[ var ] : 0; if( !item ){ if( remove ) return; @@ -679,13 +679,13 @@ bool NamespaceDomBrowserItem::selectItem( ItemDom item) void NamespaceDomBrowserItem::processNamespace( NamespaceDom ns, bool remove ) { - NamespaceDomBrowserItem* item = m_namespaces.contains( ns->name() ) ? m_namespaces[ ns->name() ] : 0; + NamespaceDomBrowserItem* item = m_namespaces.tqcontains( ns->name() ) ? m_namespaces[ ns->name() ] : 0; if( !item ){ if( remove ) return; item = new NamespaceDomBrowserItem( this, ns ); - if( listView()->removedText.contains(ns->name()) ) + if( listView()->removedText.tqcontains(ns->name()) ) item->setOpen( true ); m_namespaces.insert( ns->name(), item ); } @@ -719,13 +719,13 @@ void NamespaceDomBrowserItem::processNamespace( NamespaceDom ns, bool remove ) void NamespaceDomBrowserItem::processClass( ClassDom klass, bool remove ) { - ClassDomBrowserItem* item = m_classes.contains( klass ) ? m_classes[ klass ] : 0; + ClassDomBrowserItem* item = m_classes.tqcontains( klass ) ? m_classes[ klass ] : 0; if( !item ){ if( remove ) return; item = new ClassDomBrowserItem( this, klass ); - if( listView()->removedText.contains(klass->name()) ) + if( listView()->removedText.tqcontains(klass->name()) ) item->setOpen( true ); m_classes.insert( klass, item ); } @@ -756,13 +756,13 @@ void NamespaceDomBrowserItem::processClass( ClassDom klass, bool remove ) void NamespaceDomBrowserItem::processTypeAlias( TypeAliasDom typeAlias, bool remove ) { - TypeAliasDomBrowserItem* item = m_typeAliases.contains( typeAlias ) ? m_typeAliases[ typeAlias ] : 0; + TypeAliasDomBrowserItem* item = m_typeAliases.tqcontains( typeAlias ) ? m_typeAliases[ typeAlias ] : 0; if( !item ){ if( remove ) return; item = new TypeAliasDomBrowserItem( this, typeAlias ); - if( listView()->removedText.contains(typeAlias->name()) ) + if( listView()->removedText.tqcontains(typeAlias->name()) ) item->setOpen( true ); m_typeAliases.insert( typeAlias, item ); } @@ -779,7 +779,7 @@ void NamespaceDomBrowserItem::processTypeAlias( TypeAliasDom typeAlias, bool rem void NamespaceDomBrowserItem::processFunction( FunctionDom fun, bool remove ) { - FunctionDomBrowserItem* item = m_functions.contains( fun ) ? m_functions[ fun ] : 0; + FunctionDomBrowserItem* item = m_functions.tqcontains( fun ) ? m_functions[ fun ] : 0; if( !item ){ if( remove ) return; @@ -797,7 +797,7 @@ void NamespaceDomBrowserItem::processFunction( FunctionDom fun, bool remove ) void NamespaceDomBrowserItem::processVariable( VariableDom var, bool remove ) { - VariableDomBrowserItem* item = m_variables.contains( var ) ? m_variables[ var ] : 0; + VariableDomBrowserItem* item = m_variables.tqcontains( var ) ? m_variables[ var ] : 0; if( !item ){ if( remove ) return; @@ -844,13 +844,13 @@ bool ClassDomBrowserItem::selectItem(ItemDom item) void ClassDomBrowserItem::processClass( ClassDom klass, bool remove ) { - ClassDomBrowserItem* item = m_classes.contains( klass ) ? m_classes[ klass ] : 0; + ClassDomBrowserItem* item = m_classes.tqcontains( klass ) ? m_classes[ klass ] : 0; if( !item ){ if( remove ) return; item = new ClassDomBrowserItem( this, klass ); - if( listView()->removedText.contains(klass->name()) ) + if( listView()->removedText.tqcontains(klass->name()) ) item->setOpen( true ); m_classes.insert( klass, item ); } @@ -881,13 +881,13 @@ void ClassDomBrowserItem::processClass( ClassDom klass, bool remove ) void ClassDomBrowserItem::processTypeAlias( TypeAliasDom typeAlias, bool remove ) { - TypeAliasDomBrowserItem* item = m_typeAliases.contains( typeAlias ) ? m_typeAliases[ typeAlias ] : 0; + TypeAliasDomBrowserItem* item = m_typeAliases.tqcontains( typeAlias ) ? m_typeAliases[ typeAlias ] : 0; if( !item ){ if( remove ) return; item = new TypeAliasDomBrowserItem( this, typeAlias ); - if( listView()->removedText.contains(typeAlias->name()) ) + if( listView()->removedText.tqcontains(typeAlias->name()) ) item->setOpen( true ); m_typeAliases.insert( typeAlias, item ); } @@ -904,7 +904,7 @@ void ClassDomBrowserItem::processTypeAlias( TypeAliasDom typeAlias, bool remove void ClassDomBrowserItem::processFunction( FunctionDom fun, bool remove ) { - FunctionDomBrowserItem* item = m_functions.contains( fun ) ? m_functions[ fun ] : 0; + FunctionDomBrowserItem* item = m_functions.tqcontains( fun ) ? m_functions[ fun ] : 0; if( !item ){ if( remove ) return; @@ -922,7 +922,7 @@ void ClassDomBrowserItem::processFunction( FunctionDom fun, bool remove ) void ClassDomBrowserItem::processVariable( VariableDom var, bool remove ) { - VariableDomBrowserItem* item = m_variables.contains( var ) ? m_variables[ var ] : 0; + VariableDomBrowserItem* item = m_variables.tqcontains( var ) ? m_variables[ var ] : 0; if( !item ){ if( remove ) return; @@ -1212,13 +1212,13 @@ void ClassViewWidget::maybeTip( TQPoint const & p ) ++it; } - TQString strstatic = fitem->dom()->isStatic() ? TQString( "[static] " ) : TQString::null; - TQString strsignal = fitem->dom()->isSignal() ? TQString( "[signal] " ) : TQString::null; - TQString strslot = fitem->dom()->isSlot() ? TQString( "[slot] " ) : TQString::null; - TQString strresult = !fitem->dom()->resultType().isEmpty() ? fitem->dom()->resultType() + " " : TQString::null; + TQString strstatic = fitem->dom()->isStatic() ? TQString( "[static] " ) : TQString(); + TQString strsignal = fitem->dom()->isSignal() ? TQString( "[signal] " ) : TQString(); + TQString strslot = fitem->dom()->isSlot() ? TQString( "[slot] " ) : TQString(); + TQString strresult = !fitem->dom()->resultType().isEmpty() ? fitem->dom()->resultType() + " " : TQString(); - TQString strconstant = fitem->dom()->isConstant() ? TQString( " [const]" ) : TQString::null; - TQString strabstract = fitem->dom()->isAbstract() ? TQString( " [abstract]" ) : TQString::null; + TQString strconstant = fitem->dom()->isConstant() ? TQString( " [const]" ) : TQString(); + TQString strabstract = fitem->dom()->isAbstract() ? TQString( " [abstract]" ) : TQString(); tooltip = access + strstatic + strsignal + strslot + strresult + fitem->dom()->scope().join("::") + "::" + fitem->dom()->name() @@ -1238,7 +1238,7 @@ void ClassViewWidget::maybeTip( TQPoint const & p ) else if ( vitem->dom()->access() == CodeModelItem::Public ) access = "[public] "; - TQString strstatic = vitem->dom()->isStatic() ? TQString( "[static] " ) : TQString::null; + TQString strstatic = vitem->dom()->isStatic() ? TQString( "[static] " ) : TQString(); tooltip = access + strstatic + vitem->dom()->type() + " " + vitem->dom()->name(); } } @@ -1259,7 +1259,7 @@ void ClassViewWidget::maybeTip( TQPoint const & p ) kdDebug(0) << tooltip << endl; - TQRect r = itemRect( item ); + TQRect r = tqitemRect( item ); if ( item && r.isValid() && !tooltip.isEmpty() ) { @@ -1277,7 +1277,7 @@ void ClassViewWidget::slotCreateAccessMethods( ) if (item == 0) return; - m_part->languageSupport()->createAccessMethods(static_cast<ClassModel*>(static_cast<ClassDomBrowserItem*>(item->parent())->dom()),static_cast<VariableModel*>(item->dom())); + m_part->languageSupport()->createAccessMethods(static_cast<ClassModel*>(static_cast<ClassDomBrowserItem*>(item->tqparent())->dom()),static_cast<VariableModel*>(item->dom())); } } |