def _chooseWorkflow(): browser = FileBrowserWindow( "Select the one of the predefined MTF files", self.windows, getDataFile('workflows'), onSelect=_onChoose) browser.show()
def _loadAnimation(self): prot = self.protocol browser = FileBrowserWindow( "Select the animation folder (animation_NAME)", self.getWindow(), prot._getExtraPath(), onSelect=self._loadAnimationData) browser.show()
def show(self, form, *args): def setPath(fileInfo): prot = form.protocol varName = 'mtf' if hasattr(prot, 'mtf') else 'mtfFile' form.setVar(varName, fileInfo.getPath()) mtfDir = os.path.join(os.path.dirname(convert.__file__), 'mtfs') browser = FileBrowserWindow( "Select the one of the predefined MTF files", form, mtfDir, onSelect=setPath) browser.show()
def _browsePath(self, e=None): def onSelect(obj): self.projLocation.set(obj.getPath()) v = self.projLocation.get().strip() path = None if v: v = os.path.dirname(v) if os.path.exists(v): path = v if not path: path = self.projectsPath browser = FileBrowserWindow("Browsing", self, path=path, onSelect=onSelect, onlyFolders=True) browser.show()
def onBrowseFiles(self): # Project -> Browse files FileBrowserWindow( "Browse Project files", self, self.project.getPath(''), selectButton=None # we will select nothing ).show()
def onBrowseFiles(self): # File -> Browse files FileBrowserWindow("Browse files", self, pw.Config.SCIPION_USER_DATA, selectButton=None).show()
def onImportWorkflow(self): FileBrowserWindow("Select workflow .json file", self, self.project.getPath(''), onSelect=self._loadWorkflow, selectButton='Import').show()
def onBrowseFiles(self): # File -> Browse files FileBrowserWindow("Browse files", self, os.environ['SCIPION_USER_DATA'], selectButton=None).show()
def showDir(path): window = FileBrowserWindow("Browsing: " + path, path=path) window.show()
def _loadAnimation(self): prot = self.protocol browser = FileBrowserWindow("Select the animation folder (animation_NAME)", self.getWindow(), prot._getExtraPath(), onSelect=self._loadAnimationData) browser.show()