4 # Copyright 2009 Develer S.r.l. (http://www.develer.com/)
9 # Author: Lorenzo Berni <duplo@develer.com>
14 from PyQt4.QtGui import *
15 from BWizardPage import *
22 class BOutputPage(BWizardPage):
24 Page of the wizard that show a little summary of the previous decisions.
28 BWizardPage.__init__(self, UI_LOCATION + "/output_select.ui")
29 self.setTitle(self.tr("Choose the project output"))
31 ## Overloaded BWizardPage methods. ##
33 def connectSignals(self):
35 Overload of the BWizardPage connectSignals method.
37 for plugin in self._plugin_dict:
38 self.connect(plugin, SIGNAL("stateChanged(int)"), self.modeChecked)
42 Overload of the BWizardPage setupUi method.
44 self._plugin_dict = {}
45 layout = QVBoxLayout()
46 for plugin in self.availablePlugins():
47 check = QCheckBox(plugin)
48 layout.addWidget(check)
49 check.setCheckState(Qt.Checked)
50 self._plugin_dict[check] = plugin
52 widget.setLayout(layout)
53 self.pageContent.scrollArea.setWidget(widget)
57 Overload of the BWizardPage reloadData method.
65 def modeChecked(self):
67 Slot called when one of the mode checkbox is checked. It stores it.
70 for checkBox, plugin in self._plugin_dict.items():
71 if checkBox.checkState() == Qt.Checked:
72 plugins.append(plugin)
73 self.setProjectInfo("OUTPUT", plugins)
77 def availablePlugins(self):
78 return plugins.__all__