Esempio n. 1
0
    def __init__(self, parent, package):
        QtGui.QDialog.__init__(self, parent)

        self.setSizePolicy(QtGui.QSizePolicy.Expanding,
                           QtGui.QSizePolicy.Expanding)

        self.setWindowTitle('Configuration for package "%s"' % package.name)
        self._package = package
        c = package.configuration
        self._configuration_object = c
        assert c is not None

        layout = QtGui.QVBoxLayout(self)
        self.setLayout(layout)

        self._configuration_widget = QConfigurationWidget(self, c, c)
        layout.addWidget(self._configuration_widget)

        btns = (QtGui.QDialogButtonBox.Close
                | QtGui.QDialogButtonBox.RestoreDefaults)
        self._button_box = QtGui.QDialogButtonBox(btns, QtCore.Qt.Horizontal,
                                                  self)
        self.connect(self._button_box,
                     QtCore.SIGNAL('clicked(QAbstractButton *)'),
                     self.button_clicked)

        self.connect(self._configuration_widget._tree.treeWidget,
                     QtCore.SIGNAL('configuration_changed'),
                     self.configuration_changed)

        layout.addWidget(self._button_box)
Esempio n. 2
0
 def create_configuration_tab(self):
     return QConfigurationWidget(self,
                                 get_vistrails_persistent_configuration(),
                                 get_vistrails_configuration())