UI/FindFileDialog.py

changeset 476
121633976eca
parent 458
1695e7a2db54
child 489
844a0a278269
equal deleted inserted replaced
475:94b3fdd34c60 476:121633976eca
30 30
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)
36
35 lineRole = Qt.UserRole + 1 37 lineRole = Qt.UserRole + 1
36 startRole = Qt.UserRole + 2 38 startRole = Qt.UserRole + 2
37 endRole = Qt.UserRole + 3 39 endRole = Qt.UserRole + 3
38 replaceRole = Qt.UserRole + 4 40 replaceRole = Qt.UserRole + 4
39 41
419 line = "- {0}\n+ {1}".format(line, rline) 421 line = "- {0}\n+ {1}".format(line, rline)
420 self.__createItem(file, count, line, start, end, rline) 422 self.__createItem(file, count, line, start, end, rline)
421 423
422 if self.feelLikeCheckBox.isChecked(): 424 if self.feelLikeCheckBox.isChecked():
423 fn = os.path.join(self.project.ppath, file) 425 fn = os.path.join(self.project.ppath, file)
424 self.emit(SIGNAL('sourceFile'), fn, count, "", (start, end)) 426 self.sourceFile.emit(fn, count, "", start, end)
425 QApplication.processEvents() 427 QApplication.processEvents()
426 breakSearch = True 428 breakSearch = True
427 break 429 break
428 430
429 QApplication.processEvents() 431 QApplication.processEvents()
479 else: 481 else:
480 fn = file 482 fn = file
481 if fn.endswith('.ui'): 483 if fn.endswith('.ui'):
482 self.emit(SIGNAL('designerFile'), fn) 484 self.emit(SIGNAL('designerFile'), fn)
483 else: 485 else:
484 self.emit(SIGNAL('sourceFile'), fn, line, "", (start, end)) 486 self.sourceFile.emit(fn, line, "", start, end)
485 487
486 @pyqtSlot() 488 @pyqtSlot()
487 def on_dirSelectButton_clicked(self): 489 def on_dirSelectButton_clicked(self):
488 """ 490 """
489 Private slot to display a directory selection dialog. 491 Private slot to display a directory selection dialog.

eric ide

mercurial