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

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

eric ide

mercurial