7 Module implementing the closehead extension project helper. |
7 Module implementing the closehead extension project helper. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtWidgets import QMenu |
10 from PyQt6.QtWidgets import QMenu |
11 |
11 |
12 from EricGui.EricAction import EricAction |
12 from eric7.EricGui.EricAction import EricAction |
13 |
13 |
14 from ..HgExtensionProjectHelper import HgExtensionProjectHelper |
14 from ..HgExtensionProjectHelper import HgExtensionProjectHelper |
15 |
15 |
16 import UI.PixmapCache |
16 from eric7.EricGui import EricPixmapCache |
17 |
17 |
18 |
18 |
19 class CloseheadProjectHelper(HgExtensionProjectHelper): |
19 class CloseheadProjectHelper(HgExtensionProjectHelper): |
20 """ |
20 """ |
21 Class implementing the closehead extension project helper. |
21 Class implementing the closehead extension project helper. |
31 """ |
31 """ |
32 Public method to generate the action objects. |
32 Public method to generate the action objects. |
33 """ |
33 """ |
34 self.hgCloseheadAct = EricAction( |
34 self.hgCloseheadAct = EricAction( |
35 self.tr("Close Heads"), |
35 self.tr("Close Heads"), |
36 UI.PixmapCache.getIcon("closehead"), |
36 EricPixmapCache.getIcon("closehead"), |
37 self.tr("Close Heads"), |
37 self.tr("Close Heads"), |
38 0, |
38 0, |
39 0, |
39 0, |
40 self, |
40 self, |
41 "mercurial_closehead", |
41 "mercurial_closehead", |
60 @param mainMenu reference to the main menu |
60 @param mainMenu reference to the main menu |
61 @type QMenu |
61 @type QMenu |
62 @return populated menu (QMenu) |
62 @return populated menu (QMenu) |
63 """ |
63 """ |
64 menu = QMenu(self.menuTitle(), mainMenu) |
64 menu = QMenu(self.menuTitle(), mainMenu) |
65 menu.setIcon(UI.PixmapCache.getIcon("closehead")) |
65 menu.setIcon(EricPixmapCache.getIcon("closehead")) |
66 menu.setTearOffEnabled(True) |
66 menu.setTearOffEnabled(True) |
67 |
67 |
68 menu.addAction(self.hgCloseheadAct) |
68 menu.addAction(self.hgCloseheadAct) |
69 |
69 |
70 return menu |
70 return menu |