Plugins/VcsPlugins/vcsMercurial/GpgExtension/ProjectHelper.py

changeset 1087
fb8cd56819a9
parent 1075
75bfe8bd4243
child 1106
3e57cd52e0f6
equal deleted inserted replaced
1086:b48ce064b224 1087:fb8cd56819a9
5 5
6 """ 6 """
7 Module implementing the gpg extension project helper. 7 Module implementing the gpg 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 GpgProjectHelper(QObject): 19 class GpgProjectHelper(HgExtensionProjectHelper):
19 """ 20 """
20 Class implementing the gpg extension project helper. 21 Class implementing the gpg 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 """
111 return menu 90 return menu
112 91
113 def menuTitle(self): 92 def menuTitle(self):
114 """ 93 """
115 Public method to get the menu title. 94 Public method to get the menu title.
95
96 @return title of the menu (string)
116 """ 97 """
117 return self.trUtf8("GPG") 98 return self.trUtf8("GPG")
118 99
119 def __hgGpgSignatures(self): 100 def __hgGpgSignatures(self):
120 """ 101 """

eric ide

mercurial