Move general cpu info in local cpu common file. Rename to path.common.
[bertos.git] / wizard / BStartPage.py
index ea39f19fa11f4324a3ff269972a51d54045dc3e3..e8432bd60b72a68ead6ff05a07f740a52ee8f682 100644 (file)
 #
 
 from BWizardPage import *
-from libbertos import *
+import bertos_utils
 
 class BStartPage(BWizardPage):
     
     def __init__(self):
         BWizardPage.__init__(self, "start.ui")
         self._connectSignals()
-        self.setTitle(self.tr("Create or edit a beRTOS project"))
+        self.setTitle(self.tr("Create or edit a BeRTOS project"))
         self._initializeButtons()
         self._setupUi()
         
@@ -35,16 +35,21 @@ class BStartPage(BWizardPage):
         self.pageContent.newDescription.setVisible(False)
         self.pageContent.editDescription.setVisible(False)
     
+    def isComplete(self):
+        return self.pageContent.newButton.isChecked() or self.pageContent.editButton.isChecked()
+    
     def newProject(self):
         filename = QFileDialog.getSaveFileName(self, self.tr("Destination directory"), "", "", "", QFileDialog.ShowDirsOnly)
         if not filename.isEmpty():
             self.pageContent.newDescription.setText("(\"" + filename + "\")")
             self.pageContent.newDescription.setVisible(True)
             # TODO: It's better to create it at the end of the wizard...
-            createBertosProject(filename)
+            bertos_utils.createBertosProject(filename)
+            self.emit(SIGNAL("completeChanged()"))
         else:
             self.pageContent.newDescription.setText("")
             self.pageContent.newDescription.setVisible(False)
+            self.pageContent.newButton.setChecked(False)
     
     def editProject(self):
-        pass
\ No newline at end of file
+        self.pageContent.newButton.setChecked(False)
\ No newline at end of file