lm3s1968: merge the DevelGPS example application.
[bertos.git] / wizard / BRoutePage.py
index 633fac4affd2355ab82c811ac5771b12a0280046..ccd0eff05a7a0f8073971fa6b0ccedf480f0494d 100644 (file)
@@ -61,7 +61,8 @@ class BRoutePage(BWizardPage):
         """
         Overload of the QWizardPage isComplete method.
         """
-        return False
+        self.setProjectInfo("EMPTY_MAIN", self.empty_main)
+        return True
 
     def nextId(self):
         """
@@ -88,13 +89,18 @@ class BRoutePage(BWizardPage):
         """
         Overload of the BWizardPage connectSignals method.
         """
-        pass
+        self.connect(self.pageContent.emptyCheckBox, SIGNAL("stateChanged(int)"), self, SIGNAL("completeChanged()"))
 
     def reloadData(self):
         """
         Overload of the BWizardPage reloadData method.
         """
-        pass
+        preset = self.projectInfo('PROJECT_PRESET')
+        try:
+            QApplication.instance().setOverrideCursor(Qt.WaitCursor)
+            self.project.loadProjectFromPreset(preset)
+        finally:
+            QApplication.instance().restoreOverrideCursor()
 
     ####
 
@@ -106,3 +112,10 @@ class BRoutePage(BWizardPage):
     @property
     def advanced(self):
         return self.pageContent.advancedButton.isChecked()
+
+    @property
+    def empty_main(self):
+        if self.advanced:
+            return self.pageContent.emptyCheckBox.isChecked()
+        else:
+            return False