src/eric7/Documentation/Source/eric7.UI.DiffDialog.html

branch
eric7
changeset 10479
856476537696
parent 10433
328f3ec4b77a
child 10692
9becf9ca115c
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
5 <link rel="stylesheet" href="styles.css"> 5 <link rel="stylesheet" href="styles.css">
6 </head> 6 </head>
7 <body> 7 <body>
8 <a NAME="top" ID="top"></a> 8 <a NAME="top" ID="top"></a>
9 <h1>eric7.UI.DiffDialog</h1> 9 <h1>eric7.UI.DiffDialog</h1>
10
11 <p> 10 <p>
12 Module implementing a dialog to compare two files. 11 Module implementing a dialog to compare two files.
13 </p> 12 </p>
13
14 <h3>Global Attributes</h3> 14 <h3>Global Attributes</h3>
15 15 <table>
16 <table> 16 <tr><td>None</td></tr>
17 <tr><td>None</td></tr> 17 </table>
18 </table> 18
19 <h3>Classes</h3> 19 <h3>Classes</h3>
20 20 <table>
21 <table>
22
23 <tr> 21 <tr>
24 <td><a href="#DiffDialog">DiffDialog</a></td> 22 <td><a href="#DiffDialog">DiffDialog</a></td>
25 <td>Class implementing a dialog to compare two files.</td> 23 <td>Class implementing a dialog to compare two files.</td>
26 </tr> 24 </tr>
27 <tr> 25 <tr>
28 <td><a href="#DiffWindow">DiffWindow</a></td> 26 <td><a href="#DiffWindow">DiffWindow</a></td>
29 <td>Main window class for the standalone dialog.</td> 27 <td>Main window class for the standalone dialog.</td>
30 </tr> 28 </tr>
31 </table> 29 </table>
30
32 <h3>Functions</h3> 31 <h3>Functions</h3>
33 32 <table>
34 <table> 33 <tr><td>None</td></tr>
35 <tr><td>None</td></tr> 34 </table>
36 </table> 35
37 <hr /> 36 <hr />
38 <hr /> 37 <hr />
39 <a NAME="DiffDialog" ID="DiffDialog"></a> 38 <a NAME="DiffDialog" ID="DiffDialog"></a>
40 <h2>DiffDialog</h2> 39 <h2>DiffDialog</h2>
41
42 <p> 40 <p>
43 Class implementing a dialog to compare two files. 41 Class implementing a dialog to compare two files.
44 </p> 42 </p>
43
45 <h3>Derived from</h3> 44 <h3>Derived from</h3>
46 QWidget, Ui_DiffDialog 45 QWidget, Ui_DiffDialog
47 <h3>Class Attributes</h3> 46 <h3>Class Attributes</h3>
48 47 <table>
49 <table> 48 <tr><td>None</td></tr>
50 <tr><td>None</td></tr> 49 </table>
51 </table> 50
52 <h3>Class Methods</h3> 51 <h3>Class Methods</h3>
53 52 <table>
54 <table> 53 <tr><td>None</td></tr>
55 <tr><td>None</td></tr> 54 </table>
56 </table> 55
57 <h3>Methods</h3> 56 <h3>Methods</h3>
58 57 <table>
59 <table>
60
61 <tr> 58 <tr>
62 <td><a href="#DiffDialog.__init__">DiffDialog</a></td> 59 <td><a href="#DiffDialog.__init__">DiffDialog</a></td>
63 <td>Constructor</td> 60 <td>Constructor</td>
64 </tr> 61 </tr>
65 <tr> 62 <tr>
93 <tr> 90 <tr>
94 <td><a href="#DiffDialog.show">show</a></td> 91 <td><a href="#DiffDialog.show">show</a></td>
95 <td>Public slot to show the dialog.</td> 92 <td>Public slot to show the dialog.</td>
96 </tr> 93 </tr>
97 </table> 94 </table>
95
98 <h3>Static Methods</h3> 96 <h3>Static Methods</h3>
99 97 <table>
100 <table> 98 <tr><td>None</td></tr>
101 <tr><td>None</td></tr> 99 </table>
102 </table> 100
103 101
104 <a NAME="DiffDialog.__init__" ID="DiffDialog.__init__"></a> 102 <a NAME="DiffDialog.__init__" ID="DiffDialog.__init__"></a>
105 <h4>DiffDialog (Constructor)</h4> 103 <h4>DiffDialog (Constructor)</h4>
106 <b>DiffDialog</b>(<i>files=None, parent=None</i>) 104 <b>DiffDialog</b>(<i>files=None, parent=None</i>)
107
108 <p> 105 <p>
109 Constructor 106 Constructor
110 </p> 107 </p>
108
111 <dl> 109 <dl>
112 110
113 <dt><i>files</i> (list of [str, str])</dt> 111 <dt><i>files</i> (list of [str, str])</dt>
114 <dd> 112 <dd>
115 list of two file names to be diffed 113 list of two file names to be diffed
120 </dd> 118 </dd>
121 </dl> 119 </dl>
122 <a NAME="DiffDialog.__appendText" ID="DiffDialog.__appendText"></a> 120 <a NAME="DiffDialog.__appendText" ID="DiffDialog.__appendText"></a>
123 <h4>DiffDialog.__appendText</h4> 121 <h4>DiffDialog.__appendText</h4>
124 <b>__appendText</b>(<i>txt</i>) 122 <b>__appendText</b>(<i>txt</i>)
125
126 <p> 123 <p>
127 Private method to append text to the end of the contents pane. 124 Private method to append text to the end of the contents pane.
128 </p> 125 </p>
126
129 <dl> 127 <dl>
130 128
131 <dt><i>txt</i> (str)</dt> 129 <dt><i>txt</i> (str)</dt>
132 <dd> 130 <dd>
133 text to insert 131 text to insert
134 </dd> 132 </dd>
135 </dl> 133 </dl>
136 <a NAME="DiffDialog.__fileChanged" ID="DiffDialog.__fileChanged"></a> 134 <a NAME="DiffDialog.__fileChanged" ID="DiffDialog.__fileChanged"></a>
137 <h4>DiffDialog.__fileChanged</h4> 135 <h4>DiffDialog.__fileChanged</h4>
138 <b>__fileChanged</b>(<i></i>) 136 <b>__fileChanged</b>(<i></i>)
139
140 <p> 137 <p>
141 Private slot to enable/disable the Compare button. 138 Private slot to enable/disable the Compare button.
142 </p> 139 </p>
140
143 <a NAME="DiffDialog.__generateContextDiff" ID="DiffDialog.__generateContextDiff"></a> 141 <a NAME="DiffDialog.__generateContextDiff" ID="DiffDialog.__generateContextDiff"></a>
144 <h4>DiffDialog.__generateContextDiff</h4> 142 <h4>DiffDialog.__generateContextDiff</h4>
145 <b>__generateContextDiff</b>(<i>a, b, fromfile, tofile, fromfiledate, tofiledate</i>) 143 <b>__generateContextDiff</b>(<i>a, b, fromfile, tofile, fromfiledate, tofiledate</i>)
146
147 <p> 144 <p>
148 Private slot to generate a context diff output. 145 Private slot to generate a context diff output.
149 </p> 146 </p>
147
150 <dl> 148 <dl>
151 149
152 <dt><i>a</i> (list of str)</dt> 150 <dt><i>a</i> (list of str)</dt>
153 <dd> 151 <dd>
154 first sequence of lines 152 first sequence of lines
175 </dd> 173 </dd>
176 </dl> 174 </dl>
177 <a NAME="DiffDialog.__generateUnifiedDiff" ID="DiffDialog.__generateUnifiedDiff"></a> 175 <a NAME="DiffDialog.__generateUnifiedDiff" ID="DiffDialog.__generateUnifiedDiff"></a>
178 <h4>DiffDialog.__generateUnifiedDiff</h4> 176 <h4>DiffDialog.__generateUnifiedDiff</h4>
179 <b>__generateUnifiedDiff</b>(<i>a, b, fromfile, tofile, fromfiledate, tofiledate</i>) 177 <b>__generateUnifiedDiff</b>(<i>a, b, fromfile, tofile, fromfiledate, tofiledate</i>)
180
181 <p> 178 <p>
182 Private slot to generate a unified diff output. 179 Private slot to generate a unified diff output.
183 </p> 180 </p>
181
184 <dl> 182 <dl>
185 183
186 <dt><i>a</i> (list of str)</dt> 184 <dt><i>a</i> (list of str)</dt>
187 <dd> 185 <dd>
188 first sequence of lines 186 first sequence of lines
209 </dd> 207 </dd>
210 </dl> 208 </dl>
211 <a NAME="DiffDialog.on_buttonBox_clicked" ID="DiffDialog.on_buttonBox_clicked"></a> 209 <a NAME="DiffDialog.on_buttonBox_clicked" ID="DiffDialog.on_buttonBox_clicked"></a>
212 <h4>DiffDialog.on_buttonBox_clicked</h4> 210 <h4>DiffDialog.on_buttonBox_clicked</h4>
213 <b>on_buttonBox_clicked</b>(<i>button</i>) 211 <b>on_buttonBox_clicked</b>(<i>button</i>)
214
215 <p> 212 <p>
216 Private slot called by a button of the button box clicked. 213 Private slot called by a button of the button box clicked.
217 </p> 214 </p>
215
218 <dl> 216 <dl>
219 217
220 <dt><i>button</i> (QAbstractButton)</dt> 218 <dt><i>button</i> (QAbstractButton)</dt>
221 <dd> 219 <dd>
222 button that was clicked 220 button that was clicked
223 </dd> 221 </dd>
224 </dl> 222 </dl>
225 <a NAME="DiffDialog.on_diffButton_clicked" ID="DiffDialog.on_diffButton_clicked"></a> 223 <a NAME="DiffDialog.on_diffButton_clicked" ID="DiffDialog.on_diffButton_clicked"></a>
226 <h4>DiffDialog.on_diffButton_clicked</h4> 224 <h4>DiffDialog.on_diffButton_clicked</h4>
227 <b>on_diffButton_clicked</b>(<i></i>) 225 <b>on_diffButton_clicked</b>(<i></i>)
228
229 <p> 226 <p>
230 Private slot to handle the Compare button press. 227 Private slot to handle the Compare button press.
231 </p> 228 </p>
229
232 <a NAME="DiffDialog.on_saveButton_clicked" ID="DiffDialog.on_saveButton_clicked"></a> 230 <a NAME="DiffDialog.on_saveButton_clicked" ID="DiffDialog.on_saveButton_clicked"></a>
233 <h4>DiffDialog.on_saveButton_clicked</h4> 231 <h4>DiffDialog.on_saveButton_clicked</h4>
234 <b>on_saveButton_clicked</b>(<i></i>) 232 <b>on_saveButton_clicked</b>(<i></i>)
235
236 <p> 233 <p>
237 Private slot to handle the Save button press. 234 Private slot to handle the Save button press.
238 </p> 235 </p>
239 <p> 236 <p>
240 It saves the diff shown in the dialog to a file in the local 237 It saves the diff shown in the dialog to a file in the local
241 filesystem. 238 filesystem.
242 </p> 239 </p>
240
243 <a NAME="DiffDialog.show" ID="DiffDialog.show"></a> 241 <a NAME="DiffDialog.show" ID="DiffDialog.show"></a>
244 <h4>DiffDialog.show</h4> 242 <h4>DiffDialog.show</h4>
245 <b>show</b>(<i>filename=None</i>) 243 <b>show</b>(<i>filename=None</i>)
246
247 <p> 244 <p>
248 Public slot to show the dialog. 245 Public slot to show the dialog.
249 </p> 246 </p>
247
250 <dl> 248 <dl>
251 249
252 <dt><i>filename</i> (str)</dt> 250 <dt><i>filename</i> (str)</dt>
253 <dd> 251 <dd>
254 name of a file to use as the first file 252 name of a file to use as the first file
257 <div align="right"><a href="#top">Up</a></div> 255 <div align="right"><a href="#top">Up</a></div>
258 <hr /> 256 <hr />
259 <hr /> 257 <hr />
260 <a NAME="DiffWindow" ID="DiffWindow"></a> 258 <a NAME="DiffWindow" ID="DiffWindow"></a>
261 <h2>DiffWindow</h2> 259 <h2>DiffWindow</h2>
262
263 <p> 260 <p>
264 Main window class for the standalone dialog. 261 Main window class for the standalone dialog.
265 </p> 262 </p>
263
266 <h3>Derived from</h3> 264 <h3>Derived from</h3>
267 EricMainWindow 265 EricMainWindow
268 <h3>Class Attributes</h3> 266 <h3>Class Attributes</h3>
269 267 <table>
270 <table> 268 <tr><td>None</td></tr>
271 <tr><td>None</td></tr> 269 </table>
272 </table> 270
273 <h3>Class Methods</h3> 271 <h3>Class Methods</h3>
274 272 <table>
275 <table> 273 <tr><td>None</td></tr>
276 <tr><td>None</td></tr> 274 </table>
277 </table> 275
278 <h3>Methods</h3> 276 <h3>Methods</h3>
279 277 <table>
280 <table>
281
282 <tr> 278 <tr>
283 <td><a href="#DiffWindow.__init__">DiffWindow</a></td> 279 <td><a href="#DiffWindow.__init__">DiffWindow</a></td>
284 <td>Constructor</td> 280 <td>Constructor</td>
285 </tr> 281 </tr>
286 <tr> 282 <tr>
287 <td><a href="#DiffWindow.eventFilter">eventFilter</a></td> 283 <td><a href="#DiffWindow.eventFilter">eventFilter</a></td>
288 <td>Public method to filter events.</td> 284 <td>Public method to filter events.</td>
289 </tr> 285 </tr>
290 </table> 286 </table>
287
291 <h3>Static Methods</h3> 288 <h3>Static Methods</h3>
292 289 <table>
293 <table> 290 <tr><td>None</td></tr>
294 <tr><td>None</td></tr> 291 </table>
295 </table> 292
296 293
297 <a NAME="DiffWindow.__init__" ID="DiffWindow.__init__"></a> 294 <a NAME="DiffWindow.__init__" ID="DiffWindow.__init__"></a>
298 <h4>DiffWindow (Constructor)</h4> 295 <h4>DiffWindow (Constructor)</h4>
299 <b>DiffWindow</b>(<i>files=None, parent=None</i>) 296 <b>DiffWindow</b>(<i>files=None, parent=None</i>)
300
301 <p> 297 <p>
302 Constructor 298 Constructor
303 </p> 299 </p>
300
304 <dl> 301 <dl>
305 302
306 <dt><i>files</i> (list of [str, str])</dt> 303 <dt><i>files</i> (list of [str, str])</dt>
307 <dd> 304 <dd>
308 list of two file names to be diffed 305 list of two file names to be diffed
313 </dd> 310 </dd>
314 </dl> 311 </dl>
315 <a NAME="DiffWindow.eventFilter" ID="DiffWindow.eventFilter"></a> 312 <a NAME="DiffWindow.eventFilter" ID="DiffWindow.eventFilter"></a>
316 <h4>DiffWindow.eventFilter</h4> 313 <h4>DiffWindow.eventFilter</h4>
317 <b>eventFilter</b>(<i>obj, event</i>) 314 <b>eventFilter</b>(<i>obj, event</i>)
318
319 <p> 315 <p>
320 Public method to filter events. 316 Public method to filter events.
321 </p> 317 </p>
318
322 <dl> 319 <dl>
323 320
324 <dt><i>obj</i> (QObject)</dt> 321 <dt><i>obj</i> (QObject)</dt>
325 <dd> 322 <dd>
326 reference to the object the event is meant for 323 reference to the object the event is meant for

eric ide

mercurial