def __init__(self, module, controller, parent=None):
        """ StringFormatConfigurationWidget(
                module: Module,
                controller: VistrailController,
                parent: QWidget)
                -> TupleConfigurationWidget

        Let StandardModuleConfigurationWidget constructor store the
        controller/module object from the builder and set up the
        configuration widget.
        After StandardModuleConfigurationWidget constructor, all of
        these will be available:
        self.module : the Module object int the pipeline
        self.controller: the current vistrail controller

        """
        StandardModuleConfigurationWidget.__init__(self, module,
                                                   controller, parent)

        # Give it a nice window title
        self.setWindowTitle("StringFormat Configuration")

        # Add an empty vertical layout
        centralLayout = QtGui.QVBoxLayout()
        centralLayout.setMargin(0)
        centralLayout.setSpacing(0)
        self.setLayout(centralLayout)

        # Add the configuration button
        self.button = QtGui.QPushButton("Sync ports")
        self.connect(self.button, QtCore.SIGNAL('clicked()'),
                     self.saveTriggered)
        centralLayout.addWidget(self.button)
Example #2
0
    def __init__(self, module, controller, parent=None):
        StandardModuleConfigurationWidget.__init__(self, module,
                                                   controller, parent)

        # Window title
        self.setWindowTitle("Directory configuration")

        central_layout = QtGui.QVBoxLayout()
        central_layout.setMargin(0)
        central_layout.setSpacing(0)
        self.setLayout(central_layout)

        self._list = QtGui.QListWidget()
        self._list.setSortingEnabled(True)
        self.connect(self._list,
                     QtCore.SIGNAL('itemChanged(QListWidgetItem*)'),
                     lambda i: self.updateState())
        central_layout.addWidget(self._list)

        add_button = QtGui.QPushButton("Add a file")
        self.connect(add_button, QtCore.SIGNAL('clicked()'),
                     self.add_file)
        central_layout.addWidget(add_button)

        self.createButtons()

        self.createEntries()
Example #3
0
    def __init__(self, module, controller, available_tree, parent=None):
        StandardModuleConfigurationWidget.__init__(self, module, controller,
                                                   parent)

        #  set title
        if module.has_annotation_with_key('__desc__'):
            label = module.get_annotation_by_key('__desc__').value.strip()
            title = '%s (%s) Module Configuration' % (label, module.name)
        else:
            title = '%s Module Configuration' % module.name
        self.setWindowTitle(title)
        self.build_gui(available_tree)
Example #4
0
    def __init__(self, module, controller, parent=None, 
                 is_input=None, path_type=None):
        StandardModuleConfigurationWidget.__init__(self, module, controller, 
                                                   parent)

        # set title
        if module.has_annotation_with_key('__desc__'):
            label = module.get_annotation_by_key('__desc__').value.strip()
            title = '%s (%s) Module Configuration' % (label, module.name)
        else:
            title = '%s Module Configuration' % module.name
        self.setWindowTitle(title)

        self.build_gui(is_input, path_type)
        self.set_values()
Example #5
0
 def __init__(self, module, controller, parent=None):
     """ PortTableConfigurationWidget(module: Module,
                                      controller: VistrailController,
                                      parent: QWidget)
                                      -> PortTableConfigurationWidget                                       
     Let StandardModuleConfigurationWidget constructor store the
     controller/module object from the builder and set up the
     configuration widget.        
     After StandardModuleConfigurationWidget constructor, all of
     these will be available:
     self.module : the Module object int the pipeline        
     self.controller: the current vistrail controller
                                    
     """
     StandardModuleConfigurationWidget.__init__(self, module, controller,
                                                parent)
Example #6
0
 def __init__(self, module, controller, parent=None):
     """ PortTableConfigurationWidget(module: Module,
                                      controller: VistrailController,
                                      parent: QWidget)
                                      -> PortTableConfigurationWidget                                       
     Let StandardModuleConfigurationWidget constructor store the
     controller/module object from the builder and set up the
     configuration widget.        
     After StandardModuleConfigurationWidget constructor, all of
     these will be available:
     self.module : the Module object int the pipeline        
     self.controller: the current vistrail controller
                                    
     """
     StandardModuleConfigurationWidget.__init__(self, module,
                                                controller, parent)
