Plugins/VcsPlugins/vcsMercurial/QueuesExtension/ProjectHelper.py

changeset 1087
fb8cd56819a9
parent 1074
ed2585464f12
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1086:b48ce064b224 1087:fb8cd56819a9
5 5
6 """ 6 """
7 Module implementing the queues extension project helper. 7 Module implementing the queues 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 from .queues import Queues 17 from .queues import Queues
17 18
18 19
19 class QueuesProjectHelper(QObject): 20 class QueuesProjectHelper(HgExtensionProjectHelper):
20 """ 21 """
21 Class implementing the queues extension project helper. 22 Class implementing the queues 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 """
669 return menu 648 return menu
670 649
671 def menuTitle(self): 650 def menuTitle(self):
672 """ 651 """
673 Public method to get the menu title. 652 Public method to get the menu title.
653
654 @return title of the menu (string)
674 """ 655 """
675 return self.trUtf8("Queues") 656 return self.trUtf8("Queues")
676 657
677 def __hgQueueNewPatch(self): 658 def __hgQueueNewPatch(self):
678 """ 659 """

eric ide

mercurial