本文整理汇总了Python中vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView.zoomToFit方法的典型用法代码示例。如果您正苦于以下问题:Python QAnnotatedPipelineView.zoomToFit方法的具体用法?Python QAnnotatedPipelineView.zoomToFit怎么用?Python QAnnotatedPipelineView.zoomToFit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView
的用法示例。
在下文中一共展示了QAnnotatedPipelineView.zoomToFit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: QAliasParameterView
# 需要导入模块: from vistrails.gui.paramexplore.pe_pipeline import QAnnotatedPipelineView [as 别名]
# 或者: from vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView import zoomToFit [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)