Example #1
0
 StTrackedFloatParam(const StHandle<StFloat32Param>& theTracked1,
                     const StHandle<StFloat32Param>& theTracked2)
 : StFloat32Param(theTracked1->getValue(),
                  theTracked1->getMinValue(),
                  theTracked1->getMaxValue(),
                  theTracked1->getDefValue(),
                  theTracked1->getStep(),
                  theTracked1->getTolerance()),
   myTracked1(theTracked1),
   myTracked2(theTracked2) {}
Example #2
0
StHandle<StStereoParams> StPlayList::openRecent(const size_t theItemId) {
    StMutexAuto anAutoLock(myMutex);
    if(theItemId >= myRecent.size()) {
        return StHandle<StStereoParams>();
    }

    const StHandle<StRecentItem> aRecent = myRecent[theItemId];
    const StHandle<StFileNode>   aFile   = aRecent->File;
    if(aFile->size() == 2) {
        // stereo pair from two files
        clear();
        addOneFile(aFile->getValue(0)->getPath(),
                   aFile->getValue(1)->getPath());
    } else if(aFile->size() == 1) {
        // playlist
        open(aFile->getPath(), aFile->getValue(0)->getSubPath());
    } else {
        // single file
        open(aFile->getPath());
    }
    return aRecent->Params;
}
Example #3
0
void StCADViewerGUI::doOpenFile(const size_t ) {
    StGLOpenFile* aDialog = new StGLOpenFile(this, tr(DIALOG_OPEN_FILE), tr(BUTTON_CLOSE));
    aDialog->setMimeList(StCADLoader::ST_CAD_MIME_LIST);
#if defined(_WIN32)
    //
#else
    aDialog->addHotItem("/", "Root");
#endif
    aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_SdCard));
    aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Downloads));
    aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Pictures));
    aDialog->addHotItem(getResourceManager()->getFolder(StResourceManager::FolderId_Photos));
    aDialog->signals.onFileSelected = stSlot(myPlugin, &StCADViewer::doOpen1FileFromGui);

    if(myPlugin->params.LastFolder.isEmpty()) {
        StHandle<StFileNode> aCurrFile = myPlugin->myPlayList->getCurrentFile();
        if(!aCurrFile.isNull()) {
            myPlugin->params.LastFolder = aCurrFile->isEmpty() ? aCurrFile->getFolderPath() : aCurrFile->getValue(0)->getFolderPath();
        }
    }
    aDialog->openFolder(myPlugin->params.LastFolder);
    setModalDialog(aDialog);
}