Remove unused code.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 31 Mar 2010 10:57:22 +0000 (10:57 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 31 Mar 2010 10:57:22 +0000 (10:57 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3344 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BEditingDialog.py
wizard/BProject.py
wizard/bertos.py

index 1ae0fd864c693236955f5498e6341fc3955c1911..622c795b1049d6dcd82565e1734f51adb63ae828 100644 (file)
@@ -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()
index 697355e8ddb859db43bb2c4cc41fd60e27b731b8..47f9cd961ae9c56ddb6f33ed8a27493f488975b2 100644 (file)
@@ -36,6 +36,7 @@
 import os
 import fnmatch
 import copy
+import pickle
 
 from bertos_utils import *
 
index 91646b7487983b0fdaa1c83df673c8a47f2f62d6..7097ebce2a777d1039bfbe8968acc27224457f68 100755 (executable)
@@ -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))