src/eric7/Network/IRC/IrcIdentitiesEditDialog.py

branch
eric7
changeset 10428
a071d4065202
parent 9664
4ae1d1e277c2
child 10439
21c28b0f9e41
equal deleted inserted replaced
10427:3733e2b23cf7 10428:a071d4065202
28 def __init__(self, manager, identityName, parent=None): 28 def __init__(self, manager, identityName, parent=None):
29 """ 29 """
30 Constructor 30 Constructor
31 31
32 @param manager reference to the IRC network manager object 32 @param manager reference to the IRC network manager object
33 (IrcNetworkManager) 33 @type IrcNetworkManager
34 @param identityName name of the identity to be selected (string) 34 @param identityName name of the identity to be selected
35 @param parent reference to the parent widget (QWidget) 35 @type str
36 @param parent reference to the parent widget
37 @type QWidget
36 """ 38 """
37 super().__init__(parent) 39 super().__init__(parent)
38 self.setupUi(self) 40 self.setupUi(self)
39 41
40 self.addButton.setIcon(EricPixmapCache.getIcon("plus")) 42 self.addButton.setIcon(EricPixmapCache.getIcon("plus"))
71 73
72 def eventFilter(self, obj, evt): 74 def eventFilter(self, obj, evt):
73 """ 75 """
74 Public method to handle events for other objects. 76 Public method to handle events for other objects.
75 77
76 @param obj reference to the object (QObject) 78 @param obj reference to the object
77 @param evt reference to the event (QEvent) 79 @type QObject
78 @return flag indicating that the event should be filtered out (boolean) 80 @param evt reference to the event
81 @type QEvent
82 @return flag indicating that the event should be filtered out
83 @rtype bool
79 """ 84 """
80 if ( 85 if (
81 obj == self.nicknameEdit 86 obj == self.nicknameEdit
82 and evt.type() == QEvent.Type.KeyPress 87 and evt.type() == QEvent.Type.KeyPress
83 and evt.key() in [Qt.Key.Key_Enter, Qt.Key.Key_Return] 88 and evt.key() in [Qt.Key.Key_Enter, Qt.Key.Key_Return]
172 177
173 def __checkCurrentIdentity(self): 178 def __checkCurrentIdentity(self):
174 """ 179 """
175 Private method to check the data for the current identity. 180 Private method to check the data for the current identity.
176 181
177 @return flag indicating a successful check (boolean) 182 @return flag indicating a successful check
183 @rtype bool
178 """ 184 """
179 if self.nicknamesList.count() == 0: 185 if self.nicknamesList.count() == 0:
180 EricMessageBox.critical( 186 EricMessageBox.critical(
181 self, 187 self,
182 self.tr("Edit Identity"), 188 self.tr("Edit Identity"),
409 @pyqtSlot(str) 415 @pyqtSlot(str)
410 def on_nicknameEdit_textEdited(self, nick): 416 def on_nicknameEdit_textEdited(self, nick):
411 """ 417 """
412 Private slot handling a change of the nick name. 418 Private slot handling a change of the nick name.
413 419
414 @param nick new nick name (string) 420 @param nick new nick name
421 @type str
415 """ 422 """
416 sel = self.nicknamesList.selectedItems() 423 sel = self.nicknamesList.selectedItems()
417 if sel: 424 if sel:
418 sel[0].setText(nick) 425 sel[0].setText(nick)
419 426

eric ide

mercurial