当前位置: 首页>>代码示例>>Python>>正文


Python QAnnotatedPipelineView.zoomToFit方法代码示例

本文整理汇总了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)
开发者ID:,项目名称:,代码行数:65,代码来源:


注:本文中的vistrails.gui.paramexplore.pe_pipeline.QAnnotatedPipelineView.zoomToFit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。