Force the reload of the page data when the wizard page is showed
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 18 Dec 2008 13:18:16 +0000 (13:18 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 18 Dec 2008 13:18:16 +0000 (13:18 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2078 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BWizard.py

index 0f8eb49f2fc6ff999c71f436c0cdcf253d3f1e5e..b7490667f6365b0c4f7144b10f90f70d3cce46b5 100644 (file)
@@ -9,6 +9,7 @@
 # Author: Lorenzo Berni <duplo@develer.com>
 #
 
+from PyQt4.QtCore import *
 from PyQt4.QtGui import *
 
 import BFolderPage
@@ -20,6 +21,18 @@ class BWizard(QWizard):
     def __init__(self):
         QWizard.__init__(self)
         self.setWindowTitle("Create a BeRTOS project")
+        self._addPages()
+        self._connectSignals()
+    
+    def _addPages(self):
         self.addPage(BFolderPage.BFolderPage())
         self.addPage(BVersionPage.BVersionPage())
-        self.addPage(BCpuPage.BCpuPage())
\ No newline at end of file
+        self.addPage(BCpuPage.BCpuPage())
+    
+    def _connectSignals(self):
+        self.connect(self, SIGNAL("currentIdChanged(int)"), self._pageChanged)
+    
+    def _pageChanged(self, pageId):
+        page = self.page(pageId)
+        if page is not None:
+            page.reloadData()
\ No newline at end of file