Plugins/VcsPlugins/vcsMercurial/FetchExtension/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 fetch extension project helper. 7 Module implementing the fetch 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 from E5Gui import E5MessageBox 13 from E5Gui import E5MessageBox
15 14
15 from ..HgExtensionProjectHelper import HgExtensionProjectHelper
16
16 import UI.PixmapCache 17 import UI.PixmapCache
17 18
18 19
19 class FetchProjectHelper(QObject): 20 class FetchProjectHelper(HgExtensionProjectHelper):
20 """ 21 """
21 Class implementing the fetch extension project helper. 22 Class implementing the fetch extension project helper.
22 """ 23 """
23 def __init__(self): 24 def __init__(self):
24 """ 25 """
25 Constructor 26 Constructor
26 """ 27 """
27 QObject.__init__(self) 28 super().__init__()
28
29 self.actions = []
30
31 self.initActions()
32
33 def setObjects(self, vcsObject, projectObject):
34 """
35 Public method to set references to the vcs and project objects.
36
37 @param vcsObject reference to the vcs object
38 @param projectObject reference to the project object
39 """
40 self.vcs = vcsObject
41 self.project = projectObject
42
43 def getActions(self):
44 """
45 Public method to get a list of all actions.
46
47 @return list of all actions (list of E5Action)
48 """
49 return self.actions[:]
50 29
51 def initActions(self): 30 def initActions(self):
52 """ 31 """
53 Public method to generate the action objects. 32 Public method to generate the action objects.
54 """ 33 """
85 return menu 64 return menu
86 65
87 def menuTitle(self): 66 def menuTitle(self):
88 """ 67 """
89 Public method to get the menu title. 68 Public method to get the menu title.
69
70 @return title of the menu (string)
90 """ 71 """
91 return self.trUtf8("Fetch") 72 return self.trUtf8("Fetch")
92 73
93 def __hgFetch(self): 74 def __hgFetch(self):
94 """ 75 """

eric ide

mercurial