Project/ProjectResourcesBrowser.py

changeset 476
121633976eca
parent 470
99d8c50ba42f
child 500
c3abc7895a01
equal deleted inserted replaced
475:94b3fdd34c60 476:121633976eca
34 @signal closeSourceWindow(string) emitted after a file has been removed/deleted 34 @signal closeSourceWindow(string) emitted after a file has been removed/deleted
35 from the project 35 from the project
36 @signal showMenu(string, QMenu) emitted when a menu is about to be shown. The name 36 @signal showMenu(string, QMenu) emitted when a menu is about to be shown. The name
37 of the menu and a reference to the menu are given. 37 of the menu and a reference to the menu are given.
38 """ 38 """
39 sourceFile = pyqtSignal(str)
40
39 RCFilenameFormatPython = "{0}_rc.py" 41 RCFilenameFormatPython = "{0}_rc.py"
40 RCFilenameFormatRuby = "{0}_rc.rb" 42 RCFilenameFormatRuby = "{0}_rc.rb"
41 43
42 def __init__(self, project, parent = None): 44 def __init__(self, project, parent = None):
43 """ 45 """
360 Private slot to handle the Open menu action. 362 Private slot to handle the Open menu action.
361 """ 363 """
362 itmList = self.getSelectedItems() 364 itmList = self.getSelectedItems()
363 for itm in itmList[:]: 365 for itm in itmList[:]:
364 if isinstance(itm, ProjectBrowserFileItem): 366 if isinstance(itm, ProjectBrowserFileItem):
365 self.emit(SIGNAL('sourceFile'), itm.fileName()) 367 self.sourceFile.emit(itm.fileName())
366 368
367 def __newResource(self): 369 def __newResource(self):
368 """ 370 """
369 Private slot to handle the New Resource menu action. 371 Private slot to handle the New Resource menu action.
370 """ 372 """
429 " be created.<br>Problem: {1}</p>")\ 431 " be created.<br>Problem: {1}</p>")\
430 .format(fname, str(e))) 432 .format(fname, str(e)))
431 return 433 return
432 434
433 self.project.appendFile(fname) 435 self.project.appendFile(fname)
434 self.emit(SIGNAL('sourceFile'), fname) 436 self.sourceFile.emit(fname)
435 437
436 def __deleteFile(self): 438 def __deleteFile(self):
437 """ 439 """
438 Private method to delete a resource file from the project. 440 Private method to delete a resource file from the project.
439 """ 441 """

eric ide

mercurial