|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Plugins.VcsPlugins.vcsMercurial.HisteditExtension.HgHisteditPlanEditor</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Plugins.VcsPlugins.vcsMercurial.HisteditExtension.HgHisteditPlanEditor</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a dialog to edit the history modification plan. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#HgHisteditPlanActionComboBox">HgHisteditPlanActionComboBox</a></td> |
|
25 <td>Class implementing a combo box to select the action in the plan tree.</td> |
|
26 </tr> |
|
27 <tr> |
|
28 <td><a href="#HgHisteditPlanEditor">HgHisteditPlanEditor</a></td> |
|
29 <td>Class implementing a dialog to edit the history modification plan.</td> |
|
30 </tr> |
|
31 </table> |
|
32 <h3>Functions</h3> |
|
33 |
|
34 <table> |
|
35 <tr><td>None</td></tr> |
|
36 </table> |
|
37 <hr /> |
|
38 <hr /> |
|
39 <a NAME="HgHisteditPlanActionComboBox" ID="HgHisteditPlanActionComboBox"></a> |
|
40 <h2>HgHisteditPlanActionComboBox</h2> |
|
41 |
|
42 <p> |
|
43 Class implementing a combo box to select the action in the plan tree. |
|
44 </p> |
|
45 <h3>Derived from</h3> |
|
46 QComboBox |
|
47 <h3>Class Attributes</h3> |
|
48 |
|
49 <table> |
|
50 <tr><td>None</td></tr> |
|
51 </table> |
|
52 <h3>Class Methods</h3> |
|
53 |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Methods</h3> |
|
58 |
|
59 <table> |
|
60 |
|
61 <tr> |
|
62 <td><a href="#HgHisteditPlanActionComboBox.__init__">HgHisteditPlanActionComboBox</a></td> |
|
63 <td>Constructor</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#HgHisteditPlanActionComboBox.__changeItem">__changeItem</a></td> |
|
67 <td>Private slot to handle the selection of a plan action.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#HgHisteditPlanActionComboBox.showPopup">showPopup</a></td> |
|
71 <td>Public method to show the list of items of the combo box.</td> |
|
72 </tr> |
|
73 </table> |
|
74 <h3>Static Methods</h3> |
|
75 |
|
76 <table> |
|
77 <tr><td>None</td></tr> |
|
78 </table> |
|
79 |
|
80 <a NAME="HgHisteditPlanActionComboBox.__init__" ID="HgHisteditPlanActionComboBox.__init__"></a> |
|
81 <h4>HgHisteditPlanActionComboBox (Constructor)</h4> |
|
82 <b>HgHisteditPlanActionComboBox</b>(<i>item, column</i>) |
|
83 |
|
84 <p> |
|
85 Constructor |
|
86 </p> |
|
87 <dl> |
|
88 |
|
89 <dt><i>item</i> (QTreeWidgetItem)</dt> |
|
90 <dd> |
|
91 reference to the item |
|
92 </dd> |
|
93 <dt><i>column</i> (int)</dt> |
|
94 <dd> |
|
95 column number inside the tree widget item |
|
96 </dd> |
|
97 </dl> |
|
98 <a NAME="HgHisteditPlanActionComboBox.__changeItem" ID="HgHisteditPlanActionComboBox.__changeItem"></a> |
|
99 <h4>HgHisteditPlanActionComboBox.__changeItem</h4> |
|
100 <b>__changeItem</b>(<i>index</i>) |
|
101 |
|
102 <p> |
|
103 Private slot to handle the selection of a plan action. |
|
104 </p> |
|
105 <p> |
|
106 This method sets the text of the associated item for the specified |
|
107 cell in order to be able to retrieve it with a call of the text() |
|
108 method of the item. |
|
109 </p> |
|
110 <dl> |
|
111 |
|
112 <dt><i>index</i> (int)</dt> |
|
113 <dd> |
|
114 index of the selected action |
|
115 </dd> |
|
116 </dl> |
|
117 <a NAME="HgHisteditPlanActionComboBox.showPopup" ID="HgHisteditPlanActionComboBox.showPopup"></a> |
|
118 <h4>HgHisteditPlanActionComboBox.showPopup</h4> |
|
119 <b>showPopup</b>(<i></i>) |
|
120 |
|
121 <p> |
|
122 Public method to show the list of items of the combo box. |
|
123 </p> |
|
124 <p> |
|
125 This is reimplemented in order to set the associated item as the |
|
126 current item of the tree widget. |
|
127 </p> |
|
128 <div align="right"><a href="#top">Up</a></div> |
|
129 <hr /> |
|
130 <hr /> |
|
131 <a NAME="HgHisteditPlanEditor" ID="HgHisteditPlanEditor"></a> |
|
132 <h2>HgHisteditPlanEditor</h2> |
|
133 |
|
134 <p> |
|
135 Class implementing a dialog to edit the history modification plan. |
|
136 </p> |
|
137 <h3>Derived from</h3> |
|
138 QDialog, Ui_HgHisteditPlanEditor |
|
139 <h3>Class Attributes</h3> |
|
140 |
|
141 <table> |
|
142 <tr><td>None</td></tr> |
|
143 </table> |
|
144 <h3>Class Methods</h3> |
|
145 |
|
146 <table> |
|
147 <tr><td>None</td></tr> |
|
148 </table> |
|
149 <h3>Methods</h3> |
|
150 |
|
151 <table> |
|
152 |
|
153 <tr> |
|
154 <td><a href="#HgHisteditPlanEditor.__init__">HgHisteditPlanEditor</a></td> |
|
155 <td>Constructor</td> |
|
156 </tr> |
|
157 <tr> |
|
158 <td><a href="#HgHisteditPlanEditor.__addActionCombo">__addActionCombo</a></td> |
|
159 <td>Private method to add an edit action combo to an item.</td> |
|
160 </tr> |
|
161 <tr> |
|
162 <td><a href="#HgHisteditPlanEditor.__assembleEditPlan">__assembleEditPlan</a></td> |
|
163 <td>Private method to assemble the edit plan into text suitable for the histedit file.</td> |
|
164 </tr> |
|
165 <tr> |
|
166 <td><a href="#HgHisteditPlanEditor.__createPlanItem">__createPlanItem</a></td> |
|
167 <td>Private method to create an edit plan tree item.</td> |
|
168 </tr> |
|
169 <tr> |
|
170 <td><a href="#HgHisteditPlanEditor.__readFile">__readFile</a></td> |
|
171 <td>Private method to read the file containing the edit plan and populate the dialog.</td> |
|
172 </tr> |
|
173 <tr> |
|
174 <td><a href="#HgHisteditPlanEditor.__resizeSections">__resizeSections</a></td> |
|
175 <td>Private method to resize the tree widget sections.</td> |
|
176 </tr> |
|
177 <tr> |
|
178 <td><a href="#HgHisteditPlanEditor.__updateButtons">__updateButtons</a></td> |
|
179 <td>Private method to set the enabled state of the up and down buttons.</td> |
|
180 </tr> |
|
181 <tr> |
|
182 <td><a href="#HgHisteditPlanEditor.on_buttonBox_accepted">on_buttonBox_accepted</a></td> |
|
183 <td>Private slot called by the buttonBox accepted signal.</td> |
|
184 </tr> |
|
185 <tr> |
|
186 <td><a href="#HgHisteditPlanEditor.on_buttonBox_rejected">on_buttonBox_rejected</a></td> |
|
187 <td>Private slot called by the buttonBox rejected signal.</td> |
|
188 </tr> |
|
189 <tr> |
|
190 <td><a href="#HgHisteditPlanEditor.on_downButton_clicked">on_downButton_clicked</a></td> |
|
191 <td>Private slot to move the current entry down one line.</td> |
|
192 </tr> |
|
193 <tr> |
|
194 <td><a href="#HgHisteditPlanEditor.on_planTreeWidget_currentItemChanged">on_planTreeWidget_currentItemChanged</a></td> |
|
195 <td>Private slot handling the change of the current edit plan item.</td> |
|
196 </tr> |
|
197 <tr> |
|
198 <td><a href="#HgHisteditPlanEditor.on_upButton_clicked">on_upButton_clicked</a></td> |
|
199 <td>Private slot to move the current entry up one line.</td> |
|
200 </tr> |
|
201 </table> |
|
202 <h3>Static Methods</h3> |
|
203 |
|
204 <table> |
|
205 <tr><td>None</td></tr> |
|
206 </table> |
|
207 |
|
208 <a NAME="HgHisteditPlanEditor.__init__" ID="HgHisteditPlanEditor.__init__"></a> |
|
209 <h4>HgHisteditPlanEditor (Constructor)</h4> |
|
210 <b>HgHisteditPlanEditor</b>(<i>fileName, parent=None</i>) |
|
211 |
|
212 <p> |
|
213 Constructor |
|
214 </p> |
|
215 <dl> |
|
216 |
|
217 <dt><i>fileName</i> (str)</dt> |
|
218 <dd> |
|
219 name of the file containing the history edit plan |
|
220 to be edited |
|
221 </dd> |
|
222 <dt><i>parent</i> (QWidget)</dt> |
|
223 <dd> |
|
224 reference to the parent widget |
|
225 </dd> |
|
226 </dl> |
|
227 <a NAME="HgHisteditPlanEditor.__addActionCombo" ID="HgHisteditPlanEditor.__addActionCombo"></a> |
|
228 <h4>HgHisteditPlanEditor.__addActionCombo</h4> |
|
229 <b>__addActionCombo</b>(<i>item</i>) |
|
230 |
|
231 <p> |
|
232 Private method to add an edit action combo to an item. |
|
233 </p> |
|
234 <dl> |
|
235 |
|
236 <dt><i>item</i> (QTreeWidgetItem)</dt> |
|
237 <dd> |
|
238 reference to the tree widget item |
|
239 </dd> |
|
240 </dl> |
|
241 <a NAME="HgHisteditPlanEditor.__assembleEditPlan" ID="HgHisteditPlanEditor.__assembleEditPlan"></a> |
|
242 <h4>HgHisteditPlanEditor.__assembleEditPlan</h4> |
|
243 <b>__assembleEditPlan</b>(<i></i>) |
|
244 |
|
245 <p> |
|
246 Private method to assemble the edit plan into text suitable for the |
|
247 histedit file. |
|
248 </p> |
|
249 <dl> |
|
250 <dt>Return:</dt> |
|
251 <dd> |
|
252 assembled edit plan text |
|
253 </dd> |
|
254 </dl> |
|
255 <dl> |
|
256 <dt>Return Type:</dt> |
|
257 <dd> |
|
258 str |
|
259 </dd> |
|
260 </dl> |
|
261 <a NAME="HgHisteditPlanEditor.__createPlanItem" ID="HgHisteditPlanEditor.__createPlanItem"></a> |
|
262 <h4>HgHisteditPlanEditor.__createPlanItem</h4> |
|
263 <b>__createPlanItem</b>(<i>text</i>) |
|
264 |
|
265 <p> |
|
266 Private method to create an edit plan tree item. |
|
267 </p> |
|
268 <dl> |
|
269 |
|
270 <dt><i>text</i> (str)</dt> |
|
271 <dd> |
|
272 line of text to be parsed |
|
273 </dd> |
|
274 </dl> |
|
275 <a NAME="HgHisteditPlanEditor.__readFile" ID="HgHisteditPlanEditor.__readFile"></a> |
|
276 <h4>HgHisteditPlanEditor.__readFile</h4> |
|
277 <b>__readFile</b>(<i></i>) |
|
278 |
|
279 <p> |
|
280 Private method to read the file containing the edit plan and |
|
281 populate the dialog. |
|
282 </p> |
|
283 <a NAME="HgHisteditPlanEditor.__resizeSections" ID="HgHisteditPlanEditor.__resizeSections"></a> |
|
284 <h4>HgHisteditPlanEditor.__resizeSections</h4> |
|
285 <b>__resizeSections</b>(<i></i>) |
|
286 |
|
287 <p> |
|
288 Private method to resize the tree widget sections. |
|
289 </p> |
|
290 <a NAME="HgHisteditPlanEditor.__updateButtons" ID="HgHisteditPlanEditor.__updateButtons"></a> |
|
291 <h4>HgHisteditPlanEditor.__updateButtons</h4> |
|
292 <b>__updateButtons</b>(<i></i>) |
|
293 |
|
294 <p> |
|
295 Private method to set the enabled state of the up and down buttons. |
|
296 </p> |
|
297 <a NAME="HgHisteditPlanEditor.on_buttonBox_accepted" ID="HgHisteditPlanEditor.on_buttonBox_accepted"></a> |
|
298 <h4>HgHisteditPlanEditor.on_buttonBox_accepted</h4> |
|
299 <b>on_buttonBox_accepted</b>(<i></i>) |
|
300 |
|
301 <p> |
|
302 Private slot called by the buttonBox accepted signal. |
|
303 </p> |
|
304 <a NAME="HgHisteditPlanEditor.on_buttonBox_rejected" ID="HgHisteditPlanEditor.on_buttonBox_rejected"></a> |
|
305 <h4>HgHisteditPlanEditor.on_buttonBox_rejected</h4> |
|
306 <b>on_buttonBox_rejected</b>(<i></i>) |
|
307 |
|
308 <p> |
|
309 Private slot called by the buttonBox rejected signal. |
|
310 </p> |
|
311 <a NAME="HgHisteditPlanEditor.on_downButton_clicked" ID="HgHisteditPlanEditor.on_downButton_clicked"></a> |
|
312 <h4>HgHisteditPlanEditor.on_downButton_clicked</h4> |
|
313 <b>on_downButton_clicked</b>(<i></i>) |
|
314 |
|
315 <p> |
|
316 Private slot to move the current entry down one line. |
|
317 </p> |
|
318 <a NAME="HgHisteditPlanEditor.on_planTreeWidget_currentItemChanged" ID="HgHisteditPlanEditor.on_planTreeWidget_currentItemChanged"></a> |
|
319 <h4>HgHisteditPlanEditor.on_planTreeWidget_currentItemChanged</h4> |
|
320 <b>on_planTreeWidget_currentItemChanged</b>(<i>current, previous</i>) |
|
321 |
|
322 <p> |
|
323 Private slot handling the change of the current edit plan item. |
|
324 </p> |
|
325 <dl> |
|
326 |
|
327 <dt><i>current</i> (QTreeWidgetItem)</dt> |
|
328 <dd> |
|
329 reference to the current edit plan item |
|
330 </dd> |
|
331 <dt><i>previous</i> (QTreeWidgetItem)</dt> |
|
332 <dd> |
|
333 reference to the previous current edit plan item |
|
334 </dd> |
|
335 </dl> |
|
336 <a NAME="HgHisteditPlanEditor.on_upButton_clicked" ID="HgHisteditPlanEditor.on_upButton_clicked"></a> |
|
337 <h4>HgHisteditPlanEditor.on_upButton_clicked</h4> |
|
338 <b>on_upButton_clicked</b>(<i></i>) |
|
339 |
|
340 <p> |
|
341 Private slot to move the current entry up one line. |
|
342 </p> |
|
343 <div align="right"><a href="#top">Up</a></div> |
|
344 <hr /> |
|
345 </body></html> |