Network/IRC/IrcIdentitiesEditDialog.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2302
f29e9405c851
child 3057
10516539f238
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
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 """
429 return 431 return
430 432
431 self.__refreshCurrentIdentity() 433 self.__refreshCurrentIdentity()
432 self.__manager.setIdentities(self.__identities) 434 self.__manager.setIdentities(self.__identities)
433 435
434 super().accept() 436 super(IrcIdentitiesEditDialog, self).accept()

eric ide

mercurial