Documentation/Source/eric5.Network.IRC.IrcWidget.html

changeset 2266
f885a0bc2ccc
child 2335
a30a3798a772
equal deleted inserted replaced
2265:72e6f479987b 2266:f885a0bc2ccc
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4 <html><head>
5 <title>eric5.Network.IRC.IrcWidget</title>
6 <style>
7 body {
8 background: #EDECE6;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #85774A; }
14 h2 { color: white; background: #85774A; }
15 h3 { color: white; background: #9D936E; }
16 h4 { color: white; background: #9D936E; }
17
18 a { color: #BA6D36; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>eric5.Network.IRC.IrcWidget</h1>
24 <p>
25 Module implementing the IRC window.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#IrcWidget">IrcWidget</a></td>
35 <td>Class implementing the IRC window.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="IrcWidget" ID="IrcWidget"></a>
44 <h2>IrcWidget</h2>
45 <p>
46 Class implementing the IRC window.
47 </p><h3>Signals</h3>
48 <dl>
49 <dt>autoConnected()</dt>
50 <dd>
51 emitted after an automatic connection was initiated
52 </dd>
53 </dl>
54 <h3>Derived from</h3>
55 QWidget, Ui_IrcWidget
56 <h3>Class Attributes</h3>
57 <table>
58 <tr><td>ServerConnected</td></tr><tr><td>ServerConnecting</td></tr><tr><td>ServerDisconnected</td></tr>
59 </table>
60 <h3>Class Methods</h3>
61 <table>
62 <tr><td>None</td></tr>
63 </table>
64 <h3>Methods</h3>
65 <table>
66 <tr>
67 <td><a href="#IrcWidget.__init__">IrcWidget</a></td>
68 <td>Constructor</td>
69 </tr><tr>
70 <td><a href="#IrcWidget.__autoJoinChannels">__autoJoinChannels</a></td>
71 <td>Private slot to join channels automatically once a server got connected.</td>
72 </tr><tr>
73 <td><a href="#IrcWidget.__away">__away</a></td>
74 <td>Private slot handling the change of the away state.</td>
75 </tr><tr>
76 <td><a href="#IrcWidget.__changeNick">__changeNick</a></td>
77 <td>Private slot to use a new nick name.</td>
78 </tr><tr>
79 <td><a href="#IrcWidget.__closeChannel">__closeChannel</a></td>
80 <td>Private slot handling the closing of a channel.</td>
81 </tr><tr>
82 <td><a href="#IrcWidget.__connectNetwork">__connectNetwork</a></td>
83 <td>Private slot to connect to or disconnect from the given network.</td>
84 </tr><tr>
85 <td><a href="#IrcWidget.__editNetwork">__editNetwork</a></td>
86 <td>Private slot to edit the network configuration.</td>
87 </tr><tr>
88 <td><a href="#IrcWidget.__handleCtcp">__handleCtcp</a></td>
89 <td>Private method to handle a CTCP command.</td>
90 </tr><tr>
91 <td><a href="#IrcWidget.__handleNamedMessage">__handleNamedMessage</a></td>
92 <td>Private method to handle a server message containing a message name.</td>
93 </tr><tr>
94 <td><a href="#IrcWidget.__handleNickInUse">__handleNickInUse</a></td>
95 <td>Private method to handle a 443 server error.</td>
96 </tr><tr>
97 <td><a href="#IrcWidget.__handleNickInUseLogin">__handleNickInUseLogin</a></td>
98 <td>Private method to handle a 443 server error at login.</td>
99 </tr><tr>
100 <td><a href="#IrcWidget.__handleNumericMessage">__handleNumericMessage</a></td>
101 <td>Private method to handle a server message containing a numeric code.</td>
102 </tr><tr>
103 <td><a href="#IrcWidget.__handleServerError">__handleServerError</a></td>
104 <td>Private slot to handle a server error reply.</td>
105 </tr><tr>
106 <td><a href="#IrcWidget.__handleServerReply">__handleServerReply</a></td>
107 <td>Private slot to handle a server reply.</td>
108 </tr><tr>
109 <td><a href="#IrcWidget.__hostConnected">__hostConnected</a></td>
110 <td>Private slot to log in to the server after the connection was established.</td>
111 </tr><tr>
112 <td><a href="#IrcWidget.__hostDisconnected">__hostDisconnected</a></td>
113 <td>Private slot to indicate the host was disconnected.</td>
114 </tr><tr>
115 <td><a href="#IrcWidget.__hostFound">__hostFound</a></td>
116 <td>Private slot to indicate the host was found.</td>
117 </tr><tr>
118 <td><a href="#IrcWidget.__joinChannel">__joinChannel</a></td>
119 <td>Private slot to join a channel.</td>
120 </tr><tr>
121 <td><a href="#IrcWidget.__leaveChannel">__leaveChannel</a></td>
122 <td>Private slot to leave a channel and close the associated tab.</td>
123 </tr><tr>
124 <td><a href="#IrcWidget.__networkDataChanged">__networkDataChanged</a></td>
125 <td>Private slot handling changes of the network and identity definitions.</td>
126 </tr><tr>
127 <td><a href="#IrcWidget.__openPrivate">__openPrivate</a></td>
128 <td>Private slot to open a private chat with the given user.</td>
129 </tr><tr>
130 <td><a href="#IrcWidget.__ping">__ping</a></td>
131 <td>Private method to handle a PING message.</td>
132 </tr><tr>
133 <td><a href="#IrcWidget.__query">__query</a></td>
134 <td>Private method to handle a new private connection.</td>
135 </tr><tr>
136 <td><a href="#IrcWidget.__readyRead">__readyRead</a></td>
137 <td>Private slot to read data from the socket.</td>
138 </tr><tr>
139 <td><a href="#IrcWidget.__registerWithServices">__registerWithServices</a></td>
140 <td>Private method to register to services.</td>
141 </tr><tr>
142 <td><a href="#IrcWidget.__send">__send</a></td>
143 <td>Private slot to send data to the IRC server.</td>
144 </tr><tr>
145 <td><a href="#IrcWidget.__sendCtcpReply">__sendCtcpReply</a></td>
146 <td>Private slot to send a CTCP reply.</td>
147 </tr><tr>
148 <td><a href="#IrcWidget.__setChannelTypePrefixes">__setChannelTypePrefixes</a></td>
149 <td>Private method to set the channel type prefixes.</td>
150 </tr><tr>
151 <td><a href="#IrcWidget.__setUserPrivilegePrefix">__setUserPrivilegePrefix</a></td>
152 <td>Private method to set the user privilege prefix.</td>
153 </tr><tr>
154 <td><a href="#IrcWidget.__sslErrors">__sslErrors</a></td>
155 <td>Private slot to handle SSL errors.</td>
156 </tr><tr>
157 <td><a href="#IrcWidget.__tcpError">__tcpError</a></td>
158 <td>Private slot to handle errors reported by the TCP socket.</td>
159 </tr><tr>
160 <td><a href="#IrcWidget.__updateUsersCount">__updateUsersCount</a></td>
161 <td>Private method to update the users count on the channel tabs.</td>
162 </tr><tr>
163 <td><a href="#IrcWidget.autoConnect">autoConnect</a></td>
164 <td>Public method to initiate the IRC auto connection.</td>
165 </tr><tr>
166 <td><a href="#IrcWidget.isChannelName">isChannelName</a></td>
167 <td>PublicisChannelName method to check, if the given name is a channel name.</td>
168 </tr><tr>
169 <td><a href="#IrcWidget.on_channelsWidget_tabCloseRequested">on_channelsWidget_tabCloseRequested</a></td>
170 <td>Private slot to close a channel by pressing the close button of the channels widget.</td>
171 </tr><tr>
172 <td><a href="#IrcWidget.shutdown">shutdown</a></td>
173 <td>Public method to shut down the widget.</td>
174 </tr>
175 </table>
176 <h3>Static Methods</h3>
177 <table>
178 <tr><td>None</td></tr>
179 </table>
180 <a NAME="IrcWidget.__init__" ID="IrcWidget.__init__"></a>
181 <h4>IrcWidget (Constructor)</h4>
182 <b>IrcWidget</b>(<i>parent=None</i>)
183 <p>
184 Constructor
185 </p><dl>
186 <dt><i>parent</i></dt>
187 <dd>
188 reference to the parent widget (QWidget)
189 </dd>
190 </dl><a NAME="IrcWidget.__autoJoinChannels" ID="IrcWidget.__autoJoinChannels"></a>
191 <h4>IrcWidget.__autoJoinChannels</h4>
192 <b>__autoJoinChannels</b>(<i></i>)
193 <p>
194 Private slot to join channels automatically once a server got connected.
195 </p><a NAME="IrcWidget.__away" ID="IrcWidget.__away"></a>
196 <h4>IrcWidget.__away</h4>
197 <b>__away</b>(<i>isAway</i>)
198 <p>
199 Private slot handling the change of the away state.
200 </p><dl>
201 <dt><i>isAway</i></dt>
202 <dd>
203 flag indicating the current away state (boolean)
204 </dd>
205 </dl><a NAME="IrcWidget.__changeNick" ID="IrcWidget.__changeNick"></a>
206 <h4>IrcWidget.__changeNick</h4>
207 <b>__changeNick</b>(<i>nick</i>)
208 <p>
209 Private slot to use a new nick name.
210 </p><dl>
211 <dt><i>nick</i></dt>
212 <dd>
213 nick name to use (str)
214 </dd>
215 </dl><a NAME="IrcWidget.__closeChannel" ID="IrcWidget.__closeChannel"></a>
216 <h4>IrcWidget.__closeChannel</h4>
217 <b>__closeChannel</b>(<i>name</i>)
218 <p>
219 Private slot handling the closing of a channel.
220 </p><dl>
221 <dt><i>name</i></dt>
222 <dd>
223 name of the closed channel (string)
224 </dd>
225 </dl><a NAME="IrcWidget.__connectNetwork" ID="IrcWidget.__connectNetwork"></a>
226 <h4>IrcWidget.__connectNetwork</h4>
227 <b>__connectNetwork</b>(<i>name, connect</i>)
228 <p>
229 Private slot to connect to or disconnect from the given network.
230 </p><dl>
231 <dt><i>name</i></dt>
232 <dd>
233 name of the network to connect to (string)
234 </dd><dt><i>connect</i></dt>
235 <dd>
236 flag indicating to connect (boolean)
237 </dd>
238 </dl><a NAME="IrcWidget.__editNetwork" ID="IrcWidget.__editNetwork"></a>
239 <h4>IrcWidget.__editNetwork</h4>
240 <b>__editNetwork</b>(<i>name</i>)
241 <p>
242 Private slot to edit the network configuration.
243 </p><dl>
244 <dt><i>name</i></dt>
245 <dd>
246 name of the network to edit (string)
247 </dd>
248 </dl><a NAME="IrcWidget.__handleCtcp" ID="IrcWidget.__handleCtcp"></a>
249 <h4>IrcWidget.__handleCtcp</h4>
250 <b>__handleCtcp</b>(<i>match</i>)
251 <p>
252 Private method to handle a CTCP command.
253 </p><dl>
254 <dt><i>reference</i></dt>
255 <dd>
256 to the match object
257 </dd>
258 </dl><dl>
259 <dt>Returns:</dt>
260 <dd>
261 flag indicating, if the message was handled (boolean)
262 </dd>
263 </dl><a NAME="IrcWidget.__handleNamedMessage" ID="IrcWidget.__handleNamedMessage"></a>
264 <h4>IrcWidget.__handleNamedMessage</h4>
265 <b>__handleNamedMessage</b>(<i>match</i>)
266 <p>
267 Private method to handle a server message containing a message name.
268 </p><dl>
269 <dt><i>reference</i></dt>
270 <dd>
271 to the match object
272 </dd>
273 </dl><dl>
274 <dt>Returns:</dt>
275 <dd>
276 flag indicating, if the message was handled (boolean)
277 </dd>
278 </dl><a NAME="IrcWidget.__handleNickInUse" ID="IrcWidget.__handleNickInUse"></a>
279 <h4>IrcWidget.__handleNickInUse</h4>
280 <b>__handleNickInUse</b>(<i></i>)
281 <p>
282 Private method to handle a 443 server error.
283 </p><a NAME="IrcWidget.__handleNickInUseLogin" ID="IrcWidget.__handleNickInUseLogin"></a>
284 <h4>IrcWidget.__handleNickInUseLogin</h4>
285 <b>__handleNickInUseLogin</b>(<i></i>)
286 <p>
287 Private method to handle a 443 server error at login.
288 </p><a NAME="IrcWidget.__handleNumericMessage" ID="IrcWidget.__handleNumericMessage"></a>
289 <h4>IrcWidget.__handleNumericMessage</h4>
290 <b>__handleNumericMessage</b>(<i>match</i>)
291 <p>
292 Private method to handle a server message containing a numeric code.
293 </p><dl>
294 <dt><i>reference</i></dt>
295 <dd>
296 to the match object
297 </dd>
298 </dl><dl>
299 <dt>Returns:</dt>
300 <dd>
301 flag indicating, if the message was handled (boolean)
302 </dd>
303 </dl><a NAME="IrcWidget.__handleServerError" ID="IrcWidget.__handleServerError"></a>
304 <h4>IrcWidget.__handleServerError</h4>
305 <b>__handleServerError</b>(<i>code, server, message</i>)
306 <p>
307 Private slot to handle a server error reply.
308 </p><dl>
309 <dt><i>code</i></dt>
310 <dd>
311 numerical code sent by the server (integer)
312 </dd><dt><i>server</i></dt>
313 <dd>
314 name of the server (string)
315 </dd><dt><i>message</i></dt>
316 <dd>
317 message sent by the server (string)
318 </dd>
319 </dl><dl>
320 <dt>Returns:</dt>
321 <dd>
322 flag indicating, if the message was handled (boolean)
323 </dd>
324 </dl><a NAME="IrcWidget.__handleServerReply" ID="IrcWidget.__handleServerReply"></a>
325 <h4>IrcWidget.__handleServerReply</h4>
326 <b>__handleServerReply</b>(<i>code, server, message</i>)
327 <p>
328 Private slot to handle a server reply.
329 </p><dl>
330 <dt><i>code</i></dt>
331 <dd>
332 numerical code sent by the server (integer)
333 </dd><dt><i>server</i></dt>
334 <dd>
335 name of the server (string)
336 </dd><dt><i>message</i></dt>
337 <dd>
338 message sent by the server (string)
339 </dd>
340 </dl><dl>
341 <dt>Returns:</dt>
342 <dd>
343 flag indicating, if the message was handled (boolean)
344 </dd>
345 </dl><a NAME="IrcWidget.__hostConnected" ID="IrcWidget.__hostConnected"></a>
346 <h4>IrcWidget.__hostConnected</h4>
347 <b>__hostConnected</b>(<i></i>)
348 <p>
349 Private slot to log in to the server after the connection was established.
350 </p><a NAME="IrcWidget.__hostDisconnected" ID="IrcWidget.__hostDisconnected"></a>
351 <h4>IrcWidget.__hostDisconnected</h4>
352 <b>__hostDisconnected</b>(<i></i>)
353 <p>
354 Private slot to indicate the host was disconnected.
355 </p><a NAME="IrcWidget.__hostFound" ID="IrcWidget.__hostFound"></a>
356 <h4>IrcWidget.__hostFound</h4>
357 <b>__hostFound</b>(<i></i>)
358 <p>
359 Private slot to indicate the host was found.
360 </p><a NAME="IrcWidget.__joinChannel" ID="IrcWidget.__joinChannel"></a>
361 <h4>IrcWidget.__joinChannel</h4>
362 <b>__joinChannel</b>(<i>name, key=""</i>)
363 <p>
364 Private slot to join a channel.
365 </p><dl>
366 <dt><i>name</i></dt>
367 <dd>
368 name of the channel (string)
369 </dd><dt><i>key</i></dt>
370 <dd>
371 key of the channel (string)
372 </dd>
373 </dl><a NAME="IrcWidget.__leaveChannel" ID="IrcWidget.__leaveChannel"></a>
374 <h4>IrcWidget.__leaveChannel</h4>
375 <b>__leaveChannel</b>(<i></i>)
376 <p>
377 Private slot to leave a channel and close the associated tab.
378 </p><a NAME="IrcWidget.__networkDataChanged" ID="IrcWidget.__networkDataChanged"></a>
379 <h4>IrcWidget.__networkDataChanged</h4>
380 <b>__networkDataChanged</b>(<i></i>)
381 <p>
382 Private slot handling changes of the network and identity definitions.
383 </p><a NAME="IrcWidget.__openPrivate" ID="IrcWidget.__openPrivate"></a>
384 <h4>IrcWidget.__openPrivate</h4>
385 <b>__openPrivate</b>(<i>name</i>)
386 <p>
387 Private slot to open a private chat with the given user.
388 </p><dl>
389 <dt><i>name</i></dt>
390 <dd>
391 name of the user (string)
392 </dd>
393 </dl><a NAME="IrcWidget.__ping" ID="IrcWidget.__ping"></a>
394 <h4>IrcWidget.__ping</h4>
395 <b>__ping</b>(<i>match</i>)
396 <p>
397 Private method to handle a PING message.
398 </p><dl>
399 <dt><i>reference</i></dt>
400 <dd>
401 to the match object
402 </dd>
403 </dl><dl>
404 <dt>Returns:</dt>
405 <dd>
406 flag indicating, if the message was handled (boolean)
407 </dd>
408 </dl><a NAME="IrcWidget.__query" ID="IrcWidget.__query"></a>
409 <h4>IrcWidget.__query</h4>
410 <b>__query</b>(<i>match</i>)
411 <p>
412 Private method to handle a new private connection.
413 </p><dl>
414 <dt><i>reference</i></dt>
415 <dd>
416 to the match object
417 </dd>
418 </dl><dl>
419 <dt>Returns:</dt>
420 <dd>
421 flag indicating, if the message was handled (boolean)
422 </dd>
423 </dl><a NAME="IrcWidget.__readyRead" ID="IrcWidget.__readyRead"></a>
424 <h4>IrcWidget.__readyRead</h4>
425 <b>__readyRead</b>(<i></i>)
426 <p>
427 Private slot to read data from the socket.
428 </p><a NAME="IrcWidget.__registerWithServices" ID="IrcWidget.__registerWithServices"></a>
429 <h4>IrcWidget.__registerWithServices</h4>
430 <b>__registerWithServices</b>(<i></i>)
431 <p>
432 Private method to register to services.
433 </p><a NAME="IrcWidget.__send" ID="IrcWidget.__send"></a>
434 <h4>IrcWidget.__send</h4>
435 <b>__send</b>(<i>data</i>)
436 <p>
437 Private slot to send data to the IRC server.
438 </p><dl>
439 <dt><i>data</i></dt>
440 <dd>
441 data to be sent (string)
442 </dd>
443 </dl><a NAME="IrcWidget.__sendCtcpReply" ID="IrcWidget.__sendCtcpReply"></a>
444 <h4>IrcWidget.__sendCtcpReply</h4>
445 <b>__sendCtcpReply</b>(<i>receiver, text</i>)
446 <p>
447 Private slot to send a CTCP reply.
448 </p><dl>
449 <dt><i>receiver</i></dt>
450 <dd>
451 nick name of the receiver (string)
452 </dd><dt><i>text</i></dt>
453 <dd>
454 text to be sent (string)
455 </dd>
456 </dl><a NAME="IrcWidget.__setChannelTypePrefixes" ID="IrcWidget.__setChannelTypePrefixes"></a>
457 <h4>IrcWidget.__setChannelTypePrefixes</h4>
458 <b>__setChannelTypePrefixes</b>(<i>prefixes</i>)
459 <p>
460 Private method to set the channel type prefixes.
461 </p><dl>
462 <dt><i>prefixes</i></dt>
463 <dd>
464 channel prefix characters (string)
465 </dd>
466 </dl><a NAME="IrcWidget.__setUserPrivilegePrefix" ID="IrcWidget.__setUserPrivilegePrefix"></a>
467 <h4>IrcWidget.__setUserPrivilegePrefix</h4>
468 <b>__setUserPrivilegePrefix</b>(<i>prefix1, prefix2</i>)
469 <p>
470 Private method to set the user privilege prefix.
471 </p><dl>
472 <dt><i>prefix1</i></dt>
473 <dd>
474 first part of the prefix (string)
475 </dd><dt><i>prefix2</i></dt>
476 <dd>
477 indictors the first part gets mapped to (string)
478 </dd>
479 </dl><a NAME="IrcWidget.__sslErrors" ID="IrcWidget.__sslErrors"></a>
480 <h4>IrcWidget.__sslErrors</h4>
481 <b>__sslErrors</b>(<i>errors</i>)
482 <p>
483 Private slot to handle SSL errors.
484 </p><dl>
485 <dt><i>errors</i></dt>
486 <dd>
487 list of SSL errors (list of QSslError)
488 </dd>
489 </dl><a NAME="IrcWidget.__tcpError" ID="IrcWidget.__tcpError"></a>
490 <h4>IrcWidget.__tcpError</h4>
491 <b>__tcpError</b>(<i>error</i>)
492 <p>
493 Private slot to handle errors reported by the TCP socket.
494 </p><dl>
495 <dt><i>error</i></dt>
496 <dd>
497 error code reported by the socket
498 (QAbstractSocket.SocketError)
499 </dd>
500 </dl><a NAME="IrcWidget.__updateUsersCount" ID="IrcWidget.__updateUsersCount"></a>
501 <h4>IrcWidget.__updateUsersCount</h4>
502 <b>__updateUsersCount</b>(<i></i>)
503 <p>
504 Private method to update the users count on the channel tabs.
505 </p><a NAME="IrcWidget.autoConnect" ID="IrcWidget.autoConnect"></a>
506 <h4>IrcWidget.autoConnect</h4>
507 <b>autoConnect</b>(<i></i>)
508 <p>
509 Public method to initiate the IRC auto connection.
510 </p><a NAME="IrcWidget.isChannelName" ID="IrcWidget.isChannelName"></a>
511 <h4>IrcWidget.isChannelName</h4>
512 <b>isChannelName</b>(<i>name</i>)
513 <p>
514 PublicisChannelName method to check, if the given name is a channel name.
515 </p><dl>
516 <dt>Returns:</dt>
517 <dd>
518 flag indicating a channel name (boolean)
519 </dd>
520 </dl><a NAME="IrcWidget.on_channelsWidget_tabCloseRequested" ID="IrcWidget.on_channelsWidget_tabCloseRequested"></a>
521 <h4>IrcWidget.on_channelsWidget_tabCloseRequested</h4>
522 <b>on_channelsWidget_tabCloseRequested</b>(<i>index</i>)
523 <p>
524 Private slot to close a channel by pressing the close button of
525 the channels widget.
526 </p><dl>
527 <dt><i>index</i></dt>
528 <dd>
529 index of the tab to be closed (integer)
530 </dd>
531 </dl><a NAME="IrcWidget.shutdown" ID="IrcWidget.shutdown"></a>
532 <h4>IrcWidget.shutdown</h4>
533 <b>shutdown</b>(<i></i>)
534 <p>
535 Public method to shut down the widget.
536 </p><dl>
537 <dt>Returns:</dt>
538 <dd>
539 flag indicating successful shutdown (boolean)
540 </dd>
541 </dl>
542 <div align="right"><a href="#top">Up</a></div>
543 <hr />
544 </body></html>

eric ide

mercurial