diff --git a/README.md b/README.md index d59dacc..73fb5c2 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Building on Windows - Download and install the latest Python 2.7 version from https://www.python.org/downloads/windows/ - Install Microsoft Visual C++ Compiler for Python 2.7 from http://www.microsoft.com/en-us/download/details.aspx?id=44266 - - Download and install PyQt4 for Python 2.7 from https://www.riverbankcomputing.com/software/pyqt/download + - Download and install PyQt5 for Python 2.7 from https://www.riverbankcomputing.com/software/pyqt/download5 - Install the btchip library (open a command prompt and enter c:\python27\scripts\pip install btchip) Building/Installing on FreeBSD diff --git a/btchip/btchipPersoWizard.py b/btchip/btchipPersoWizard.py index 53a0e77..ad20a7e 100644 --- a/btchip/btchipPersoWizard.py +++ b/btchip/btchipPersoWizard.py @@ -19,8 +19,8 @@ import sys -from PyQt4 import QtCore, QtGui -from PyQt4.QtGui import QDialog, QMessageBox +from PyQt5 import QtCore, QtGui, QtWidgets +from PyQt5.QtWidgets import QDialog, QMessageBox try: from mnemonic import Mnemonic @@ -72,7 +72,7 @@ def waitDongle(currentDialog, persoData): raise Exception("Aborted by user") -class StartBTChipPersoDialog(QtGui.QDialog): +class StartBTChipPersoDialog(QDialog): def __init__(self): QDialog.__init__(self, None) @@ -94,7 +94,7 @@ def processNext(self): def processCancel(self): self.reject() -class SeedDialog(QtGui.QDialog): +class SeedDialog(QDialog): def __init__(self, persoData, parent = None): QDialog.__init__(self, parent) @@ -146,7 +146,7 @@ def processCancel(self): self.reject() self.persoData['main'].reject() -class SecurityDialog(QtGui.QDialog): +class SecurityDialog(QDialog): def __init__(self, persoData, parent = None): QDialog.__init__(self, parent) @@ -179,7 +179,7 @@ def processCancel(self): self.reject() self.persoData['main'].reject() -class ConfigDialog(QtGui.QDialog): +class ConfigDialog(QDialog): def __init__(self, persoData, parent = None): QDialog.__init__(self, parent) @@ -229,7 +229,7 @@ def processCancel(self): self.reject() self.persoData['main'].reject() -class FinalizeDialog(QtGui.QDialog): +class FinalizeDialog(QDialog): def __init__(self, persoData, parent = None): QDialog.__init__(self, parent) @@ -288,7 +288,7 @@ def finish(self): self.accept() self.persoData['main'].accept() -class SeedBackupStart(QtGui.QDialog): +class SeedBackupStart(QDialog): def __init__(self, persoData, parent = None): QDialog.__init__(self, parent) @@ -302,7 +302,7 @@ def processNext(self): self.hide() dialog.exec_() -class SeedBackupUnplug(QtGui.QDialog): +class SeedBackupUnplug(QDialog): def __init__(self, persoData, parent = None): QDialog.__init__(self, parent) @@ -316,7 +316,7 @@ def processNext(self): self.hide() dialog.exec_() -class SeedBackupInstructions(QtGui.QDialog): +class SeedBackupInstructions(QDialog): def __init__(self, persoData, parent = None): QDialog.__init__(self, parent) @@ -330,7 +330,7 @@ def processNext(self): self.hide() dialog.exec_() -class SeedBackupVerify(QtGui.QDialog): +class SeedBackupVerify(QDialog): def __init__(self, persoData, parent = None): QDialog.__init__(self, parent) @@ -370,7 +370,7 @@ def seedKO(self): if __name__ == "__main__": - app = QtGui.QApplication(sys.argv) + app = QtWidgets.QApplication(sys.argv) dialog = StartBTChipPersoDialog() dialog.show() app.exec_() diff --git a/btchip/ui/personalization00start.py b/btchip/ui/personalization00start.py index 0429bee..4431e65 100644 --- a/btchip/ui/personalization00start.py +++ b/btchip/ui/personalization00start.py @@ -2,23 +2,17 @@ # Form implementation generated from reading ui file 'personalization-00-start.ui' # -# Created: Fri Sep 19 15:03:25 2014 -# by: PyQt4 UI code generator 4.9.1 +# Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! -from PyQt4 import QtCore, QtGui - -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except AttributeError: - _fromUtf8 = lambda s: s +from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): - Dialog.setObjectName(_fromUtf8("Dialog")) + Dialog.setObjectName("Dialog") Dialog.resize(400, 231) - self.TitleLabel = QtGui.QLabel(Dialog) + self.TitleLabel = QtWidgets.QLabel(Dialog) self.TitleLabel.setGeometry(QtCore.QRect(120, 20, 231, 31)) font = QtGui.QFont() font.setPointSize(20) @@ -26,30 +20,31 @@ def setupUi(self, Dialog): font.setItalic(True) font.setWeight(75) self.TitleLabel.setFont(font) - self.TitleLabel.setObjectName(_fromUtf8("TitleLabel")) - self.IntroLabel = QtGui.QLabel(Dialog) + self.TitleLabel.setObjectName("TitleLabel") + self.IntroLabel = QtWidgets.QLabel(Dialog) self.IntroLabel.setGeometry(QtCore.QRect(20, 60, 351, 61)) self.IntroLabel.setWordWrap(True) - self.IntroLabel.setObjectName(_fromUtf8("IntroLabel")) - self.NextButton = QtGui.QPushButton(Dialog) + self.IntroLabel.setObjectName("IntroLabel") + self.NextButton = QtWidgets.QPushButton(Dialog) self.NextButton.setGeometry(QtCore.QRect(310, 200, 75, 25)) - self.NextButton.setObjectName(_fromUtf8("NextButton")) - self.arningLabel = QtGui.QLabel(Dialog) + self.NextButton.setObjectName("NextButton") + self.arningLabel = QtWidgets.QLabel(Dialog) self.arningLabel.setGeometry(QtCore.QRect(20, 120, 351, 81)) self.arningLabel.setWordWrap(True) - self.arningLabel.setObjectName(_fromUtf8("arningLabel")) - self.CancelButton = QtGui.QPushButton(Dialog) + self.arningLabel.setObjectName("arningLabel") + self.CancelButton = QtWidgets.QPushButton(Dialog) self.CancelButton.setGeometry(QtCore.QRect(20, 200, 75, 25)) - self.CancelButton.setObjectName(_fromUtf8("CancelButton")) + self.CancelButton.setObjectName("CancelButton") self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): - Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "BTChip setup", None, QtGui.QApplication.UnicodeUTF8)) - self.TitleLabel.setText(QtGui.QApplication.translate("Dialog", "BTChip setup", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel.setText(QtGui.QApplication.translate("Dialog", "Your BTChip dongle is not set up - you\'ll be able to create a new wallet, or restore an existing one, and choose your security profile.", None, QtGui.QApplication.UnicodeUTF8)) - self.NextButton.setText(QtGui.QApplication.translate("Dialog", "Next", None, QtGui.QApplication.UnicodeUTF8)) - self.arningLabel.setText(QtGui.QApplication.translate("Dialog", "Sensitive information including your dongle PIN will be exchanged during this setup phase - it is recommended to execute it on a secure computer, disconnected from any network, especially if you restore a wallet backup.", None, QtGui.QApplication.UnicodeUTF8)) - self.CancelButton.setText(QtGui.QApplication.translate("Dialog", "Cancel", None, QtGui.QApplication.UnicodeUTF8)) + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "BTChip setup")) + self.TitleLabel.setText(_translate("Dialog", "BTChip setup")) + self.IntroLabel.setText(_translate("Dialog", "Your BTChip dongle is not set up - you\'ll be able to create a new wallet, or restore an existing one, and choose your security profile.")) + self.NextButton.setText(_translate("Dialog", "Next")) + self.arningLabel.setText(_translate("Dialog", "Sensitive information including your dongle PIN will be exchanged during this setup phase - it is recommended to execute it on a secure computer, disconnected from any network, especially if you restore a wallet backup.")) + self.CancelButton.setText(_translate("Dialog", "Cancel")) diff --git a/btchip/ui/personalization01seed.py b/btchip/ui/personalization01seed.py index 60fa2ae..13e91c6 100644 --- a/btchip/ui/personalization01seed.py +++ b/btchip/ui/personalization01seed.py @@ -2,23 +2,17 @@ # Form implementation generated from reading ui file 'personalization-01-seed.ui' # -# Created: Thu Aug 28 22:26:22 2014 -# by: PyQt4 UI code generator 4.9.1 +# Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! -from PyQt4 import QtCore, QtGui - -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except AttributeError: - _fromUtf8 = lambda s: s +from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): - Dialog.setObjectName(_fromUtf8("Dialog")) + Dialog.setObjectName("Dialog") Dialog.resize(400, 300) - self.TitleLabel = QtGui.QLabel(Dialog) + self.TitleLabel = QtWidgets.QLabel(Dialog) self.TitleLabel.setGeometry(QtCore.QRect(50, 20, 311, 31)) font = QtGui.QFont() font.setPointSize(20) @@ -26,52 +20,53 @@ def setupUi(self, Dialog): font.setItalic(True) font.setWeight(75) self.TitleLabel.setFont(font) - self.TitleLabel.setObjectName(_fromUtf8("TitleLabel")) - self.IntroLabel = QtGui.QLabel(Dialog) + self.TitleLabel.setObjectName("TitleLabel") + self.IntroLabel = QtWidgets.QLabel(Dialog) self.IntroLabel.setGeometry(QtCore.QRect(20, 60, 351, 61)) self.IntroLabel.setWordWrap(True) - self.IntroLabel.setObjectName(_fromUtf8("IntroLabel")) - self.NewWalletButton = QtGui.QRadioButton(Dialog) + self.IntroLabel.setObjectName("IntroLabel") + self.NewWalletButton = QtWidgets.QRadioButton(Dialog) self.NewWalletButton.setGeometry(QtCore.QRect(20, 130, 94, 21)) self.NewWalletButton.setChecked(True) - self.NewWalletButton.setObjectName(_fromUtf8("NewWalletButton")) - self.buttonGroup = QtGui.QButtonGroup(Dialog) - self.buttonGroup.setObjectName(_fromUtf8("buttonGroup")) + self.NewWalletButton.setObjectName("NewWalletButton") + self.buttonGroup = QtWidgets.QButtonGroup(Dialog) + self.buttonGroup.setObjectName("buttonGroup") self.buttonGroup.addButton(self.NewWalletButton) - self.RestoreWalletButton = QtGui.QRadioButton(Dialog) + self.RestoreWalletButton = QtWidgets.QRadioButton(Dialog) self.RestoreWalletButton.setGeometry(QtCore.QRect(20, 180, 171, 21)) - self.RestoreWalletButton.setObjectName(_fromUtf8("RestoreWalletButton")) + self.RestoreWalletButton.setObjectName("RestoreWalletButton") self.buttonGroup.addButton(self.RestoreWalletButton) - self.seed = QtGui.QLineEdit(Dialog) + self.seed = QtWidgets.QLineEdit(Dialog) self.seed.setEnabled(False) self.seed.setGeometry(QtCore.QRect(50, 210, 331, 21)) - self.seed.setEchoMode(QtGui.QLineEdit.Normal) - self.seed.setObjectName(_fromUtf8("seed")) - self.CancelButton = QtGui.QPushButton(Dialog) + self.seed.setEchoMode(QtWidgets.QLineEdit.Normal) + self.seed.setObjectName("seed") + self.CancelButton = QtWidgets.QPushButton(Dialog) self.CancelButton.setGeometry(QtCore.QRect(10, 270, 75, 25)) - self.CancelButton.setObjectName(_fromUtf8("CancelButton")) - self.NextButton = QtGui.QPushButton(Dialog) + self.CancelButton.setObjectName("CancelButton") + self.NextButton = QtWidgets.QPushButton(Dialog) self.NextButton.setGeometry(QtCore.QRect(320, 270, 75, 25)) - self.NextButton.setObjectName(_fromUtf8("NextButton")) - self.mnemonicNotAvailableLabel = QtGui.QLabel(Dialog) + self.NextButton.setObjectName("NextButton") + self.mnemonicNotAvailableLabel = QtWidgets.QLabel(Dialog) self.mnemonicNotAvailableLabel.setGeometry(QtCore.QRect(130, 240, 171, 31)) font = QtGui.QFont() font.setItalic(True) self.mnemonicNotAvailableLabel.setFont(font) self.mnemonicNotAvailableLabel.setWordWrap(True) - self.mnemonicNotAvailableLabel.setObjectName(_fromUtf8("mnemonicNotAvailableLabel")) + self.mnemonicNotAvailableLabel.setObjectName("mnemonicNotAvailableLabel") self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): - Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "BTChip setup - seed", None, QtGui.QApplication.UnicodeUTF8)) - self.TitleLabel.setText(QtGui.QApplication.translate("Dialog", "BTChip setup - seed (1/3)", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel.setText(QtGui.QApplication.translate("Dialog", "Please select an option : either create a new wallet or restore an existing one", None, QtGui.QApplication.UnicodeUTF8)) - self.NewWalletButton.setText(QtGui.QApplication.translate("Dialog", "New Wallet", None, QtGui.QApplication.UnicodeUTF8)) - self.RestoreWalletButton.setText(QtGui.QApplication.translate("Dialog", "Restore wallet backup", None, QtGui.QApplication.UnicodeUTF8)) - self.seed.setPlaceholderText(QtGui.QApplication.translate("Dialog", "Enter an hexadecimal seed or a BIP 39 mnemonic code", None, QtGui.QApplication.UnicodeUTF8)) - self.CancelButton.setText(QtGui.QApplication.translate("Dialog", "Cancel", None, QtGui.QApplication.UnicodeUTF8)) - self.NextButton.setText(QtGui.QApplication.translate("Dialog", "Next", None, QtGui.QApplication.UnicodeUTF8)) - self.mnemonicNotAvailableLabel.setText(QtGui.QApplication.translate("Dialog", "Mnemonic API is not available", None, QtGui.QApplication.UnicodeUTF8)) + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "BTChip setup - seed")) + self.TitleLabel.setText(_translate("Dialog", "BTChip setup - seed (1/3)")) + self.IntroLabel.setText(_translate("Dialog", "Please select an option : either create a new wallet or restore an existing one")) + self.NewWalletButton.setText(_translate("Dialog", "New Wallet")) + self.RestoreWalletButton.setText(_translate("Dialog", "Restore wallet backup")) + self.seed.setPlaceholderText(_translate("Dialog", "Enter an hexadecimal seed or a BIP 39 mnemonic code")) + self.CancelButton.setText(_translate("Dialog", "Cancel")) + self.NextButton.setText(_translate("Dialog", "Next")) + self.mnemonicNotAvailableLabel.setText(_translate("Dialog", "Mnemonic API is not available")) diff --git a/btchip/ui/personalization02security.py b/btchip/ui/personalization02security.py index f65c289..c074225 100644 --- a/btchip/ui/personalization02security.py +++ b/btchip/ui/personalization02security.py @@ -2,23 +2,17 @@ # Form implementation generated from reading ui file 'personalization-02-security.ui' # -# Created: Thu Aug 28 22:26:22 2014 -# by: PyQt4 UI code generator 4.9.1 +# Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! -from PyQt4 import QtCore, QtGui - -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except AttributeError: - _fromUtf8 = lambda s: s +from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): - Dialog.setObjectName(_fromUtf8("Dialog")) + Dialog.setObjectName("Dialog") Dialog.resize(400, 503) - self.TitleLabel = QtGui.QLabel(Dialog) + self.TitleLabel = QtWidgets.QLabel(Dialog) self.TitleLabel.setGeometry(QtCore.QRect(20, 20, 361, 31)) font = QtGui.QFont() font.setPointSize(20) @@ -26,71 +20,72 @@ def setupUi(self, Dialog): font.setItalic(True) font.setWeight(75) self.TitleLabel.setFont(font) - self.TitleLabel.setObjectName(_fromUtf8("TitleLabel")) - self.IntroLabel = QtGui.QLabel(Dialog) + self.TitleLabel.setObjectName("TitleLabel") + self.IntroLabel = QtWidgets.QLabel(Dialog) self.IntroLabel.setGeometry(QtCore.QRect(10, 60, 351, 61)) self.IntroLabel.setWordWrap(True) - self.IntroLabel.setObjectName(_fromUtf8("IntroLabel")) - self.HardenedButton = QtGui.QRadioButton(Dialog) + self.IntroLabel.setObjectName("IntroLabel") + self.HardenedButton = QtWidgets.QRadioButton(Dialog) self.HardenedButton.setGeometry(QtCore.QRect(20, 110, 81, 21)) self.HardenedButton.setChecked(True) - self.HardenedButton.setObjectName(_fromUtf8("HardenedButton")) - self.buttonGroup = QtGui.QButtonGroup(Dialog) - self.buttonGroup.setObjectName(_fromUtf8("buttonGroup")) + self.HardenedButton.setObjectName("HardenedButton") + self.buttonGroup = QtWidgets.QButtonGroup(Dialog) + self.buttonGroup.setObjectName("buttonGroup") self.buttonGroup.addButton(self.HardenedButton) - self.HardenedButton_2 = QtGui.QRadioButton(Dialog) + self.HardenedButton_2 = QtWidgets.QRadioButton(Dialog) self.HardenedButton_2.setGeometry(QtCore.QRect(20, 210, 81, 21)) - self.HardenedButton_2.setObjectName(_fromUtf8("HardenedButton_2")) + self.HardenedButton_2.setObjectName("HardenedButton_2") self.buttonGroup.addButton(self.HardenedButton_2) - self.IntroLabel_2 = QtGui.QLabel(Dialog) + self.IntroLabel_2 = QtWidgets.QLabel(Dialog) self.IntroLabel_2.setGeometry(QtCore.QRect(50, 140, 351, 61)) self.IntroLabel_2.setWordWrap(True) - self.IntroLabel_2.setObjectName(_fromUtf8("IntroLabel_2")) - self.IntroLabel_3 = QtGui.QLabel(Dialog) + self.IntroLabel_2.setObjectName("IntroLabel_2") + self.IntroLabel_3 = QtWidgets.QLabel(Dialog) self.IntroLabel_3.setGeometry(QtCore.QRect(50, 230, 351, 61)) self.IntroLabel_3.setWordWrap(True) - self.IntroLabel_3.setObjectName(_fromUtf8("IntroLabel_3")) - self.CancelButton = QtGui.QPushButton(Dialog) + self.IntroLabel_3.setObjectName("IntroLabel_3") + self.CancelButton = QtWidgets.QPushButton(Dialog) self.CancelButton.setGeometry(QtCore.QRect(10, 470, 75, 25)) - self.CancelButton.setObjectName(_fromUtf8("CancelButton")) - self.NextButton = QtGui.QPushButton(Dialog) + self.CancelButton.setObjectName("CancelButton") + self.NextButton = QtWidgets.QPushButton(Dialog) self.NextButton.setGeometry(QtCore.QRect(310, 470, 75, 25)) - self.NextButton.setObjectName(_fromUtf8("NextButton")) - self.IntroLabel_4 = QtGui.QLabel(Dialog) + self.NextButton.setObjectName("NextButton") + self.IntroLabel_4 = QtWidgets.QLabel(Dialog) self.IntroLabel_4.setGeometry(QtCore.QRect(10, 300, 351, 61)) self.IntroLabel_4.setWordWrap(True) - self.IntroLabel_4.setObjectName(_fromUtf8("IntroLabel_4")) - self.IntroLabel_5 = QtGui.QLabel(Dialog) + self.IntroLabel_4.setObjectName("IntroLabel_4") + self.IntroLabel_5 = QtWidgets.QLabel(Dialog) self.IntroLabel_5.setGeometry(QtCore.QRect(20, 380, 161, 31)) self.IntroLabel_5.setWordWrap(True) - self.IntroLabel_5.setObjectName(_fromUtf8("IntroLabel_5")) - self.pin1 = QtGui.QLineEdit(Dialog) + self.IntroLabel_5.setObjectName("IntroLabel_5") + self.pin1 = QtWidgets.QLineEdit(Dialog) self.pin1.setGeometry(QtCore.QRect(210, 380, 161, 21)) - self.pin1.setEchoMode(QtGui.QLineEdit.Password) - self.pin1.setObjectName(_fromUtf8("pin1")) - self.pin2 = QtGui.QLineEdit(Dialog) + self.pin1.setEchoMode(QtWidgets.QLineEdit.Password) + self.pin1.setObjectName("pin1") + self.pin2 = QtWidgets.QLineEdit(Dialog) self.pin2.setGeometry(QtCore.QRect(210, 420, 161, 21)) - self.pin2.setEchoMode(QtGui.QLineEdit.Password) - self.pin2.setObjectName(_fromUtf8("pin2")) - self.IntroLabel_6 = QtGui.QLabel(Dialog) + self.pin2.setEchoMode(QtWidgets.QLineEdit.Password) + self.pin2.setObjectName("pin2") + self.IntroLabel_6 = QtWidgets.QLabel(Dialog) self.IntroLabel_6.setGeometry(QtCore.QRect(20, 420, 171, 31)) self.IntroLabel_6.setWordWrap(True) - self.IntroLabel_6.setObjectName(_fromUtf8("IntroLabel_6")) + self.IntroLabel_6.setObjectName("IntroLabel_6") self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): - Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "BTChip setup - security", None, QtGui.QApplication.UnicodeUTF8)) - self.TitleLabel.setText(QtGui.QApplication.translate("Dialog", "BTChip setup - security (2/3)", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel.setText(QtGui.QApplication.translate("Dialog", "Please choose a security profile", None, QtGui.QApplication.UnicodeUTF8)) - self.HardenedButton.setText(QtGui.QApplication.translate("Dialog", "Hardened", None, QtGui.QApplication.UnicodeUTF8)) - self.HardenedButton_2.setText(QtGui.QApplication.translate("Dialog", "PIN only", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_2.setText(QtGui.QApplication.translate("Dialog", "You need to remove the dongle and insert it again to get a second factor validation of all operations. Recommended for expert users and to be fully protected against malwares.", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_3.setText(QtGui.QApplication.translate("Dialog", "You only need to enter a PIN once when inserting the dongle. Transactions are not protected against malwares", None, QtGui.QApplication.UnicodeUTF8)) - self.CancelButton.setText(QtGui.QApplication.translate("Dialog", "Cancel", None, QtGui.QApplication.UnicodeUTF8)) - self.NextButton.setText(QtGui.QApplication.translate("Dialog", "Next", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_4.setText(QtGui.QApplication.translate("Dialog", "Please choose a PIN associated to the BTChip dongle. The PIN protects the dongle in case it is stolen, and can be up to 32 characters. The dongle is wiped if a wrong PIN is entered 3 times in a row.", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_5.setText(QtGui.QApplication.translate("Dialog", "Enter the new PIN : ", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_6.setText(QtGui.QApplication.translate("Dialog", "Repeat the new PIN :", None, QtGui.QApplication.UnicodeUTF8)) + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "BTChip setup - security")) + self.TitleLabel.setText(_translate("Dialog", "BTChip setup - security (2/3)")) + self.IntroLabel.setText(_translate("Dialog", "Please choose a security profile")) + self.HardenedButton.setText(_translate("Dialog", "Hardened")) + self.HardenedButton_2.setText(_translate("Dialog", "PIN only")) + self.IntroLabel_2.setText(_translate("Dialog", "You need to remove the dongle and insert it again to get a second factor validation of all operations. Recommended for expert users and to be fully protected against malwares.")) + self.IntroLabel_3.setText(_translate("Dialog", "You only need to enter a PIN once when inserting the dongle. Transactions are not protected against malwares")) + self.CancelButton.setText(_translate("Dialog", "Cancel")) + self.NextButton.setText(_translate("Dialog", "Next")) + self.IntroLabel_4.setText(_translate("Dialog", "Please choose a PIN associated to the BTChip dongle. The PIN protects the dongle in case it is stolen, and can be up to 32 characters. The dongle is wiped if a wrong PIN is entered 3 times in a row.")) + self.IntroLabel_5.setText(_translate("Dialog", "Enter the new PIN : ")) + self.IntroLabel_6.setText(_translate("Dialog", "Repeat the new PIN :")) diff --git a/btchip/ui/personalization03config.py b/btchip/ui/personalization03config.py index 02d96e5..7523799 100644 --- a/btchip/ui/personalization03config.py +++ b/btchip/ui/personalization03config.py @@ -2,23 +2,17 @@ # Form implementation generated from reading ui file 'personalization-03-config.ui' # -# Created: Thu Aug 28 22:26:22 2014 -# by: PyQt4 UI code generator 4.9.1 +# Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! -from PyQt4 import QtCore, QtGui - -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except AttributeError: - _fromUtf8 = lambda s: s +from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): - Dialog.setObjectName(_fromUtf8("Dialog")) + Dialog.setObjectName("Dialog") Dialog.resize(400, 243) - self.TitleLabel = QtGui.QLabel(Dialog) + self.TitleLabel = QtWidgets.QLabel(Dialog) self.TitleLabel.setGeometry(QtCore.QRect(30, 10, 361, 31)) font = QtGui.QFont() font.setPointSize(20) @@ -26,43 +20,44 @@ def setupUi(self, Dialog): font.setItalic(True) font.setWeight(75) self.TitleLabel.setFont(font) - self.TitleLabel.setObjectName(_fromUtf8("TitleLabel")) - self.IntroLabel = QtGui.QLabel(Dialog) + self.TitleLabel.setObjectName("TitleLabel") + self.IntroLabel = QtWidgets.QLabel(Dialog) self.IntroLabel.setGeometry(QtCore.QRect(20, 50, 351, 61)) self.IntroLabel.setWordWrap(True) - self.IntroLabel.setObjectName(_fromUtf8("IntroLabel")) - self.qwertyButton = QtGui.QRadioButton(Dialog) + self.IntroLabel.setObjectName("IntroLabel") + self.qwertyButton = QtWidgets.QRadioButton(Dialog) self.qwertyButton.setGeometry(QtCore.QRect(50, 110, 94, 21)) self.qwertyButton.setChecked(True) - self.qwertyButton.setObjectName(_fromUtf8("qwertyButton")) - self.keyboardGroup = QtGui.QButtonGroup(Dialog) - self.keyboardGroup.setObjectName(_fromUtf8("keyboardGroup")) + self.qwertyButton.setObjectName("qwertyButton") + self.keyboardGroup = QtWidgets.QButtonGroup(Dialog) + self.keyboardGroup.setObjectName("keyboardGroup") self.keyboardGroup.addButton(self.qwertyButton) - self.qwertzButton = QtGui.QRadioButton(Dialog) + self.qwertzButton = QtWidgets.QRadioButton(Dialog) self.qwertzButton.setGeometry(QtCore.QRect(50, 140, 94, 21)) - self.qwertzButton.setObjectName(_fromUtf8("qwertzButton")) + self.qwertzButton.setObjectName("qwertzButton") self.keyboardGroup.addButton(self.qwertzButton) - self.azertyButton = QtGui.QRadioButton(Dialog) + self.azertyButton = QtWidgets.QRadioButton(Dialog) self.azertyButton.setGeometry(QtCore.QRect(50, 170, 94, 21)) - self.azertyButton.setObjectName(_fromUtf8("azertyButton")) + self.azertyButton.setObjectName("azertyButton") self.keyboardGroup.addButton(self.azertyButton) - self.CancelButton = QtGui.QPushButton(Dialog) + self.CancelButton = QtWidgets.QPushButton(Dialog) self.CancelButton.setGeometry(QtCore.QRect(10, 210, 75, 25)) - self.CancelButton.setObjectName(_fromUtf8("CancelButton")) - self.NextButton = QtGui.QPushButton(Dialog) + self.CancelButton.setObjectName("CancelButton") + self.NextButton = QtWidgets.QPushButton(Dialog) self.NextButton.setGeometry(QtCore.QRect(320, 210, 75, 25)) - self.NextButton.setObjectName(_fromUtf8("NextButton")) + self.NextButton.setObjectName("NextButton") self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): - Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "BTChip setup", None, QtGui.QApplication.UnicodeUTF8)) - self.TitleLabel.setText(QtGui.QApplication.translate("Dialog", "BTChip setup - config (3/3)", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel.setText(QtGui.QApplication.translate("Dialog", "Please select your keyboard type to type the second factor confirmation", None, QtGui.QApplication.UnicodeUTF8)) - self.qwertyButton.setText(QtGui.QApplication.translate("Dialog", "QWERTY", None, QtGui.QApplication.UnicodeUTF8)) - self.qwertzButton.setText(QtGui.QApplication.translate("Dialog", "QWERTZ", None, QtGui.QApplication.UnicodeUTF8)) - self.azertyButton.setText(QtGui.QApplication.translate("Dialog", "AZERTY", None, QtGui.QApplication.UnicodeUTF8)) - self.CancelButton.setText(QtGui.QApplication.translate("Dialog", "Cancel", None, QtGui.QApplication.UnicodeUTF8)) - self.NextButton.setText(QtGui.QApplication.translate("Dialog", "Next", None, QtGui.QApplication.UnicodeUTF8)) + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "BTChip setup")) + self.TitleLabel.setText(_translate("Dialog", "BTChip setup - config (3/3)")) + self.IntroLabel.setText(_translate("Dialog", "Please select your keyboard type to type the second factor confirmation")) + self.qwertyButton.setText(_translate("Dialog", "QWERTY")) + self.qwertzButton.setText(_translate("Dialog", "QWERTZ")) + self.azertyButton.setText(_translate("Dialog", "AZERTY")) + self.CancelButton.setText(_translate("Dialog", "Cancel")) + self.NextButton.setText(_translate("Dialog", "Next")) diff --git a/btchip/ui/personalization04finalize.py b/btchip/ui/personalization04finalize.py index 00f20d3..67ca2b1 100644 --- a/btchip/ui/personalization04finalize.py +++ b/btchip/ui/personalization04finalize.py @@ -2,23 +2,17 @@ # Form implementation generated from reading ui file 'personalization-04-finalize.ui' # -# Created: Thu Aug 28 22:26:22 2014 -# by: PyQt4 UI code generator 4.9.1 +# Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! -from PyQt4 import QtCore, QtGui - -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except AttributeError: - _fromUtf8 = lambda s: s +from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): - Dialog.setObjectName(_fromUtf8("Dialog")) + Dialog.setObjectName("Dialog") Dialog.resize(400, 267) - self.TitleLabel = QtGui.QLabel(Dialog) + self.TitleLabel = QtWidgets.QLabel(Dialog) self.TitleLabel.setGeometry(QtCore.QRect(20, 20, 361, 31)) font = QtGui.QFont() font.setPointSize(20) @@ -26,38 +20,39 @@ def setupUi(self, Dialog): font.setItalic(True) font.setWeight(75) self.TitleLabel.setFont(font) - self.TitleLabel.setObjectName(_fromUtf8("TitleLabel")) - self.FinishButton = QtGui.QPushButton(Dialog) + self.TitleLabel.setObjectName("TitleLabel") + self.FinishButton = QtWidgets.QPushButton(Dialog) self.FinishButton.setGeometry(QtCore.QRect(320, 230, 75, 25)) - self.FinishButton.setObjectName(_fromUtf8("FinishButton")) - self.IntroLabel_4 = QtGui.QLabel(Dialog) + self.FinishButton.setObjectName("FinishButton") + self.IntroLabel_4 = QtWidgets.QLabel(Dialog) self.IntroLabel_4.setGeometry(QtCore.QRect(10, 70, 351, 61)) self.IntroLabel_4.setWordWrap(True) - self.IntroLabel_4.setObjectName(_fromUtf8("IntroLabel_4")) - self.IntroLabel_5 = QtGui.QLabel(Dialog) + self.IntroLabel_4.setObjectName("IntroLabel_4") + self.IntroLabel_5 = QtWidgets.QLabel(Dialog) self.IntroLabel_5.setGeometry(QtCore.QRect(50, 140, 121, 21)) self.IntroLabel_5.setWordWrap(True) - self.IntroLabel_5.setObjectName(_fromUtf8("IntroLabel_5")) - self.pin1 = QtGui.QLineEdit(Dialog) + self.IntroLabel_5.setObjectName("IntroLabel_5") + self.pin1 = QtWidgets.QLineEdit(Dialog) self.pin1.setGeometry(QtCore.QRect(200, 140, 181, 21)) - self.pin1.setEchoMode(QtGui.QLineEdit.Password) - self.pin1.setObjectName(_fromUtf8("pin1")) - self.remainingAttemptsLabel = QtGui.QLabel(Dialog) + self.pin1.setEchoMode(QtWidgets.QLineEdit.Password) + self.pin1.setObjectName("pin1") + self.remainingAttemptsLabel = QtWidgets.QLabel(Dialog) self.remainingAttemptsLabel.setGeometry(QtCore.QRect(120, 170, 171, 31)) font = QtGui.QFont() font.setItalic(True) self.remainingAttemptsLabel.setFont(font) self.remainingAttemptsLabel.setWordWrap(True) - self.remainingAttemptsLabel.setObjectName(_fromUtf8("remainingAttemptsLabel")) + self.remainingAttemptsLabel.setObjectName("remainingAttemptsLabel") self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): - Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "BTChip setup - security", None, QtGui.QApplication.UnicodeUTF8)) - self.TitleLabel.setText(QtGui.QApplication.translate("Dialog", "BTChip setup - completed", None, QtGui.QApplication.UnicodeUTF8)) - self.FinishButton.setText(QtGui.QApplication.translate("Dialog", "Finish", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_4.setText(QtGui.QApplication.translate("Dialog", "BTChip setup is completed. Please enter your PIN to validate it then press Finish", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_5.setText(QtGui.QApplication.translate("Dialog", "BTChip PIN :", None, QtGui.QApplication.UnicodeUTF8)) - self.remainingAttemptsLabel.setText(QtGui.QApplication.translate("Dialog", "Remaining attempts", None, QtGui.QApplication.UnicodeUTF8)) + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "BTChip setup - security")) + self.TitleLabel.setText(_translate("Dialog", "BTChip setup - completed")) + self.FinishButton.setText(_translate("Dialog", "Finish")) + self.IntroLabel_4.setText(_translate("Dialog", "BTChip setup is completed. Please enter your PIN to validate it then press Finish")) + self.IntroLabel_5.setText(_translate("Dialog", "BTChip PIN :")) + self.remainingAttemptsLabel.setText(_translate("Dialog", "Remaining attempts")) diff --git a/btchip/ui/personalizationseedbackup01.py b/btchip/ui/personalizationseedbackup01.py index fb1ccbe..4da86ce 100644 --- a/btchip/ui/personalizationseedbackup01.py +++ b/btchip/ui/personalizationseedbackup01.py @@ -2,23 +2,17 @@ # Form implementation generated from reading ui file 'personalization-seedbackup-01.ui' # -# Created: Thu Aug 28 22:26:22 2014 -# by: PyQt4 UI code generator 4.9.1 +# Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! -from PyQt4 import QtCore, QtGui - -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except AttributeError: - _fromUtf8 = lambda s: s +from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): - Dialog.setObjectName(_fromUtf8("Dialog")) + Dialog.setObjectName("Dialog") Dialog.resize(400, 300) - self.TitleLabel = QtGui.QLabel(Dialog) + self.TitleLabel = QtWidgets.QLabel(Dialog) self.TitleLabel.setGeometry(QtCore.QRect(30, 20, 351, 31)) font = QtGui.QFont() font.setPointSize(20) @@ -26,23 +20,23 @@ def setupUi(self, Dialog): font.setItalic(True) font.setWeight(75) self.TitleLabel.setFont(font) - self.TitleLabel.setObjectName(_fromUtf8("TitleLabel")) - self.NextButton = QtGui.QPushButton(Dialog) + self.TitleLabel.setObjectName("TitleLabel") + self.NextButton = QtWidgets.QPushButton(Dialog) self.NextButton.setGeometry(QtCore.QRect(320, 270, 75, 25)) - self.NextButton.setObjectName(_fromUtf8("NextButton")) - self.IntroLabel = QtGui.QLabel(Dialog) + self.NextButton.setObjectName("NextButton") + self.IntroLabel = QtWidgets.QLabel(Dialog) self.IntroLabel.setGeometry(QtCore.QRect(10, 100, 351, 31)) self.IntroLabel.setWordWrap(True) - self.IntroLabel.setObjectName(_fromUtf8("IntroLabel")) - self.IntroLabel_2 = QtGui.QLabel(Dialog) + self.IntroLabel.setObjectName("IntroLabel") + self.IntroLabel_2 = QtWidgets.QLabel(Dialog) self.IntroLabel_2.setGeometry(QtCore.QRect(10, 140, 351, 31)) self.IntroLabel_2.setWordWrap(True) - self.IntroLabel_2.setObjectName(_fromUtf8("IntroLabel_2")) - self.IntroLabel_3 = QtGui.QLabel(Dialog) + self.IntroLabel_2.setObjectName("IntroLabel_2") + self.IntroLabel_3 = QtWidgets.QLabel(Dialog) self.IntroLabel_3.setGeometry(QtCore.QRect(10, 180, 351, 41)) self.IntroLabel_3.setWordWrap(True) - self.IntroLabel_3.setObjectName(_fromUtf8("IntroLabel_3")) - self.TitleLabel_2 = QtGui.QLabel(Dialog) + self.IntroLabel_3.setObjectName("IntroLabel_3") + self.TitleLabel_2 = QtWidgets.QLabel(Dialog) self.TitleLabel_2.setGeometry(QtCore.QRect(90, 60, 251, 31)) font = QtGui.QFont() font.setPointSize(20) @@ -50,22 +44,23 @@ def setupUi(self, Dialog): font.setItalic(True) font.setWeight(75) self.TitleLabel_2.setFont(font) - self.TitleLabel_2.setObjectName(_fromUtf8("TitleLabel_2")) - self.IntroLabel_4 = QtGui.QLabel(Dialog) + self.TitleLabel_2.setObjectName("TitleLabel_2") + self.IntroLabel_4 = QtWidgets.QLabel(Dialog) self.IntroLabel_4.setGeometry(QtCore.QRect(10, 220, 351, 41)) self.IntroLabel_4.setWordWrap(True) - self.IntroLabel_4.setObjectName(_fromUtf8("IntroLabel_4")) + self.IntroLabel_4.setObjectName("IntroLabel_4") self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): - Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "BTChip setup", None, QtGui.QApplication.UnicodeUTF8)) - self.TitleLabel.setText(QtGui.QApplication.translate("Dialog", "BTChip setup - seed backup", None, QtGui.QApplication.UnicodeUTF8)) - self.NextButton.setText(QtGui.QApplication.translate("Dialog", "Next", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel.setText(QtGui.QApplication.translate("Dialog", "A new seed has been generated for your wallet.", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_2.setText(QtGui.QApplication.translate("Dialog", "You must backup this seed and keep it out of reach of hackers (typically by keeping it on paper).", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_3.setText(QtGui.QApplication.translate("Dialog", "You can use this seed to restore your dongle if you lose it or access your funds with any other compatible wallet.", None, QtGui.QApplication.UnicodeUTF8)) - self.TitleLabel_2.setText(QtGui.QApplication.translate("Dialog", "READ CAREFULLY", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_4.setText(QtGui.QApplication.translate("Dialog", "Press Next to start the backuping process.", None, QtGui.QApplication.UnicodeUTF8)) + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "BTChip setup")) + self.TitleLabel.setText(_translate("Dialog", "BTChip setup - seed backup")) + self.NextButton.setText(_translate("Dialog", "Next")) + self.IntroLabel.setText(_translate("Dialog", "A new seed has been generated for your wallet.")) + self.IntroLabel_2.setText(_translate("Dialog", "You must backup this seed and keep it out of reach of hackers (typically by keeping it on paper).")) + self.IntroLabel_3.setText(_translate("Dialog", "You can use this seed to restore your dongle if you lose it or access your funds with any other compatible wallet.")) + self.TitleLabel_2.setText(_translate("Dialog", "READ CAREFULLY")) + self.IntroLabel_4.setText(_translate("Dialog", "Press Next to start the backuping process.")) diff --git a/btchip/ui/personalizationseedbackup02.py b/btchip/ui/personalizationseedbackup02.py index 164aa9c..3faab11 100644 --- a/btchip/ui/personalizationseedbackup02.py +++ b/btchip/ui/personalizationseedbackup02.py @@ -2,23 +2,17 @@ # Form implementation generated from reading ui file 'personalization-seedbackup-02.ui' # -# Created: Thu Aug 28 22:26:22 2014 -# by: PyQt4 UI code generator 4.9.1 +# Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! -from PyQt4 import QtCore, QtGui - -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except AttributeError: - _fromUtf8 = lambda s: s +from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): - Dialog.setObjectName(_fromUtf8("Dialog")) + Dialog.setObjectName("Dialog") Dialog.resize(400, 300) - self.TitleLabel = QtGui.QLabel(Dialog) + self.TitleLabel = QtWidgets.QLabel(Dialog) self.TitleLabel.setGeometry(QtCore.QRect(30, 20, 351, 31)) font = QtGui.QFont() font.setPointSize(20) @@ -26,21 +20,22 @@ def setupUi(self, Dialog): font.setItalic(True) font.setWeight(75) self.TitleLabel.setFont(font) - self.TitleLabel.setObjectName(_fromUtf8("TitleLabel")) - self.IntroLabel = QtGui.QLabel(Dialog) + self.TitleLabel.setObjectName("TitleLabel") + self.IntroLabel = QtWidgets.QLabel(Dialog) self.IntroLabel.setGeometry(QtCore.QRect(20, 70, 351, 31)) self.IntroLabel.setWordWrap(True) - self.IntroLabel.setObjectName(_fromUtf8("IntroLabel")) - self.NextButton = QtGui.QPushButton(Dialog) + self.IntroLabel.setObjectName("IntroLabel") + self.NextButton = QtWidgets.QPushButton(Dialog) self.NextButton.setGeometry(QtCore.QRect(320, 270, 75, 25)) - self.NextButton.setObjectName(_fromUtf8("NextButton")) + self.NextButton.setObjectName("NextButton") self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): - Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "BTChip setup", None, QtGui.QApplication.UnicodeUTF8)) - self.TitleLabel.setText(QtGui.QApplication.translate("Dialog", "BTChip setup - seed backup", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel.setText(QtGui.QApplication.translate("Dialog", "Please disconnect the dongle then press Next", None, QtGui.QApplication.UnicodeUTF8)) - self.NextButton.setText(QtGui.QApplication.translate("Dialog", "Next", None, QtGui.QApplication.UnicodeUTF8)) + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "BTChip setup")) + self.TitleLabel.setText(_translate("Dialog", "BTChip setup - seed backup")) + self.IntroLabel.setText(_translate("Dialog", "Please disconnect the dongle then press Next")) + self.NextButton.setText(_translate("Dialog", "Next")) diff --git a/btchip/ui/personalizationseedbackup03.py b/btchip/ui/personalizationseedbackup03.py index bb10689..472529f 100644 --- a/btchip/ui/personalizationseedbackup03.py +++ b/btchip/ui/personalizationseedbackup03.py @@ -2,23 +2,17 @@ # Form implementation generated from reading ui file 'personalization-seedbackup-03.ui' # -# Created: Thu Aug 28 22:26:22 2014 -# by: PyQt4 UI code generator 4.9.1 +# Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! -from PyQt4 import QtCore, QtGui - -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except AttributeError: - _fromUtf8 = lambda s: s +from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): - Dialog.setObjectName(_fromUtf8("Dialog")) + Dialog.setObjectName("Dialog") Dialog.resize(400, 513) - self.TitleLabel = QtGui.QLabel(Dialog) + self.TitleLabel = QtWidgets.QLabel(Dialog) self.TitleLabel.setGeometry(QtCore.QRect(20, 10, 351, 31)) font = QtGui.QFont() font.setPointSize(20) @@ -26,51 +20,52 @@ def setupUi(self, Dialog): font.setItalic(True) font.setWeight(75) self.TitleLabel.setFont(font) - self.TitleLabel.setObjectName(_fromUtf8("TitleLabel")) - self.IntroLabel = QtGui.QLabel(Dialog) + self.TitleLabel.setObjectName("TitleLabel") + self.IntroLabel = QtWidgets.QLabel(Dialog) self.IntroLabel.setGeometry(QtCore.QRect(20, 50, 351, 61)) self.IntroLabel.setWordWrap(True) - self.IntroLabel.setObjectName(_fromUtf8("IntroLabel")) - self.IntroLabel_2 = QtGui.QLabel(Dialog) + self.IntroLabel.setObjectName("IntroLabel") + self.IntroLabel_2 = QtWidgets.QLabel(Dialog) self.IntroLabel_2.setGeometry(QtCore.QRect(20, 120, 351, 31)) self.IntroLabel_2.setWordWrap(True) - self.IntroLabel_2.setObjectName(_fromUtf8("IntroLabel_2")) - self.IntroLabel_3 = QtGui.QLabel(Dialog) + self.IntroLabel_2.setObjectName("IntroLabel_2") + self.IntroLabel_3 = QtWidgets.QLabel(Dialog) self.IntroLabel_3.setGeometry(QtCore.QRect(20, 160, 351, 51)) self.IntroLabel_3.setWordWrap(True) - self.IntroLabel_3.setObjectName(_fromUtf8("IntroLabel_3")) - self.IntroLabel_4 = QtGui.QLabel(Dialog) + self.IntroLabel_3.setObjectName("IntroLabel_3") + self.IntroLabel_4 = QtWidgets.QLabel(Dialog) self.IntroLabel_4.setGeometry(QtCore.QRect(20, 220, 351, 51)) self.IntroLabel_4.setWordWrap(True) - self.IntroLabel_4.setObjectName(_fromUtf8("IntroLabel_4")) - self.IntroLabel_5 = QtGui.QLabel(Dialog) + self.IntroLabel_4.setObjectName("IntroLabel_4") + self.IntroLabel_5 = QtWidgets.QLabel(Dialog) self.IntroLabel_5.setGeometry(QtCore.QRect(20, 280, 351, 71)) self.IntroLabel_5.setWordWrap(True) - self.IntroLabel_5.setObjectName(_fromUtf8("IntroLabel_5")) - self.IntroLabel_6 = QtGui.QLabel(Dialog) + self.IntroLabel_5.setObjectName("IntroLabel_5") + self.IntroLabel_6 = QtWidgets.QLabel(Dialog) self.IntroLabel_6.setGeometry(QtCore.QRect(20, 350, 351, 51)) self.IntroLabel_6.setWordWrap(True) - self.IntroLabel_6.setObjectName(_fromUtf8("IntroLabel_6")) - self.IntroLabel_7 = QtGui.QLabel(Dialog) + self.IntroLabel_6.setObjectName("IntroLabel_6") + self.IntroLabel_7 = QtWidgets.QLabel(Dialog) self.IntroLabel_7.setGeometry(QtCore.QRect(20, 410, 351, 51)) self.IntroLabel_7.setWordWrap(True) - self.IntroLabel_7.setObjectName(_fromUtf8("IntroLabel_7")) - self.NextButton = QtGui.QPushButton(Dialog) + self.IntroLabel_7.setObjectName("IntroLabel_7") + self.NextButton = QtWidgets.QPushButton(Dialog) self.NextButton.setGeometry(QtCore.QRect(310, 480, 75, 25)) - self.NextButton.setObjectName(_fromUtf8("NextButton")) + self.NextButton.setObjectName("NextButton") self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): - Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "BTChip setup", None, QtGui.QApplication.UnicodeUTF8)) - self.TitleLabel.setText(QtGui.QApplication.translate("Dialog", "BTChip setup - seed backup", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel.setText(QtGui.QApplication.translate("Dialog", "If you do not trust this computer, perform the following steps on a trusted one or a different device. Anything supporting keyboard input will work (smartphone, TV box ...)", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_2.setText(QtGui.QApplication.translate("Dialog", "Open a text editor, set the focus on the text editor, then insert the dongle", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_3.setText(QtGui.QApplication.translate("Dialog", "After a very short time, the dongle will type the seed as hexadecimal (0..9 A..F) characters, starting with \"seed\" and ending with \"X\"", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_4.setText(QtGui.QApplication.translate("Dialog", "If you perform those steps on Windows, a new device driver will be loaded the first time and the seed will not be typed. This is normal.", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_5.setText(QtGui.QApplication.translate("Dialog", "If you perform those steps on Mac, you\'ll get a popup asking you to select a keyboard type the first time and the seed will not be typed. This is normal, just close the popup.", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_6.setText(QtGui.QApplication.translate("Dialog", "If you did not see the seed for any reason, keep the focus on the text editor, unplug and plug the dongle again twice.", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel_7.setText(QtGui.QApplication.translate("Dialog", "Then press Next once you wrote the seed to a safe medium (i.e. paper) and unplugged the dongle", None, QtGui.QApplication.UnicodeUTF8)) - self.NextButton.setText(QtGui.QApplication.translate("Dialog", "Next", None, QtGui.QApplication.UnicodeUTF8)) + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "BTChip setup")) + self.TitleLabel.setText(_translate("Dialog", "BTChip setup - seed backup")) + self.IntroLabel.setText(_translate("Dialog", "If you do not trust this computer, perform the following steps on a trusted one or a different device. Anything supporting keyboard input will work (smartphone, TV box ...)")) + self.IntroLabel_2.setText(_translate("Dialog", "Open a text editor, set the focus on the text editor, then insert the dongle")) + self.IntroLabel_3.setText(_translate("Dialog", "After a very short time, the dongle will type the seed as hexadecimal (0..9 A..F) characters, starting with \"seed\" and ending with \"X\"")) + self.IntroLabel_4.setText(_translate("Dialog", "If you perform those steps on Windows, a new device driver will be loaded the first time and the seed will not be typed. This is normal.")) + self.IntroLabel_5.setText(_translate("Dialog", "If you perform those steps on Mac, you\'ll get a popup asking you to select a keyboard type the first time and the seed will not be typed. This is normal, just close the popup.")) + self.IntroLabel_6.setText(_translate("Dialog", "If you did not see the seed for any reason, keep the focus on the text editor, unplug and plug the dongle again twice.")) + self.IntroLabel_7.setText(_translate("Dialog", "Then press Next once you wrote the seed to a safe medium (i.e. paper) and unplugged the dongle")) + self.NextButton.setText(_translate("Dialog", "Next")) diff --git a/btchip/ui/personalizationseedbackup04.py b/btchip/ui/personalizationseedbackup04.py index e2db35f..6b335b0 100644 --- a/btchip/ui/personalizationseedbackup04.py +++ b/btchip/ui/personalizationseedbackup04.py @@ -2,23 +2,17 @@ # Form implementation generated from reading ui file 'personalization-seedbackup-04.ui' # -# Created: Thu Aug 28 22:26:23 2014 -# by: PyQt4 UI code generator 4.9.1 +# Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! -from PyQt4 import QtCore, QtGui - -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except AttributeError: - _fromUtf8 = lambda s: s +from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): - Dialog.setObjectName(_fromUtf8("Dialog")) + Dialog.setObjectName("Dialog") Dialog.resize(554, 190) - self.TitleLabel = QtGui.QLabel(Dialog) + self.TitleLabel = QtWidgets.QLabel(Dialog) self.TitleLabel.setGeometry(QtCore.QRect(30, 10, 351, 31)) font = QtGui.QFont() font.setPointSize(20) @@ -26,25 +20,26 @@ def setupUi(self, Dialog): font.setItalic(True) font.setWeight(75) self.TitleLabel.setFont(font) - self.TitleLabel.setObjectName(_fromUtf8("TitleLabel")) - self.IntroLabel = QtGui.QLabel(Dialog) + self.TitleLabel.setObjectName("TitleLabel") + self.IntroLabel = QtWidgets.QLabel(Dialog) self.IntroLabel.setGeometry(QtCore.QRect(10, 50, 351, 51)) self.IntroLabel.setWordWrap(True) - self.IntroLabel.setObjectName(_fromUtf8("IntroLabel")) - self.seedOkButton = QtGui.QPushButton(Dialog) + self.IntroLabel.setObjectName("IntroLabel") + self.seedOkButton = QtWidgets.QPushButton(Dialog) self.seedOkButton.setGeometry(QtCore.QRect(20, 140, 501, 25)) - self.seedOkButton.setObjectName(_fromUtf8("seedOkButton")) - self.seedKoButton = QtGui.QPushButton(Dialog) + self.seedOkButton.setObjectName("seedOkButton") + self.seedKoButton = QtWidgets.QPushButton(Dialog) self.seedKoButton.setGeometry(QtCore.QRect(20, 110, 501, 25)) - self.seedKoButton.setObjectName(_fromUtf8("seedKoButton")) + self.seedKoButton.setObjectName("seedKoButton") self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): - Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "BTChip setup", None, QtGui.QApplication.UnicodeUTF8)) - self.TitleLabel.setText(QtGui.QApplication.translate("Dialog", "BTChip setup - seed backup", None, QtGui.QApplication.UnicodeUTF8)) - self.IntroLabel.setText(QtGui.QApplication.translate("Dialog", "Did you see the seed correctly displayed and did you backup it properly ?", None, QtGui.QApplication.UnicodeUTF8)) - self.seedOkButton.setText(QtGui.QApplication.translate("Dialog", "Yes, the seed is backed up properly and kept in a safe place, move on", None, QtGui.QApplication.UnicodeUTF8)) - self.seedKoButton.setText(QtGui.QApplication.translate("Dialog", "No, I didn\'t see the seed. Wipe the dongle and start over", None, QtGui.QApplication.UnicodeUTF8)) + _translate = QtCore.QCoreApplication.translate + Dialog.setWindowTitle(_translate("Dialog", "BTChip setup")) + self.TitleLabel.setText(_translate("Dialog", "BTChip setup - seed backup")) + self.IntroLabel.setText(_translate("Dialog", "Did you see the seed correctly displayed and did you backup it properly ?")) + self.seedOkButton.setText(_translate("Dialog", "Yes, the seed is backed up properly and kept in a safe place, move on")) + self.seedKoButton.setText(_translate("Dialog", "No, I didn\'t see the seed. Wipe the dongle and start over")) diff --git a/ui/make.sh b/ui/make.sh index 24119f9..1d454e8 100755 --- a/ui/make.sh +++ b/ui/make.sh @@ -1,12 +1,12 @@ #!/bin/bash -pyuic4 personalization-00-start.ui -o ../btchip/ui/personalization00start.py -pyuic4 personalization-01-seed.ui -o ../btchip/ui/personalization01seed.py -pyuic4 personalization-02-security.ui -o ../btchip/ui/personalization02security.py -pyuic4 personalization-03-config.ui -o ../btchip/ui/personalization03config.py -pyuic4 personalization-04-finalize.ui -o ../btchip/ui/personalization04finalize.py -pyuic4 personalization-seedbackup-01.ui -o ../btchip/ui/personalizationseedbackup01.py -pyuic4 personalization-seedbackup-02.ui -o ../btchip/ui/personalizationseedbackup02.py -pyuic4 personalization-seedbackup-03.ui -o ../btchip/ui/personalizationseedbackup03.py -pyuic4 personalization-seedbackup-04.ui -o ../btchip/ui/personalizationseedbackup04.py +pyuic5 personalization-00-start.ui -o ../btchip/ui/personalization00start.py +pyuic5 personalization-01-seed.ui -o ../btchip/ui/personalization01seed.py +pyuic5 personalization-02-security.ui -o ../btchip/ui/personalization02security.py +pyuic5 personalization-03-config.ui -o ../btchip/ui/personalization03config.py +pyuic5 personalization-04-finalize.ui -o ../btchip/ui/personalization04finalize.py +pyuic5 personalization-seedbackup-01.ui -o ../btchip/ui/personalizationseedbackup01.py +pyuic5 personalization-seedbackup-02.ui -o ../btchip/ui/personalizationseedbackup02.py +pyuic5 personalization-seedbackup-03.ui -o ../btchip/ui/personalizationseedbackup03.py +pyuic5 personalization-seedbackup-04.ui -o ../btchip/ui/personalizationseedbackup04.py