void SingleCollectionTreeItemModel::setLevels( const QList<CategoryId::CatMenuId> &levelType ) { if( m_levelType == levelType && m_rootItem ) return; delete m_rootItem; //clears the whole tree! m_levelType = levelType; m_rootItem = new CollectionTreeItem( m_collection, 0, this ); d->collections.insert( m_collection->collectionId(), CollectionRoot( m_collection, m_rootItem ) ); updateHeaderText(); m_expandedItems.clear(); m_expandedSpecialNodes.clear(); d->runningQueries.clear(); d->childQueries.clear(); d->compilationQueries.clear(); reset(); //resets the whole model, as the data changed }
void KNMusicGlobal::retranslate() { updateHeaderText(); }