55 @param parent reference to the parent widget (QWidget) |
51 @param parent reference to the parent widget (QWidget) |
56 """ |
52 """ |
57 super().__init__(parent) |
53 super().__init__(parent) |
58 self.setupUi(self) |
54 self.setupUi(self) |
59 |
55 |
|
56 from .IrcNetworkManager import IrcNetworkManager |
60 self.__ircNetworkManager = IrcNetworkManager(self) |
57 self.__ircNetworkManager = IrcNetworkManager(self) |
61 |
58 |
62 self.__leaveButton = QToolButton(self) |
59 self.__leaveButton = QToolButton(self) |
63 self.__leaveButton.setIcon(UI.PixmapCache.getIcon("ircCloseChannel.png")) |
60 self.__leaveButton.setIcon(UI.PixmapCache.getIcon("ircCloseChannel.png")) |
64 self.__leaveButton.setToolTip(self.trUtf8("Press to leave the current channel")) |
61 self.__leaveButton.setToolTip(self.trUtf8("Press to leave the current channel")) |
240 """ |
237 """ |
241 Private slot to edit the network configuration. |
238 Private slot to edit the network configuration. |
242 |
239 |
243 @param name name of the network to edit (string) |
240 @param name name of the network to edit (string) |
244 """ |
241 """ |
|
242 from .IrcNetworkListDialog import IrcNetworkListDialog |
245 dlg = IrcNetworkListDialog(self.__ircNetworkManager, self) |
243 dlg = IrcNetworkListDialog(self.__ircNetworkManager, self) |
246 dlg.exec_() |
244 dlg.exec_() |
247 |
245 |
248 def __networkDataChanged(self): |
246 def __networkDataChanged(self): |
249 """ |
247 """ |
265 # step 1: check, if this channel is already joined |
263 # step 1: check, if this channel is already joined |
266 for channel in self.__channelList: |
264 for channel in self.__channelList: |
267 if channel.name() == name: |
265 if channel.name() == name: |
268 return |
266 return |
269 |
267 |
|
268 from .IrcChannelWidget import IrcChannelWidget |
270 channel = IrcChannelWidget(self) |
269 channel = IrcChannelWidget(self) |
271 channel.setName(name) |
270 channel.setName(name) |
272 channel.setUserName(self.__nickName) |
271 channel.setUserName(self.__nickName) |
273 identity = self.__ircNetworkManager.getIdentity(self.__identityName) |
272 identity = self.__ircNetworkManager.getIdentity(self.__identityName) |
274 channel.setPartMessage(identity.getPartMessage()) |
273 channel.setPartMessage(identity.getPartMessage()) |
323 """ |
322 """ |
324 Private slot to open a private chat with the given user. |
323 Private slot to open a private chat with the given user. |
325 |
324 |
326 @param name name of the user (string) |
325 @param name name of the user (string) |
327 """ |
326 """ |
|
327 from .IrcChannelWidget import IrcChannelWidget |
328 channel = IrcChannelWidget(self) |
328 channel = IrcChannelWidget(self) |
329 channel.setName(self.__nickName) |
329 channel.setName(self.__nickName) |
330 channel.setUserName(self.__nickName) |
330 channel.setUserName(self.__nickName) |
331 identity = self.__ircNetworkManager.getIdentity(self.__identityName) |
331 identity = self.__ircNetworkManager.getIdentity(self.__identityName) |
332 channel.setPartMessage(identity.getPartMessage()) |
332 channel.setPartMessage(identity.getPartMessage()) |