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 Hg |
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 from .CloseheadExtension.ProjectHelper import CloseheadProjectHelper |
40 from .CloseheadExtension.ProjectHelper import CloseheadProjectHelper |
37 from .GpgExtension.ProjectHelper import GpgProjectHelper |
41 from .GpgExtension.ProjectHelper import GpgProjectHelper |
38 from .HisteditExtension.ProjectHelper import HisteditProjectHelper |
42 from .HisteditExtension.ProjectHelper import HisteditProjectHelper |
39 from .LargefilesExtension.ProjectHelper import LargefilesProjectHelper |
43 from .LargefilesExtension.ProjectHelper import LargefilesProjectHelper |
69 def setObjects(self, vcsObject, projectObject): |
73 def setObjects(self, vcsObject, projectObject): |
70 """ |
74 """ |
71 Public method to set references to the vcs and project objects. |
75 Public method to set references to the vcs and project objects. |
72 |
76 |
73 @param vcsObject reference to the vcs object |
77 @param vcsObject reference to the vcs object |
|
78 @type Hg |
74 @param projectObject reference to the project object |
79 @param projectObject reference to the project object |
|
80 @type Project |
75 """ |
81 """ |
76 self.vcs = vcsObject |
82 self.vcs = vcsObject |
77 self.project = projectObject |
83 self.project = projectObject |
78 |
84 |
79 for extension in self.__extensions.values(): |
85 for extension in self.__extensions.values(): |
93 |
99 |
94 def getProject(self): |
100 def getProject(self): |
95 """ |
101 """ |
96 Public method to get a reference to the project object. |
102 Public method to get a reference to the project object. |
97 |
103 |
98 @return reference to the project object (Project) |
104 @return reference to the project object |
|
105 @rtype Project |
99 """ |
106 """ |
100 return self.project |
107 return self.project |
101 |
108 |
102 def getActions(self): |
109 def getActions(self): |
103 """ |
110 """ |
104 Public method to get a list of all actions. |
111 Public method to get a list of all actions. |
105 |
112 |
106 @return list of all actions (list of EricAction) |
113 @return list of all actions |
|
114 @rtype list of EricAction |
107 """ |
115 """ |
108 actions = self.actions[:] |
116 actions = self.actions[:] |
109 for extension in self.__extensions.values(): |
117 for extension in self.__extensions.values(): |
110 actions.extend(extension.getActions()) |
118 actions.extend(extension.getActions()) |
111 return actions |
119 return actions |
1880 |
1889 |
1881 def initToolbar(self, ui, toolbarManager): |
1890 def initToolbar(self, ui, toolbarManager): |
1882 """ |
1891 """ |
1883 Public slot to initialize the VCS toolbar. |
1892 Public slot to initialize the VCS toolbar. |
1884 |
1893 |
1885 @param ui reference to the main window (UserInterface) |
1894 @param ui reference to the main window |
|
1895 @type UserInterface |
1886 @param toolbarManager reference to a toolbar manager object |
1896 @param toolbarManager reference to a toolbar manager object |
1887 (EricToolBarManager) |
1897 @type EricToolBarManager |
1888 """ |
1898 """ |
1889 self.__toolbarManager = toolbarManager |
1899 self.__toolbarManager = toolbarManager |
1890 |
1900 |
1891 self.__toolbar = QToolBar(self.tr("Mercurial"), ui) |
1901 self.__toolbar = QToolBar(self.tr("Mercurial"), ui) |
1892 self.__toolbar.setObjectName("MercurialToolbar") |
1902 self.__toolbar.setObjectName("MercurialToolbar") |
1951 |
1961 |
1952 def removeToolbar(self, ui, toolbarManager): |
1962 def removeToolbar(self, ui, toolbarManager): |
1953 """ |
1963 """ |
1954 Public method to remove a toolbar created by initToolbar(). |
1964 Public method to remove a toolbar created by initToolbar(). |
1955 |
1965 |
1956 @param ui reference to the main window (UserInterface) |
1966 @param ui reference to the main window |
|
1967 @type UserInterface |
1957 @param toolbarManager reference to a toolbar manager object |
1968 @param toolbarManager reference to a toolbar manager object |
1958 (EricToolBarManager) |
1969 @type EricToolBarManager |
1959 """ |
1970 """ |
1960 ui.removeToolBar(self.__toolbar) |
1971 ui.removeToolBar(self.__toolbar) |
1961 ui.unregisterToolbar("mercurial") |
1972 ui.unregisterToolbar("mercurial") |
1962 |
1973 |
1963 title = self.__toolbar.windowTitle() |
1974 title = self.__toolbar.windowTitle() |