4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing the identities management dialog. |
7 Module implementing the identities management dialog. |
8 """ |
8 """ |
|
9 |
|
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
9 |
11 |
10 import copy |
12 import copy |
11 |
13 |
12 from PyQt4.QtCore import pyqtSlot, Qt, QEvent |
14 from PyQt4.QtCore import pyqtSlot, Qt, QEvent |
13 from PyQt4.QtGui import QDialog, QInputDialog, QLineEdit, QItemSelectionModel |
15 from PyQt4.QtGui import QDialog, QInputDialog, QLineEdit, QItemSelectionModel |
32 |
34 |
33 @param manager reference to the IRC network manager object (IrcNetworkManager) |
35 @param manager reference to the IRC network manager object (IrcNetworkManager) |
34 @param identityName name of the identity to be selected (string) |
36 @param identityName name of the identity to be selected (string) |
35 @param parent reference to the parent widget (QWidget) |
37 @param parent reference to the parent widget (QWidget) |
36 """ |
38 """ |
37 super().__init__(parent) |
39 super(IrcIdentitiesEditDialog, self).__init__(parent) |
38 self.setupUi(self) |
40 self.setupUi(self) |
39 |
41 |
40 self.addButton.setIcon(UI.PixmapCache.getIcon("plus.png")) |
42 self.addButton.setIcon(UI.PixmapCache.getIcon("plus.png")) |
41 self.copyButton.setIcon(UI.PixmapCache.getIcon("editCopy.png")) |
43 self.copyButton.setIcon(UI.PixmapCache.getIcon("editCopy.png")) |
42 self.renameButton.setIcon(UI.PixmapCache.getIcon("editRename.png")) |
44 self.renameButton.setIcon(UI.PixmapCache.getIcon("editRename.png")) |
78 if obj == self.nicknameEdit and evt.type() == QEvent.KeyPress: |
80 if obj == self.nicknameEdit and evt.type() == QEvent.KeyPress: |
79 if evt.key() in [Qt.Key_Enter, Qt.Key_Return]: |
81 if evt.key() in [Qt.Key_Enter, Qt.Key_Return]: |
80 self.on_nicknameAddButton_clicked() |
82 self.on_nicknameAddButton_clicked() |
81 return True |
83 return True |
82 |
84 |
83 return super().eventFilter(obj, evt) |
85 return super(IrcIdentitiesEditDialog, self).eventFilter(obj, evt) |
84 |
86 |
85 def __updateIdentitiesButtons(self): |
87 def __updateIdentitiesButtons(self): |
86 """ |
88 """ |
87 Private slot to update the status of the identity related buttons. |
89 Private slot to update the status of the identity related buttons. |
88 """ |
90 """ |