MCPcopy Create free account
hub / github.com/SpartanJ/eepp / iconFor

Method iconFor

src/eepp/ui/models/filesystemmodel.cpp:607–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607UIIcon* FileSystemModel::iconFor( const Node& node, const ModelIndex& index ) const {
608 if ( index.column() == (Int64)treeColumn() || Column::Icon == index.column() ) {
609 auto* scene = SceneManager::instance()->getUISceneNode();
610 auto* d = scene->findIcon( node.getMimeType() );
611 if ( !d )
612 return scene->findIcon( !node.info().isDirectory() ? "file" : "folder" );
613 return d;
614 }
615 return nullptr;
616}
617
618void FileSystemModel::setMode( const Mode& mode ) {
619 if ( mode != mMode ) {

Callers

nothing calls this directly

Calls 5

columnMethod · 0.80
treeColumnFunction · 0.50
getUISceneNodeMethod · 0.45
findIconMethod · 0.45
isDirectoryMethod · 0.45

Tested by

no test coverage detected