9 |
9 |
10 from PyQt6.QtCore import Qt |
10 from PyQt6.QtCore import Qt |
11 from PyQt6.QtGui import QColor |
11 from PyQt6.QtGui import QColor |
12 from PyQt6.QtWidgets import QApplication |
12 from PyQt6.QtWidgets import QApplication |
13 |
13 |
14 from E5Gui.E5TabWidget import E5TabWidget |
14 from E5Gui.EricTabWidget import EricTabWidget |
15 from E5Gui.E5Led import E5ClickableLed |
15 from E5Gui.EricLed import EricClickableLed |
16 |
16 |
17 import UI.PixmapCache |
17 import UI.PixmapCache |
18 import Preferences |
18 import Preferences |
19 |
19 |
20 from .ProjectBrowserFlags import ( |
20 from .ProjectBrowserFlags import ( |
22 TranslationsBrowserFlag, InterfacesBrowserFlag, OthersBrowserFlag, |
22 TranslationsBrowserFlag, InterfacesBrowserFlag, OthersBrowserFlag, |
23 ProtocolsBrowserFlag, AllBrowsersFlag |
23 ProtocolsBrowserFlag, AllBrowsersFlag |
24 ) |
24 ) |
25 |
25 |
26 |
26 |
27 class ProjectBrowser(E5TabWidget): |
27 class ProjectBrowser(EricTabWidget): |
28 """ |
28 """ |
29 Class implementing the project browser part of the eric UI. |
29 Class implementing the project browser part of the eric UI. |
30 |
30 |
31 It generates a widget with up to seven tabs. The individual tabs contain |
31 It generates a widget with up to seven tabs. The individual tabs contain |
32 the project sources browser, the project forms browser, |
32 the project sources browser, the project forms browser, |
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 (QWidget) |
43 @param parent parent widget (QWidget) |
44 """ |
44 """ |
45 E5TabWidget.__init__(self, parent) |
45 EricTabWidget.__init__(self, parent) |
46 self.project = project |
46 self.project = project |
47 |
47 |
48 self.setWindowIcon(UI.PixmapCache.getIcon("eric")) |
48 self.setWindowIcon(UI.PixmapCache.getIcon("eric")) |
49 |
49 |
50 self.setUsesScrollButtons(True) |
50 self.setUsesScrollButtons(True) |
51 |
51 |
52 self.vcsStatusIndicator = E5ClickableLed(self) |
52 self.vcsStatusIndicator = EricClickableLed(self) |
53 self.setCornerWidget(self.vcsStatusIndicator, Qt.Corner.TopLeftCorner) |
53 self.setCornerWidget(self.vcsStatusIndicator, Qt.Corner.TopLeftCorner) |
54 self.vcsStatusIndicator.clicked.connect( |
54 self.vcsStatusIndicator.clicked.connect( |
55 self.__vcsStatusIndicatorClicked) |
55 self.__vcsStatusIndicatorClicked) |
56 self.vcsStatusColorNames = { |
56 self.vcsStatusColorNames = { |
57 "A": "VcsAdded", |
57 "A": "VcsAdded", |