# eric6.Network.IRC.IrcNetworkWidget

Module implementing the network part of the IRC widget.

### Global Attributes

None

### Classes

IrcNetworkWidget | Class implementing the network part of the IRC widget.

### Functions

None

## IrcNetworkWidget

Class implementing the network part of the IRC widget.

### Signals

autoConnected()
  emitted after an automatic connection was initiated
away(bool)
  emitted to indicate the away status
connectNetwork(str,bool,bool)
  emitted to connect or disconnect from a network
editNetwork(str)
  emitted to edit a network configuration
joinChannel(str)
  emitted to join a channel
nickChanged(str)
  emitted to change the nick name
sendData(str)
  emitted to send a message to the channel

### Derived from

QWidget, Ui_IrcNetworkWidget

### Class Attributes

None

### Class Methods

None

### Methods

IrcNetworkWidget | Constructor
__autoConnect | Private method to perform the IRC auto connection.
__clearMessages | Private slot to clear the contents of the messages display.
__copyAllMessages | Private slot to copy the contents of the messages display to the clipboard.
__copyMessages | Private slot to copy the selection of the messages display to the clipboard.
__cutAllMessages | Private slot to cut the contents of the messages display to the clipboard.
__initMessagesMenu | Private slot to initialize the context menu of the messages pane.
__onlineStateChanged | Private slot handling online state changes.
__refreshNetworks | Private slot to refresh all network related widgets.
__saveMessages | Private slot to save the contents of the messages display.
addErrorMessage | Public method to add an error message.
addMessage | Public method to add a message.
addServerMessage | Public method to add a server message.
autoConnect | Public method to perform the IRC auto connection.
getNetworkChannels | Public method to get the list of channels associated with the selected network.
getNickname | Public method to get the currently selected nick name.
initialize | Public method to initialize the widget.
isConnected | Public method to check, if the network is connected.
on_awayButton_clicked | Private slot to toggle the away status.
on_channelCombo_editTextChanged | Private slot to react upon changes of the channel.
on_connectButton_clicked | Private slot to connect to a network.
on_editButton_clicked | Private slot to edit a network.
on_joinButton_clicked | Private slot to join a channel.
on_messages_anchorClicked | Private slot to open links in the default browser.
on_messages_copyAvailable | Private slot to react to text selection/deselection of the messages edit.
on_messages_customContextMenuRequested | Private slot to show the context menu of the messages pane.
on_networkCombo_currentIndexChanged | Private slot to handle selections of a network.
on_nickCombo_currentIndexChanged | Private slot to use another nick name.
setConnected | Public slot to set the connection state.
setNickName | Public slot to set the nick name in use.
setRegistered | Public slot to set the registered state.

### Static Methods

None

#### IrcNetworkWidget (Constructor)

IrcNetworkWidget(parent=None)

Constructor

parent
  reference to the parent widget (QWidget)

#### IrcNetworkWidget.__autoConnect

__autoConnect()

Private method to perform the IRC auto connection.

#### IrcNetworkWidget.__clearMessages

__clearMessages()

Private slot to clear the contents of the messages display.

#### IrcNetworkWidget.__copyAllMessages

__copyAllMessages()

Private slot to copy the contents of the messages display to the clipboard.

#### IrcNetworkWidget.__copyMessages

__copyMessages()

Private slot to copy the selection of the messages display to the clipboard.

#### IrcNetworkWidget.__cutAllMessages

__cutAllMessages()

Private slot to cut the contents of the messages display to the clipboard.

#### IrcNetworkWidget.__initMessagesMenu

__initMessagesMenu()

Private slot to initialize the context menu of the messages pane.

#### IrcNetworkWidget.__onlineStateChanged

__onlineStateChanged(online)

Private slot handling online state changes.

online (bool)
  online state

#### IrcNetworkWidget.__refreshNetworks

__refreshNetworks()

Private slot to refresh all network related widgets.

#### IrcNetworkWidget.__saveMessages

__saveMessages()

Private slot to save the contents of the messages display.

#### IrcNetworkWidget.addErrorMessage

addErrorMessage(msgType, msg)

Public method to add an error message.

msgType
  txpe of the message (string)
msg
  message to be added (string)

#### IrcNetworkWidget.addMessage

addMessage(msg)

Public method to add a message.

msg
  message to be added (string)

#### IrcNetworkWidget.addServerMessage

addServerMessage(msgType, msg, filterMsg=True)

Public method to add a server message.

msgType
  txpe of the message (string)
msg
  message to be added (string)
filterMsg=
  flag indicating to filter the message (boolean)

#### IrcNetworkWidget.autoConnect

autoConnect()

Public method to perform the IRC auto connection.

#### IrcNetworkWidget.getNetworkChannels

getNetworkChannels()

Public method to get the list of channels associated with the selected network.

Returns:
  associated channels (list of IrcChannel)

#### IrcNetworkWidget.getNickname

getNickname()

Public method to get the currently selected nick name.

Returns:
  selected nick name (string)

#### IrcNetworkWidget.initialize

initialize(manager)

Public method to initialize the widget.

manager
  reference to the network manager (IrcNetworkManager)

#### IrcNetworkWidget.isConnected

isConnected()

Public method to check, if the network is connected.

Returns:
  flag indicating a connected network (boolean)

#### IrcNetworkWidget.on_awayButton_clicked

on_awayButton_clicked()

Private slot to toggle the away status.

#### IrcNetworkWidget.on_channelCombo_editTextChanged

on_channelCombo_editTextChanged(txt)

Private slot to react upon changes of the channel.

txt
  current text of the channel combo (string)

#### IrcNetworkWidget.on_connectButton_clicked

on_connectButton_clicked()

Private slot to connect to a network.

#### IrcNetworkWidget.on_editButton_clicked

on_editButton_clicked()

Private slot to edit a network.

#### IrcNetworkWidget.on_joinButton_clicked

on_joinButton_clicked()

Private slot to join a channel.

#### IrcNetworkWidget.on_messages_anchorClicked

on_messages_anchorClicked(url)

Private slot to open links in the default browser.

url
  URL to be opened (QUrl)

#### IrcNetworkWidget.on_messages_copyAvailable

on_messages_copyAvailable(yes)

Private slot to react to text selection/deselection of the messages edit.

yes
  flag signaling the availability of selected text (boolean)

#### IrcNetworkWidget.on_messages_customContextMenuRequested

on_messages_customContextMenuRequested(pos)

Private slot to show the context menu of the messages pane.

pos
  position the menu should be opened at (QPoint)

#### IrcNetworkWidget.on_networkCombo_currentIndexChanged

on_networkCombo_currentIndexChanged(networkName)

Private slot to handle selections of a network.

networkName
  selected network name (string)

#### IrcNetworkWidget.on_nickCombo_currentIndexChanged

on_nickCombo_currentIndexChanged(nick="")

Private slot to use another nick name.

nick
  nick name to use (string)

#### IrcNetworkWidget.setConnected

setConnected(connected)

Public slot to set the connection state.

connected
  flag indicating the connection state (boolean)

#### IrcNetworkWidget.setNickName

setNickName(nick)

Public slot to set the nick name in use.

nick
  nick name in use (string)

#### IrcNetworkWidget.setRegistered

setRegistered(registered)

Public slot to set the registered state.

registered
  flag indicating the registration state (boolean)

Up