MCPcopy Create free account
hub / github.com/bumptop/BumpTop / onFileAdded

Method onFileAdded

trunk/win/Source/BT_FileSystemPile.cpp:671–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669}
670
671void FileSystemPile::onFileAdded(QString strFileName)
672{
673
674 FileSystemActor *fsData;
675
676 // Look for collisions
677 for (uint i = 0; i < pileItems.size(); i++)
678 {
679 fsData = (FileSystemActor *) pileItems[i];
680
681 if (fsManager->isIdenticalPath(fsData->getFullPath(), strFileName))
682 {
683 // This item is already in the pile
684 return;
685 }
686 }
687
688 // Disallow hidden files when not specified
689 if (fsManager->getFileAttributes(strFileName) & Hidden &&
690 GLOBAL(settings).LoadHiddenFiles == false) return;
691
692 // Create the new Actor
693 FileSystemActor *actor = FileSystemActorFactory::createFileSystemActor(strFileName);
694 actor->setDimsToDefault();
695 actor->setGlobalOrientation(GLOBAL(straightIconOri));
696 actor->setGlobalPosition(getGlobalPosition());
697 actor->setAlpha(1.0f);
698 actor->setFilePath(strFileName);
699
700 // Add it to this pile
701 Pile::addToPile(actor);
702
703 // Relayout
704 updatePileState();
705}
706
707void FileSystemPile::onFileRemoved(QString strFileName)
708{

Callers

nothing calls this directly

Calls 6

isIdenticalPathMethod · 0.80
getFullPathMethod · 0.80
getFileAttributesMethod · 0.80
sizeMethod · 0.45
setAlphaMethod · 0.45
setFilePathMethod · 0.45

Tested by

no test coverage detected