migration to PyQt5. initial commit.
This commit is contained in:
@@ -7,9 +7,9 @@ import six
|
||||
import sys
|
||||
import os
|
||||
|
||||
from PyQt4.QtGui import *
|
||||
from PyQt4.QtCore import *
|
||||
import PyQt4.QtCore as QtCore
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtCore import *
|
||||
import PyQt5.QtCore as QtCore
|
||||
|
||||
import electrum
|
||||
from electrum import Wallet, WalletStorage
|
||||
@@ -101,6 +101,9 @@ def wizard_dialog(func):
|
||||
# WindowModalDialog must come first as it overrides show_error
|
||||
class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
||||
|
||||
accept_signal = pyqtSignal()
|
||||
synchronized_signal = pyqtSignal(str)
|
||||
|
||||
def __init__(self, config, app, plugins, storage):
|
||||
BaseWizard.__init__(self, config, storage)
|
||||
QDialog.__init__(self, None)
|
||||
@@ -111,7 +114,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
||||
self.plugins = plugins
|
||||
self.language_for_seed = config.get('language')
|
||||
self.setMinimumSize(600, 400)
|
||||
self.connect(self, QtCore.SIGNAL('accept'), self.accept)
|
||||
self.accept_signal.connect(self.accept)
|
||||
self.title = QLabel()
|
||||
self.main_widget = QWidget()
|
||||
self.back_button = QPushButton(_("Back"), self)
|
||||
@@ -408,8 +411,8 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
||||
msg = _("Recovery successful")
|
||||
else:
|
||||
msg = _("No transactions found for this seed")
|
||||
self.emit(QtCore.SIGNAL('synchronized'), msg)
|
||||
self.connect(self, QtCore.SIGNAL('synchronized'), self.show_message)
|
||||
self.synchronized_signal.emit(msg)
|
||||
self.synchronized_signal.connect(self.show_message)
|
||||
t = threading.Thread(target = task)
|
||||
t.daemon = True
|
||||
t.start()
|
||||
@@ -436,7 +439,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
||||
self.run(action)
|
||||
|
||||
def terminate(self):
|
||||
self.emit(QtCore.SIGNAL('accept'))
|
||||
self.accept_signal.emit()
|
||||
|
||||
def waiting_dialog(self, task, msg):
|
||||
self.please_wait.setText(MSG_GENERATING_WAIT)
|
||||
|
||||
Reference in New Issue
Block a user