UI/FindFileNameDialog.py

changeset 945
8cd4d08fa9f6
parent 882
34b86be88bf0
child 998
eb7a1af5d9fc
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
33 @signal designerFile(str) emitted to open a Qt-Designer file 33 @signal designerFile(str) emitted to open a Qt-Designer file
34 """ 34 """
35 sourceFile = pyqtSignal(str) 35 sourceFile = pyqtSignal(str)
36 designerFile = pyqtSignal(str) 36 designerFile = pyqtSignal(str)
37 37
38 def __init__(self, project, parent = None): 38 def __init__(self, project, parent=None):
39 """ 39 """
40 Constructor 40 Constructor
41 41
42 @param project reference to the project object 42 @param project reference to the project object
43 @param parent parent widget of this dialog (QWidget) 43 @param parent parent widget of this dialog (QWidget)
72 elif button == self.buttonBox.button(QDialogButtonBox.Open): 72 elif button == self.buttonBox.button(QDialogButtonBox.Open):
73 self.__openFile() 73 self.__openFile()
74 74
75 def __openFile(self): 75 def __openFile(self):
76 """ 76 """
77 Private slot to open a file. 77 Private slot to open a file.
78 78
79 It emits the signal 79 It emits the signal
80 sourceFile or designerFile depending on the file extension. 80 sourceFile or designerFile depending on the file extension.
81 """ 81 """
82 itm = self.fileList.currentItem() 82 itm = self.fileList.currentItem()
176 176
177 177
178 @pyqtSlot() 178 @pyqtSlot()
179 def on_searchDirButton_clicked(self): 179 def on_searchDirButton_clicked(self):
180 """ 180 """
181 Private slot to handle the clicked signal of the search directory selection 181 Private slot to handle the clicked signal of the search directory selection
182 button. 182 button.
183 """ 183 """
184 searchDir = E5FileDialog.getExistingDirectory( 184 searchDir = E5FileDialog.getExistingDirectory(
185 None, 185 None,
186 self.trUtf8("Select search directory"), 186 self.trUtf8("Select search directory"),
215 """ 215 """
216 self.__searchFile() 216 self.__searchFile()
217 217
218 def on_fileList_itemActivated(self, itm, column): 218 def on_fileList_itemActivated(self, itm, column):
219 """ 219 """
220 Private slot to handle the double click on a file item. 220 Private slot to handle the double click on a file item.
221 221
222 It emits the signal 222 It emits the signal
223 sourceFile or designerFile depending on the file extension. 223 sourceFile or designerFile depending on the file extension.
224 224
225 @param itm the double clicked listview item (QTreeWidgetItem) 225 @param itm the double clicked listview item (QTreeWidgetItem)

eric ide

mercurial