def __init__(self, parent=None): """ QPipelineView(parent: QWidget) -> QPipelineView Initialize the graphics view and its properties """ QPipelineView.__init__(self, parent) self.setWindowTitle('Annotated Pipeline') self.inspector = PipelineInspector()
def __init__(self, parent=None): """ QPipelineView(parent: QWidget) -> QPipelineView Initialize the graphics view and its properties """ QPipelineView.__init__(self, parent) self.setWindowTitle('Annotated Pipeline') self.inspector = PipelineInspector()
def __init__(self, parent=None): QPipelineView.__init__(self, parent) self.setReadOnlyMode(True) self.set_title("Provenance") self.log = None self.execution = None self.parentExecution = None self.isUpdating = False # self.exec_to_wf_map = {} # self.workflow_execs = [] # Hook shape selecting functions self.connect(self.scene(), QtCore.SIGNAL("moduleSelected"), self.moduleSelected)
def __init__(self, parent=None): QPipelineView.__init__(self, parent) self.setReadOnlyMode(True) self.set_title("Provenance") self.log = None self.execution = None self.parentExecution = None self.isUpdating = False # self.exec_to_wf_map = {} # self.workflow_execs = [] # Hook shape selecting functions self.connect(self.scene(), QtCore.SIGNAL("moduleSelected"), self.moduleSelected)
def __init__(self, parent, scene, single_output=False, include_module_ids=[]): """ QReadOnlyPortSelectPipelineView(parent: QPipelineView, scene: QGraphicsScene, single_output: bool, include_module_ids: list) -> QReadOnlyPortSelectPipelineView Create a read only pipeline view that only allows selection of ports from the modules in include_module_ids. If single_output is True, only one output port can be selected at a time. """ QPipelineView.__init__(self, parent) self.single_output = single_output self._shown = False self._selected_input_ports = [] self._selected_output_ports = [] # Create custom scene scene_copy = QPipelineScene(self) scene_copy.controller = scene.controller scene_copy.setupScene(scene.pipeline) scene_copy.selectAll() if include_module_ids: # Remove modules not in the include list and associated connections sel_modules, sel_connections = scene_copy.get_selected_item_ids() [ scene_copy.remove_module(m_id) for m_id in sel_modules if m_id not in include_module_ids ] [ scene_copy.remove_connection(c_id) for c_id in sel_connections if c_id not in scene_copy.get_selected_item_ids()[1] ] # Hide configure button on modules for item in scene_copy.selectedItems(): if type(item) == QGraphicsModuleItem: for c_item in item.childItems(): if type(c_item) == QGraphicsConfigureItem: c_item.setVisible(False) # Unselect everything and use the newly created scene scene_copy.clearSelection() scene_copy.updateSceneBoundingRect() self.setScene(scene_copy)
def __init__(self, parent, scene, single_output=False, include_module_ids=[]): """ QReadOnlyPortSelectPipelineView(parent: QPipelineView, scene: QGraphicsScene, single_output: bool, include_module_ids: list) -> QReadOnlyPortSelectPipelineView Create a read only pipeline view that only allows selection of ports from the modules in include_module_ids. If single_output is True, only one output port can be selected at a time. """ QPipelineView.__init__(self, parent) self.single_output = single_output self._shown = False self._selected_input_ports = [] self._selected_output_ports = [] # Create custom scene scene_copy = QPipelineScene(self) scene_copy.controller = scene.controller scene_copy.setupScene(scene.pipeline) scene_copy.selectAll() if include_module_ids: # Remove modules not in the include list and associated connections sel_modules, sel_connections = scene_copy.get_selected_item_ids() [scene_copy.remove_module(m_id) for m_id in sel_modules if m_id not in include_module_ids] [scene_copy.remove_connection(c_id) for c_id in sel_connections if c_id not in scene_copy.get_selected_item_ids()[1]] # Hide configure button on modules for item in scene_copy.selectedItems(): if type(item) == QGraphicsModuleItem: for c_item in item.childItems(): if type(c_item) == QGraphicsConfigureItem: c_item.setVisible(False) # Unselect everything and use the newly created scene scene_copy.clearSelection() scene_copy.updateSceneBoundingRect() self.setScene(scene_copy)
def __init__(self, parent=None): QPipelineView.__init__(self, parent) self.setBackgroundBrush(CurrentTheme.QUERY_RESULT_BACKGROUND_BRUSH) self.scene().set_read_only_mode(True)
def __init__(self, parent=None): QPipelineView.__init__(self, parent) self.setBackgroundBrush(CurrentTheme.QUERY_BACKGROUND_BRUSH) self.scene().current_pipeline = Pipeline() self.query_controller = None