def slotOpenCase(self): title = self.tr("Choose a result directory") path = os.getcwd() dataPath = os.path.join(path, "..", "RESU") if os.path.isdir(dataPath): path = dataPath dirName = getexistingdirectory( self, title, path, QFileDialog.ShowDirsOnly | QFileDialog.DontResolveSymlinks) if not dirName: self.caseName = None return self.openCase(dirName)
def slotCopyFromCase(self): title = self.tr("Choose an existing case") path = os.getcwd() dataPath = os.path.join(path, "..", "DATA") if os.path.isdir(dataPath): path = dataPath dirName = getexistingdirectory(self, title, path, QFileDialog.ShowDirsOnly | QFileDialog.DontResolveSymlinks) if not dirName: self.copyFromName = None else: self.copyFromName = str(dirName) setGreenColor(self.pushButtonCopyFrom, False)
def slotOpenCase(self): title = self.tr("Choose a result directory") path = os.getcwd() dataPath = os.path.join(path, "..", "RESU") if os.path.isdir(dataPath): path = dataPath dirName = getexistingdirectory( self, title, path, QFileDialog.ShowDirsOnly | QFileDialog.DontResolveSymlinks) if not dirName: self.caseName = None else: self.caseName = str(dirName) self.toolButtonDir.setStyleSheet("background-color: green") self.lineEditCase.setText(self.caseName) self.loadDirectoryContent()