Logo Search packages:      
Sourcecode: ktechlab version File versions  Download package

LibraryItem * ItemLibrary::libraryItem ( QString  type  )  const

Returns:
the LibraryItem for the item with the given type (id) const.

Definition at line 329 of file itemlibrary.cpp.

Referenced by createItem(), ContextHelp::eventFilter(), haveDescription(), and ContextHelp::setBrowserItem().

{
      if ( type.startsWith("/") )
      {
            // Possibly change e.g. "/ec/capacitor" to "ec/capacitor"
            type.remove( 0, 1 );
      }
      
      LibraryItemList::const_iterator end = m_items.end();
      LibraryItemList::const_iterator it = m_items.begin();
      for ( ; it != end; ++it )
      {
            if ( (*it)->allIDs().contains( type ) )
                  return *it;
      }
      return 0l;
}


Generated by  Doxygen 1.6.0   Back to index