E5Gui/E5PathPicker.py

changeset 5070
4e4651e88674
parent 5036
318e879a37fa
child 5106
1ecc6c9abca5
equal deleted inserted replaced
5068:3a5e58eeb64a 5070:4e4651e88674
36 OpenFilesMode = 1 36 OpenFilesMode = 1
37 SaveFileMode = 2 37 SaveFileMode = 2
38 SaveFileEnsureExtensionMode = 3 38 SaveFileEnsureExtensionMode = 3
39 SaveFileOverwriteMode = 4 39 SaveFileOverwriteMode = 4
40 DirectoryMode = 5 40 DirectoryMode = 5
41 DirectoryShowFilesMode=6
41 CustomMode = 99 42 CustomMode = 99
42 NoMode = 100 43 NoMode = 100
43 44
44 45
45 class E5PathPickerBase(QWidget): 46 class E5PathPickerBase(QWidget):
569 directory, 570 directory,
570 E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) 571 E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
571 path = Utilities.toNativeSeparators(path) 572 path = Utilities.toNativeSeparators(path)
572 while path.endswith(os.sep): 573 while path.endswith(os.sep):
573 path = path[:-1] 574 path = path[:-1]
575 elif self.__mode == E5PathPickerModes.DirectoryShowFilesMode:
576 path = E5FileDialog.getExistingDirectory(
577 self,
578 windowTitle,
579 directory,
580 E5FileDialog.Options(E5FileDialog.DontUseNativeDialog))
581 path = Utilities.toNativeSeparators(path)
582 while path.endswith(os.sep):
583 path = path[:-1]
574 584
575 if path: 585 if path:
576 self._setEditorText(path) 586 self._setEditorText(path)
577 self.pathSelected.emit(path) 587 self.pathSelected.emit(path)
578 588

eric ide

mercurial