38 ): |
38 ): |
39 """ |
39 """ |
40 Constructor |
40 Constructor |
41 |
41 |
42 @param vcsObject reference to the vcs object |
42 @param vcsObject reference to the vcs object |
|
43 @type VersionControl |
43 @param browserObject reference to the project browser object |
44 @param browserObject reference to the project browser object |
|
45 @type ProjectBaseBrowser |
44 @param projectObject reference to the project object |
46 @param projectObject reference to the project object |
|
47 @type Project |
45 @param isTranslationsBrowser flag indicating, the helper is requested |
48 @param isTranslationsBrowser flag indicating, the helper is requested |
46 for the translations browser (this needs some special treatment) |
49 for the translations browser (this needs some special treatment) |
47 @param parent parent widget (QWidget) |
50 @type bool |
48 @param name name of this object (string) |
51 @param parent parent widget |
|
52 @type QWidget |
|
53 @param name name of this object |
|
54 @type str |
49 """ |
55 """ |
50 super().__init__(parent) |
56 super().__init__(parent) |
51 if name: |
57 if name: |
52 self.setObjectName(name) |
58 self.setObjectName(name) |
53 |
59 |
59 def addVCSMenus(self, mainMenu, multiMenu, backMenu, dirMenu, dirMultiMenu): |
65 def addVCSMenus(self, mainMenu, multiMenu, backMenu, dirMenu, dirMultiMenu): |
60 """ |
66 """ |
61 Public method to add the VCS entries to the various project browser |
67 Public method to add the VCS entries to the various project browser |
62 menus. |
68 menus. |
63 |
69 |
64 @param mainMenu reference to the main menu (QPopupMenu) |
70 @param mainMenu reference to the main menu |
65 @param multiMenu reference to the multiple selection menu (QPopupMenu) |
71 @type QMenu |
66 @param backMenu reference to the background menu (QPopupMenu) |
72 @param multiMenu reference to the multiple selection menu |
67 @param dirMenu reference to the directory menu (QPopupMenu) |
73 @type QMenu |
68 @param dirMultiMenu reference to the multiple selection directory |
74 @param backMenu reference to the background menu |
69 menu (QPopupMenu) |
75 @type QMenu |
|
76 @param dirMenu reference to the directory menu |
|
77 @type QMenu |
|
78 @param dirMultiMenu reference to the multiple selection directory menu |
|
79 @type QMenu |
70 """ |
80 """ |
71 self._addVCSMenu(mainMenu) |
81 self._addVCSMenu(mainMenu) |
72 self._addVCSMenuMulti(multiMenu) |
82 self._addVCSMenuMulti(multiMenu) |
73 self._addVCSMenuBack(backMenu) |
83 self._addVCSMenuBack(backMenu) |
74 self._addVCSMenuDir(dirMenu) |
84 self._addVCSMenuDir(dirMenu) |
80 |
90 |
81 It enables/disables the VCS menu entries depending on the overall |
91 It enables/disables the VCS menu entries depending on the overall |
82 VCS status and the file status. |
92 VCS status and the file status. |
83 |
93 |
84 @param menu reference to the menu to be shown |
94 @param menu reference to the menu to be shown |
|
95 @type QMenu |
85 @param standardItems array of standard items that need |
96 @param standardItems array of standard items that need |
86 activation/deactivation depending on the overall VCS status |
97 activation/deactivation depending on the overall VCS status |
|
98 @type list of BrowserItem |
87 @exception NotImplementedError to indicate that this method must be |
99 @exception NotImplementedError to indicate that this method must be |
88 implemented by a subclass |
100 implemented by a subclass |
89 """ |
101 """ |
90 raise NotImplementedError("Not implemented") |
102 raise NotImplementedError("Not implemented") |
91 |
103 |
96 |
108 |
97 It enables/disables the VCS menu entries depending on the overall |
109 It enables/disables the VCS menu entries depending on the overall |
98 VCS status and the files status. |
110 VCS status and the files status. |
99 |
111 |
100 @param menu reference to the menu to be shown |
112 @param menu reference to the menu to be shown |
|
113 @type QMenu |
101 @param standardItems array of standard items that need |
114 @param standardItems array of standard items that need |
102 activation/deactivation depending on the overall VCS status |
115 activation/deactivation depending on the overall VCS status |
|
116 @type list of BrowserItem |
103 @exception NotImplementedError to indicate that this method must be |
117 @exception NotImplementedError to indicate that this method must be |
104 implemented by a subclass |
118 implemented by a subclass |
105 """ |
119 """ |
106 raise NotImplementedError("Not implemented") |
120 raise NotImplementedError("Not implemented") |
107 |
121 |
111 |
125 |
112 It enables/disables the VCS menu entries depending on the overall |
126 It enables/disables the VCS menu entries depending on the overall |
113 VCS status and the directory status. |
127 VCS status and the directory status. |
114 |
128 |
115 @param menu reference to the menu to be shown |
129 @param menu reference to the menu to be shown |
|
130 @type QMenu |
116 @param standardItems array of standard items that |
131 @param standardItems array of standard items that |
117 need activation/deactivation depending on the overall VCS status |
132 need activation/deactivation depending on the overall VCS status |
|
133 @type list of BrowserItem |
118 @exception NotImplementedError to indicate that this method must be |
134 @exception NotImplementedError to indicate that this method must be |
119 implemented by a subclass |
135 implemented by a subclass |
120 """ |
136 """ |
121 raise NotImplementedError("Not implemented") |
137 raise NotImplementedError("Not implemented") |
122 |
138 |
126 |
142 |
127 It enables/disables the VCS menu entries depending on the overall |
143 It enables/disables the VCS menu entries depending on the overall |
128 VCS status and the directory status. |
144 VCS status and the directory status. |
129 |
145 |
130 @param menu reference to the menu to be shown |
146 @param menu reference to the menu to be shown |
|
147 @type QMenu |
131 @param standardItems array of standard items that need |
148 @param standardItems array of standard items that need |
132 activation/deactivation depending on the overall VCS status |
149 activation/deactivation depending on the overall VCS status |
|
150 @type list of BrowserItem |
133 @exception NotImplementedError to indicate that this method must be |
151 @exception NotImplementedError to indicate that this method must be |
134 implemented by a subclass |
152 implemented by a subclass |
135 """ |
153 """ |
136 raise NotImplementedError("Not implemented") |
154 raise NotImplementedError("Not implemented") |
137 |
155 |
413 def _updateVCSStatus(self, name): |
431 def _updateVCSStatus(self, name): |
414 """ |
432 """ |
415 Protected method to update the VCS status of an item. |
433 Protected method to update the VCS status of an item. |
416 |
434 |
417 @param name filename or directoryname of the item to be updated |
435 @param name filename or directoryname of the item to be updated |
418 (string) |
436 @type str |
419 """ |
437 """ |
420 self.project.getModel().updateVCSStatus(name) |
438 self.project.getModel().updateVCSStatus(name) |