89 class ConfigurationWidget(QWidget): |
89 class ConfigurationWidget(QWidget): |
90 """ |
90 """ |
91 Class implementing a dialog for the configuration of eric. |
91 Class implementing a dialog for the configuration of eric. |
92 |
92 |
93 @signal preferencesChanged() emitted after settings have been changed |
93 @signal preferencesChanged() emitted after settings have been changed |
94 @signal masterPasswordChanged(str, str) emitted after the master |
94 @signal mainPasswordChanged(str, str) emitted after the main |
95 password has been changed with the old and the new password |
95 password has been changed with the old and the new password |
96 @signal accepted() emitted to indicate acceptance of the changes |
96 @signal accepted() emitted to indicate acceptance of the changes |
97 @signal rejected() emitted to indicate rejection of the changes |
97 @signal rejected() emitted to indicate rejection of the changes |
98 """ |
98 """ |
99 |
99 |
100 preferencesChanged = pyqtSignal() |
100 preferencesChanged = pyqtSignal() |
101 masterPasswordChanged = pyqtSignal(str, str) |
101 mainPasswordChanged = pyqtSignal(str, str) |
102 accepted = pyqtSignal() |
102 accepted = pyqtSignal() |
103 rejected = pyqtSignal() |
103 rejected = pyqtSignal() |
104 |
104 |
105 def __init__( |
105 def __init__( |
106 self, |
106 self, |
1415 class ConfigurationDialog(QDialog): |
1415 class ConfigurationDialog(QDialog): |
1416 """ |
1416 """ |
1417 Class for the dialog variant. |
1417 Class for the dialog variant. |
1418 |
1418 |
1419 @signal preferencesChanged() emitted after settings have been changed |
1419 @signal preferencesChanged() emitted after settings have been changed |
1420 @signal masterPasswordChanged(str, str) emitted after the master |
1420 @signal mainPasswordChanged(str, str) emitted after the main |
1421 password has been changed with the old and the new password |
1421 password has been changed with the old and the new password |
1422 """ |
1422 """ |
1423 |
1423 |
1424 preferencesChanged = pyqtSignal() |
1424 preferencesChanged = pyqtSignal() |
1425 masterPasswordChanged = pyqtSignal(str, str) |
1425 mainPasswordChanged = pyqtSignal(str, str) |
1426 |
1426 |
1427 def __init__( |
1427 def __init__( |
1428 self, |
1428 self, |
1429 parent=None, |
1429 parent=None, |
1430 name=None, |
1430 name=None, |
1472 self.setWindowTitle(self.cw.windowTitle()) |
1472 self.setWindowTitle(self.cw.windowTitle()) |
1473 |
1473 |
1474 self.cw.accepted.connect(self.accept) |
1474 self.cw.accepted.connect(self.accept) |
1475 self.cw.rejected.connect(self.reject) |
1475 self.cw.rejected.connect(self.reject) |
1476 self.cw.preferencesChanged.connect(self.__preferencesChanged) |
1476 self.cw.preferencesChanged.connect(self.__preferencesChanged) |
1477 self.cw.masterPasswordChanged.connect(self.__masterPasswordChanged) |
1477 self.cw.mainPasswordChanged.connect(self.__mainPasswordChanged) |
1478 |
1478 |
1479 def __preferencesChanged(self): |
1479 def __preferencesChanged(self): |
1480 """ |
1480 """ |
1481 Private slot to handle a change of the preferences. |
1481 Private slot to handle a change of the preferences. |
1482 """ |
1482 """ |
1483 self.preferencesChanged.emit() |
1483 self.preferencesChanged.emit() |
1484 |
1484 |
1485 def __masterPasswordChanged(self, oldPassword, newPassword): |
1485 def __mainPasswordChanged(self, oldPassword, newPassword): |
1486 """ |
1486 """ |
1487 Private slot to handle the change of the master password. |
1487 Private slot to handle the change of the main password. |
1488 |
1488 |
1489 @param oldPassword current master password (string) |
1489 @param oldPassword current password |
1490 @param newPassword new master password (string) |
1490 @type str |
1491 """ |
1491 @param newPassword new password |
1492 self.masterPasswordChanged.emit(oldPassword, newPassword) |
1492 @type str |
|
1493 """ |
|
1494 self.mainPasswordChanged.emit(oldPassword, newPassword) |
1493 |
1495 |
1494 def showConfigurationPageByName(self, pageName): |
1496 def showConfigurationPageByName(self, pageName): |
1495 """ |
1497 """ |
1496 Public slot to show a named configuration page. |
1498 Public slot to show a named configuration page. |
1497 |
1499 |