Example #7
0
    def __init__(self, module, controller, parent=None):
        StandardModuleConfigurationWidget.__init__(self, module,
                                                   controller, parent)

        # Window title
        self.setWindowTitle("Build table configuration")

        central_layout = QtGui.QVBoxLayout()
        central_layout.setMargin(0)
        central_layout.setSpacing(0)
        self.setLayout(central_layout)

        self._scroll_area = QtGui.QScrollArea()
        inner_widget = QtGui.QWidget()
        self._list_layout = QtGui.QVBoxLayout()
        scroll_layout = QtGui.QVBoxLayout()
        scroll_layout.addLayout(self._list_layout)
        scroll_layout.addStretch()
        inner_widget.setLayout(scroll_layout)
        self._scroll_area.setVerticalScrollBarPolicy(
                QtCore.Qt.ScrollBarAlwaysOn)
        self._scroll_area.setWidget(inner_widget)
        self._scroll_area.setWidgetResizable(True)
        central_layout.addWidget(self._scroll_area)

        add_buttons = QtGui.QHBoxLayout()
        central_layout.addLayout(add_buttons)
        add_table = QtGui.QPushButton("Add a whole table")
        self.connect(add_table, QtCore.SIGNAL('clicked()'),
                     self.add_table)
        add_buttons.addWidget(add_table)
        add_column = QtGui.QPushButton("Add a list as a single column")
        self.connect(add_column, QtCore.SIGNAL('clicked()'),
                     self.add_column)
        add_buttons.addWidget(add_column)

        self.createButtons()

        self.createEntries()
Example #8
0
    def __init__(self, module, controller, parent=None):
        StandardModuleConfigurationWidget.__init__(self, module,
                                                   controller, parent)

        # Window title
        self.setWindowTitle("Metadata editor")

        central_layout = QtGui.QVBoxLayout()
        central_layout.setMargin(0)
        central_layout.setSpacing(0)
        self.setLayout(central_layout)

        self._scroll_area = QtGui.QScrollArea()
        inner_widget = QtGui.QWidget()
        self._list_layout = QtGui.QVBoxLayout()
        scroll_layout = QtGui.QVBoxLayout()
        scroll_layout.addLayout(self._list_layout)
        scroll_layout.addStretch()
        inner_widget.setLayout(scroll_layout)
        self._scroll_area.setVerticalScrollBarPolicy(
                QtCore.Qt.ScrollBarAlwaysOn)
        self._scroll_area.setWidget(inner_widget)
        self._scroll_area.setWidgetResizable(True)
        central_layout.addWidget(self._scroll_area)

        add_buttons = QtGui.QHBoxLayout()
        central_layout.addLayout(add_buttons)
        add_string = QtGui.QPushButton("Add a string")
        self.connect(add_string, QtCore.SIGNAL('clicked()'),
                     self.add_string)
        add_buttons.addWidget(add_string, 2)
        add_int = QtGui.QPushButton("Add an integer")
        self.connect(add_int, QtCore.SIGNAL('clicked()'),
                     self.add_int)
        add_buttons.addWidget(add_int, 1)

        self.createButtons()

        self.createEntries()
Example #9
0
    def __init__(self, module, controller, parent=None):
        """ ListConfigurationWidget(module: Module,
                                     controller: VistrailController,
                                     parent: QWidget)
                                     -> TupleConfigurationWidget

        Let StandardModuleConfigurationWidget constructor store the
        controller/module object from the builder and set up the
        configuration widget.
        After StandardModuleConfigurationWidget constructor, all of
        these will be available:
        self.module : the Module object int the pipeline
        self.controller: the current vistrail controller

        """
        StandardModuleConfigurationWidget.__init__(self, module,
                                                   controller, parent)

        # Give it a nice window title
        self.setWindowTitle("List Configuration")

        # Add an empty vertical layout
        centralLayout = QtGui.QVBoxLayout()
        centralLayout.setMargin(0)
        centralLayout.setSpacing(0)
        self.setLayout(centralLayout)

        # Add the configuration widget
        config_layout = QtGui.QFormLayout()
        self.number = QtGui.QSpinBox()
        self.number.setValue(self.countAdditionalPorts())
        self.connect(self.number, QtCore.SIGNAL('valueChanged(int)'),
                     lambda r: self.updateState())
        config_layout.addRow("Number of additional connections:", self.number)
        centralLayout.addLayout(config_layout)

        self.createButtons()
