From f33f24e5577871635c7298ecfba0e5b543549102 Mon Sep 17 00:00:00 2001 From: duplo Date: Wed, 31 Mar 2010 10:57:22 +0000 Subject: [PATCH] Remove unused code. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3344 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BEditingDialog.py | 26 +++++++++++++------------- wizard/BProject.py | 1 + wizard/bertos.py | 22 +++++++--------------- 3 files changed, 21 insertions(+), 28 deletions(-) diff --git a/wizard/BEditingDialog.py b/wizard/BEditingDialog.py index 1ae0fd86..622c795b 100644 --- a/wizard/BEditingDialog.py +++ b/wizard/BEditingDialog.py @@ -39,14 +39,14 @@ import os from PyQt4.QtCore import * from PyQt4.QtGui import * -from bertos_utils import loadBertosProject, bertosVersion, getToolchainName, createBertosProject +from bertos_utils import bertosVersion, getToolchainName, createBertosProject from BToolchainPage import BToolchainPage from BVersionPage import BVersionPage from BProject import BProject import qvariant_converter -import BModulePage +from BModulePage import BModulePage import bertos_utils class BEditingDialog(QDialog): @@ -60,18 +60,18 @@ class BEditingDialog(QDialog): def setupUi(self): layout = QVBoxLayout() - self.module_page = BModulePage.BModulePage() + self.module_page = BModulePage() layout.addWidget(self.module_page) - frequency_layout = QHBoxLayout() - frequency_layout.addWidget(QLabel(self.tr("CPU frequency"))) - self.cpu_frequency_spinbox = QDoubleSpinBox() - self.cpu_frequency_spinbox.setSuffix("Hz") - self.cpu_frequency_spinbox.setRange(1, 1000000000) - self.cpu_frequency_spinbox.setSingleStep(1000) - self.cpu_frequency_spinbox.setDecimals(0) - frequency_layout.addWidget(self.cpu_frequency_spinbox) - frequency_layout.addStretch() - layout.addLayout(frequency_layout) + frequency_layout = QHBoxLayout() + frequency_layout.addWidget(QLabel(self.tr("CPU frequency"))) + self.cpu_frequency_spinbox = QDoubleSpinBox() + self.cpu_frequency_spinbox.setSuffix("Hz") + self.cpu_frequency_spinbox.setRange(1, 1000000000) + self.cpu_frequency_spinbox.setSingleStep(1000) + self.cpu_frequency_spinbox.setDecimals(0) + frequency_layout.addWidget(self.cpu_frequency_spinbox) + frequency_layout.addStretch() + layout.addLayout(frequency_layout) button_layout = QHBoxLayout() self.advanced_button = QToolButton() self.setupMenu() diff --git a/wizard/BProject.py b/wizard/BProject.py index 697355e8..47f9cd96 100644 --- a/wizard/BProject.py +++ b/wizard/BProject.py @@ -36,6 +36,7 @@ import os import fnmatch import copy +import pickle from bertos_utils import * diff --git a/wizard/bertos.py b/wizard/bertos.py index 91646b74..7097ebce 100755 --- a/wizard/bertos.py +++ b/wizard/bertos.py @@ -42,10 +42,9 @@ from PyQt4.QtGui import * import exception_handler -import BProject +from BProject import BProject -import BStartPage -import BWizard +from BWizard import BWizard from BIntroPage import BIntroPage from BFolderPage import BFolderPage @@ -61,14 +60,14 @@ from BFinalPage import BFinalPage from BEditingDialog import BEditingDialog, BVersionDialog, BToolchainDialog -import bertos_utils -import const +from const import DATA_DIR from LoadException import VersionException, ToolchainException def newProject(): + QApplication.instance().project = BProject() page_list = [BIntroPage, BFolderPage, BBoardPage, BVersionPage, BCpuPage, BToolchainPage, BModulePage, BOutputPage, BCreationPage, BFinalPage] - wizard = BWizard.BWizard(page_list) + wizard = BWizard(page_list) wizard.show() wizard.exec_() project = QApplication.instance().project @@ -86,7 +85,7 @@ def editProject(project_file): info_dict = {} while(True): try: - QApplication.instance().project = BProject.BProject(project_file, info_dict) + QApplication.instance().project = BProject(project_file, info_dict) except VersionException: QMessageBox.critical( None, @@ -114,18 +113,11 @@ def editProject(project_file): dialog = BEditingDialog() dialog.exec_() -def showStartPage(): - QApplication.instance().dialog = BStartPage.BStartPage() - QApplication.instance().connect(QApplication.instance().dialog, SIGNAL("newProject"), newProject) - QApplication.instance().connect(QApplication.instance().dialog, SIGNAL("editProject"), editProject) - QApplication.instance().dialog.show() - def main(): app = QApplication(sys.argv) app.settings = QSettings("Develer", "Bertos Configurator") - app.project = BProject.BProject() # Development utility lines, to be removed for production - datadir = const.DATA_DIR + datadir = DATA_DIR qrc, rcc = os.path.join(datadir, 'bertos.qrc'), os.path.join(datadir, 'bertos.rcc') if not (hasattr(sys, "frozen") and sys.frozen) and newer(qrc, rcc): os.system("rcc -binary %s -o %s" %(qrc, rcc)) -- 2.25.1