27 def __init__(self, vcsObject, projectObject, parent=None, name=None): |
27 def __init__(self, vcsObject, projectObject, parent=None, name=None): |
28 """ |
28 """ |
29 Constructor |
29 Constructor |
30 |
30 |
31 @param vcsObject reference to the vcs object |
31 @param vcsObject reference to the vcs object |
|
32 @type Git |
32 @param projectObject reference to the project object |
33 @param projectObject reference to the project object |
33 @param parent parent widget (QWidget) |
34 @type Project |
34 @param name name of this object (string) |
35 @param parent parent widget |
|
36 @type QWidget |
|
37 @param name name of this object |
|
38 @type str |
35 """ |
39 """ |
36 VcsProjectHelper.__init__(self, vcsObject, projectObject, parent, name) |
40 VcsProjectHelper.__init__(self, vcsObject, projectObject, parent, name) |
37 |
41 |
38 def setObjects(self, vcsObject, projectObject): |
42 def setObjects(self, vcsObject, projectObject): |
39 """ |
43 """ |
40 Public method to set references to the vcs and project objects. |
44 Public method to set references to the vcs and project objects. |
41 |
45 |
42 @param vcsObject reference to the vcs object |
46 @param vcsObject reference to the vcs object |
|
47 @type Git |
43 @param projectObject reference to the project object |
48 @param projectObject reference to the project object |
|
49 @type Project |
44 """ |
50 """ |
45 self.vcs = vcsObject |
51 self.vcs = vcsObject |
46 self.project = projectObject |
52 self.project = projectObject |
47 |
53 |
48 def getProject(self): |
54 def getProject(self): |
49 """ |
55 """ |
50 Public method to get a reference to the project object. |
56 Public method to get a reference to the project object. |
51 |
57 |
52 @return reference to the project object (Project) |
58 @return reference to the project object |
|
59 @rtype Project |
53 """ |
60 """ |
54 return self.project |
61 return self.project |
55 |
62 |
56 def getActions(self): |
63 def getActions(self): |
57 """ |
64 """ |
58 Public method to get a list of all actions. |
65 Public method to get a list of all actions. |
59 |
66 |
60 @return list of all actions (list of EricAction) |
67 @return list of all actions |
|
68 @rtype list of EricAction |
61 """ |
69 """ |
62 actions = self.actions[:] |
70 actions = self.actions[:] |
63 return actions |
71 return actions |
64 |
72 |
65 def initActions(self): |
73 def initActions(self): |
1947 |
1956 |
1948 def initToolbar(self, ui, toolbarManager): |
1957 def initToolbar(self, ui, toolbarManager): |
1949 """ |
1958 """ |
1950 Public slot to initialize the VCS toolbar. |
1959 Public slot to initialize the VCS toolbar. |
1951 |
1960 |
1952 @param ui reference to the main window (UserInterface) |
1961 @param ui reference to the main window |
|
1962 @type UserInterface |
1953 @param toolbarManager reference to a toolbar manager object |
1963 @param toolbarManager reference to a toolbar manager object |
1954 (EricToolBarManager) |
1964 @type EricToolBarManager |
1955 """ |
1965 """ |
1956 self.__toolbar = QToolBar(self.tr("Git"), ui) |
1966 self.__toolbar = QToolBar(self.tr("Git"), ui) |
1957 self.__toolbar.setObjectName("GitToolbar") |
1967 self.__toolbar.setObjectName("GitToolbar") |
1958 self.__toolbar.setToolTip(self.tr("Git")) |
1968 self.__toolbar.setToolTip(self.tr("Git")) |
1959 |
1969 |
1991 |
2001 |
1992 def removeToolbar(self, ui, toolbarManager): |
2002 def removeToolbar(self, ui, toolbarManager): |
1993 """ |
2003 """ |
1994 Public method to remove a toolbar created by initToolbar(). |
2004 Public method to remove a toolbar created by initToolbar(). |
1995 |
2005 |
1996 @param ui reference to the main window (UserInterface) |
2006 @param ui reference to the main window |
|
2007 @type UserInterface |
1997 @param toolbarManager reference to a toolbar manager object |
2008 @param toolbarManager reference to a toolbar manager object |
1998 (EricToolBarManager) |
2009 @type EricToolBarManager |
1999 """ |
2010 """ |
2000 ui.removeToolBar(self.__toolbar) |
2011 ui.removeToolBar(self.__toolbar) |
2001 ui.unregisterToolbar("git") |
2012 ui.unregisterToolbar("git") |
2002 |
2013 |
2003 title = self.__toolbar.windowTitle() |
2014 title = self.__toolbar.windowTitle() |