# HG changeset patch # User paulb # Date 1130871492 0 # Node ID 72a9d4758617d81dfb77cebccaea4add03b95b43 # Parent 6029e3d9497f2c27aec23776c4aab83277e265be [project @ 2005-11-01 18:58:12 by paulb] Added request_refresh as the application method for refreshing a form. Added memory and storage unit initialisation. diff -r 6029e3d9497f -r 72a9d4758617 examples/Common/QtConfigurator/__init__.py --- a/examples/Common/QtConfigurator/__init__.py Tue Nov 01 18:57:41 2005 +0000 +++ b/examples/Common/QtConfigurator/__init__.py Tue Nov 01 18:58:12 2005 +0000 @@ -26,8 +26,10 @@ "cpu" : "config_cpu.xml", "hard-disk" : "config_hard_disk.xml", "keyboard" : "config_keyboard.xml", + "memory-unit" : "config_memory_unit.xml", "mouse" : "config_mouse.xml", - "screen" : "config_screen.xml" + "screen" : "config_screen.xml", + "storage-unit" : "config_storage_unit.xml" } # Initialisation. @@ -86,10 +88,18 @@ for hard_disk_value in self.factory.find_widgets(self, "hard_disk_value"): self.populate_list(hard_disk_value, valid) + # Find memory units. + for memory_unit_value in self.factory.find_widgets(self, "memory_unit_value"): + self.populate_list(memory_unit_value, self.get_elements("memory-unit")) + + # Find storage units. + for storage_unit_value in self.factory.find_widgets(self, "storage_unit_value"): + self.populate_list(storage_unit_value, self.get_elements("storage-unit")) + # Slots. def baseSystemChanged(self, current_text): - self.form_refresh(current_text) + self.request_refresh(current_text) def addHardDisk(self): #hard_disks = self.prepare_widget("configuration", "hard-disks") @@ -105,7 +115,7 @@ # Perform the consistency check. # NOTE: This is not as efficient as it could be since the general check # NOTE: refreshes all fields, not just newly added ones. - self.form_refresh() + self.request_refresh() def addMemoryUnit(self): #memory_units = self.prepare_widget("configuration", "memory-units") @@ -121,7 +131,7 @@ # Perform the consistency check. # NOTE: This is not as efficient as it could be since the general check # NOTE: refreshes all fields, not just newly added ones. - self.form_refresh() + self.request_refresh() def addStorageUnit(self): #storage_units = self.prepare_widget("configuration", "storage-units") @@ -137,7 +147,7 @@ # Perform the consistency check. # NOTE: This is not as efficient as it could be since the general check # NOTE: refreshes all fields, not just newly added ones. - self.form_refresh() + self.request_refresh() def removeHardDisk(self): #page = self.hard_disks.currentPage()