self.connect(self.pageContent.boardList, SIGNAL("currentItemChanged(QListWidgetItem*,QListWidgetItem*)"), self, SIGNAL("completeChanged()"))
self.connect(self.pageContent.customButton, SIGNAL("clicked()"), self.customButtonClicked)
- def reloadData(self):
+ def reloadData(self, previous_id=None):
"""
Overload of the BWizardPage reloadData method.
"""
self.connect(self.pageContent.cpuList, SIGNAL("currentItemChanged(QListWidgetItem *, QListWidgetItem*)"), self.rowChanged)
self.connect(self.pageContent.frequencySpinBox, SIGNAL("editingFinished()"), self.freqChanged)
- def reloadData(self):
+ def reloadData(self, previous_id=None):
"""
Overload of the BWizardPage reloadData method.
"""
"""
Slot called when the user select an entry from the cpu list.
"""
- if self.pageContent.cpuList.currentItem():
- description = qvariant_converter.getDict(self.pageContent.cpuList.currentItem().data(Qt.UserRole))["CPU_DESC"]
- description = qvariant_converter.getStringList(description)
- if not self.freq_modified:
- # Retrieve the default cpu frequency when the value isn't already modified
- current_freq = qvariant_converter.getDict(self.pageContent.cpuList.currentItem().data(Qt.UserRole))["CPU_DEFAULT_FREQ"]
- current_freq = qvariant_converter.getString(current_freq)
- current_freq = long(current_freq.replace("U", "").replace("L", ""))
- self.pageContent.frequencySpinBox.setValue(long(current_freq))
- self.pageContent.descriptionLabel.setText("<br>".join(description))
- self.pageContent.descriptionLabel.setVisible(True)
- self.emit(SIGNAL("completeChanged()"))
+ description = qvariant_converter.getDict(self.pageContent.cpuList.currentItem().data(Qt.UserRole))["CPU_DESC"]
+ description = qvariant_converter.getStringList(description)
+ if not self.freq_modified:
+ # Retrieve the default cpu frequency when the value isn't already modified
+ current_freq = qvariant_converter.getDict(self.pageContent.cpuList.currentItem().data(Qt.UserRole))["CPU_DEFAULT_FREQ"]
+ current_freq = qvariant_converter.getString(current_freq)
+ current_freq = long(current_freq.replace("U", "").replace("L", ""))
+ self.pageContent.frequencySpinBox.setValue(long(current_freq))
+ self.pageContent.descriptionLabel.setText("<br>".join(description))
+ self.pageContent.descriptionLabel.setVisible(True)
+ self.emit(SIGNAL("completeChanged()"))
def freqChanged(self):
"""
self.codelitePluginChanged()
self.setButtonText(QWizard.NextButton, self.tr("Create"))
- def reloadData(self):
+ def reloadData(self, previous_id=None):
self.setupUi()
self.pageContent.summaryTree.clear()
top_level = []
## Overloaded BWizardPage methods ##
- def reloadData(self):
+ def reloadData(self, previous_id=None):
self.setVisible(False)
"""
Overload of the BWizardPage reloadData method.
self.connect(self.pageContent.moduleTree, SIGNAL("itemPressed(QTreeWidgetItem*, int)"), self.moduleClicked)
self.connect(self.pageContent.moduleTree, SIGNAL("itemChanged(QTreeWidgetItem*, int)"), self.dependencyCheck)
- def reloadData(self):
+ def reloadData(self, previous_id=None):
"""
Overload of the BWizardPage reloadData method.
"""
- try:
- QApplication.instance().setOverrideCursor(Qt.WaitCursor)
- self.setupUi()
- self.loadModuleData()
- self.fillModuleTree()
- finally:
- QApplication.instance().restoreOverrideCursor()
+ # Check if the user are approaching this page from the previous or the
+ # next one.
+ if previous_id is None or previous_id < self.wizard().currentId():
+ try:
+ QApplication.instance().setOverrideCursor(Qt.WaitCursor)
+ self.setupUi()
+ self.loadModuleData()
+ self.fillModuleTree()
+ finally:
+ QApplication.instance().restoreOverrideCursor()
####
## Overloaded BWizardPage methods ##
- def reloadData(self):
+ def reloadData(self, previous_id=None):
"""
Overload of the BWizardPage reloadData method.
"""
## Overloaded BWizardPage methods ##
- def reloadData(self):
+ def reloadData(self, previous_id=None):
if not self.projectInfo("PRESET_LOADED"):
preset_path = self.projectInfo("PROJECT_BOARD")
preset_tree = self.projectInfo("PRESET_TREE")
self.connect(self.pageContent.searchButton, SIGNAL("clicked()"), self.searchToolchain)
self.connect(self.pageContent.checkButton, SIGNAL("clicked()"), self.validateAllToolchains)
- def reloadData(self):
+ def reloadData(self, previous_id=None):
"""
Overload of the BWizard reloadData method.
"""
# Fake signal connection for the update button
self.connect(self.pageContent.updateButton, SIGNAL("clicked()"), self.updateClicked)
- def reloadData(self):
+ def reloadData(self, previous_id=None):
"""
Overload of the BWizardPage reloadData method.
"""
"""
def __init__(self, page_list):
+ self._current = None
QWizard.__init__(self)
geometry = QApplication.instance().settings.value("geometry", QVariant()).toRect()
self.setGeometry(geometry)
"""
page = self.page(pageId)
if page:
- page.reloadData()
+ page.reloadData(previous_id= self._current)
+ self._current = pageId
def project(self):
"""
## Methodo to be implemented in child classes when needed ##
- def reloadData(self):
+ def reloadData(self, previous_id=None):
"""
Method called before the page is loaded. The pages that need to use this
method have to implement it.