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"), |