本文整理匯總了Python中vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView.setScene方法的典型用法代碼示例。如果您正苦於以下問題:Python QAnnotatedPipelineView.setScene方法的具體用法?Python QAnnotatedPipelineView.setScene怎麽用?Python QAnnotatedPipelineView.setScene使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView
的用法示例。
在下文中一共展示了QAnnotatedPipelineView.setScene方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: QParameterView
# 需要導入模塊: from vistrails.gui.paramexplore.pe_pipeline import QAnnotatedPipelineView [as 別名]
# 或者: from vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView import setScene [as 別名]
class QParameterView(QtGui.QWidget, QVistrailsPaletteInterface):
"""
QParameterView contains the parameter exploration properties and the
parameter palette
"""
def __init__(self, controller=None, parent=None):
QtGui.QWidget.__init__(self, parent)
self.set_title('Pipeline Methods')
self.controller = controller
vLayout = QtGui.QVBoxLayout()
vLayout.setMargin(0)
vLayout.setSpacing(5)
self.setLayout(vLayout)
self.toggleUnsetParameters = QtGui.QCheckBox('Show Unset Parameters')
vLayout.addWidget(self.toggleUnsetParameters, 0, QtCore.Qt.AlignRight)
self.parameterWidget = QParameterWidget()
vLayout.addWidget(self.parameterWidget)
self.treeWidget = self.parameterWidget.treeWidget
self.pipeline_view = QAnnotatedPipelineView()
vLayout.addWidget(self.pipeline_view)
vLayout.setStretch(0,0)
vLayout.setStretch(1,1)
vLayout.setStretch(2,0)
self.connect(self.toggleUnsetParameters, QtCore.SIGNAL("toggled(bool)"),
self.parameterWidget.treeWidget.toggleUnsetParameters)
def set_controller(self, controller):
if self.controller == controller:
return
self.controller = controller
if self.controller is not None:
self.set_pipeline(self.controller.current_pipeline)
self.pipeline_view.setScene(self.controller.current_pipeline_scene)
else:
self.set_pipeline(None)
self.pipeline_view.setScene(None)
def set_pipeline(self, pipeline):
self.pipeline = pipeline
self.parameterWidget.set_pipeline(pipeline, self.controller)
self.pipeline_view.updateAnnotatedIds(pipeline)