Plugins/VcsPlugins/vcsMercurial/PurgeExtension/ProjectHelper.py

changeset 1087
fb8cd56819a9
parent 1074
ed2585464f12
child 1106
3e57cd52e0f6
equal deleted inserted replaced
1086:b48ce064b224 1087:fb8cd56819a9
5 5
6 """ 6 """
7 Module implementing the purge extension project helper. 7 Module implementing the purge extension project helper.
8 """ 8 """
9 9
10 from PyQt4.QtCore import QObject
11 from PyQt4.QtGui import QMenu 10 from PyQt4.QtGui import QMenu
12 11
13 from E5Gui.E5Action import E5Action 12 from E5Gui.E5Action import E5Action
14 13
14 from ..HgExtensionProjectHelper import HgExtensionProjectHelper
15
15 import UI.PixmapCache 16 import UI.PixmapCache
16 17
17 18
18 class PurgeProjectHelper(QObject): 19 class PurgeProjectHelper(HgExtensionProjectHelper):
19 """ 20 """
20 Class implementing the purge extension project helper. 21 Class implementing the purge extension project helper.
21 """ 22 """
22 def __init__(self): 23 def __init__(self):
23 """ 24 """
24 Constructor 25 Constructor
25 """ 26 """
26 QObject.__init__(self) 27 super().__init__()
27
28 self.actions = []
29
30 self.initActions()
31
32 def setObjects(self, vcsObject, projectObject):
33 """
34 Public method to set references to the vcs and project objects.
35
36 @param vcsObject reference to the vcs object
37 @param projectObject reference to the project object
38 """
39 self.vcs = vcsObject
40 self.project = projectObject
41
42 def getActions(self):
43 """
44 Public method to get a list of all actions.
45
46 @return list of all actions (list of E5Action)
47 """
48 return self.actions[:]
49 28
50 def initActions(self): 29 def initActions(self):
51 """ 30 """
52 Public method to generate the action objects. 31 Public method to generate the action objects.
53 """ 32 """
136 return menu 115 return menu
137 116
138 def menuTitle(self): 117 def menuTitle(self):
139 """ 118 """
140 Public method to get the menu title. 119 Public method to get the menu title.
120
121 @return title of the menu (string)
141 """ 122 """
142 return self.trUtf8("Purge") 123 return self.trUtf8("Purge")
143 124
144 def __hgPurge(self): 125 def __hgPurge(self):
145 """ 126 """

eric ide

mercurial