From 324dbfb81a4cf39665717446d79622fc21a05635 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Thu, 1 Oct 2015 09:42:31 +0200 Subject: [PATCH] Migration Wizard - from standard PyBitmessage to this one - not working yet --- src/bitmessageqt/migrationwizard.py | 84 +++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 src/bitmessageqt/migrationwizard.py diff --git a/src/bitmessageqt/migrationwizard.py b/src/bitmessageqt/migrationwizard.py new file mode 100644 index 00000000..945adefa --- /dev/null +++ b/src/bitmessageqt/migrationwizard.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python2.7 +from PyQt4 import QtCore, QtGui + +class MigrationWizardIntroPage(QtGui.QWizardPage): + def __init__(self): + super(QtGui.QWizardPage, self).__init__() + self.setTitle("Migrating configuration") + + label = QtGui.QLabel("This wizard will help you to migrate your configuration. " + "You can still keep using PyBitMessage once you migrate, the changes are backwards compatible.") + label.setWordWrap(True) + + layout = QtGui.QVBoxLayout() + layout.addWidget(label) + self.setLayout(layout) + + def nextId(self): + return 1 + + +class MigrationWizardAddressesPage(QtGui.QWizardPage): + def __init__(self, addresses): + super(QtGui.QWizardPage, self).__init__() + self.setTitle("Addresses") + + label = QtGui.QLabel("Please select addresses that you are already using with mailchuck. ") + label.setWordWrap(True) + + layout = QtGui.QVBoxLayout() + layout.addWidget(label) + self.setLayout(layout) + + def nextId(self): + return 10 + + +class MigrationWizardGPUPage(QtGui.QWizardPage): + def __init__(self): + super(QtGui.QWizardPage, self).__init__() + self.setTitle("GPU") + + label = QtGui.QLabel("Are you using a GPU? ") + label.setWordWrap(True) + + layout = QtGui.QVBoxLayout() + layout.addWidget(label) + self.setLayout(layout) + + def nextId(self): + return 10 + + +class MigrationWizardConclusionPage(QtGui.QWizardPage): + def __init__(self): + super(QtGui.QWizardPage, self).__init__() + self.setTitle("All done!") + + label = QtGui.QLabel("You successfully migrated.") + label.setWordWrap(True) + + layout = QtGui.QVBoxLayout() + layout.addWidget(label) + self.setLayout(layout) + + +class Ui_MigrationWizard(QtGui.QWizard): + def __init__(self, addresses): + super(QtGui.QWizard, self).__init__() + + self.pages = {} + + page = MigrationWizardIntroPage() + self.setPage(0, page) + self.setStartId(0) + page = MigrationWizardAddressesPage() + self.setPage(1, page) + page = MigrationWizardGPUPage(addresses) + self.setPage(2, page) + page = MigrationWizardConclusionPage() + self.setPage(10, page) + + self.setWindowTitle("Migration from PyBitMessage wizard") + self.adjustSize() + self.show() \ No newline at end of file