96 def __init__(self, project, parent=None): |
96 def __init__(self, project, parent=None): |
97 """ |
97 """ |
98 Constructor |
98 Constructor |
99 |
99 |
100 @param project reference to the project object |
100 @param project reference to the project object |
101 @param parent parent widget (QWidget) |
101 @type Project |
|
102 @param parent parent widget |
|
103 @type QWidget |
102 """ |
104 """ |
103 EricTabWidget.__init__(self, parent) |
105 EricTabWidget.__init__(self, parent) |
104 self.project = project |
106 self.project = project |
105 |
107 |
106 self.setWindowIcon(EricPixmapCache.getIcon("eric")) |
108 self.setWindowIcon(EricPixmapCache.getIcon("eric")) |
246 Public method to get the types of the various project browsers. |
248 Public method to get the types of the various project browsers. |
247 |
249 |
248 @return list of project browser types |
250 @return list of project browser types |
249 @rtype list of str |
251 @rtype list of str |
250 """ |
252 """ |
251 return list(self.__browserRepository.keys()) |
253 return list(self.__browserRepository) |
252 |
254 |
253 def getProjectBrowserUserStrings(self): |
255 def getProjectBrowserUserStrings(self): |
254 """ |
256 """ |
255 Public method to get a dictionary of defined project browser user strings. |
257 Public method to get a dictionary of defined project browser user strings. |
256 |
258 |
334 |
336 |
335 def __currentChanged(self, index): |
337 def __currentChanged(self, index): |
336 """ |
338 """ |
337 Private slot to handle the currentChanged(int) signal. |
339 Private slot to handle the currentChanged(int) signal. |
338 |
340 |
339 @param index index of the tab (integer) |
341 @param index index of the tab |
|
342 @type int |
340 """ |
343 """ |
341 if index > -1: |
344 if index > -1: |
342 browser = self.widget(index) |
345 browser = self.widget(index) |
343 if browser is not None: |
346 if browser is not None: |
344 browser.layoutDisplay() |
347 browser.layoutDisplay() |
376 Private slot to handle the projectPropertiesChanged signal. |
379 Private slot to handle the projectPropertiesChanged signal. |
377 """ |
380 """ |
378 browsersList = ( |
381 browsersList = ( |
379 Preferences.getProjectBrowsers(self.project.getProjectType()) |
382 Preferences.getProjectBrowsers(self.project.getProjectType()) |
380 if self.project.isOpen() |
383 if self.project.isOpen() |
381 else list(self.__browserRepository.keys()) |
384 else list(self.__browserRepository) |
382 ) |
385 ) |
383 browsersList = [b for b in browsersList if b in self.__browserRepository] |
386 browsersList = [b for b in browsersList if b in self.__browserRepository] |
384 |
387 |
385 if browsersList != self.__currentBrowsersList: |
388 if browsersList != self.__currentBrowsersList: |
386 self.__currentBrowsersList = browsersList[:] |
389 self.__currentBrowsersList = browsersList[:] |
420 |
423 |
421 def handleEditorLineChanged(self, fn, lineno): |
424 def handleEditorLineChanged(self, fn, lineno): |
422 """ |
425 """ |
423 Public slot to handle the editorLineChanged signal. |
426 Public slot to handle the editorLineChanged signal. |
424 |
427 |
425 @param fn filename of the changed file (string) |
428 @param fn filename of the changed file |
426 @param lineno one based line number of the item (integer) |
429 @type str |
|
430 @param lineno one based line number of the item |
|
431 @type int |
427 """ |
432 """ |
428 if ( |
433 if ( |
429 Preferences.getProject("FollowEditor") |
434 Preferences.getProject("FollowEditor") |
430 and Preferences.getProject("FollowCursorLine") |
435 and Preferences.getProject("FollowCursorLine") |
431 and self.project.isProjectCategory(fn, "SOURCES") |
436 and self.project.isProjectCategory(fn, "SOURCES") |
465 |
470 |
466 def __vcsStatusIndicatorClicked(self, pos): # noqa: U100 |
471 def __vcsStatusIndicatorClicked(self, pos): # noqa: U100 |
467 """ |
472 """ |
468 Private slot to react upon clicks on the VCS indicator LED. |
473 Private slot to react upon clicks on the VCS indicator LED. |
469 |
474 |
470 @param pos position of the click (QPoint) |
475 @param pos position of the click |
|
476 @type QPoint |
471 """ |
477 """ |
472 vcs = self.project.getVcs() |
478 vcs = self.project.getVcs() |
473 if vcs: |
479 if vcs: |
474 if self.currentVcsStatus == " ": |
480 if self.currentVcsStatus == " ": |
475 # call log browser dialog |
481 # call log browser dialog |