Example #10
0
    def __init__(self, module, controller, parent=None):
        """ ListConfigurationWidget(module: Module,
                                     controller: VistrailController,
                                     parent: QWidget)
                                     -> TupleConfigurationWidget

        Let StandardModuleConfigurationWidget constructor store the
        controller/module object from the builder and set up the
        configuration widget.
        After StandardModuleConfigurationWidget constructor, all of
        these will be available:
        self.module : the Module object int the pipeline
        self.controller: the current vistrail controller

        """
        StandardModuleConfigurationWidget.__init__(self, module,
                                                   controller, parent)

        # Give it a nice window title
        self.setWindowTitle("List Configuration")

        # Add an empty vertical layout
        centralLayout = QtGui.QVBoxLayout()
        centralLayout.setMargin(0)
        centralLayout.setSpacing(0)
        self.setLayout(centralLayout)

        # Add the configuration widget
        config_layout = QtGui.QFormLayout()
        self.number = QtGui.QSpinBox()
        self.number.setValue(self.countAdditionalPorts())
        self.connect(self.number, QtCore.SIGNAL('valueChanged(int)'),
                     lambda r: self.updateState())
        config_layout.addRow("Number of additional connections:", self.number)
        centralLayout.addLayout(config_layout)

        self.createButtons()
Example #11
0
    def __init__(self, module, controller, parent=None):
        StandardModuleConfigurationWidget.__init__(self, module, controller,
                                                   parent)

        # Window title
        self.setWindowTitle("Build table configuration")

        central_layout = QtGui.QVBoxLayout()
        central_layout.setMargin(0)
        central_layout.setSpacing(0)
        self.setLayout(central_layout)

        self._scroll_area = QtGui.QScrollArea()
        inner_widget = QtGui.QWidget()
        self._list_layout = QtGui.QVBoxLayout()
        scroll_layout = QtGui.QVBoxLayout()
        scroll_layout.addLayout(self._list_layout)
        scroll_layout.addStretch()
        inner_widget.setLayout(scroll_layout)
        self._scroll_area.setVerticalScrollBarPolicy(
            QtCore.Qt.ScrollBarAlwaysOn)
        self._scroll_area.setWidget(inner_widget)
        self._scroll_area.setWidgetResizable(True)
        central_layout.addWidget(self._scroll_area)

        add_buttons = QtGui.QHBoxLayout()
        central_layout.addLayout(add_buttons)
        add_table = QtGui.QPushButton("Add a whole table")
        self.connect(add_table, QtCore.SIGNAL('clicked()'), self.add_table)
        add_buttons.addWidget(add_table)
        add_column = QtGui.QPushButton("Add a list as a single column")
        self.connect(add_column, QtCore.SIGNAL('clicked()'), self.add_column)
        add_buttons.addWidget(add_column)

        self.createButtons()

        self.createEntries()
Example #12
0
    def __init__(self, module, controller, parent=None):
        StandardModuleConfigurationWidget.__init__(self, module, controller,
                                                   parent)

        # Window title
        self.setWindowTitle("Metadata editor")

        central_layout = QtGui.QVBoxLayout()
        central_layout.setMargin(0)
        central_layout.setSpacing(0)
        self.setLayout(central_layout)

        self._scroll_area = QtGui.QScrollArea()
        inner_widget = QtGui.QWidget()
        self._list_layout = QtGui.QVBoxLayout()
        scroll_layout = QtGui.QVBoxLayout()
        scroll_layout.addLayout(self._list_layout)
        scroll_layout.addStretch()
        inner_widget.setLayout(scroll_layout)
        self._scroll_area.setVerticalScrollBarPolicy(
            QtCore.Qt.ScrollBarAlwaysOn)
        self._scroll_area.setWidget(inner_widget)
        self._scroll_area.setWidgetResizable(True)
        central_layout.addWidget(self._scroll_area)

        add_buttons = QtGui.QHBoxLayout()
        central_layout.addLayout(add_buttons)
        add_string = QtGui.QPushButton("Add a string")
        self.connect(add_string, QtCore.SIGNAL('clicked()'), self.add_string)
        add_buttons.addWidget(add_string, 2)
        add_int = QtGui.QPushButton("Add an integer")
        self.connect(add_int, QtCore.SIGNAL('clicked()'), self.add_int)
        add_buttons.addWidget(add_int, 1)

        self.createButtons()

        self.createEntries()
 def __init__(self, module, controller, parent=None):
     StandardModuleConfigurationWidget.__init__(self, module, controller, 
                                                parent)
     self.update_widget()
Example #14
0
 def __init__(self, module, controller, parent=None):
     StandardModuleConfigurationWidget.__init__(self, module, controller,
                                                parent)
     self.update_widget()