14 try: |
14 try: |
15 from enum import Enum |
15 from enum import Enum |
16 except ImportError: |
16 except ImportError: |
17 from ThirdParty.enum import Enum |
17 from ThirdParty.enum import Enum |
18 |
18 |
19 from PyQt5.QtCore import pyqtSignal, Qt, QFileInfo |
19 from PyQt5.QtCore import pyqtSignal, Qt, QFileInfo, QCoreApplication |
20 from PyQt5.QtWidgets import QWidget, QHBoxLayout, QToolButton, QSizePolicy |
20 from PyQt5.QtWidgets import QWidget, QHBoxLayout, QToolButton, QSizePolicy |
21 |
21 |
22 from . import E5FileDialog |
22 from . import E5FileDialog |
23 from .E5LineEdit import E5ClearableLineEdit |
23 from .E5LineEdit import E5ClearableLineEdit |
24 from .E5Completers import E5FileCompleter, E5DirCompleter |
24 from .E5Completers import E5FileCompleter, E5DirCompleter |
92 self.__layout.setContentsMargins(0, 0, 0, 0) |
92 self.__layout.setContentsMargins(0, 0, 0, 0) |
93 self.setLayout(self.__layout) |
93 self.setLayout(self.__layout) |
94 |
94 |
95 if useLineEdit: |
95 if useLineEdit: |
96 self._editor = E5ClearableLineEdit( |
96 self._editor = E5ClearableLineEdit( |
97 self, self.tr("Enter Path Name")) |
97 self, QCoreApplication.translate( |
|
98 "E5PathPickerBase", "Enter Path Name")) |
98 else: |
99 else: |
99 self._editor = E5ClearableComboBox( |
100 self._editor = E5ClearableComboBox( |
100 self, self.tr("Enter Path Name")) |
101 self, self, QCoreApplication.translate( |
|
102 "E5PathPickerBase", "Enter Path Name")) |
101 |
103 |
102 self.__button = QToolButton(self) |
104 self.__button = QToolButton(self) |
103 self.__button.setToolButtonStyle(Qt.ToolButtonIconOnly) |
105 self.__button.setToolButtonStyle(Qt.ToolButtonIconOnly) |
104 self.__button.setIcon(UI.PixmapCache.getIcon("open.png")) |
106 self.__button.setIcon(UI.PixmapCache.getIcon("open.png")) |
105 |
107 |