UI/FindFileDialog.py

changeset 500
c3abc7895a01
parent 489
844a0a278269
child 501
5c615a85241a
equal deleted inserted replaced
499:622ab17a68d5 500:c3abc7895a01
31 @signal sourceFile(string, int, string, (int, int)) emitted to open a 31 @signal sourceFile(string, int, string, (int, int)) emitted to open a
32 source file at a line 32 source file at a line
33 @signal designerFile(string) emitted to open a Qt-Designer file 33 @signal designerFile(string) emitted to open a Qt-Designer file
34 """ 34 """
35 sourceFile = pyqtSignal(str, int, str, int, int) 35 sourceFile = pyqtSignal(str, int, str, int, int)
36 designerFile = pyqtSignal(str)
36 37
37 lineRole = Qt.UserRole + 1 38 lineRole = Qt.UserRole + 1
38 startRole = Qt.UserRole + 2 39 startRole = Qt.UserRole + 2
39 endRole = Qt.UserRole + 3 40 endRole = Qt.UserRole + 3
40 replaceRole = Qt.UserRole + 4 41 replaceRole = Qt.UserRole + 4
482 if self.project: 483 if self.project:
483 fn = os.path.join(self.project.ppath, file) 484 fn = os.path.join(self.project.ppath, file)
484 else: 485 else:
485 fn = file 486 fn = file
486 if fn.endswith('.ui'): 487 if fn.endswith('.ui'):
487 self.emit(SIGNAL('designerFile'), fn) 488 self.designerFile.emit(fn)
488 else: 489 else:
489 self.sourceFile.emit(fn, line, "", start, end) 490 self.sourceFile.emit(fn, line, "", start, end)
490 491
491 @pyqtSlot() 492 @pyqtSlot()
492 def on_dirSelectButton_clicked(self): 493 def on_dirSelectButton_clicked(self):

eric ide

mercurial