Automatic data save when changing wizard page
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 Jan 2009 15:37:19 +0000 (15:37 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 27 Jan 2009 15:37:19 +0000 (15:37 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2229 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BModulePage.py
wizard/BWizard.py
wizard/BWizardPage.py

index 7fca118bb465e4f1a72b21c163f1d7800f22edbb..19d0c3a50862715d2c608330f9b2cc3571f6d134 100644 (file)
@@ -100,7 +100,7 @@ class BModulePage(BWizardPage):
                     spinBox.setSuffix("L")
                 spinBox.setValue(int(configurations[property]["value"].replace("L", "")))
     
-    def _savePage(self, previousRow, previousColumn):
+    def _saveData(self, previousRow, previousColumn):
         module = self._module(previousRow)
         moduleConfigurations = self._configurations(module)
         for index in range(self.pageContent.propertyTable.rowCount()):
@@ -117,7 +117,7 @@ class BModulePage(BWizardPage):
     
     def _pageChanged(self, row, column, previousRow, previousColumn):
         if previousRow != -1 and previousColumn != -1:
-            self._savePage(previousRow, previousColumn)
+            self._saveData(previousRow, previousColumn)
         self._fillPropertyTable()
     
     def _currentModule(self):
index 9a035b963b8991ee41ed5be9bcbc344164193a28..9e227fa645c2b35cd9256edf13444777e9974b2e 100644 (file)
@@ -39,6 +39,9 @@ class BWizard(QWizard):
         self.connect(self, SIGNAL("currentIdChanged(int)"), self._pageChanged)
     
     def _pageChanged(self, pageId):
+        prevPage = self.page(pageId - 1)
+        if prevPage is not None:
+            prevPage.saveData()
         page = self.page(pageId)
         if page is not None:
             page.reloadData()
\ No newline at end of file
index b4fc6217025419c244c07c57af0743e68ca89319..7f7039af97ebe6a4cda766334cf00d12840cb793 100644 (file)
@@ -61,4 +61,7 @@ class BWizardPage(QWizardPage):
         self._settingsStore("toolchains", qvariant_converter.convertBoolDict(toolchains))
     
     def reloadData(self):
+        pass
+    
+    def saveData(self):
         pass
\ No newline at end of file