本文整理匯總了Python中vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView.version_changed方法的典型用法代碼示例。如果您正苦於以下問題:Python QAnnotatedPipelineView.version_changed方法的具體用法?Python QAnnotatedPipelineView.version_changed怎麽用?Python QAnnotatedPipelineView.version_changed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView
的用法示例。
在下文中一共展示了QAnnotatedPipelineView.version_changed方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: QAliasParameterView
# 需要導入模塊: from vistrails.gui.paramexplore.pe_pipeline import QAnnotatedPipelineView [as 別名]
# 或者: from vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView import version_changed [as 別名]
class QAliasParameterView(QtGui.QWidget, QVistrailsPaletteInterface):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.set_title("Mashup Pipeline")
layout = QtGui.QVBoxLayout()
self.parameter_panel = QAliasParameterPanel()
font = QtGui.QFont("Arial", 11, QtGui.QFont.Normal)
font.setItalic(True)
label = QtGui.QLabel("Double-click a parameter to change alias")
label.setFont(font)
param_group = QtGui.QGroupBox(self.parameter_panel.windowTitle())
g_layout = QtGui.QVBoxLayout()
g_layout.setMargin(0)
g_layout.setSpacing(2)
g_layout.addWidget(label)
g_layout.addWidget(self.parameter_panel)
param_group.setLayout(g_layout)
layout.addWidget(param_group)
self.pipeline_view = QAnnotatedPipelineView()
self.pipeline_view.setReadOnlyMode(True)
p_view_group = QtGui.QGroupBox(self.pipeline_view.windowTitle())
g_layout = QtGui.QVBoxLayout()
g_layout.setMargin(0)
g_layout.setSpacing(0)
g_layout.addWidget(self.pipeline_view)
p_view_group.setLayout(g_layout)
layout.addWidget(p_view_group)
self.setLayout(layout)
self.parameter_panel.treeWidget.aliasChanged.connect(self.aliasChanged)
def updateMshpController(self, mshpController):
from vistrails.gui.vistrails_window import _app
self.mshpController = mshpController
self.parameter_panel.set_pipeline(self.mshpController.vtPipeline)
self.pipeline_view.set_controller(self.mshpController.vtController)
self.mshpController.vtController.current_pipeline_view = self.pipeline_view
self.pipeline_view.scene().current_pipeline = self.mshpController.vtPipeline
self.mshpController.vtController.current_pipeline = self.mshpController.vtPipeline
# print "**** should update mashup pipeline view "
# self.pipeline_view.scene().setupScene(self.mshpController.vtPipeline)
self.pipeline_view.scene().clear()
self.pipeline_view.version_changed()
self.pipeline_view.updateAnnotatedIds(self.mshpController.vtPipeline)
# _app.notify('mashup_pipeline_view_set')
def updateMshpVersion(self, version):
# print "will update alias param view"
self.parameter_panel.set_pipeline(self.mshpController.vtPipeline)
self.pipeline_view.version_changed()
def zoomToFit(self):
if self.pipeline_view:
self.pipeline_view.zoomToFit()
def aliasChanged(self, param):
from vistrails.gui.vistrails_window import _app
_app.notify("alias_changed", param)