Exemple #1
0
    def loadFolder(self, inputCat=None, methode=None):
        """Méthode qui permet de charger un fichier et afficher dans le plainText"""
        directoryToOpen = os.getcwd()
        for key, folder in self.dicoFoldersCallibration.items():
            if folder != None:
                print(key, folder)
                directoryToOpen = folder
                break

        if methode == "clicked":
            pathdir = QFileDialog.getExistingDirectory(
                self,
                caption="Load the directory " + inputCat,
                directory=directoryToOpen)
            self.dicoObjectOpenLineEditCallibration[inputCat].setText(pathdir)
        elif methode == "write":
            pathdir = str(
                self.dicoObjectOpenLineEditCallibration[inputCat].text())

        if pathdir != "" and os.path.isdir(pathdir):
            self.dicoFoldersCallibration[inputCat] = pathdir
        else:
            self.dicoFoldersCallibration[inputCat] = ""
            self.dicoObjectOpenLineEditCallibration[inputCat].setText("")
            self.displayError(error="\"%s\" is not a valid Path \n" %
                              (pathdir))
        self.actualizeRunBouton()
        self.autocomplete_Folder()
Exemple #2
0
 def __init__(self, parent=None):
     QMainWindow.__init__(self, parent=None)
     self.files = str(QFileDialog.getExistingDirectory(self, "Select ARRIRAW Clip Directory"))
     self.Error = QString("")
     if self.files != "":
         self.showdialog("Set New Roll Number")
     sys.exit(0)
Exemple #3
0
 def selectCacheDir(self):
     selected_dir = QFileDialog.getExistingDirectory(
         self.settings, i18n("Open Directory"), "/",
         QFileDialog.ShowDirsOnly | QFileDialog.DontResolveSymlinks)
     if not selected_dir == '':
         if not selected_dir == self.settings.cacheDirPath.text():
             self.settings.cacheDirPath.setText(selected_dir)
             self.markChanged()
Exemple #4
0
 def selectCacheDir(self):
     selected_dir = QFileDialog.getExistingDirectory(
         self.settings, i18n("Open Directory"), "/", QFileDialog.ShowDirsOnly | QFileDialog.DontResolveSymlinks
     )
     if not selected_dir == "":
         if not selected_dir == self.settings.cacheDirPath.text():
             self.settings.cacheDirPath.setText(selected_dir)
             self.markChanged()
Exemple #5
0
	def loadFolder(self,inputCat = None, methode = None):
		"""Méthode qui permet de charger un fichier et afficher dans le plainText"""
		directoryToOpen = os.getcwd()
		for key, folder in self.dicoFoldersCallibration.items():
			if folder != None:
				print(key, folder)
				directoryToOpen = folder
				break

		if methode == "clicked":
			pathdir = QFileDialog.getExistingDirectory(self, caption="Load the directory "+inputCat, directory=directoryToOpen)
			self.dicoObjectOpenLineEditCallibration[inputCat].setText(pathdir)
		elif methode == "write":
			pathdir = str(self.dicoObjectOpenLineEditCallibration[inputCat].text())

		if pathdir != "" and os.path.isdir(pathdir):
			self.dicoFoldersCallibration[inputCat] = pathdir
		else:
			self.dicoFoldersCallibration[inputCat] = ""
			self.dicoObjectOpenLineEditCallibration[inputCat].setText("")
			self.displayError(error = "\"%s\" is not a valid Path \n" % (pathdir))
		self.actualizeRunBouton()
		self.autocomplete_Folder()
Exemple #6
0
 def select_output_dir(self):
     self.dirname = QFileDialog.getExistingDirectory(
         self.dlg, "Select directory ", "/home")
     self.dlg.lineEdit.setText(self.dirname)
Exemple #7
0
def fileBrowser():
    #Opens file browser to import data
    directory = QFileDialog.getExistingDirectory(
        parent=None, caption="Choose Data Directory")
    dirDisp.setText(directory)
    importData()